Authored by 王涛

Merge branch 'master-V32-XuHaoJie' into 'master'

杭州-新视图中心-收藏夹报错



See merge request !160
@@ -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},
@@ -99,9 +99,10 @@ export default { @@ -99,9 +99,10 @@ 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 }
@@ -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([]);
@@ -166,7 +167,6 @@ export default { @@ -166,7 +167,6 @@ export default {
166 167
167 168
168 let getResType = (arr) => { 169 let getResType = (arr) => {
169 - console.log(arr);  
170 var types = arr.map(function (v) { 170 var types = arr.map(function (v) {
171 return v.id; 171 return v.id;
172 }); 172 });
@@ -182,7 +182,6 @@ export default { @@ -182,7 +182,6 @@ export default {
182 loeadTable(); 182 loeadTable();
183 } 183 }
184 let getBizType = (arr) => { 184 let getBizType = (arr) => {
185 - console.log(arr);  
186 var types = arr.map(function (v) { 185 var types = arr.map(function (v) {
187 return v.busId; 186 return v.busId;
188 }); 187 });
@@ -207,13 +206,14 @@ export default { @@ -207,13 +206,14 @@ export default {
207 // if (!reload && tabFirstList.value.length > 0) { 206 // if (!reload && tabFirstList.value.length > 0) {
208 // return false; 207 // return false;
209 // } 208 // }
210 -  
211 - proxy.$http.get(`/api-web/ContrastAnalysis/added`, getParams(), function (res) {  
212 - if (res && res.success) {  
213 - proxy.countFirst = res.count;  
214 - tabFirstList.value = res.data;  
215 - }  
216 - }); 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 + }
217 } 217 }
218 218
219 let loadSecondList = (reload) => { 219 let loadSecondList = (reload) => {