Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web
Showing
39 changed files
with
938 additions
and
162 deletions
@@ -317,8 +317,9 @@ layui.define(['form', 'admin', 'laydate', 'common', 'sessions', 'reskpilist'], f | @@ -317,8 +317,9 @@ layui.define(['form', 'admin', 'laydate', 'common', 'sessions', 'reskpilist'], f | ||
317 | charToExpr(data, 'commonlyExpr'); | 317 | charToExpr(data, 'commonlyExpr'); |
318 | charToExpr(data, 'importantExpr'); | 318 | charToExpr(data, 'importantExpr'); |
319 | charToExpr(data, 'seriousExpr'); | 319 | charToExpr(data, 'seriousExpr'); |
320 | - | ||
321 | - form.on('submit(add-alarmpolicy-form)', function () { | 320 | + //lsq 告警策略编辑不了,id值应该选择的是submit的按钮的lay-filter 2022-09-27 |
321 | + // form.on('submit(add-alarmpolicy-form)', function () { | ||
322 | + form.on('submit(alarmpolicy-form-save-id)', function () { | ||
322 | delete data.noticeMergeFlagExpr; | 323 | delete data.noticeMergeFlagExpr; |
323 | admin.req({ | 324 | admin.req({ |
324 | url: domainName + '/api-web/alarmPolicy/save?access_token=' + accessToken | 325 | url: domainName + '/api-web/alarmPolicy/save?access_token=' + accessToken |
@@ -334,7 +334,8 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o | @@ -334,7 +334,8 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o | ||
334 | }); | 334 | }); |
335 | data.subGroupLists = receiveGroupInfoS; | 335 | data.subGroupLists = receiveGroupInfoS; |
336 | delete data["sub_send_type"]; | 336 | delete data["sub_send_type"]; |
337 | - form.on('submit(add-alarmsubscribe-form)',function () { | 337 | + //lsq 提交按钮需要用的是submit按钮的lay-filter 2022-09-27 |
338 | + form.on('submit(alarmsubscribe-form-save-id)',function () { | ||
338 | var alrmlevels = [],reportTypes = []; | 339 | var alrmlevels = [],reportTypes = []; |
339 | $('input[name="reportType"]:checked').each(function() { | 340 | $('input[name="reportType"]:checked').each(function() { |
340 | reportTypes.push($(this).val()); | 341 | reportTypes.push($(this).val()); |
@@ -26,7 +26,8 @@ layui.define(['form','table', 'admin', 'common','sessions'], function (exports) | @@ -26,7 +26,8 @@ layui.define(['form','table', 'admin', 'common','sessions'], function (exports) | ||
26 | 26 | ||
27 | //保存 | 27 | //保存 |
28 | $("#alarmtemplate-form-save-id").on("click",function (){ | 28 | $("#alarmtemplate-form-save-id").on("click",function (){ |
29 | - form.on('submit(add-alarmtemplate-form)',function () { | 29 | + //lsq 告警模板编辑不了,id值应该选择的是submit的按钮的lay-filter 2022-09-27 |
30 | + form.on('submit(alarmtemplate-form-save-id)',function () { | ||
30 | var data = form.val("add-alarmtemplate-form"); | 31 | var data = form.val("add-alarmtemplate-form"); |
31 | var policyIds = []; | 32 | var policyIds = []; |
32 | var policylist = $("#alarmtemplate-policy-table-body").find("tr"); | 33 | var policylist = $("#alarmtemplate-policy-table-body").find("tr"); |
@@ -2608,6 +2608,22 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -2608,6 +2608,22 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
2608 | {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'}, | 2608 | {field: 'resTypeName', title: '资源类型', minWidth: x_110, align: 'center'}, |
2609 | {field: 'state', title: '资源状态', minWidth: x_110, align: 'center', sort: true, templet: '#resStateTpl'} | 2609 | {field: 'state', title: '资源状态', minWidth: x_110, align: 'center', sort: true, templet: '#resStateTpl'} |
2610 | ], | 2610 | ], |
2611 | + "DATABASE_OGG": [ | ||
2612 | + {field: 'ip', title: 'IP地址', width: x_130, align: 'center', sort: true}, | ||
2613 | + { | ||
2614 | + field: 'resName', title: '资源名称', minWidth: x_300, sort: true, | ||
2615 | + templet: '#resindex_resName' | ||
2616 | + //lsq 资源名称用模板 2022-08-29 | ||
2617 | + // templet: '<div><span data-zymc="{{ d.resId }}" data-restype="{{d.resType}}" data-name="{{d.resName}}" data-childrennum="{{d.childrenNum}}" data-ip="{{ d.ip }}" data-resTypeName="{{ d.resTypeName }}" data-admin="{{ d.adminName }}" data-pingenable="{{d.pingEnable}}" class="layui-table-link">{{ d.resName }}</span></div>' | ||
2618 | + }, | ||
2619 | + // {field: 'shortName', title: '别名', width: 100, align: 'center', sort: true, templet:'#shortNameTpl'}, | ||
2620 | + {field: 'health', title: '健康状态', width: x_120, align: 'center', sort: true, templet: '#healthTpl'}, | ||
2621 | + {field: 'lastColTime', title: '最近采集时间', width: x_160, align: 'center', sort: true}, | ||
2622 | + {field: 'linkState', title: '连接状态', align: 'center', width: x_120, templet: '#linkStateTpl', sort: true}, | ||
2623 | + {field: 'adminName', title: '负责人', width: x_130, align: 'center', sort: true}, | ||
2624 | + {field: 'adminPhone', title: '负责人电话', width: x_130, align: 'center', sort: true}, | ||
2625 | + {field: 'state', title: '资源状态', width: x_110, align: 'center', sort: true, templet: '#resStateTpl'} | ||
2626 | + ], | ||
2611 | }, | 2627 | }, |
2612 | /** | 2628 | /** |
2613 | * 验证是否跳转详情页 | 2629 | * 验证是否跳转详情页 |
@@ -4367,6 +4367,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele | @@ -4367,6 +4367,8 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele | ||
4367 | //lsq 状态信息无其他下探 2022-06-08 | 4367 | //lsq 状态信息无其他下探 2022-06-08 |
4368 | var statusF = $menu.data('statusf'); | 4368 | var statusF = $menu.data('statusf'); |
4369 | var one = $menu.data('one'); | 4369 | var one = $menu.data('one'); |
4370 | + //lsq 只有kpiIdent==1时才有性能趋势 2022-09-27 | ||
4371 | + var kpiIdent=$menu.data('ident'); | ||
4370 | var menubox = '<div class="detail_menubox" id="detail_menubox_id" style="color:#666;"><ul>'; | 4372 | var menubox = '<div class="detail_menubox" id="detail_menubox_id" style="color:#666;"><ul>'; |
4371 | //lsq 只有状态指标下探的标识 | 4373 | //lsq 只有状态指标下探的标识 |
4372 | if(one==1){ | 4374 | if(one==1){ |
@@ -4380,7 +4382,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele | @@ -4380,7 +4382,7 @@ layui.define(['laytpl', 'admin', 'form', 'table', 'echarts', 'sessions', 'xmSele | ||
4380 | if (!hideM) { | 4382 | if (!hideM) { |
4381 | menubox += '<li type="m"><i class="layui-icon"></i>过滤多指标</li>'; | 4383 | menubox += '<li type="m"><i class="layui-icon"></i>过滤多指标</li>'; |
4382 | } | 4384 | } |
4383 | - if (!nature) { | 4385 | + if (!nature && kpiIdent==1) { |
4384 | menubox += '<li type="t"><i class="layui-icon"></i>性能趋势</li>'; | 4386 | menubox += '<li type="t"><i class="layui-icon"></i>性能趋势</li>'; |
4385 | } | 4387 | } |
4386 | // if(!statusF){ | 4388 | // if(!statusF){ |
1 | +layui.define(['commonDetail', 'common', 'admin'], function (exports) { | ||
2 | + var commonDetail = layui.commonDetail; | ||
3 | + var common = layui.common; | ||
4 | + var admin = layui.admin; | ||
5 | + //对外暴露的接口 | ||
6 | + exports('database_ogg', function (data) { | ||
7 | + var resId = ''; | ||
8 | + var showFlag = common.getUrlParam("show"); | ||
9 | + if (showFlag && showFlag == '0') { | ||
10 | + resId = common.getUrlParam("resId"); | ||
11 | + } else { | ||
12 | + resId = data.resId; | ||
13 | + } | ||
14 | + | ||
15 | + commonDetail.bindTips(); | ||
16 | + | ||
17 | + // 基本信息 | ||
18 | + var jbxxKpi = "KPIE13DD9A3,KPIF74D9D2B"; | ||
19 | + | ||
20 | + // ogg信息 | ||
21 | + var oggkpi = "KPI95C50C7C,KPIEC53A8C4,KPI03937134,KPI1A122D84,KPI16282DF0"; | ||
22 | + | ||
23 | + reload(); | ||
24 | + | ||
25 | + //渲染页面 | ||
26 | + function reload() { | ||
27 | + | ||
28 | + //基本信息 | ||
29 | + commonDetail.renderText("databaseogg_baseinfo",resId,jbxxKpi); | ||
30 | + //资源状态 | ||
31 | + commonDetail.renderResHealth("databaseogg_health_state",resId); | ||
32 | + | ||
33 | + // ogg信息 | ||
34 | + commonDetail.renderTable("databaseogg_ogginfo", false, resId, oggkpi, 'ogg运行情况', 'ogg-', 'ext, KPI1A122D84 , KPI16282DF0', 'desc'); | ||
35 | + | ||
36 | + | ||
37 | + // 告警信息 | ||
38 | + commonDetail.renderActiveAlarms('databaseogg_alarmlist', resId) | ||
39 | + } | ||
40 | + | ||
41 | + //定时任务 | ||
42 | + var timer = setInterval(function () { | ||
43 | + reload() | ||
44 | + }, commonDetail.timerTime); | ||
45 | + commonDetail.detailTimer.push(timer); | ||
46 | + | ||
47 | + }); | ||
48 | +}); |
@@ -76,7 +76,7 @@ layui.define(['commonDetail','common','sessions'], function (exports) { | @@ -76,7 +76,7 @@ layui.define(['commonDetail','common','sessions'], function (exports) { | ||
76 | //内存使用率走势(12小时) | 76 | //内存使用率走势(12小时) |
77 | commonDetail.renderLineCharat('hostminicomputerpartition_memoryrun',resId,memoryRunKpiId,'内存使用率','mem'); | 77 | commonDetail.renderLineCharat('hostminicomputerpartition_memoryrun',resId,memoryRunKpiId,'内存使用率','mem'); |
78 | //虚拟内存使用率走势(12小时) | 78 | //虚拟内存使用率走势(12小时) |
79 | - commonDetail.renderLineCharat('hostminicomputerpartition_vmemoryrun',resId,vmemoryRunKpiId,'虚拟内存使用率','vmem'); | 79 | + commonDetail.renderLineCharat('hostminicomputerpartition_vmemoryrun',resId,vmemoryRunKpiId,'虚拟内存使用率','mem'); |
80 | //文件系统 | 80 | //文件系统 |
81 | commonDetail.renderTable('hostminicomputerpartition_sysfile',false,resId,sysfileKpiId,'文件系统','fs'); | 81 | commonDetail.renderTable('hostminicomputerpartition_sysfile',false,resId,sysfileKpiId,'文件系统','fs'); |
82 | //网卡信息 | 82 | //网卡信息 |
@@ -237,7 +237,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -237,7 +237,18 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
237 | if (flag) { | 237 | if (flag) { |
238 | $(".protocol-base-area").css("display", "none"); | 238 | $(".protocol-base-area").css("display", "none"); |
239 | } | 239 | } |
240 | - form.on('submit(protocol-add-form)', function (data) { | 240 | + |
241 | + }, | ||
242 | + yes: function (index, layero) {//确定按钮回调方法 | ||
243 | + var flag = true; | ||
244 | + //看协议参数名称和参数code、参数排序有没有输入 | ||
245 | + $.each($("#editProtocolParam_add_table").find("input[name='paramName'],input[name='paramCode'],input[name='sort']"), function (i, e) { | ||
246 | + if (!$(e).val()) { | ||
247 | + flag = false; | ||
248 | + return; | ||
249 | + } | ||
250 | + }) | ||
251 | + if (flag) { | ||
241 | var paramList = []; | 252 | var paramList = []; |
242 | $.each($("#editProtocolParam_add_table").find("tbody tr"), function (i, e) { | 253 | $.each($("#editProtocolParam_add_table").find("tbody tr"), function (i, e) { |
243 | paramList.push({ | 254 | paramList.push({ |
@@ -255,7 +266,6 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -255,7 +266,6 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
255 | }) | 266 | }) |
256 | var submitData = layui.form.val('protocol-add-form'); | 267 | var submitData = layui.form.val('protocol-add-form'); |
257 | submitData.protocolParamList = paramList; | 268 | submitData.protocolParamList = paramList; |
258 | - var loading = layer.load(2) | ||
259 | $.ajax({ | 269 | $.ajax({ |
260 | url: common.domainName + '/api-web/manage/protocol/save?access_token=' + accessToken, | 270 | url: common.domainName + '/api-web/manage/protocol/save?access_token=' + accessToken, |
261 | type: 'post', | 271 | type: 'post', |
@@ -263,29 +273,21 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -263,29 +273,21 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
263 | contentType: "application/json;charset=utf-8", | 273 | contentType: "application/json;charset=utf-8", |
264 | async: false, | 274 | async: false, |
265 | success: function (res) { | 275 | success: function (res) { |
266 | - // layer.closeAll(); | ||
267 | - layer.close(indexm); //joke modify 20210303 | ||
268 | - layer.closeAll('loading'); | ||
269 | - reloadTable(); | 276 | + var loading = layer.load(2) |
277 | + if (res.success){ | ||
278 | + layer.close(index); //joke modify 20210303 | ||
279 | + layer.close(loading); | ||
280 | + layer.msg("操作成功", { icon: 1}); | ||
281 | + reloadTable(); | ||
282 | + }else { | ||
283 | + layer.close(loading); | ||
284 | + layer.msg(res.mag, { offset: '15px' , icon: 1 , time: 1000 }); | ||
285 | + } | ||
270 | }, | 286 | }, |
271 | error: function () { | 287 | error: function () { |
272 | layer.closeAll('loading'); | 288 | layer.closeAll('loading'); |
273 | } | 289 | } |
274 | }) | 290 | }) |
275 | - }); | ||
276 | - | ||
277 | - }, | ||
278 | - yes: function (index, layero) {//确定按钮回调方法 | ||
279 | - var flag = true; | ||
280 | - //看协议参数名称和参数code、参数排序有没有输入 | ||
281 | - $.each($("#editProtocolParam_add_table").find("input[name='paramName'],input[name='paramCode'],input[name='sort']"), function (i, e) { | ||
282 | - if (!$(e).val()) { | ||
283 | - flag = false; | ||
284 | - return; | ||
285 | - } | ||
286 | - }) | ||
287 | - if (flag) { | ||
288 | - $('#protocolAddForm').find("button.protocol-add-submit").trigger("click") | ||
289 | } else { | 291 | } else { |
290 | layer.msg("请将参数协议填写完整", {offset: '15px', icon: 7, time: 1500}); | 292 | layer.msg("请将参数协议填写完整", {offset: '15px', icon: 7, time: 1500}); |
291 | return false; | 293 | return false; |
@@ -313,4 +315,4 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -313,4 +315,4 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
313 | } | 315 | } |
314 | }); | 316 | }); |
315 | 317 | ||
316 | -}); | ||
318 | +}); |
@@ -448,10 +448,15 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'admi | @@ -448,10 +448,15 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'admi | ||
448 | defaultValue=price; | 448 | defaultValue=price; |
449 | } | 449 | } |
450 | row = createSelect(e.protocolCode,param,index); | 450 | row = createSelect(e.protocolCode,param,index); |
451 | + let td = ''; | ||
452 | + if (param.paramCode === 'privkey'){ | ||
453 | + td='<td style="width: 60%"><textarea'+chooseStyle+' data-paramName="' + param.paramName + '" data-paramCode="' + param.paramCode + '" data-protocol="' + e.protocolCode + '" data-allCode="' + e.protocolCode+param.paramCode + '" type="' + type + '" class="layui-textarea" name="paramValue">'+defaultValue+'</textarea></td>' | ||
454 | + }else { | ||
455 | + td='<td style="width: 60%"><input'+chooseStyle+' data-paramName="' + param.paramName + '" data-paramCode="' + param.paramCode + '" data-protocol="' + e.protocolCode + '" data-allCode="' + e.protocolCode+param.paramCode + '" type="' + type + '" class="layui-input" value="' + defaultValue + '" name="paramValue"></td>' | ||
456 | + } | ||
451 | if (row == '') { | 457 | if (row == '') { |
452 | row = '<tr'+revealStyle+'>' + | 458 | row = '<tr'+revealStyle+'>' + |
453 | - '<td style="width: 40%"><span>' + param.paramName + fillStyle+'</span></td>' + | ||
454 | - '<td style="width: 60%"><input'+chooseStyle+' data-paramName="' + param.paramName + '" data-paramCode="' + param.paramCode + '" data-protocol="' + e.protocolCode + '" data-allCode="' + e.protocolCode+param.paramCode + '" type="' + type + '" class="layui-input" value="' + defaultValue + '" name="paramValue"></td>' + | 459 | + '<td style="width: 40%"><span>' + param.paramName + fillStyle+'</span></td>' + td + |
455 | '</tr>' | 460 | '</tr>' |
456 | } | 461 | } |
457 | $dom.find("table tbody").append(row); | 462 | $dom.find("table tbody").append(row); |
@@ -495,10 +500,15 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'admi | @@ -495,10 +500,15 @@ layui.define(['table', 'form', 'laydate', 'common', 'sessions', 'laydate', 'admi | ||
495 | param.paramValue=price; | 500 | param.paramValue=price; |
496 | } | 501 | } |
497 | row=createSelect(k,param,index); | 502 | row=createSelect(k,param,index); |
503 | + let td = ''; | ||
504 | + if (param.paramCode === 'privkey'){ | ||
505 | + td='<td style="width: 60%"><textarea'+chooseStyle+' data-paramName="' + param.paramName + '" data-paramCode="' + param.paramCode + '" data-protocol="' +k + '" data-allCode="' + k+param.paramCode + '" type="' + type + '" class="layui-textarea" name="paramValue" >'+param.paramValue+'</textarea></td>' | ||
506 | + }else { | ||
507 | + td='<td style="width: 60%"><input '+chooseStyle+' data-paramName="'+param.paramName+'" data-paramCode="'+param.paramCode+'" data-protocol="'+k+'" value="'+param.paramValue+'" data-allCode="' + k+param.paramCode + '" type="'+type+'" class="layui-input" name="paramValue"></td>' | ||
508 | + } | ||
498 | if (row == '') { | 509 | if (row == '') { |
499 | var row = '<tr '+revealStyle+'>' + | 510 | var row = '<tr '+revealStyle+'>' + |
500 | - '<td style="width: 40%"><span>'+param.paramName+fillStyle+'</span>'+typeHtml+'</td>' + | ||
501 | - '<td style="width: 60%"><input '+chooseStyle+' data-paramName="'+param.paramName+'" data-paramCode="'+param.paramCode+'" data-protocol="'+k+'" value="'+param.paramValue+'" data-allCode="' + k+param.paramCode + '" type="'+type+'" class="layui-input" name="paramValue"></td>' + | 511 | + '<td style="width: 40%"><span>'+param.paramName+fillStyle+'</span>'+typeHtml+'</td>' + td + |
502 | '</tr>' | 512 | '</tr>' |
503 | } | 513 | } |
504 | $dom.find("table tbody").append(row); | 514 | $dom.find("table tbody").append(row); |
@@ -1950,6 +1950,27 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', | @@ -1950,6 +1950,27 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', | ||
1950 | } | 1950 | } |
1951 | } | 1951 | } |
1952 | res.push(obj) | 1952 | res.push(obj) |
1953 | + }else if ($(td).find('.xm-select-demo').length > 0 || $(td).find('textarea').length > 0){ | ||
1954 | + var $dom = $(td).find('.xm-select-demo').length>=1?$(td).find('.xm-select-demo'):$(td).find('textarea'); | ||
1955 | + var obj ={ | ||
1956 | + protocol: $dom.data("protocol"), | ||
1957 | + paramCode:$dom.data("paramcode"), | ||
1958 | + paramName:$dom.data("paramname"), | ||
1959 | + paramValue:$dom.val() | ||
1960 | + } | ||
1961 | + //为xmSelect时 | ||
1962 | + if($(td).find('.xm-select-demo').length>=1){ | ||
1963 | + obj.paramValue=$(td).find('.label-content').attr('title')?$(td).find('.label-content').attr('title'):''; | ||
1964 | + } | ||
1965 | + //是否集群 保存是否0,是1 | ||
1966 | + if(obj.protocol=="REDIS_CLI" && obj.paramCode=="redis_isCluster"){ | ||
1967 | + if(obj.paramValue=="否"){ | ||
1968 | + obj.paramValue="0"; | ||
1969 | + }else{ | ||
1970 | + obj.paramValue="1"; | ||
1971 | + } | ||
1972 | + } | ||
1973 | + res.push(obj) | ||
1953 | } | 1974 | } |
1954 | }) | 1975 | }) |
1955 | }) | 1976 | }) |
@@ -475,7 +475,13 @@ layui.define(['form', 'admin', 'layer', 'laytpl', 'common', 'view', 'sessions', | @@ -475,7 +475,13 @@ layui.define(['form', 'admin', 'layer', 'laytpl', 'common', 'view', 'sessions', | ||
475 | //回显业务图资源图 | 475 | //回显业务图资源图 |
476 | biz_view = xmSelect.get('#select-restype-options-biz')[0]; | 476 | biz_view = xmSelect.get('#select-restype-options-biz')[0]; |
477 | resource_view = xmSelect.get('#select-restype-options-view')[0]; | 477 | resource_view = xmSelect.get('#select-restype-options-view')[0]; |
478 | - var optionsMap= $.parseJSON(resType.options); | 478 | + var optionsMap = {}; |
479 | + try { | ||
480 | + optionsMap = $.parseJSON(resType.options); | ||
481 | + } catch (e) { | ||
482 | + console.error(" ==> 格式转换错误"); | ||
483 | + console.error(resType, e); | ||
484 | + } | ||
479 | resource_view.setValue([optionsMap.viewCallBack]); | 485 | resource_view.setValue([optionsMap.viewCallBack]); |
480 | biz_view.setValue([optionsMap.bizCallBack]); | 486 | biz_view.setValue([optionsMap.bizCallBack]); |
481 | //回显采集类型 | 487 | //回显采集类型 |
@@ -1326,4 +1332,4 @@ layui.define(['form', 'admin', 'layer', 'laytpl', 'common', 'view', 'sessions', | @@ -1326,4 +1332,4 @@ layui.define(['form', 'admin', 'layer', 'laytpl', 'common', 'view', 'sessions', | ||
1326 | 1332 | ||
1327 | return {getResTypeChecks: getResTypeChecks} | 1333 | return {getResTypeChecks: getResTypeChecks} |
1328 | }); | 1334 | }); |
1329 | -}); | ||
1335 | +}); |
@@ -198,7 +198,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl | @@ -198,7 +198,7 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl | ||
198 | }); | 198 | }); |
199 | userNames = contents.toString(); | 199 | userNames = contents.toString(); |
200 | // 表单提交事件 | 200 | // 表单提交事件 |
201 | - form.on('submit(form-usergroup-add)', function (data) { | 201 | + form.on('submit(btn-usergroup-submit)', function (data) { |
202 | Object.assign(usergroup, form.val('form-usergroup-add')); | 202 | Object.assign(usergroup, form.val('form-usergroup-add')); |
203 | //状态是否为开启 | 203 | //状态是否为开启 |
204 | usergroup.groupStatus= document.querySelector("#groupStatus_").checked? 0 : 1; | 204 | usergroup.groupStatus= document.querySelector("#groupStatus_").checked? 0 : 1; |
@@ -236,4 +236,4 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl | @@ -236,4 +236,4 @@ layui.define(['table', 'form', 'admin', 'layer', 'common', 'sessions', 'treeTabl | ||
236 | }); | 236 | }); |
237 | }); | 237 | }); |
238 | }); | 238 | }); |
239 | -}); | ||
239 | +}); |
@@ -206,7 +206,7 @@ layui.define(['element', 'admin'], function (exports) { | @@ -206,7 +206,7 @@ layui.define(['element', 'admin'], function (exports) { | ||
206 | */ | 206 | */ |
207 | bindElemClickEvent() { | 207 | bindElemClickEvent() { |
208 | let that=this; | 208 | let that=this; |
209 | - var eventKeys = ['button','[data-bizid]','.layui-table-link']; | 209 | + var eventKeys = ['button','[data-bizid]','.layui-table-link','[data-zymc]','[data-busid]']; |
210 | eventKeys.map(item=>{ | 210 | eventKeys.map(item=>{ |
211 | if(!$(item).hasClass("on_fn")){ | 211 | if(!$(item).hasClass("on_fn")){ |
212 | $(item).unbind('click.handle').on('click.handle',(function (e){ | 212 | $(item).unbind('click.handle').on('click.handle',(function (e){ |
@@ -345,8 +345,8 @@ | @@ -345,8 +345,8 @@ | ||
345 | </div> | 345 | </div> |
346 | </div> | 346 | </div> |
347 | </div> | 347 | </div> |
348 | - | ||
349 | - <button type="submit" lay-submit class="layui-btn hide" id="alarmpolicy-form-save-id">保存</button> | 348 | + <!--lsq 告警策略编辑不了,按钮没有lay-filter 2022-09-27--> |
349 | + <button type="submit" lay-submit class="layui-btn hide" lay-filter="alarmpolicy-form-save-id" id="alarmpolicy-form-save-id">保存</button> | ||
350 | </form> | 350 | </form> |
351 | <script> | 351 | <script> |
352 | layui.use('alarmpolicyAdd', function (fn) { | 352 | layui.use('alarmpolicyAdd', function (fn) { |
@@ -141,8 +141,8 @@ | @@ -141,8 +141,8 @@ | ||
141 | <textarea class="layui-textarea" name="subDesc"></textarea> | 141 | <textarea class="layui-textarea" name="subDesc"></textarea> |
142 | </div> | 142 | </div> |
143 | </div> | 143 | </div> |
144 | - | ||
145 | - <button type="submit" lay-submit class="layui-btn hide" id="alarmsubscribe-form-save-id">保存</button> | 144 | + <!--lsq 告警订阅编辑不了,按钮没有lay-filter 2022-09-27--> |
145 | + <button type="submit" lay-submit class="layui-btn hide" lay-filter="alarmsubscribe-form-save-id" id="alarmsubscribe-form-save-id">保存</button> | ||
146 | </form> | 146 | </form> |
147 | <!--<style>--> | 147 | <!--<style>--> |
148 | <!-- #alarmsubscirbe-form-select-users{--> | 148 | <!-- #alarmsubscirbe-form-select-users{--> |
@@ -22,8 +22,8 @@ | @@ -22,8 +22,8 @@ | ||
22 | <input type="text" id="alarmTemplateDesc" name="alarmTempDesc" lay-reqtext="请输模板描述" class="layui-input"> | 22 | <input type="text" id="alarmTemplateDesc" name="alarmTempDesc" lay-reqtext="请输模板描述" class="layui-input"> |
23 | </div> | 23 | </div> |
24 | </div> | 24 | </div> |
25 | - | ||
26 | - <button type="submit" lay-submit class="layui-btn hide" id="alarmtemplate-form-save-id">保存</button> | 25 | + <!--lsq 告警模板编辑不了,按钮没有lay-filter 2022-09-27--> |
26 | + <button type="submit" lay-submit class="layui-btn hide" lay-filter="alarmtemplate-form-save-id" id="alarmtemplate-form-save-id">保存</button> | ||
27 | </form> | 27 | </form> |
28 | 28 | ||
29 | <div class="layui-form layui-form-pane"> | 29 | <div class="layui-form layui-form-pane"> |
@@ -54,7 +54,8 @@ | @@ -54,7 +54,8 @@ | ||
54 | <label class="layui-form-label">发送用户</label> | 54 | <label class="layui-form-label">发送用户</label> |
55 | <div style="width: calc(100% - 110px)"> | 55 | <div style="width: calc(100% - 110px)"> |
56 | <div class="layui-input-inline" style="width: calc(100% - 10px);display: inline-flex;"> | 56 | <div class="layui-input-inline" style="width: calc(100% - 10px);display: inline-flex;"> |
57 | - <div class="tags" id="select_noticeTimely_id_user" style="width: calc(100% - 20px);border: solid 1px #D2D2D2;margin-top: 0px;height: 36px;"></div> | 57 | + <!--lsq 选择用户过多时,超出高度滚动 2022-09-27--> |
58 | + <div class="tags" id="select_noticeTimely_id_user" style="width: calc(100% - 20px);border: solid 1px #D2D2D2;margin-top: 0px;min-height:36px; height: auto; max-height: 200px; overflow: auto;"></div> | ||
58 | <i class="layui-icon form-btn-icon" id="noticeTimely-form-select-users" style="line-height: 36px;margin-left: 5px;"></i> | 59 | <i class="layui-icon form-btn-icon" id="noticeTimely-form-select-users" style="line-height: 36px;margin-left: 5px;"></i> |
59 | </div> | 60 | </div> |
60 | </div> | 61 | </div> |
@@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
23 | <textarea name="protocolDesc" class="layui-textarea"></textarea> | 23 | <textarea name="protocolDesc" class="layui-textarea"></textarea> |
24 | </div> | 24 | </div> |
25 | </div> | 25 | </div> |
26 | - <button type="submit" lay-submit class="protocol-add-submit" style="display: none">提交</button> | 26 | + <button type="submit" lay-submit id="protocol-add-submit" style="display: none">提交</button> |
27 | </form> | 27 | </form> |
28 | </div> | 28 | </div> |
29 | <div class="layui-card-body layui-form-pane editProtocolParam-list" style="padding-top: 0px;"> | 29 | <div class="layui-card-body layui-form-pane editProtocolParam-list" style="padding-top: 0px;"> |
@@ -112,4 +112,4 @@ | @@ -112,4 +112,4 @@ | ||
112 | layui.use('protocolAdd', function (fn) { | 112 | layui.use('protocolAdd', function (fn) { |
113 | fn({{ d }}); | 113 | fn({{ d }}); |
114 | }); | 114 | }); |
115 | -</script> | ||
115 | +</script> |
@@ -558,7 +558,7 @@ | @@ -558,7 +558,7 @@ | ||
558 | </script> | 558 | </script> |
559 | <!--虚拟内存使用率--> | 559 | <!--虚拟内存使用率--> |
560 | <script type="text/html" id="vmmemoryRateTpl"> | 560 | <script type="text/html" id="vmmemoryRateTpl"> |
561 | - <div class="layui-progress-wrap kpiSubDiv" data-resid={{d.resId}} data-kpiid="KPI20352505" data-flag="vmem" data-name="虚拟内存使用率" | 561 | + <div class="layui-progress-wrap kpiSubDiv" data-resid={{d.resId}} data-kpiid="KPI20352505" data-flag="mem" data-name="虚拟内存使用率" |
562 | data-warning="1" data-ident="1" data-trend="1"> | 562 | data-warning="1" data-ident="1" data-trend="1"> |
563 | <div class="layui-progress layui-progress-big" lay-showpercent="true"> | 563 | <div class="layui-progress layui-progress-big" lay-showpercent="true"> |
564 | <div class="layui-progress-bar layui-bg-green" | 564 | <div class="layui-progress-bar layui-bg-green" |
@@ -588,7 +588,7 @@ | @@ -588,7 +588,7 @@ | ||
588 | </script> | 588 | </script> |
589 | <!--虚拟内存使用率--> | 589 | <!--虚拟内存使用率--> |
590 | <script type="text/html" id="vmmemoryRateTpl"> | 590 | <script type="text/html" id="vmmemoryRateTpl"> |
591 | - <div class="layui-progress-wrap kpiSubDiv" data-resid={{d.resId}} data-kpiid="KPI20352505" data-flag="vmem" data-name="虚拟内存使用率" | 591 | + <div class="layui-progress-wrap kpiSubDiv" data-resid={{d.resId}} data-kpiid="KPI20352505" data-flag="mem" data-name="虚拟内存使用率" |
592 | data-warning="1" data-ident="1" data-trend="1"> | 592 | data-warning="1" data-ident="1" data-trend="1"> |
593 | <div class="layui-progress layui-progress-big" lay-showpercent="true"> | 593 | <div class="layui-progress layui-progress-big" lay-showpercent="true"> |
594 | <div class="layui-progress-bar layui-bg-green {{ d.vmmemoryUseRate >= 95 ? 'layui-bg-red' : (d.vmmemoryUseRate >= 90 ? 'layui-bg-orange' : (d.vmmemoryUseRate >= 80 ? 'layui-bg-blue':''))}}" | 594 | <div class="layui-progress-bar layui-bg-green {{ d.vmmemoryUseRate >= 95 ? 'layui-bg-red' : (d.vmmemoryUseRate >= 90 ? 'layui-bg-orange' : (d.vmmemoryUseRate >= 80 ? 'layui-bg-blue':''))}}" |
hg-monitor-web-base/src/main/resources/static/src/views/template/detail/database_ogg.html
0 → 100644
1 | +<!--ogg详细页面--> | ||
2 | +<article class="page-container template"> | ||
3 | + <div class="page-panel"> | ||
4 | + <div class="main"> | ||
5 | + <div class="layui-card"> | ||
6 | + <div class="lay-row"> | ||
7 | + <div class="lay-row-item"> | ||
8 | + <h5 class="lay-row-title">基本信息<i data-id="databaseogg_baseinfo" class="iconfont detail_base_info"></i></h5> | ||
9 | + <ul class="info-table" id="databaseogg_baseinfo"></ul> | ||
10 | + </div> | ||
11 | + <div class="lay-row-item"> | ||
12 | + <h5 class="lay-row-title">资源状态</h5> | ||
13 | + <div class="res-state" id="databaseogg_health_state"></div> | ||
14 | + </div> | ||
15 | + </div> | ||
16 | + <div class="layui-card-body"> | ||
17 | + <div class="lay-row" id="databaseogg_ogginfoHide"> | ||
18 | + <div class="lay-row-item"> | ||
19 | + <h5 class="lay-row-title">ogg运行情况<span id="databaseogg_ogginfoMore" class="layui-table-link">更多</span></h5> | ||
20 | + <div id="databaseogg_ogginfo"></div> | ||
21 | + </div> | ||
22 | + </div> | ||
23 | + | ||
24 | + <div class="lay-row"> | ||
25 | + <div class="lay-row-item"> | ||
26 | + <h5 class="lay-row-title">实时告警动态</h5> | ||
27 | + <div id="databaseogg_alarmlist"></div> | ||
28 | + </div> | ||
29 | + </div> | ||
30 | + </div> | ||
31 | + </div> | ||
32 | + </div> | ||
33 | + </div> | ||
34 | +</article> | ||
35 | +<textarea id="database_ogg_param_id" style="display: none;">{{d}}</textarea> | ||
36 | +<script> | ||
37 | + layui.use('database_ogg', function (fn) { | ||
38 | + var $ = layui.$; | ||
39 | + var parm = $("#database_ogg_param_id").val(); | ||
40 | + if(parm.indexOf('{{d') != -1){ | ||
41 | + fn(); | ||
42 | + }else{ | ||
43 | + fn(JSON.parse(parm)); | ||
44 | + } | ||
45 | + }); | ||
46 | +</script> |
@@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
3 | <head> | 3 | <head> |
4 | <meta charset="utf-8"/> | 4 | <meta charset="utf-8"/> |
5 | <title>iconfont Demo</title> | 5 | <title>iconfont Demo</title> |
6 | - <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i2/O1CN01ZyAlrn1MwaMhqz36G_!!6000000001499-73-tps-64-64.ico" type="image/x-icon"/> | ||
7 | - <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01EYTRnJ297D6vehehJ_!!6000000008020-55-tps-64-64.svg"/> | 6 | + <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/> |
7 | + <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/> | ||
8 | <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css"> | 8 | <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css"> |
9 | <link rel="stylesheet" href="demo.css"> | 9 | <link rel="stylesheet" href="demo.css"> |
10 | <link rel="stylesheet" href="iconfont.css"> | 10 | <link rel="stylesheet" href="iconfont.css"> |
@@ -55,6 +55,24 @@ | @@ -55,6 +55,24 @@ | ||
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">&#xe710;</div> | ||
61 | + </li> | ||
62 | + | ||
63 | + <li class="dib"> | ||
64 | + <span class="icon iconfont"></span> | ||
65 | + <div class="name">警示 感叹号 !</div> | ||
66 | + <div class="code-name">&#xe7f3;</div> | ||
67 | + </li> | ||
68 | + | ||
69 | + <li class="dib"> | ||
70 | + <span class="icon iconfont"></span> | ||
71 | + <div class="name">拓扑</div> | ||
72 | + <div class="code-name">&#xe83d;</div> | ||
73 | + </li> | ||
74 | + | ||
75 | + <li class="dib"> | ||
58 | <span class="icon iconfont"></span> | 76 | <span class="icon iconfont"></span> |
59 | <div class="name">提示</div> | 77 | <div class="name">提示</div> |
60 | <div class="code-name">&#xe67c;</div> | 78 | <div class="code-name">&#xe67c;</div> |
@@ -1452,9 +1470,9 @@ | @@ -1452,9 +1470,9 @@ | ||
1452 | <pre><code class="language-css" | 1470 | <pre><code class="language-css" |
1453 | >@font-face { | 1471 | >@font-face { |
1454 | font-family: 'iconfont'; | 1472 | font-family: 'iconfont'; |
1455 | - src: url('iconfont.woff2?t=1659325108758') format('woff2'), | ||
1456 | - url('iconfont.woff?t=1659325108758') format('woff'), | ||
1457 | - url('iconfont.ttf?t=1659325108758') format('truetype'); | 1473 | + src: url('iconfont.woff2?t=1663752017313') format('woff2'), |
1474 | + url('iconfont.woff?t=1663752017313') format('woff'), | ||
1475 | + url('iconfont.ttf?t=1663752017313') format('truetype'); | ||
1458 | } | 1476 | } |
1459 | </code></pre> | 1477 | </code></pre> |
1460 | <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> | 1478 | <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> |
@@ -1481,6 +1499,33 @@ | @@ -1481,6 +1499,33 @@ | ||
1481 | <ul class="icon_lists dib-box"> | 1499 | <ul class="icon_lists dib-box"> |
1482 | 1500 | ||
1483 | <li class="dib"> | 1501 | <li class="dib"> |
1502 | + <span class="icon iconfont icon-gantanhao"></span> | ||
1503 | + <div class="name"> | ||
1504 | + 感叹号 | ||
1505 | + </div> | ||
1506 | + <div class="code-name">.icon-gantanhao | ||
1507 | + </div> | ||
1508 | + </li> | ||
1509 | + | ||
1510 | + <li class="dib"> | ||
1511 | + <span class="icon iconfont icon-jingshigantanhao"></span> | ||
1512 | + <div class="name"> | ||
1513 | + 警示 感叹号 ! | ||
1514 | + </div> | ||
1515 | + <div class="code-name">.icon-jingshigantanhao | ||
1516 | + </div> | ||
1517 | + </li> | ||
1518 | + | ||
1519 | + <li class="dib"> | ||
1520 | + <span class="icon iconfont icon-tuopu"></span> | ||
1521 | + <div class="name"> | ||
1522 | + 拓扑 | ||
1523 | + </div> | ||
1524 | + <div class="code-name">.icon-tuopu | ||
1525 | + </div> | ||
1526 | + </li> | ||
1527 | + | ||
1528 | + <li class="dib"> | ||
1484 | <span class="icon iconfont icon-tishi"></span> | 1529 | <span class="icon iconfont icon-tishi"></span> |
1485 | <div class="name"> | 1530 | <div class="name"> |
1486 | 提示 | 1531 | 提示 |
@@ -3579,6 +3624,30 @@ | @@ -3579,6 +3624,30 @@ | ||
3579 | 3624 | ||
3580 | <li class="dib"> | 3625 | <li class="dib"> |
3581 | <svg class="icon svg-icon" aria-hidden="true"> | 3626 | <svg class="icon svg-icon" aria-hidden="true"> |
3627 | + <use xlink:href="#icon-gantanhao"></use> | ||
3628 | + </svg> | ||
3629 | + <div class="name">感叹号</div> | ||
3630 | + <div class="code-name">#icon-gantanhao</div> | ||
3631 | + </li> | ||
3632 | + | ||
3633 | + <li class="dib"> | ||
3634 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
3635 | + <use xlink:href="#icon-jingshigantanhao"></use> | ||
3636 | + </svg> | ||
3637 | + <div class="name">警示 感叹号 !</div> | ||
3638 | + <div class="code-name">#icon-jingshigantanhao</div> | ||
3639 | + </li> | ||
3640 | + | ||
3641 | + <li class="dib"> | ||
3642 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
3643 | + <use xlink:href="#icon-tuopu"></use> | ||
3644 | + </svg> | ||
3645 | + <div class="name">拓扑</div> | ||
3646 | + <div class="code-name">#icon-tuopu</div> | ||
3647 | + </li> | ||
3648 | + | ||
3649 | + <li class="dib"> | ||
3650 | + <svg class="icon svg-icon" aria-hidden="true"> | ||
3582 | <use xlink:href="#icon-tishi"></use> | 3651 | <use xlink:href="#icon-tishi"></use> |
3583 | </svg> | 3652 | </svg> |
3584 | <div class="name">提示</div> | 3653 | <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=1659325108758') format('woff2'), | ||
4 | - url('iconfont.woff?t=1659325108758') format('woff'), | ||
5 | - url('iconfont.ttf?t=1659325108758') format('truetype'); | 3 | + src: url('iconfont.woff2?t=1663752017313') format('woff2'), |
4 | + url('iconfont.woff?t=1663752017313') format('woff'), | ||
5 | + url('iconfont.ttf?t=1663752017313') format('truetype'); | ||
6 | } | 6 | } |
7 | 7 | ||
8 | .iconfont { | 8 | .iconfont { |
@@ -13,6 +13,18 @@ | @@ -13,6 +13,18 @@ | ||
13 | -moz-osx-font-smoothing: grayscale; | 13 | -moz-osx-font-smoothing: grayscale; |
14 | } | 14 | } |
15 | 15 | ||
16 | +.icon-gantanhao:before { | ||
17 | + content: "\e710"; | ||
18 | +} | ||
19 | + | ||
20 | +.icon-jingshigantanhao:before { | ||
21 | + content: "\e7f3"; | ||
22 | +} | ||
23 | + | ||
24 | +.icon-tuopu:before { | ||
25 | + content: "\e83d"; | ||
26 | +} | ||
27 | + | ||
16 | .icon-tishi:before { | 28 | .icon-tishi:before { |
17 | content: "\e67c"; | 29 | content: "\e67c"; |
18 | } | 30 | } |
This diff could not be displayed because it is too large.
@@ -6,6 +6,27 @@ | @@ -6,6 +6,27 @@ | ||
6 | "description": "", | 6 | "description": "", |
7 | "glyphs": [ | 7 | "glyphs": [ |
8 | { | 8 | { |
9 | + "icon_id": "9974757", | ||
10 | + "name": "感叹号", | ||
11 | + "font_class": "gantanhao", | ||
12 | + "unicode": "e710", | ||
13 | + "unicode_decimal": 59152 | ||
14 | + }, | ||
15 | + { | ||
16 | + "icon_id": "689255", | ||
17 | + "name": "警示 感叹号 !", | ||
18 | + "font_class": "jingshigantanhao", | ||
19 | + "unicode": "e7f3", | ||
20 | + "unicode_decimal": 59379 | ||
21 | + }, | ||
22 | + { | ||
23 | + "icon_id": "1415612", | ||
24 | + "name": "拓扑", | ||
25 | + "font_class": "tuopu", | ||
26 | + "unicode": "e83d", | ||
27 | + "unicode_decimal": 59453 | ||
28 | + }, | ||
29 | + { | ||
9 | "icon_id": "577891", | 30 | "icon_id": "577891", |
10 | "name": "提示", | 31 | "name": "提示", |
11 | "font_class": "tishi", | 32 | "font_class": "tishi", |
No preview for this file type
No preview for this file type
No preview for this file type
@@ -422,11 +422,13 @@ export default { | @@ -422,11 +422,13 @@ export default { | ||
422 | } | 422 | } |
423 | 423 | ||
424 | if (res.msg) { | 424 | if (res.msg) { |
425 | - proxy.$global.showMsg(res.msg, 'warning'); | 425 | + proxy.$global.showMsg(res.msg); |
426 | } else { | 426 | } else { |
427 | proxy.$global.showMsg('放入回收站成功!'); | 427 | proxy.$global.showMsg('放入回收站成功!'); |
428 | - let isUser = !isUserFolder.value; | ||
429 | - reload(isUser); | 428 | + //joke 屏蔽 20221122 开始 |
429 | + // let isUser = !isUserFolder.value; | ||
430 | + // reload(isUser); | ||
431 | + //joke 屏蔽 20221122 结束 | ||
430 | } | 432 | } |
431 | 433 | ||
432 | if (props.isRecycle) { | 434 | if (props.isRecycle) { |
@@ -540,10 +542,13 @@ export default { | @@ -540,10 +542,13 @@ export default { | ||
540 | proxy.$refs[id].validate((valid) => { | 542 | proxy.$refs[id].validate((valid) => { |
541 | if (valid) { | 543 | if (valid) { |
542 | let params = docForm.value; | 544 | let params = docForm.value; |
543 | - if (currentNodeData.value.id == undefined || currentNodeData.value.id == '') { | ||
544 | - params.pid = '0' | ||
545 | - } else { | ||
546 | - params.pid = currentNodeData.value.id; | 545 | + //joke 修改 20221121 |
546 | + if (params.id == '' || params.id == null){ | ||
547 | + if (currentNodeData.value.id == undefined || currentNodeData.value.id == '') { | ||
548 | + params.pid = '0' | ||
549 | + } else { | ||
550 | + params.pid = currentNodeData.value.id; | ||
551 | + } | ||
547 | } | 552 | } |
548 | if (isUserFolder.value) { | 553 | if (isUserFolder.value) { |
549 | params.id = ""; | 554 | params.id = ""; |
@@ -665,7 +665,7 @@ | @@ -665,7 +665,7 @@ | ||
665 | </script> | 665 | </script> |
666 | <!--虚拟内存使用率--> | 666 | <!--虚拟内存使用率--> |
667 | <script type="text/html" id="vmmemoryRateTpl"> | 667 | <script type="text/html" id="vmmemoryRateTpl"> |
668 | - <div class="layui-progress-wrap kpiSubDiv" data-resid={{d.resId}} data-kpiid="KPI20352505" data-flag="vmem" data-name="虚拟内存使用率" | 668 | + <div class="layui-progress-wrap kpiSubDiv" data-resid={{d.resId}} data-kpiid="KPI20352505" data-flag=mem" data-name="虚拟内存使用率" |
669 | data-warning="1" data-ident="1" data-trend="1"> | 669 | data-warning="1" data-ident="1" data-trend="1"> |
670 | <div class="layui-progress layui-progress-big" lay-showpercent="true"> | 670 | <div class="layui-progress layui-progress-big" lay-showpercent="true"> |
671 | <div class="layui-progress-bar layui-bg-green {{ d.vmmemoryUseRate >= 95 ? 'layui-bg-red' : (d.vmmemoryUseRate >= 90 ? 'layui-bg-orange' : (d.vmmemoryUseRate >= 80 ? 'layui-bg-blue':''))}}" | 671 | <div class="layui-progress-bar layui-bg-green {{ d.vmmemoryUseRate >= 95 ? 'layui-bg-red' : (d.vmmemoryUseRate >= 90 ? 'layui-bg-orange' : (d.vmmemoryUseRate >= 80 ? 'layui-bg-blue':''))}}" |
@@ -665,7 +665,7 @@ | @@ -665,7 +665,7 @@ | ||
665 | </script> | 665 | </script> |
666 | <!--虚拟内存使用率--> | 666 | <!--虚拟内存使用率--> |
667 | <script type="text/html" id="vmmemoryRateTpl"> | 667 | <script type="text/html" id="vmmemoryRateTpl"> |
668 | - <div class="layui-progress-wrap kpiSubDiv" data-resid={{d.resId}} data-kpiid="KPI20352505" data-flag="vmem" data-name="虚拟内存使用率" | 668 | + <div class="layui-progress-wrap kpiSubDiv" data-resid={{d.resId}} data-kpiid="KPI20352505" data-flag="mem" data-name="虚拟内存使用率" |
669 | data-warning="1" data-ident="1" data-trend="1"> | 669 | data-warning="1" data-ident="1" data-trend="1"> |
670 | <div class="layui-progress layui-progress-big" lay-showpercent="true"> | 670 | <div class="layui-progress layui-progress-big" lay-showpercent="true"> |
671 | <div class="layui-progress-bar layui-bg-green {{ d.vmmemoryUseRate >= 95 ? 'layui-bg-red' : (d.vmmemoryUseRate >= 90 ? 'layui-bg-orange' : (d.vmmemoryUseRate >= 80 ? 'layui-bg-blue':''))}}" | 671 | <div class="layui-progress-bar layui-bg-green {{ d.vmmemoryUseRate >= 95 ? 'layui-bg-red' : (d.vmmemoryUseRate >= 90 ? 'layui-bg-orange' : (d.vmmemoryUseRate >= 80 ? 'layui-bg-blue':''))}}" |
@@ -21,7 +21,8 @@ | @@ -21,7 +21,8 @@ | ||
21 | } | 21 | } |
22 | 22 | ||
23 | .yfyw-user .form-class { | 23 | .yfyw-user .form-class { |
24 | - margin-bottom: 0px !important; | 24 | + /*margin-bottom: 0px !important;*/ |
25 | + margin: 5px; !important; | ||
25 | } | 26 | } |
26 | 27 | ||
27 | .yfyw-user .el-form--label-top .el-form-item__label { | 28 | .yfyw-user .el-form--label-top .el-form-item__label { |
@@ -79,7 +79,7 @@ export default { | @@ -79,7 +79,7 @@ export default { | ||
79 | id:docIds.join(','), | 79 | id:docIds.join(','), |
80 | } | 80 | } |
81 | proxy.$http.get('/api-web/bOpsFile/deleteSearch',param, function (res){ | 81 | proxy.$http.get('/api-web/bOpsFile/deleteSearch',param, function (res){ |
82 | - | 82 | + emit('callback',true); |
83 | }) | 83 | }) |
84 | } | 84 | } |
85 | 85 | ||
@@ -95,8 +95,7 @@ export default { | @@ -95,8 +95,7 @@ export default { | ||
95 | }; | 95 | }; |
96 | proxy.$http.post('/api-web/bOpsFile/fileSynchronization', params, function (res) { | 96 | proxy.$http.post('/api-web/bOpsFile/fileSynchronization', params, function (res) { |
97 | if (res && res.code == 0) { | 97 | if (res && res.code == 0) { |
98 | - // proxy.$global.showMsg(""); | ||
99 | - console.log('执行回调成功', res) | 98 | + emit('callback',true); |
100 | } | 99 | } |
101 | }); | 100 | }); |
102 | } | 101 | } |
1 | <div> | 1 | <div> |
2 | <div> | 2 | <div> |
3 | <!-- 人员信息总汇--> | 3 | <!-- 人员信息总汇--> |
4 | - <el-divider content-position="left">人员信息汇总</el-divider> | 4 | + <el-divider content-position="left"> |
5 | + 人员信息汇总 | ||
6 | + <el-tooltip placement="bottom-start" effect="light"> | ||
7 | + <template #content> 人员信息统计规则:<br/> • 左侧树:只统计业务下在职运维人员<br/> •人员信息汇总:统计业务下所有运维人员 </template> | ||
8 | + <i class="iconfont icon-gantanhao" style="color:rgb(30,159,255);"></i><span></span> | ||
9 | + </el-tooltip> | ||
10 | + </el-divider> | ||
11 | + <el-button v-if="!isAdmin()" :size="$global.elementConfig.size.button" @click="add" | ||
12 | + style="float:right;margin-right: 6px;margin-bottom: 6px">录入 | ||
13 | + </el-button> | ||
5 | <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true" | 14 | <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true" |
6 | :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" | 15 | :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" |
7 | :showPage="true" :height="height" :pageSize="pageSize"></cm-table-page> | 16 | :showPage="true" :height="height" :pageSize="pageSize"></cm-table-page> |
@@ -12,9 +21,10 @@ | @@ -12,9 +21,10 @@ | ||
12 | <component v-bind:is="componentName" | 21 | <component v-bind:is="componentName" |
13 | :docType="docType" | 22 | :docType="docType" |
14 | height="500" | 23 | height="500" |
24 | + :isAdd="isAdd" | ||
15 | :docTypeName="docTypeName" | 25 | :docTypeName="docTypeName" |
16 | :pageSize="pageSize" | 26 | :pageSize="pageSize" |
17 | - :treeNode="treeNode" :parentNode="parentNode" :projectId="projectId"></component> | 27 | + :treeNode="treeNode" @showPopout="showPopout" :parentNode="parentNode" :projectId="projectId" @callback="refreshPage"></component> |
18 | </div> | 28 | </div> |
19 | </template> | 29 | </template> |
20 | </cm-dialog> | 30 | </cm-dialog> |
@@ -53,7 +53,7 @@ export default { | @@ -53,7 +53,7 @@ export default { | ||
53 | let docTypeName = Vue.ref(''); | 53 | let docTypeName = Vue.ref(''); |
54 | let componentName = Vue.ref(''); | 54 | let componentName = Vue.ref(''); |
55 | let dialogFlg = Vue.ref(false); | 55 | let dialogFlg = Vue.ref(false); |
56 | - | 56 | + let isAdd = Vue.ref(false); |
57 | 57 | ||
58 | let columns = Vue.ref([{ | 58 | let columns = Vue.ref([{ |
59 | prop: 'nickname', | 59 | prop: 'nickname', |
@@ -64,6 +64,7 @@ export default { | @@ -64,6 +64,7 @@ export default { | ||
64 | title.value = "个人信息"; | 64 | title.value = "个人信息"; |
65 | componentName.value = "USER"; | 65 | componentName.value = "USER"; |
66 | props.parentNode.id = row.id; | 66 | props.parentNode.id = row.id; |
67 | + isAdd.value = false; | ||
67 | showDialog(true); | 68 | showDialog(true); |
68 | } | 69 | } |
69 | }, { | 70 | }, { |
@@ -107,6 +108,7 @@ export default { | @@ -107,6 +108,7 @@ export default { | ||
107 | title.value = "个人信息"; | 108 | title.value = "个人信息"; |
108 | componentName.value = "USER"; | 109 | componentName.value = "USER"; |
109 | props.parentNode.id = row.id; | 110 | props.parentNode.id = row.id; |
111 | + isAdd.value = false; | ||
110 | showDialog(true); | 112 | showDialog(true); |
111 | }, | 113 | }, |
112 | render: function (row) { | 114 | render: function (row) { |
@@ -128,6 +130,8 @@ export default { | @@ -128,6 +130,8 @@ export default { | ||
128 | componentName.value = "DOCUMENT"; | 130 | componentName.value = "DOCUMENT"; |
129 | docType.value = "THREE_PERSONAGE_NDA"; | 131 | docType.value = "THREE_PERSONAGE_NDA"; |
130 | docTypeName.value = "入场资料"; | 132 | docTypeName.value = "入场资料"; |
133 | + props.parentNode.id = row.id; | ||
134 | + props.treeNode.map.nodeType.code ="THREE_PERSONAGE_NDA"; | ||
131 | showDialog(true); | 135 | showDialog(true); |
132 | }, | 136 | }, |
133 | render: function (row) { | 137 | render: function (row) { |
@@ -148,6 +152,9 @@ export default { | @@ -148,6 +152,9 @@ export default { | ||
148 | componentName.value = "DOCUMENT"; | 152 | componentName.value = "DOCUMENT"; |
149 | docType.value = "THREE_MONTHLY_SUMMARY"; | 153 | docType.value = "THREE_MONTHLY_SUMMARY"; |
150 | docTypeName.value = "月度总结"; | 154 | docTypeName.value = "月度总结"; |
155 | + props.parentNode.id = row.id; | ||
156 | + | ||
157 | + props.treeNode.map.nodeType.code ="THREE_MONTHLY_SUMMARY"; | ||
151 | showDialog(true); | 158 | showDialog(true); |
152 | }, | 159 | }, |
153 | render: function (row) { | 160 | render: function (row) { |
@@ -165,10 +172,28 @@ export default { | @@ -165,10 +172,28 @@ export default { | ||
165 | dialogFlg.value = flg; | 172 | dialogFlg.value = flg; |
166 | } | 173 | } |
167 | 174 | ||
175 | + let showPopout = (val) => { | ||
176 | + dialogFlg.value = val; | ||
177 | + getPage(); | ||
178 | + } | ||
179 | + | ||
168 | let dataList = Vue.ref([]); | 180 | let dataList = Vue.ref([]); |
169 | let currentPage = Vue.ref(1); | 181 | let currentPage = Vue.ref(1); |
170 | let total = Vue.ref(0); | 182 | let total = Vue.ref(0); |
171 | 183 | ||
184 | + let add = () => { | ||
185 | + title.value = "个人信息录入"; | ||
186 | + componentName.value = "USER"; | ||
187 | + isAdd.value = true; | ||
188 | + showDialog(true); | ||
189 | + } | ||
190 | + | ||
191 | + let isAdmin = () => { | ||
192 | + let userRoleArr = proxy.$global.common.getUserRole(); | ||
193 | + let userName = proxy.$global.common.getUserName(); | ||
194 | + return userName != 'admin' && userName != 'root' && !userRoleArr.includes('pmp'); | ||
195 | + } | ||
196 | + | ||
172 | // 获取表格数据 | 197 | // 获取表格数据 |
173 | let getPage = (obj) => { | 198 | let getPage = (obj) => { |
174 | if (!props.treeNode.map || !props.treeNode.map.nodeType) { | 199 | if (!props.treeNode.map || !props.treeNode.map.nodeType) { |
@@ -197,7 +222,9 @@ export default { | @@ -197,7 +222,9 @@ export default { | ||
197 | } | 222 | } |
198 | }); | 223 | }); |
199 | } | 224 | } |
200 | - | 225 | + let refreshPage= () => { |
226 | + getPage(); | ||
227 | + } | ||
201 | 228 | ||
202 | // 挂载完 | 229 | // 挂载完 |
203 | Vue.onMounted(() => { | 230 | Vue.onMounted(() => { |
@@ -225,7 +252,12 @@ export default { | @@ -225,7 +252,12 @@ export default { | ||
225 | docTypeName, | 252 | docTypeName, |
226 | dialogFlg, | 253 | dialogFlg, |
227 | showDialog, | 254 | showDialog, |
228 | - componentName | 255 | + componentName, |
256 | + add, | ||
257 | + isAdd, | ||
258 | + showPopout, | ||
259 | + refreshPage, | ||
260 | + isAdmin | ||
229 | } | 261 | } |
230 | } | 262 | } |
231 | } | 263 | } |
@@ -17,11 +17,11 @@ | @@ -17,11 +17,11 @@ | ||
17 | <i class="iconfont icon-icon--yingbing" /> 人员基本信息 | 17 | <i class="iconfont icon-icon--yingbing" /> 人员基本信息 |
18 | </div> | 18 | </div> |
19 | <div style="padding-left: 40px;margin-bottom: 6px"> | 19 | <div style="padding-left: 40px;margin-bottom: 6px"> |
20 | - <el-form :rules="rules" ref="rule" :model="ruleForm" label-width="120px" :size="$global.elementSize" label-position="top" > | 20 | + <el-form :rules="rules" ref="rule" :model="ruleForm" label-width="120px" :size="$global.elementSize" label-position="right" > |
21 | <el-row :gutter="5"> | 21 | <el-row :gutter="5"> |
22 | <el-col :span="8"> | 22 | <el-col :span="8"> |
23 | <el-form-item label="姓名" prop="nickname" class="form-class"> | 23 | <el-form-item label="姓名" prop="nickname" class="form-class"> |
24 | - <el-input v-model="ruleForm.nickname" :readonly="true"></el-input> | 24 | + <el-input v-model="ruleForm.nickname" :readonly="whether"></el-input> |
25 | </el-form-item> | 25 | </el-form-item> |
26 | </el-col> | 26 | </el-col> |
27 | <el-col :span="8"> | 27 | <el-col :span="8"> |
@@ -91,7 +91,37 @@ | @@ -91,7 +91,37 @@ | ||
91 | </el-form-item> | 91 | </el-form-item> |
92 | </el-col> | 92 | </el-col> |
93 | </el-row> | 93 | </el-row> |
94 | - | 94 | + <el-row :gutter="5"> |
95 | + <el-col :span="8"> | ||
96 | + <el-form-item label="出生日期" prop="birthday" class="form-class"> | ||
97 | + <el-date-picker | ||
98 | + v-model="ruleForm.birthday" | ||
99 | + format="YYYY-MM-DD" | ||
100 | + value-format="YYYY-MM-DD" | ||
101 | + :readonly="isAdmin()" | ||
102 | + type="date" | ||
103 | + placeholder="选择日期"> | ||
104 | + </el-date-picker> | ||
105 | + </el-form-item> | ||
106 | + </el-col> | ||
107 | + <el-col :span="8"> | ||
108 | + <el-form-item label="入党时间" prop="partyDate" class="form-class"> | ||
109 | + <el-date-picker | ||
110 | + v-model="ruleForm.partyDate" | ||
111 | + format="YYYY-MM-DD" | ||
112 | + value-format="YYYY-MM-DD" | ||
113 | + :readonly="isAdmin()" | ||
114 | + type="date" | ||
115 | + placeholder="选择日期"> | ||
116 | + </el-date-picker> | ||
117 | + </el-form-item> | ||
118 | + </el-col> | ||
119 | + <el-col :span="8"> | ||
120 | + <el-form-item label="籍贯" prop="nativePlace" class="form-class"> | ||
121 | + <el-input v-model="ruleForm.nativePlace" :readonly="isAdmin()"></el-input> | ||
122 | + </el-form-item> | ||
123 | + </el-col> | ||
124 | + </el-row> | ||
95 | <el-row :gutter="5"> | 125 | <el-row :gutter="5"> |
96 | <el-col :span="8"> | 126 | <el-col :span="8"> |
97 | <el-form-item label="政治面貌" prop="politicsStatus" class="form-class"> | 127 | <el-form-item label="政治面貌" prop="politicsStatus" class="form-class"> |
@@ -99,26 +129,35 @@ | @@ -99,26 +129,35 @@ | ||
99 | </el-form-item> | 129 | </el-form-item> |
100 | </el-col> | 130 | </el-col> |
101 | <el-col :span="8"> | 131 | <el-col :span="8"> |
102 | - <el-form-item label="在职状态" prop="certificate" :readonly="true" class="form-class"> | ||
103 | - <el-radio-group v-model="ruleForm.state" :disabled="true"> | 132 | + <el-form-item label="在职状态" prop="state" class="form-class"> |
133 | + <el-radio-group v-model="ruleForm.state" :disabled="isAdmin()"> | ||
104 | <el-radio :label="1">在职</el-radio> | 134 | <el-radio :label="1">在职</el-radio> |
105 | <el-radio :label="2">离职</el-radio> | 135 | <el-radio :label="2">离职</el-radio> |
106 | </el-radio-group> | 136 | </el-radio-group> |
107 | </el-form-item> | 137 | </el-form-item> |
108 | </el-col> | 138 | </el-col> |
139 | + <el-col :span="8"> | ||
140 | + <el-form-item label="犯罪记录证明" prop="hasProof" class="form-class"> | ||
141 | + <el-input v-model="ruleForm.hasProof" :readonly="isAdmin()"></el-input> | ||
142 | + </el-form-item> | ||
143 | + </el-col> | ||
109 | </el-row> | 144 | </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" :readonly="isAdmin()"></el-input> | 145 | + <el-row :gutter=""> |
146 | + <el-col :span="12"> | ||
147 | + <el-form-item label="获得证书" prop="certificate"> | ||
148 | + <el-input v-model="ruleForm.certificate" :readonly="isAdmin()"></el-input> | ||
149 | + </el-form-item> | ||
150 | + </el-col> | ||
151 | + <el-col :span="12"> | ||
152 | + <el-form-item label="家庭住址" prop="post"> | ||
153 | + <el-input v-model="ruleForm.post" :readonly="isAdmin()"></el-input> | ||
115 | </el-form-item> | 154 | </el-form-item> |
116 | </el-col> | 155 | </el-col> |
117 | </el-row> | 156 | </el-row> |
118 | <el-row :gutter="5"> | 157 | <el-row :gutter="5"> |
119 | <el-col :span="24"> | 158 | <el-col :span="24"> |
120 | - <el-form-item label="家庭住址" prop="post" class="form-textarea"> | ||
121 | - <el-input v-model="ruleForm.post" type="textarea" :readonly="isAdmin()"></el-input> | 159 | + <el-form-item label="岗位职责" prop="responsibility" class="form-textarea"> |
160 | + <el-input v-model="ruleForm.responsibility" type="textarea" :readonly="isAdmin()"></el-input> | ||
122 | </el-form-item> | 161 | </el-form-item> |
123 | </el-col> | 162 | </el-col> |
124 | </el-row> | 163 | </el-row> |
@@ -126,9 +165,60 @@ | @@ -126,9 +165,60 @@ | ||
126 | <el-button type="primary" size="mini" @click="saveUser()">保存基本信息</el-button> | 165 | <el-button type="primary" size="mini" @click="saveUser()">保存基本信息</el-button> |
127 | </div> | 166 | </div> |
128 | </el-form> | 167 | </el-form> |
168 | + | ||
169 | + | ||
170 | + <div v-if="showMore"> | ||
171 | + <!--工作简历表格--> | ||
172 | + <div class="title" style="padding-left: 0px"> | ||
173 | + <i class="iconfont icon-icon--yingbing" /> 工作简历信息 <el-button v-show="!isAdmin()" type="primary" size="small" @click="addFamilyInfo('新增','work')" plain>新增</el-button> | ||
174 | + </div> | ||
175 | + <el-table border :data="workInfoTableData" stripe style="width: 100%" > | ||
176 | + <el-table-column label="序号" type="index" width="100" align="center"/> | ||
177 | + <el-table-column prop="place" align="center" label="工作单位" /> | ||
178 | + <el-table-column prop="position" align="center" label="职位" /> | ||
179 | + <el-table-column prop="startDate" align="center" label="入职日期" /> | ||
180 | + <el-table-column prop="endDate" align="center" label="离职日期" /> | ||
181 | + <el-table-column v-if="!isAdmin()" prop="address" align="center" label="操作" width="100" > | ||
182 | + <template #default="scope"> | ||
183 | + <div class="list-handle"> | ||
184 | + <span class="icon-bg"> | ||
185 | + <i class="el-icon-delete" title="删除" @click="deleteByType(scope.row,'work')"></i> | ||
186 | + </span> | ||
187 | + <span class="icon-bg"> | ||
188 | + <i class="el-icon-edit-outline" title="修改" @click="updateFamilyOrWorkInfo(scope.row,'work')"></i> | ||
189 | + </span> | ||
190 | + </div> | ||
191 | + </template> | ||
192 | + </el-table-column> | ||
193 | + </el-table> | ||
194 | + | ||
195 | + <!--家庭成员表格--> | ||
196 | + <div class="title" style="margin-top: 10px;padding-left: 0px"> | ||
197 | + <i class="iconfont icon-icon--yingbing" /> 家庭成员信息 <el-button v-show="!isAdmin()" type="primary" size="small" @click="addFamilyInfo('新增','family')" plain>新增</el-button> | ||
198 | + </div> | ||
199 | + <el-table border :data="familyInfoTableData" stripe style="width: 100%" > | ||
200 | + <el-table-column label="序号" type="index" width="100" align="center"/> | ||
201 | + <el-table-column prop="name" align="center" label="成员姓名" /> | ||
202 | + <el-table-column prop="appellation" align="center" label="称谓" /> | ||
203 | + <el-table-column prop="place" align="center" label="工作单位" /> | ||
204 | + <el-table-column prop="position" align="center" label="职位" /> | ||
205 | + <el-table-column v-if="!isAdmin()" prop="address" align="center" label="操作" width="100" > | ||
206 | + <template #default="scope"> | ||
207 | + <div class="list-handle"> | ||
208 | + <span class="icon-bg"> | ||
209 | + <i class="el-icon-delete" title="删除" @click="deleteByType(scope.row,'family')"></i> | ||
210 | + </span> | ||
211 | + <span class="icon-bg"> | ||
212 | + <i class="el-icon-edit-outline" title="修改" @click="updateFamilyOrWorkInfo(scope.row,'family')"></i> | ||
213 | + </span> | ||
214 | + </div> | ||
215 | + </template> | ||
216 | + </el-table-column> | ||
217 | + </el-table> | ||
218 | + </div> | ||
129 | </div> | 219 | </div> |
130 | <!--资产信息--> | 220 | <!--资产信息--> |
131 | - <div class="title"> | 221 | + <div class="title" v-if="showMore"> |
132 | <i class="iconfont icon-liebiaomoshi"/> 资产信息 | 222 | <i class="iconfont icon-liebiaomoshi"/> 资产信息 |
133 | <el-dropdown v-if="Object.keys(icon).length > 0 && !isAdmin()" size="mini" split-button @click="assetsAdd('bastion',`新建${icon['bastion'].name}资产`)" style="margin-left: 20px"> | 223 | <el-dropdown v-if="Object.keys(icon).length > 0 && !isAdmin()" size="mini" split-button @click="assetsAdd('bastion',`新建${icon['bastion'].name}资产`)" style="margin-left: 20px"> |
134 | <i class="icon el-icon-plus"/>添加{{icon['bastion'].name}} | 224 | <i class="icon el-icon-plus"/>添加{{icon['bastion'].name}} |
@@ -199,5 +289,93 @@ | @@ -199,5 +289,93 @@ | ||
199 | </template> | 289 | </template> |
200 | </cm-dialog> | 290 | </cm-dialog> |
201 | 291 | ||
292 | + <!--家庭人员信息弹框--> | ||
293 | + <cm-dialog :title="familyDiaTitle" width="60%" :showDialogVisible="familyDiaShow" @hidedialog="showDiaByType(false,'family')" :showFooter="true" @okfunc="saveOrUpdateByType('family',familyInfoFormRef)"> | ||
294 | + <template v-slot style="padding: 10px"> | ||
295 | + <el-form ref="familyInfoFormRef" :rules="familyOrWorkRules" :model="familyInfoForm" label-width="120px" :size="$global.elementSize" label-position="right" > | ||
296 | + <el-row :gutter="5"> | ||
297 | + <el-col :span="12"> | ||
298 | + <el-form-item label="id" prop="id" v-show="false" > | ||
299 | + <el-input v-model="familyInfoForm.id" :readonly="true"></el-input> | ||
300 | + </el-form-item> | ||
301 | + <el-form-item label="personId" prop="personId" v-show="false" > | ||
302 | + <el-input v-model="familyInfoForm.personId" :readonly="true"></el-input> | ||
303 | + </el-form-item> | ||
304 | + <el-form-item label="姓名" prop="name" class="form-class"> | ||
305 | + <el-input v-model="familyInfoForm.name"></el-input> | ||
306 | + </el-form-item> | ||
307 | + </el-col> | ||
308 | + <el-col :span="12"> | ||
309 | + <el-form-item label="称谓" prop="appellation" class="form-class"> | ||
310 | + <el-input v-model="familyInfoForm.appellation"></el-input> | ||
311 | + </el-form-item> | ||
312 | + </el-col> | ||
313 | + </el-row> | ||
314 | + <el-row :gutter="5"> | ||
315 | + <el-col :span="12"> | ||
316 | + <el-form-item label="工作单位" prop="place" class="form-class"> | ||
317 | + <el-input v-model="familyInfoForm.place"></el-input> | ||
318 | + </el-form-item> | ||
319 | + </el-col> | ||
320 | + <el-col :span="12"> | ||
321 | + <el-form-item label="职位" prop="position" class="form-class"> | ||
322 | + <el-input v-model="familyInfoForm.position"></el-input> | ||
323 | + </el-form-item> | ||
324 | + </el-col> | ||
325 | + </el-row> | ||
326 | + </el-form> | ||
327 | + </template> | ||
328 | + </cm-dialog> | ||
329 | + | ||
330 | + <!--工作简历弹框--> | ||
331 | + <cm-dialog :title="workDiaTitle" width="60%" :showDialogVisible="workDiaShow" @hidedialog="showDiaByType(false,'work')" :showFooter="true" @okfunc="saveOrUpdateByType('work',familyInfoFormRef)"> | ||
332 | + <template v-slot style="padding: 10px"> | ||
333 | + <el-form ref="familyInfoFormRef" :rules="familyOrWorkRules" :model="workInfoForm" label-width="120px" :size="$global.elementSize" label-position="right" > | ||
334 | + <el-row :gutter="5"> | ||
335 | + <el-col :span="12"> | ||
336 | + <el-form-item label="id" prop="id" v-show="false" > | ||
337 | + <el-input v-model="workInfoForm.id" :readonly="true"></el-input> | ||
338 | + </el-form-item> | ||
339 | + <el-form-item label="personId" prop="personId" v-show="false" > | ||
340 | + <el-input v-model="workInfoForm.personId" :readonly="true"></el-input> | ||
341 | + </el-form-item> | ||
342 | + <el-form-item label="工作单位" prop="place" class="form-class"> | ||
343 | + <el-input v-model="workInfoForm.place"></el-input> | ||
344 | + </el-form-item> | ||
345 | + </el-col> | ||
346 | + <el-col :span="12"> | ||
347 | + <el-form-item label="职位" prop="position" class="form-class"> | ||
348 | + <el-input v-model="workInfoForm.position"></el-input> | ||
349 | + </el-form-item> | ||
350 | + </el-col> | ||
351 | + </el-row> | ||
352 | + <el-row :gutter="5"> | ||
353 | + <el-col :span="12"> | ||
354 | + <el-form-item label="入职日期" prop="startDate" class="form-class"> | ||
355 | + <el-date-picker | ||
356 | + v-model="workInfoForm.startDate" | ||
357 | + format="YYYY-MM-DD" | ||
358 | + value-format="YYYY-MM-DD" | ||
359 | + type="date" | ||
360 | + placeholder="选择日期"> | ||
361 | + </el-date-picker> | ||
362 | + </el-form-item> | ||
363 | + </el-col> | ||
364 | + | ||
365 | + <el-col :span="12"> | ||
366 | + <el-form-item label="离职日期" prop="endDate" class="form-class"> | ||
367 | + <el-date-picker | ||
368 | + v-model="workInfoForm.endDate" | ||
369 | + format="YYYY-MM-DD" | ||
370 | + value-format="YYYY-MM-DD" | ||
371 | + type="date" | ||
372 | + placeholder="选择日期"> | ||
373 | + </el-date-picker> | ||
374 | + </el-form-item> | ||
375 | + </el-col> | ||
376 | + </el-row> | ||
377 | + </el-form> | ||
378 | + </template> | ||
379 | + </cm-dialog> | ||
202 | 380 | ||
203 | </div> | 381 | </div> |
@@ -12,19 +12,19 @@ const assets = (props, {attrs, slots, emit}) => { | @@ -12,19 +12,19 @@ const assets = (props, {attrs, slots, emit}) => { | ||
12 | 12 | ||
13 | //查询资产类型列表 | 13 | //查询资产类型列表 |
14 | let getAssetType = () => { | 14 | let getAssetType = () => { |
15 | - if(Object.keys(icon.value).length > 0){ | 15 | + if (Object.keys(icon.value).length > 0) { |
16 | return; | 16 | return; |
17 | } | 17 | } |
18 | proxy.$http.post(`/api-web/manage/ddic/findSucDdics/OPS_SECOND_PROPERTY`, {}, function (res) { | 18 | proxy.$http.post(`/api-web/manage/ddic/findSucDdics/OPS_SECOND_PROPERTY`, {}, function (res) { |
19 | if (res && res.data.length > 0) { | 19 | if (res && res.data.length > 0) { |
20 | icon.value = {}; | 20 | icon.value = {}; |
21 | - res.data.forEach(function(item, index, arr){ | 21 | + res.data.forEach(function (item, index, arr) { |
22 | let code = item.ddicCode; | 22 | let code = item.ddicCode; |
23 | let obj = {}; | 23 | let obj = {}; |
24 | // code = code.substring(code.lastIndexOf("_") + 1, code.length).toLowerCase(); | 24 | // code = code.substring(code.lastIndexOf("_") + 1, code.length).toLowerCase(); |
25 | - obj.name=item.ddicName; | ||
26 | - obj.icon=item.ddicDesc; | ||
27 | - icon.value[code] =obj; | 25 | + obj.name = item.ddicName; |
26 | + obj.icon = item.ddicDesc; | ||
27 | + icon.value[code] = obj; | ||
28 | }); | 28 | }); |
29 | } | 29 | } |
30 | }); | 30 | }); |
@@ -42,15 +42,14 @@ const assets = (props, {attrs, slots, emit}) => { | @@ -42,15 +42,14 @@ const assets = (props, {attrs, slots, emit}) => { | ||
42 | let assetsAdd = (type, msg) => { | 42 | let assetsAdd = (type, msg) => { |
43 | proxy.$http.get(`/api-web/person/assets/typeList/${type}`, {}, function (res) { | 43 | proxy.$http.get(`/api-web/person/assets/typeList/${type}`, {}, function (res) { |
44 | if (res && res.data && res.data.length > 0) { | 44 | if (res && res.data && res.data.length > 0) { |
45 | - btnClick('add',res.data,msg); | 45 | + btnClick('add', res.data, msg); |
46 | } else { | 46 | } else { |
47 | - proxy.$global.showMsg("没有配置属性!","warning"); | 47 | + proxy.$global.showMsg("没有配置属性!", "warning"); |
48 | } | 48 | } |
49 | }); | 49 | }); |
50 | } | 50 | } |
51 | 51 | ||
52 | 52 | ||
53 | - | ||
54 | /** | 53 | /** |
55 | * 新增资产 | 54 | * 新增资产 |
56 | * <p> | 55 | * <p> |
@@ -72,13 +71,13 @@ const assets = (props, {attrs, slots, emit}) => { | @@ -72,13 +71,13 @@ const assets = (props, {attrs, slots, emit}) => { | ||
72 | data = arr; | 71 | data = arr; |
73 | } | 72 | } |
74 | 73 | ||
75 | - data.map(function (v){ | 74 | + data.map(function (v) { |
76 | let str = v.extend; | 75 | let str = v.extend; |
77 | - if(str){ | 76 | + if (str) { |
78 | try { | 77 | try { |
79 | let json = JSON.parse(str); | 78 | let json = JSON.parse(str); |
80 | v.extend = json; | 79 | v.extend = json; |
81 | - }catch (e){ | 80 | + } catch (e) { |
82 | } | 81 | } |
83 | } | 82 | } |
84 | }) | 83 | }) |
@@ -92,12 +91,12 @@ const assets = (props, {attrs, slots, emit}) => { | @@ -92,12 +91,12 @@ const assets = (props, {attrs, slots, emit}) => { | ||
92 | } | 91 | } |
93 | 92 | ||
94 | 93 | ||
95 | - let checkAssets = () =>{ | 94 | + let checkAssets = () => { |
96 | let data = btnType.value.data; | 95 | let data = btnType.value.data; |
97 | let size = 0; | 96 | let size = 0; |
98 | - data.forEach(function (v){ | ||
99 | - if( !v.value || v.value == '' || v.value == null){ | ||
100 | - size ++; | 97 | + data.forEach(function (v) { |
98 | + if (!v.value || v.value == '' || v.value == null) { | ||
99 | + size++; | ||
101 | } | 100 | } |
102 | }) | 101 | }) |
103 | 102 | ||
@@ -112,15 +111,15 @@ const assets = (props, {attrs, slots, emit}) => { | @@ -112,15 +111,15 @@ const assets = (props, {attrs, slots, emit}) => { | ||
112 | */ | 111 | */ |
113 | let addAssets = () => { | 112 | let addAssets = () => { |
114 | let data = btnType.value.data | 113 | let data = btnType.value.data |
115 | - data.map(function (v){ | 114 | + data.map(function (v) { |
116 | v.extend = JSON.stringify(v.extend); | 115 | v.extend = JSON.stringify(v.extend); |
117 | }) | 116 | }) |
118 | 117 | ||
119 | - if(checkAssets()){ | ||
120 | - proxy.$global.showMsg(`请填写资产信息,不能全部为空!`,'warning'); | 118 | + if (checkAssets()) { |
119 | + proxy.$global.showMsg(`请填写资产信息,不能全部为空!`, 'warning'); | ||
121 | return; | 120 | return; |
122 | } | 121 | } |
123 | - proxy.$http.post(`/api-web/person/assets/add/${props.parentNode.id}`,data , function (res) { | 122 | + proxy.$http.post(`/api-web/person/assets/add/${props.parentNode.id}`, data, function (res) { |
124 | if (res && res.success) { | 123 | if (res && res.success) { |
125 | proxy.$global.showMsg("添加成功"); | 124 | proxy.$global.showMsg("添加成功"); |
126 | showDialog(false); | 125 | showDialog(false); |
@@ -138,12 +137,12 @@ const assets = (props, {attrs, slots, emit}) => { | @@ -138,12 +137,12 @@ const assets = (props, {attrs, slots, emit}) => { | ||
138 | */ | 137 | */ |
139 | let saveAssets = () => { | 138 | let saveAssets = () => { |
140 | let data = btnType.value.data | 139 | let data = btnType.value.data |
141 | - data.map(function (v){ | 140 | + data.map(function (v) { |
142 | v.extend = JSON.stringify(v.extend); | 141 | v.extend = JSON.stringify(v.extend); |
143 | }) | 142 | }) |
144 | 143 | ||
145 | - if(checkAssets()){ | ||
146 | - proxy.$global.showMsg(`请填写资产信息,不能全部为空!`,'warning'); | 144 | + if (checkAssets()) { |
145 | + proxy.$global.showMsg(`请填写资产信息,不能全部为空!`, 'warning'); | ||
147 | return; | 146 | return; |
148 | } | 147 | } |
149 | proxy.$http.post(`/api-web/person/assets/edit/${props.parentNode.id}`, data, function (res) { | 148 | proxy.$http.post(`/api-web/person/assets/edit/${props.parentNode.id}`, data, function (res) { |
@@ -162,12 +161,12 @@ const assets = (props, {attrs, slots, emit}) => { | @@ -162,12 +161,12 @@ const assets = (props, {attrs, slots, emit}) => { | ||
162 | * 时间:2021/11/3 20:14 | 161 | * 时间:2021/11/3 20:14 |
163 | */ | 162 | */ |
164 | let deleteAssets = (arr) => { | 163 | let deleteAssets = (arr) => { |
165 | - proxy.$global.confirm(`您确认永久删除该资产信息吗?`,function (){ | 164 | + proxy.$global.confirm(`您确认永久删除该资产信息吗?`, function () { |
166 | proxy.$http.post(`/api-web/person/assets/delete/${props.parentNode.id}`, arr, function (res) { | 165 | proxy.$http.post(`/api-web/person/assets/delete/${props.parentNode.id}`, arr, function (res) { |
167 | if (res && res.success) { | 166 | if (res && res.success) { |
168 | proxy.$global.showMsg("删除成功"); | 167 | proxy.$global.showMsg("删除成功"); |
169 | } else { | 168 | } else { |
170 | - proxy.$global.showMsg("删除失败,资产不存在或者已被删除!","error"); | 169 | + proxy.$global.showMsg("删除失败,资产不存在或者已被删除!", "error"); |
171 | } | 170 | } |
172 | showDialog(false); | 171 | showDialog(false); |
173 | getAssets(); | 172 | getAssets(); |
@@ -185,7 +184,11 @@ const assets = (props, {attrs, slots, emit}) => { | @@ -185,7 +184,11 @@ const assets = (props, {attrs, slots, emit}) => { | ||
185 | * 时间:2021/11/3 20:17 | 184 | * 时间:2021/11/3 20:17 |
186 | */ | 185 | */ |
187 | let showDialog = (flg) => { | 186 | let showDialog = (flg) => { |
188 | - op.value = flg; | 187 | + if (!props.isAdd) { |
188 | + op.value = flg; | ||
189 | + } else { | ||
190 | + proxy.$global.showMsg("请先添加用户!", "error"); | ||
191 | + } | ||
189 | } | 192 | } |
190 | 193 | ||
191 | let okFunc = () => { | 194 | let okFunc = () => { |
@@ -233,17 +236,32 @@ export default { | @@ -233,17 +236,32 @@ export default { | ||
233 | type: String, | 236 | type: String, |
234 | default: '' | 237 | default: '' |
235 | }, | 238 | }, |
239 | + isAdd: { | ||
240 | + type: Boolean, | ||
241 | + default: false | ||
242 | + } | ||
236 | }, | 243 | }, |
237 | data() { | 244 | data() { |
238 | - return { | ||
239 | - } | 245 | + return {} |
240 | }, | 246 | }, |
241 | setup(props, {attrs, slots, emit}) { | 247 | setup(props, {attrs, slots, emit}) { |
248 | + const refreshTree = Vue.inject('refreshTree'); | ||
242 | let height = Vue.ref(window.innerHeight - 130); | 249 | let height = Vue.ref(window.innerHeight - 130); |
250 | + //判定是否展示家庭成员、工作简历级资产列表 | ||
251 | + let showMore = Vue.ref(false); | ||
243 | 252 | ||
244 | const {proxy} = Vue.getCurrentInstance(); | 253 | const {proxy} = Vue.getCurrentInstance(); |
245 | let imageUrl = Vue.ref(''); | 254 | let imageUrl = Vue.ref(''); |
246 | - | 255 | + const familyInfoTableData = Vue.ref([]); |
256 | + // 家庭成员信息弹框显示标识 | ||
257 | + let familyDiaShow = Vue.ref(false); | ||
258 | + //家庭成员信息弹框标题 | ||
259 | + let familyDiaTitle = Vue.ref(''); | ||
260 | + const workInfoTableData = Vue.ref([]); | ||
261 | + // 简历信息弹框显示标识 | ||
262 | + let workDiaShow = Vue.ref(false); | ||
263 | + //简历信息弹框标题 | ||
264 | + let workDiaTitle = Vue.ref(''); | ||
247 | 265 | ||
248 | let ruleForm = Vue.ref({ | 266 | let ruleForm = Vue.ref({ |
249 | nickname: '', | 267 | nickname: '', |
@@ -256,11 +274,36 @@ export default { | @@ -256,11 +274,36 @@ export default { | ||
256 | company: '', | 274 | company: '', |
257 | headImgUrl: '', | 275 | headImgUrl: '', |
258 | post: '', | 276 | post: '', |
259 | - projectId: null, | 277 | + // projectId: null, |
260 | quitTime: '', | 278 | quitTime: '', |
261 | state: '', | 279 | state: '', |
262 | - idcard:'', | ||
263 | - politicsStatus:'' | 280 | + idcard: '', |
281 | + politicsStatus: '', | ||
282 | + hasProof: '', //是否有无犯罪证明 joke add 20221012 | ||
283 | + nativePlace: '', //籍贯 joke add 20221012 | ||
284 | + birthday: '', //出生日期 joke add 20221012 | ||
285 | + partyDate: '', //入党日期 joke add 20221012 | ||
286 | + responsibility: '' //岗位职责 joke add 20221012 | ||
287 | + }) | ||
288 | + | ||
289 | + let familyInfoForm = Vue.ref({ | ||
290 | + id: '', | ||
291 | + personId: props.parentNode.id, //用户id | ||
292 | + name: '', //家庭成员姓名 | ||
293 | + appellation: '', //家庭成员称谓 | ||
294 | + place: '', //家庭成员工作单位 | ||
295 | + position: '', //家庭成员职位 | ||
296 | + }) | ||
297 | + | ||
298 | + let familyInfoFormRef = Vue.ref(''); | ||
299 | + | ||
300 | + let workInfoForm = Vue.ref({ | ||
301 | + id: '', | ||
302 | + personId: props.parentNode.id, //用户id | ||
303 | + place: '', //工作单位 | ||
304 | + position: '', //职位 | ||
305 | + startDate: '', //入职日期 | ||
306 | + endDate: '', //离职日期 | ||
264 | }) | 307 | }) |
265 | 308 | ||
266 | 309 | ||
@@ -273,6 +316,12 @@ export default { | @@ -273,6 +316,12 @@ export default { | ||
273 | }, function (res) { | 316 | }, function (res) { |
274 | if (res && res.object) { | 317 | if (res && res.object) { |
275 | ruleForm.value = res.object | 318 | ruleForm.value = res.object |
319 | + //如果为新录入,则屏蔽部分页面(家庭成员、工作经历、获得奖励及资产信息) | ||
320 | + if (res.object.id != null && res.object.id != '') { | ||
321 | + showMore.value = true; | ||
322 | + } | ||
323 | + proxy.familyInfoTableData = res.object.familyInfoList; | ||
324 | + proxy.workInfoTableData = res.object.workExperienceList; | ||
276 | } else { | 325 | } else { |
277 | ruleForm.value = res.object | 326 | ruleForm.value = res.object |
278 | } | 327 | } |
@@ -282,6 +331,94 @@ export default { | @@ -282,6 +331,94 @@ export default { | ||
282 | imageUrl.value = `${sessionStorage.getItem('domainName')}/api-web/bOpsPerson/downloadFile?id=${props.parentNode.id}&access_token=${localStorage.getItem('access_token')}` | 331 | imageUrl.value = `${sessionStorage.getItem('domainName')}/api-web/bOpsPerson/downloadFile?id=${props.parentNode.id}&access_token=${localStorage.getItem('access_token')}` |
283 | } | 332 | } |
284 | 333 | ||
334 | + let refreshTable = () => { | ||
335 | + proxy.$http.get("/api-web/bOpsPerson/search", { | ||
336 | + "nickname": props.parentNode.label, | ||
337 | + "id": props.parentNode.id, | ||
338 | + "projectId": props.projectId | ||
339 | + }, function (res) { | ||
340 | + if (res && res.object) { | ||
341 | + //如果为新录入,则屏蔽部分页面(家庭成员、工作经历、获得奖励及资产信息) | ||
342 | + if (res.object.id != null && res.object.id != '') { | ||
343 | + showMore.value = true; | ||
344 | + } | ||
345 | + proxy.familyInfoTableData = res.object.familyInfoList; | ||
346 | + proxy.workInfoTableData = res.object.workExperienceList; | ||
347 | + } | ||
348 | + }); | ||
349 | + | ||
350 | + //图片回显 | ||
351 | + imageUrl.value = `${sessionStorage.getItem('domainName')}/api-web/bOpsPerson/downloadFile?id=${props.parentNode.id}&access_token=${localStorage.getItem('access_token')}` | ||
352 | + } | ||
353 | + | ||
354 | + //点击家庭成员信息的新增按钮事件 | ||
355 | + let showDiaByType = (flg, type) => { | ||
356 | + if (type === 'family') { | ||
357 | + //展示新增或编辑页面 | ||
358 | + familyDiaShow.value = flg; | ||
359 | + if (flg === false) { | ||
360 | + familyInfoForm.value = { | ||
361 | + id: '', | ||
362 | + personId: props.parentNode.id, //用户id | ||
363 | + name: '', //家庭成员姓名 | ||
364 | + appellation: '', //家庭成员称谓 | ||
365 | + place: '', //家庭成员工作单位 | ||
366 | + position: '', //家庭成员职位 | ||
367 | + } | ||
368 | + } | ||
369 | + } else if (type === 'work') { | ||
370 | + //展示新增或编辑页面 | ||
371 | + workDiaShow.value = flg; | ||
372 | + if (flg === false) { | ||
373 | + workInfoForm.value = { | ||
374 | + id: '', | ||
375 | + personId: props.parentNode.id, //用户id | ||
376 | + place: '', //工作单位 | ||
377 | + position: '', //职位 | ||
378 | + startDate: '', //入职日期 | ||
379 | + endDate: '', //离职日期 | ||
380 | + } | ||
381 | + } | ||
382 | + } | ||
383 | + } | ||
384 | + | ||
385 | + let seTitleByType = (name, type) => { | ||
386 | + if (type === 'family') { | ||
387 | + familyDiaTitle.value = name + '家庭成员'; | ||
388 | + } else if (type === 'work') { | ||
389 | + workDiaTitle.value = name + '工作经历'; | ||
390 | + } | ||
391 | + } | ||
392 | + | ||
393 | + //点击家庭成员新增按钮 | ||
394 | + let addFamilyInfo = (name, type) => { | ||
395 | + showDiaByType(true, type); | ||
396 | + seTitleByType(name, type); | ||
397 | + } | ||
398 | + //点击修改按钮 | ||
399 | + let updateFamilyOrWorkInfo = (row, type) => { | ||
400 | + //获取数据 | ||
401 | + if (type === 'family') { | ||
402 | + familyInfoForm.value = { | ||
403 | + id: row.id, | ||
404 | + personId: props.parentNode.id, //用户id | ||
405 | + name: row.name, //家庭成员姓名 | ||
406 | + appellation: row.appellation, //家庭成员称谓 | ||
407 | + place: row.place, //家庭成员工作单位 | ||
408 | + position: row.position, //家庭成员职位 | ||
409 | + } | ||
410 | + } else if (type === 'work') { | ||
411 | + workInfoForm.value = { | ||
412 | + id: row.id, | ||
413 | + personId: props.parentNode.id, //用户id | ||
414 | + place: row.place, //工作单位 | ||
415 | + position: row.position, //职位 | ||
416 | + startDate: row.startDate, //入职日期 | ||
417 | + endDate: row.endDate, //离职日期 | ||
418 | + } | ||
419 | + } | ||
420 | + addFamilyInfo('编辑', type); | ||
421 | + } | ||
285 | 422 | ||
286 | /** | 423 | /** |
287 | * @Author LH | 424 | * @Author LH |
@@ -290,13 +427,13 @@ export default { | @@ -290,13 +427,13 @@ export default { | ||
290 | * @param callback | 427 | * @param callback |
291 | * @returns {*} | 428 | * @returns {*} |
292 | */ | 429 | */ |
293 | - const checkTel= (rule, value, callback) => { | ||
294 | - var re1=/^0\d{2}-[1-9]\d{7}$/; | ||
295 | - var re2=/^0\d{3}-[1-9]\{6,7}$/; | ||
296 | - var result=re1.test(value)||re2.test(value); | 430 | + const checkTel = (rule, value, callback) => { |
431 | + var re1 = /^0\d{2}-[1-9]\d{7}$/; | ||
432 | + var re2 = /^0\d{3}-[1-9]\{6,7}$/; | ||
433 | + var result = re1.test(value) || re2.test(value); | ||
297 | if (!result && value) { | 434 | if (!result && value) { |
298 | return callback(new Error('请输入正确的座机号!')) | 435 | return callback(new Error('请输入正确的座机号!')) |
299 | - }else{ | 436 | + } else { |
300 | callback() | 437 | callback() |
301 | } | 438 | } |
302 | } | 439 | } |
@@ -307,42 +444,94 @@ export default { | @@ -307,42 +444,94 @@ export default { | ||
307 | * @param callback | 444 | * @param callback |
308 | * @returns {*} | 445 | * @returns {*} |
309 | */ | 446 | */ |
310 | - const checkPhone= (rule, tel, callback) => { | ||
311 | - var mobile = /^1[0-9]\d{9}$/; | 447 | + const checkPhone = (rule, tel, callback) => { |
448 | + var mobile = /^1[0-9]\d{9}$/; | ||
312 | if (tel != '' && !mobile.test(tel)) { | 449 | if (tel != '' && !mobile.test(tel)) { |
313 | callback(new Error('请输入正确的手机号!')) | 450 | callback(new Error('请输入正确的手机号!')) |
314 | } else { | 451 | } else { |
315 | callback(); | 452 | callback(); |
316 | } | 453 | } |
317 | } | 454 | } |
318 | - const checkIdCard=(rule, idCard, callback) => { | 455 | + const checkIdCard = (rule, idCard, callback) => { |
319 | var pattern = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; | 456 | var pattern = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; |
320 | if (idCard != '' && !pattern.test(idCard)) { | 457 | if (idCard != '' && !pattern.test(idCard)) { |
321 | - callback(new Error('身份证校验失败!')); | 458 | + callback(new Error('身份证校验失败!')); |
322 | } else { | 459 | } else { |
323 | callback(); | 460 | callback(); |
324 | } | 461 | } |
325 | } | 462 | } |
326 | 463 | ||
464 | + const validatorDate = (rule, value, callback) => { | ||
465 | + return value !== '' ? callback() : callback(new Error(rule.message)); | ||
466 | + }; | ||
467 | + | ||
327 | /** | 468 | /** |
328 | * @author LH | 469 | * @author LH |
329 | * 表单规则校验 | 470 | * 表单规则校验 |
330 | */ | 471 | */ |
331 | - let rules=Vue.ref({ | 472 | + let rules = Vue.ref({ |
332 | nickname: [ | 473 | nickname: [ |
333 | - { message: '请输入姓名', trigger: 'blur' } | 474 | + {required: true, message: '请输入姓名', trigger: 'blur'} |
475 | + ], | ||
476 | + sex: [ | ||
477 | + {required: true, message: '请选择性别', trigger: 'blur'} | ||
334 | ], | 478 | ], |
335 | phone: [ | 479 | phone: [ |
336 | - { validator: checkPhone, trigger: 'blur' } | 480 | + {required: true, message: '请输入手机号', trigger: 'blur'}, |
481 | + {validator: checkPhone,message: '请输入正确的手机号' , trigger: 'blur'} | ||
337 | ], | 482 | ], |
338 | company: [ | 483 | company: [ |
339 | - { message:'请输入所在公司', trigger: 'blur' } | 484 | + {required: true, message: '请输入所在公司', trigger: 'blur'} |
340 | ], | 485 | ], |
341 | idcard: [ | 486 | idcard: [ |
342 | - { validator:checkIdCard,message:'请输入正确的身份证号', trigger: 'blur'} | 487 | + {required: true, message: '请输入身份证号', trigger: 'blur'}, |
488 | + {validator: checkIdCard, message: '请输入正确的身份证号', trigger: 'blur'} | ||
489 | + ], | ||
490 | + entryTime: [ | ||
491 | + {required: true, message: '请选择入职时间', trigger: 'blur'} | ||
492 | + ], | ||
493 | + state: [ | ||
494 | + {required: true, message: '请选择在职状态', trigger: 'blur'} | ||
495 | + ], | ||
496 | + university: [ | ||
497 | + {required: true, message: '请输入毕业院校', trigger: 'blur'} | ||
498 | + ], | ||
499 | + education: [ | ||
500 | + {required: true, message: '请输入学历', trigger: 'blur'} | ||
343 | ] | 501 | ] |
344 | }); | 502 | }); |
345 | 503 | ||
504 | + let familyOrWorkRules = Vue.ref({ | ||
505 | + name: [ | ||
506 | + {required: true, message: '请输入姓名'}, | ||
507 | + {message: '请输入姓名', trigger: 'blur'} | ||
508 | + ], | ||
509 | + appellation: [ | ||
510 | + {required: true, message: '请输入称谓'}, | ||
511 | + {message: '请输入称谓', trigger: 'blur'} | ||
512 | + ], | ||
513 | + place: [ | ||
514 | + {required: true, message: '请输入工作单位'}, | ||
515 | + {message: '请输入工作单位', trigger: 'blur'} | ||
516 | + ], | ||
517 | + position: [ | ||
518 | + {required: true, message: '请输入职位'}, | ||
519 | + {message: '请输入职位', trigger: 'blur'} | ||
520 | + ], | ||
521 | + startDate: [ | ||
522 | + {required: true, message: '请选择入职日期'}, | ||
523 | + {validator: validatorDate, message: '请选择入职日期', trigger: 'blur'} | ||
524 | + ], | ||
525 | + endDate: [ | ||
526 | + {required: true, message: '请选择离职日期'}, | ||
527 | + {validator: validatorDate, message: '请选择离职日期', trigger: 'blur'} | ||
528 | + ], | ||
529 | + }); | ||
530 | + | ||
531 | + //调用基础页面的左侧树获取接口,刷新左侧树 joke add 20221128 | ||
532 | + let refreshMainTree = () => { | ||
533 | + refreshTree(); | ||
534 | + } | ||
346 | 535 | ||
347 | /** | 536 | /** |
348 | * @EDITOR LH | 537 | * @EDITOR LH |
@@ -350,36 +539,86 @@ export default { | @@ -350,36 +539,86 @@ export default { | ||
350 | */ | 539 | */ |
351 | // 保存用户信息 | 540 | // 保存用户信息 |
352 | let saveUser = () => { | 541 | let saveUser = () => { |
353 | - proxy.$refs.rule.validate((valid) => { | ||
354 | - if (valid) { | ||
355 | - console.log('submit!!'); | ||
356 | - proxy.$http.post("/api-web/bOpsPerson/saveOrUpdate", ruleForm.value, function (res) { | ||
357 | - if (res && res.code == 0) { | ||
358 | - proxy.$global.showMsg('保存成功!'); | 542 | + if (props.treeNode.map == undefined) { |
543 | + proxy.$global.showMsg('请先添加业务', 'warning'); | ||
544 | + emit('showPopout', false) | ||
545 | + } | ||
546 | + proxy.$refs.rule.validate((valid) => { | ||
547 | + if (valid) { | ||
548 | + console.log('submit!!'); | ||
549 | + ruleForm.value.busId = props.treeNode.map.nodeType.projectId; | ||
550 | + proxy.$http.post("/api-web/bOpsPerson/saveOrUpdate", ruleForm.value, function (res) { | ||
551 | + if (res && res.code == 0) { | ||
552 | + proxy.$global.showMsg('保存成功!'); | ||
553 | + if (props.isAdd){ //新增时 | ||
554 | + //刷新左侧树 | ||
555 | + refreshMainTree(); | ||
359 | } | 556 | } |
360 | - }); | ||
361 | - } else { | ||
362 | - console.log('error submit!!'); | ||
363 | - return false; | ||
364 | - } | ||
365 | - }); | 557 | + } |
558 | + emit('showPopout', false) | ||
559 | + }); | ||
560 | + } else { | ||
561 | + console.log('error submit!!'); | ||
562 | + return false; | ||
563 | + } | ||
564 | + }); | ||
366 | 565 | ||
566 | + } | ||
567 | + | ||
568 | + let saveOrUpdateByType = (type, rules) => { | ||
569 | + let msg = '新增'; | ||
570 | + var data = {}; | ||
571 | + if (type === 'family') { | ||
572 | + if (familyDiaTitle.value.indexOf('新增') == -1) { //表示编辑 | ||
573 | + msg = '编辑'; | ||
574 | + } | ||
575 | + data = familyInfoForm.value; | ||
576 | + } else if (type === 'work') { | ||
577 | + if (workDiaTitle.value.indexOf('新增') == -1) { //表示编辑 | ||
578 | + msg = '编辑'; | ||
579 | + } | ||
580 | + data = workInfoForm.value; | ||
367 | } | 581 | } |
582 | + rules.validate((valid) => { | ||
583 | + if (valid) { | ||
584 | + proxy.$http.post("/api-web/bOpsPerson/saveOrUpdateByType?type=" + type, data, function (res) { | ||
585 | + if (res && res.success == true) { | ||
586 | + proxy.$global.showMsg(msg + '成功!'); | ||
587 | + showDiaByType(false, type); | ||
588 | + refreshTable(); | ||
589 | + } | ||
590 | + }); | ||
591 | + } | ||
592 | + }) | ||
593 | + } | ||
594 | + //删除 | ||
595 | + let deleteByType = (row, type) => { | ||
596 | + proxy.$http.post("/api-web/bOpsPerson/deleteByType?type=" + type + "&ids=" + row.id, {}, function (res) { | ||
597 | + if (res && res.success == true) { | ||
598 | + proxy.$global.showMsg('删除成功!'); | ||
599 | + refreshTable(); | ||
600 | + } | ||
601 | + }); | ||
602 | + } | ||
368 | 603 | ||
369 | 604 | ||
370 | let getFile = (param) => { | 605 | let getFile = (param) => { |
371 | - let fileObj = param.file | ||
372 | - let params = { | ||
373 | - file: fileObj, | ||
374 | - id: props.parentNode.id | ||
375 | - } | ||
376 | - // 上传文件 | ||
377 | - proxy.$http.uploadFile("/api-web/bOpsPerson/uploadFile", params, function (res) { | ||
378 | - if (res && res.success) { | ||
379 | - proxy.$global.showMsg("上传成功!"); | 606 | + if (!props.isAdd) { |
607 | + let fileObj = param.file | ||
608 | + let params = { | ||
609 | + file: fileObj, | ||
610 | + id: props.parentNode.id | ||
380 | } | 611 | } |
381 | - }) | ||
382 | - imageUrl.value = URL.createObjectURL(fileObj); | 612 | + // 上传文件 |
613 | + proxy.$http.uploadFile("/api-web/bOpsPerson/uploadFile", params, function (res) { | ||
614 | + if (res && res.success) { | ||
615 | + proxy.$global.showMsg("上传成功!"); | ||
616 | + } | ||
617 | + }) | ||
618 | + imageUrl.value = URL.createObjectURL(fileObj); | ||
619 | + } else { | ||
620 | + proxy.$global.showMsg("请先添加用户!", "error"); | ||
621 | + } | ||
383 | } | 622 | } |
384 | 623 | ||
385 | let beforeAvatarUpload = (file) => { | 624 | let beforeAvatarUpload = (file) => { |
@@ -411,12 +650,16 @@ export default { | @@ -411,12 +650,16 @@ export default { | ||
411 | getAssetType, | 650 | getAssetType, |
412 | icon | 651 | icon |
413 | } = assets(props, {attrs, slots, emit}); | 652 | } = assets(props, {attrs, slots, emit}); |
414 | - | 653 | + let whether = Vue.ref(true); |
415 | // // 挂载完 | 654 | // // 挂载完 |
416 | Vue.onMounted(() => { | 655 | Vue.onMounted(() => { |
656 | + if (!props.isAdd) { | ||
657 | + getPage(); | ||
658 | + getAssets(); | ||
659 | + } else { | ||
660 | + whether.value = false; | ||
661 | + } | ||
417 | getAssetType(); | 662 | getAssetType(); |
418 | - getPage(); | ||
419 | - getAssets(); | ||
420 | }) | 663 | }) |
421 | 664 | ||
422 | // 监听编辑状态 | 665 | // 监听编辑状态 |
@@ -424,6 +667,7 @@ export default { | @@ -424,6 +667,7 @@ export default { | ||
424 | getAssetType(); | 667 | getAssetType(); |
425 | getPage(); | 668 | getPage(); |
426 | getAssets(); | 669 | getAssets(); |
670 | + refreshTable(); | ||
427 | }); | 671 | }); |
428 | return { | 672 | return { |
429 | imageUrl, | 673 | imageUrl, |
@@ -447,6 +691,26 @@ export default { | @@ -447,6 +691,26 @@ export default { | ||
447 | // 资产属性 | 691 | // 资产属性 |
448 | icon, | 692 | icon, |
449 | rules, | 693 | rules, |
694 | + familyInfoTableData, | ||
695 | + addFamilyInfo, | ||
696 | + showDiaByType, | ||
697 | + seTitleByType, | ||
698 | + saveOrUpdateByType, | ||
699 | + familyDiaShow, | ||
700 | + familyDiaTitle, | ||
701 | + familyInfoForm, | ||
702 | + deleteByType, | ||
703 | + workDiaShow, | ||
704 | + workDiaTitle, | ||
705 | + workInfoForm, | ||
706 | + updateFamilyOrWorkInfo, | ||
707 | + familyOrWorkRules, | ||
708 | + familyInfoFormRef, | ||
709 | + whether, | ||
710 | + showMore, | ||
711 | + refreshTable, | ||
712 | + refreshMainTree, | ||
713 | + refreshTree | ||
450 | } | 714 | } |
451 | } | 715 | } |
452 | } | 716 | } |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <el-row :gutter="5" > | 2 | <el-row :gutter="5" > |
3 | <el-col :span="4" > | 3 | <el-col :span="4" > |
4 | <div class="cm-card" :style="{'min-height':height+'px','max-height':height+'px','height':'100%','overflow-y':'auto','overflow-x':'hidden'}"> | 4 | <div class="cm-card" :style="{'min-height':height+'px','max-height':height+'px','height':'100%','overflow-y':'auto','overflow-x':'hidden'}"> |
5 | - <el-tree :data="dataSource" :default-expanded-keys="[1]" :props="defaultProps" > | 5 | + <el-tree :data="dataSource" accordion :default-expanded-keys="defaultExpandedkeys" node-key="id" :props="defaultProps" > |
6 | <template #default="{ node, data }"> | 6 | <template #default="{ node, data }"> |
7 | <div style=" width: 100%;"> | 7 | <div style=" width: 100%;"> |
8 | <div style="width: 85%;max-width: 85%;overflow: hidden;text-overflow: ellipsis;text-align: left;" @click="handleNodeClick(data)" :title="node.label"> | 8 | <div style="width: 85%;max-width: 85%;overflow: hidden;text-overflow: ellipsis;text-align: left;" @click="handleNodeClick(data)" :title="node.label"> |
@@ -40,10 +40,11 @@ export default { | @@ -40,10 +40,11 @@ export default { | ||
40 | 40 | ||
41 | }, | 41 | }, |
42 | setup() { | 42 | setup() { |
43 | - const {proxy} = Vue.getCurrentInstance() | 43 | + const {proxy} = Vue.getCurrentInstance(); |
44 | let height = Vue.ref(window.innerHeight - 20); | 44 | let height = Vue.ref(window.innerHeight - 20); |
45 | let dataSource = Vue.ref([]); | 45 | let dataSource = Vue.ref([]); |
46 | let componentName = Vue.ref('COLLECT_ALL'); | 46 | let componentName = Vue.ref('COLLECT_ALL'); |
47 | + let defaultExpandedkeys = Vue.ref([]); | ||
47 | // 当前点击节点 | 48 | // 当前点击节点 |
48 | let treeNode = Vue.ref({}); | 49 | let treeNode = Vue.ref({}); |
49 | let parentNode = Vue.ref({}); | 50 | let parentNode = Vue.ref({}); |
@@ -53,7 +54,27 @@ export default { | @@ -53,7 +54,27 @@ export default { | ||
53 | let pageSize = Vue.ref(10) | 54 | let pageSize = Vue.ref(10) |
54 | let canAddFolder = Vue.ref(true); | 55 | let canAddFolder = Vue.ref(true); |
55 | 56 | ||
57 | + //刷新左侧树,提供给用户新增页面调用使用 joke add 20221128 | ||
58 | + let refreshTree = () => { | ||
59 | + defaultExpandedkeys.value = []; | ||
60 | + reloadTree(); | ||
61 | + } | ||
62 | + Vue.provide("refreshTree", refreshTree); | ||
56 | 63 | ||
64 | + let reloadTree = () => { | ||
65 | + var params = { | ||
66 | + username: localStorage.getItem("lgn"), | ||
67 | + }; | ||
68 | + proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) { | ||
69 | + if (res && res.data) { | ||
70 | + dataSource.value = res.data; | ||
71 | + //设置默认展开节点 | ||
72 | + defaultExpandedkeys.value = [treeNode.value.id,treeNode.value.parentId,parentNode.value.id,parentNode.value.parentId]; | ||
73 | + } else { | ||
74 | + } | ||
75 | + }, function () { | ||
76 | + }); | ||
77 | + } | ||
57 | // 搜索 | 78 | // 搜索 |
58 | let getTree = () => { | 79 | let getTree = () => { |
59 | var params = { | 80 | var params = { |
@@ -64,7 +85,12 @@ export default { | @@ -64,7 +85,12 @@ export default { | ||
64 | proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) { | 85 | proxy.$http.get("/api-web/bOpsProject/getTree", params, function (res) { |
65 | if (res && res.data) { | 86 | if (res && res.data) { |
66 | dataSource.value = res.data; | 87 | dataSource.value = res.data; |
67 | - treeNode.value = res.data[0]; | 88 | + if (res.data.length >0){ |
89 | + //默认打开首个项目 | ||
90 | + defaultExpandedkeys.value = [res.data[0].id]; | ||
91 | + projectId.value = res.data[0].dataList[0].id; | ||
92 | + treeNode.value = res.data[0]; | ||
93 | + } | ||
68 | } else { | 94 | } else { |
69 | proxy.$global.showMsg('暂无数据!'); | 95 | proxy.$global.showMsg('暂无数据!'); |
70 | } | 96 | } |
@@ -110,7 +136,9 @@ export default { | @@ -110,7 +136,9 @@ export default { | ||
110 | pageSize.value = 10; | 136 | pageSize.value = 10; |
111 | } | 137 | } |
112 | getParent(dataSource.value, data.parentId); | 138 | getParent(dataSource.value, data.parentId); |
113 | - projectId.value = data.map.nodeType.projectId; | 139 | + if (data.level==1){ |
140 | + projectId.value = data.map.nodeType.projectId; | ||
141 | + } | ||
114 | treeNode.value = data; | 142 | treeNode.value = data; |
115 | componentName.value = comName; | 143 | componentName.value = comName; |
116 | } | 144 | } |
@@ -129,7 +157,9 @@ export default { | @@ -129,7 +157,9 @@ export default { | ||
129 | componentName, | 157 | componentName, |
130 | docType, | 158 | docType, |
131 | docTypeName, | 159 | docTypeName, |
132 | - canAddFolder | 160 | + canAddFolder, |
161 | + refreshTree, | ||
162 | + defaultExpandedkeys | ||
133 | }; | 163 | }; |
134 | }, | 164 | }, |
135 | } | 165 | } |
-
Please register or login to post a comment