大屏部署及问题一修改
This commit is contained in:
parent
febef7d242
commit
1a4b9b4093
|
|
@ -42,11 +42,12 @@
|
|||
<!-- 新增云下载按钮 -->
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;" class="admin-header-user-cloud">
|
||||
<img id="cloud-img" width="40" style="margin-left: 90%;margin-top: 6%;"/>
|
||||
<img id="cloud-img" width="40" style="margin-left: 90%;margin-top: 6%;" src="img/cloudDownloadGrey.png"/>
|
||||
</a>
|
||||
<dl class="layui-nav-child" id="cloud-img-container" style="width: 300px;height:300px;overflow-y: auto">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">文件 <span style="color: darkolivegreen;cursor: pointer;margin-left: 135px" onclick="delAll()">清空记录</span></div>
|
||||
<div class="layui-card-header">文件
|
||||
<span style="color: darkolivegreen;cursor: pointer;margin-left: 135px" onclick="delAll()">清空记录</span></div>
|
||||
<div class="layui-card-body" id="cloud-img-record">
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -54,7 +55,7 @@
|
|||
</li>
|
||||
<li class="layui-nav-item" pc>
|
||||
<a href="javascript:;" class="admin-header-user">
|
||||
<img />
|
||||
<img src="img/avatars/1.png"/>
|
||||
<span></span>
|
||||
</a>
|
||||
<dl class="layui-nav-child">
|
||||
|
|
|
|||
|
|
@ -8,7 +8,11 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () {
|
|||
laydate = layui.laydate;
|
||||
form = layui.form;
|
||||
if ($.inArray('sysCompanyManage:add', pers) < 0) {
|
||||
document.getElementById('addDiv').remove();
|
||||
var addDiv=document.getElementById('addDiv');
|
||||
if(addDiv){
|
||||
document.getElementById('addDiv').remove();
|
||||
}
|
||||
|
||||
}
|
||||
//渲染table
|
||||
table.render({
|
||||
|
|
|
|||
|
|
@ -9,7 +9,11 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () {
|
|||
laydate = layui.laydate;
|
||||
form = layui.form;
|
||||
if ($.inArray('sysProjectContent:add', pers) < 0) {
|
||||
document.getElementById('addDiv').remove();
|
||||
var addDiv=document.getElementById('addDiv');
|
||||
if(addDiv){
|
||||
document.getElementById('addDiv').remove();
|
||||
}
|
||||
|
||||
}
|
||||
//渲染table
|
||||
table.render({
|
||||
|
|
|
|||
|
|
@ -8,7 +8,11 @@ layui.use(['table', 'layer', 'laydate', 'jquery', 'form'], function () {
|
|||
laydate = layui.laydate;
|
||||
form = layui.form;
|
||||
if ($.inArray('sysMsgContent:add', pers) < 0) {
|
||||
document.getElementById('addDiv').remove();
|
||||
var addDiv=document.getElementById('addDiv');
|
||||
if(addDiv){
|
||||
document.getElementById('addDiv').remove();
|
||||
}
|
||||
|
||||
}
|
||||
//渲染table
|
||||
table.render({
|
||||
|
|
|
|||
2
js/jq.js
2
js/jq.js
|
|
@ -12,7 +12,7 @@ $.ajaxSetup({
|
|||
layer.msg(message);
|
||||
} else if (code == 401) {
|
||||
localStorage.removeItem("token");
|
||||
location.href = '/hnbcbackstage/login.html';
|
||||
location.href = contentPath+'/login.html';
|
||||
} else if (code == 403) {
|
||||
console.log("未授权:" + message);
|
||||
layer.msg('未授权');
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
19
js/main.js
19
js/main.js
|
|
@ -6,7 +6,8 @@ function initMenu() {
|
|||
async: false,
|
||||
success: function (data) {
|
||||
if (!$.isArray(data)) {
|
||||
location.href = ctxPath + "/login.html";
|
||||
//
|
||||
location.href = contentPath+'/login.html';
|
||||
return;
|
||||
}
|
||||
var menu = $("#menu");
|
||||
|
|
@ -77,23 +78,19 @@ function showLoginInfo() {
|
|||
async: false,
|
||||
success: function (data) {
|
||||
$(".admin-header-user span").text(data.nickname);
|
||||
|
||||
$("#iframe").attr("src", "pages/home.html");
|
||||
|
||||
var pro = window.location.protocol;
|
||||
var host = window.location.host;
|
||||
var domain = pro + "//" + host;
|
||||
|
||||
var sex = data.sex;
|
||||
var url = data.headImgUrl;
|
||||
if (url == null || url == "") {
|
||||
if (sex == 1) {
|
||||
url = ctxPath + "/img/avatars/sunny.png";
|
||||
url ="img/avatars/sunny.png";
|
||||
} else {
|
||||
url = ctxPath + "/img/avatars/1.png";
|
||||
url ="img/avatars/1.png";
|
||||
}
|
||||
|
||||
url = domain + url;
|
||||
url =url;
|
||||
} else {
|
||||
url = domain + "/statics" + url;
|
||||
}
|
||||
|
|
@ -109,7 +106,7 @@ function logout() {
|
|||
url: ctxPath + "/logout",
|
||||
success: function (data) {
|
||||
localStorage.removeItem("token");
|
||||
location.href = ctxPath + "/login.html";
|
||||
location.href = contentPath+'/login.html';
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -120,9 +117,9 @@ function showCloud(type) {
|
|||
var domain = pro + "//" + host;
|
||||
var img = $(".admin-header-user-cloud img");
|
||||
if (type == 1) {
|
||||
img.attr("src", domain + ctxPath + "/img/cloudDownloadGrey.png");
|
||||
img.attr("src", "img/cloudDownloadGrey.png");
|
||||
} else {
|
||||
img.attr("src", domain + ctxPath + "/img/cloudDownload.png");
|
||||
img.attr("src", "img/cloudDownload.png");
|
||||
}
|
||||
}
|
||||
// 获取img元素
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ function checkPermission() {
|
|||
$.ajax({
|
||||
type : 'get',
|
||||
url : ctxPath + '/permissions/owns',
|
||||
contentType : "application/json; charset=utf-8",
|
||||
async : false,
|
||||
success : function(data) {
|
||||
pers = data;
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ function exportData() {
|
|||
} else if (this.status === 401) {
|
||||
localStorage.removeItem("token");
|
||||
layer.msg('用户登录过期,请重新登录', {icon: 5, time: 2000}, function () {
|
||||
location.href = ctxPath + '/login.html';
|
||||
location.href = contentPath+'/login.html';
|
||||
});
|
||||
}
|
||||
a.click();
|
||||
|
|
|
|||
|
|
@ -96,7 +96,14 @@ layui.use(['table', 'form','notice', 'layNotify','element'], function () {
|
|||
, {field: 'personName', align: 'center', title: '姓名'}
|
||||
, {field: 'sex', align: 'center', title: '性别'}
|
||||
, {field: 'nation', align: 'center', title: '民族'}
|
||||
, {field: 'id', align: 'center', title: '身份证'}
|
||||
, {field: 'id', align: 'center', title: '身份证',templet:d=>{
|
||||
if(d.id){
|
||||
if(d.id.length>18){
|
||||
return decrypt(d.id)
|
||||
}
|
||||
}
|
||||
return d.id;
|
||||
}}
|
||||
, {field: 'certificate', align: 'center', title: '持证情况'}
|
||||
, {field: 'level', align: 'center', title: '职称/技能等级'}
|
||||
, {field: 'proName', align: 'center', title: '所在项目'}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
// var ctxPath = getContextPath();
|
||||
var ctxPath = "http://192.168.0.38:18080/czl";
|
||||
let contentPath="/czl-web"
|
||||
|
||||
let host=window.location.host;
|
||||
let ctxPath;
|
||||
console.log(window.location.protocol)
|
||||
ctxPath=window.location.protocol+"//"+host+"/czl";
|
||||
//本地
|
||||
ctxPath = window.location.protocol+"//192.168.0.14:42880/czl";
|
||||
|
||||
// function getContextPath() {
|
||||
// var pathName = document.location.pathname;
|
||||
|
|
|
|||
16
login.html
16
login.html
|
|
@ -126,7 +126,7 @@
|
|||
$("#info").html('');
|
||||
});
|
||||
if (top != self) {
|
||||
parent.location.href = '/login.html';
|
||||
location.href = contentPath+'/login.html';
|
||||
}
|
||||
var token = localStorage.getItem("token");
|
||||
if (token != null && token.trim().length != 0) {
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
url: ctxPath + '/users/current?token=' + token,
|
||||
success: function (data) {
|
||||
localStorage.setItem("userId", data.id);
|
||||
location.href = ctxPath + '/index.html';
|
||||
window.location.href=contentPath+"/index.html";
|
||||
},
|
||||
error: function (xhr, textStatus, errorThrown) {
|
||||
var msg = xhr.responseText;
|
||||
|
|
@ -156,7 +156,8 @@
|
|||
//请求方式
|
||||
type: "GET",
|
||||
//请求的媒体类型
|
||||
contentType: "application/json;charset=UTF-8",
|
||||
// contentType: "application/json;charset=UTF-8",
|
||||
|
||||
//请求地址
|
||||
url: url,
|
||||
//请求成功
|
||||
|
|
@ -192,8 +193,8 @@
|
|||
type: 'post',
|
||||
url: ctxPath + '/login',
|
||||
data: {
|
||||
username: username,
|
||||
password: password,
|
||||
username: encrypt(username),
|
||||
password: encrypt(password),
|
||||
verifyCode: verifyCode,
|
||||
uuid: uuid
|
||||
},
|
||||
|
|
@ -217,11 +218,12 @@
|
|||
area: ['350px', '70px']
|
||||
}, function () {
|
||||
// location.href = ctxPath + '/index.html';
|
||||
location.href = '/index.html';
|
||||
window.location.href=contentPath+"/index.html";
|
||||
//location.href = '/index.html';
|
||||
});
|
||||
} else {
|
||||
// location.href = ctxPath + '/index.html';
|
||||
location.href = '/index.html';
|
||||
window.location.href=contentPath+"/index.html";
|
||||
}
|
||||
},
|
||||
error: function (xhr, textStatus, errorThrown) {
|
||||
|
|
|
|||
|
|
@ -77,6 +77,5 @@
|
|||
<div class="layui-inline" style="margin-top: 4px" id="addDiv">
|
||||
<button id="addBtn" class="layui-btn" lay-event="addBtn" style="margin-left: 16px;">新增</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
|
@ -113,7 +113,7 @@ function init(){
|
|||
} else if (code == 401) {
|
||||
localStorage.removeItem("token");
|
||||
layer.msg("token过期,请先登录", {shift: -1, time: 1000}, function(){
|
||||
location.href = '/login.html';
|
||||
location.href = contentPath+'/login.html';
|
||||
});
|
||||
} else if (code == 403) {
|
||||
console.log("未授权:" + message);
|
||||
|
|
|
|||
|
|
@ -54,14 +54,12 @@
|
|||
<script src="../../js/libs/jquery.treetable.js"></script>
|
||||
<script src="../../js/publicJs.js"></script>
|
||||
<script type="text/javascript">
|
||||
var pers = checkPermission();
|
||||
initMenuList();
|
||||
|
||||
var pers = checkPermission();
|
||||
initMenuList();
|
||||
function initMenuList(){
|
||||
$.ajax({
|
||||
type : 'get',
|
||||
url : ctxPath + '/permissions',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
async:false,
|
||||
success : function(data) {
|
||||
var length = data.length;
|
||||
|
|
@ -96,7 +94,7 @@ function initMenuList(){
|
|||
tr += td4;
|
||||
|
||||
var id = d['id'];
|
||||
var href = ctxPath + "/pages/menu/updateMenu.html?id=" + id;
|
||||
var href = contentPath + "/pages/menu/updateMenu.html?id=" + id;
|
||||
var edit = buttonEdit(href, "sys:menu:add", pers);
|
||||
var del = buttonDel(id, "sys:menu:del", pers);
|
||||
tr += "<td>"+edit + del+"</td>";
|
||||
|
|
@ -140,6 +138,5 @@ function del(id){
|
|||
}
|
||||
|
||||
};
|
||||
|
||||
$("#dt-table").treetable(option);
|
||||
</script>
|
||||
|
|
@ -78,6 +78,7 @@
|
|||
<script src="../../layui-v2.8.18/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="../../js/jq.js"></script>
|
||||
<script src="../../js/common_methon.js"></script>
|
||||
<script src="../../js/aes.js"></script>
|
||||
<script type="text/javascript" src="../../js/publicJs.js"></script>
|
||||
<script type="text/javascript" src="../../js/select.js"></script>
|
||||
<script type="text/javascript" src="../../js/my/permission.js"></script>
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@
|
|||
<script src="../../layui-v2.8.18/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="../../js/jq.js"></script>
|
||||
<script src="../../js/common_methon.js"></script>
|
||||
<script src="../../js/aes.js"></script>
|
||||
<script type="text/javascript" src="../../js/publicJs.js"></script>
|
||||
<script type="text/javascript" src="../../js/select.js"></script>
|
||||
<script type="text/javascript" src="../../js/my/permission.js"></script>
|
||||
|
|
@ -153,7 +154,14 @@
|
|||
field: 'number', width: 80, title: '序号', align: 'center', type: 'numbers'
|
||||
}
|
||||
, {field: 'personName', align: 'center', title: '姓名'}
|
||||
, {field: 'idCard', align: 'center', title: '身份证'}
|
||||
, {field: 'idCard', align: 'center', title: '身份证',templet:d=>{
|
||||
if(d.idCard){
|
||||
if(d.idCard.length>18){
|
||||
return decrypt(d.idCard)
|
||||
}
|
||||
}
|
||||
return d.idCard;
|
||||
}}
|
||||
, {field: 'workType', align: 'center', title: '工种'}
|
||||
, {
|
||||
field: 'jobStatus', title: '在场/在职状态', align: 'center', templet: d => {
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
<script src="../../layui-v2.8.18/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="../../js/jq.js"></script>
|
||||
<script src="../../js/common_methon.js"></script>
|
||||
<script src="../../js/aes.js"></script>
|
||||
<script type="text/javascript" src="../../js/publicJs.js"></script>
|
||||
<script type="text/javascript" src="../../js/select.js"></script>
|
||||
<script type="text/javascript" src="../../js/my/permission.js"></script>
|
||||
|
|
@ -137,7 +138,14 @@
|
|||
, {field: 'nation', align: 'center', title: '民族'}
|
||||
, {field: 'age', align: 'center', title: '年龄'}
|
||||
, {field: 'phone', align: 'center', title: '联系方式'}
|
||||
, {field: 'idCard', align: 'center', title: '身份证'}
|
||||
, {field: 'idCard', align: 'center', title: '身份证',templet:d=>{
|
||||
if(d.idCard){
|
||||
if(d.idCard.length>18){
|
||||
return decrypt(d.idCard)
|
||||
}
|
||||
}
|
||||
return d.idCard;
|
||||
}}
|
||||
, {field: 'sunUnit', align: 'center', title: '分包单位'}
|
||||
, {field: 'teamName', align: 'center', title: '所在班组'}
|
||||
, {field: 'workType', align: 'center', title: '工种'}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ function init(){
|
|||
} else if (code == 401) {
|
||||
localStorage.removeItem("token");
|
||||
layer.msg("token过期,请先登录", {shift: -1, time: 1000}, function(){
|
||||
location.href = ctxPath + '/login.html';
|
||||
location.href = contentPath+'/login.html';
|
||||
});
|
||||
} else if (code == 403) {
|
||||
console.log("未授权:" + message);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../js/jquery/jquery-1.10.2.min.js"></script>
|
||||
<script src="../../js/jquery/jquery.min.js"></script>
|
||||
<script src="../../layui-v2.8.18/layui/layui.js"></script>
|
||||
<script type="text/javascript" src="../../js/publicJs.js"></script>
|
||||
<script type="text/javascript" src="../../js/jq.js"></script>
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ function init(){
|
|||
} else if (code == 401) {
|
||||
localStorage.removeItem("token");
|
||||
layer.msg("token过期,请先登录", {shift: -1, time: 1000}, function(){
|
||||
location.href = '/login.html';
|
||||
location.href = contentPath+'/login.html';
|
||||
});
|
||||
} else if (code == 403) {
|
||||
console.log("未授权:" + message);
|
||||
|
|
|
|||
Loading…
Reference in New Issue