Merge branch 'master' of http://192.168.1.136:82/monitor_v3/hg-monitor-web into …
…master-v32-lushangqing
Showing
45 changed files
with
2623 additions
and
176 deletions
@@ -114,39 +114,111 @@ INSERT INTO `user-center`.`sys_role_menu` (`roleId`, `menuId`) VALUES (1, 100001 | @@ -114,39 +114,111 @@ INSERT INTO `user-center`.`sys_role_menu` (`roleId`, `menuId`) VALUES (1, 100001 | ||
114 | ALTER TABLE `cloud_backend_monitor`.`b_ops_project` | 114 | ALTER TABLE `cloud_backend_monitor`.`b_ops_project` |
115 | MODIFY COLUMN `state` int NULL DEFAULT 0 COMMENT '0:正常,1:延期,3:预留' AFTER `remark`; | 115 | MODIFY COLUMN `state` int NULL DEFAULT 0 COMMENT '0:正常,1:延期,3:预留' AFTER `remark`; |
116 | 116 | ||
117 | --- 9、同步流程业务添加触发器 | ||
118 | --- 新增触发器 | ||
119 | -DELIMITER $$ | ||
120 | -CREATE TRIGGER syn_business_add AFTER INSERT ON b_bustype | ||
121 | -FOR EACH ROW | ||
122 | -begin | 117 | +-- 9、触发器及其他 |
118 | + -- 1、流程表添加是否是虚拟字段 | ||
119 | + ALTER TABLE `itsm_demo`.`system_handler` | ||
120 | + MODIFY COLUMN `isvirtual` varchar(1) NULL DEFAULT NULL COMMENT '是否虚拟 0:虚拟;1:正常' AFTER `enable`; | ||
121 | + -- 2、文件类型的备注由个人保密协议变成入场资料 | ||
122 | + ALTER TABLE `cloud_backend_monitor`.`b_ops_file` | ||
123 | + MODIFY COLUMN `type` int NULL DEFAULT NULL COMMENT '上传文件类型:10:入场资料,11:个人月度总结,21:月报,22:考勤记录,23:健康检查报告,31:文档资料,32:项目保密协议' AFTER `id`; | ||
124 | + -- 乙方运维项目表添加是否是虚拟字段 | ||
125 | + ALTER TABLE `cloud_backend_monitor`.`b_ops_project` | ||
126 | + ADD COLUMN `isvirtual` varchar(1) NULL COMMENT '是否虚拟 0:虚拟;1:正常' AFTER `enable`; | ||
127 | + -- 3、同步流程业务添加触发器 | ||
128 | + -- 新增触发器 | ||
129 | + DELIMITER $$ | ||
130 | + CREATE TRIGGER syn_business_add AFTER INSERT ON b_bustype | ||
131 | + FOR EACH ROW | ||
132 | + begin | ||
123 | IF NEW.isLeaf = 1 THEN | 133 | IF NEW.isLeaf = 1 THEN |
124 | - INSERT INTO `itsm_demo`.`system_handler` (`system_id`, `system_name`, `sort`, `system_type`, `enable`) VALUES (NEW.busId, NEW.busTypeName, NEW.sort, "0","0"); | 134 | + INSERT INTO `itsm_demo`.`system_handler` (`system_id`, `system_name`, `sort`, `system_type`, `enable`,`isvirtual`) VALUES (NEW.busId, NEW.busTypeName, NEW.sort, "0",NEW.isUse,"1"); |
125 | END IF; | 135 | END IF; |
126 | -end$$ | ||
127 | -DELIMITER ; | ||
128 | --- 修改触发器 | ||
129 | -DELIMITER $$ | ||
130 | -CREATE TRIGGER syn_business_change AFTER UPDATE ON b_bustype | ||
131 | -FOR EACH ROW | ||
132 | -begin | 136 | + end$$ |
137 | + DELIMITER ; | ||
138 | + | ||
139 | + | ||
140 | + -- 修改触发器 | ||
141 | + DELIMITER $$ | ||
142 | + CREATE TRIGGER syn_business_change AFTER UPDATE ON b_bustype | ||
143 | + FOR EACH ROW | ||
144 | + begin | ||
133 | IF NEW.isLeaf = 1 and OLD.isLeaf =1 THEN | 145 | IF NEW.isLeaf = 1 and OLD.isLeaf =1 THEN |
134 | - UPDATE `itsm_demo`.`system_handler` SET `system_name` = NEW.busTypeName, `sort` = NEW.sort WHERE `system_id` = OLD.busId; | 146 | + UPDATE `itsm_demo`.`system_handler` SET `system_name` = NEW.busTypeName, `enable`= NEW.isUse, `sort` = NEW.sort WHERE `system_id` = OLD.busId; |
135 | ELSE | 147 | ELSE |
136 | DELETE FROM `itsm_demo`.`system_handler` where `system_id` = OLD.busId; | 148 | DELETE FROM `itsm_demo`.`system_handler` where `system_id` = OLD.busId; |
137 | END IF; | 149 | END IF; |
138 | -end$$ | ||
139 | -DELIMITER ; | ||
140 | --- 删除触发器 | ||
141 | -DELIMITER $$ | ||
142 | -CREATE TRIGGER syn_business_delete AFTER DELETE ON b_bustype | ||
143 | -FOR EACH ROW | ||
144 | -begin | 150 | + end$$ |
151 | + DELIMITER ; | ||
152 | + | ||
153 | + -- 删除触发器 | ||
154 | + DELIMITER $$ | ||
155 | + CREATE TRIGGER syn_business_delete AFTER DELETE ON b_bustype | ||
156 | + FOR EACH ROW | ||
157 | + begin | ||
145 | IF OLD.isLeaf = 1 THEN | 158 | IF OLD.isLeaf = 1 THEN |
146 | DELETE FROM `itsm_demo`.`system_handler` where `system_id` = OLD.busId; | 159 | DELETE FROM `itsm_demo`.`system_handler` where `system_id` = OLD.busId; |
147 | END IF; | 160 | END IF; |
148 | -end$$ | ||
149 | -DELIMITER ; | 161 | + end$$ |
162 | + DELIMITER ; | ||
163 | + | ||
164 | + -- 4、同步流程用户添加触发器 暂无删除触发器 如果有垃圾数据需要从库中sql进行删除 | ||
165 | + -- 新增触发器 | ||
166 | + DELIMITER $$ | ||
167 | + CREATE TRIGGER syn_person_add AFTER INSERT ON b_ops_project_person | ||
168 | + FOR EACH ROW | ||
169 | + begin | ||
170 | + -- 根据插入的项目id获取业务id | ||
171 | + select `busId` into @system_id_ from b_ops_project WHERE id = NEW.projectId; | ||
172 | + -- 根据用户Id获取用户昵称、在职状态 | ||
173 | + select `nickname`,`state` INTO @user_name_,@enable_ from b_ops_person WHERE id = NEW.personId; | ||
174 | + -- 插入用户信息 | ||
175 | + INSERT INTO `itsm_demo`.`system_handler_evaluate_user` (`system_id`, `user_id`, `user_name`, `enable`) VALUES (@system_id_, NEW.personId, @user_name_, @enable_); | ||
176 | + end$$ | ||
177 | + DELIMITER ; | ||
178 | + | ||
179 | + -- 修改触发器 | ||
180 | + -- 如果修改用户表,修改流程用户 | ||
181 | + DELIMITER $$ | ||
182 | + CREATE TRIGGER syn_ops_person_change AFTER UPDATE ON b_ops_person | ||
183 | + FOR EACH ROW | ||
184 | + begin | ||
185 | + -- 根据用户信息获取业务id | ||
186 | + select DISTINCT(a.`busId`) into @system_id_ from b_ops_project a left JOIN b_ops_project_person b on a.id=b.projectId where b.personId=OLD.id; | ||
187 | + -- 根据用户id修改流程用户信息 | ||
188 | + UPDATE `itsm_demo`.`system_handler_evaluate_user` SET `user_name` = NEW.nickname , `enable` = NEW.state WHERE `system_id` = @system_id_ and `user_id` = OLD.id; | ||
189 | + end$$ | ||
190 | + DELIMITER ; | ||
191 | + | ||
192 | + -- 5、流程项目同步是否虚拟和是否乙方运维项目 | ||
193 | + -- 新增触发器 修改流程业务的是否乙方运维和是否虚拟 | ||
194 | + DELIMITER $$ | ||
195 | + CREATE TRIGGER syn_project_add AFTER INSERT ON b_ops_project | ||
196 | + FOR EACH ROW | ||
197 | + begin | ||
198 | + -- 添加项目时修改是否乙方运维、是否虚拟 | ||
199 | + UPDATE `itsm_demo`.`system_handler` SET `system_type`=1 ,`isvirtual`=NEW.isvirtual WHERE `system_id` = NEW.busId; | ||
200 | + end$$ | ||
201 | + DELIMITER ; | ||
202 | + | ||
203 | + | ||
204 | + -- 修改触发器 修改流程业务的是否是虚拟 | ||
205 | + DELIMITER $$ | ||
206 | + CREATE TRIGGER syn_project_change AFTER UPDATE ON b_ops_project | ||
207 | + FOR EACH ROW | ||
208 | + begin | ||
209 | + -- 相当于项目被隐藏 | ||
210 | + IF NEW.`enable` = 1 THEN | ||
211 | + UPDATE `itsm_demo`.`system_handler` SET `system_type`=0 ,`isvirtual`=1 WHERE `system_id` = OLD.busId; | ||
212 | + ELSE | ||
213 | + -- 修改项目时修改是否是虚拟 | ||
214 | + UPDATE `itsm_demo`.`system_handler` SET `isvirtual`=NEW.isvirtual WHERE `system_id` = OLD.busId; | ||
215 | + END IF; | ||
216 | + end$$ | ||
217 | + DELIMITER ; | ||
218 | + | ||
219 | + -- 6、乙方运维项目表添加业务唯一键 | ||
220 | + ALTER TABLE `cloud_backend_monitor`.`b_ops_project` | ||
221 | + ADD UNIQUE INDEX `busId_unique`(`busId`); | ||
150 | 222 | ||
151 | -- 10、手动把系统中的业务同步到流程的itsm_demo库中的system_handler表。且同步过来的业务只能是叶子业务,并且不能为虚拟业务 | 223 | -- 10、手动把系统中的业务同步到流程的itsm_demo库中的system_handler表。且同步过来的业务只能是叶子业务,并且不能为虚拟业务 |
152 | --(system_handler中system_id是业务id busId,system_type为乙方运维时,能在monitor库b_ops_project查到 关键字段 busId) | 224 | --(system_handler中system_id是业务id busId,system_type为乙方运维时,能在monitor库b_ops_project查到 关键字段 busId) |
@@ -160,11 +232,5 @@ INSERT INTO `inspection-report`.`b_insepectionreport_type` (`id`, `pid`, `name`, | @@ -160,11 +232,5 @@ INSERT INTO `inspection-report`.`b_insepectionreport_type` (`id`, `pid`, `name`, | ||
160 | INSERT INTO `inspection-report`.`b_insepectionreport_type` (`id`, `pid`, `name`, `docNo`, `type`, `createUser`, `createTime`, `sort`, `status`) VALUES ('FOUR_HEALTH', '0', '健康检查报告', '10005', 'FOUR_HEALTH', 'admin', '2021-10-12 19:55:13', '10005', 0); | 232 | INSERT INTO `inspection-report`.`b_insepectionreport_type` (`id`, `pid`, `name`, `docNo`, `type`, `createUser`, `createTime`, `sort`, `status`) VALUES ('FOUR_HEALTH', '0', '健康检查报告', '10005', 'FOUR_HEALTH', 'admin', '2021-10-12 19:55:13', '10005', 0); |
161 | INSERT INTO `inspection-report`.`b_insepectionreport_type` (`id`, `pid`, `name`, `docNo`, `type`, `createUser`, `createTime`, `sort`, `status`) VALUES ('FOUR_MONTHLY', '0', '月报', '10003', 'FOUR_MONTHLY', 'admin', '2021-10-12 19:55:13', '10003', 0); | 233 | INSERT INTO `inspection-report`.`b_insepectionreport_type` (`id`, `pid`, `name`, `docNo`, `type`, `createUser`, `createTime`, `sort`, `status`) VALUES ('FOUR_MONTHLY', '0', '月报', '10003', 'FOUR_MONTHLY', 'admin', '2021-10-12 19:55:13', '10003', 0); |
162 | 234 | ||
163 | --- 王涛 inspection-report | ||
164 | -alter table b_inspection_document MODIFY column fileSize varchar(50) DEFAULT NULL COMMENT '文件大小'; | ||
165 | - | ||
166 | -ALTER TABLE `inspection-report`.`b_inspection_document` | ||
167 | -ADD COLUMN `status` int(1) DEFAULT '0' COMMENT '删除状态 0 正常,1删除,默认0'; | ||
168 | - | ||
169 | -ALTER TABLE `inspection-report`.`b_insepectionreport_type` | ||
170 | -ADD COLUMN `status` int(1) DEFAULT '0' COMMENT '删除状态 0 正常,1删除,默认0'; | ||
235 | +-- 12、修改属性分组字段长度 | ||
236 | +ALTER TABLE `cloud_backend_monitor`.`b_ops_person_property` MODIFY COLUMN `groupings` VARCHAR(100) NULL COMMENT '分组'; |
doc/功能优化记录/【徐毫杰】乙方运维.md
0 → 100644
@@ -61,6 +61,7 @@ loading:{ | @@ -61,6 +61,7 @@ loading:{ | ||
61 | type: Boolean, | 61 | type: Boolean, |
62 | default: false | 62 | default: false |
63 | }, | 63 | }, |
64 | + | ||
64 | -------------------------------------------------------------------- | 65 | -------------------------------------------------------------------- |
65 | columns参数说明: | 66 | columns参数说明: |
66 | // 单元绑定数据key | 67 | // 单元绑定数据key |
@@ -77,3 +78,6 @@ render:function (row){ | @@ -77,3 +78,6 @@ render:function (row){ | ||
77 | // 表格个性化展示,返回html | 78 | // 表格个性化展示,返回html |
78 | return html; | 79 | return html; |
79 | } | 80 | } |
81 | +------------------------slot-------------------------------------------- | ||
82 | +#default 内容插槽 | ||
83 | +#tools 工具栏插槽 |
1 | +//工作汇报表单 | ||
2 | +layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'xmSelect', 'laydate', 'upload'], 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 laydate = layui.laydate; | ||
11 | + var upload = layui.upload; | ||
12 | + var domainName = common.domainName; | ||
13 | + var xmSelect = layui.xmSelect; | ||
14 | + | ||
15 | + //对外暴露的接口 | ||
16 | + exports('assetsRepairAdd', function (data) { | ||
17 | + var accessToken = session.getToken()['access_token'] | ||
18 | + var userSelect = ""; | ||
19 | + var currentDate = {} | ||
20 | + var hitDate = {} | ||
21 | + var uploadInst = {} | ||
22 | + var defaultUser = [] | ||
23 | + var attachmentIds = [] | ||
24 | + var id = data.id | ||
25 | + var cols = [] | ||
26 | + var where = {} | ||
27 | + var currentResourceType = '' | ||
28 | + var resTypeSele | ||
29 | + | ||
30 | + | ||
31 | + var viewType = data && data.viewType ? data.viewType : ''; | ||
32 | + | ||
33 | + //渲染表单 | ||
34 | + form.render(null, 'add-repair-form') | ||
35 | + init() | ||
36 | + | ||
37 | + //保存 | ||
38 | + form.on('submit(repair-form-save-id)', function (res) { | ||
39 | + var value = $('#attachmentInput').val() | ||
40 | + if (value != '') { | ||
41 | + $('#upload_btn').click() | ||
42 | + } else { | ||
43 | + saveForm() | ||
44 | + } | ||
45 | + }) | ||
46 | + | ||
47 | + //保存 | ||
48 | + function saveForm() { | ||
49 | + layer.load(2) | ||
50 | + var data = form.val('add-repair-form') | ||
51 | + var params = {} | ||
52 | + params.attachmentIds = attachmentIds.toString() | ||
53 | + delete data['file'] | ||
54 | + delete data['select'] | ||
55 | + params.workReport = JSON.stringify(data) | ||
56 | + admin.req({ | ||
57 | + url: domainName + '/api-web/bResource/assetsrepair/save?access_token=' + accessToken, | ||
58 | + data: JSON.stringify(params), | ||
59 | + type: 'post', | ||
60 | + contentType: "application/json; charset=utf-8", | ||
61 | + done: function (res) { | ||
62 | + if (res.success) { | ||
63 | + layer.msg(res.msg, { | ||
64 | + offset: '15px', | ||
65 | + icon: 1, | ||
66 | + time: 1000, | ||
67 | + }, function () { | ||
68 | + layer.closeAll() | ||
69 | + }) | ||
70 | + } else { | ||
71 | + layer.msg(res.msg, { | ||
72 | + offset: '15px', | ||
73 | + icon: 7, | ||
74 | + time: 1000, | ||
75 | + }) | ||
76 | + } | ||
77 | + } | ||
78 | + }) | ||
79 | + return false | ||
80 | + } | ||
81 | + | ||
82 | + //页面初始化 | ||
83 | + function init() { | ||
84 | + loadSelect() | ||
85 | + initDatePlus() | ||
86 | + initUploadPlus() | ||
87 | + | ||
88 | + | ||
89 | + if (viewType == 'view') { | ||
90 | + initViewMode(); | ||
91 | + } | ||
92 | + } | ||
93 | + | ||
94 | + // 初始化下拉框 | ||
95 | + function loadSelect() { | ||
96 | + admin.req({ | ||
97 | + url: domainName + '/api-web/bResource/findAssetsRepairList' | ||
98 | + }).done(function (response) { | ||
99 | + var options = "<option value=''>=归属单位=</option>"; | ||
100 | + $.each(response.data, function (i, v) { | ||
101 | + options += "<option value='" + v.orgCode + "'>" + v.orgName + "</option>" | ||
102 | + }); | ||
103 | + $('#slt-repairadd-org').html(options); | ||
104 | + form.render(); | ||
105 | + }); | ||
106 | + admin.req({ | ||
107 | + url: domainName + '/api-web/bWorkreportGroup/findManufacturerList' | ||
108 | + }).done(function (response) { | ||
109 | + var options = "<option value=''>=选择厂商=</option>"; | ||
110 | + $.each(response.data, function (i, v) { | ||
111 | + options += "<option value='" + v.id + "'>" + v.manufacturerName + "</option>" | ||
112 | + }); | ||
113 | + $('#slt-repairadd-group').html(options); | ||
114 | + form.render(); | ||
115 | + }); | ||
116 | + admin.req({ | ||
117 | + url: domainName + '/api-web/bResource/getInfoByAssetsType', | ||
118 | + }).done(function (response) { | ||
119 | + var options = "<option value=''>=设备类型=</option>"; | ||
120 | + $.each(response.data, function (i, v) { | ||
121 | + options += "<option value='" + v.resTypeCode + "'>" + v.resTypeName + "</option>" | ||
122 | + }); | ||
123 | + $('#slt-repairadd-res').html(options); | ||
124 | + form.render(); | ||
125 | + }) | ||
126 | + $.ajax({ | ||
127 | + url: domainName + '/api-web/bResource/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 | + | ||
141 | + } | ||
142 | + | ||
143 | + | ||
144 | + //初始化日期插件 | ||
145 | + function initDatePlus() { | ||
146 | + currentDate = laydate.render({ | ||
147 | + elem: '#createtime', //指定元素 | ||
148 | + value: new Date(), | ||
149 | + type: 'datetime', | ||
150 | + isInitValue: true, | ||
151 | + max: 0, | ||
152 | + }); | ||
153 | + hitDate = laydate.render({ | ||
154 | + elem: '#hitchtime', //指定元素 | ||
155 | + value: new Date(), | ||
156 | + type: 'datetime', | ||
157 | + isInitValue: true, | ||
158 | + max: 0, | ||
159 | + }); | ||
160 | + } | ||
161 | + | ||
162 | + //初始化上传插件 | ||
163 | + function initUploadPlus() { | ||
164 | + var param = {"access_token": accessToken} | ||
165 | + var fileName = [] | ||
166 | + uploadInst = upload.render({ | ||
167 | + elem: '#attachment', //绑定元素 | ||
168 | + url: common.domainName + '/api-web/bResource/assetsrepair/upload', | ||
169 | + data: param, | ||
170 | + multiple: true, | ||
171 | + auto: false, //选择文件后不自动上传 | ||
172 | + bindAction: '#upload_btn',//指定按钮触发上传 | ||
173 | + accept: 'file', | ||
174 | + exts: 'xls|doc|pdf|docx|xlsx|jpg|png', | ||
175 | + choose: function (obj) { | ||
176 | + //选择文件后回调 | ||
177 | + var files = this.files = obj.pushFile(); | ||
178 | + obj.preview(function (index, file, result) { | ||
179 | + fileName.push(file.name) | ||
180 | + $('#attachmentInput').val(fileName.toString()) | ||
181 | + }) | ||
182 | + }, | ||
183 | + done: function (res) { | ||
184 | + //单次上传成功 | ||
185 | + attachmentIds.push(res.str) | ||
186 | + }, | ||
187 | + allDone: function (obj) { | ||
188 | + //全部上传成功后 | ||
189 | + saveForm() | ||
190 | + }, | ||
191 | + error: function (index, upload) { | ||
192 | + // 上传失败 | ||
193 | + layer.msg('文件上传时发生故障,请稍后再试!', { | ||
194 | + icon: 7, time: 3000 | ||
195 | + }); | ||
196 | + } | ||
197 | + }); | ||
198 | + } | ||
199 | + | ||
200 | + | ||
201 | + // 初始化查看模式 | ||
202 | + function initViewMode() { | ||
203 | + $('form[lay-filter="add-workReport-form"]').find('input, textarea').attr('readonly', true); | ||
204 | + $('form[lay-filter="add-workReport-form"]').find('select').attr('disabled', true); | ||
205 | + $.each(xmSelect.get(), function (i, v) { | ||
206 | + v.update({disabled: true}); | ||
207 | + }); | ||
208 | + $('#attachmentInput').parent().parent().parent().addClass('hide'); | ||
209 | + $('#table-report-add-attachment').removeClass('hide'); | ||
210 | + $('#form-item-repTitle').removeClass('hide'); | ||
211 | + //渲染附件表格 | ||
212 | + var attachmentTable = table.render({ | ||
213 | + elem: '#table-repair-add-attachment', | ||
214 | + url: domainName + '/api-web/bResource/assetsrepair/getAttaById', | ||
215 | + where: { | ||
216 | + access_token: accessToken, | ||
217 | + id: data.id | ||
218 | + }, | ||
219 | + height: 'full', | ||
220 | + page: { | ||
221 | + layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'] | ||
222 | + , theme: '#1E9FFF'//自定义分页主题颜色 | ||
223 | + }, | ||
224 | + end: function (e) { | ||
225 | + form.render() | ||
226 | + }, | ||
227 | + limit: common.limit, | ||
228 | + limits: common.limits, | ||
229 | + even: true, | ||
230 | + cols: [[ | ||
231 | + {type: 'numbers', title: '序号'}, | ||
232 | + { | ||
233 | + field: 'name', title: '文件名称', align: 'center', minWith: 200, | ||
234 | + }, | ||
235 | + { | ||
236 | + field: 'suffix', title: '文件后缀', align: 'center', minWith: 150, | ||
237 | + }, | ||
238 | + { | ||
239 | + field: 'size', title: '文件大小', align: 'center', minWith: 150, | ||
240 | + templet: function (d) { | ||
241 | + var str = (d.size / 1000).toFixed(2) | ||
242 | + return `<div><span>${str}KB</span></div>` | ||
243 | + } | ||
244 | + }, | ||
245 | + { | ||
246 | + title: '操作', align: "center", width: 120, | ||
247 | + templet: '<div><span data-id="{{d.id}}" data-suffix="{{d.suffix}}" class="layui-table-link preview-attachment-btn">预览</span></div>' | ||
248 | + } | ||
249 | + ]], | ||
250 | + done: function () { | ||
251 | + $('.preview-attachment-btn').on('click', function () { | ||
252 | + var id = $(this).data('id') | ||
253 | + var suffix = $(this).data('suffix') | ||
254 | + if (suffix == 'jpg' || suffix == 'png' || suffix == 'JPG' || suffix == 'PNG') { //图片类型 | ||
255 | + var srcUrl = domainName + `/api-web/openoffice/readImage/${id}?access_token=` + accessToken | ||
256 | + layer.open({ | ||
257 | + type: 1, | ||
258 | + content: `<div><img src="${srcUrl}" width="100%" height="100%" /></div>`, | ||
259 | + title: '图片预览', | ||
260 | + area: ['60%', '90%'] | ||
261 | + }) | ||
262 | + } else { | ||
263 | + //附件为文档类型 | ||
264 | + common.openReport(id) | ||
265 | + } | ||
266 | + }) | ||
267 | + } | ||
268 | + }) | ||
269 | + form.render(); | ||
270 | + } | ||
271 | + | ||
272 | + //表单赋值 | ||
273 | + function fromAssignment() { | ||
274 | + if (data && data.id) { | ||
275 | + $('#add-repair-form-atta').show() | ||
276 | + //编辑表单时禁用日志类型修改和时间选择 | ||
277 | + $('#add-repair-form').find("select[name='hitchtime']").attr("disabled", "disabled") | ||
278 | + $('#add-repair-form').find("input[name='createtime']").attr("disabled", "disabled") | ||
279 | + //编辑表单时取消显示默认值 | ||
280 | + currentDate.config.isInitValue = false | ||
281 | + hitDate.config.isInitValue = false | ||
282 | + initDatePlus() | ||
283 | + admin.req({ | ||
284 | + url: domainName + `/api-web/bResource/assetsrepair/getById`, | ||
285 | + data: {id: data.id}, | ||
286 | + async: false, | ||
287 | + }).done(function (res) { | ||
288 | + form.val('add-repair-form', res.object) | ||
289 | + if (res.object.attachmentList) { | ||
290 | + $.each(res.object.attachmentList, function (i, v) { | ||
291 | + writeTagsInfo(v.id, v.originalName) | ||
292 | + }) | ||
293 | + } | ||
294 | + }) | ||
295 | + } | ||
296 | + } | ||
297 | + | ||
298 | + //写入标签内容 | ||
299 | + function writeTagsInfo(id, name) { | ||
300 | + var tags = '<span id="tags_span_' + id + '" data-id="' + id + '"><em>' + name + '</em>' + | ||
301 | + '<button type="button" value="' + id + '" class="tagsclose close">×</button></span>'; | ||
302 | + if ($("#tags_span_" + id).length == 0) { | ||
303 | + //拼接标签 | ||
304 | + $("#selecte_content_id").append(tags); | ||
305 | + //绑定标签的删除事件 | ||
306 | + bindTagesDelEvent(); | ||
307 | + } | ||
308 | + } | ||
309 | + | ||
310 | + //删除标签事件 | ||
311 | + function bindTagesDelEvent() { | ||
312 | + //删除已选主体的页签 | ||
313 | + $("button.tagsclose").on("click", function () { | ||
314 | + var attachId = $(this).attr("value"); | ||
315 | + //确认提示框 | ||
316 | + layer.confirm('附件删除后将无法恢复,您确定要删除吗?', { | ||
317 | + btn: ['确定', '取消'] //按钮 | ||
318 | + }, function () { | ||
319 | + $.ajax({ | ||
320 | + url: domainName + `/api-web/workreport/deleteAttachment/${id}/${attachId}?access_token=` + accessToken, | ||
321 | + type: "get", | ||
322 | + }).done(function (res) { | ||
323 | + layer.msg('删除成功', { | ||
324 | + offset: '15px' | ||
325 | + , icon: 1 | ||
326 | + , time: 1000 | ||
327 | + }, function () { | ||
328 | + $("#tags_span_" + attachId).remove(); | ||
329 | + }); | ||
330 | + }).error(function (error) { | ||
331 | + console.log(error); | ||
332 | + }); | ||
333 | + }); | ||
334 | + }); | ||
335 | + } | ||
336 | + }) | ||
337 | +}) |
1 | +/** 资产维修记录查看 */ | ||
2 | +layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts','laydate','element'], function (exports) { | ||
3 | + var $ = layui.$; | ||
4 | + var form = layui.form; | ||
5 | + var table = layui.table; | ||
6 | + var admin = layui.admin; | ||
7 | + var common = layui.common; | ||
8 | + var laydate = layui.laydate; | ||
9 | + var element = layui.element; | ||
10 | + | ||
11 | + exports('assetsrepair', function () { | ||
12 | + var sessions = layui.sessions; | ||
13 | + var accessToken = sessions.getToken().access_token; | ||
14 | + var domainName = common.domainName; | ||
15 | + var companyChart = echarts.init(document.getElementById('chart-company-report')); | ||
16 | + var resTypeChart = echarts.init(document.getElementById('chart-restype-report')); | ||
17 | + | ||
18 | + var dateLimit = "" | ||
19 | + var createTime = "" | ||
20 | + var currentResourceTypeTreeNodeId = "" | ||
21 | + var resTypeSelect; | ||
22 | + | ||
23 | + | ||
24 | + //日期范围选择 | ||
25 | + laydate.render({ | ||
26 | + elem: '#dateLimit' | ||
27 | + ,range: '~', | ||
28 | + done: function (value) { | ||
29 | + dateLimit = value | ||
30 | + if (dateLimit == '') { | ||
31 | + $('[data-period="thisWeek"]').click() | ||
32 | + } else { | ||
33 | + $.each($("button.date"),function (i,e) { | ||
34 | + var $dom = $(e); | ||
35 | + if($dom.hasClass("active")){ | ||
36 | + $dom.removeClass("active") | ||
37 | + } | ||
38 | + }) | ||
39 | + reloadAllChange() | ||
40 | + } | ||
41 | + } | ||
42 | + }); | ||
43 | + | ||
44 | + form.render(); | ||
45 | + loadCompanyReport(); | ||
46 | + loadResTypeReport(); | ||
47 | + loadWorkReportTable(); | ||
48 | + loadConditionSelect(); | ||
49 | + | ||
50 | + | ||
51 | + //监听Esc事件 | ||
52 | + $(document).keyup(function(event){ | ||
53 | + if(event.keyCode === 27 || event.keyCode === 96){ | ||
54 | + layer.closeAll(); | ||
55 | + } | ||
56 | + }); | ||
57 | + | ||
58 | + | ||
59 | + // 日期方式选择 | ||
60 | + $('#btns-repair-time button').click(function () { | ||
61 | + $.each($("button.date"),function (i,e) { | ||
62 | + var $dom = $(e); | ||
63 | + if($dom.hasClass("active")){ | ||
64 | + $dom.removeClass("active") | ||
65 | + } | ||
66 | + }) | ||
67 | + $("#dateLimit").val('') | ||
68 | + dateLimit = '' | ||
69 | + $("#btns-repair-time button").removeClass("active"); | ||
70 | + $(this).addClass("active"); | ||
71 | + createTime = ($(this).data("period")) | ||
72 | + reloadAllChange(); | ||
73 | + }); | ||
74 | + | ||
75 | + // 回车搜索 | ||
76 | + $('[lay-filter="form-repair-condition"] input').keydown(function (e) { | ||
77 | + if (e.keyCode === 13) { | ||
78 | + reloadAllChange(); | ||
79 | + } | ||
80 | + }); | ||
81 | + | ||
82 | + // 下拉框改变搜索 | ||
83 | + form.on('select(slt-repair-group)', reloadAllChange); | ||
84 | + form.on('select(slt-repair-user)', reloadAllChange); | ||
85 | + form.on('select(slt-repair-org)', reloadAllChange); | ||
86 | + | ||
87 | + | ||
88 | + // 加载工作汇报表格 | ||
89 | + function loadWorkReportTable() { | ||
90 | + var conditions = form.val('form-repair-condition'); | ||
91 | + | ||
92 | + Object.assign(conditions, {access_token: accessToken, createtime: createTime, viewMode: 'true',dateLimit:dateLimit}); | ||
93 | + table.render({ | ||
94 | + elem: '#table-repair-view', | ||
95 | + url: domainName + '/api-web/bResource/getAssetsRepairForPage', | ||
96 | + where: conditions, | ||
97 | + height: 'full-360', | ||
98 | + page: { | ||
99 | + layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'], | ||
100 | + theme: '#1E9FFF' | ||
101 | + }, | ||
102 | + end: function (e) { | ||
103 | + form.render() | ||
104 | + }, | ||
105 | + limit: common.limit, | ||
106 | + limits: common.limits, | ||
107 | + even: true, | ||
108 | + cols: [[{ | ||
109 | + type: 'checkbox' | ||
110 | + }, { | ||
111 | + type: 'numbers', title: '序号' | ||
112 | + }, { | ||
113 | + field: 'title', title: '标题', align: 'center', minWidth: 200,event: 'serRead', | ||
114 | + templet: '<div><span data-id="{{d.id}}" class="layui-table-link view-repair-title" >{{d.title}}</span></div>' | ||
115 | + }, { | ||
116 | + field: 'resTypeName', title: '资产类型', align: 'center', | ||
117 | + }, { | ||
118 | + field: 'resourceSN', title: '设备序列号', align: 'center', | ||
119 | + },{ | ||
120 | + field: 'ip', title: 'ip段', align: 'center', | ||
121 | + },{ | ||
122 | + field: 'orgName', title: '归属单位', align: 'center', | ||
123 | + },{ | ||
124 | + field: 'attachmentList', title: '附件数量', align: 'center', | ||
125 | + templet: '<div><span data-id="{{d.id}}" class="layui-table-link view-repair-attachment">{{d.attachmentList.length}}</span></div>' | ||
126 | + },{ | ||
127 | + field: 'groupName', title: '上报人', align: 'center', | ||
128 | + }, { | ||
129 | + field: 'manufacturerName', title: '厂商', align: 'center', | ||
130 | + },{ | ||
131 | + field: 'hitchtime', title: '故障时间', align: 'center', | ||
132 | + },{ | ||
133 | + field: 'createtime', title: '维修时间', align: 'center', | ||
134 | + }]], | ||
135 | + done: function () { | ||
136 | + //点击标题编辑表单 | ||
137 | + $('.view-repair-title').on('click', function () { | ||
138 | + openWorkReportForm( $(this).data('id')) | ||
139 | + }) | ||
140 | + | ||
141 | + //获取附件列表 | ||
142 | + $('.view-repair-attachment').on('click', function () { | ||
143 | + openWorkReportList('attachment', $(this).data('id')) | ||
144 | + }) | ||
145 | + | ||
146 | + } | ||
147 | + }); | ||
148 | + } | ||
149 | + //新增日报 | ||
150 | + $('#repair_create').on('click', function () { | ||
151 | + openWorkReportForm() | ||
152 | + }) | ||
153 | + | ||
154 | + //新增/编辑表单 | ||
155 | + function openWorkReportForm(id) { | ||
156 | + var title = id ? '编辑' : '新增' | ||
157 | + common.openWin('assets/add', title, {id: id}, ['保存', '取消'], function f() { | ||
158 | + $("#repair-form-save-id").trigger("click"); | ||
159 | + }) | ||
160 | + } | ||
161 | + | ||
162 | + //查看附件/接收人列表 | ||
163 | + function openWorkReportList(type, id) { | ||
164 | + | ||
165 | + var title = '附件' | ||
166 | + | ||
167 | + common.openWin('assets/repairlist', title, {id: id, type: type}, ['确定', '取消']) | ||
168 | + } | ||
169 | + | ||
170 | + // 加载查询条件下拉框 | ||
171 | + function loadConditionSelect() { | ||
172 | + admin.req({ | ||
173 | + url: domainName + '/api-web/bResource/findAssetsRepairList' | ||
174 | + }).done(function (response) { | ||
175 | + var options = "<option value=''>=归属单位=</option>"; | ||
176 | + console.log(response.data) | ||
177 | + $.each(response.data, function (i, v) { | ||
178 | + | ||
179 | + options += "<option value='" + v.orgCode + "'>" + v.orgName + "</option>" | ||
180 | + }); | ||
181 | + $('#slt-repair-org').html(options); | ||
182 | + form.render(); | ||
183 | + }); | ||
184 | + admin.req({ | ||
185 | + url: domainName + '/api-web/bWorkreportGroup/findManufacturerList' | ||
186 | + }).done(function (response) { | ||
187 | + var options = "<option value=''>=选择厂商=</option>"; | ||
188 | + $.each(response.data, function (i, v) { | ||
189 | + options += "<option value='" + v.id + "'>" + v.manufacturerName + "</option>" | ||
190 | + }); | ||
191 | + $('#slt-repair-group').html(options); | ||
192 | + form.render(); | ||
193 | + }); | ||
194 | + $.ajax({ | ||
195 | + url: domainName + '/api-user/users/getAll', | ||
196 | + data: { | ||
197 | + access_token: accessToken | ||
198 | + }, | ||
199 | + success: function (response) { | ||
200 | + var options = "<option value=''>=选择汇报人=</option>"; | ||
201 | + $.each(response, function (i, v) { | ||
202 | + options += "<option value='" + v.username + "'>" + v.nickname + "</option>" | ||
203 | + }); | ||
204 | + $('#slt-repair-user').html(options); | ||
205 | + form.render(); | ||
206 | + } | ||
207 | + }); | ||
208 | + admin.req({ | ||
209 | + url:common.domainName + '/api-web/home/resType/getTree?hardwareFlag=Y', | ||
210 | + }).done(function (res) { | ||
211 | + resTypeSelect = xmSelect.render({ | ||
212 | + el: '#hardware-layui-select', | ||
213 | + name: "resType", | ||
214 | + tips: '==资产类型==', | ||
215 | + filterable: true, | ||
216 | + radio: true, | ||
217 | + clickClose: false, | ||
218 | + layVerify: 'required', | ||
219 | + height: '20px', | ||
220 | + tree: { | ||
221 | + show: true, | ||
222 | + showFolderIcon: true, | ||
223 | + showLine: true, | ||
224 | + strict: true, | ||
225 | + indent: 20 | ||
226 | + }, | ||
227 | + model: { | ||
228 | + label: { | ||
229 | + type: 'text' | ||
230 | + } | ||
231 | + }, | ||
232 | + height: 'auto', | ||
233 | + data: res.data, | ||
234 | + hide:function () { | ||
235 | + var str = resTypeSelect.getValue('valueStr'); | ||
236 | + if(!str){ | ||
237 | + str = 'all'; | ||
238 | + } | ||
239 | + currentResourceTypeTreeNodeId=str; | ||
240 | + reloadAllChange(); | ||
241 | + } | ||
242 | + }); | ||
243 | + form.render(); | ||
244 | + }) | ||
245 | + } | ||
246 | + | ||
247 | + | ||
248 | + // 各单位维修情况 | ||
249 | + function loadCompanyReport() { | ||
250 | + var conditions = form.val('form-repair-condition'); | ||
251 | + Object.assign(conditions, {access_token: accessToken, createtime: createTime, viewMode: '',dateLimit:dateLimit,groupBy: 'orgName'}); | ||
252 | + admin.req({ | ||
253 | + url: domainName + '/api-web/bResource/getAssetsRepairForGroup', | ||
254 | + data: conditions | ||
255 | + }).done(function (response) { | ||
256 | + var chartData = response.map; | ||
257 | + var groupList = chartData.groupList; | ||
258 | + var countList = chartData.countList; | ||
259 | + var xData = []; | ||
260 | + var groupData = []; | ||
261 | + $.each(groupList, function (i, v) { | ||
262 | + xData.push(v); | ||
263 | + groupData.push({ | ||
264 | + name: v, | ||
265 | + value: 1 | ||
266 | + }); | ||
267 | + }); | ||
268 | + var series = [{ | ||
269 | + name: '维修数', | ||
270 | + data: countList, | ||
271 | + barWidth: 20, | ||
272 | + type: 'bar', | ||
273 | + label: { | ||
274 | + show: true, | ||
275 | + position: 'top', | ||
276 | + textStyle: { | ||
277 | + color: '#555' | ||
278 | + }, | ||
279 | + formatter:function (data) { | ||
280 | + return countList[data.dataIndex] | ||
281 | + } | ||
282 | + }, | ||
283 | + itemStyle: { | ||
284 | + normal: { | ||
285 | + color: (params) => { | ||
286 | + var colors = ['#b6c2ff', '#96edc1', '#fcb75b']; | ||
287 | + return colors[params.dataIndex % 3] | ||
288 | + } | ||
289 | + } | ||
290 | + }, | ||
291 | + xAxisIndex: 0, | ||
292 | + yAxisIndex: 0 | ||
293 | + }]; | ||
294 | + /** | ||
295 | + 双X轴标签对应,伪实现思路: | ||
296 | + 底部的标签也是柱状图,对应包含的区域为上方X轴条数占总数的比例,设为宽度即可 | ||
297 | + */ | ||
298 | + var option = { | ||
299 | + tooltip: { | ||
300 | + trigger: 'axis', | ||
301 | + axisPointer: { | ||
302 | + type: 'shadow' | ||
303 | + } | ||
304 | + }, | ||
305 | + grid: [{ | ||
306 | + top: 20, | ||
307 | + bottom: 70, | ||
308 | + right: 5 | ||
309 | + }, { | ||
310 | + height: 30, | ||
311 | + bottom: 30, | ||
312 | + right: 5 | ||
313 | + }], | ||
314 | + xAxis: [{ | ||
315 | + type: 'category', | ||
316 | + data: xData, | ||
317 | + gridIndex: 0, | ||
318 | + axisLabel: { | ||
319 | + color: '#333', | ||
320 | + show: true, | ||
321 | + interval:0, | ||
322 | + rotate:25 | ||
323 | + }, | ||
324 | + axisLine: { | ||
325 | + lineStyle: { | ||
326 | + color: '#e7e7e7' | ||
327 | + } | ||
328 | + }, | ||
329 | + axisTick: { | ||
330 | + lineStyle: { | ||
331 | + color: '#e7e7e7' | ||
332 | + } | ||
333 | + }, | ||
334 | + zlevel: 2 | ||
335 | + }, { | ||
336 | + type: 'category', | ||
337 | + gridIndex: 1, | ||
338 | + axisLine: { | ||
339 | + show: false | ||
340 | + }, | ||
341 | + zlevel: 1 | ||
342 | + }], | ||
343 | + yAxis: [{ | ||
344 | + type: 'value', | ||
345 | + gridIndex: 0, | ||
346 | + axisLabel: { | ||
347 | + color: '#333' | ||
348 | + }, | ||
349 | + splitLine: { | ||
350 | + lineStyle: { | ||
351 | + type: 'dashed' | ||
352 | + } | ||
353 | + }, | ||
354 | + axisLine: { | ||
355 | + lineStyle: { | ||
356 | + color: '#ccc' | ||
357 | + } | ||
358 | + }, | ||
359 | + axisTick: { | ||
360 | + lineStyle: { | ||
361 | + color: '#ccc' | ||
362 | + } | ||
363 | + } | ||
364 | + }, { | ||
365 | + type: 'value', | ||
366 | + gridIndex: 1, | ||
367 | + axisLabel: { | ||
368 | + show: false | ||
369 | + }, | ||
370 | + axisLine: { | ||
371 | + show: false | ||
372 | + }, | ||
373 | + splitLine: { | ||
374 | + show: false | ||
375 | + }, | ||
376 | + axisTick: { | ||
377 | + show: false | ||
378 | + } | ||
379 | + }], | ||
380 | + series: series | ||
381 | + }; | ||
382 | + companyChart.setOption(option) | ||
383 | + }); | ||
384 | + } | ||
385 | + | ||
386 | + // 按资源类型统计 | ||
387 | + function loadResTypeReport() { | ||
388 | + var conditions = form.val('form-repair-condition'); | ||
389 | + Object.assign(conditions, {access_token: accessToken, createtime: createTime, viewMode: '',dateLimit:dateLimit,groupBy: 'resTypeName'}); | ||
390 | + admin.req({ | ||
391 | + url: domainName + '/api-web/bResource/getAssetsRepairForGroup', | ||
392 | + data: conditions | ||
393 | + }).done(function (response) { | ||
394 | + var chartData = response.map; | ||
395 | + var groupList = chartData.groupList; | ||
396 | + var countList = chartData.countList; | ||
397 | + var xData = []; | ||
398 | + var groupData = []; | ||
399 | + $.each(groupList, function (i, v) { | ||
400 | + xData.push(v); | ||
401 | + groupData.push({ | ||
402 | + name: v, | ||
403 | + value: 1 | ||
404 | + }); | ||
405 | + }); | ||
406 | + var series = [{ | ||
407 | + name: '维修数', | ||
408 | + data: countList, | ||
409 | + barWidth: 20, | ||
410 | + type: 'bar', | ||
411 | + label: { | ||
412 | + show: true, | ||
413 | + position: 'top', | ||
414 | + textStyle: { | ||
415 | + color: '#555' | ||
416 | + }, | ||
417 | + formatter:function (data) { | ||
418 | + return countList[data.dataIndex] | ||
419 | + } | ||
420 | + }, | ||
421 | + itemStyle: { | ||
422 | + normal: { | ||
423 | + color: (params) => { | ||
424 | + var colors = ['#b6c2ff', '#96edc1', '#fcb75b']; | ||
425 | + return colors[params.dataIndex % 3] | ||
426 | + } | ||
427 | + } | ||
428 | + }, | ||
429 | + xAxisIndex: 0, | ||
430 | + yAxisIndex: 0 | ||
431 | + }]; | ||
432 | + /** | ||
433 | + 双X轴标签对应,伪实现思路: | ||
434 | + 底部的标签也是柱状图,对应包含的区域为上方X轴条数占总数的比例,设为宽度即可 | ||
435 | + */ | ||
436 | + var option = { | ||
437 | + tooltip: { | ||
438 | + trigger: 'axis', | ||
439 | + axisPointer: { | ||
440 | + type: 'shadow' | ||
441 | + } | ||
442 | + }, | ||
443 | + grid: [{ | ||
444 | + top: 20, | ||
445 | + bottom: 70, | ||
446 | + right: 5 | ||
447 | + }, { | ||
448 | + height: 30, | ||
449 | + bottom: 30, | ||
450 | + right: 5 | ||
451 | + }], | ||
452 | + xAxis: [{ | ||
453 | + type: 'category', | ||
454 | + data: xData, | ||
455 | + gridIndex: 0, | ||
456 | + axisLabel: { | ||
457 | + color: '#333', | ||
458 | + show: true, | ||
459 | + interval:0, | ||
460 | + rotate:25 | ||
461 | + }, | ||
462 | + axisLine: { | ||
463 | + lineStyle: { | ||
464 | + color: '#e7e7e7' | ||
465 | + } | ||
466 | + }, | ||
467 | + axisTick: { | ||
468 | + lineStyle: { | ||
469 | + color: '#e7e7e7' | ||
470 | + } | ||
471 | + }, | ||
472 | + zlevel: 2 | ||
473 | + }, { | ||
474 | + type: 'category', | ||
475 | + gridIndex: 1, | ||
476 | + axisLine: { | ||
477 | + show: false | ||
478 | + }, | ||
479 | + zlevel: 1 | ||
480 | + }], | ||
481 | + yAxis: [{ | ||
482 | + type: 'value', | ||
483 | + gridIndex: 0, | ||
484 | + axisLabel: { | ||
485 | + color: '#333' | ||
486 | + }, | ||
487 | + splitLine: { | ||
488 | + lineStyle: { | ||
489 | + type: 'dashed' | ||
490 | + } | ||
491 | + }, | ||
492 | + axisLine: { | ||
493 | + lineStyle: { | ||
494 | + color: '#ccc' | ||
495 | + } | ||
496 | + }, | ||
497 | + axisTick: { | ||
498 | + lineStyle: { | ||
499 | + color: '#ccc' | ||
500 | + } | ||
501 | + } | ||
502 | + }, { | ||
503 | + type: 'value', | ||
504 | + gridIndex: 1, | ||
505 | + axisLabel: { | ||
506 | + show: false | ||
507 | + }, | ||
508 | + axisLine: { | ||
509 | + show: false | ||
510 | + }, | ||
511 | + splitLine: { | ||
512 | + show: false | ||
513 | + }, | ||
514 | + axisTick: { | ||
515 | + show: false | ||
516 | + } | ||
517 | + }], | ||
518 | + series: series | ||
519 | + }; | ||
520 | + resTypeChart.setOption(option) | ||
521 | + }); | ||
522 | + } | ||
523 | + | ||
524 | + | ||
525 | + | ||
526 | + // 图表,表格重新加载 | ||
527 | + function reloadAllChange() { | ||
528 | + loadWorkReportTable(); | ||
529 | + loadCompanyReport(); | ||
530 | + loadResTypeReport(); | ||
531 | + | ||
532 | + } | ||
533 | + }); | ||
534 | +}); |
@@ -2569,6 +2569,19 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -2569,6 +2569,19 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
2569 | {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'}, | 2569 | {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'}, |
2570 | {field: 'state', title: '资源状态', minWidth: x_110, align: 'center', sort: true, templet: '#resStateTpl'} | 2570 | {field: 'state', title: '资源状态', minWidth: x_110, align: 'center', sort: true, templet: '#resStateTpl'} |
2571 | ], | 2571 | ], |
2572 | + "ARMS":[ | ||
2573 | + { | ||
2574 | + field: 'resName', title: '资源名称', minWidth: x_300, sort: true, | ||
2575 | + templet: '#resindex_resName' | ||
2576 | + }, | ||
2577 | + {field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'}, | ||
2578 | + {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true}, | ||
2579 | + {field: 'linkState', title: '连接状态', align: 'center', minWidth: x_110, templet: '#linkStateTpl', sort: true}, | ||
2580 | + {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true}, | ||
2581 | + {field: 'adminPhone', title: '负责人电话', minWidth: x_130, align: 'center', sort: true}, | ||
2582 | + {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'}, | ||
2583 | + {field: 'state', title: '资源状态', minWidth: x_110, align: 'center', sort: true, templet: '#resStateTpl'} | ||
2584 | + ], | ||
2572 | }, | 2585 | }, |
2573 | //列点击事件 | 2586 | //列点击事件 |
2574 | colsClickEvent: function (editFlag) { | 2587 | colsClickEvent: function (editFlag) { |
@@ -284,9 +284,11 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -284,9 +284,11 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
284 | success: function (layero, index) { | 284 | success: function (layero, index) { |
285 | restoreVersionRender(dirctiveId,index); | 285 | restoreVersionRender(dirctiveId,index); |
286 | }, | 286 | }, |
287 | - yes: function () { | ||
288 | - layer.closeAll(); | 287 | + //update xwx 2021-11-4 设置任务管理-指令模板数量-指令模板-绑定指令-历史版本页面关闭时关闭当前页面 |
288 | + yes: function (index) { | ||
289 | + layer.close(index); | ||
289 | } | 290 | } |
291 | + //update xwx 2021-11-4 设置任务管理-指令模板数量-指令模板-绑定指令-历史版本页面关闭时关闭当前页面 | ||
290 | }); | 292 | }); |
291 | }) | 293 | }) |
292 | } | 294 | } |
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("repairlist", function (d) { | ||
14 | + var accessToken = session.getToken()['access_token'] | ||
15 | + if (d.type == 'attachment') { | ||
16 | + $('#attachmentTable').show() | ||
17 | + | ||
18 | + createAttachmentTable() | ||
19 | + } | ||
20 | + | ||
21 | + | ||
22 | + //渲染附件表格 | ||
23 | + function createAttachmentTable() { | ||
24 | + var attachmentTable = table.render({ | ||
25 | + elem: '#attachmentTable', | ||
26 | + url: domainName + '/api-web/bResource/assetsrepair/getAttaById', | ||
27 | + where: { | ||
28 | + access_token: accessToken, | ||
29 | + id: d.id | ||
30 | + }, | ||
31 | + height: 'full', | ||
32 | + page: { | ||
33 | + layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'] | ||
34 | + , theme: '#1E9FFF'//自定义分页主题颜色 | ||
35 | + }, | ||
36 | + end: function (e) { | ||
37 | + form.render() | ||
38 | + }, | ||
39 | + limit: common.limit, | ||
40 | + limits: common.limits, | ||
41 | + even: true, | ||
42 | + cols: [[ | ||
43 | + {type: 'numbers', title: '序号'}, | ||
44 | + { | ||
45 | + field: 'name', title: '文件名称', align: 'center', minWith: 200, | ||
46 | + }, { | ||
47 | + field: 'originalName', title: '原始名称', align: 'center', minWith: 200, | ||
48 | + }, { | ||
49 | + field: 'suffix', title: '文件后缀', align: 'center', minWith: 150, | ||
50 | + }, | ||
51 | + { | ||
52 | + field: 'size', title: '文件大小', align: 'center', minWith: 150, | ||
53 | + templet: function (d) { | ||
54 | + var str = (d.size / 1000).toFixed(2) | ||
55 | + return `<div><span>${str}KB</span></div>` | ||
56 | + } | ||
57 | + }, | ||
58 | + { | ||
59 | + title: '操作', align: "center", width: 120, | ||
60 | + templet: '<div><span data-id="{{d.id}}" data-suffix="{{d.suffix}}" class="layui-table-link preview-attachment-btn">预览</span>' + | ||
61 | + '<span data-id="{{d.id}}" data-suffix="{{d.suffix}}" class="layui-table-link attachment-download-btn" style="margin-left: 10px">下载</span></div>' | ||
62 | + } | ||
63 | + ]], | ||
64 | + done: function () { | ||
65 | + $('.preview-attachment-btn').on('click', function () { | ||
66 | + var id = $(this).data('id') | ||
67 | + var suffix = $(this).data('suffix') | ||
68 | + if (suffix == 'jpg' || suffix == 'png' || suffix == 'JPG' || suffix == 'PNG') { //图片类型 | ||
69 | + var srcUrl = domainName + `/api-web/openoffice/readImage/${id}?access_token=` + accessToken | ||
70 | + layer.open({ | ||
71 | + type: 1, | ||
72 | + content: `<div><img src="${srcUrl}" width="100%" height="100%" /></div>`, | ||
73 | + title: '图片预览', | ||
74 | + area: ['60%', '90%'] | ||
75 | + }) | ||
76 | + } else { | ||
77 | + //附件为文档类型 | ||
78 | + common.openReport(id) | ||
79 | + } | ||
80 | + }) | ||
81 | + | ||
82 | + $('.attachment-download-btn').on('click',function () { | ||
83 | + var id = $(this).data('id') | ||
84 | + var suffix = $(this).data('suffix') | ||
85 | + var url = domainName + `/api-web/openoffice/download/${id}?access_token=` + accessToken | ||
86 | + window.open(url) | ||
87 | + }) | ||
88 | + } | ||
89 | + }) | ||
90 | + } | ||
91 | + | ||
92 | + }) | ||
93 | +}) |
@@ -515,7 +515,7 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'admi | @@ -515,7 +515,7 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'admi | ||
515 | var $that = $(this) | 515 | var $that = $(this) |
516 | var resId = $(this).data("id"); | 516 | var resId = $(this).data("id"); |
517 | var protocol = $(this).data("protocol"); | 517 | var protocol = $(this).data("protocol"); |
518 | - layer.confirm('确认要修改该资源的密吗?', { | 518 | + layer.confirm('确认要修改该资源的密码?', { |
519 | title: '警告', | 519 | title: '警告', |
520 | icon: 0, | 520 | icon: 0, |
521 | btn: ['确定', '取消'] | 521 | btn: ['确定', '取消'] |
@@ -133,7 +133,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -133,7 +133,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
133 | $(".pwd-btn").on("click", function () { | 133 | $(".pwd-btn").on("click", function () { |
134 | var resId = $(this).data("id"); | 134 | var resId = $(this).data("id"); |
135 | var protocol = $(this).data("protocol"); | 135 | var protocol = $(this).data("protocol"); |
136 | - layer.confirm('确认要修改该资源的密吗?', { | 136 | + layer.confirm('确认要修改该资源的密码?', { |
137 | title: '警告', | 137 | title: '警告', |
138 | icon: 0, | 138 | icon: 0, |
139 | btn: ['确定', '取消'] | 139 | btn: ['确定', '取消'] |
@@ -4400,7 +4400,8 @@ grayColor{ | @@ -4400,7 +4400,8 @@ grayColor{ | ||
4400 | 4400 | ||
4401 | .index-top .index-banner .index-banner-main .index-banner-item .index-banner-item-tips { | 4401 | .index-top .index-banner .index-banner-main .index-banner-item .index-banner-item-tips { |
4402 | height: 20px; | 4402 | height: 20px; |
4403 | - width: 16px; | 4403 | + /*首页告警展示数量调整*/ |
4404 | + width: 20px; | ||
4404 | line-height: 20px; | 4405 | line-height: 20px; |
4405 | top: -6px; | 4406 | top: -6px; |
4406 | left: 96.5%; | 4407 | left: 96.5%; |
1 | +<!--工作汇报表单--> | ||
2 | +<article> | ||
3 | + <div class="layui-card-body"> | ||
4 | + <fieldset class="layui-elem-field layui-field-title"> | ||
5 | + <legend>维修信息</legend> | ||
6 | + </fieldset> | ||
7 | + <form class="layui-form layui-form-pane" lay-filter="add-repair-form" | ||
8 | + id="add-repair-form" onsubmit="return false;"> | ||
9 | + <input hidden name="id" id="id" lay-verify="checkReportIsExist"> | ||
10 | + <div class="layui-form-item"> | ||
11 | + <div class="layui-inline inline-half"> | ||
12 | + <label class="layui-form-label">设备类型</label> | ||
13 | + <div class="layui-input-inline"> | ||
14 | + <select name="resType" id="slt-repairadd-res" | ||
15 | + lay-filter="slt-repairadd-res"> | ||
16 | + <option value="">=设备类型=</option> | ||
17 | + </select> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | + <div class="layui-inline inline-half"> | ||
21 | + <label class="layui-form-label">设备序列号</label> | ||
22 | + <div class="layui-input-inline"> | ||
23 | + <input type="text" class="layui-input" name="resourceSN" id="resourceSN"> | ||
24 | + </div> | ||
25 | + </div> | ||
26 | + </div> | ||
27 | + <div class="layui-form-item"> | ||
28 | + <div class="layui-inline inline-half"> | ||
29 | + <label class="layui-form-label">故障时间</label> | ||
30 | + <div class="layui-input-inline"> | ||
31 | + <input type="text" class="layui-input" name="hitchtime" id="hitchtime"> | ||
32 | + </div> | ||
33 | + </div> | ||
34 | + <div class="layui-inline inline-half"> | ||
35 | + <label class="layui-form-label">维修时间</label> | ||
36 | + <div class="layui-input-inline"> | ||
37 | + <input type="text" class="layui-input" name="createtime" id="createtime"> | ||
38 | + </div> | ||
39 | + </div> | ||
40 | + </div> | ||
41 | + <div class="layui-form-item hide" id="form-item-repTitle"> | ||
42 | + <div class="layui-inline inline-half"> | ||
43 | + <label class="layui-form-label">标题</label> | ||
44 | + <div class="layui-input-inline"> | ||
45 | + <input type="text" class="layui-input" name="title"> | ||
46 | + </div> | ||
47 | + </div> | ||
48 | + <div class="layui-inline inline-half"> | ||
49 | + <label class="layui-form-label">汇报人</label> | ||
50 | + <div class="layui-input-inline"> | ||
51 | + <input type="text" class="layui-input" name="createBy" id= "createUser" readonly="readonly"> | ||
52 | + </div> | ||
53 | + </div> | ||
54 | + </div> | ||
55 | + <div class="layui-form-item"> | ||
56 | + <div class="layui-inline inline-half"> | ||
57 | + <label class="layui-form-label">归属单位</label> | ||
58 | + <div class="layui-input-inline"> | ||
59 | + <select name="orgId" id="slt-repairadd-org" | ||
60 | + lay-filter="slt-repairadd-org"> | ||
61 | + <option value="">=归属单位=</option> | ||
62 | + </select> | ||
63 | + </div> | ||
64 | + </div> | ||
65 | + <div class="layui-inline inline-half"> | ||
66 | + <label class="layui-form-label">选择厂商</label> | ||
67 | + <div class="layui-input-inline"> | ||
68 | + <select name="manufacturerId" id="slt-repairadd-group" | ||
69 | + lay-filter="slt-repairadd-group" > | ||
70 | + <option value="">=选择厂商=</option> | ||
71 | + </select> | ||
72 | + </div> | ||
73 | + </div> | ||
74 | + </div> | ||
75 | + <div class="layui-form-item"> | ||
76 | + <div class="layui-inline inline-half"> | ||
77 | + <label class="layui-form-label">受影响系统</label> | ||
78 | + <div class="layui-input-inline"> | ||
79 | + <input type="text" class="layui-input" name="affected" id="affected"> | ||
80 | + </div> | ||
81 | + </div> | ||
82 | + <div class="layui-inline inline-half"> | ||
83 | + <label class="layui-form-label">所属ip</label> | ||
84 | + <div class="layui-input-inline"> | ||
85 | + <input type="text" class="layui-input" name="ip" id="ip"> | ||
86 | + </div> | ||
87 | + </div> | ||
88 | + </div> | ||
89 | + <div class="layui-form-item"> | ||
90 | + <div class="layui-inline" style="width: 90%"> | ||
91 | + <label class="layui-form-label">选择附件</label> | ||
92 | + <div class="layui-input-block attachment"> | ||
93 | + <input type="text" class="layui-input" readonly id="attachmentInput"> | ||
94 | + </div> | ||
95 | + </div> | ||
96 | + <div class="layui-inline"> | ||
97 | + <button class="layui-btn layui-btn-normal" id="attachment">附件</button> | ||
98 | + <button id="upload_btn" hidden>附件</button> | ||
99 | + </div> | ||
100 | + </div> | ||
101 | + <div class="layui-form-item" style="display: none" id="add-repair-form-atta"> | ||
102 | + <label class="layui-form-label">已存附件</label> | ||
103 | + <div class="layui-input-inline" | ||
104 | + style="width: 90% !important;max-height: 130px;overflow-y: auto;margin-left: 10px;"> | ||
105 | + <div class="tags" id="selecte_content_id"></div> | ||
106 | + </div> | ||
107 | + </div> | ||
108 | + | ||
109 | + <div class="layui-form-item"> | ||
110 | + <label class="layui-form-label textarea-label">故障现象描述</label> | ||
111 | + <div class="layui-input-block"> | ||
112 | + <textarea class="layui-textarea" name="phenomenon"></textarea> | ||
113 | + </div> | ||
114 | + </div> | ||
115 | + <div class="layui-form-item"> | ||
116 | + <label class="layui-form-label textarea-label">解决过程描述</label> | ||
117 | + <div class="layui-input-block"> | ||
118 | + <textarea class="layui-textarea" name="solveprocess"></textarea> | ||
119 | + </div> | ||
120 | + </div> | ||
121 | + <div class="layui-form-item"> | ||
122 | + <label class="layui-form-label textarea-label">处理结果</label> | ||
123 | + <div class="layui-input-block"> | ||
124 | + <textarea class="layui-textarea" name="result"></textarea> | ||
125 | + </div> | ||
126 | + </div> | ||
127 | + <div class="layui-form-item"> | ||
128 | + <label class="layui-form-label textarea-label">经验总结</label> | ||
129 | + <div class="layui-input-block"> | ||
130 | + <textarea class="layui-textarea" name="experience"></textarea> | ||
131 | + </div> | ||
132 | + </div> | ||
133 | + <button type="submit" lay-submit lay-filter="repair-form-save-id" class="layui-btn hide" | ||
134 | + id="repair-form-save-id">保存 | ||
135 | + </button> | ||
136 | + <table id="table-repair-add-attachment" class="hide"></table> | ||
137 | + </form> | ||
138 | + </div> | ||
139 | +</article> | ||
140 | +<script> | ||
141 | + layui.use('assetsRepairAdd', function (fn) { | ||
142 | + fn({{d}}) | ||
143 | + }) | ||
144 | +</script> | ||
145 | + | ||
146 | +<style> | ||
147 | + #add-repair-form .layui-form-label { | ||
148 | + width: 120px; | ||
149 | + /* padding: 8px 12px; */ | ||
150 | + text-align: left !important; | ||
151 | + } | ||
152 | + #add-repair-form .layui-input-block{ | ||
153 | + margin-left: 120px !important; | ||
154 | + } | ||
155 | + .tags{ | ||
156 | + margin-top:5px; | ||
157 | + } | ||
158 | + .tags span { | ||
159 | + height: 20px; | ||
160 | + margin-right: 10px; | ||
161 | + margin-bottom: 3px; | ||
162 | + padding: 5px 10px 5px 10px; | ||
163 | + float: left; | ||
164 | + white-space: nowrap; | ||
165 | + color:#fff; | ||
166 | + background-color:#009688; | ||
167 | + text-shadow: 1px 1px 1px rgba(0, 0, 0, .15); | ||
168 | + } | ||
169 | + .tags .close { | ||
170 | + font-weight: bold; | ||
171 | + line-height: 20px; | ||
172 | + margin-left:10px; | ||
173 | + cursor: pointer; | ||
174 | + text-align: center; | ||
175 | + color: #fff; | ||
176 | + border: 0 none; | ||
177 | + background: transparent none repeat scroll 0 0; | ||
178 | + } | ||
179 | +</style> |
1 | +<title>资产维修记录</title> | ||
2 | +<article class="page-container"> | ||
3 | + <div class="page-panel "> | ||
4 | + <div class="main"> | ||
5 | + <div class="layui-card"> | ||
6 | + <div class="layui-card-header"> | ||
7 | + <div class="layui-status"> | ||
8 | + <form class="layui-form layui-card-header" onsubmit="return false" | ||
9 | + lay-filter="form-repair-condition"> | ||
10 | + <div class="layui-form-item"> | ||
11 | + <div class="layui-inline"> | ||
12 | + <div class="layui-input-inline layui-input-inline--long"> | ||
13 | + <input type="text" id="monitor_keyword" name="title" | ||
14 | + placeholder="标题搜索,支持内容模糊匹配" autocomplete="off" class="layui-input"> | ||
15 | + </div> | ||
16 | + </div> | ||
17 | + <div class="layui-inline"> | ||
18 | + <div class="layui-input-inline"> | ||
19 | + <select name="orgId" id="slt-repair-org" | ||
20 | + lay-filter="slt-repair-org" lay-search> | ||
21 | + <option value="">=归属单位=</option> | ||
22 | + </select> | ||
23 | + </div> | ||
24 | + </div> | ||
25 | + <div class="layui-inline"> | ||
26 | + <div class="layui-input-inline"> | ||
27 | + <select name="manufacturerId" id="slt-repair-group" | ||
28 | + lay-filter="slt-repair-group" lay-search> | ||
29 | + <option value="">=选择厂商=</option> | ||
30 | + </select> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + <div class="layui-inline"> | ||
34 | + <div class="layui-input-inline "> | ||
35 | + <div id="hardware-layui-select" class="xm-select"></div> | ||
36 | + </div> | ||
37 | + </div> | ||
38 | + <div class="layui-inline"> | ||
39 | + <div class="layui-input-inline"> | ||
40 | + <select name="createBy" id="slt-repair-user" | ||
41 | + lay-filter="slt-repair-user" lay-search> | ||
42 | + <option value="">=选择汇报人=</option> | ||
43 | + </select> | ||
44 | + </div> | ||
45 | + </div> | ||
46 | + | ||
47 | + <div class="layui-btn-group time-group" id="btns-repair-time" style="padding: 0"> | ||
48 | + <button type="button" class="layui-btn layui-btn-primary layui-btn-xs date" | ||
49 | + data-period="today">今天 | ||
50 | + </button> | ||
51 | + <button type="button" class="layui-btn layui-btn-primary layui-btn-xs date" | ||
52 | + data-period="lastWeek">上周 | ||
53 | + </button> | ||
54 | + <button type="button" class="layui-btn layui-btn-primary layui-btn-xs active date" | ||
55 | + data-period="thisWeek">本周 | ||
56 | + </button> | ||
57 | + <button type="button" class="layui-btn layui-btn-primary layui-btn-xs date" | ||
58 | + data-period="lastMonth">上月 | ||
59 | + </button> | ||
60 | + <button type="button" class="layui-btn layui-btn-primary layui-btn-xs date" | ||
61 | + data-period="thisMonth">本月 | ||
62 | + </button> | ||
63 | + </div> | ||
64 | + <div class="layui-inline" style="margin-left: 10px"> | ||
65 | + <div class="layui-input-inline" style="width: auto"> | ||
66 | + <input type="text" name="dateLimit" id="dateLimit" autocomplete="off" | ||
67 | + class="layui-input" readonly placeholder="其他日期范围"> | ||
68 | + </div> | ||
69 | + </div> | ||
70 | + </div> | ||
71 | + </form> | ||
72 | + </div> | ||
73 | + </div> | ||
74 | + <div style="display: flex" class="layui-card-echart"> | ||
75 | + <div style="flex-grow: 3;width: 45%!important;"> | ||
76 | + <h5 class="lay-row-title">按单位统计</h5> | ||
77 | + <div class="pie-chart" id="chart-company-report" style="min-height: 240px"></div> | ||
78 | + </div> | ||
79 | + <div style="flex-grow: 3;width: 45%!important;"> | ||
80 | + <h5 class="lay-row-title">按资产类型统计</h5> | ||
81 | + <div class="pie-chart" id="chart-restype-report" style="min-height: 240px"></div> | ||
82 | + </div> | ||
83 | + </div> | ||
84 | + <div class="layui-card-body" style="margin-top: 10px;"> | ||
85 | + <div class="warn-btns"> | ||
86 | + <button class="layui-btn layui-btn-sm layui-btn-normal active" data-type="" id="repair_create"> | ||
87 | + 新增 | ||
88 | + </button> | ||
89 | + </div> | ||
90 | + <table id="table-repair-view" lay-filter="table-repair-view"></table> | ||
91 | + </div> | ||
92 | + </div> | ||
93 | + </div> | ||
94 | + </div> | ||
95 | +</article> | ||
96 | +<script> | ||
97 | + layui.use('assetsrepair', function (fn) { | ||
98 | + fn(); | ||
99 | + }); | ||
100 | +</script> |
1 | +<article class="page-container"> | ||
2 | + <div class="page-panel"> | ||
3 | + <div class="main"> | ||
4 | + <div class="layui-card"> | ||
5 | + <div class="layui-card-header"> | ||
6 | + </div> | ||
7 | + <div class="layui-card-body"> | ||
8 | + <table id="attachmentTable" lay-filter="attachmentTable"></table> | ||
9 | + </div> | ||
10 | + </div> | ||
11 | + </div> | ||
12 | + </div> | ||
13 | +</article> | ||
14 | + | ||
15 | +<script> | ||
16 | + layui.use('repairlist', function (fn) { | ||
17 | + fn({{d}}) | ||
18 | + }); | ||
19 | +</script> |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | <!-- </div>--> | 27 | <!-- </div>--> |
28 | <!-- </div>--> | 28 | <!-- </div>--> |
29 | <div class="layui-inline "> | 29 | <div class="layui-inline "> |
30 | - <label class="layui-form-label">所在部门<span style="color: red">*</span>:</label> | 30 | + <label class="layui-form-label">所在部门<span style="color: red">*</span></label> |
31 | <div class="layui-input-inline"> | 31 | <div class="layui-input-inline"> |
32 | <div id="userorgId"></div> | 32 | <div id="userorgId"></div> |
33 | </div> | 33 | </div> |
@@ -60,18 +60,14 @@ | @@ -60,18 +60,14 @@ | ||
60 | } | 60 | } |
61 | return false; | 61 | return false; |
62 | } | 62 | } |
63 | - | ||
64 | - //joke add 20210506 获取密码级别 | ||
65 | - function getPwdLevel(){ | ||
66 | - admin.req({ | ||
67 | - url: common.domainName +'/api-web/sysConf/getConfByCode?code=pwd_level' | ||
68 | - , type: "get" | ||
69 | - , async: false | ||
70 | - , done: function (data) { | ||
71 | - if (data && data.object && data.success === true && data.object.ddicDesc){ | ||
72 | - var pattern = data.object.ddicDesc.split(' ')[0]; | ||
73 | - var patternTips = data.object.ddicDesc.split(' ')[1]; | ||
74 | - var last5His = passwords; | 63 | + // Start Wang 2021/11/3 10:13 密码不能修改 [https://hgkj.5upm.com/bug-view-65.html] |
64 | + /** | ||
65 | + * 表单提交处理 | ||
66 | + * | ||
67 | + * 作者: Wang | ||
68 | + * 时间:2021/11/3 10:10 | ||
69 | + */ | ||
70 | + function verifyForm(pattern, patternTips,last5His){ | ||
75 | form.render(); | 71 | form.render(); |
76 | //自定义验证 | 72 | //自定义验证 |
77 | form.verify((function(pattern, patternTips,last5His) { | 73 | form.verify((function(pattern, patternTips,last5His) { |
@@ -83,11 +79,12 @@ | @@ -83,11 +79,12 @@ | ||
83 | if (value === $('#oldPassword').val()){ | 79 | if (value === $('#oldPassword').val()){ |
84 | return '新密码不能与旧密码一致'; | 80 | return '新密码不能与旧密码一致'; |
85 | } | 81 | } |
86 | - if(!new RegExp(pattern).test(value)){ | 82 | + if(pattern && !new RegExp(pattern).test(value)){ |
87 | return patternTips; | 83 | return patternTips; |
88 | } | 84 | } |
85 | + | ||
89 | //临时增加用户组写死密码 joke add 20210508 | 86 | //临时增加用户组写死密码 joke add 20210508 |
90 | - if (checkHas(last5His,value)){ | 87 | + if (last5His && last5His.length > 0 && checkHas(last5His,value)){ |
91 | return '不能使用最近5次密码'; | 88 | return '不能使用最近5次密码'; |
92 | } | 89 | } |
93 | 90 | ||
@@ -175,10 +172,27 @@ | @@ -175,10 +172,27 @@ | ||
175 | }); | 172 | }); |
176 | }); | 173 | }); |
177 | } | 174 | } |
175 | + | ||
176 | + //joke add 20210506 获取密码级别 | ||
177 | + function getPwdLevel(){ | ||
178 | + admin.req({ | ||
179 | + url: common.domainName +'/api-web/sysConf/getConfByCode?code=pwd_level' | ||
180 | + , type: "get" | ||
181 | + , async: false | ||
182 | + , done: function (data) { | ||
183 | + if (data && data.object && data.success === true && data.object.ddicDesc){ | ||
184 | + var pattern = data.object.ddicDesc.split(' ')[0]; | ||
185 | + var patternTips = data.object.ddicDesc.split(' ')[1]; | ||
186 | + var last5His = passwords; | ||
187 | + verifyForm(pattern, patternTips,last5His); | ||
188 | + } else { | ||
189 | + layer.msg('没有获取去密码级别,将不做密码级别验证!', {icon: 0}); | ||
190 | + verifyForm(undefined, undefined,passwords); | ||
191 | + } | ||
178 | } | 192 | } |
179 | }); | 193 | }); |
180 | } | 194 | } |
181 | - | 195 | + // End Wang 2021/11/3 10:12 密码不能修改 [https://hgkj.5upm.com/bug-view-65.html] |
182 | 196 | ||
183 | 197 | ||
184 | $('.layui-layer-setwin .layui-layer-close').click(function () { | 198 | $('.layui-layer-setwin .layui-layer-close').click(function () { |
@@ -8,9 +8,11 @@ | @@ -8,9 +8,11 @@ | ||
8 | <script src="public/lib/vue/vue.global.prod.js"></script> | 8 | <script src="public/lib/vue/vue.global.prod.js"></script> |
9 | <script src="public/lib/vue/vue-router.global.prod.js"></script> | 9 | <script src="public/lib/vue/vue-router.global.prod.js"></script> |
10 | <script src="public/lib/vue/vuex.global.prod.js"></script> | 10 | <script src="public/lib/vue/vuex.global.prod.js"></script> |
11 | + <link href="public/lib/element-plus/index-icon.css" rel="stylesheet"> | ||
11 | <link href="public/lib/element-plus/index.css" rel="stylesheet"> | 12 | <link href="public/lib/element-plus/index.css" rel="stylesheet"> |
12 | <script src="public/lib/element-plus/index.full.js"></script> | 13 | <script src="public/lib/element-plus/index.full.js"></script> |
13 | <script src="public/lib/element-plus/zh-cn.js"></script> | 14 | <script src="public/lib/element-plus/zh-cn.js"></script> |
15 | + | ||
14 | <link href="public/lib/vant/index.css" rel="stylesheet"> | 16 | <link href="public/lib/vant/index.css" rel="stylesheet"> |
15 | <script src="public/lib/vant/vant.min.js"></script> | 17 | <script src="public/lib/vant/vant.min.js"></script> |
16 | <script src="public/lib/axios/axios.min.js"></script> | 18 | <script src="public/lib/axios/axios.min.js"></script> |
@@ -8,7 +8,6 @@ | @@ -8,7 +8,6 @@ | ||
8 | background-color: #CCCCCC; | 8 | background-color: #CCCCCC; |
9 | padding: 3px 3px; | 9 | padding: 3px 3px; |
10 | width:calc(100% - 10px); | 10 | width:calc(100% - 10px); |
11 | - overflow:hidden; | ||
12 | } | 11 | } |
13 | 12 | ||
14 | .container .cm-card{ | 13 | .container .cm-card{ |
@@ -39,7 +38,7 @@ custom-class="config-dialog" | @@ -39,7 +38,7 @@ custom-class="config-dialog" | ||
39 | 38 | ||
40 | 39 | ||
41 | /*加载图标*/ | 40 | /*加载图标*/ |
42 | -.el-loading-spinner .icon-mj{ | 41 | +.el-loading-spinner .el-icon{ |
43 | width: 70px; | 42 | width: 70px; |
44 | height: 70px; | 43 | height: 70px; |
45 | background: url(../../../start/layui/css/modules/layer/default/loading-mj.png) no-repeat center; | 44 | background: url(../../../start/layui/css/modules/layer/default/loading-mj.png) no-repeat center; |
@@ -55,6 +55,72 @@ | @@ -55,6 +55,72 @@ | ||
55 | <ul class="icon_lists dib-box"> | 55 | <ul class="icon_lists dib-box"> |
56 | 56 | ||
57 | <li class="dib"> | 57 | <li class="dib"> |
58 | + <span class="icon iconfont"></span> | ||
59 | + <div class="name">虚拟桌面</div> | ||
60 | + <div class="code-name">&#xe613;</div> | ||
61 | + </li> | ||
62 | + | ||
63 | + <li class="dib"> | ||
64 | + <span class="icon iconfont"></span> | ||
65 | + <div class="name">堡垒机</div> | ||
66 | + <div class="code-name">&#xe63c;</div> | ||
67 | + </li> | ||
68 | + | ||
69 | + <li class="dib"> | ||
70 | + <span class="icon iconfont"></span> | ||
71 | + <div class="name">堡垒机sas</div> | ||
72 | + <div class="code-name">&#xe61a;</div> | ||
73 | + </li> | ||
74 | + | ||
75 | + <li class="dib"> | ||
76 | + <span class="icon iconfont"></span> | ||
77 | + <div class="name">堡垒机授权申请流程</div> | ||
78 | + <div class="code-name">&#xe657;</div> | ||
79 | + </li> | ||
80 | + | ||
81 | + <li class="dib"> | ||
82 | + <span class="icon iconfont"></span> | ||
83 | + <div class="name">虚拟桌面</div> | ||
84 | + <div class="code-name">&#xe63d;</div> | ||
85 | + </li> | ||
86 | + | ||
87 | + <li class="dib"> | ||
88 | + <span class="icon iconfont"></span> | ||
89 | + <div class="name">水坝b</div> | ||
90 | + <div class="code-name">&#xe905;</div> | ||
91 | + </li> | ||
92 | + | ||
93 | + <li class="dib"> | ||
94 | + <span class="icon iconfont"></span> | ||
95 | + <div class="name">虚拟桌面</div> | ||
96 | + <div class="code-name">&#xe675;</div> | ||
97 | + </li> | ||
98 | + | ||
99 | + <li class="dib"> | ||
100 | + <span class="icon iconfont"></span> | ||
101 | + <div class="name">滚水坝</div> | ||
102 | + <div class="code-name">&#xe614;</div> | ||
103 | + </li> | ||
104 | + | ||
105 | + <li class="dib"> | ||
106 | + <span class="icon iconfont"></span> | ||
107 | + <div class="name">线</div> | ||
108 | + <div class="code-name">&#xebde;</div> | ||
109 | + </li> | ||
110 | + | ||
111 | + <li class="dib"> | ||
112 | + <span class="icon iconfont"></span> | ||
113 | + <div class="name">line</div> | ||
114 | + <div class="code-name">&#xe7fd;</div> | ||
115 | + </li> | ||
116 | + | ||
117 | + <li class="dib"> | ||
118 | + <span class="icon iconfont"></span> | ||
119 | + <div class="name">路由器</div> | ||
120 | + <div class="code-name">&#xec62;</div> | ||
121 | + </li> | ||
122 | + | ||
123 | + <li class="dib"> | ||
58 | <span class="icon iconfont"></span> | 124 | <span class="icon iconfont"></span> |
59 | <div class="name">搜索</div> | 125 | <div class="name">搜索</div> |
60 | <div class="code-name">&#xe752;</div> | 126 | <div class="code-name">&#xe752;</div> |
@@ -498,9 +564,9 @@ | @@ -498,9 +564,9 @@ | ||
498 | <pre><code class="language-css" | 564 | <pre><code class="language-css" |
499 | >@font-face { | 565 | >@font-face { |
500 | font-family: 'iconfont'; | 566 | font-family: 'iconfont'; |
501 | - src: url('iconfont.woff2?t=1634540750988') format('woff2'), | ||
502 | - url('iconfont.woff?t=1634540750988') format('woff'), | ||
503 | - url('iconfont.ttf?t=1634540750988') format('truetype'); | 567 | + src: url('iconfont.woff2?t=1635930253141') format('woff2'), |
568 | + url('iconfont.woff?t=1635930253141') format('woff'), | ||
569 | + url('iconfont.ttf?t=1635930253141') format('truetype'); | ||
504 | } | 570 | } |
505 | </code></pre> | 571 | </code></pre> |
506 | <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> | 572 | <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> |
@@ -527,6 +593,105 @@ | @@ -527,6 +593,105 @@ | ||
527 | <ul class="icon_lists dib-box"> | 593 | <ul class="icon_lists dib-box"> |
528 | 594 | ||
529 | <li class="dib"> | 595 | <li class="dib"> |
596 | + <span class="icon iconfont icon-xunizhuomian"></span> | ||
597 | + <div class="name"> | ||
598 | + 虚拟桌面 | ||
599 | + </div> | ||
600 | + <div class="code-name">.icon-xunizhuomian | ||
601 | + </div> | ||
602 | + </li> | ||
603 | + | ||
604 | + <li class="dib"> | ||
605 | + <span class="icon iconfont icon-baoleiji"></span> | ||
606 | + <div class="name"> | ||
607 | + 堡垒机 | ||
608 | + </div> | ||
609 | + <div class="code-name">.icon-baoleiji | ||
610 | + </div> | ||
611 | + </li> | ||
612 | + | ||
613 | + <li class="dib"> | ||
614 | + <span class="icon iconfont icon-baoleijisas"></span> | ||
615 | + <div class="name"> | ||
616 | + 堡垒机sas | ||
617 | + </div> | ||
618 | + <div class="code-name">.icon-baoleijisas | ||
619 | + </div> | ||
620 | + </li> | ||
621 | + | ||
622 | + <li class="dib"> | ||
623 | + <span class="icon iconfont icon-baoleijishouquanshenqingliucheng"></span> | ||
624 | + <div class="name"> | ||
625 | + 堡垒机授权申请流程 | ||
626 | + </div> | ||
627 | + <div class="code-name">.icon-baoleijishouquanshenqingliucheng | ||
628 | + </div> | ||
629 | + </li> | ||
630 | + | ||
631 | + <li class="dib"> | ||
632 | + <span class="icon iconfont icon-xunizhuomian1"></span> | ||
633 | + <div class="name"> | ||
634 | + 虚拟桌面 | ||
635 | + </div> | ||
636 | + <div class="code-name">.icon-xunizhuomian1 | ||
637 | + </div> | ||
638 | + </li> | ||
639 | + | ||
640 | + <li class="dib"> | ||
641 | + <span class="icon iconfont icon-shuiba2"></span> | ||
642 | + <div class="name"> | ||
643 | + 水坝b | ||
644 | + </div> | ||
645 | + <div class="code-name">.icon-shuiba2 | ||
646 | + </div> | ||
647 | + </li> | ||
648 | + | ||
649 | + <li class="dib"> | ||
650 | + <span class="icon iconfont icon-xunizhuomian2"></span> | ||
651 | + <div class="name"> | ||
652 | + 虚拟桌面 | ||
653 | + </div> | ||
654 | + <div class="code-name">.icon-xunizhuomian2 | ||
655 | + </div> | ||
656 | + </li> | ||
657 | + | ||
658 | + <li class="dib"> | ||
659 | + <span class="icon iconfont icon-gunshuiba"></span> | ||
660 | + <div class="name"> | ||
661 | + 滚水坝 | ||
662 | + </div> | ||
663 | + <div class="code-name">.icon-gunshuiba | ||
664 | + </div> | ||
665 | + </li> | ||
666 | + | ||
667 | + <li class="dib"> | ||
668 | + <span class="icon iconfont icon-line1"></span> | ||
669 | + <div class="name"> | ||
670 | + 线 | ||
671 | + </div> | ||
672 | + <div class="code-name">.icon-line1 | ||
673 | + </div> | ||
674 | + </li> | ||
675 | + | ||
676 | + <li class="dib"> | ||
677 | + <span class="icon iconfont icon-line"></span> | ||
678 | + <div class="name"> | ||
679 | + line | ||
680 | + </div> | ||
681 | + <div class="code-name">.icon-line | ||
682 | + </div> | ||
683 | + </li> | ||
684 | + | ||
685 | + <li class="dib"> | ||
686 | + <span class="icon iconfont icon-luyouqi"></span> | ||
687 | + <div class="name"> | ||
688 | + 路由器 | ||
689 | + </div> | ||
690 | + <div class="code-name">.icon-luyouqi | ||
691 | + </div> | ||
692 | + </li> | ||
693 | + | ||
694 | + <li class="dib"> | ||
530 | <span class="icon iconfont icon-sousuo"></span> | 695 | <span class="icon iconfont icon-sousuo"></span> |
531 | <div class="name"> | 696 | <div class="name"> |
532 | 搜索 | 697 | 搜索 |
@@ -1194,6 +1359,94 @@ | @@ -1194,6 +1359,94 @@ | ||
1194 | 1359 | ||
1195 | <li class="dib"> | 1360 | <li class="dib"> |
1196 | <svg class="icon svg-icon" aria-hidden="true"> | 1361 | <svg class="icon svg-icon" aria-hidden="true"> |
1362 | + <use xlink:href="#icon-xunizhuomian"></use> | ||
1363 | + </svg> | ||
1364 | + <div class="name">虚拟桌面</div> | ||
1365 | + <div class="code-name">#icon-xunizhuomian</div> | ||
1366 | + </li> | ||
1367 | + | ||
1368 | + <li class="dib"> | ||
1369 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1370 | + <use xlink:href="#icon-baoleiji"></use> | ||
1371 | + </svg> | ||
1372 | + <div class="name">堡垒机</div> | ||
1373 | + <div class="code-name">#icon-baoleiji</div> | ||
1374 | + </li> | ||
1375 | + | ||
1376 | + <li class="dib"> | ||
1377 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1378 | + <use xlink:href="#icon-baoleijisas"></use> | ||
1379 | + </svg> | ||
1380 | + <div class="name">堡垒机sas</div> | ||
1381 | + <div class="code-name">#icon-baoleijisas</div> | ||
1382 | + </li> | ||
1383 | + | ||
1384 | + <li class="dib"> | ||
1385 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1386 | + <use xlink:href="#icon-baoleijishouquanshenqingliucheng"></use> | ||
1387 | + </svg> | ||
1388 | + <div class="name">堡垒机授权申请流程</div> | ||
1389 | + <div class="code-name">#icon-baoleijishouquanshenqingliucheng</div> | ||
1390 | + </li> | ||
1391 | + | ||
1392 | + <li class="dib"> | ||
1393 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1394 | + <use xlink:href="#icon-xunizhuomian1"></use> | ||
1395 | + </svg> | ||
1396 | + <div class="name">虚拟桌面</div> | ||
1397 | + <div class="code-name">#icon-xunizhuomian1</div> | ||
1398 | + </li> | ||
1399 | + | ||
1400 | + <li class="dib"> | ||
1401 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1402 | + <use xlink:href="#icon-shuiba2"></use> | ||
1403 | + </svg> | ||
1404 | + <div class="name">水坝b</div> | ||
1405 | + <div class="code-name">#icon-shuiba2</div> | ||
1406 | + </li> | ||
1407 | + | ||
1408 | + <li class="dib"> | ||
1409 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1410 | + <use xlink:href="#icon-xunizhuomian2"></use> | ||
1411 | + </svg> | ||
1412 | + <div class="name">虚拟桌面</div> | ||
1413 | + <div class="code-name">#icon-xunizhuomian2</div> | ||
1414 | + </li> | ||
1415 | + | ||
1416 | + <li class="dib"> | ||
1417 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1418 | + <use xlink:href="#icon-gunshuiba"></use> | ||
1419 | + </svg> | ||
1420 | + <div class="name">滚水坝</div> | ||
1421 | + <div class="code-name">#icon-gunshuiba</div> | ||
1422 | + </li> | ||
1423 | + | ||
1424 | + <li class="dib"> | ||
1425 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1426 | + <use xlink:href="#icon-line1"></use> | ||
1427 | + </svg> | ||
1428 | + <div class="name">线</div> | ||
1429 | + <div class="code-name">#icon-line1</div> | ||
1430 | + </li> | ||
1431 | + | ||
1432 | + <li class="dib"> | ||
1433 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1434 | + <use xlink:href="#icon-line"></use> | ||
1435 | + </svg> | ||
1436 | + <div class="name">line</div> | ||
1437 | + <div class="code-name">#icon-line</div> | ||
1438 | + </li> | ||
1439 | + | ||
1440 | + <li class="dib"> | ||
1441 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1442 | + <use xlink:href="#icon-luyouqi"></use> | ||
1443 | + </svg> | ||
1444 | + <div class="name">路由器</div> | ||
1445 | + <div class="code-name">#icon-luyouqi</div> | ||
1446 | + </li> | ||
1447 | + | ||
1448 | + <li class="dib"> | ||
1449 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
1197 | <use xlink:href="#icon-sousuo"></use> | 1450 | <use xlink:href="#icon-sousuo"></use> |
1198 | </svg> | 1451 | </svg> |
1199 | <div class="name">搜索</div> | 1452 | <div class="name">搜索</div> |
1 | @font-face { | 1 | @font-face { |
2 | font-family: "iconfont"; /* Project id 2843738 */ | 2 | font-family: "iconfont"; /* Project id 2843738 */ |
3 | - src: url('iconfont.woff2?t=1634540750988') format('woff2'), | ||
4 | - url('iconfont.woff?t=1634540750988') format('woff'), | ||
5 | - url('iconfont.ttf?t=1634540750988') format('truetype'); | 3 | + src: url('iconfont.woff2?t=1635930253141') format('woff2'), |
4 | + url('iconfont.woff?t=1635930253141') format('woff'), | ||
5 | + url('iconfont.ttf?t=1635930253141') format('truetype'); | ||
6 | } | 6 | } |
7 | 7 | ||
8 | .iconfont { | 8 | .iconfont { |
@@ -13,6 +13,50 @@ | @@ -13,6 +13,50 @@ | ||
13 | -moz-osx-font-smoothing: grayscale; | 13 | -moz-osx-font-smoothing: grayscale; |
14 | } | 14 | } |
15 | 15 | ||
16 | +.icon-xunizhuomian:before { | ||
17 | + content: "\e613"; | ||
18 | +} | ||
19 | + | ||
20 | +.icon-baoleiji:before { | ||
21 | + content: "\e63c"; | ||
22 | +} | ||
23 | + | ||
24 | +.icon-baoleijisas:before { | ||
25 | + content: "\e61a"; | ||
26 | +} | ||
27 | + | ||
28 | +.icon-baoleijishouquanshenqingliucheng:before { | ||
29 | + content: "\e657"; | ||
30 | +} | ||
31 | + | ||
32 | +.icon-xunizhuomian1:before { | ||
33 | + content: "\e63d"; | ||
34 | +} | ||
35 | + | ||
36 | +.icon-shuiba2:before { | ||
37 | + content: "\e905"; | ||
38 | +} | ||
39 | + | ||
40 | +.icon-xunizhuomian2:before { | ||
41 | + content: "\e675"; | ||
42 | +} | ||
43 | + | ||
44 | +.icon-gunshuiba:before { | ||
45 | + content: "\e614"; | ||
46 | +} | ||
47 | + | ||
48 | +.icon-line1:before { | ||
49 | + content: "\ebde"; | ||
50 | +} | ||
51 | + | ||
52 | +.icon-line:before { | ||
53 | + content: "\e7fd"; | ||
54 | +} | ||
55 | + | ||
56 | +.icon-luyouqi:before { | ||
57 | + content: "\ec62"; | ||
58 | +} | ||
59 | + | ||
16 | .icon-sousuo:before { | 60 | .icon-sousuo:before { |
17 | content: "\e752"; | 61 | content: "\e752"; |
18 | } | 62 | } |
This diff could not be displayed because it is too large.
@@ -6,6 +6,83 @@ | @@ -6,6 +6,83 @@ | ||
6 | "description": "", | 6 | "description": "", |
7 | "glyphs": [ | 7 | "glyphs": [ |
8 | { | 8 | { |
9 | + "icon_id": "4675111", | ||
10 | + "name": "虚拟桌面", | ||
11 | + "font_class": "xunizhuomian", | ||
12 | + "unicode": "e613", | ||
13 | + "unicode_decimal": 58899 | ||
14 | + }, | ||
15 | + { | ||
16 | + "icon_id": "7556320", | ||
17 | + "name": "堡垒机", | ||
18 | + "font_class": "baoleiji", | ||
19 | + "unicode": "e63c", | ||
20 | + "unicode_decimal": 58940 | ||
21 | + }, | ||
22 | + { | ||
23 | + "icon_id": "9018063", | ||
24 | + "name": "堡垒机sas", | ||
25 | + "font_class": "baoleijisas", | ||
26 | + "unicode": "e61a", | ||
27 | + "unicode_decimal": 58906 | ||
28 | + }, | ||
29 | + { | ||
30 | + "icon_id": "9344245", | ||
31 | + "name": "堡垒机授权申请流程", | ||
32 | + "font_class": "baoleijishouquanshenqingliucheng", | ||
33 | + "unicode": "e657", | ||
34 | + "unicode_decimal": 58967 | ||
35 | + }, | ||
36 | + { | ||
37 | + "icon_id": "9865796", | ||
38 | + "name": "虚拟桌面", | ||
39 | + "font_class": "xunizhuomian1", | ||
40 | + "unicode": "e63d", | ||
41 | + "unicode_decimal": 58941 | ||
42 | + }, | ||
43 | + { | ||
44 | + "icon_id": "11439036", | ||
45 | + "name": "水坝b", | ||
46 | + "font_class": "shuiba2", | ||
47 | + "unicode": "e905", | ||
48 | + "unicode_decimal": 59653 | ||
49 | + }, | ||
50 | + { | ||
51 | + "icon_id": "25091142", | ||
52 | + "name": "虚拟桌面", | ||
53 | + "font_class": "xunizhuomian2", | ||
54 | + "unicode": "e675", | ||
55 | + "unicode_decimal": 58997 | ||
56 | + }, | ||
57 | + { | ||
58 | + "icon_id": "25132617", | ||
59 | + "name": "滚水坝", | ||
60 | + "font_class": "gunshuiba", | ||
61 | + "unicode": "e614", | ||
62 | + "unicode_decimal": 58900 | ||
63 | + }, | ||
64 | + { | ||
65 | + "icon_id": "19710217", | ||
66 | + "name": "线", | ||
67 | + "font_class": "line1", | ||
68 | + "unicode": "ebde", | ||
69 | + "unicode_decimal": 60382 | ||
70 | + }, | ||
71 | + { | ||
72 | + "icon_id": "4767098", | ||
73 | + "name": "line", | ||
74 | + "font_class": "line", | ||
75 | + "unicode": "e7fd", | ||
76 | + "unicode_decimal": 59389 | ||
77 | + }, | ||
78 | + { | ||
79 | + "icon_id": "5961324", | ||
80 | + "name": "路由器", | ||
81 | + "font_class": "luyouqi", | ||
82 | + "unicode": "ec62", | ||
83 | + "unicode_decimal": 60514 | ||
84 | + }, | ||
85 | + { | ||
9 | "icon_id": "577365", | 86 | "icon_id": "577365", |
10 | "name": "搜索", | 87 | "name": "搜索", |
11 | "font_class": "sousuo", | 88 | "font_class": "sousuo", |
No preview for this file type
No preview for this file type
No preview for this file type
hg-monitor-web-base/src/main/resources/static/vue3/public/lib/element-plus/index-icon.css
0 → 100644
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -101,7 +101,7 @@ | @@ -101,7 +101,7 @@ | ||
101 | </el-link> | 101 | </el-link> |
102 | <br/> | 102 | <br/> |
103 | <el-link type="info" :underline="false" @click="reNameFile(file,false)" > | 103 | <el-link type="info" :underline="false" @click="reNameFile(file,false)" > |
104 | - <span v-if="!reNameFileFlg[file.id]">{{file.fileName}}</span> | 104 | + <div v-if="!reNameFileFlg[file.id]" style="width: 120px;overflow: hidden;text-overflow: ellipsis;text-align: left;">{{file.fileName}}</div> |
105 | <el-input :autofocus="true" v-if="reNameFileFlg[file.id]" placeholder="输入文件名" v-model="file.fileName" @blur="reNameFile(file,true)"></el-input> | 105 | <el-input :autofocus="true" v-if="reNameFileFlg[file.id]" placeholder="输入文件名" v-model="file.fileName" @blur="reNameFile(file,true)"></el-input> |
106 | </el-link> | 106 | </el-link> |
107 | </div> | 107 | </div> |
@@ -150,7 +150,7 @@ export default { | @@ -150,7 +150,7 @@ export default { | ||
150 | 150 | ||
151 | getPage(id); | 151 | getPage(id); |
152 | } else { | 152 | } else { |
153 | - proxy.$global.viewer(item.localPath); | 153 | + proxy.$global.viewer(item.localPath,proxy); |
154 | } | 154 | } |
155 | } | 155 | } |
156 | 156 | ||
@@ -373,6 +373,7 @@ export default { | @@ -373,6 +373,7 @@ export default { | ||
373 | params.pid = currentNodeData.value.id; | 373 | params.pid = currentNodeData.value.id; |
374 | 374 | ||
375 | if(isUserFolder.value){ | 375 | if(isUserFolder.value){ |
376 | + params.id=""; | ||
376 | params.docNo="user"; | 377 | params.docNo="user"; |
377 | params.type="user"; | 378 | params.type="user"; |
378 | } | 379 | } |
@@ -555,6 +556,10 @@ export default { | @@ -555,6 +556,10 @@ export default { | ||
555 | if(type == 'folder'){ | 556 | if(type == 'folder'){ |
556 | url = `/inspection-report/file/rename/user`; | 557 | url = `/inspection-report/file/rename/user`; |
557 | } | 558 | } |
559 | + if(item.fileName == null || item.fileName == '' ){ | ||
560 | + proxy.$global.showMsg("文件名称不能为空!","warning"); | ||
561 | + return; | ||
562 | + } | ||
558 | // 执行改名 | 563 | // 执行改名 |
559 | proxy.$http.get(url, {id:item.id,name:item.fileName}, function (res) { | 564 | proxy.$http.get(url, {id:item.id,name:item.fileName}, function (res) { |
560 | if (res && res.success) { | 565 | if (res && res.success) { |
@@ -11,10 +11,12 @@ | @@ -11,10 +11,12 @@ | ||
11 | <slot :row="scope.row" :prop="item.prop" :column="item"> | 11 | <slot :row="scope.row" :prop="item.prop" :column="item"> |
12 | <div v-if="typeof(item.render) == 'function'" > | 12 | <div v-if="typeof(item.render) == 'function'" > |
13 | <div v-if="typeof(item.click) == 'function'"> | 13 | <div v-if="typeof(item.click) == 'function'"> |
14 | - <el-link :type="linkType" :underline="isLink" @click="item.click(scope.row)" v-html="item.render(scope.row)"></el-link> | 14 | + <!--<el-link :type="linkType" :underline="isLink" @click="item.click(scope.row)" v-html="item.render(scope.row)"></el-link>--> |
15 | + <span @click="item.click(scope.row)" v-html="item.render(scope.row)"></span> | ||
15 | </div> | 16 | </div> |
16 | <div v-else> | 17 | <div v-else> |
17 | - <el-link :type="linkType" :underline="isLink" v-html="item.render(scope.row)"></el-link> | 18 | + <!-- <el-link :type="linkType" :underline="isLink" v-html="item.render(scope.row)"></el-link>--> |
19 | + <span v-html="item.render(scope.row)"></span> | ||
18 | </div> | 20 | </div> |
19 | </div> | 21 | </div> |
20 | <span v-else> | 22 | <span v-else> |
@@ -72,16 +72,7 @@ export default { | @@ -72,16 +72,7 @@ export default { | ||
72 | type: Boolean, | 72 | type: Boolean, |
73 | default: false | 73 | default: false |
74 | }, | 74 | }, |
75 | - // 是否展示链接 | ||
76 | - isLink:{ | ||
77 | - type: Boolean, | ||
78 | - default: false | ||
79 | - }, | ||
80 | - // 是否展示链接 | ||
81 | - linkType:{ | ||
82 | - type: String, | ||
83 | - default: 'primary' | ||
84 | - }, | 75 | + |
85 | }, | 76 | }, |
86 | data() { | 77 | data() { |
87 | return {} | 78 | return {} |
@@ -34,6 +34,7 @@ | @@ -34,6 +34,7 @@ | ||
34 | :before-upload="beforeUpload" | 34 | :before-upload="beforeUpload" |
35 | :multiple="false" | 35 | :multiple="false" |
36 | :http-request="getInsetFile" | 36 | :http-request="getInsetFile" |
37 | + :on-change="fileChange" | ||
37 | :auto-upload="true"> | 38 | :auto-upload="true"> |
38 | <el-button size="small" type="primary">上传照片</el-button> | 39 | <el-button size="small" type="primary">上传照片</el-button> |
39 | </el-upload> | 40 | </el-upload> |
@@ -120,6 +120,7 @@ export default { | @@ -120,6 +120,7 @@ export default { | ||
120 | category:props.category, | 120 | category:props.category, |
121 | docNo:props.docNo | 121 | docNo:props.docNo |
122 | } | 122 | } |
123 | +debugger | ||
123 | // 上传文件 | 124 | // 上传文件 |
124 | proxy.$http.uploadFile("/inspection-report/file/upload", params, function (res) { | 125 | proxy.$http.uploadFile("/inspection-report/file/upload", params, function (res) { |
125 | if (res && res.code == 0) { | 126 | if (res && res.code == 0) { |
@@ -131,6 +132,11 @@ export default { | @@ -131,6 +132,11 @@ export default { | ||
131 | }) | 132 | }) |
132 | } | 133 | } |
133 | 134 | ||
135 | + let fileChange = (file, fileList) =>{ | ||
136 | +debugger | ||
137 | + console.log(file, fileList); | ||
138 | + } | ||
139 | + | ||
134 | // 上传按钮点击 | 140 | // 上传按钮点击 |
135 | let uploadFile = () => { | 141 | let uploadFile = () => { |
136 | proxy.$refs.upload.submit() | 142 | proxy.$refs.upload.submit() |
@@ -167,7 +173,8 @@ export default { | @@ -167,7 +173,8 @@ export default { | ||
167 | show, | 173 | show, |
168 | uploadFile, | 174 | uploadFile, |
169 | hidedialog, | 175 | hidedialog, |
170 | - beforeUpload | 176 | + beforeUpload, |
177 | + fileChange | ||
171 | } | 178 | } |
172 | } | 179 | } |
173 | } | 180 | } |
@@ -19,7 +19,7 @@ global.showLoading = (callback) => { | @@ -19,7 +19,7 @@ global.showLoading = (callback) => { | ||
19 | const loading = ElementPlus.ElLoading.service({ | 19 | const loading = ElementPlus.ElLoading.service({ |
20 | lock: true, | 20 | lock: true, |
21 | text: '', | 21 | text: '', |
22 | - spinner: 'icon-mj', | 22 | + spinner: ' ', |
23 | background: 'rgba(0, 0, 0, 0.7)', | 23 | background: 'rgba(0, 0, 0, 0.7)', |
24 | }); | 24 | }); |
25 | 25 | ||
@@ -123,8 +123,14 @@ global.getQueryVariable = (variable) => { | @@ -123,8 +123,14 @@ global.getQueryVariable = (variable) => { | ||
123 | * 文件预览 | 123 | * 文件预览 |
124 | * @param path | 124 | * @param path |
125 | */ | 125 | */ |
126 | -global.viewer = (path) =>{ | ||
127 | - window.open("/src/lib/extend/pdfjs/web/viewer.html?test=" + encodeURIComponent(path)); | 126 | +global.viewer = (path,proxy) =>{ |
127 | + proxy.$http.get(`/api-web/openoffice/convertPdf/?path=${encodeURIComponent(path)}`, {}, function (res) { | ||
128 | + if (res && res.success) { | ||
129 | + window.open("/src/lib/extend/pdfjs/web/viewer.html?test=" + encodeURIComponent(res.str)); | ||
130 | + } else { | ||
131 | + global.showMsg(data.msg,"error") | ||
132 | + } | ||
133 | + }) | ||
128 | } | 134 | } |
129 | 135 | ||
130 | /** | 136 | /** |
1 | +layui.define(['commonDetail','common', 'admin'], function (exports) { | ||
2 | + var $ = layui.$; | ||
3 | + var commonDetail = layui.commonDetail; | ||
4 | + var common = layui.common; | ||
5 | + var admin = layui.admin; | ||
6 | + //对外暴露的接口 | ||
7 | + exports('arms', function (data) { | ||
8 | + var resId = ''; | ||
9 | + var resType = ''; | ||
10 | + var os = ''; | ||
11 | + var domainName = common.domainName; | ||
12 | + var showFlag = common.getUrlParam("show"); | ||
13 | + if(showFlag && showFlag == '0'){ | ||
14 | + resId = common.getUrlParam("resId"); | ||
15 | + resType = common.getUrlParam("resType"); | ||
16 | + os = common.getUrlParam("os"); | ||
17 | + }else{ | ||
18 | + resId = data.resId; | ||
19 | + resType = data.resType; | ||
20 | + os = data.os; | ||
21 | + } | ||
22 | + | ||
23 | + //基本信息 | ||
24 | + var jbxxKpi = "KPIE13DD9A3,KPIF74D9D2B"; | ||
25 | + | ||
26 | + commonDetail.bindTips(); | ||
27 | + | ||
28 | + renderPageInfo() | ||
29 | + | ||
30 | + //渲染页面 | ||
31 | + function renderPageInfo() { | ||
32 | + //资源状态 | ||
33 | + commonDetail.renderResHealth("arms_health_state", resId); | ||
34 | + //基本信息 | ||
35 | + commonDetail.renderText("arms_baseinfo", resId, jbxxKpi, null, null, null, "true"); | ||
36 | + | ||
37 | + //GC瞬时次数/每分钟 | ||
38 | + dataRenderingBase("arms_frequency_lineChart", resId, "KPIB30309CF,KPI6AFFCBDB", "GC瞬时次数/每分钟", null); | ||
39 | + // //GC瞬时耗时/每分钟 | ||
40 | + dataRenderingBase("arms_elapsed_lineChart", resId, "KPI5769F327,KPI8B2CCCCF", "GC瞬时耗时/每分钟", null); | ||
41 | + // //堆内存详情/每分钟 | ||
42 | + dataRenderingBase("arms_JVM_memory_lineChart", resId, "KPI5C214A8F,KPI14BD24A7,KPI206706E5", "堆内存详情/每分钟", null); | ||
43 | + // //非堆内存/每分钟 | ||
44 | + dataRenderingBase("arms_NOJVN_memory_lineChart", resId, "KPIA751DDD7,KPIB0C32458,KPIBEA62DAA,KPID346BB6F", "非堆内存/每分钟", null); | ||
45 | + // //直接缓冲区/每分钟 | ||
46 | + dataRenderingBase("arms_cacheRegion_lineChart", resId, "KPIBAD64951,KPIA80D93D8", "直接缓冲区/每分钟", null); | ||
47 | + // //JVM线程数/每分钟 | ||
48 | + dataRenderingBase("arms_JVM_threadCount_lineChart", resId, "KPI7C4BEB26,KPI97B71BAA,KPI15EC2627,KPIA9E2E4DE,KPI068D9FA5,KPI6ECA9036,KPI328E5AFE,KPI8F8FAD7F", "JVM线程数/每分钟", null, 1); | ||
49 | + | ||
50 | + //活动告警 | ||
51 | + commonDetail.renderActiveAlarms("arms_active_alram", resId); | ||
52 | + } | ||
53 | + | ||
54 | + //折线图数据渲染及页面设置 | ||
55 | + function dataRenderingBase(id, resId, kpiId, title, flag) { | ||
56 | + var dataList = {}; | ||
57 | + var item = {}; | ||
58 | + var other = {}; | ||
59 | + item.legend = {}; | ||
60 | + item.x = {}; | ||
61 | + item.y = {}; | ||
62 | + //获取数据 | ||
63 | + admin.req({ | ||
64 | + url: domainName + '/api-web/details/getBase', | ||
65 | + data: { | ||
66 | + resId: resId, | ||
67 | + kpiIds: kpiId, | ||
68 | + } | ||
69 | + }).done(function (response) { | ||
70 | + if (response.success && !response.msg) {//有数据 | ||
71 | + dataList.legend = response.map.legend; | ||
72 | + dataList.x = response.map.x; | ||
73 | + if (response.map.y != null && response.map.y.length === 1) { | ||
74 | + dataList.y = response.map.y; | ||
75 | + } else { | ||
76 | + var series=[]; | ||
77 | + $.each(response.map.y, function (i, v) { | ||
78 | + var lineIndex = Math.ceil(Math.random() * 6); | ||
79 | + var item = { | ||
80 | + name:dataList.legend[i], | ||
81 | + stack:'Total', | ||
82 | + type: 'line', | ||
83 | + emphasis: { | ||
84 | + focus: 'series' | ||
85 | + }, | ||
86 | + itemStyle: { | ||
87 | + normal: { | ||
88 | + color: common.colorsArr[i%6].start | ||
89 | + } | ||
90 | + }, | ||
91 | + data: v, | ||
92 | + }; | ||
93 | + series.push(item); | ||
94 | + }); | ||
95 | + other["series"]=series; | ||
96 | + } | ||
97 | + initLinChart(id, resId, kpiId, title, flag, dataList, other); | ||
98 | + } else {//无数据 | ||
99 | + //初始化数据 | ||
100 | + } | ||
101 | + }); | ||
102 | + //页面渲染 | ||
103 | + return {item, other} | ||
104 | + } | ||
105 | + //初始化折线图 | ||
106 | + function initLinChart(id, resId, kpiId, title, flag, data, other) { | ||
107 | + //初始化echarts | ||
108 | + var myChart = echarts.init(document.getElementById(id)); | ||
109 | + | ||
110 | + //初始化配置option | ||
111 | + var option; | ||
112 | + option = { | ||
113 | + legend: {//设置图表图例 | ||
114 | + data: data.legend, | ||
115 | + }, | ||
116 | + tooltip: { | ||
117 | + trigger: 'axis', | ||
118 | + }, | ||
119 | + toolbox: { | ||
120 | + feature: { | ||
121 | + saveAsImage: {} | ||
122 | + } | ||
123 | + }, | ||
124 | + xAxis: {//X轴数据 | ||
125 | + type: 'category', | ||
126 | + boundaryGap: false, | ||
127 | + data: data.x, | ||
128 | + }, | ||
129 | + yAxis: {//设置提示 | ||
130 | + type: 'value' | ||
131 | + }, | ||
132 | + grid: { //直角坐标系内绘图网格 | ||
133 | + left: '3%', | ||
134 | + right: '4%', | ||
135 | + bottom: '3%', | ||
136 | + containLabel: true | ||
137 | + }, | ||
138 | + series: [//y轴数据 | ||
139 | + { | ||
140 | + data: data.y?data.y:{}, | ||
141 | + type: 'line', | ||
142 | + smooth: true | ||
143 | + } | ||
144 | + ] | ||
145 | + }; | ||
146 | + //获取传入option对象 | ||
147 | + var keys = Object.keys(other); | ||
148 | + //替换option属性 | ||
149 | + keys.forEach(item => { | ||
150 | + option[item]=other[item]; | ||
151 | + }); | ||
152 | + option && myChart.setOption(option); | ||
153 | + } | ||
154 | + | ||
155 | + | ||
156 | + //定时任务 | ||
157 | + var timer = setInterval(function () { | ||
158 | + renderPageInfo() | ||
159 | + },commonDetail.timerTime); | ||
160 | + commonDetail.detailTimer.push(timer); | ||
161 | + }); | ||
162 | +}); |
1 | +<!--arms详细页面--> | ||
2 | +<article class="page-container template"> | ||
3 | + <div class="page-panel"> | ||
4 | + <div class="main"> | ||
5 | + <div class="layui-card template_detail_content"> | ||
6 | + <div class="layui-card-body"> | ||
7 | + <div class="lay-row"> | ||
8 | + <div class="lay-row-item"> | ||
9 | + <h5 class="lay-row-title">资源状态</h5> | ||
10 | + <div class="res-state" id="arms_health_state"></div> | ||
11 | + </div> | ||
12 | + <div class="lay-row-item"> | ||
13 | + <h5 class="lay-row-title">堆内存详情/每分钟</h5> | ||
14 | + <div id="arms_JVM_memory_lineChart" class="detail_line_chart"></div> | ||
15 | + </div> | ||
16 | + <div class="lay-row-item"> | ||
17 | + <h5 class="lay-row-title">JVM线程数/每分钟</h5> | ||
18 | + <div id="arms_JVM_threadCount_lineChart" class="detail_line_chart"></div> | ||
19 | + </div> | ||
20 | + </div> | ||
21 | + <div class="lay-row"> | ||
22 | + <div class="lay-row-item"> | ||
23 | + <h5 class="lay-row-title">GC瞬时次数/每分钟</h5> | ||
24 | + <div id="arms_frequency_lineChart" class="detail_line_chart"></div> | ||
25 | + </div> | ||
26 | + <div class="lay-row-item"> | ||
27 | + <h5 class="lay-row-title">GC瞬时耗时/每分钟</h5> | ||
28 | + <div id="arms_elapsed_lineChart" class="detail_line_chart"></div> | ||
29 | + </div> | ||
30 | + <div class="lay-row-item"> | ||
31 | + <h5 class="lay-row-title">非堆内存/每分钟</h5> | ||
32 | + <div id="arms_NOJVN_memory_lineChart" class="detail_line_chart"></div> | ||
33 | + </div> | ||
34 | + <div class="lay-row-item"> | ||
35 | + <h5 class="lay-row-title">直接缓冲区/每分钟</h5> | ||
36 | + <div id="arms_cacheRegion_lineChart" class="detail_line_chart"></div> | ||
37 | + </div> | ||
38 | + </div> | ||
39 | + <div class="lay-row"> | ||
40 | + <div class="lay-row-item"> | ||
41 | + <h5 class="lay-row-title">实时告警动态</h5> | ||
42 | + <div id="arms_active_alram"></div> | ||
43 | + </div> | ||
44 | + </div> | ||
45 | + </div> | ||
46 | + </div> | ||
47 | + </div> | ||
48 | + </div> | ||
49 | +</article> | ||
50 | +<textarea id="arms_param_id" style="display: none;">{{d}}</textarea> | ||
51 | +<script> | ||
52 | + layui.use('arms', function (fn) { | ||
53 | + var $ = layui.$; | ||
54 | + var parm = $("#arms_param_id").val(); | ||
55 | + if(parm.indexOf('{{d') != -1){ | ||
56 | + fn(); | ||
57 | + }else{ | ||
58 | + fn(JSON.parse(parm)); | ||
59 | + } | ||
60 | + }); | ||
61 | +</script> |
1 | /* 属性配置 -- start */ | 1 | /* 属性配置 -- start */ |
2 | -.assets-configmanager { | ||
3 | - padding: 6px 3px; | ||
4 | - background: white; | 2 | +.form-post { |
3 | + width: 100%; | ||
5 | } | 4 | } |
6 | -.col-class{ | ||
7 | - background: white; | ||
8 | - padding: 10px; | ||
9 | - margin: 5px; | 5 | + |
6 | +/* 属性配置 -- end */ | ||
7 | + | ||
8 | +.yfyw-user { | ||
9 | + padding-top: 6px; | ||
10 | + width: 99%; | ||
10 | } | 11 | } |
11 | -.yes{ | ||
12 | - color: green; | 12 | + |
13 | +.yfyw-user .title{ | ||
14 | + font-weight: bold;text-align: left;padding-left: 40px;margin-bottom: 6px | ||
13 | } | 15 | } |
14 | -.no{ | ||
15 | - color: red; | 16 | + |
17 | +.yfyw-user .form-class { | ||
18 | + margin-bottom: 0px !important; | ||
16 | } | 19 | } |
17 | -.assets-configmanagers { | ||
18 | - background: #F0F0F0; | 20 | + |
21 | +.yfyw-user .el-form--label-top .el-form-item__label { | ||
22 | + padding: 0px !important; | ||
23 | + line-height: 20px !important; | ||
19 | } | 24 | } |
20 | -.assets-configmanager .config-tools { | 25 | + |
26 | +.yfyw-user .el-form-item__content { | ||
21 | text-align: left; | 27 | text-align: left; |
22 | - margin-left: 2%; | ||
23 | - margin-bottom: 6px; | 28 | + width: 300px; |
24 | } | 29 | } |
25 | 30 | ||
26 | -.assets-configmanagers .tbl-header-class { | ||
27 | - color: #1E9FFF; | ||
28 | - font-weight: bold; | 31 | +.yfyw-user .el-input__inner, .el-textarea__inner { |
32 | + border: none; | ||
33 | + border-bottom: solid 1px #DCDFE6; | ||
34 | + border-bottom-left-radius: 0; | ||
35 | + border-bottom-right-radius: 0; | ||
29 | } | 36 | } |
30 | 37 | ||
31 | -.assets-configmanagers .tbl-header-class th { | ||
32 | - background: #EBF5F9 !important; | ||
33 | - text-align: center; | 38 | +.yfyw-user .el-form-item__content .el-date-editor--date { |
39 | + width: 300px; | ||
34 | } | 40 | } |
35 | 41 | ||
36 | -.assets-configmanagers .tbl-header-class th .cell { | ||
37 | - text-align: center !important; | 42 | +.yfyw-user .form-textarea .el-form-item__content { |
43 | + width: 90%; | ||
38 | } | 44 | } |
39 | 45 | ||
40 | -.assets-configmanager .el-table__row td{ | ||
41 | - padding: 2px 0px;!important; | ||
42 | - text-align: center; | 46 | +.yfyw-user .zc-view { |
47 | + display: flex; | ||
48 | + flex-wrap: nowrap; | ||
49 | + flex-direction: row; | ||
50 | + padding-left: 40px; | ||
51 | + border-bottom: solid 1px #DCDFE6; | ||
43 | } | 52 | } |
44 | -.form-class{ | ||
45 | - margin-bottom: 50px!important; | 53 | + |
54 | +.yfyw-user .zc-view .zc-img { | ||
55 | + width: 120px; | ||
56 | + padding: 3px; | ||
57 | +} | ||
58 | + | ||
59 | +.yfyw-user .zc-view .zc-img i { | ||
60 | + font-size: 100px | ||
61 | +} | ||
62 | + | ||
63 | +.yfyw-user .zc-view .zc-info { | ||
64 | + width: calc(100% - 120px); | ||
65 | + text-align: left; | ||
66 | +} | ||
67 | + | ||
68 | +.yfyw-user .zc-view .zc-item { | ||
69 | + display: flex; | ||
70 | + flex-wrap: wrap | ||
71 | +} | ||
72 | + | ||
73 | +.yfyw-user .zc-view .zc-item .zc-item-label { | ||
74 | + width: 33%; | ||
75 | + line-height: 30px | ||
76 | +} | ||
77 | + | ||
78 | +.yfyw-user .zc-view .zc-item .zc-item-label .zc-item-label-left { | ||
79 | + width: 200px; | ||
80 | + font-weight: bold; | ||
81 | + text-align: right | ||
82 | +} | ||
83 | + | ||
84 | +.yfyw-user .zc-view .zc-item .zc-item-label .zc-item-label-right { | ||
85 | + width: 200px; | ||
86 | + text-align: left; | ||
87 | + padding-left: 3px | ||
88 | +} | ||
89 | + | ||
90 | +.yfyw-user .zc-view .zc-info .zc-item-tools { | ||
91 | + text-align: right; | ||
92 | + padding: 3px | ||
46 | } | 93 | } |
47 | -/* 属性配置 -- end */ |
@@ -6,4 +6,16 @@ | @@ -6,4 +6,16 @@ | ||
6 | :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" | 6 | :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" |
7 | :showPage="true" :height="height" :pageSize="pageSize"></cm-table-page> | 7 | :showPage="true" :height="height" :pageSize="pageSize"></cm-table-page> |
8 | </div> | 8 | </div> |
9 | + <cm-dialog :title="title" width="80%" :showDialogVisible="dialogFlg" @hidedialog="showDialog" :showFooter="false"> | ||
10 | + <template v-slot> | ||
11 | + <div v-if="componentName && componentName != ''"> | ||
12 | + <component v-bind:is="componentName" | ||
13 | + :docType="docType" | ||
14 | + height="500" | ||
15 | + :docTypeName="docTypeName" | ||
16 | + :pageSize="pageSize" | ||
17 | + :treeNode="treeNode" :parentNode="parentNode" :projectId="projectId"></component> | ||
18 | + </div> | ||
19 | + </template> | ||
20 | + </cm-dialog> | ||
9 | </div> | 21 | </div> |
1 | export default { | 1 | export default { |
2 | name: 'projectUserIndex', | 2 | name: 'projectUserIndex', |
3 | template: '', | 3 | template: '', |
4 | - components: {}, | 4 | + components: { |
5 | + // 人员信息 | ||
6 | + 'USER': Vue.defineAsyncComponent( | ||
7 | + () => myImport('components/page/operationMaintenance/user/index') | ||
8 | + ), | ||
9 | + //文档 | ||
10 | + // 个人保密协议(THREE_PERSONAGE_NDA) | ||
11 | + // 月度总结 THREE_MONTHLY_SUMMARY | ||
12 | + // 月报 FOUR_MONTHLY | ||
13 | + // 考勤记录 FOUR_CHECKING_IN | ||
14 | + // 健康检查报告 FOUR_HEALTH | ||
15 | + // 文档资料 TWO_DOCUMENT_MATERIAL | ||
16 | + // 项目保密协议 TWO_NDA | ||
17 | + 'DOCUMENT': Vue.defineAsyncComponent( | ||
18 | + () => myImport('components/page/operationMaintenance/doc/index') | ||
19 | + ), | ||
20 | + }, | ||
5 | data() { | 21 | data() { |
6 | return {} | 22 | return {} |
7 | }, | 23 | }, |
@@ -26,16 +42,29 @@ export default { | @@ -26,16 +42,29 @@ export default { | ||
26 | type: Number, | 42 | type: Number, |
27 | default: 10 | 43 | default: 10 |
28 | }, | 44 | }, |
45 | + | ||
29 | }, | 46 | }, |
30 | setup(props, {attrs, slots, emit}) { | 47 | setup(props, {attrs, slots, emit}) { |
31 | 48 | ||
32 | const {proxy} = Vue.getCurrentInstance(); | 49 | const {proxy} = Vue.getCurrentInstance(); |
33 | 50 | ||
51 | + let title = Vue.ref(''); | ||
52 | + let docType = Vue.ref(''); | ||
53 | + let docTypeName = Vue.ref(''); | ||
54 | + let componentName = Vue.ref(''); | ||
55 | + let dialogFlg = Vue.ref(false); | ||
56 | + | ||
34 | 57 | ||
35 | let columns = Vue.ref([{ | 58 | let columns = Vue.ref([{ |
36 | prop: 'nickname', | 59 | prop: 'nickname', |
37 | label: '运维人员姓名', | 60 | label: '运维人员姓名', |
38 | sortable: true, | 61 | sortable: true, |
62 | + click: function (row) { | ||
63 | + // 点击弹框展示人员信息 | ||
64 | + title.value = "人员信息"; | ||
65 | + componentName.value = "USER"; | ||
66 | + showDialog(true); | ||
67 | + } | ||
39 | }, { | 68 | }, { |
40 | prop: 'phone', | 69 | prop: 'phone', |
41 | label: '联系电话', | 70 | label: '联系电话', |
@@ -72,9 +101,16 @@ export default { | @@ -72,9 +101,16 @@ export default { | ||
72 | label: '个人信息', | 101 | label: '个人信息', |
73 | sortable: true, | 102 | sortable: true, |
74 | width: '180px', | 103 | width: '180px', |
104 | + click: function (row) { | ||
105 | + // 点击弹框展示 个人信息 | ||
106 | + title.value = "个人信息"; | ||
107 | + componentName.value = "USER"; | ||
108 | + props.parentNode.id = row.id; | ||
109 | + showDialog(true); | ||
110 | + }, | ||
75 | render: function (row) { | 111 | render: function (row) { |
76 | if (row.personalMessage == "YES") { | 112 | if (row.personalMessage == "YES") { |
77 | - return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`; | 113 | + return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;color:#409EFF"></i><span></span>`; |
78 | } else { | 114 | } else { |
79 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; | 115 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; |
80 | } | 116 | } |
@@ -82,12 +118,20 @@ export default { | @@ -82,12 +118,20 @@ export default { | ||
82 | 118 | ||
83 | }, { | 119 | }, { |
84 | prop: 'personalSecrecyBook', | 120 | prop: 'personalSecrecyBook', |
85 | - label: '个人保密协议书', | 121 | + label: '入场资料', |
86 | sortable: true, | 122 | sortable: true, |
87 | width: '180px', | 123 | width: '180px', |
124 | + click: function (row) { | ||
125 | + // 点击弹框展示 个人保密协议书 | ||
126 | + title.value = "入场资料"; | ||
127 | + componentName.value = "DOCUMENT"; | ||
128 | + docType.value = "THREE_PERSONAGE_NDA"; | ||
129 | + docTypeName.value = "入场资料"; | ||
130 | + showDialog(true); | ||
131 | + }, | ||
88 | render: function (row) { | 132 | render: function (row) { |
89 | if (row.personalSecrecyBook == "YES") { | 133 | if (row.personalSecrecyBook == "YES") { |
90 | - return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`; | 134 | + return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;color:#409EFF"></i><span></span>`; |
91 | } else { | 135 | } else { |
92 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; | 136 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; |
93 | } | 137 | } |
@@ -97,9 +141,17 @@ export default { | @@ -97,9 +141,17 @@ export default { | ||
97 | label: '月度总结', | 141 | label: '月度总结', |
98 | sortable: true, | 142 | sortable: true, |
99 | width: '180px', | 143 | width: '180px', |
144 | + click: function (row) { | ||
145 | + // 点击弹框展示 月度总结 | ||
146 | + title.value = "月度总结"; | ||
147 | + componentName.value = "DOCUMENT"; | ||
148 | + docType.value = "THREE_MONTHLY_SUMMARY"; | ||
149 | + docTypeName.value = "月度总结"; | ||
150 | + showDialog(true); | ||
151 | + }, | ||
100 | render: function (row) { | 152 | render: function (row) { |
101 | if (row.monthlySummary == "YES") { | 153 | if (row.monthlySummary == "YES") { |
102 | - return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`; | 154 | + return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;color:#409EFF"></i><span></span>`; |
103 | } else { | 155 | } else { |
104 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; | 156 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; |
105 | 157 | ||
@@ -107,6 +159,11 @@ export default { | @@ -107,6 +159,11 @@ export default { | ||
107 | } | 159 | } |
108 | }]); | 160 | }]); |
109 | 161 | ||
162 | + | ||
163 | + let showDialog = (flg) => { | ||
164 | + dialogFlg.value = flg; | ||
165 | + } | ||
166 | + | ||
110 | let dataList = Vue.ref([]); | 167 | let dataList = Vue.ref([]); |
111 | let currentPage = Vue.ref(1); | 168 | let currentPage = Vue.ref(1); |
112 | let total = Vue.ref(0); | 169 | let total = Vue.ref(0); |
@@ -140,6 +197,7 @@ export default { | @@ -140,6 +197,7 @@ export default { | ||
140 | }); | 197 | }); |
141 | } | 198 | } |
142 | 199 | ||
200 | + | ||
143 | // 挂载完 | 201 | // 挂载完 |
144 | Vue.onMounted(() => { | 202 | Vue.onMounted(() => { |
145 | getPage(); | 203 | getPage(); |
@@ -160,7 +218,13 @@ export default { | @@ -160,7 +218,13 @@ export default { | ||
160 | dataList, | 218 | dataList, |
161 | currentPage, | 219 | currentPage, |
162 | total, | 220 | total, |
163 | - getPage | 221 | + getPage, |
222 | + title, | ||
223 | + docType, | ||
224 | + docTypeName, | ||
225 | + dialogFlg, | ||
226 | + showDialog, | ||
227 | + componentName | ||
164 | } | 228 | } |
165 | } | 229 | } |
166 | } | 230 | } |
1 | -<div style="padding-top: 20px;"> | ||
2 | - <el-divider content-position="left">个人信息</el-divider> | ||
3 | - <el-form :model="ruleForm" label-width="120px" :size="$global.elementSize"> | ||
4 | - <el-row> | 1 | +<div class="yfyw-user"> |
2 | + <div> | ||
3 | + <el-avatar :size="80" :src="imageUrl"> | ||
4 | + <i class="iconfont icon-yonghu" style="font-size: 80px;"/> | ||
5 | + </el-avatar> | ||
6 | + <el-upload | ||
7 | + class="upload-demo" | ||
8 | + :show-file-list="false" | ||
9 | + :before-upload="beforeAvatarUpload" | ||
10 | + :multiple="false" | ||
11 | + :http-request="getFile" | ||
12 | + :auto-upload="true"> | ||
13 | + <el-button size="mini" type="primary">上传照片</el-button> | ||
14 | + </el-upload> | ||
15 | + </div> | ||
16 | + <div class="title"> | ||
17 | + <i class="iconfont icon-icon--yingbing" /> 人员基本信息 | ||
18 | + </div> | ||
19 | + <div style="padding-left: 40px;margin-bottom: 6px"> | ||
20 | + <el-form :model="ruleForm" label-width="120px" :size="$global.elementSize" label-position="top" > | ||
21 | + <el-row :gutter="5"> | ||
5 | <el-col :span="8"> | 22 | <el-col :span="8"> |
6 | <el-form-item label="姓名" prop="nickname" class="form-class"> | 23 | <el-form-item label="姓名" prop="nickname" class="form-class"> |
7 | - <el-input v-model="ruleForm.nickname" disabled style='width: 190px;'></el-input> | 24 | + <el-input v-model="ruleForm.nickname" :readonly="isAdmin()"></el-input> |
8 | </el-form-item> | 25 | </el-form-item> |
26 | + </el-col> | ||
27 | + <el-col :span="8"> | ||
9 | <el-form-item label="性别" prop="sex" class="form-class"> | 28 | <el-form-item label="性别" prop="sex" class="form-class"> |
10 | <el-radio-group v-model="ruleForm.sex"> | 29 | <el-radio-group v-model="ruleForm.sex"> |
11 | <el-radio :label="1">男</el-radio> | 30 | <el-radio :label="1">男</el-radio> |
12 | <el-radio :label="0">女</el-radio> | 31 | <el-radio :label="0">女</el-radio> |
13 | </el-radio-group> | 32 | </el-radio-group> |
14 | </el-form-item> | 33 | </el-form-item> |
15 | - <el-form-item label="学历" prop="education" class="form-class"> | ||
16 | - <el-input v-model="ruleForm.education" style='width: 190px;'></el-input> | 34 | + </el-col> |
35 | + <el-col :span="8"> | ||
36 | + <el-form-item label="年龄" prop="age" class="form-class"> | ||
37 | + <el-input v-model="ruleForm.age" type="number"></el-input> | ||
38 | + </el-form-item> | ||
39 | + </el-col> | ||
40 | + </el-row> | ||
41 | + | ||
42 | + | ||
43 | + <el-row :gutter="5"> | ||
44 | + <el-col :span="8"> | ||
45 | + <el-form-item label="座机号码" prop="tel" class="form-class"> | ||
46 | + <el-input v-model="ruleForm.tel"></el-input> | ||
17 | </el-form-item> | 47 | </el-form-item> |
48 | + </el-col> | ||
49 | + <el-col :span="8"> | ||
18 | <el-form-item label="手机号" prop="phone" class="form-class"> | 50 | <el-form-item label="手机号" prop="phone" class="form-class"> |
19 | - <el-input v-model="ruleForm.phone" disabled style='width: 190px;'></el-input> | 51 | + <el-input v-model="ruleForm.phone" :readonly="isAdmin()"></el-input> |
20 | </el-form-item> | 52 | </el-form-item> |
53 | + </el-col> | ||
54 | + <el-col :span="8"> | ||
21 | <el-form-item label="电子邮箱" prop="email" class="form-class"> | 55 | <el-form-item label="电子邮箱" prop="email" class="form-class"> |
22 | - <el-input v-model="ruleForm.email" style='width: 190px;'></el-input> | 56 | + <el-input v-model="ruleForm.email"></el-input> |
57 | + </el-form-item> | ||
58 | + </el-col> | ||
59 | + </el-row> | ||
60 | + | ||
61 | + <el-row :gutter="5"> | ||
62 | + <el-col :span="8"> | ||
63 | + <el-form-item label="毕业院校" prop="university" class="form-class"> | ||
64 | + <el-input v-model="ruleForm.university" :readonly="isAdmin()"></el-input> | ||
65 | + </el-form-item> | ||
66 | + | ||
67 | + </el-col> | ||
68 | + <el-col :span="8"> | ||
69 | + <el-form-item label="学历" prop="education" class="form-class"> | ||
70 | + <el-input v-model="ruleForm.education"></el-input> | ||
71 | + </el-form-item> | ||
72 | + </el-col> | ||
73 | + <el-col :span="8"> | ||
74 | + <el-form-item label="所在公司" prop="company" class="form-class"> | ||
75 | + <el-input v-model="ruleForm.company" :readonly="isAdmin()"></el-input> | ||
23 | </el-form-item> | 76 | </el-form-item> |
77 | + </el-col> | ||
78 | + </el-row> | ||
24 | 79 | ||
80 | + <el-row :gutter="5"> | ||
81 | + <el-col :span="8"> | ||
82 | + <el-form-item label="在职状态" prop="certificate" :readonly="isAdmin()" class="form-class"> | ||
83 | + <el-radio-group v-model="ruleForm.state"> | ||
84 | + <el-radio :label="1">在职</el-radio> | ||
85 | + <el-radio :label="2">离职</el-radio> | ||
86 | + </el-radio-group> | ||
87 | + </el-form-item> | ||
88 | + </el-col> | ||
89 | + <el-col :span="8"> | ||
25 | <el-form-item label="入职时间" prop="entryTime" class="form-class"> | 90 | <el-form-item label="入职时间" prop="entryTime" class="form-class"> |
26 | <el-date-picker | 91 | <el-date-picker |
27 | - disabled | 92 | + :readonly="isAdmin()" |
28 | v-model="ruleForm.entryTime" | 93 | v-model="ruleForm.entryTime" |
29 | type="date" | 94 | type="date" |
30 | - style='width: 190px;' | ||
31 | placeholder="选择日期"> | 95 | placeholder="选择日期"> |
32 | </el-date-picker> | 96 | </el-date-picker> |
33 | </el-form-item> | 97 | </el-form-item> |
34 | - <el-form-item label="获得证书" prop="certificate" disabled class="form-class"> | ||
35 | - <el-input v-model="ruleForm.certificate" style='width: 190px;'></el-input> | ||
36 | - </el-form-item> | ||
37 | </el-col> | 98 | </el-col> |
38 | <el-col :span="8"> | 99 | <el-col :span="8"> |
39 | - <el-form-item label="所在公司" prop="company" class="form-class"> | ||
40 | - <el-input v-model="ruleForm.company" disabled style='width: 190px;'></el-input> | ||
41 | - </el-form-item> | ||
42 | - <el-form-item label="年龄" prop="age" class="form-class"> | ||
43 | - <el-input v-model="ruleForm.age" style='width: 190px;'></el-input> | ||
44 | - </el-form-item> | ||
45 | - <el-form-item label="毕业院校" prop="university" class="form-class"> | ||
46 | - <el-input v-model="ruleForm.university" disabled style='width: 190px;'></el-input> | ||
47 | - </el-form-item> | ||
48 | - <el-form-item label="座机号码" prop="tel" class="form-class"> | ||
49 | - <el-input v-model="ruleForm.tel" style='width: 190px;'></el-input> | ||
50 | - </el-form-item> | ||
51 | - <el-form-item label="家庭住址" prop="post" class="form-class"> | ||
52 | - <el-input v-model="ruleForm.post" style='width: 190px;'></el-input> | ||
53 | - </el-form-item> | ||
54 | <el-form-item label="离职时间" prop="quitTime" class="form-class"> | 100 | <el-form-item label="离职时间" prop="quitTime" class="form-class"> |
55 | <el-date-picker | 101 | <el-date-picker |
56 | v-model="ruleForm.quitTime" | 102 | v-model="ruleForm.quitTime" |
57 | - disabled | 103 | + :readonly="isAdmin()" |
58 | type="date" | 104 | type="date" |
59 | - style='width: 190px;' | ||
60 | placeholder="选择日期"> | 105 | placeholder="选择日期"> |
61 | </el-date-picker> | 106 | </el-date-picker> |
62 | </el-form-item> | 107 | </el-form-item> |
63 | </el-col> | 108 | </el-col> |
64 | - <el-col :span="8"> | ||
65 | - <el-image style="width: 200px; height: 200px" :src="imageUrl"></el-image> | ||
66 | - <el-upload | ||
67 | - class="upload-demo" | ||
68 | - :show-file-list="false" | ||
69 | - :before-upload="beforeAvatarUpload" | ||
70 | - :multiple="false" | ||
71 | - :http-request="getFile" | ||
72 | - :auto-upload="true"> | ||
73 | - <el-button size="small" type="primary">上传照片</el-button> | ||
74 | - </el-upload> | 109 | + </el-row> |
110 | + | ||
111 | + <el-row :gutter="5"> | ||
112 | + <el-col :span="24"> | ||
113 | + <el-form-item label="获得证书" prop="post" class="form-textarea"> | ||
114 | + <el-input v-model="ruleForm.certificate" type="textarea"></el-input> | ||
115 | + </el-form-item> | ||
116 | + </el-col> | ||
117 | + </el-row> | ||
118 | + <el-row :gutter="5"> | ||
119 | + <el-col :span="24"> | ||
120 | + <el-form-item label="家庭住址" prop="post" class="form-textarea"> | ||
121 | + <el-input v-model="ruleForm.post" type="textarea"></el-input> | ||
122 | + </el-form-item> | ||
75 | </el-col> | 123 | </el-col> |
76 | </el-row> | 124 | </el-row> |
77 | - <div style="text-align: center;"> | ||
78 | - <el-button type="primary" size="small" @click="saveUser">保存</el-button> | 125 | + <div style="text-align: center;padding-top: 10px"> |
126 | + <el-button type="primary" size="mini" @click="saveUser">保存基本信息</el-button> | ||
127 | + </div> | ||
128 | + </el-form> | ||
129 | + </div> | ||
130 | + <!--资产信息--> | ||
131 | + <div class="title"> | ||
132 | + <i class="iconfont icon-liebiaomoshi"/> 资产信息 | ||
133 | + | ||
134 | + <el-dropdown size="mini" split-button @click="assetsAdd('bastion',`新建${icon['bastion'].name}资产`)" style="margin-left: 20px"> | ||
135 | + <i class="icon el-icon-plus"/>添加{{icon['bastion'].name}} | ||
136 | + <template #dropdown> | ||
137 | + <div style="max-height: 300px;overflow-y: auto"> | ||
138 | + <el-dropdown-menu> | ||
139 | + <el-dropdown-item v-for="(v,k) in icon" @click="assetsAdd(k,`新建${icon[k].name}资产`)"> | ||
140 | + 添加{{v.name}} | ||
141 | + </el-dropdown-item> | ||
142 | + </el-dropdown-menu> | ||
143 | + </div> | ||
144 | + </template> | ||
145 | + </el-dropdown> | ||
146 | + </div> | ||
147 | + | ||
148 | + <div v-for="(v,k) in assetsMaps"> | ||
149 | + <div class="zc-view" v-for="(arr,index) in v"> | ||
150 | + <div class="zc-img"> | ||
151 | + <i class="iconfont" :class="icon[k].icon"></i><br/> | ||
152 | + {{ icon[k].name }} | ||
153 | + <span v-if="index > 0">({{index}})</span> | ||
154 | + </div> | ||
155 | + <div class="zc-info"> | ||
156 | + <div class="zc-item"> | ||
157 | + <div class="zc-item-label" v-for="(item,index2) in arr"> | ||
158 | + <span class="zc-item-label-left">{{item.name}}:</span> | ||
159 | + <span class="zc-item-label-right">{{item.value}}</span> | ||
160 | + </div> | ||
161 | + </div> | ||
162 | + <div class="zc-item-tools"> | ||
163 | + <el-button-group size="mini"> | ||
164 | + <el-button @click="btnClick('add',arr,`新建${icon[k].name}资产`)"> | ||
165 | + <i class="el-icon-plus"/> | ||
166 | + </el-button> | ||
167 | + <!--<el-button @click="btnClick('save',arr,`保存${icon[k].name}资产`)"> | ||
168 | + <i class="el-icon-check"/> | ||
169 | + </el-button>--> | ||
170 | + <el-button @click="btnClick('edit',arr,`编辑${icon[k].name}资产`)"> | ||
171 | + <i class="el-icon-edit"/> | ||
172 | + </el-button> | ||
173 | + <el-button @click="deleteAssets(arr,`删除${icon[k].name}资产`)"> | ||
174 | + <i class="el-icon-remove"/> | ||
175 | + </el-button> | ||
176 | + </el-button-group> | ||
79 | </div> | 177 | </div> |
80 | - <!-- <el-form-item> | ||
81 | - <el-button type="primary" @click="submitForm('ruleForm')" | ||
82 | - >Create</el-button | ||
83 | - > | ||
84 | - <el-button @click="resetForm('ruleForm')">Reset</el-button> | ||
85 | - </el-form-item> --> | 178 | + </div> |
179 | + </div> | ||
180 | + </div> | ||
181 | + | ||
182 | + <cm-dialog :title="btnType.title" width="60%" :showDialogVisible="op" @hidedialog="showDialog" :showFooter="true" @okfunc="okFunc"> | ||
183 | + <template v-slot style="padding: 10px"> | ||
184 | + <el-form label-width="120px" :size="$global.elementSize" label-position="top" > | ||
185 | + <el-row :gutter="5" > | ||
186 | + <el-col :span="8" v-for="item in btnType.data"> | ||
187 | + <el-form-item :label="item.name" :prop="item.name" class="form-class"> | ||
188 | + <el-input v-if="item.extend && item.extend.dict == undefined" v-model="item.value"></el-input> | ||
189 | + | ||
190 | + <el-select v-else v-model="item.value" :placeholder="`请选择${item.name}`"> | ||
191 | + <el-option | ||
192 | + v-for="item in item.extend.dict" | ||
193 | + :key="item.value" | ||
194 | + :label="item.name" | ||
195 | + :value="item.name" > | ||
196 | + </el-option> | ||
197 | + </el-select> | ||
198 | + | ||
199 | + </el-form-item> | ||
200 | + </el-col> | ||
201 | + | ||
202 | + </el-row> | ||
86 | </el-form> | 203 | </el-form> |
204 | + </template> | ||
205 | + </cm-dialog> | ||
206 | + | ||
207 | + | ||
87 | </div> | 208 | </div> |
1 | +const assets = (props, {attrs, slots, emit}) => { | ||
2 | + | ||
3 | + const {proxy} = Vue.getCurrentInstance(); | ||
4 | + let assetsMaps = Vue.ref({}); | ||
5 | + let btnType = Vue.ref({ | ||
6 | + flg: '', | ||
7 | + data: [] | ||
8 | + }); | ||
9 | + | ||
10 | + // 类型 bastion 堡垒机,dam 防水坝,virtual 虚拟桌面 | ||
11 | + let icon = { | ||
12 | + bastion: { | ||
13 | + name: '堡垒机', | ||
14 | + icon: 'icon-baoleiji' | ||
15 | + }, | ||
16 | + dam: { | ||
17 | + name: '防水坝', | ||
18 | + icon: 'icon-shuiba2' | ||
19 | + }, | ||
20 | + virtual: { | ||
21 | + name: '虚拟桌面', | ||
22 | + icon: 'icon-xunizhuomian' | ||
23 | + }, | ||
24 | + } | ||
25 | + | ||
26 | + // 查询列表 | ||
27 | + let getAssets = () => { | ||
28 | + proxy.$http.get(`/api-web/person/assets/userList/${props.parentNode.id}`, {}, function (res) { | ||
29 | + if (res && res.map) { | ||
30 | + assetsMaps.value = res.map; | ||
31 | + } | ||
32 | + }); | ||
33 | + } | ||
34 | + | ||
35 | + let assetsAdd = (type, msg) => { | ||
36 | + proxy.$http.get(`/api-web/person/assets/typeList/${type}`, {}, function (res) { | ||
37 | + if (res && res.data && res.data.length > 0) { | ||
38 | + btnClick('add',res.data,msg); | ||
39 | + } else { | ||
40 | + proxy.$global.showMsg("没有配置属性!","warning"); | ||
41 | + } | ||
42 | + }); | ||
43 | + } | ||
44 | + | ||
45 | + /** | ||
46 | + * 新增资产 | ||
47 | + * <p> | ||
48 | + * 作者: Wang | ||
49 | + * 时间:2021/11/3 20:14 | ||
50 | + */ | ||
51 | + let btnClick = (flg, arr, title) => { | ||
52 | + let data = []; | ||
53 | + if ('add' == flg) { | ||
54 | + // 新增复制 | ||
55 | + arr.map((v) => { | ||
56 | + let obj = {...v}; | ||
57 | + obj.value = ''; | ||
58 | + obj.id = 0; | ||
59 | + obj.groupings = (new Date()).getTime(); | ||
60 | + data.push(obj) | ||
61 | + }) | ||
62 | + } else { | ||
63 | + data = arr; | ||
64 | + } | ||
65 | + | ||
66 | + data.map(function (v){ | ||
67 | + let str = v.extend; | ||
68 | + if(str){ | ||
69 | + try { | ||
70 | + let json = JSON.parse(str); | ||
71 | + v.extend = json; | ||
72 | + }catch (e){ | ||
73 | + } | ||
74 | + } | ||
75 | + }) | ||
76 | + | ||
77 | + btnType.value = { | ||
78 | + flg: flg, | ||
79 | + data: data, | ||
80 | + title: title | ||
81 | + } | ||
82 | + showDialog(true); | ||
83 | + } | ||
84 | + | ||
85 | + /** | ||
86 | + * 新增资产 | ||
87 | + * <p> | ||
88 | + * 作者: Wang | ||
89 | + * 时间:2021/11/3 20:14 | ||
90 | + */ | ||
91 | + let addAssets = () => { | ||
92 | + let data = btnType.value.data | ||
93 | + data.map(function (v){ | ||
94 | + v.extend = JSON.stringify(v.extend); | ||
95 | + }) | ||
96 | + proxy.$http.post(`/api-web/person/assets/add/${props.parentNode.id}`,data , function (res) { | ||
97 | + if (res && res.success) { | ||
98 | + proxy.$global.showMsg("添加成功"); | ||
99 | + showDialog(false); | ||
100 | + getAssets(); | ||
101 | + } | ||
102 | + }); | ||
103 | + } | ||
104 | + | ||
105 | + | ||
106 | + /** | ||
107 | + * 保存资产 | ||
108 | + * <p> | ||
109 | + * 作者: Wang | ||
110 | + * 时间:2021/11/3 20:14 | ||
111 | + */ | ||
112 | + let saveAssets = () => { | ||
113 | + let data = btnType.value.data | ||
114 | + data.map(function (v){ | ||
115 | + v.extend = JSON.stringify(v.extend); | ||
116 | + }) | ||
117 | + proxy.$http.post(`/api-web/person/assets/edit/${props.parentNode.id}`, data, function (res) { | ||
118 | + if (res && res.success) { | ||
119 | + proxy.$global.showMsg("编辑成功"); | ||
120 | + showDialog(false); | ||
121 | + getAssets(); | ||
122 | + } | ||
123 | + }); | ||
124 | + } | ||
125 | + | ||
126 | + /** | ||
127 | + * 删除资产 | ||
128 | + * <p> | ||
129 | + * 作者: Wang | ||
130 | + * 时间:2021/11/3 20:14 | ||
131 | + */ | ||
132 | + let deleteAssets = (arr) => { | ||
133 | + proxy.$global.confirm(`您确认永久删除该资产信息吗?`,function (){ | ||
134 | + proxy.$http.post(`/api-web/person/assets/delete/${props.parentNode.id}`, arr, function (res) { | ||
135 | + if (res && res.success) { | ||
136 | + proxy.$global.showMsg("删除成功"); | ||
137 | + } else { | ||
138 | + proxy.$global.showMsg("删除失败,资产不存在或者已被删除!","error"); | ||
139 | + } | ||
140 | + showDialog(false); | ||
141 | + getAssets(); | ||
142 | + }); | ||
143 | + }) | ||
144 | + } | ||
145 | + | ||
146 | + // 弹框标识 | ||
147 | + let op = Vue.ref(false); | ||
148 | + | ||
149 | + /** | ||
150 | + * 展示编辑弹框 | ||
151 | + * <p> | ||
152 | + * 作者: Wang | ||
153 | + * 时间:2021/11/3 20:17 | ||
154 | + */ | ||
155 | + let showDialog = (flg) => { | ||
156 | + op.value = flg; | ||
157 | + } | ||
158 | + | ||
159 | + let okFunc = () => { | ||
160 | + let flg = btnType.value.flg; | ||
161 | + if (flg == 'add') { | ||
162 | + addAssets(); | ||
163 | + } else if (flg == 'edit') { | ||
164 | + saveAssets(); | ||
165 | + } | ||
166 | + } | ||
167 | + | ||
168 | + return { | ||
169 | + icon, | ||
170 | + getAssets, | ||
171 | + assetsMaps, | ||
172 | + addAssets, | ||
173 | + saveAssets, | ||
174 | + deleteAssets, | ||
175 | + op, | ||
176 | + showDialog, | ||
177 | + okFunc, | ||
178 | + btnClick, | ||
179 | + btnType, | ||
180 | + assetsAdd | ||
181 | + } | ||
182 | +} | ||
183 | + | ||
184 | + | ||
1 | export default { | 185 | export default { |
2 | name: 'projectPJIndex', | 186 | name: 'projectPJIndex', |
3 | template: '', | 187 | template: '', |
@@ -25,6 +209,7 @@ export default { | @@ -25,6 +209,7 @@ export default { | ||
25 | const {proxy} = Vue.getCurrentInstance(); | 209 | const {proxy} = Vue.getCurrentInstance(); |
26 | let imageUrl = Vue.ref(''); | 210 | let imageUrl = Vue.ref(''); |
27 | 211 | ||
212 | + | ||
28 | let ruleForm = Vue.ref({ | 213 | let ruleForm = Vue.ref({ |
29 | nickname: '', | 214 | nickname: '', |
30 | sex: 0, | 215 | sex: 0, |
@@ -48,11 +233,12 @@ export default { | @@ -48,11 +233,12 @@ export default { | ||
48 | let getPage = () => { | 233 | let getPage = () => { |
49 | proxy.$http.get("/api-web/bOpsPerson/search", { | 234 | proxy.$http.get("/api-web/bOpsPerson/search", { |
50 | "nickname": props.parentNode.label, | 235 | "nickname": props.parentNode.label, |
236 | + "id": props.parentNode.id, | ||
51 | "projectId": props.projectId | 237 | "projectId": props.projectId |
52 | }, function (res) { | 238 | }, function (res) { |
53 | if (res && res.object) { | 239 | if (res && res.object) { |
54 | ruleForm.value = res.object | 240 | ruleForm.value = res.object |
55 | - }else { | 241 | + } else { |
56 | ruleForm.value = res.object | 242 | ruleForm.value = res.object |
57 | } | 243 | } |
58 | }); | 244 | }); |
@@ -65,7 +251,7 @@ export default { | @@ -65,7 +251,7 @@ export default { | ||
65 | // 保存用户信息 | 251 | // 保存用户信息 |
66 | let saveUser = () => { | 252 | let saveUser = () => { |
67 | 253 | ||
68 | - proxy.$http.post("/api-web/bOpsPerson/saveOrUpdate",ruleForm.value , function (res) { | 254 | + proxy.$http.post("/api-web/bOpsPerson/saveOrUpdate", ruleForm.value, function (res) { |
69 | if (res && res.code == 0) { | 255 | if (res && res.code == 0) { |
70 | proxy.$global.showMsg('保存成功!'); | 256 | proxy.$global.showMsg('保存成功!'); |
71 | } | 257 | } |
@@ -73,10 +259,10 @@ export default { | @@ -73,10 +259,10 @@ export default { | ||
73 | } | 259 | } |
74 | 260 | ||
75 | 261 | ||
76 | - let getFile = (param) =>{ | 262 | + let getFile = (param) => { |
77 | let fileObj = param.file | 263 | let fileObj = param.file |
78 | let params = { | 264 | let params = { |
79 | - file:fileObj, | 265 | + file: fileObj, |
80 | id: props.parentNode.id | 266 | id: props.parentNode.id |
81 | } | 267 | } |
82 | // 上传文件 | 268 | // 上传文件 |
@@ -88,30 +274,64 @@ export default { | @@ -88,30 +274,64 @@ export default { | ||
88 | imageUrl.value = URL.createObjectURL(fileObj); | 274 | imageUrl.value = URL.createObjectURL(fileObj); |
89 | } | 275 | } |
90 | 276 | ||
91 | - let beforeAvatarUpload = (file) =>{ | 277 | + let beforeAvatarUpload = (file) => { |
92 | const isJPG = file.type.indexOf('image/') != -1 | 278 | const isJPG = file.type.indexOf('image/') != -1 |
93 | if (!isJPG) { | 279 | if (!isJPG) { |
94 | - proxy.$global.showMsg('您上传的不是图片文件,请选择图片!','error'); | 280 | + proxy.$global.showMsg('您上传的不是图片文件,请选择图片!', 'error'); |
95 | } | 281 | } |
96 | return isJPG | 282 | return isJPG |
97 | } | 283 | } |
98 | 284 | ||
285 | + let isAdmin = () => { | ||
286 | + return localStorage.getItem('lgn') != 'admin'; | ||
287 | + } | ||
288 | + | ||
289 | + const { | ||
290 | + icon, | ||
291 | + getAssets, | ||
292 | + assetsMaps, | ||
293 | + addAssets, | ||
294 | + saveAssets, | ||
295 | + deleteAssets, | ||
296 | + op, | ||
297 | + showDialog, | ||
298 | + okFunc, | ||
299 | + btnClick, | ||
300 | + btnType, | ||
301 | + assetsAdd | ||
302 | + } = assets(props, {attrs, slots, emit}); | ||
303 | + | ||
99 | // // 挂载完 | 304 | // // 挂载完 |
100 | Vue.onMounted(() => { | 305 | Vue.onMounted(() => { |
101 | getPage(); | 306 | getPage(); |
307 | + getAssets(); | ||
102 | }) | 308 | }) |
103 | 309 | ||
104 | // 监听编辑状态 | 310 | // 监听编辑状态 |
105 | Vue.watch(() => props.projectId, (newValue, oldVlaue) => { | 311 | Vue.watch(() => props.projectId, (newValue, oldVlaue) => { |
106 | getPage(); | 312 | getPage(); |
313 | + getAssets(); | ||
107 | }); | 314 | }); |
108 | - | ||
109 | return { | 315 | return { |
110 | imageUrl, | 316 | imageUrl, |
111 | ruleForm, | 317 | ruleForm, |
112 | saveUser, | 318 | saveUser, |
113 | getFile, | 319 | getFile, |
114 | beforeAvatarUpload, | 320 | beforeAvatarUpload, |
321 | + isAdmin, | ||
322 | + // 资产属性 | ||
323 | + icon, | ||
324 | + getAssets, | ||
325 | + assetsMaps, | ||
326 | + addAssets, | ||
327 | + saveAssets, | ||
328 | + deleteAssets, | ||
329 | + op, | ||
330 | + showDialog, | ||
331 | + okFunc, | ||
332 | + btnClick, | ||
333 | + btnType, | ||
334 | + assetsAdd | ||
115 | } | 335 | } |
116 | } | 336 | } |
117 | } | 337 | } |
@@ -37,7 +37,7 @@ export default { | @@ -37,7 +37,7 @@ export default { | ||
37 | label: '日常资料', | 37 | label: '日常资料', |
38 | render: function (row) { | 38 | render: function (row) { |
39 | if(row.dayMaterial =="YES"){ | 39 | if(row.dayMaterial =="YES"){ |
40 | - return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`; | 40 | + return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;color:#409EFF"></i><span></span>`; |
41 | }else{ | 41 | }else{ |
42 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; | 42 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; |
43 | } | 43 | } |
@@ -49,7 +49,7 @@ export default { | @@ -49,7 +49,7 @@ export default { | ||
49 | label: '文档资料', | 49 | label: '文档资料', |
50 | render: function (row) { | 50 | render: function (row) { |
51 | if(row.documentMaterial =="YES"){ | 51 | if(row.documentMaterial =="YES"){ |
52 | - return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`; | 52 | + return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;color:#409EFF"></i><span></span>`; |
53 | }else{ | 53 | }else{ |
54 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; | 54 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; |
55 | } | 55 | } |
@@ -60,7 +60,7 @@ export default { | @@ -60,7 +60,7 @@ export default { | ||
60 | label: '项目保密协议', | 60 | label: '项目保密协议', |
61 | render: function (row) { | 61 | render: function (row) { |
62 | if(row.nda =="YES"){ | 62 | if(row.nda =="YES"){ |
63 | - return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;"></i><span></span>`; | 63 | + return `<i class="iconfont icon-icon--yes" style="font-size: 22px;margin-right: 10px;color:#409EFF"></i><span></span>`; |
64 | }else{ | 64 | }else{ |
65 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; | 65 | return `<i class="iconfont icon-icon--shanchu" style="font-size: 22px;margin-right: 10px;color:red"></i><span></span>`; |
66 | } | 66 | } |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | </div> | 14 | </div> |
15 | </el-col> | 15 | </el-col> |
16 | <el-col :span="20" > | 16 | <el-col :span="20" > |
17 | - <div class="cm-card" :style="{'min-height':height+'px','height':'100%','padding-left':'5px'}" > | 17 | + <div class="cm-card" :style="{'max-height':height+'px','height':'100%','padding-left':'5px'}" > |
18 | <component v-bind:is="componentName" | 18 | <component v-bind:is="componentName" |
19 | :docType="docType" | 19 | :docType="docType" |
20 | :docTypeName="docTypeName" | 20 | :docTypeName="docTypeName" |
-
Please register or login to post a comment