Merge branch 'master-500-dev' of http://192.168.1.136:82/monitor_v3/hg-monitor-w…
…eb into master-500-dev
Showing
13 changed files
with
568 additions
and
112 deletions
@@ -66,6 +66,14 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect | @@ -66,6 +66,14 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect | ||
66 | time: 1000, | 66 | time: 1000, |
67 | }, function () { | 67 | }, function () { |
68 | layer.closeAll() | 68 | layer.closeAll() |
69 | + table.reload('table-repair-view', { | ||
70 | + where: { | ||
71 | + access_token: accessToken, | ||
72 | + createtime: "today", | ||
73 | + viewMode: 'true', | ||
74 | + dateLimit: "" | ||
75 | + }, | ||
76 | + }); | ||
69 | }) | 77 | }) |
70 | } else { | 78 | } else { |
71 | layer.msg(res.msg, { | 79 | layer.msg(res.msg, { |
@@ -123,20 +131,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect | @@ -123,20 +131,6 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect | ||
123 | $('#slt-repairadd-res').html(options); | 131 | $('#slt-repairadd-res').html(options); |
124 | form.render(); | 132 | form.render(); |
125 | }) | 133 | }) |
126 | - $.ajax({ | ||
127 | - url: domainName + '/api-web/workreport/getGroupByAdmin?theirType=1&access_token=' + accessToken, | ||
128 | - success: function (res) { | ||
129 | - if (!res.map) { | ||
130 | - layer.msg("没有上传权限,请去添加权限") | ||
131 | - return; | ||
132 | - } else { | ||
133 | - var map = res.map; | ||
134 | - $("#createUser").val(map.admin); | ||
135 | - } | ||
136 | - fromAssignment() | ||
137 | - form.render(); | ||
138 | - } | ||
139 | - }) | ||
140 | 134 | ||
141 | } | 135 | } |
142 | 136 | ||
@@ -184,7 +178,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect | @@ -184,7 +178,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect | ||
184 | }, | 178 | }, |
185 | allDone: function (obj) { | 179 | allDone: function (obj) { |
186 | //全部上传成功后 | 180 | //全部上传成功后 |
187 | - saveForm() | 181 | + //saveForm() |
188 | }, | 182 | }, |
189 | error: function (index, upload) { | 183 | error: function (index, upload) { |
190 | // 上传失败 | 184 | // 上传失败 |
@@ -296,7 +290,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect | @@ -296,7 +290,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect | ||
296 | //写入标签内容 | 290 | //写入标签内容 |
297 | function writeTagsInfo(id, name) { | 291 | function writeTagsInfo(id, name) { |
298 | var tags = '<span id="tags_span_' + id + '" data-id="' + id + '"><em>' + name + '</em>' + | 292 | var tags = '<span id="tags_span_' + id + '" data-id="' + id + '"><em>' + name + '</em>' + |
299 | - '<button type="button" value="' + id + '" class="tagsclose close">×</button></span>'; | 293 | + '<button type="button" value="' + id + '" class="tags close">×</button></span>'; |
300 | if ($("#tags_span_" + id).length == 0) { | 294 | if ($("#tags_span_" + id).length == 0) { |
301 | //拼接标签 | 295 | //拼接标签 |
302 | $("#selecte_content_id").append(tags); | 296 | $("#selecte_content_id").append(tags); |
@@ -16,7 +16,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | @@ -16,7 +16,7 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | ||
16 | var resTypeChart = echarts.init(document.getElementById('chart-restype-report')); | 16 | var resTypeChart = echarts.init(document.getElementById('chart-restype-report')); |
17 | 17 | ||
18 | var dateLimit = "" | 18 | var dateLimit = "" |
19 | - var createTime = "thisMonth" | 19 | + var createTime = "today" |
20 | var currentResourceTypeTreeNodeId = "" | 20 | var currentResourceTypeTreeNodeId = "" |
21 | var resTypeSelect; | 21 | var resTypeSelect; |
22 | 22 |
@@ -169,7 +169,7 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions'], func | @@ -169,7 +169,7 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions'], func | ||
169 | grid: { | 169 | grid: { |
170 | left: '3%', | 170 | left: '3%', |
171 | right: '4%', | 171 | right: '4%', |
172 | - bottom: '3%', | 172 | + bottom: '12%',//lsq 2022-03-10 |
173 | top: '20', | 173 | top: '20', |
174 | containLabel: true | 174 | containLabel: true |
175 | }, | 175 | }, |
@@ -184,7 +184,7 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions'], func | @@ -184,7 +184,7 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions'], func | ||
184 | color: '#000000', | 184 | color: '#000000', |
185 | show: true, | 185 | show: true, |
186 | interval: 0, | 186 | interval: 0, |
187 | - rotate: 30, | 187 | + rotate: 10,//lsq 2022-03-10 x轴标签不需要角度,注释 |
188 | fontSize: '10', | 188 | fontSize: '10', |
189 | }, | 189 | }, |
190 | } | 190 | } |
@@ -197,7 +197,7 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions'], func | @@ -197,7 +197,7 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions'], func | ||
197 | series: [ | 197 | series: [ |
198 | { | 198 | { |
199 | type: 'bar', | 199 | type: 'bar', |
200 | - barWidth: '40%', | 200 | + barWidth: '20',//lsq 2022-03-10 柱子宽度更改 |
201 | data: line, | 201 | data: line, |
202 | itemStyle: { | 202 | itemStyle: { |
203 | normal: { | 203 | normal: { |
@@ -218,7 +218,18 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions'], func | @@ -218,7 +218,18 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions'], func | ||
218 | } | 218 | } |
219 | } | 219 | } |
220 | } | 220 | } |
221 | - ] | 221 | + ], |
222 | + //start x轴拖动 lsq 2022-03-10 | ||
223 | + dataZoom: [ | ||
224 | + { | ||
225 | + type: "slider", | ||
226 | + realtime: true, //拖动滚动条时是否动态的更新图表数据 | ||
227 | + height: 25, //滚动条高度 | ||
228 | + start: 5, //滚动条开始位置(共100等份) | ||
229 | + end: 55 //结束位置(共100等份) | ||
230 | + } | ||
231 | + ], | ||
232 | + //end lsq 2022-03-10 | ||
222 | }; | 233 | }; |
223 | myChart.setOption(option) | 234 | myChart.setOption(option) |
224 | } | 235 | } |
@@ -19,7 +19,7 @@ layui.define(['admin', 'form', 'table', 'element', 'sessions', 'common', 'echart | @@ -19,7 +19,7 @@ layui.define(['admin', 'form', 'table', 'element', 'sessions', 'common', 'echart | ||
19 | var currSelect = 0; | 19 | var currSelect = 0; |
20 | var list = []; | 20 | var list = []; |
21 | var dataList = []; | 21 | var dataList = []; |
22 | - var date = '2021'; | 22 | + var date = new Date().getFullYear(); |
23 | 23 | ||
24 | getChartData(); | 24 | getChartData(); |
25 | // loadAlarmOverChart1(alarmTrendChart,null,'24小时趋势表'); | 25 | // loadAlarmOverChart1(alarmTrendChart,null,'24小时趋势表'); |
@@ -41,7 +41,12 @@ layui.define(['admin', 'form', 'table', 'element', 'sessions', 'common', 'echart | @@ -41,7 +41,12 @@ layui.define(['admin', 'form', 'table', 'element', 'sessions', 'common', 'echart | ||
41 | $("#overview_time button").on("click",function () { | 41 | $("#overview_time button").on("click",function () { |
42 | $("#overview_time button").removeClass("active"); | 42 | $("#overview_time button").removeClass("active"); |
43 | $(this).addClass("active"); | 43 | $(this).addClass("active"); |
44 | - date = $(this).data("years"); | 44 | + // date = $(this).data("years"); |
45 | + if($(this).data("years")=='lastYear'){ | ||
46 | + date = new Date().getFullYear()-1; | ||
47 | + }else if($(this).data("years")=='year'){ | ||
48 | + date=new Date().getFullYear(); | ||
49 | + } | ||
45 | if (currSelect === 0) { | 50 | if (currSelect === 0) { |
46 | loadResourceTable('resType','overviewResTypeTable'); | 51 | loadResourceTable('resType','overviewResTypeTable'); |
47 | } else if (currSelect === 1) { | 52 | } else if (currSelect === 1) { |
1 | +//工作汇报表单 | ||
2 | +layui.define(['table', 'form', 'admin', 'layer', 'common','sessions','xmSelect'], function (exports) { | ||
3 | + var $ = layui.$; | ||
4 | + var form = layui.form; | ||
5 | + var layer = layui.layer; | ||
6 | + var admin = layui.admin; | ||
7 | + var table = layui.table; | ||
8 | + var common = layui.common; | ||
9 | + var session = layui.sessions; | ||
10 | + var domainName = common.domainName; | ||
11 | + var xmSelect = layui.xmSelect; | ||
12 | + | ||
13 | + //对外暴露的接口 | ||
14 | + exports('reportConfigAdd', function (data) { | ||
15 | + var accessToken = session.getToken()['access_token'] | ||
16 | + var adminSelect = {} | ||
17 | + var userSelect = {} | ||
18 | + | ||
19 | + //下拉列表框初始化 | ||
20 | + initSelect() | ||
21 | + | ||
22 | + //渲染表单 | ||
23 | + form.render(null, 'add-config-form'); | ||
24 | + | ||
25 | + //所属类型下拉框事件 | ||
26 | + form.on('select(config_theirType)', function(data){ | ||
27 | + if(data.value=='1'){ | ||
28 | + $('#config_receive_user').text('接收人'); | ||
29 | + }else{ | ||
30 | + $('#config_receive_user').text('授权用户'); | ||
31 | + } | ||
32 | + }); | ||
33 | + | ||
34 | + //保存 | ||
35 | + form.on('submit(config-form-save-id)',function () { | ||
36 | + var data = form.val('add-config-form') | ||
37 | + delete data['select'] | ||
38 | + data.admin = adminSelect.getValue('valueStr') | ||
39 | + data.adminName = adminSelect.getValue('nameStr') | ||
40 | + data.user = userSelect.getValue('valueStr') | ||
41 | + data.userName = userSelect.getValue('nameStr') | ||
42 | + data.theirType=$('#config_theirType').val(); | ||
43 | + admin.req({ | ||
44 | + url: domainName + '/api-web/bWorkreportGroup/save?access_token=' + accessToken, | ||
45 | + data: JSON.stringify(data), | ||
46 | + type: 'post', | ||
47 | + contentType: "application/json; charset=utf-8", | ||
48 | + done: function (res) { | ||
49 | + if (res.success) { | ||
50 | + layer.msg(res.msg,{ | ||
51 | + offset: '15px', | ||
52 | + icon: 1, | ||
53 | + time: 1000, | ||
54 | + },function() { | ||
55 | + layer.closeAll() | ||
56 | + table.reload('workReportConfigTable',{ | ||
57 | + adminName: '', | ||
58 | + name: '', | ||
59 | + userName: '', | ||
60 | + }) | ||
61 | + initGroupSelect() | ||
62 | + }) | ||
63 | + } else { | ||
64 | + layer.msg(res.msg,{ | ||
65 | + offset: '15px', | ||
66 | + icon: 7, | ||
67 | + time: 1000, | ||
68 | + }) | ||
69 | + } | ||
70 | + } | ||
71 | + }) | ||
72 | + return false | ||
73 | + }) | ||
74 | + | ||
75 | + //表单验证 | ||
76 | + form.verify({ | ||
77 | + groupName: function(value, item){ //value:表单的值、item:表单的DOM对象 | ||
78 | + var count = 0 | ||
79 | + if (value == '') { | ||
80 | + return "请输入名称" | ||
81 | + } | ||
82 | + admin.req({ | ||
83 | + url: domainName + `/api-web/bWorkreportGroup/checkName/${value}`, | ||
84 | + async: false, | ||
85 | + done: function (res) { | ||
86 | + count = res.count | ||
87 | + } | ||
88 | + }) | ||
89 | + if (!data.id && count != 0) { | ||
90 | + return "名称重复,请重新输入!!!" | ||
91 | + } | ||
92 | + } | ||
93 | + }); | ||
94 | + | ||
95 | + //表单赋值 | ||
96 | + function fromAssignment() { | ||
97 | + /*if (data && data.id) { | ||
98 | + admin.req({ | ||
99 | + url: domainName + `/api-web/bWorkreportGroup/getById/${data.id}`, | ||
100 | + done: function (res) { | ||
101 | + form.val('add-config-form',res.object) | ||
102 | + adminSelect.setValue(res.object.admin.split(",")) | ||
103 | + userSelect.setValue(res.object.user.split(",")) | ||
104 | + } | ||
105 | + }) | ||
106 | + }*/ | ||
107 | + var url = `${domainName}/api-web/bWorkreportGroup/findManufacturerList?access_token=${accessToken}`; | ||
108 | + $.ajax({ | ||
109 | + url:url, | ||
110 | + success:function (res) { | ||
111 | + var selects = res.data; | ||
112 | + var $sel = $("form[name='add-config-form']").find("select[name='manufacturerId']"); | ||
113 | + $sel.append('<option value="">请选择</option>') | ||
114 | + $.each(selects,function (i,e) { | ||
115 | + $sel.append('<option value="'+e.id+'">'+e.manufacturerName+'</option>') | ||
116 | + }) | ||
117 | + if (data && data.id) { | ||
118 | + admin.req({ | ||
119 | + url: domainName + `/api-web/bWorkreportGroup/getById/${data.id}`, | ||
120 | + done: function (res) { | ||
121 | + form.val('add-config-form',res.object) | ||
122 | + adminSelect.setValue(res.object.admin.split(",")) | ||
123 | + userSelect.setValue(res.object.user.split(",")) | ||
124 | + $('#config_theirType').val(res.object.theirType); | ||
125 | + //更改接收人提示 | ||
126 | + if(res.object.theirType=='1'){ | ||
127 | + $('#config_receive_user').text('接收人'); | ||
128 | + }else{ | ||
129 | + $('#config_receive_user').text('授权用户'); | ||
130 | + } | ||
131 | + } | ||
132 | + }) | ||
133 | + } | ||
134 | + form.render(); | ||
135 | + } | ||
136 | + }) | ||
137 | + } | ||
138 | + | ||
139 | + //初始化组负责人下拉列表框 | ||
140 | + function initSelect() { | ||
141 | + $.ajax({ | ||
142 | + url: domainName + '/api-user/users/getAll?access_token=' + accessToken, | ||
143 | + success: function (res) { | ||
144 | + adminSelect = xmSelect.render({ | ||
145 | + el: '.admin', | ||
146 | + radio: true, | ||
147 | + clickClose: true, | ||
148 | + filterable: true, | ||
149 | + tips: '录入关键字模糊查找', | ||
150 | + prop: { | ||
151 | + name: 'nickname', | ||
152 | + value: 'username' | ||
153 | + }, | ||
154 | + layVerify: 'required', | ||
155 | + layVerType: 'msg', | ||
156 | + data: res, | ||
157 | + }) | ||
158 | + userSelect = xmSelect.render({ | ||
159 | + el: '.user', | ||
160 | + filterable: true, | ||
161 | + tips: '录入关键字模糊查找', | ||
162 | + prop: { | ||
163 | + name: 'nickname', | ||
164 | + value: 'username' | ||
165 | + }, | ||
166 | + layVerify: 'required', | ||
167 | + layVerType: 'msg', | ||
168 | + data: res, | ||
169 | + }) | ||
170 | + fromAssignment() | ||
171 | + } | ||
172 | + }) | ||
173 | + } | ||
174 | + | ||
175 | + //初始化所属组列表 | ||
176 | + function initGroupSelect() { | ||
177 | + $.ajax({ | ||
178 | + url: domainName + '/api-web/bWorkreportGroup/list?access_token=' + accessToken, | ||
179 | + success: function (res) { | ||
180 | + $("#groupName")[0].options.length=1 | ||
181 | + $.each(res.data, function (i, v) { | ||
182 | + $('#groupName').append(new Option(v.name, v.name)) | ||
183 | + }) | ||
184 | + form.render('select') | ||
185 | + } | ||
186 | + }) | ||
187 | + } | ||
188 | + }) | ||
189 | +}) |
1 | +//工作汇报配置 | ||
2 | +layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function (exports) { | ||
3 | + var $ = layui.$; | ||
4 | + var form = layui.form; | ||
5 | + var layer = layui.layer; | ||
6 | + var admin = layui.admin; | ||
7 | + var table = layui.table; | ||
8 | + var common = layui.common; | ||
9 | + var session = layui.sessions | ||
10 | + var domainName = common.domainName; | ||
11 | + | ||
12 | + //对外暴露的接口 | ||
13 | + exports("reportConfigIndex", function () { | ||
14 | + var accessToken = session.getToken()['access_token'] | ||
15 | + | ||
16 | + initGroupSelect() | ||
17 | + | ||
18 | + //回车搜索 | ||
19 | + $('#adminName').keydown(function (e) { | ||
20 | + if (e.keyCode === 13) { | ||
21 | + reloadConfigTable() | ||
22 | + } | ||
23 | + }) | ||
24 | + | ||
25 | + //回车搜索 | ||
26 | + $('#userName').keydown(function (e) { | ||
27 | + if (e.keyCode === 13) { | ||
28 | + reloadConfigTable() | ||
29 | + } | ||
30 | + }) | ||
31 | + | ||
32 | + //所属类型 | ||
33 | + form.on('select(theirType)', function () { | ||
34 | + reloadConfigTable() | ||
35 | + }) | ||
36 | + | ||
37 | + | ||
38 | + //绑定所属组 | ||
39 | + form.on('select(groupName)', function () { | ||
40 | + reloadConfigTable() | ||
41 | + }) | ||
42 | + | ||
43 | + //渲染表单元素 | ||
44 | + form.render(null, 'workReportConfig-from') | ||
45 | + | ||
46 | + //新增 | ||
47 | + $('#workReport_config_add').on('click', function () { | ||
48 | + openWorkReportConfigForm() | ||
49 | + }) | ||
50 | + | ||
51 | + //批量删除 | ||
52 | + $('#workReport_config_delete').on('click', function () { | ||
53 | + deleteConfig() | ||
54 | + }) | ||
55 | + | ||
56 | + //渲染表格 | ||
57 | + var workReportConfigTable = table.render({ | ||
58 | + elem: '#workReportConfigTable', | ||
59 | + url: domainName + '/api-web/bWorkreportGroup/page', | ||
60 | + where: { | ||
61 | + access_token: accessToken, | ||
62 | + adminName: $('#adminName').val(), | ||
63 | + name: $('#groupName').val(), | ||
64 | + userName: $('#userName').val(), | ||
65 | + theirType: $('#theirType').val(), | ||
66 | + }, | ||
67 | + height: 'full-300', | ||
68 | + page: { | ||
69 | + layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'] | ||
70 | + , theme: '#1E9FFF'//自定义分页主题颜色 | ||
71 | + }, | ||
72 | + end: function (e) { | ||
73 | + form.render() | ||
74 | + }, | ||
75 | + limit: common.limit, | ||
76 | + limits: common.limits, | ||
77 | + even: true, | ||
78 | + cols: [[ | ||
79 | + {type: 'checkbox'}, | ||
80 | + {field: 'name', title: '配置名称', align: 'center', width: 150,}, | ||
81 | + {field: 'manufacturerName', title: '所属厂商', align: 'center', width: 150,}, | ||
82 | + {field: 'theirType', title: '所属类型', align: 'center', width: 150, | ||
83 | + templet: function (d) { | ||
84 | + if(d.theirType=='1'){ | ||
85 | + return '日志类型'; | ||
86 | + }else{ | ||
87 | + return '文档类型'; | ||
88 | + } | ||
89 | + } | ||
90 | + }, | ||
91 | + { | ||
92 | + field: 'adminName', title: '汇报人', align: 'center', minWith: 300, | ||
93 | + templet: '<div><span data-id="{{d.id}}" class="layui-table-link view-config-adminName">{{d.adminName}}</span></div>' | ||
94 | + }, | ||
95 | + /* { | ||
96 | + field: 'reportType', title: '汇报类型', align: 'center', width: 120, | ||
97 | + templet: function (d) { | ||
98 | + var typeName = '' | ||
99 | + switch (d.reportType) { | ||
100 | + case 'day': | ||
101 | + typeName = '日报' | ||
102 | + break; | ||
103 | + case 'week': | ||
104 | + typeName = '周报' | ||
105 | + break; | ||
106 | + case 'month': | ||
107 | + typeName = '月报' | ||
108 | + break; | ||
109 | + } | ||
110 | + return `<div><span>${typeName}</span></div>` | ||
111 | + } | ||
112 | + },*/ | ||
113 | + { | ||
114 | + field: 'userName', title: '接收人', align: 'center', minWith: 150, | ||
115 | + templet: '<div><span data-id="{{d.id}}" class="layui-table-link view-config-userName">{{d.userName}}</span></div>' | ||
116 | + }, | ||
117 | + { | ||
118 | + title: '操作', align: "center", width: 120, | ||
119 | + templet: '<div><span data-id="{{d.id}}" class="layui-table-link delete-config-btn">删除</span></div>' | ||
120 | + } | ||
121 | + ]], | ||
122 | + done: function () { | ||
123 | + //点击汇报人编辑表单 | ||
124 | + $('.view-config-adminName').on('click', function () { | ||
125 | + openWorkReportConfigForm($(this).data('id')) | ||
126 | + }) | ||
127 | + | ||
128 | + //点击获取接收人列表 | ||
129 | + $('.view-config-userName').on('click', function () { | ||
130 | + openWorkReportList($(this).data('id')) | ||
131 | + | ||
132 | + }) | ||
133 | + | ||
134 | + //删除事件 | ||
135 | + $('.delete-config-btn').on('click', function () { | ||
136 | + deleteConfig($(this).data("id")) | ||
137 | + }) | ||
138 | + } | ||
139 | + }) | ||
140 | + | ||
141 | + //刷新表格 | ||
142 | + function reloadConfigTable() { | ||
143 | + workReportConfigTable.reload({ | ||
144 | + where: { | ||
145 | + access_token: accessToken, | ||
146 | + adminName: $('#adminName').val(), | ||
147 | + name: $('#groupName').val(), | ||
148 | + userName: $('#userName').val(), | ||
149 | + theirType: $('#theirType').val(), | ||
150 | + }, | ||
151 | + }) | ||
152 | + } | ||
153 | + | ||
154 | + //删除数据 | ||
155 | + function deleteConfig(id) { | ||
156 | + if (typeof (id) != "string") { | ||
157 | + var ids = []; | ||
158 | + var data = table.checkStatus('workReportConfigTable').data; | ||
159 | + if (data && data.length > 0) { | ||
160 | + $.each(data, function (i, obj) { | ||
161 | + ids.push(obj.id); | ||
162 | + }); | ||
163 | + } | ||
164 | + if (ids.length == 0) { | ||
165 | + layer.msg('请选择要删除的数据', {icon: 7, time: 2000}); | ||
166 | + return; | ||
167 | + } | ||
168 | + id = ids.toString(); | ||
169 | + } | ||
170 | + //确认提示框 | ||
171 | + layer.confirm('数据删除后将无法恢复,您确定要删除吗?', { | ||
172 | + btn: ['确定', '取消'] //按钮 | ||
173 | + }, function () { | ||
174 | + admin.req({ | ||
175 | + url: common.domainName + '/api-web/bWorkreportGroup/delete' | ||
176 | + , type: "delete" | ||
177 | + , data: {ids: id} | ||
178 | + }).done(function (res) { | ||
179 | + layer.msg('删除成功', { | ||
180 | + offset: '15px' | ||
181 | + , icon: 1 | ||
182 | + , time: 1000 | ||
183 | + }, function () { | ||
184 | + reloadConfigTable(); | ||
185 | + initGroupSelect() | ||
186 | + }); | ||
187 | + }).error(function (error) { | ||
188 | + console.log(error); | ||
189 | + }); | ||
190 | + }); | ||
191 | + } | ||
192 | + | ||
193 | + //新增/编辑表单 | ||
194 | + function openWorkReportConfigForm(id) { | ||
195 | + var title = id ? '编辑' : '新增' | ||
196 | + common.openWin('workreport/configAdd', title, {id: id}, ['保存', '取消'], function f() { | ||
197 | + $("#config-form-save-id").trigger("click"); | ||
198 | + }); | ||
199 | + } | ||
200 | + | ||
201 | + //查看接收人列表 | ||
202 | + function openWorkReportList(id) { | ||
203 | + var title = '接收人' | ||
204 | + common.openWin('workreport/configList', title, {id: id}, ['确定', '取消']) | ||
205 | + } | ||
206 | + | ||
207 | + //初始化所属组列表 | ||
208 | + function initGroupSelect() { | ||
209 | + $.ajax({ | ||
210 | + url: domainName + '/api-web/bWorkreportGroup/list?access_token=' + accessToken, | ||
211 | + success: function (res) { | ||
212 | + $("#groupName")[0].options.length=1 | ||
213 | + $.each(res.data, function (i, v) { | ||
214 | + $('#groupName').append(new Option(v.name, v.name)) | ||
215 | + }) | ||
216 | + form.render('select') | ||
217 | + } | ||
218 | + }) | ||
219 | + } | ||
220 | + | ||
221 | + //获取页面选中数据 | ||
222 | + function getCheckStatusData() { | ||
223 | + return table.checkStatus('workReportConfigTable').data | ||
224 | + } | ||
225 | + | ||
226 | + return {reloadConfigTable, getCheckStatusData} | ||
227 | + }) | ||
228 | +}) |
1 | +//工作汇报配置接收人 | ||
2 | +layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions'], function (exports) { | ||
3 | + var $ = layui.$; | ||
4 | + var form = layui.form; | ||
5 | + var layer = layui.layer; | ||
6 | + var admin = layui.admin; | ||
7 | + var table = layui.table; | ||
8 | + var common = layui.common; | ||
9 | + var session = layui.sessions | ||
10 | + var domainName = common.domainName; | ||
11 | + | ||
12 | + //对外暴露的接口 | ||
13 | + exports("reportConfigList", function (d) { | ||
14 | + var accessToken = session.getToken()['access_token'] | ||
15 | + | ||
16 | + //渲染收件人表格 | ||
17 | + var reportUserTable = table.render({ | ||
18 | + elem: '#reportUserTable', | ||
19 | + url: domainName + '/api-web/bWorkreportGroup/getUserById', | ||
20 | + where: { | ||
21 | + access_token: accessToken, | ||
22 | + id: d.id | ||
23 | + }, | ||
24 | + height: 'full', | ||
25 | + page: { | ||
26 | + layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'] | ||
27 | + , theme: '#1E9FFF'//自定义分页主题颜色 | ||
28 | + }, | ||
29 | + end: function (e) { | ||
30 | + form.render() | ||
31 | + }, | ||
32 | + limit: common.limit, | ||
33 | + limits: common.limits, | ||
34 | + even: true, | ||
35 | + cols: [[ | ||
36 | + {type: 'numbers', title: '序号'}, | ||
37 | + { | ||
38 | + field: 'username', title: '用户名', align: 'center', minWith: 120, | ||
39 | + }, | ||
40 | + { | ||
41 | + field: 'nickname', title: '姓名', align: 'center', minWith: 120, | ||
42 | + }, | ||
43 | + { | ||
44 | + field: 'sex', title: '性别', align: 'center', minWith: 120, | ||
45 | + templet: function (d) { | ||
46 | + var str = '' | ||
47 | + if (d.sex == 0) { | ||
48 | + str = '女' | ||
49 | + } else { | ||
50 | + str = '男' | ||
51 | + } | ||
52 | + return `<div><span>${str}</span></div>` | ||
53 | + } | ||
54 | + }, | ||
55 | + { | ||
56 | + field: 'phone', title: '联系方式', align: 'center', minWith: 150, | ||
57 | + }, | ||
58 | + { | ||
59 | + field: 'orgName', title: '所属部门', align: 'center', width: 120, | ||
60 | + } | ||
61 | + ]], | ||
62 | + done: function () { | ||
63 | + | ||
64 | + } | ||
65 | + }) | ||
66 | + }) | ||
67 | +}) |
@@ -408,7 +408,16 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | @@ -408,7 +408,16 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | ||
408 | barGap: '-100%', | 408 | barGap: '-100%', |
409 | zlevel: 9, | 409 | zlevel: 9, |
410 | color: '#2094ff' | 410 | color: '#2094ff' |
411 | - }] | 411 | + }], |
412 | + dataZoom: [ | ||
413 | + { | ||
414 | + type:"slider", | ||
415 | + realtime:true, | ||
416 | + height: 25, | ||
417 | + start: 5, | ||
418 | + end: 55 | ||
419 | + } | ||
420 | + ] | ||
412 | }; | 421 | }; |
413 | var lastWeekChart = echarts.init(document.getElementById('chart-daily-report')); | 422 | var lastWeekChart = echarts.init(document.getElementById('chart-daily-report')); |
414 | lastWeekChart.setOption(option); | 423 | lastWeekChart.setOption(option); |
@@ -695,7 +704,17 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | @@ -695,7 +704,17 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate | ||
695 | show: false | 704 | show: false |
696 | } | 705 | } |
697 | }], | 706 | }], |
698 | - series: series | 707 | + series: series, |
708 | + dataZoom: [ | ||
709 | + { | ||
710 | + type:"slider", | ||
711 | + realtime:true, | ||
712 | + height: 25, | ||
713 | + start: 5, | ||
714 | + end: 55 | ||
715 | + } | ||
716 | + ] | ||
717 | + | ||
699 | }; | 718 | }; |
700 | companyChart.setOption(option) | 719 | companyChart.setOption(option) |
701 | }); | 720 | }); |
@@ -69,8 +69,8 @@ | @@ -69,8 +69,8 @@ | ||
69 | <li>业务系统</li> | 69 | <li>业务系统</li> |
70 | <li>业务域</li> | 70 | <li>业务域</li> |
71 | <div class="layui-btn-group time-group" id="overview_time" style="margin-left: 60%"> | 71 | <div class="layui-btn-group time-group" id="overview_time" style="margin-left: 60%"> |
72 | - <button type="button" class="layui-btn layui-btn-primary layui-btn-sm" data-years="2020">去年</button> | ||
73 | - <button type="button" class="layui-btn layui-btn-primary layui-btn-sm active" data-years="2021">今年</button> | 72 | + <button type="button" class="layui-btn layui-btn-primary layui-btn-sm" data-years="lastYear">去年</button> |
73 | + <button type="button" class="layui-btn layui-btn-primary layui-btn-sm active" data-years="year">今年</button> | ||
74 | </div> | 74 | </div> |
75 | <button class="layui-btn layui-btn-sm layui-btn-normal tab-button" id="btn_overview_export_excel"> | 75 | <button class="layui-btn layui-btn-sm layui-btn-normal tab-button" id="btn_overview_export_excel"> |
76 | <i class="layui-icon"></i>导出到Excel | 76 | <i class="layui-icon"></i>导出到Excel |
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <label class="layui-form-label">设备类型</label> | 12 | <label class="layui-form-label">设备类型</label> |
13 | <div class="layui-input-inline"> | 13 | <div class="layui-input-inline"> |
14 | <select name="resType" id="slt-repairadd-res" | 14 | <select name="resType" id="slt-repairadd-res" |
15 | - lay-filter="slt-repairadd-res"> | 15 | + lay-filter="slt-repairadd-res" lay-verify="required"> |
16 | <option value="">=设备类型=</option> | 16 | <option value="">=设备类型=</option> |
17 | </select> | 17 | </select> |
18 | </div> | 18 | </div> |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <div class="layui-inline inline-half"> | 20 | <div class="layui-inline inline-half"> |
21 | <label class="layui-form-label">设备序列号</label> | 21 | <label class="layui-form-label">设备序列号</label> |
22 | <div class="layui-input-inline"> | 22 | <div class="layui-input-inline"> |
23 | - <input type="text" class="layui-input" name="resourceSN" id="resourceSN"> | 23 | + <input type="text" class="layui-input" name="resourceSN" id="resourceSN" lay-verify="required"> |
24 | </div> | 24 | </div> |
25 | </div> | 25 | </div> |
26 | </div> | 26 | </div> |
@@ -28,13 +28,13 @@ | @@ -28,13 +28,13 @@ | ||
28 | <div class="layui-inline inline-half"> | 28 | <div class="layui-inline inline-half"> |
29 | <label class="layui-form-label">故障时间</label> | 29 | <label class="layui-form-label">故障时间</label> |
30 | <div class="layui-input-inline"> | 30 | <div class="layui-input-inline"> |
31 | - <input type="text" class="layui-input" name="hitchtime" id="hitchtime"> | 31 | + <input type="text" class="layui-input" name="hitchtime" id="hitchtime" lay-verify="required"> |
32 | </div> | 32 | </div> |
33 | </div> | 33 | </div> |
34 | <div class="layui-inline inline-half"> | 34 | <div class="layui-inline inline-half"> |
35 | <label class="layui-form-label">维修时间</label> | 35 | <label class="layui-form-label">维修时间</label> |
36 | <div class="layui-input-inline"> | 36 | <div class="layui-input-inline"> |
37 | - <input type="text" class="layui-input" name="createtime" id="createtime"> | 37 | + <input type="text" class="layui-input" name="createtime" id="createtime" lay-verify="required"> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | </div> | 40 | </div> |
@@ -42,13 +42,13 @@ | @@ -42,13 +42,13 @@ | ||
42 | <div class="layui-inline inline-half"> | 42 | <div class="layui-inline inline-half"> |
43 | <label class="layui-form-label">标题</label> | 43 | <label class="layui-form-label">标题</label> |
44 | <div class="layui-input-inline"> | 44 | <div class="layui-input-inline"> |
45 | - <input type="text" class="layui-input" name="title"> | 45 | + <input type="text" class="layui-input" name="title" > |
46 | </div> | 46 | </div> |
47 | </div> | 47 | </div> |
48 | <div class="layui-inline inline-half"> | 48 | <div class="layui-inline inline-half"> |
49 | <label class="layui-form-label">汇报人</label> | 49 | <label class="layui-form-label">汇报人</label> |
50 | <div class="layui-input-inline"> | 50 | <div class="layui-input-inline"> |
51 | - <input type="text" class="layui-input" name="createBy" id= "createUser" readonly="readonly"> | 51 | + <input type="text" class="layui-input" name="createBy" id= "createUser" readonly="readonly" > |
52 | </div> | 52 | </div> |
53 | </div> | 53 | </div> |
54 | </div> | 54 | </div> |
@@ -57,7 +57,7 @@ | @@ -57,7 +57,7 @@ | ||
57 | <label class="layui-form-label">归属单位</label> | 57 | <label class="layui-form-label">归属单位</label> |
58 | <div class="layui-input-inline"> | 58 | <div class="layui-input-inline"> |
59 | <select name="orgId" id="slt-repairadd-org" | 59 | <select name="orgId" id="slt-repairadd-org" |
60 | - lay-filter="slt-repairadd-org"> | 60 | + lay-filter="slt-repairadd-org" lay-verify="required"> |
61 | <option value="">=归属单位=</option> | 61 | <option value="">=归属单位=</option> |
62 | </select> | 62 | </select> |
63 | </div> | 63 | </div> |
@@ -66,7 +66,7 @@ | @@ -66,7 +66,7 @@ | ||
66 | <label class="layui-form-label">选择厂商</label> | 66 | <label class="layui-form-label">选择厂商</label> |
67 | <div class="layui-input-inline"> | 67 | <div class="layui-input-inline"> |
68 | <select name="manufacturerId" id="slt-repairadd-group" | 68 | <select name="manufacturerId" id="slt-repairadd-group" |
69 | - lay-filter="slt-repairadd-group" > | 69 | + lay-filter="slt-repairadd-group" lay-verify="required" > |
70 | <option value="">=选择厂商=</option> | 70 | <option value="">=选择厂商=</option> |
71 | </select> | 71 | </select> |
72 | </div> | 72 | </div> |
@@ -76,13 +76,13 @@ | @@ -76,13 +76,13 @@ | ||
76 | <div class="layui-inline inline-half"> | 76 | <div class="layui-inline inline-half"> |
77 | <label class="layui-form-label">受影响系统</label> | 77 | <label class="layui-form-label">受影响系统</label> |
78 | <div class="layui-input-inline"> | 78 | <div class="layui-input-inline"> |
79 | - <input type="text" class="layui-input" name="affected" id="affected"> | 79 | + <input type="text" class="layui-input" name="affected" id="affected" lay-verify="required"> |
80 | </div> | 80 | </div> |
81 | </div> | 81 | </div> |
82 | <div class="layui-inline inline-half"> | 82 | <div class="layui-inline inline-half"> |
83 | <label class="layui-form-label">所属ip</label> | 83 | <label class="layui-form-label">所属ip</label> |
84 | <div class="layui-input-inline"> | 84 | <div class="layui-input-inline"> |
85 | - <input type="text" class="layui-input" name="ip" id="ip"> | 85 | + <input type="text" class="layui-input" name="ip" id="ip" lay-verify="required"> |
86 | </div> | 86 | </div> |
87 | </div> | 87 | </div> |
88 | </div> | 88 | </div> |
@@ -109,25 +109,25 @@ | @@ -109,25 +109,25 @@ | ||
109 | <div class="layui-form-item"> | 109 | <div class="layui-form-item"> |
110 | <label class="layui-form-label textarea-label">故障现象描述</label> | 110 | <label class="layui-form-label textarea-label">故障现象描述</label> |
111 | <div class="layui-input-block"> | 111 | <div class="layui-input-block"> |
112 | - <textarea class="layui-textarea" name="phenomenon"></textarea> | 112 | + <textarea class="layui-textarea" name="phenomenon" lay-verify="required"></textarea> |
113 | </div> | 113 | </div> |
114 | </div> | 114 | </div> |
115 | <div class="layui-form-item"> | 115 | <div class="layui-form-item"> |
116 | <label class="layui-form-label textarea-label">解决过程描述</label> | 116 | <label class="layui-form-label textarea-label">解决过程描述</label> |
117 | <div class="layui-input-block"> | 117 | <div class="layui-input-block"> |
118 | - <textarea class="layui-textarea" name="solveprocess"></textarea> | 118 | + <textarea class="layui-textarea" name="solveprocess" lay-verify="required"></textarea> |
119 | </div> | 119 | </div> |
120 | </div> | 120 | </div> |
121 | <div class="layui-form-item"> | 121 | <div class="layui-form-item"> |
122 | <label class="layui-form-label textarea-label">处理结果</label> | 122 | <label class="layui-form-label textarea-label">处理结果</label> |
123 | <div class="layui-input-block"> | 123 | <div class="layui-input-block"> |
124 | - <textarea class="layui-textarea" name="result"></textarea> | 124 | + <textarea class="layui-textarea" name="result" lay-verify="required"></textarea> |
125 | </div> | 125 | </div> |
126 | </div> | 126 | </div> |
127 | <div class="layui-form-item"> | 127 | <div class="layui-form-item"> |
128 | <label class="layui-form-label textarea-label">经验总结</label> | 128 | <label class="layui-form-label textarea-label">经验总结</label> |
129 | <div class="layui-input-block"> | 129 | <div class="layui-input-block"> |
130 | - <textarea class="layui-textarea" name="experience"></textarea> | 130 | + <textarea class="layui-textarea" name="experience" lay-verify="required"></textarea> |
131 | </div> | 131 | </div> |
132 | </div> | 132 | </div> |
133 | <button type="submit" lay-submit lay-filter="repair-form-save-id" class="layui-btn hide" | 133 | <button type="submit" lay-submit lay-filter="repair-form-save-id" class="layui-btn hide" |
@@ -187,37 +187,3 @@ | @@ -187,37 +187,3 @@ | ||
187 | }) | 187 | }) |
188 | </script> | 188 | </script> |
189 | 189 | ||
190 | -<style> | ||
191 | - #add-repair-form .layui-form-label { | ||
192 | - width: 120px; | ||
193 | - /* padding: 8px 12px; */ | ||
194 | - text-align: left !important; | ||
195 | - } | ||
196 | - #add-repair-form .layui-input-block{ | ||
197 | - margin-left: 120px !important; | ||
198 | - } | ||
199 | - .tags{ | ||
200 | - margin-top:5px; | ||
201 | - } | ||
202 | - .tags span { | ||
203 | - height: 20px; | ||
204 | - margin-right: 10px; | ||
205 | - margin-bottom: 3px; | ||
206 | - padding: 5px 10px 5px 10px; | ||
207 | - float: left; | ||
208 | - white-space: nowrap; | ||
209 | - color:#fff; | ||
210 | - background-color:#009688; | ||
211 | - text-shadow: 1px 1px 1px rgba(0, 0, 0, .15); | ||
212 | - } | ||
213 | - .tags .close { | ||
214 | - font-weight: bold; | ||
215 | - line-height: 20px; | ||
216 | - margin-left:10px; | ||
217 | - cursor: pointer; | ||
218 | - text-align: center; | ||
219 | - color: #fff; | ||
220 | - border: 0 none; | ||
221 | - background: transparent none repeat scroll 0 0; | ||
222 | - } | ||
223 | -</style> |
@@ -128,37 +128,4 @@ | @@ -128,37 +128,4 @@ | ||
128 | }) | 128 | }) |
129 | </script> | 129 | </script> |
130 | 130 | ||
131 | -<style> | ||
132 | - #add-repair-form .layui-form-label { | ||
133 | - width: 120px; | ||
134 | - /* padding: 8px 12px; */ | ||
135 | - text-align: left !important; | ||
136 | - } | ||
137 | - #add-repair-form .layui-input-block{ | ||
138 | - margin-left: 120px !important; | ||
139 | - } | ||
140 | - .tags{ | ||
141 | - margin-top:5px; | ||
142 | - } | ||
143 | - .tags span { | ||
144 | - height: 20px; | ||
145 | - margin-right: 10px; | ||
146 | - margin-bottom: 3px; | ||
147 | - padding: 5px 10px 5px 10px; | ||
148 | - float: left; | ||
149 | - white-space: nowrap; | ||
150 | - color:#fff; | ||
151 | - background-color:#009688; | ||
152 | - text-shadow: 1px 1px 1px rgba(0, 0, 0, .15); | ||
153 | - } | ||
154 | - .tags .close { | ||
155 | - font-weight: bold; | ||
156 | - line-height: 20px; | ||
157 | - margin-left:10px; | ||
158 | - cursor: pointer; | ||
159 | - text-align: center; | ||
160 | - color: #fff; | ||
161 | - border: 0 none; | ||
162 | - background: transparent none repeat scroll 0 0; | ||
163 | - } | ||
164 | -</style> | 131 | + |
@@ -186,6 +186,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -186,6 +186,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
186 | 186 | ||
187 | //不带分页的列表 | 187 | //不带分页的列表 |
188 | function renderTableList(resType) { | 188 | function renderTableList(resType) { |
189 | + | ||
189 | //渲染表格 | 190 | //渲染表格 |
190 | var resTableList; | 191 | var resTableList; |
191 | //获取配置的列 | 192 | //获取配置的列 |
@@ -940,7 +941,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -940,7 +941,6 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
940 | if(retCols){ | 941 | if(retCols){ |
941 | cols = retCols; | 942 | cols = retCols; |
942 | } | 943 | } |
943 | - | ||
944 | parentResListTable = table.render({ | 944 | parentResListTable = table.render({ |
945 | elem: '#resListTable' | 945 | elem: '#resListTable' |
946 | , id: 'resListTable' | 946 | , id: 'resListTable' |
@@ -1067,6 +1067,14 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1067,6 +1067,14 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1067 | if (retCols) { | 1067 | if (retCols) { |
1068 | cols = retCols; | 1068 | cols = retCols; |
1069 | } | 1069 | } |
1070 | + | ||
1071 | + var url="" | ||
1072 | + | ||
1073 | + if(resType=='VIRTUALIZATION_VMWARE'){ | ||
1074 | + url=common.domainName + '/api-web/home/virtual-res-list/' + resType | ||
1075 | + }else{ | ||
1076 | + url =common.domainName + '/api-web/home/res-list/' + resType; | ||
1077 | + } | ||
1070 | resListTable = table.render({ | 1078 | resListTable = table.render({ |
1071 | elem: '#resListTable' | 1079 | elem: '#resListTable' |
1072 | , id: 'resListTable' | 1080 | , id: 'resListTable' |
@@ -1074,7 +1082,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1074,7 +1082,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1074 | , toolbar: '#resList-top-head-info-tpl' //开启头部工具栏,并为其绑定左侧模板 | 1082 | , toolbar: '#resList-top-head-info-tpl' //开启头部工具栏,并为其绑定左侧模板 |
1075 | , defaultToolbar: ['filter'] | 1083 | , defaultToolbar: ['filter'] |
1076 | , drag: {toolbar: false} | 1084 | , drag: {toolbar: false} |
1077 | - , url: common.domainName + '/api-web/home/res-list/' + resType | 1085 | + , url: url |
1078 | , where: { | 1086 | , where: { |
1079 | access_token: accessToken, | 1087 | access_token: accessToken, |
1080 | resName: $("#resindex_keyword").val() !== '' ? $("#resindex_keyword").val() : id, | 1088 | resName: $("#resindex_keyword").val() !== '' ? $("#resindex_keyword").val() : id, |
@@ -1101,6 +1109,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1101,6 +1109,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1101 | , limits: [150, 200, 300] | 1109 | , limits: [150, 200, 300] |
1102 | , cols: [cols] | 1110 | , cols: [cols] |
1103 | , done: function (res, curr, count) { | 1111 | , done: function (res, curr, count) { |
1112 | + | ||
1104 | soulTable.render(this) | 1113 | soulTable.render(this) |
1105 | 1114 | ||
1106 | //调用收藏方法 | 1115 | //调用收藏方法 |
@@ -1109,7 +1118,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1109,7 +1118,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1109 | 1118 | ||
1110 | commonCols.colsClickEvent(editFlag); | 1119 | commonCols.colsClickEvent(editFlag); |
1111 | 1120 | ||
1112 | - loadRightResTypeSelectEvent(curTreeNode.id, "normal", res.obj); | 1121 | + loadRightResTypeSelectEvent(curTreeNode.id?curTreeNode.id: curTreeNode.data.id, "normal", res.obj); |
1113 | 1122 | ||
1114 | //表格排序监听 joke add 20200408 | 1123 | //表格排序监听 joke add 20200408 |
1115 | table.on('sort(resListTable)', function (obj) { | 1124 | table.on('sort(resListTable)', function (obj) { |
@@ -1397,6 +1406,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | @@ -1397,6 +1406,7 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'admin', 'form', 'table', ' | ||
1397 | } | 1406 | } |
1398 | //加载右侧资源类型下拉框 | 1407 | //加载右侧资源类型下拉框 |
1399 | function loadRightResTypeSelectEvent(resType, type, obj) { | 1408 | function loadRightResTypeSelectEvent(resType, type, obj) { |
1409 | + | ||
1400 | layer.closeAll('tips'); | 1410 | layer.closeAll('tips'); |
1401 | var str = ''; | 1411 | var str = ''; |
1402 | var domStr = 'resListContent' | 1412 | var domStr = 'resListContent' |
-
Please register or login to post a comment