Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/hg-monitor-w…
…eb into master-500-dev-xwx
Showing
31 changed files
with
636 additions
and
166 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 | }); |
@@ -238,8 +238,9 @@ layui.extend({ | @@ -238,8 +238,9 @@ layui.extend({ | ||
238 | let path = router.path.join('/') | 238 | let path = router.path.join('/') |
239 | if(pathURL.indexOf('/user/login') != -1){ | 239 | if(pathURL.indexOf('/user/login') != -1){ |
240 | var loginIndex = 'default'; | 240 | var loginIndex = 'default'; |
241 | + debugger | ||
241 | let loginSkin = sessionStorage.getItem("loginSkin"); | 242 | let loginSkin = sessionStorage.getItem("loginSkin"); |
242 | - if(loginSkin && ["default",'skin1','skin2'].indexOf(loginSkin)){ | 243 | + if(loginSkin && ["default",'skin1','skin2'].indexOf(loginSkin) != -1){ |
243 | loginIndex = loginSkin; | 244 | loginIndex = loginSkin; |
244 | } | 245 | } |
245 | 246 | ||
@@ -267,7 +268,7 @@ layui.extend({ | @@ -267,7 +268,7 @@ layui.extend({ | ||
267 | // renderUrl = 'layout-nx'; | 268 | // renderUrl = 'layout-nx'; |
268 | // } | 269 | // } |
269 | let userLayout = sessionStorage.getItem("userLayout"); | 270 | let userLayout = sessionStorage.getItem("userLayout"); |
270 | - if(userLayout && ['layout','layout-nx'].indexOf(userLayout)){ | 271 | + if(userLayout && ['layout','layout-nx'].indexOf(userLayout) != -1){ |
271 | renderUrl = userLayout; | 272 | renderUrl = userLayout; |
272 | } | 273 | } |
273 | container.render(renderUrl).done(function(){ | 274 | container.render(renderUrl).done(function(){ |
1 | /* 首页图标 */ | 1 | /* 首页图标 */ |
2 | .monitor-home-home{ | 2 | .monitor-home-home{ |
3 | - background: url('../img/menu/首页.png')!important; | ||
4 | - width: 14px; | ||
5 | - height: 14px; | 3 | + background: url('../img/menu/home.png')!important; |
4 | + width: 15px; | ||
5 | + height: 15px; | ||
6 | margin-top: -7px !important; | 6 | margin-top: -7px !important; |
7 | } | 7 | } |
8 | .monitor-home-home:before{ | 8 | .monitor-home-home:before{ |
@@ -11,9 +11,9 @@ | @@ -11,9 +11,9 @@ | ||
11 | 11 | ||
12 | /*我的工作台*/ | 12 | /*我的工作台*/ |
13 | .monitor-home-template-1{ | 13 | .monitor-home-template-1{ |
14 | - background: url('../img/menu/我的面板.png')!important; | ||
15 | - width: 14px; | ||
16 | - height: 14px; | 14 | + background: url('../img/menu/mycard.png')!important; |
15 | + width: 12px; | ||
16 | + height: 12px; | ||
17 | margin-top: -7px !important; | 17 | margin-top: -7px !important; |
18 | } | 18 | } |
19 | .monitor-home-template-1:before{ | 19 | .monitor-home-template-1:before{ |
@@ -23,9 +23,9 @@ | @@ -23,9 +23,9 @@ | ||
23 | 23 | ||
24 | /*告警中心*/ | 24 | /*告警中心*/ |
25 | .monitor-home-notice{ | 25 | .monitor-home-notice{ |
26 | - background: url('../img/menu/告警中心.png')!important; | ||
27 | - width: 14px; | ||
28 | - height: 14px; | 26 | + background: url('../img/menu/warncenter.png')!important; |
27 | + width: 15px; | ||
28 | + height: 15px; | ||
29 | margin-top: -7px !important; | 29 | margin-top: -7px !important; |
30 | } | 30 | } |
31 | .monitor-home-notice:before{ | 31 | .monitor-home-notice:before{ |
@@ -35,9 +35,9 @@ | @@ -35,9 +35,9 @@ | ||
35 | 35 | ||
36 | /*视图中心*/ | 36 | /*视图中心*/ |
37 | .monitor-home-console{ | 37 | .monitor-home-console{ |
38 | - background: url('../img/menu/视图中心.png')!important; | ||
39 | - width: 14px; | ||
40 | - height: 14px; | 38 | + background: url('../img/menu/viewcenter.png')!important; |
39 | + width: 15px; | ||
40 | + height: 15px; | ||
41 | margin-top: -7px !important; | 41 | margin-top: -7px !important; |
42 | } | 42 | } |
43 | .monitor-home-console:before{ | 43 | .monitor-home-console:before{ |
@@ -47,9 +47,9 @@ | @@ -47,9 +47,9 @@ | ||
47 | 47 | ||
48 | /*运维管理*/ | 48 | /*运维管理*/ |
49 | .monitor-home-release{ | 49 | .monitor-home-release{ |
50 | - background: url('../img/menu/运维管理.png')!important; | ||
51 | - width: 14px; | ||
52 | - height: 14px; | 50 | + background: url('../img/menu/ops.png')!important; |
51 | + width: 15px; | ||
52 | + height: 15px; | ||
53 | margin-top: -7px !important; | 53 | margin-top: -7px !important; |
54 | } | 54 | } |
55 | .monitor-home-release:before{ | 55 | .monitor-home-release:before{ |
@@ -59,9 +59,9 @@ | @@ -59,9 +59,9 @@ | ||
59 | 59 | ||
60 | /*智能巡检*/ | 60 | /*智能巡检*/ |
61 | .monitor-home-engine{ | 61 | .monitor-home-engine{ |
62 | - background: url('../img/menu/巡检.png')!important; | ||
63 | - width: 14px; | ||
64 | - height: 14px; | 62 | + background: url('../img/menu/ins.png')!important; |
63 | + width: 15px; | ||
64 | + height: 15px; | ||
65 | margin-top: -7px !important; | 65 | margin-top: -7px !important; |
66 | } | 66 | } |
67 | .monitor-home-engine:before{ | 67 | .monitor-home-engine:before{ |
@@ -71,9 +71,9 @@ | @@ -71,9 +71,9 @@ | ||
71 | 71 | ||
72 | /*综合监控*/ | 72 | /*综合监控*/ |
73 | .monitor-home-chart{ | 73 | .monitor-home-chart{ |
74 | - background: url('../img/menu/综合监控.png')!important; | ||
75 | - width: 14px; | ||
76 | - height: 14px; | 74 | + background: url('../img/menu/monitor.png')!important; |
75 | + width: 15px; | ||
76 | + height: 15px; | ||
77 | margin-top: -7px !important; | 77 | margin-top: -7px !important; |
78 | } | 78 | } |
79 | .monitor-home-chart:before{ | 79 | .monitor-home-chart:before{ |
@@ -83,9 +83,9 @@ | @@ -83,9 +83,9 @@ | ||
83 | 83 | ||
84 | /*统计报表*/ | 84 | /*统计报表*/ |
85 | .monitor-home-tabs{ | 85 | .monitor-home-tabs{ |
86 | - background: url('../img/menu/统计报表.png')!important; | 86 | + background: url('../img/menu/report.png')!important; |
87 | width: 14px; | 87 | width: 14px; |
88 | - height: 14px; | 88 | + height: 16px; |
89 | margin-top: -7px !important; | 89 | margin-top: -7px !important; |
90 | } | 90 | } |
91 | .monitor-home-tabs:before{ | 91 | .monitor-home-tabs:before{ |
@@ -95,9 +95,9 @@ | @@ -95,9 +95,9 @@ | ||
95 | 95 | ||
96 | /*系统管理*/ | 96 | /*系统管理*/ |
97 | .monitor-home-set-fill{ | 97 | .monitor-home-set-fill{ |
98 | - background: url('../img/menu/系统管理.png')!important; | ||
99 | - width: 14px; | ||
100 | - height: 14px; | 98 | + background: url('../img/menu/sys.png')!important; |
99 | + width: 15px; | ||
100 | + height: 15px; | ||
101 | margin-top: -7px !important; | 101 | margin-top: -7px !important; |
102 | } | 102 | } |
103 | .monitor-home-set-fill:before{ | 103 | .monitor-home-set-fill:before{ |
@@ -107,9 +107,9 @@ | @@ -107,9 +107,9 @@ | ||
107 | 107 | ||
108 | /*信息协同管理*/ | 108 | /*信息协同管理*/ |
109 | .monitor-home-cols{ | 109 | .monitor-home-cols{ |
110 | - background: url('../img/menu/信息协同管理.png')!important; | ||
111 | - width: 14px; | ||
112 | - height: 14px; | 110 | + background: url('../img/menu/mananager.png')!important; |
111 | + width: 15px; | ||
112 | + height: 15px; | ||
113 | margin-top: -7px !important; | 113 | margin-top: -7px !important; |
114 | } | 114 | } |
115 | .monitor-home-cols:before{ | 115 | .monitor-home-cols:before{ |
@@ -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 | + |
@@ -694,23 +694,22 @@ export default { | @@ -694,23 +694,22 @@ export default { | ||
694 | props.fileIds.push(document.id); | 694 | props.fileIds.push(document.id); |
695 | } | 695 | } |
696 | // Start Wang 2022/3/8 10:43 在乙方运维中上传文件后不弹出授权框 | 696 | // Start Wang 2022/3/8 10:43 在乙方运维中上传文件后不弹出授权框 |
697 | - if(props.viewTypeId && props.viewTypeId != ''){ | ||
698 | - return; | 697 | + if(!props.viewTypeId && props.viewTypeId == ''){ |
698 | + // Start 上传成功后弹出授权弹框 LSQ 2022/1/12 | ||
699 | + setTimeout(function (){ | ||
700 | + if(dataList.value && dataList.value.length>0){ | ||
701 | + dataList.value.map(v=>{ | ||
702 | + if(v.id==document.id){ | ||
703 | + v.checked=true; | ||
704 | + } | ||
705 | + }) | ||
706 | + showUserDialog(true); | ||
707 | + } | ||
708 | + | ||
709 | + },1500) | ||
710 | + //End LSQ 2022/1/12 | ||
699 | } | 711 | } |
700 | // End Wang 2022/3/8 10:44 | 712 | // End Wang 2022/3/8 10:44 |
701 | - // Start 上传成功后弹出授权弹框 LSQ 2022/1/12 | ||
702 | - setTimeout(function (){ | ||
703 | - if(dataList.value && dataList.value.length>0){ | ||
704 | - dataList.value.map(v=>{ | ||
705 | - if(v.id==document.id){ | ||
706 | - v.checked=true; | ||
707 | - } | ||
708 | - }) | ||
709 | - showUserDialog(true); | ||
710 | - } | ||
711 | - | ||
712 | - },1500) | ||
713 | - //End LSQ 2022/1/12 | ||
714 | // 执行回调 | 713 | // 执行回调 |
715 | emit('callback', {document, fileInfo}); | 714 | emit('callback', {document, fileInfo}); |
716 | } | 715 | } |
@@ -721,6 +721,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -721,6 +721,8 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
721 | }); | 721 | }); |
722 | commonCols.colsClickEvent(); | 722 | commonCols.colsClickEvent(); |
723 | resTopo(); | 723 | resTopo(); |
724 | + // vmware 隐藏统计信息 | ||
725 | + $('#biz_virtual_platform_treeTable').next().find('.layui-table-tool').hide(); | ||
724 | } | 726 | } |
725 | }); | 727 | }); |
726 | /*bizTableTreeVirtual.on('tool(tableEvent)',function (obj) { | 728 | /*bizTableTreeVirtual.on('tool(tableEvent)',function (obj) { |
@@ -1033,4 +1035,4 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | @@ -1033,4 +1035,4 @@ layui.define(['tree', 'laypage', 'laytpl', 'admin', 'form', 'table', 'commonCols | ||
1033 | 1035 | ||
1034 | } | 1036 | } |
1035 | }); | 1037 | }); |
1036 | -}); | ||
1038 | +}); |
@@ -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' |
@@ -66,6 +66,7 @@ export default { | @@ -66,6 +66,7 @@ export default { | ||
66 | personId: personId, | 66 | personId: personId, |
67 | code: code ? code : props.treeNode.map.nodeType.code | 67 | code: code ? code : props.treeNode.map.nodeType.code |
68 | } | 68 | } |
69 | + | ||
69 | proxy.$http.get('/api-web/bOpsFile/search', params, function (res) { | 70 | proxy.$http.get('/api-web/bOpsFile/search', params, function (res) { |
70 | if (res && res.code == 0 && res.data && res.data.length > 0) { | 71 | if (res && res.code == 0 && res.data && res.data.length > 0) { |
71 | 72 | ||
@@ -104,6 +105,7 @@ export default { | @@ -104,6 +105,7 @@ export default { | ||
104 | fileUrl: document.localPath, | 105 | fileUrl: document.localPath, |
105 | code: props.treeNode.map.nodeType.code | 106 | code: props.treeNode.map.nodeType.code |
106 | }; | 107 | }; |
108 | + | ||
107 | proxy.$http.post('/api-web/bOpsFile/fileSynchronization', params, function (res) { | 109 | proxy.$http.post('/api-web/bOpsFile/fileSynchronization', params, function (res) { |
108 | if (res && res.code == 0) { | 110 | if (res && res.code == 0) { |
109 | // proxy.$global.showMsg(""); | 111 | // proxy.$global.showMsg(""); |
@@ -128,7 +128,8 @@ export default { | @@ -128,7 +128,8 @@ export default { | ||
128 | componentName.value = "DOCUMENT"; | 128 | componentName.value = "DOCUMENT"; |
129 | docType.value = "THREE_PERSONAGE_NDA"; | 129 | docType.value = "THREE_PERSONAGE_NDA"; |
130 | docTypeName.value = "入场资料"; | 130 | docTypeName.value = "入场资料"; |
131 | - showDialog(true); | 131 | + props.parentNode.id = row.id; |
132 | + // showDialog(true); | ||
132 | }, | 133 | }, |
133 | render: function (row) { | 134 | render: function (row) { |
134 | if (row.personalSecrecyBook == "YES") { | 135 | if (row.personalSecrecyBook == "YES") { |
@@ -148,7 +149,9 @@ export default { | @@ -148,7 +149,9 @@ export default { | ||
148 | componentName.value = "DOCUMENT"; | 149 | componentName.value = "DOCUMENT"; |
149 | docType.value = "THREE_MONTHLY_SUMMARY"; | 150 | docType.value = "THREE_MONTHLY_SUMMARY"; |
150 | docTypeName.value = "月度总结"; | 151 | docTypeName.value = "月度总结"; |
151 | - showDialog(true); | 152 | + props.parentNode.id = row.id; |
153 | + | ||
154 | + // showDialog(true); | ||
152 | }, | 155 | }, |
153 | render: function (row) { | 156 | render: function (row) { |
154 | if (row.monthlySummary == "YES") { | 157 | if (row.monthlySummary == "YES") { |
@@ -167,7 +167,7 @@ | @@ -167,7 +167,7 @@ | ||
167 | <el-form-item label="配置信息" prop="name"> | 167 | <el-form-item label="配置信息" prop="name"> |
168 | <el-input :size="$global.elementSize" v-model="treeNodeForm.options" clearable ></el-input> | 168 | <el-input :size="$global.elementSize" v-model="treeNodeForm.options" clearable ></el-input> |
169 | </el-form-item> | 169 | </el-form-item> |
170 | - <el-form-item label="CMDB资源类型" prop="name" style="text-align: left"> | 170 | + <el-form-item label="CMDB资源类型" prop="name" style="text-align: left" v-if="cmdbSystemIsOpen"> |
171 | <el-select style="width: 100%" :size="$global.elementSize" v-model="treeNodeForm.cmdbResTypeId" placeholder="请选择CMDB资源类型!" clearable filterable > | 171 | <el-select style="width: 100%" :size="$global.elementSize" v-model="treeNodeForm.cmdbResTypeId" placeholder="请选择CMDB资源类型!" clearable filterable > |
172 | <el-option | 172 | <el-option |
173 | v-for="item in cmdbResTypeList" | 173 | v-for="item in cmdbResTypeList" |
@@ -155,6 +155,8 @@ const treeNodeConfig = (currentNode) => { | @@ -155,6 +155,8 @@ const treeNodeConfig = (currentNode) => { | ||
155 | cmdbResTypeId:'' | 155 | cmdbResTypeId:'' |
156 | }); | 156 | }); |
157 | 157 | ||
158 | + let cmdbSystemIsOpen = Vue.ref(false); | ||
159 | + | ||
158 | let treeNodeFormRules = Vue.ref({}); | 160 | let treeNodeFormRules = Vue.ref({}); |
159 | let cmdbResTypeList = Vue.ref([]); | 161 | let cmdbResTypeList = Vue.ref([]); |
160 | 162 | ||
@@ -179,12 +181,14 @@ const treeNodeConfig = (currentNode) => { | @@ -179,12 +181,14 @@ const treeNodeConfig = (currentNode) => { | ||
179 | 181 | ||
180 | 182 | ||
181 | let getCmdbResTypeList = () =>{ | 183 | let getCmdbResTypeList = () =>{ |
182 | - if(cmdbResTypeList.value.length > 0){ | 184 | + if(cmdbResTypeList.value != null && cmdbResTypeList.value.length > 0){ |
183 | return; | 185 | return; |
184 | } | 186 | } |
185 | proxy.$http.get(`/api-web/v32/res/config/getCmdbResTypeList`, {}, function (res) { | 187 | proxy.$http.get(`/api-web/v32/res/config/getCmdbResTypeList`, {}, function (res) { |
186 | - if (res && res.success) { | 188 | + if (res && res.success && res.data) { |
187 | cmdbResTypeList.value = res.data; | 189 | cmdbResTypeList.value = res.data; |
190 | + | ||
191 | + cmdbSystemIsOpen.value = true; | ||
188 | } | 192 | } |
189 | }); | 193 | }); |
190 | } | 194 | } |
@@ -208,7 +212,8 @@ const treeNodeConfig = (currentNode) => { | @@ -208,7 +212,8 @@ const treeNodeConfig = (currentNode) => { | ||
208 | treeNodeForm, | 212 | treeNodeForm, |
209 | treeNodeFormRules, | 213 | treeNodeFormRules, |
210 | cmdbResTypeList, | 214 | cmdbResTypeList, |
211 | - getCmdbResTypeList | 215 | + getCmdbResTypeList, |
216 | + cmdbSystemIsOpen | ||
212 | } | 217 | } |
213 | } | 218 | } |
214 | 219 | ||
@@ -334,7 +339,8 @@ export default { | @@ -334,7 +339,8 @@ export default { | ||
334 | treeNodeForm, | 339 | treeNodeForm, |
335 | treeNodeFormRules, | 340 | treeNodeFormRules, |
336 | cmdbResTypeList, | 341 | cmdbResTypeList, |
337 | - getCmdbResTypeList | 342 | + getCmdbResTypeList, |
343 | + cmdbSystemIsOpen | ||
338 | } = treeNodeConfig(currentNode); | 344 | } = treeNodeConfig(currentNode); |
339 | 345 | ||
340 | const { | 346 | const { |
@@ -578,6 +584,7 @@ export default { | @@ -578,6 +584,7 @@ export default { | ||
578 | treeNodeFormRules, | 584 | treeNodeFormRules, |
579 | cmdbResTypeList, | 585 | cmdbResTypeList, |
580 | getCmdbResTypeList, | 586 | getCmdbResTypeList, |
587 | + cmdbSystemIsOpen, | ||
581 | 588 | ||
582 | // 机房配置 | 589 | // 机房配置 |
583 | machineRoomInfo, | 590 | machineRoomInfo, |
-
Please register or login to post a comment