Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-v32-xwx
Showing
27 changed files
with
315 additions
and
161 deletions
@@ -24,7 +24,7 @@ layui.define(['xmSelect', 'md5'], function (exports) { | @@ -24,7 +24,7 @@ layui.define(['xmSelect', 'md5'], function (exports) { | ||
24 | domainAssetsManage: sessionStorage.getItem('domainAssetsManage'), // 资产系统地址 | 24 | domainAssetsManage: sessionStorage.getItem('domainAssetsManage'), // 资产系统地址 |
25 | graphEditorOrigin: sessionStorage.getItem('graphEditorOrigin'), // 拓扑系统地址 | 25 | graphEditorOrigin: sessionStorage.getItem('graphEditorOrigin'), // 拓扑系统地址 |
26 | workflowName: sessionStorage.getItem('workflow'),//流程系统地址 | 26 | workflowName: sessionStorage.getItem('workflow'),//流程系统地址 |
27 | - domainCMDBName: "http://120.236.178.177:7180/HGKJCMDB", //杭州咨源老cmdb系统地址 | 27 | + domainCMDBName: "http://80.12.147.24:8888/hgkjcmdb", //杭州咨源老cmdb系统地址 |
28 | lineTimer: null,//性能曲线图全局定时器 | 28 | lineTimer: null,//性能曲线图全局定时器 |
29 | detailTimer: [],//详细页的全局定时器 | 29 | detailTimer: [],//详细页的全局定时器 |
30 | alarmTimer: null,//首页告警刷新定时器 | 30 | alarmTimer: null,//首页告警刷新定时器 |
@@ -2546,17 +2546,17 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -2546,17 +2546,17 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
2546 | }, | 2546 | }, |
2547 | {field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'}, | 2547 | {field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'}, |
2548 | // {field: 'diskSize', title: '磁盘总大小', minWidth: 120, align: 'center'}, | 2548 | // {field: 'diskSize', title: '磁盘总大小', minWidth: 120, align: 'center'}, |
2549 | - {field: 'fileSysUseRate', title: '文件系统使用率(最大)', align: 'center', minWidth: x_185, templet: '#fileUseRateTpl', sort: true}, | ||
2550 | - {field: 'diskBusyRate', title: '磁盘繁忙率(最大)', minWidth: x_160, align: 'center', sort: true, templet: '<div>{{d.diskBusyRate}}%</div>'}, | ||
2551 | - {field: 'cpuCores', title: '单个CPU核数', align: 'center', minWidth: x_140, sort: true, templet: '#cpuCoresTpl'}, | ||
2552 | - {field: 'cpuNum', title: '主机CPU总核数', align: 'center', minWidth: x_150, sort: true, templet: '#cpuNumTpl'}, | ||
2553 | - {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_120, templet: '#cpuRateTpl', sort: true}, | 2549 | + // {field: 'fileSysUseRate', title: '文件系统使用率(最大)', align: 'center', minWidth: x_185, templet: '#fileUseRateTpl', sort: true}, |
2550 | + // {field: 'diskBusyRate', title: '磁盘繁忙率(最大)', minWidth: x_160, align: 'center', sort: true, templet: '<div>{{d.diskBusyRate}}%</div>'}, | ||
2551 | + // {field: 'cpuCores', title: '单个CPU核数', align: 'center', minWidth: x_140, sort: true, templet: '#cpuCoresTpl'}, | ||
2552 | + // {field: 'cpuNum', title: '主机CPU总核数', align: 'center', minWidth: x_150, sort: true, templet: '#cpuNumTpl'}, | ||
2553 | + // {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_120, templet: '#cpuRateTpl', sort: true}, | ||
2554 | {field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.memorySize}} GB</div>'}, | 2554 | {field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.memorySize}} GB</div>'}, |
2555 | - {field: 'cacheUsed', title: '缓存总大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.cacheUsed}} GB</div>'}, | ||
2556 | - {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_120, templet: '#memoryRateTpl', sort: true}, | ||
2557 | - {field: 'vmmemoryUseRate', title: '虚拟内存使用率', align: 'center', minWidth: x_165, templet: '#vmmemoryRateTpl', sort: true}, | ||
2558 | - {field: 'maxNetCardUpRate', title: '上行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardUpRate}} kb/s</div>'}, | ||
2559 | - {field: 'maxNetCardDownRate', title: '下行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardDownRate}} kb/s</div>'}, | 2555 | + // {field: 'cacheUsed', title: '缓存总大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.cacheUsed}} GB</div>'}, |
2556 | + // {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_120, templet: '#memoryRateTpl', sort: true}, | ||
2557 | + // {field: 'vmmemoryUseRate', title: '虚拟内存使用率', align: 'center', minWidth: x_165, templet: '#vmmemoryRateTpl', sort: true}, | ||
2558 | + // {field: 'maxNetCardUpRate', title: '上行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardUpRate}} kb/s</div>'}, | ||
2559 | + // {field: 'maxNetCardDownRate', title: '下行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardDownRate}} kb/s</div>'}, | ||
2560 | {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true}, | 2560 | {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true}, |
2561 | {field: 'linkState', title: '连接状态', align: 'center', minWidth: x_110, templet: '#linkStateTpl', sort: true}, | 2561 | {field: 'linkState', title: '连接状态', align: 'center', minWidth: x_110, templet: '#linkStateTpl', sort: true}, |
2562 | {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true}, | 2562 | {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true}, |
@@ -2572,17 +2572,17 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | @@ -2572,17 +2572,17 @@ layui.define(['soulTable', 'commonDetail', 'common', 'laytpl', 'view', 'admin', | ||
2572 | }, | 2572 | }, |
2573 | {field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'}, | 2573 | {field: 'health', title: '健康状态', minWidth: x_110, align: 'center', sort: true, templet: '#healthTpl'}, |
2574 | // {field: 'diskSize', title: '磁盘总大小', minWidth: 120, align: 'center'}, | 2574 | // {field: 'diskSize', title: '磁盘总大小', minWidth: 120, align: 'center'}, |
2575 | - {field: 'fileSysUseRate', title: '文件系统使用率(最大)', align: 'center', minWidth: x_185, templet: '#fileUseRateTpl', sort: true}, | ||
2576 | - {field: 'diskBusyRate', title: '磁盘繁忙率(最大)', minWidth: x_160, align: 'center', sort: true, templet: '<div>{{d.diskBusyRate}}%</div>'}, | ||
2577 | - {field: 'cpuCores', title: '单个CPU核数', align: 'center', minWidth: x_140, sort: true, templet: '#cpuCoresTpl'}, | ||
2578 | - {field: 'cpuNum', title: '主机CPU总核数', align: 'center', minWidth: x_150, sort: true, templet: '#cpuNumTpl'}, | ||
2579 | - {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_120, templet: '#cpuRateTpl', sort: true}, | 2575 | + // {field: 'fileSysUseRate', title: '文件系统使用率(最大)', align: 'center', minWidth: x_185, templet: '#fileUseRateTpl', sort: true}, |
2576 | + // {field: 'diskBusyRate', title: '磁盘繁忙率(最大)', minWidth: x_160, align: 'center', sort: true, templet: '<div>{{d.diskBusyRate}}%</div>'}, | ||
2577 | + // {field: 'cpuCores', title: '单个CPU核数', align: 'center', minWidth: x_140, sort: true, templet: '#cpuCoresTpl'}, | ||
2578 | + // {field: 'cpuNum', title: '主机CPU总核数', align: 'center', minWidth: x_150, sort: true, templet: '#cpuNumTpl'}, | ||
2579 | + // {field: 'cpuRate', title: 'CPU使用率', align: 'center', minWidth: x_120, templet: '#cpuRateTpl', sort: true}, | ||
2580 | {field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.memorySize}} GB</div>'}, | 2580 | {field: 'memorySize', title: '内存大小', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.memorySize}} GB</div>'}, |
2581 | - {field: 'cacheUsed', title: '缓存总大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.cacheUsed}} GB</div>'}, | ||
2582 | - {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_120, templet: '#memoryRateTpl', sort: true}, | ||
2583 | - {field: 'vmmemoryUseRate', title: '虚拟内存使用率', align: 'center', minWidth: x_165, templet: '#vmmemoryRateTpl', sort: true}, | ||
2584 | - {field: 'maxNetCardUpRate', title: '上行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardUpRate}} kb/s</div>'}, | ||
2585 | - {field: 'maxNetCardDownRate', title: '下行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardDownRate}} kb/s</div>'}, | 2581 | + // {field: 'cacheUsed', title: '缓存总大小', align: 'center', minWidth: x_120, sort: true, templet: '<div>{{d.cacheUsed}} GB</div>'}, |
2582 | + // {field: 'memoryRate', title: '内存使用率', align: 'center', minWidth: x_120, templet: '#memoryRateTpl', sort: true}, | ||
2583 | + // {field: 'vmmemoryUseRate', title: '虚拟内存使用率', align: 'center', minWidth: x_165, templet: '#vmmemoryRateTpl', sort: true}, | ||
2584 | + // {field: 'maxNetCardUpRate', title: '上行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardUpRate}} kb/s</div>'}, | ||
2585 | + // {field: 'maxNetCardDownRate', title: '下行速率', align: 'center', minWidth: x_110, sort: true, templet: '<div>{{d.maxNetCardDownRate}} kb/s</div>'}, | ||
2586 | {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true}, | 2586 | {field: 'lastColTime', title: '最近采集时间', minWidth: x_160, align: 'center', sort: true}, |
2587 | {field: 'linkState', title: '连接状态', align: 'center', minWidth: x_110, templet: '#linkStateTpl', sort: true}, | 2587 | {field: 'linkState', title: '连接状态', align: 'center', minWidth: x_110, templet: '#linkStateTpl', sort: true}, |
2588 | {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true}, | 2588 | {field: 'adminName', title: '负责人', minWidth: x_120, align: 'center', sort: true}, |
@@ -74,6 +74,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | @@ -74,6 +74,9 @@ layui.define(['table', 'form', 'admin', 'layer', 'common','sessions', 'xmSelect' | ||
74 | case 11: | 74 | case 11: |
75 | return '告警消除' | 75 | return '告警消除' |
76 | break; | 76 | break; |
77 | + case 13: | ||
78 | + return '合并通知' | ||
79 | + break; | ||
77 | case 20: | 80 | case 20: |
78 | return '巡检报表通知' | 81 | return '巡检报表通知' |
79 | break; | 82 | break; |
@@ -853,16 +853,25 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', | @@ -853,16 +853,25 @@ layui.define(['table', 'form', 'admin', 'layer', 'upload', 'common', 'sessions', | ||
853 | }, | 853 | }, |
854 | yes: function (index, layero) { | 854 | yes: function (index, layero) { |
855 | var password = $('#userReSetPwd').val(); | 855 | var password = $('#userReSetPwd').val(); |
856 | + var flag = false; | ||
856 | //验证密码等级是否满足 | 857 | //验证密码等级是否满足 |
857 | - var flag = new RegExp(pattern).test(password); | ||
858 | - if (!flag){ | ||
859 | - $('.deptTips').html(patternTips.replace('密码格式为:','')); | ||
860 | - return; | ||
861 | - } | ||
862 | - if (checkHas(passwords,password)){ | ||
863 | - $('.deptTips').html('不能使用最近5次密码'); | ||
864 | - return; | 858 | + if (pattern != ''){ |
859 | + flag = new RegExp(pattern).test(password); | ||
860 | + if (!flag){ | ||
861 | + $('.deptTips').html(patternTips.replace('密码格式为:','')); | ||
862 | + return; | ||
863 | + } | ||
864 | + }else{ | ||
865 | + if (password.trim().length <4 || password.trim().length >20){ | ||
866 | + $('.deptTips').html('密码必须为4-20位!'); | ||
867 | + return; | ||
868 | + } | ||
865 | } | 869 | } |
870 | + //管理员重置密码,不用做最近5次验证 | ||
871 | + // if (checkHas(passwords,password)){ | ||
872 | + // $('.deptTips').html('不能使用最近5次密码'); | ||
873 | + // return; | ||
874 | + // } | ||
866 | resetPwd(id,password); | 875 | resetPwd(id,password); |
867 | } | 876 | } |
868 | }); | 877 | }); |
@@ -73,16 +73,22 @@ | @@ -73,16 +73,22 @@ | ||
73 | form.verify((function(pattern, patternTips,last5His) { | 73 | form.verify((function(pattern, patternTips,last5His) { |
74 | return { | 74 | return { |
75 | pass: function (value) { | 75 | pass: function (value) { |
76 | - if (value === ''){ | 76 | + if (value.trim() === ''){ |
77 | return '必填项不能位空'; | 77 | return '必填项不能位空'; |
78 | } | 78 | } |
79 | - if (value === $('#oldPassword').val()){ | 79 | + if (value.trim() === $('#oldPassword').val()){ |
80 | return '新密码不能与旧密码一致'; | 80 | return '新密码不能与旧密码一致'; |
81 | } | 81 | } |
82 | - if(pattern && !new RegExp(pattern).test(value)){ | 82 | + if(pattern && !new RegExp(pattern).test(value.trim())){ |
83 | return patternTips; | 83 | return patternTips; |
84 | } | 84 | } |
85 | 85 | ||
86 | + if (!pattern || pattern == undefined){ | ||
87 | + if (value.trim().length <4 || value.trim().length >20){ | ||
88 | + return '新密码必须4-20位!'; | ||
89 | + } | ||
90 | + } | ||
91 | + | ||
86 | //临时增加用户组写死密码 joke add 20210508 | 92 | //临时增加用户组写死密码 joke add 20210508 |
87 | if (last5His && last5His.length > 0 && checkHas(last5His,value)){ | 93 | if (last5His && last5His.length > 0 && checkHas(last5His,value)){ |
88 | return '不能使用最近5次密码'; | 94 | return '不能使用最近5次密码'; |
@@ -186,7 +192,7 @@ | @@ -186,7 +192,7 @@ | ||
186 | var last5His = passwords; | 192 | var last5His = passwords; |
187 | verifyForm(pattern, patternTips,last5His); | 193 | verifyForm(pattern, patternTips,last5His); |
188 | } else { | 194 | } else { |
189 | - layer.msg('没有获取去密码级别,将不做密码级别验证!', {icon: 0}); | 195 | + console.log('没有获取去密码级别,将不做密码级别验证!'); |
190 | verifyForm(undefined, undefined,passwords); | 196 | verifyForm(undefined, undefined,passwords); |
191 | } | 197 | } |
192 | } | 198 | } |
@@ -324,6 +324,10 @@ export default { | @@ -324,6 +324,10 @@ export default { | ||
324 | 324 | ||
325 | 325 | ||
326 | }, 1000) | 326 | }, 1000) |
327 | + if(!isAllSelect){ | ||
328 | + proxy.selectText='全选' | ||
329 | + isAllSelect=true; | ||
330 | + } | ||
327 | } | 331 | } |
328 | 332 | ||
329 | 333 | ||
@@ -334,11 +338,11 @@ export default { | @@ -334,11 +338,11 @@ export default { | ||
334 | */ | 338 | */ |
335 | let deleteDocument = (id, type) => { | 339 | let deleteDocument = (id, type) => { |
336 | 340 | ||
337 | - let url = `/inspection-report/file/change`; | 341 | + let url = `/inspection-report/file/change?status=0`; |
338 | let msg = "您确认将该文件放入回收站?"; | 342 | let msg = "您确认将该文件放入回收站?"; |
339 | if (props.isRecycle) { | 343 | if (props.isRecycle) { |
340 | msg = "您确认永久删除该文件?"; | 344 | msg = "您确认永久删除该文件?"; |
341 | - url = `/inspection-report/file/delete`; | 345 | + url = `/inspection-report/file/delete?status=1`; |
342 | } | 346 | } |
343 | 347 | ||
344 | let info = []; | 348 | let info = []; |
@@ -412,7 +416,7 @@ export default { | @@ -412,7 +416,7 @@ export default { | ||
412 | 416 | ||
413 | proxy.$global.confirm("是否还原选择的文件?", function () { | 417 | proxy.$global.confirm("是否还原选择的文件?", function () { |
414 | 418 | ||
415 | - proxy.$http.post(`/inspection-report/file/restore`, info, function (res) { | 419 | + proxy.$http.post(`/inspection-report/file/restore?status=1`, info, function (res) { |
416 | if (res && res.code == 0) { | 420 | if (res && res.code == 0) { |
417 | proxy.$global.showMsg('还原成功!'); | 421 | proxy.$global.showMsg('还原成功!'); |
418 | if (props.isRecycle) { | 422 | if (props.isRecycle) { |
@@ -622,6 +626,7 @@ export default { | @@ -622,6 +626,7 @@ export default { | ||
622 | * 文件下载 | 626 | * 文件下载 |
623 | */ | 627 | */ |
624 | let downloadFile = () => { | 628 | let downloadFile = () => { |
629 | + let status = props.isRecycle?1:0; | ||
625 | let arr = getCheckedFile(); | 630 | let arr = getCheckedFile(); |
626 | 631 | ||
627 | let info = []; | 632 | let info = []; |
@@ -638,7 +643,7 @@ export default { | @@ -638,7 +643,7 @@ export default { | ||
638 | fileName:fileNameData | 643 | fileName:fileNameData |
639 | } | 644 | } |
640 | 645 | ||
641 | - proxy.$http.downloadFile('/inspection-report/file/download', params); | 646 | + proxy.$http.downloadFile('/inspection-report/file/download?status=' + status, params); |
642 | } | 647 | } |
643 | 648 | ||
644 | /** | 649 | /** |
@@ -201,29 +201,38 @@ global.openCmdbAssets = (resTypeId, resId, proxy) => { | @@ -201,29 +201,38 @@ global.openCmdbAssets = (resTypeId, resId, proxy) => { | ||
201 | }); | 201 | }); |
202 | } | 202 | } |
203 | 203 | ||
204 | -global.openDetail = (resId, resType, title) => { | ||
205 | - // let url = `/#/res/resDetail/view/resId=${resId}`; | ||
206 | - let url = window.top.location.href.split('/#')[0] + `/#/res/resDetail/view/resId=${resId}`; | ||
207 | - if(resType){ | ||
208 | - url += '/resType=' + resType | ||
209 | - } | ||
210 | - | ||
211 | - if(title){ | ||
212 | - url += '/title=' + title | ||
213 | - } | ||
214 | - let lyaui = window.parent.layui; | 204 | +global.openDetail = (resId, resType, proxy) => { |
205 | + let lyaui = global.layui; | ||
215 | 206 | ||
216 | - debugger | ||
217 | let editFlag = false; | 207 | let editFlag = false; |
218 | let provider = ''; | 208 | let provider = ''; |
219 | - let name= 'test'; | 209 | + let name= ''; |
220 | let ip = ''; | 210 | let ip = ''; |
221 | let resTypeName = ''; | 211 | let resTypeName = ''; |
222 | let adminName = ''; | 212 | let adminName = ''; |
223 | let manageIp = ''; | 213 | let manageIp = ''; |
224 | let collProtocol = ''; | 214 | let collProtocol = ''; |
225 | 215 | ||
226 | - lyaui.commonCols.detailPage(resId, resType,editFlag,provider,name,ip,resTypeName,adminName,manageIp,collProtocol); | 216 | + // 获取资源详情 |
217 | + proxy.$http.get(`/api-web/v32/res/detail/${resId}`, {}, function (res) { | ||
218 | + if (res && res.map) { | ||
219 | + let data = res.map; | ||
220 | + | ||
221 | + provider = data.provider; | ||
222 | + ip = data.ip; | ||
223 | + resTypeName = data.resTypeName; | ||
224 | + adminName = data.adminName; | ||
225 | + manageIp = data.manageIp; | ||
226 | + collProtocol = data.collProtocol; | ||
227 | + name = data.resName; | ||
228 | + | ||
229 | + lyaui.commonCols.detailPage(resId, resType,editFlag,provider,name,ip,resTypeName,adminName,manageIp,collProtocol); | ||
230 | + } | ||
231 | + }); | ||
232 | + | ||
233 | + | ||
234 | + | ||
235 | + | ||
227 | 236 | ||
228 | } | 237 | } |
229 | 238 |
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/res/assetsComponents/index.html
0 → 100644
1 | +<el-link type="info" :underline="false" @click="openCmdbAssets"> {{textString}}</el-link> |
hg-monitor-web-zj/src/main/resources/static/vue3/src/components/page/res/assetsComponents/index.js
0 → 100644
1 | +export default { | ||
2 | + name: 'assetsComponents', | ||
3 | + template: '', | ||
4 | + components: {}, | ||
5 | + props: { | ||
6 | + // 资源名称 | ||
7 | + textString: { | ||
8 | + type: String, | ||
9 | + default: 0 | ||
10 | + }, | ||
11 | + // 展示文字 收藏、拓扑、资产 'start,topo,assets' | ||
12 | + start: { | ||
13 | + type: Boolean, | ||
14 | + default: true | ||
15 | + }, | ||
16 | + topo: { | ||
17 | + type: Boolean, | ||
18 | + default: true | ||
19 | + }, | ||
20 | + assets: { | ||
21 | + type: Boolean, | ||
22 | + default: true | ||
23 | + }, | ||
24 | + resId: { | ||
25 | + type: String, | ||
26 | + default: '' | ||
27 | + }, | ||
28 | + resTypeId: { | ||
29 | + type: String, | ||
30 | + default: '' | ||
31 | + }, | ||
32 | + resType: { | ||
33 | + type: String, | ||
34 | + default: '' | ||
35 | + }, | ||
36 | + optionData: { | ||
37 | + type: Array, | ||
38 | + default: [] | ||
39 | + } | ||
40 | + | ||
41 | + }, | ||
42 | + data() { | ||
43 | + return {} | ||
44 | + }, | ||
45 | + setup(props, {attrs, slots, emit}) { | ||
46 | + | ||
47 | + const {proxy} = Vue.getCurrentInstance(); | ||
48 | + | ||
49 | + | ||
50 | + let openCmdbAssets = () => { | ||
51 | + if (props.resId == '') { | ||
52 | + proxy.$global.showMsg("资源编号不存在,请确认!","warning") | ||
53 | + return; | ||
54 | + } | ||
55 | + | ||
56 | + if (props.resTypeId == '') { | ||
57 | + proxy.$global.showMsg("资源类型不存在,请确认!","warning") | ||
58 | + return; | ||
59 | + } | ||
60 | + | ||
61 | + proxy.$global.openCmdbAssets(props.resTypeId, props.resId, proxy); | ||
62 | + | ||
63 | + } | ||
64 | + | ||
65 | + return { | ||
66 | + openCmdbAssets | ||
67 | + } | ||
68 | + } | ||
69 | +} |
@@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
5 | :stroke-width="20" | 5 | :stroke-width="20" |
6 | :percentage="textValue" | 6 | :percentage="textValue" |
7 | :status="status"> | 7 | :status="status"> |
8 | - <span>{{textValue == '' ? ' ' : textValue }} %</span> | 8 | + <span>{{textValue == '' ? ' ' : textValue + '%' }}</span> |
9 | </el-progress> | 9 | </el-progress> |
10 | </div> | 10 | </div> |
11 | - <div style="width: 50px">{{textString == '' ? ' - ' : textString }} </div> | 11 | + <div style="width: 50px">{{textString == '' ? '' : textString }} </div> |
12 | </div> | 12 | </div> |
1 | <div> | 1 | <div> |
2 | <el-dropdown> | 2 | <el-dropdown> |
3 | - <span class="el-dropdown-link" @click="openDetail" > | 3 | + <span class="el-dropdown-link" @click="openDetail" style="cursor:pointer"> |
4 | {{textString}} | 4 | {{textString}} |
5 | <i class="el-icon-arrow-down" style="color: blue;font-weight: bold;" /> | 5 | <i class="el-icon-arrow-down" style="color: blue;font-weight: bold;" /> |
6 | </span> | 6 | </span> |
@@ -75,7 +75,7 @@ export default { | @@ -75,7 +75,7 @@ export default { | ||
75 | favData.value = arr; | 75 | favData.value = arr; |
76 | dialogFlg.value = flg; | 76 | dialogFlg.value = flg; |
77 | } else { | 77 | } else { |
78 | - proxy.$global.showMsg("没有查询到收藏夹,请先添加!","warning") | 78 | + proxy.$global.showMsg("没有查询到收藏夹,请先添加!", "warning") |
79 | } | 79 | } |
80 | }); | 80 | }); |
81 | } else { | 81 | } else { |
@@ -91,7 +91,7 @@ export default { | @@ -91,7 +91,7 @@ export default { | ||
91 | */ | 91 | */ |
92 | let saveStart = () => { | 92 | let saveStart = () => { |
93 | if (props.resId == '') { | 93 | if (props.resId == '') { |
94 | - proxy.$global.showMsg("资源编号不存在,请确认!","warning") | 94 | + proxy.$global.showMsg("资源编号不存在,请确认!", "warning") |
95 | return; | 95 | return; |
96 | } | 96 | } |
97 | 97 | ||
@@ -99,18 +99,18 @@ export default { | @@ -99,18 +99,18 @@ export default { | ||
99 | favIds: favIds.value.join(','), | 99 | favIds: favIds.value.join(','), |
100 | resId: props.resId | 100 | resId: props.resId |
101 | } | 101 | } |
102 | - proxy.$http.post(`/api-web/favorites/save/fav`, params, function (res) { | 102 | + proxy.$http.post(`/api-web/favorites/save/fav?favIds=${params.favIds}&resId=${params.resId}`, {}, function (res) { |
103 | if (res && res.success) { | 103 | if (res && res.success) { |
104 | - proxy.$global.showMsg("收藏成功!") | 104 | + proxy.$global.showMsg("收藏成功!"); |
105 | + showDialog(false); | ||
105 | } | 106 | } |
106 | }); | 107 | }); |
107 | - | ||
108 | } | 108 | } |
109 | 109 | ||
110 | 110 | ||
111 | let openTopoPage = () => { | 111 | let openTopoPage = () => { |
112 | if (props.resId == '') { | 112 | if (props.resId == '') { |
113 | - proxy.$global.showMsg("资源编号不存在,请确认!","warning") | 113 | + proxy.$global.showMsg("资源编号不存在,请确认!", "warning") |
114 | return; | 114 | return; |
115 | } | 115 | } |
116 | 116 | ||
@@ -119,21 +119,21 @@ export default { | @@ -119,21 +119,21 @@ export default { | ||
119 | 119 | ||
120 | let openDetail = () => { | 120 | let openDetail = () => { |
121 | if (props.resId == '') { | 121 | if (props.resId == '') { |
122 | - proxy.$global.showMsg("资源编号不存在,请确认!","warning") | 122 | + proxy.$global.showMsg("资源编号不存在,请确认!", "warning") |
123 | return; | 123 | return; |
124 | } | 124 | } |
125 | - proxy.$global.openDetail(props.resId,props.resType,props.title); | 125 | + proxy.$global.openDetail(props.resId, props.resType, proxy); |
126 | } | 126 | } |
127 | 127 | ||
128 | 128 | ||
129 | let openCmdbAssets = () => { | 129 | let openCmdbAssets = () => { |
130 | if (props.resId == '') { | 130 | if (props.resId == '') { |
131 | - proxy.$global.showMsg("资源编号不存在,请确认!","warning") | 131 | + proxy.$global.showMsg("资源编号不存在,请确认!", "warning") |
132 | return; | 132 | return; |
133 | } | 133 | } |
134 | 134 | ||
135 | if (props.resTypeId == '') { | 135 | if (props.resTypeId == '') { |
136 | - proxy.$global.showMsg("资源类型不存在,请确认!","warning") | 136 | + proxy.$global.showMsg("资源类型不存在,请确认!", "warning") |
137 | return; | 137 | return; |
138 | } | 138 | } |
139 | 139 |
@@ -79,6 +79,7 @@ | @@ -79,6 +79,7 @@ | ||
79 | <el-option label="使用率组件" :value="'rateComponents'"></el-option> | 79 | <el-option label="使用率组件" :value="'rateComponents'"></el-option> |
80 | <el-option label="机房组件" :value="'machineRoomComponents'"></el-option> | 80 | <el-option label="机房组件" :value="'machineRoomComponents'"></el-option> |
81 | <el-option label="机柜组件" :value="'machineRoomDetailComponents'"></el-option> | 81 | <el-option label="机柜组件" :value="'machineRoomDetailComponents'"></el-option> |
82 | + <el-option label="资产信息" :value="'assetsComponents'"></el-option> | ||
82 | </el-select> | 83 | </el-select> |
83 | </div> | 84 | </div> |
84 | 85 |
@@ -209,6 +209,10 @@ export default { | @@ -209,6 +209,10 @@ export default { | ||
209 | 'machineRoomDetailComponents': Vue.defineAsyncComponent( | 209 | 'machineRoomDetailComponents': Vue.defineAsyncComponent( |
210 | () => myImport('components/page/res/machineRoomDetailComponents/index') | 210 | () => myImport('components/page/res/machineRoomDetailComponents/index') |
211 | ), | 211 | ), |
212 | + 'assetsComponents': Vue.defineAsyncComponent( | ||
213 | + () => myImport('components/page/res/assetsComponents/index') | ||
214 | + ), | ||
215 | + | ||
212 | }, | 216 | }, |
213 | data() { | 217 | data() { |
214 | return { | 218 | return { |
@@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
59 | <cm-biz-type-tree-input multiple clearable collapseTags @callback="getBizType"/> | 59 | <cm-biz-type-tree-input multiple clearable collapseTags @callback="getBizType"/> |
60 | </el-dropdown>--> | 60 | </el-dropdown>--> |
61 | 61 | ||
62 | - <el-select v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择指标" style="margin-top: 10px"> | 62 | + <el-select v-model="busTypeArr" multiple filterable clearable collapse-tags placeholder="请选择业务" style="margin-top: 10px"> |
63 | <el-option | 63 | <el-option |
64 | v-for="item in busTypeList" | 64 | v-for="item in busTypeList" |
65 | :label="item.busTypeName" :value="item.busId"></el-option> | 65 | :label="item.busTypeName" :value="item.busId"></el-option> |
@@ -98,9 +98,9 @@ | @@ -98,9 +98,9 @@ | ||
98 | <el-tabs v-model="activeName" @tab-click="tabClick"> | 98 | <el-tabs v-model="activeName" @tab-click="tabClick"> |
99 | <el-tab-pane label="已添加" name="first"> | 99 | <el-tab-pane label="已添加" name="first"> |
100 | <cm-table-page :columns="columns" :dataList="tabFirstList" @loaddata="loadFirstList" | 100 | <cm-table-page :columns="columns" :dataList="tabFirstList" @loaddata="loadFirstList" |
101 | - :showIndex="true" | 101 | + :showIndex="true" :total="countFirst" |
102 | :showBorder="true" :loading="false" | 102 | :showBorder="true" :loading="false" |
103 | - :showPage="false" :showTools="true" :height="(height - 500)"> | 103 | + :showPage="true" :showTools="true" :height="(height - 500)"> |
104 | <template #tools="{scope}"> | 104 | <template #tools="{scope}"> |
105 | <el-button type="text" size="small" | 105 | <el-button type="text" size="small" |
106 | @click.prevent="deleteRes(scope.row,scope.$index)"> | 106 | @click.prevent="deleteRes(scope.row,scope.$index)"> |
@@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
111 | </el-tab-pane> | 111 | </el-tab-pane> |
112 | <el-tab-pane label="未添加" name="second"> | 112 | <el-tab-pane label="未添加" name="second"> |
113 | <cm-table-page :columns="columns" :dataList="tabSecondList" @loaddata="loadSecondList" | 113 | <cm-table-page :columns="columns" :dataList="tabSecondList" @loaddata="loadSecondList" |
114 | - :showIndex="true" | 114 | + :showIndex="true" :total="count" |
115 | :showBorder="true" :loading="false" | 115 | :showBorder="true" :loading="false" |
116 | :showPage="true" :showTools="true" :height="(height - 500)"> | 116 | :showPage="true" :showTools="true" :height="(height - 500)"> |
117 | <template #tools="{scope}"> | 117 | <template #tools="{scope}"> |
@@ -125,6 +125,7 @@ export default { | @@ -125,6 +125,7 @@ export default { | ||
125 | 125 | ||
126 | var id = proxy.$global.getQueryVariable('configId') ; | 126 | var id = proxy.$global.getQueryVariable('configId') ; |
127 | 127 | ||
128 | + let isSign = Vue.ref(id);//是否编辑 true为编辑,false为新增 | ||
128 | let resTypeArr = Vue.ref([]); | 129 | let resTypeArr = Vue.ref([]); |
129 | let kpiTypeArr = Vue.ref([]); | 130 | let kpiTypeArr = Vue.ref([]); |
130 | let busTypeArr = Vue.ref([]); | 131 | let busTypeArr = Vue.ref([]); |
@@ -147,6 +148,8 @@ export default { | @@ -147,6 +148,8 @@ export default { | ||
147 | let dialogFormVisible = Vue.ref(false); | 148 | let dialogFormVisible = Vue.ref(false); |
148 | let parentList = Vue.ref([]); | 149 | let parentList = Vue.ref([]); |
149 | let isAdd = Vue.ref(false); | 150 | let isAdd = Vue.ref(false); |
151 | + let count=Vue.ref(0); | ||
152 | + let countFirst=Vue.ref(0); | ||
150 | 153 | ||
151 | let form = Vue.ref({ | 154 | let form = Vue.ref({ |
152 | parentId: '', | 155 | parentId: '', |
@@ -164,7 +167,6 @@ export default { | @@ -164,7 +167,6 @@ export default { | ||
164 | 167 | ||
165 | 168 | ||
166 | let getResType = (arr) => { | 169 | let getResType = (arr) => { |
167 | - console.log(arr); | ||
168 | var types = arr.map(function (v) { | 170 | var types = arr.map(function (v) { |
169 | return v.id; | 171 | return v.id; |
170 | }); | 172 | }); |
@@ -172,7 +174,6 @@ export default { | @@ -172,7 +174,6 @@ export default { | ||
172 | loeadTable(); | 174 | loeadTable(); |
173 | } | 175 | } |
174 | let getKpiType = (arr) => { | 176 | let getKpiType = (arr) => { |
175 | - console.log(arr); | ||
176 | var types = arr.map(function (v) { | 177 | var types = arr.map(function (v) { |
177 | e | 178 | e |
178 | return v.kpiId; | 179 | return v.kpiId; |
@@ -181,7 +182,6 @@ export default { | @@ -181,7 +182,6 @@ export default { | ||
181 | loeadTable(); | 182 | loeadTable(); |
182 | } | 183 | } |
183 | let getBizType = (arr) => { | 184 | let getBizType = (arr) => { |
184 | - console.log(arr); | ||
185 | var types = arr.map(function (v) { | 185 | var types = arr.map(function (v) { |
186 | return v.busId; | 186 | return v.busId; |
187 | }); | 187 | }); |
@@ -197,8 +197,8 @@ export default { | @@ -197,8 +197,8 @@ export default { | ||
197 | kpiId: kpiTypeArr.value.join(','), | 197 | kpiId: kpiTypeArr.value.join(','), |
198 | busId: busTypeArr.value.join(','), | 198 | busId: busTypeArr.value.join(','), |
199 | configId: config.value, | 199 | configId: config.value, |
200 | - page:2, | ||
201 | - limit:10 | 200 | + page: 1, |
201 | + limit: 50 | ||
202 | } | 202 | } |
203 | } | 203 | } |
204 | 204 | ||
@@ -206,12 +206,14 @@ export default { | @@ -206,12 +206,14 @@ export default { | ||
206 | // if (!reload && tabFirstList.value.length > 0) { | 206 | // if (!reload && tabFirstList.value.length > 0) { |
207 | // return false; | 207 | // return false; |
208 | // } | 208 | // } |
209 | - | ||
210 | - proxy.$http.get(`/api-web/ContrastAnalysis/added`, getParams(), function (res) { | ||
211 | - if (res && res.data) { | ||
212 | - tabFirstList.value = res.data; | ||
213 | - } | ||
214 | - }); | 209 | + if(isSign.value){//true为编辑,false为新增 |
210 | + proxy.$http.get(`/api-web/ContrastAnalysis/added`, getParams(), function (res) { | ||
211 | + if (res && res.success) { | ||
212 | + proxy.countFirst = res.count; | ||
213 | + tabFirstList.value = res.data; | ||
214 | + } | ||
215 | + }); | ||
216 | + } | ||
215 | } | 217 | } |
216 | 218 | ||
217 | let loadSecondList = (reload) => { | 219 | let loadSecondList = (reload) => { |
@@ -219,7 +221,8 @@ export default { | @@ -219,7 +221,8 @@ export default { | ||
219 | // return false; | 221 | // return false; |
220 | // } | 222 | // } |
221 | proxy.$http.get(`/api-web/ContrastAnalysis/notAdded`, getParams(), function (res) { | 223 | proxy.$http.get(`/api-web/ContrastAnalysis/notAdded`, getParams(), function (res) { |
222 | - if (res && res.data) { | 224 | + if (res && res.success) { |
225 | + proxy.count = res.count; | ||
223 | tabSecondList.value = res.data; | 226 | tabSecondList.value = res.data; |
224 | } | 227 | } |
225 | }); | 228 | }); |
@@ -264,8 +267,7 @@ export default { | @@ -264,8 +267,7 @@ export default { | ||
264 | let addRes = (row, index) => { | 267 | let addRes = (row, index) => { |
265 | tabFirstList.value.push(row); | 268 | tabFirstList.value.push(row); |
266 | activeName.value = 'first' | 269 | activeName.value = 'first' |
267 | - //proxy.$global.showMsg("添加成功!"); | ||
268 | - | 270 | + proxy.$global.showMsg("添加成功!"); |
269 | // 加载折线图 | 271 | // 加载折线图 |
270 | getChartData(); | 272 | getChartData(); |
271 | 273 | ||
@@ -566,7 +568,9 @@ export default { | @@ -566,7 +568,9 @@ export default { | ||
566 | showDialogForm, | 568 | showDialogForm, |
567 | saveAnalysis, | 569 | saveAnalysis, |
568 | parentList, | 570 | parentList, |
569 | - getChartData | 571 | + getChartData, |
572 | + count, | ||
573 | + countFirst | ||
570 | } | 574 | } |
571 | } | 575 | } |
572 | } | 576 | } |
@@ -1494,13 +1494,13 @@ export default { | @@ -1494,13 +1494,13 @@ export default { | ||
1494 | Vue.onMounted(() => { | 1494 | Vue.onMounted(() => { |
1495 | }) | 1495 | }) |
1496 | const goDetail=(item)=>{ | 1496 | const goDetail=(item)=>{ |
1497 | - proxy.allowClickData.map((itemName,index)=>{ | ||
1498 | - if(item.name==itemName){ | 1497 | + // proxy.allowClickData.map((itemName,index)=>{ |
1498 | + // if(item.name==itemName){ | ||
1499 | proxy.isDetailShow=true; | 1499 | proxy.isDetailShow=true; |
1500 | console.log("detail",item) | 1500 | console.log("detail",item) |
1501 | proxy.detailData=item; | 1501 | proxy.detailData=item; |
1502 | - } | ||
1503 | - }) | 1502 | + // } |
1503 | + // }) | ||
1504 | 1504 | ||
1505 | } | 1505 | } |
1506 | 1506 |
@@ -263,12 +263,12 @@ export default { | @@ -263,12 +263,12 @@ export default { | ||
263 | 263 | ||
264 | }) | 264 | }) |
265 | const goDetail=(item)=>{ | 265 | const goDetail=(item)=>{ |
266 | - proxy.allowClickData.map((itemName,index)=>{ | ||
267 | - if(item.name==itemName){ | 266 | + // proxy.allowClickData.map((itemName,index)=>{ |
267 | + // if(item.name==itemName){ | ||
268 | proxy.isDetailShow=true; | 268 | proxy.isDetailShow=true; |
269 | proxy.detailData=item; | 269 | proxy.detailData=item; |
270 | - } | ||
271 | - }) | 270 | + // } |
271 | + // }) | ||
272 | } | 272 | } |
273 | 273 | ||
274 | return{ | 274 | return{ |
@@ -313,12 +313,12 @@ export default { | @@ -313,12 +313,12 @@ export default { | ||
313 | 313 | ||
314 | }) | 314 | }) |
315 | const goDetail=(item)=>{ | 315 | const goDetail=(item)=>{ |
316 | - proxy.allowClickData.map((itemName,index)=>{ | ||
317 | - if(item.name==itemName){ | 316 | + // proxy.allowClickData.map((itemName,index)=>{ |
317 | + // if(item.name==itemName){ | ||
318 | proxy.isDetailShow=true; | 318 | proxy.isDetailShow=true; |
319 | proxy.detailData=item; | 319 | proxy.detailData=item; |
320 | - } | ||
321 | - }) | 320 | + // } |
321 | + // }) | ||
322 | } | 322 | } |
323 | 323 | ||
324 | return{ | 324 | return{ |
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <div class='img-serve' > | 12 | <div class='img-serve' > |
13 | 13 | ||
14 | <img src="/vue3/src/assets/images/machineRoom/icon-state.png" alt="" class='state'> | 14 | <img src="/vue3/src/assets/images/machineRoom/icon-state.png" alt="" class='state'> |
15 | - <div class='img-serve-text'>{{item.name}}</div> | 15 | + <div class='img-serve-text'>{{item.provider}}</div> |
16 | <div class='lamp'> | 16 | <div class='lamp'> |
17 | <img src="/vue3/src/assets/images/machineRoom/icon-weblogical.png" alt="" class='img-weblog'> | 17 | <img src="/vue3/src/assets/images/machineRoom/icon-weblogical.png" alt="" class='img-weblog'> |
18 | <div class='img-lamp'> | 18 | <div class='img-lamp'> |
@@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
54 | <p>品 牌:{{deviceDataInfo.brandName}}</p> | 54 | <p>品 牌:{{deviceDataInfo.brandName}}</p> |
55 | <p>型 号:{{deviceDataInfo.model}}</p> | 55 | <p>型 号:{{deviceDataInfo.model}}</p> |
56 | <p>序 列 号:{{deviceDataInfo.serialNumber}}</p> | 56 | <p>序 列 号:{{deviceDataInfo.serialNumber}}</p> |
57 | - <p>业 务 IP:{{deviceDataInfo.ServiceIP}}</p> | 57 | + <p>业 务 IP:{{deviceDataInfo.ip}}</p> |
58 | <p>用 途:{{deviceDataInfo.purpose}}</p> | 58 | <p>用 途:{{deviceDataInfo.purpose}}</p> |
59 | </div> | 59 | </div> |
60 | </div> | 60 | </div> |
@@ -16,23 +16,23 @@ export default { | @@ -16,23 +16,23 @@ export default { | ||
16 | deviceDataInfo:'',//设备详细信息 | 16 | deviceDataInfo:'',//设备详细信息 |
17 | deviceDatas: [ | 17 | deviceDatas: [ |
18 | { | 18 | { |
19 | - name:'E12', | 19 | + name:'E12',//机柜名称 |
20 | 20 | ||
21 | - cabinetCapacity :'42U', | ||
22 | - deviceData:[ | 21 | + cabinetCapacity :'42U',//机柜总U位数-目前都是42U |
22 | + deviceData:[//机柜所有的服务器 | ||
23 | { | 23 | { |
24 | - name:'物理服务器', | ||
25 | - resName:'管理决策二包(数据集市39)', | ||
26 | - brandName:'浪潮', | ||
27 | - model:'TS860', | ||
28 | - serialNumber:'216365930', | ||
29 | - ServiceIP:'80.12.73.39', | ||
30 | - purpose:'管理决策二包使用', | ||
31 | - uPosition:'1-8U', | 24 | + name:'物理服务器',//服务器名称 |
25 | + resName:'管理决策二包(数据集市39)',//服务器资源名称 | ||
26 | + brandName:'浪潮',//品牌 | ||
27 | + model:'TS860',//型号 | ||
28 | + serialNumber:'216365930',//序列号 | ||
29 | + ServiceIP:'80.12.73.39',//业务ip | ||
30 | + purpose:'管理决策二包使用',//用途 | ||
31 | + uPosition:'1-8U',//U位 | ||
32 | } | 32 | } |
33 | ], | 33 | ], |
34 | - deviceNum:'1', | ||
35 | - alarmNum:'0' | 34 | + deviceNum:'1',//设备数量 |
35 | + alarmNum:'0'//警告量 | ||
36 | }, | 36 | }, |
37 | { | 37 | { |
38 | name:'E13', | 38 | name:'E13', |
@@ -168,37 +168,67 @@ export default { | @@ -168,37 +168,67 @@ export default { | ||
168 | setup(props, {attrs, slots, emit}) { | 168 | setup(props, {attrs, slots, emit}) { |
169 | const {proxy} = Vue.getCurrentInstance(); | 169 | const {proxy} = Vue.getCurrentInstance(); |
170 | const isShowDevice=Vue.ref(false); | 170 | const isShowDevice=Vue.ref(false); |
171 | - | 171 | + const theirRoom=Vue.ref('');//机房名称 |
172 | const CabinetNum=props.detailData.name;//机柜编号 | 172 | const CabinetNum=props.detailData.name;//机柜编号 |
173 | 173 | ||
174 | // 挂载完 | 174 | // 挂载完 |
175 | Vue.onMounted(() => { | 175 | Vue.onMounted(() => { |
176 | if(props.machineData.name.indexOf('huzhou')!=-1){ | 176 | if(props.machineData.name.indexOf('huzhou')!=-1){ |
177 | proxy.isCenter=true; | 177 | proxy.isCenter=true; |
178 | + proxy.theirRoom='湖州灾备'; | ||
178 | }else{ | 179 | }else{ |
179 | proxy.isCenter=false; | 180 | proxy.isCenter=false; |
181 | + proxy.theirRoom='兴议机房'; | ||
182 | + | ||
180 | } | 183 | } |
181 | - proxy.getDeviceInfo(); | 184 | + proxy.getData(); |
185 | + // proxy.getDeviceInfo(); | ||
182 | 186 | ||
183 | }) | 187 | }) |
188 | + const getData=()=>{ | ||
189 | + let parmas={ | ||
190 | + theirRoom:proxy.theirRoom, | ||
191 | + theirCabinet:CabinetNum | ||
192 | + } | ||
193 | + $.get(proxy.domainName+'/api-web/v32/res/cabinet?access_token='+proxy.accessToken,parmas,function (res){ | ||
194 | + | ||
195 | + console.log("res1",res) | ||
196 | + if(res){ | ||
197 | + let resData=res.data; | ||
198 | + let deviceDatas=[]; | ||
199 | + deviceDatas.push({ | ||
200 | + name:CabinetNum,//机柜名称 | ||
201 | + cabinetCapacity :'42U',//机柜总U位数-目前都是42U | ||
202 | + deviceNum:resData.length,//设备数量 | ||
203 | + alarmNum:'0',//警告量 | ||
204 | + deviceData:resData | ||
205 | + }) | ||
206 | + proxy.deviceDatas=deviceDatas; | ||
207 | + console.log("devdats",proxy.deviceDatas) | ||
208 | + proxy.getDeviceInfo() | ||
209 | + | ||
210 | + } | ||
211 | + }) | ||
212 | + } | ||
213 | + | ||
184 | const getDeviceInfo=()=>{ | 214 | const getDeviceInfo=()=>{ |
185 | proxy.deviceDatas.map((item,index)=>{ | 215 | proxy.deviceDatas.map((item,index)=>{ |
186 | if(CabinetNum==item.name){ | 216 | if(CabinetNum==item.name){ |
187 | proxy.infoData=item; | 217 | proxy.infoData=item; |
188 | proxy.serviceData=item.deviceData | 218 | proxy.serviceData=item.deviceData |
189 | item.deviceData.map((itemD,indexD)=>{ | 219 | item.deviceData.map((itemD,indexD)=>{ |
190 | - let strArr=itemD.uPosition.split("U");//[0]1-4 [1]U | ||
191 | - let leftStrArr=strArr[0].split('-');//[0]1 [1]4 | ||
192 | - let leftStr=leftStrArr[0]; | ||
193 | - let rightStr=leftStrArr[1]; | 220 | + // let strArr=itemD.uPosition.split("U");//[0]1-4 [1]U |
221 | + // let leftStrArr=strArr[0].split('-');//[0]1 [1]4 | ||
222 | + let leftStr=itemD.startU;//leftStrArr[0]; | ||
223 | + let rightStr=itemD.endU;//leftStrArr[1]; | ||
194 | itemD.serviceHeight=rightStr;//nU的设备 | 224 | itemD.serviceHeight=rightStr;//nU的设备 |
195 | let serveNum=1; | 225 | let serveNum=1; |
196 | - if(leftStr==1){ | ||
197 | - serveNum=rightStr | ||
198 | - }else{ | ||
199 | - serveNum=rightStr-leftStr; | 226 | + // if(leftStr==1){ |
227 | + // serveNum=rightStr | ||
228 | + // }else{ | ||
229 | + serveNum=rightStr-leftStr+1; | ||
200 | 230 | ||
201 | - } | 231 | + // } |
202 | itemD.serviceClass='img-serve-'+serveNum;//设备的css的class | 232 | itemD.serviceClass='img-serve-'+serveNum;//设备的css的class |
203 | itemD.uClass=''; | 233 | itemD.uClass=''; |
204 | if(leftStr>1){ | 234 | if(leftStr>1){ |
@@ -219,7 +249,9 @@ export default { | @@ -219,7 +249,9 @@ export default { | ||
219 | return{ | 249 | return{ |
220 | showDevice, | 250 | showDevice, |
221 | isShowDevice, | 251 | isShowDevice, |
222 | - getDeviceInfo | 252 | + getDeviceInfo, |
253 | + getData, | ||
254 | + theirRoom | ||
223 | } | 255 | } |
224 | } | 256 | } |
225 | } | 257 | } |
@@ -26,7 +26,7 @@ export default { | @@ -26,7 +26,7 @@ export default { | ||
26 | detailData:'',//详情数据 | 26 | detailData:'',//详情数据 |
27 | htmlName:'xiaoshansecond', | 27 | htmlName:'xiaoshansecond', |
28 | machineData:this.src, | 28 | machineData:this.src, |
29 | - allowClickData:['E12','E13'],//允许进入详情的机柜 | 29 | + allowClickData:['E12','E13','F14'],//允许进入详情的机柜 |
30 | tableData:[ | 30 | tableData:[ |
31 | [ | 31 | [ |
32 | 32 | ||
@@ -477,12 +477,12 @@ export default { | @@ -477,12 +477,12 @@ export default { | ||
477 | 477 | ||
478 | }) | 478 | }) |
479 | const goDetail=(item)=>{ | 479 | const goDetail=(item)=>{ |
480 | - proxy.allowClickData.map((itemName,index)=>{ | ||
481 | - if(item.name==itemName){ | 480 | + // proxy.allowClickData.map((itemName,index)=>{ |
481 | + // if(item.name==itemName){ | ||
482 | proxy.isDetailShow=true; | 482 | proxy.isDetailShow=true; |
483 | proxy.detailData=item; | 483 | proxy.detailData=item; |
484 | - } | ||
485 | - }) | 484 | + // } |
485 | + // }) | ||
486 | } | 486 | } |
487 | 487 | ||
488 | return{ | 488 | return{ |
@@ -1082,12 +1082,12 @@ export default { | @@ -1082,12 +1082,12 @@ export default { | ||
1082 | 1082 | ||
1083 | }) | 1083 | }) |
1084 | const goDetail=(item)=>{ | 1084 | const goDetail=(item)=>{ |
1085 | - proxy.allowClickData.map((itemName,index)=>{ | ||
1086 | - if(item.name==itemName){ | 1085 | + // proxy.allowClickData.map((itemName,index)=>{ |
1086 | + // if(item.name==itemName){ | ||
1087 | proxy.isDetailShow=true; | 1087 | proxy.isDetailShow=true; |
1088 | proxy.detailData=item; | 1088 | proxy.detailData=item; |
1089 | - } | ||
1090 | - }) | 1089 | + // } |
1090 | + // }) | ||
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | return{ | 1093 | return{ |
@@ -621,12 +621,12 @@ export default { | @@ -621,12 +621,12 @@ export default { | ||
621 | 621 | ||
622 | }) | 622 | }) |
623 | const goDetail=(item)=>{ | 623 | const goDetail=(item)=>{ |
624 | - proxy.allowClickData.map((itemName,index)=>{ | ||
625 | - if(item.name==itemName){ | 624 | + // proxy.allowClickData.map((itemName,index)=>{ |
625 | + // if(item.name==itemName){ | ||
626 | proxy.isDetailShow=true; | 626 | proxy.isDetailShow=true; |
627 | proxy.detailData=item; | 627 | proxy.detailData=item; |
628 | - } | ||
629 | - }) | 628 | + // } |
629 | + // }) | ||
630 | } | 630 | } |
631 | 631 | ||
632 | return{ | 632 | return{ |
@@ -13,13 +13,12 @@ | @@ -13,13 +13,12 @@ | ||
13 | <div style="height: 50px;text-align: left;margin-left: 10px;margin-top: 10px;display: flex"> | 13 | <div style="height: 50px;text-align: left;margin-left: 10px;margin-top: 10px;display: flex"> |
14 | <div style="width: calc(100% - 100px)"> | 14 | <div style="width: calc(100% - 100px)"> |
15 | <el-form :inline="true" :model="searchForm" class="demo-form-inline"> | 15 | <el-form :inline="true" :model="searchForm" class="demo-form-inline"> |
16 | - <el-form-item label="资源名称"> | ||
17 | - <el-input v-model="searchForm.resName" placeholder="请输入资源名称"></el-input> | 16 | + <el-form-item v-for="searchInfo in obj.searchList" :label="searchInfo.name"> |
17 | + <el-input v-model="searchForm[searchInfo.key]" placeholder="请输入资源名称"></el-input> | ||
18 | </el-form-item> | 18 | </el-form-item> |
19 | 19 | ||
20 | <el-form-item> | 20 | <el-form-item> |
21 | - <el-button @click="onSubmit">查询</el-button> | ||
22 | - | 21 | + <el-button @click="loadResList">查询</el-button> |
23 | </el-form-item> | 22 | </el-form-item> |
24 | </el-form> | 23 | </el-form> |
25 | </div> | 24 | </div> |
@@ -30,34 +29,21 @@ | @@ -30,34 +29,21 @@ | ||
30 | 29 | ||
31 | <cm-table-page :columns="obj.columns" :dataList="obj.maps" @loaddata="getPage" :showIndex="true" | 30 | <cm-table-page :columns="obj.columns" :dataList="obj.maps" @loaddata="getPage" :showIndex="true" |
32 | :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" | 31 | :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" |
33 | - :showPage="true" :height="(height - 95)" :maxWidth="max"> | 32 | + :showPage="true" :height="(height - 95)" |
33 | + :maxWidth="max"> | ||
34 | <template #default="{row,prop,column}"> | 34 | <template #default="{row,prop,column}"> |
35 | <component v-if="row[prop] && row[prop].props && row[prop].props.colComponents != null && row[prop].props.colComponents != ''" v-bind:is="row[prop].props.colComponents" | 35 | <component v-if="row[prop] && row[prop].props && row[prop].props.colComponents != null && row[prop].props.colComponents != ''" v-bind:is="row[prop].props.colComponents" |
36 | :resId="row.resId" | 36 | :resId="row.resId" |
37 | :resTypeId="currentNode.id" | 37 | :resTypeId="currentNode.id" |
38 | :textString="row[prop] == undefined ? '' : row[prop].value" | 38 | :textString="row[prop] == undefined ? '' : row[prop].value" |
39 | :optionData="row"></component> | 39 | :optionData="row"></component> |
40 | - <el-link v-else :underline="false" @click="item.click(scope.row)">{{row[prop] == undefined ? '' : row[prop].value }}</el-link> | 40 | + <el-link v-else :underline="false" @click="item.click(scope.row)">{{row[prop].value == undefined ? '' : row[prop].value }}</el-link> |
41 | </template> | 41 | </template> |
42 | </cm-table-page> | 42 | </cm-table-page> |
43 | </div> | 43 | </div> |
44 | </el-col> | 44 | </el-col> |
45 | </el-row> | 45 | </el-row> |
46 | 46 | ||
47 | - <cm-dialog :title="cellDetail.prop == 'cabinetNo' ? '机柜详情' : cellDetail.title" width="80%" :showDialogVisible="dialogFlg" :showFooter="false" @hidedialog="showDialog" :showOkBtn="false" cancelText="关闭"> | ||
48 | - <template v-slot> | ||
49 | - <div v-if="cellDetail.prop == 'cabinetNo'" @click="openCabinet(false)" :style="{'background-image': 'url(' + cabinetNoSrc + ')'}" style=";height: 600px;background-repeat: no-repeat;background-position: center;background-size: 93% 100%;"> | ||
50 | - <!--<div style="font-weight: bold;font-size: 20px;"> | ||
51 | - {{cellDetail.row[cellDetail.prop]}} | ||
52 | - </div>--> | ||
53 | - </div> | ||
54 | - <div v-if="cellDetail.prop == 'resPositon'" @click="openCabinet(false)" style="background-image: url('/vue3/src/assets/images/res/img02.jpg');height: 600px;background-repeat: no-repeat;background-position: center;background-size: 80%;"> | ||
55 | - <div style="font-weight: bold;font-size: 20px;"> | ||
56 | - <!--{{cellDetail.row[cellDetail.prop]}}布局图--> | ||
57 | - </div> | ||
58 | - </div> | ||
59 | - </template> | ||
60 | - </cm-dialog> | ||
61 | 47 | ||
62 | <cm-dialog :title="configObj.title" width="80%" :showDialogVisible="showConfig" :showFooter="false" @hidedialog="showConfigDialog" :showOkBtn="false" cancelText="关闭"> | 48 | <cm-dialog :title="configObj.title" width="80%" :showDialogVisible="showConfig" :showFooter="false" @hidedialog="showConfigDialog" :showOkBtn="false" cancelText="关闭"> |
63 | <template v-slot> | 49 | <template v-slot> |
@@ -34,6 +34,15 @@ export default { | @@ -34,6 +34,15 @@ export default { | ||
34 | 'statusComponents': Vue.defineAsyncComponent( | 34 | 'statusComponents': Vue.defineAsyncComponent( |
35 | () => myImport('components/page/res/statusComponents/index') | 35 | () => myImport('components/page/res/statusComponents/index') |
36 | ), | 36 | ), |
37 | + 'machineRoomComponents': Vue.defineAsyncComponent( | ||
38 | + () => myImport('components/page/res/machineRoomComponents/index') | ||
39 | + ), | ||
40 | + 'machineRoomDetailComponents': Vue.defineAsyncComponent( | ||
41 | + () => myImport('components/page/res/machineRoomDetailComponents/index') | ||
42 | + ), | ||
43 | + 'assetsComponents': Vue.defineAsyncComponent( | ||
44 | + () => myImport('components/page/res/assetsComponents/index') | ||
45 | + ), | ||
37 | }, | 46 | }, |
38 | data() { | 47 | data() { |
39 | return { | 48 | return { |
@@ -54,7 +63,7 @@ export default { | @@ -54,7 +63,7 @@ export default { | ||
54 | const currentNode = Vue.ref({}); | 63 | const currentNode = Vue.ref({}); |
55 | // 搜索框内容 | 64 | // 搜索框内容 |
56 | const searchForm = Vue.ref({ | 65 | const searchForm = Vue.ref({ |
57 | - resName: '' | 66 | + |
58 | }); | 67 | }); |
59 | 68 | ||
60 | // 单元格点及保存的数据 | 69 | // 单元格点及保存的数据 |
@@ -89,12 +98,17 @@ export default { | @@ -89,12 +98,17 @@ export default { | ||
89 | }); | 98 | }); |
90 | } | 99 | } |
91 | 100 | ||
101 | + let page = Vue.ref(1); | ||
102 | + let limit = Vue.ref(10); | ||
103 | + | ||
92 | let loadResList = () => { | 104 | let loadResList = () => { |
93 | if (currentNode.value) { | 105 | if (currentNode.value) { |
106 | + let fv = searchForm.value; | ||
107 | + | ||
94 | // 查询参数 | 108 | // 查询参数 |
95 | let params = { | 109 | let params = { |
96 | - page: 1, | ||
97 | - limit: 10, | 110 | + page: page.value, |
111 | + limit: limit.value, | ||
98 | treeNodeId: currentNode.value.id, | 112 | treeNodeId: currentNode.value.id, |
99 | query: {} | 113 | query: {} |
100 | } | 114 | } |
@@ -135,6 +149,16 @@ export default { | @@ -135,6 +149,16 @@ export default { | ||
135 | } | 149 | } |
136 | } | 150 | } |
137 | 151 | ||
152 | + let getPage = (pageInfo) =>{ | ||
153 | + console.log(pageInfo); | ||
154 | + debugger; | ||
155 | + | ||
156 | + page.value = pageInfo.page; | ||
157 | + limit.value = pageInfo.limit; | ||
158 | + loadResList() | ||
159 | + } | ||
160 | + | ||
161 | + | ||
138 | // 配置页面 | 162 | // 配置页面 |
139 | const {showConfig, configObj, showConfigDialog} = configPage() | 163 | const {showConfig, configObj, showConfigDialog} = configPage() |
140 | 164 | ||
@@ -164,6 +188,7 @@ export default { | @@ -164,6 +188,7 @@ export default { | ||
164 | cabinetNoSrc, | 188 | cabinetNoSrc, |
165 | total, | 189 | total, |
166 | max, | 190 | max, |
191 | + getPage, | ||
167 | 192 | ||
168 | // 配置页面 | 193 | // 配置页面 |
169 | showConfig, configObj, showConfigDialog | 194 | showConfig, configObj, showConfigDialog |
-
Please register or login to post a comment