diff --git a/hxy-web/html/wireManager/project/projectList.html b/hxy-web/html/wireManager/project/projectList.html
index 94da885..2aa9d1e 100644
--- a/hxy-web/html/wireManager/project/projectList.html
+++ b/hxy-web/html/wireManager/project/projectList.html
@@ -3,14 +3,15 @@
-
导出
diff --git a/hxy-web/html/wireManager/project/updTower.html b/hxy-web/html/wireManager/project/updTower.html
new file mode 100644
index 0000000..c147c2c
--- /dev/null
+++ b/hxy-web/html/wireManager/project/updTower.html
@@ -0,0 +1,77 @@
+
+
+
+
+
护线员考勤
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hxy-web/image/selectIcon.png b/hxy-web/image/selectIcon.png
new file mode 100644
index 0000000..c7752d7
Binary files /dev/null and b/hxy-web/image/selectIcon.png differ
diff --git a/hxy-web/js/public/jq.js b/hxy-web/js/public/jq.js
new file mode 100644
index 0000000..2afcd54
--- /dev/null
+++ b/hxy-web/js/public/jq.js
@@ -0,0 +1,25 @@
+let Authorization = localStorage.getItem("smz-token");
+
+$.ajaxSetup({
+ cache : false,
+ headers : {
+ "Authorization" : Authorization
+ },
+ error : function(xhr, textStatus, errorThrown) {
+ var msg = xhr.responseText;
+ var response = JSON.parse(msg);
+ var code = response.code;
+ var message = response.message;
+ if (code == 400) {
+ layer.msg(message);
+ } else if (code == 401) {
+ localStorage.removeItem("smz-token");
+ location.href = '/login.html';
+ } else if (code == 403) {
+ console.log("未授权:" + message);
+ layer.msg('未授权');
+ } else if (code == 500) {
+ layer.msg('系统错误:' + message);
+ }
+ }
+});
\ No newline at end of file
diff --git a/hxy-web/js/public/public.js b/hxy-web/js/public/public.js
index 00c5e63..48bb43e 100644
--- a/hxy-web/js/public/public.js
+++ b/hxy-web/js/public/public.js
@@ -1,11 +1,17 @@
//系统请求路径
-let PATH_URL="http://127.0.0.1:18080/zhgd"
+let PATH_URL="http://127.0.0.1:1917/line"
+// let PATH_URL=getContextPath();
//登录页面路径
let LOGIN_PATH="http://127.0.0.1:8849/ah-bns-web/html/test/test.html";
//加解密开关
let jm_switch=false;
-let token=localStorage.getItem("token")
+let token=localStorage.getItem("smz-token")
console.log(token)
-
+function getContextPath() {
+ var pathName = document.location.pathname;
+ var index = pathName.substr(1).indexOf("/");
+ var result = pathName.substr(0, index + 1);
+ return result;
+}
diff --git a/hxy-web/js/public/public_utils.js b/hxy-web/js/public/public_utils.js
index ee099bf..1c29759 100644
--- a/hxy-web/js/public/public_utils.js
+++ b/hxy-web/js/public/public_utils.js
@@ -5,7 +5,7 @@ function success(data,textStatus, jqXhr){
}else if(data.code==401){
window.location.href = LOGIN_PATH;
}
- layer.msg("数据调用成功")
+ //layer.msg("数据调用成功")
}
/**
* 异常调用
diff --git a/hxy-web/js/wireManager/attendance/attendance.js b/hxy-web/js/wireManager/attendance/attendance.js
index a927abc..d812bd5 100644
--- a/hxy-web/js/wireManager/attendance/attendance.js
+++ b/hxy-web/js/wireManager/attendance/attendance.js
@@ -6,11 +6,11 @@ var nextMonthFirstDay = new Date(currentDate.getFullYear(), currentDate.getMonth
// 获取当前月份的天数 //本月多少天
var daysInMonth = Math.floor((nextMonthFirstDay.getTime() - firstDay.getTime()) / (24 * 60 * 60 * 1000));
// console.log(daysInMonth);
-var year = currentDate.getFullYear();
-var month = currentDate.getMonth() + 1;//当前第几月
var pers = []
var table,form,laydate,element;
var tabIndex = 0;
+var tableType = 'layui_table1';
+var times = getCurrentDateTimeArr();
layui.use(['form','layer','table','laydate','element'], function () {
table = layui.table;
form = layui.form;
@@ -19,10 +19,11 @@ layui.use(['form','layer','table','laydate','element'], function () {
// 渲染时间选择器
laydate.render({
- elem: '#month',
+ elem: '#makeMonth',
type: 'month',
format: 'yyyy-MM',
fullPanel: true,
+ value: times[0] + "-" + times[1]
});
//监听Tab切换,以改变地址hash值
@@ -34,44 +35,26 @@ layui.use(['form','layer','table','laydate','element'], function () {
// $('#search2').val('');
// $('#search3').val('');
// $('#month').val('');
-
if(tabIndex==0){
+ tableType = 'layui_table1';
initTable1();
}else if(tabIndex==1){
+ tableType = 'layui_table2';
initTable2();
}else if(tabIndex==2){
+ tableType = 'layui_table3';
initTable3();
}else{
+ tableType = 'layui_table1';
initTable1();
}
});
- // 触发submit提交 按钮点击或者表单被执行提交时触发
- form.on('submit(query)', function (data) {
- console.log($('#month').val())
- let arr = $('#month').val().split('-')
- month = Number(arr[1]);
- year = Number(arr[0]);
- daysInMonth = new Date(arr[0], arr[1], 0).getDate();
-
- console.log("搜索")
- if(tabIndex==0){
- initTable1();
- }else if(tabIndex==1){
- initTable2();
- }else if(tabIndex==2){
- initTable3();
- }else{
- initTable1();
- }
- return false; // 阻止表单跳转。如果需要表单跳转,去掉这段即可。
- });
-
- table.on('tool(table)', function (obj) {
+ table.on(`tool(${tableType})`, function (obj) {
switch (obj.event) {
case 'detail':
console.log('详情',obj)
- checkView()
+ checkView(obj)
break;
}
@@ -81,93 +64,89 @@ layui.use(['form','layer','table','laydate','element'], function () {
});
-// 静态数据
-var tableData = [
- {id: 1,isWork:['2.1','2.3','7.4','7.15'],name: '李云飞', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.21','7.31','7.14'],name: '肖洁', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
- {id: 1,isWork:['7.22','7.23','7.24'],name: '李小龙', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.12','7.13','7.14'],name: '李小龙', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '张爱国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
- {id: 1,isWork:['7.4','7.5','7.7'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
- {id: 1,isWork:['7.4','7.9','7.7'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
- {id: 1,isWork:['7.4','7.5','7.8'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'/'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '孙建国', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '李小龙', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '李小龙', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '李小龙', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '李云飞', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '肖洁', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '李云飞', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '肖洁', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '肖洁', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '李云飞', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
- {id: 1,isWork:['7.2','7.3','7.4'],name: '肖洁', idCard: '342224196202241356', phone: '15665366624',month:'2024-03',normal:'20',special:'3',line:'500kV大宝Ⅰ回线',station:'昆明运检一站',first:'#1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12',second:'#1,#2,#3,#4,#5'},
-];
-/**
- * 重置操作
- */
-function reset(){
- console.log("重置")
- console.log(tabIndex)
- $('#search1').val('');
- $('#search2').val('');
- $('#search3').val('');
- $('#month').val('');
- if(tabIndex==0){
- initTable1();
- }else if(tabIndex==1){
- initTable2();
- }else if(tabIndex==2){
- initTable3();
- }else{
- initTable1();
- }
+
+//查询
+function queryClick(){
+ let userName = $('#userName').val();
+ let proName = $('#proName').val();
+ let yjName = $('#yjName').val();
+ let startMakeMonth = $('#makeMonth').val();
+ let endMakeMonth = $('#makeMonth').val();
+ table.reload(tableType, {
+ where: {
+ userName: userName,
+ proName: proName,
+ yjName: yjName,
+ startMakeMonth: startMakeMonth,
+ endMakeMonth: endMakeMonth
+ }
+ })
}
+//重置
+function resetClick(){
+ $('#userName').val("");
+ $('#proName').val("");
+ $('#yjName').val("");
+ $('#makeMonth').val("");
+ table.reload(tableType, {
+ where: {
+ userName: "",
+ proName: "",
+ yjName: "",
+ startMakeMonth: '',
+ endMakeMonth: "",
+ }
+ })
+}
+
+
+
/**
* 初始化数据 全部
*/
function initTable1(){
console.log('全部')
- let obj = {
- "tabIndex": tabIndex,
- "search1": $("#search1").val(),
- "search2": $("#search2").val(),
- "search3": $("#search3").val(),
- "month": $("#month").val(),
- }
- // 渲染表格
table.render({
- elem: '#table',
- // url: "/sys/achievement",
- // where: obj,
- page: true,
- skin: 'line', // 表格样式
- cols: [[
- {
- title: '序号',
- field: 'zizeng',
- align: 'center',
- type: 'numbers'
- },
- {field:'name', title: '姓 名',align: 'center',},
- {field:'idCard', title: '身份证号',align: 'center',},
- {field:'phone', title: '联系电话',align: 'center',},
- {field:'month', title: '月份',align: 'center',},
- {field:'normal', title: '正常巡视(基*次)',align: 'center',},
- {field:'special', title: '正常特巡(天*人)',align: 'center',width:170},
- {field:'line', title: '管辖线路名称',align: 'center',width:170},
- {field:'station', title: '所属运检站',align: 'center', },
- {
- title: '操作',
- toolbar: '#opeator-bar',
- align: 'center',
- width: 200
- }
- ]],
- data: tableData
+ id: 'layui_table1',
+ elem: '#table',
+ url: PATH_URL + '/attendance/getAllInspectionList',
+ where: {
+ startMakeMonth: $('#makeMonth').val(),
+ endMakeMonth: $('#makeMonth').val()
+ },
+ page: true, //开启分页
+ method:'post',
+ skin: 'line', // 表格样式
+ cols: [[
+ // {
+ // type: 'checkbox'
+ // },
+ {
+ title: '序号',
+ field: 'zizeng',
+ align: 'center',
+ type: 'numbers'
+ },
+ {field:'userName', title: '姓名',align: 'center',},
+ {field:'idNumber', title: '身份证号',align: 'center',},
+ {field:'tel', title: '联系电话',align: 'center',},
+ {field:'makeMonth', title: '月份',align: 'center',},
+
+ {field:'allMake', title: '正常巡视(基*次)',align: 'center',},
+ {field:'special', title: '特巡(天*人)',align: 'center',width:170},
+ {field:'proName', title: '管辖线路名称',align: 'center',width:170},
+ {field:'yjName', title: '所属运检站',align: 'center', },
+ {
+ title: '操作',
+ toolbar: '#opeator-bar',
+ align: 'center',
+ width: 200
+ }
+ ]],
+ done: function(res,curr,count){
+ //checkPermission();
+ }
});
}
@@ -177,43 +156,60 @@ function initTable1(){
*/
function initTable2(){
console.log('正常巡视统计')
- let obj = {
- "tabIndex": tabIndex,
- "search1": $("#search1").val(),
- "search2": $("#search2").val(),
- "search3": $("#search3").val(),
- "month": $("#month").val(),
- }
// 渲染表格
table.render({
- elem: '#table',
- // url: "/sys/achievement",
- // where: obj,
- page: true,
- skin: 'line', // 表格样式
- cols: [[
- {
- title: '序号',
- field: 'zizeng',
- align: 'center',
- type: 'numbers'
- },
- {field:'name', title: '姓名',align: 'center',},
- {field:'line', title: '管辖线路名称',align: 'center',},
- {field:'station', title: '所属运检站',align: 'center',},
- {field:'month', title: '月份',align: 'center',},
- {field:'first', title: '巡1次区段(塔)',align: 'center',},
- {field:'normal', title: '巡1次张数',align: 'center',width:170},
- {field:'second', title: '巡2次区段(塔)',align: 'center',width:170},
- {field:'special', title: '巡2次张数',align: 'center', },
- {
- title: '操作',
- toolbar: '#opeator-bar',
- align: 'center',
- width: 200
- }
- ]],
- data: tableData
+ id: 'layui_table2',
+ elem: '#table',
+ url: PATH_URL + '/lineProject/getLineProjectList',
+ where: {
+ },
+ page: true, //开启分页
+ method:'post',
+ skin: 'line', // 表格样式
+ cols: [[
+ // {
+ // type: 'checkbox'
+ // },
+ {
+ title: '序号',
+ field: 'zizeng',
+ align: 'center',
+ type: 'numbers'
+ },
+ {field:'fgsName', title: '分公司',align: 'center',},
+ {field:'yjName', title: '运检站',align: 'center',},
+ {field:'proName', title: '线路工程名称',align: 'center',},
+ {field:'volLevel', title: '电压等级',align: 'center',},
+ {
+ title: '单/双回路',
+ field: '',
+ align: 'center',
+ templet: function(d){
+ let isTwo = d.isTwo;
+ let html;
+ if(isTwo == '0' || isTwo == 0){
+ html = '
单回路'
+ }else{
+ html = '
双回路'
+ }
+ // 返回模板内容
+ return html;
+ }
+ },
+ {field:'powerNum', title: '杆塔数量',align: 'center',},
+ {field:'lineNum', title: '群众护线员数量',align: 'center',width:170},
+ {field:'inLinePowerNum', title: '已绑定护线员杆塔数量',align: 'center',width:170},
+ {field:'unLinePowerNum', title: '未绑定护线员杆塔数量',align: 'center', },
+ {
+ title: '操作',
+ toolbar: '#opeator-bar',
+ align: 'center',
+ width: 200
+ }
+ ]],
+ done: function(res,curr,count){
+ //checkPermission();
+ }
});
}
@@ -222,56 +218,59 @@ function initTable2(){
*/
function initTable3(){
console.log('特巡统计')
- let obj = {
- "tabIndex": tabIndex,
- "search1": $("#search1").val(),
- "search2": $("#search2").val(),
- "search3": $("#search3").val(),
- "month": $("#month").val(),
- }
- let cols = [
- {
- title: '序号',
- field: 'zizeng',
- align: 'center',
- type: 'numbers'
- },
- {field:'name', title: '姓 名',align: 'center',width:100},
- {field:'line', title: '管辖线路名称',align: 'center',width:200},
- {field:'station', title: '所属运检站',align: 'center',width:200},
- {field:'special', title: '总计(天)',align: 'center',width:100,templet: function(d){
- return `
${d.isWork.length}`
- }},
-
- ]
- console.log(daysInMonth,'daysInMonth')
- for (let k = 1; k <= daysInMonth; k++) {
- let str = month+'.'+k;
- let obj = {field:'isWork', title: str,align: 'center',width:70,
- templet: function(d){
- if(d.isWork.includes(d.LAY_COL.title)){
- return `
`
- }else{
- return `
`
- }
- }}
- cols.push(obj)
- }
- cols.push({
- title: '操作',
- toolbar: '#opeator-bar',
- align: 'center',
- width: 200
- })
- // 渲染表格
table.render({
- elem: '#table',
- // url: "/sys/achievement",
- // where: obj,
- page: true,
- skin: 'line', // 表格样式
- cols: [cols],
- data: tableData
+ id: 'layui_table3',
+ elem: '#table',
+ url: PATH_URL + '/lineProject/getLineProjectList',
+ where: {
+ },
+ page: true, //开启分页
+ method:'post',
+ skin: 'line', // 表格样式
+ cols: [[
+ // {
+ // type: 'checkbox'
+ // },
+ {
+ title: '序号',
+ field: 'zizeng',
+ align: 'center',
+ type: 'numbers'
+ },
+ {field:'fgsName', title: '分公司',align: 'center',},
+ {field:'yjName', title: '运检站',align: 'center',},
+ {field:'proName', title: '线路工程名称',align: 'center',},
+ {field:'volLevel', title: '电压等级',align: 'center',},
+ {
+ title: '单/双回路',
+ field: '',
+ align: 'center',
+ templet: function(d){
+ let isTwo = d.isTwo;
+ let html;
+ if(isTwo == '0' || isTwo == 0){
+ html = '
单回路'
+ }else{
+ html = '
双回路'
+ }
+ // 返回模板内容
+ return html;
+ }
+ },
+ {field:'powerNum', title: '杆塔数量',align: 'center',},
+ {field:'lineNum', title: '群众护线员数量',align: 'center',width:170},
+ {field:'inLinePowerNum', title: '已绑定护线员杆塔数量',align: 'center',width:170},
+ {field:'unLinePowerNum', title: '未绑定护线员杆塔数量',align: 'center', },
+ {
+ title: '操作',
+ toolbar: '#opeator-bar',
+ align: 'center',
+ width: 200
+ }
+ ]],
+ done: function(res,curr,count){
+ //checkPermission();
+ }
});
}
@@ -279,18 +278,19 @@ function initTable3(){
/**
* 详情
* */
-function checkView(id) {
+function checkView(obj) {
let height = '98%';
let width = '95%';
- // $.ajax({
- // type: 'post',
- // contentType: "application/x-www-form-urlencoded",
- // url: oiPlanUrl + '/monthlyPlanSubmission/getDataById',
- // dataType: 'json',
- // data: {
- // id: id
- // },
- // success: function (data) {
+ $.ajax({
+ type: 'POST',
+ url: PATH_URL + '/attendance/getInspectionParticular',
+ contentType: "application/json; charset=utf-8",
+ data: JSON.stringify({
+ makeMonth: $("#makeMonth").val(),
+ proId: obj.data.proId
+ }),
+ success: function (data) {
+ console.log("dataaaaaa:", data)
var index = layer.open({
title: ['详情'],
type: 2,
@@ -300,13 +300,14 @@ function checkView(id) {
success: function (layero, index) {
// console.log(data);
var myIframe = window[layero.find('iframe')[0]['name']];
- myIframe.init(year,month);
- // var fnc = myIframe.setData(data.data); //aaa()为子页面的方法
+ var times = obj.data.makeMonth.split("-")
+ myIframe.init(times[0],times[1]);
+ myIframe.setData(data); //aaa()为子页面的方法
},
});
- // }
- // })
+ }
+ })
}
diff --git a/hxy-web/js/wireManager/attendance/attendanceDetail.js b/hxy-web/js/wireManager/attendance/attendanceDetail.js
index ec47138..2456891 100644
--- a/hxy-web/js/wireManager/attendance/attendanceDetail.js
+++ b/hxy-web/js/wireManager/attendance/attendanceDetail.js
@@ -31,14 +31,27 @@ layui.use(['form','layer','table','laydate','element'], function () {
}
//监听Tab切换,以改变地址hash值
- element.on('tab(projectTab)', function(data){
- console.log(data)
- console.log(tabList[data.index])
- // tabIndex = data.index;
- getView()
- });
+ // element.on('tab(projectTab)', function(data){
+ // console.log(data)
+ // console.log(tabList[data.index])
+ // // tabIndex = data.index;
+ // getView()
+ // });
});
+
+function setData(data){
+ $("#username").text(data.data.userName);
+ $("#tel").text(data.data.tel);
+
+ $("#allMake").text(data.data.allMake);
+ $("#oneMake").text(data.data.oneMake);
+ $("#twoMake").text(data.data.twoMake);
+ $("#special").text(data.data.special);
+ $("#makeMonth").val(data.data.makeMonth);
+
+ getView(data)
+}
/**
* 初始化数据
@@ -71,85 +84,136 @@ function init(chosenYear,chosenMonth){
cols: [cols],
data: tableData
});
- getTab(chosenMonth)
+ // getTab(chosenMonth)
})
}
-function getTab(chosenMonth){
- console.log(chosenMonth)
- tabList = [{id:'1',projectName:'xxx工程'},{id:'2',projectName:'xxx工程'},{id:'3',projectName:'xxx工程'},{id:'4',projectName:'xxx工程'}]
- // projectList
- $("#projectList").html('')
- let html = ``
- for (let k = 0; k < tabList.length; k++) {
- if(k==0){
- html+= '
'+ tabList[0].projectName +'';
- }else{
- html+= '
'+ tabList[k].projectName +'';
- }
- }
- $("#projectList").append(html);
- getView()
-}
+// function getTab(chosenMonth){
+// console.log(chosenMonth)
+// tabList = [{id:'1',projectName:'xxx工程'},{id:'2',projectName:'xxx工程'},{id:'3',projectName:'xxx工程'},{id:'4',projectName:'xxx工程'}]
+// // projectList
+// $("#projectList").html('')
+// let html = ``
+// for (let k = 0; k < tabList.length; k++) {
+// if(k==0){
+// html+= '
'+ tabList[0].projectName +'';
+// }else{
+// html+= '
'+ tabList[k].projectName +'';
+// }
+// }
+// $("#projectList").append(html);
+// getView()
+// }
-function getView(){
- viewList1 = [{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'},{name:'#1'}]
+function getView(data){
+ var oneMakeList = data.data.oneMakeList;
$("#firstViewBox").html('');
let html1 = ``;
- for (let i = 0;i < viewList1.length;i++) {
+ for (let i = 0;i < oneMakeList.length;i++) {
+ var color;
+ var proNameHtml;
+ var height;
+ var imgHeight;
+ if(oneMakeList[i].makeType == "0"){
+ //巡视计划内
+ color = "#52C1F5";
+ proNameHtml = ""
+ height = "220px"
+ imgHeight = "210px";
+ }else{
+ //巡视计划外
+ color = "#FF9900";
+ proNameHtml = `
+
+ `;
+ height = "196px";
+ imgHeight = "186px";
+ }
html1+= `
-