Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into master-v32-xwx
Showing
12 changed files
with
74 additions
and
82 deletions
@@ -276,7 +276,13 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o | @@ -276,7 +276,13 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o | ||
276 | return str.slice(0,str.length-1); | 276 | return str.slice(0,str.length-1); |
277 | } | 277 | } |
278 | //保存 | 278 | //保存 |
279 | + var str=0; | ||
279 | $("#alarmsubscribe-form-save-id").on("click",function (){ | 280 | $("#alarmsubscribe-form-save-id").on("click",function (){ |
281 | + | ||
282 | + if(str==1){ | ||
283 | + layer.msg("数据正在保存,请稍后在试!"); | ||
284 | + return false; | ||
285 | + } | ||
280 | var data = form.val("add-alarmsubscribe-form"); | 286 | var data = form.val("add-alarmsubscribe-form"); |
281 | var val=1; | 287 | var val=1; |
282 | var timeVal={val}; | 288 | var timeVal={val}; |
@@ -344,6 +350,7 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o | @@ -344,6 +350,7 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o | ||
344 | }else{ | 350 | }else{ |
345 | data.sentFrequency = $("#sentFrequency_input").val(); | 351 | data.sentFrequency = $("#sentFrequency_input").val(); |
346 | } | 352 | } |
353 | + str=1; | ||
347 | admin.req({ | 354 | admin.req({ |
348 | url : domainName + '/api-web/alarmsubscribe/save?access_token='+accessToken | 355 | url : domainName + '/api-web/alarmsubscribe/save?access_token='+accessToken |
349 | ,data:JSON.stringify(data) | 356 | ,data:JSON.stringify(data) |
@@ -356,6 +363,7 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o | @@ -356,6 +363,7 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o | ||
356 | receiveUserInfos = []; | 363 | receiveUserInfos = []; |
357 | if(layui.alarmsubscribeIndex && layui.alarmsubscribeIndex()){ | 364 | if(layui.alarmsubscribeIndex && layui.alarmsubscribeIndex()){ |
358 | layer.closeAll(); | 365 | layer.closeAll(); |
366 | + str=0; | ||
359 | layui.alarmsubscribeIndex().reloadsubscribe(); | 367 | layui.alarmsubscribeIndex().reloadsubscribe(); |
360 | } | 368 | } |
361 | }); | 369 | }); |
@@ -364,7 +372,6 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o | @@ -364,7 +372,6 @@ layui.define(['form', 'admin', 'laydate', 'table', 'common','sessions','cron','o | ||
364 | } | 372 | } |
365 | } | 373 | } |
366 | }); | 374 | }); |
367 | - | ||
368 | return false;//必须要写,解决禁用submit提交,ajax方法才能正确执行,且表单不会自动刷新 | 375 | return false;//必须要写,解决禁用submit提交,ajax方法才能正确执行,且表单不会自动刷新 |
369 | }) | 376 | }) |
370 | }); | 377 | }); |
1 | +import __global from "./global.js"; | ||
1 | let http = { | 2 | let http = { |
2 | - proxy: null, | ||
3 | isJson: function (obj) { | 3 | isJson: function (obj) { |
4 | var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == | 4 | var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == |
5 | "[object object]" && | 5 | "[object object]" && |
@@ -14,23 +14,39 @@ let http = { | @@ -14,23 +14,39 @@ let http = { | ||
14 | window.top.location.reload(); | 14 | window.top.location.reload(); |
15 | //window.top.location.href = localStorage.getItem('loginUrl'); | 15 | //window.top.location.href = localStorage.getItem('loginUrl'); |
16 | } else { | 16 | } else { |
17 | - http.proxy.$global.showMsg("服务异常,请联系管理员!","error"); | 17 | + __global.showMsg("服务异常,请联系管理员!","error"); |
18 | } | 18 | } |
19 | }catch (e){ | 19 | }catch (e){ |
20 | } | 20 | } |
21 | }, | 21 | }, |
22 | - post: function (requestUrl, data, callback, errFunc,showLoadding,setToken) { | ||
23 | - if (http.proxy == null) { | ||
24 | - const {proxy} = Vue.getCurrentInstance() | ||
25 | - http.proxy = proxy; | 22 | + getUrl: function (){ |
23 | + let gateWay = http.getGateWay(); | ||
24 | + if (gateWay && gateWay != null && gateWay != '') { | ||
25 | + return; | ||
26 | } | 26 | } |
27 | + http.get(window.location.origin + '/config/getConfig',{configName:'url'},function(res){ | ||
28 | + sessionStorage.setItem('domainName', res.gateway); | ||
29 | + // sessionStorage.setItem('domainInspectionURI', res.inspection_web); | ||
30 | + // sessionStorage.setItem('domainAssetsManage', res.assetsweb); | ||
31 | + // sessionStorage.setItem('graphEditorOrigin', res.mxgraph_editor); | ||
32 | + // sessionStorage.setItem('tingyun', res.tingyun); | ||
33 | + // sessionStorage.setItem('bigScreen', res.bigScreen); | ||
34 | + // sessionStorage.setItem('sxView', res.sxView); | ||
35 | + // sessionStorage.setItem('workflow', res.workflow); | ||
36 | + // sessionStorage.setItem('mp3', res.mp3); | ||
37 | + // sessionStorage.setItem('jimuReport', res.jimuReport); | ||
38 | + // sessionStorage.setItem('cmdbWeb', res.cmdbWeb); | ||
39 | + }) | ||
40 | + }, | ||
41 | + post: function (requestUrl, data, callback, errFunc,showLoadding,setToken) { | ||
42 | + | ||
27 | // 默认展示加载狂 | 43 | // 默认展示加载狂 |
28 | if(showLoadding == undefined){ | 44 | if(showLoadding == undefined){ |
29 | showLoadding = true; | 45 | showLoadding = true; |
30 | } | 46 | } |
31 | let loading = null; | 47 | let loading = null; |
32 | if(showLoadding && showLoadding == true){ | 48 | if(showLoadding && showLoadding == true){ |
33 | - loading = http.proxy.$global.showLoading(); | 49 | + loading = __global.showLoading(); |
34 | } | 50 | } |
35 | if(setToken == undefined || setToken == true){ | 51 | if(setToken == undefined || setToken == true){ |
36 | var access_token = 'access_token=' + http.getToken(); | 52 | var access_token = 'access_token=' + http.getToken(); |
@@ -41,7 +57,7 @@ let http = { | @@ -41,7 +57,7 @@ let http = { | ||
41 | } | 57 | } |
42 | } | 58 | } |
43 | $.ajax({ | 59 | $.ajax({ |
44 | - url: sessionStorage.getItem('domainName') + requestUrl, | 60 | + url: http.getGateWay() + requestUrl, |
45 | method: "post", | 61 | method: "post", |
46 | processData: false, | 62 | processData: false, |
47 | contentType: "application/json;charset=UTF-8", | 63 | contentType: "application/json;charset=UTF-8", |
@@ -72,17 +88,14 @@ let http = { | @@ -72,17 +88,14 @@ let http = { | ||
72 | 88 | ||
73 | }, | 89 | }, |
74 | get: function (requestUrl, data, callback, errFunc,showLoadding,setToken) { | 90 | get: function (requestUrl, data, callback, errFunc,showLoadding,setToken) { |
75 | - if (http.proxy == null) { | ||
76 | - const {proxy} = Vue.getCurrentInstance() | ||
77 | - http.proxy = proxy; | ||
78 | - } | 91 | + |
79 | // 默认展示加载狂 | 92 | // 默认展示加载狂 |
80 | if(showLoadding == undefined){ | 93 | if(showLoadding == undefined){ |
81 | showLoadding = true; | 94 | showLoadding = true; |
82 | } | 95 | } |
83 | let loading = null; | 96 | let loading = null; |
84 | if(showLoadding == true){ | 97 | if(showLoadding == true){ |
85 | - loading = http.proxy.$global.showLoading(); | 98 | + loading = __global.showLoading(); |
86 | } | 99 | } |
87 | let header = {}; | 100 | let header = {}; |
88 | if(setToken == undefined || setToken == true){ | 101 | if(setToken == undefined || setToken == true){ |
@@ -99,7 +112,7 @@ let http = { | @@ -99,7 +112,7 @@ let http = { | ||
99 | } | 112 | } |
100 | 113 | ||
101 | $.ajax({ | 114 | $.ajax({ |
102 | - url: sessionStorage.getItem('domainName') + requestUrl, | 115 | + url: http.getGateWay() + requestUrl, |
103 | method: "get", | 116 | method: "get", |
104 | headers: header, | 117 | headers: header, |
105 | data: data, | 118 | data: data, |
@@ -128,11 +141,7 @@ let http = { | @@ -128,11 +141,7 @@ let http = { | ||
128 | }, | 141 | }, |
129 | 142 | ||
130 | uploadFile(requestUrl, parmas,callback) { | 143 | uploadFile(requestUrl, parmas,callback) { |
131 | - if (http.proxy == null) { | ||
132 | - const {proxy} = Vue.getCurrentInstance() | ||
133 | - http.proxy = proxy; | ||
134 | - } | ||
135 | - const loading = http.proxy.$global.showLoading(); | 144 | + const loading = __global.showLoading(); |
136 | var access_token = 'access_token=' + http.getToken(); | 145 | var access_token = 'access_token=' + http.getToken(); |
137 | if (requestUrl.indexOf('?') == -1) { | 146 | if (requestUrl.indexOf('?') == -1) { |
138 | requestUrl += '?' + access_token; | 147 | requestUrl += '?' + access_token; |
@@ -146,7 +155,7 @@ let http = { | @@ -146,7 +155,7 @@ let http = { | ||
146 | })(parmas); | 155 | })(parmas); |
147 | 156 | ||
148 | $.ajax({ | 157 | $.ajax({ |
149 | - url: sessionStorage.getItem('domainName') + requestUrl, | 158 | + url: http.getGateWay() + requestUrl, |
150 | type: 'POST', | 159 | type: 'POST', |
151 | processData: false, | 160 | processData: false, |
152 | mimeType: "multipart/form-data", | 161 | mimeType: "multipart/form-data", |
@@ -157,7 +166,7 @@ let http = { | @@ -157,7 +166,7 @@ let http = { | ||
157 | loading.close(); | 166 | loading.close(); |
158 | // console.log("==>", requestUrl, xhr, textStatus) | 167 | // console.log("==>", requestUrl, xhr, textStatus) |
159 | http.reqErr(xhr); | 168 | http.reqErr(xhr); |
160 | - http.proxy.$global.showMsg("上传失败,请您确认文件是否存在!","error"); | 169 | + __global.showMsg("上传失败,请您确认文件是否存在!","error"); |
161 | 170 | ||
162 | }, | 171 | }, |
163 | success: function (data, textStatus, jqXHR) { | 172 | success: function (data, textStatus, jqXHR) { |
@@ -187,11 +196,16 @@ let http = { | @@ -187,11 +196,16 @@ let http = { | ||
187 | return `${keys}`; | 196 | return `${keys}`; |
188 | } | 197 | } |
189 | let p = formart(parmas); | 198 | let p = formart(parmas); |
190 | - window.open(sessionStorage.getItem('domainName') + requestUrl + "&" + p); | 199 | + window.open( http.getGateWay() + requestUrl + "&" + p); |
191 | }, | 200 | }, |
192 | getToken() { | 201 | getToken() { |
193 | return localStorage.getItem('access_token'); | 202 | return localStorage.getItem('access_token'); |
194 | }, | 203 | }, |
204 | + getGateWay () { | ||
205 | + let gateway = sessionStorage.getItem('domainName'); | ||
206 | + return gateway == null ? '' : gateway; | ||
207 | + } | ||
195 | } | 208 | } |
196 | - | 209 | +// 获取url |
210 | +http.getUrl(); | ||
197 | export default http | 211 | export default http |
@@ -116,7 +116,22 @@ export default { | @@ -116,7 +116,22 @@ export default { | ||
116 | proxy.$http.post("/api-web/bOpsScoreDetails/page", params, function (res) { | 116 | proxy.$http.post("/api-web/bOpsScoreDetails/page", params, function (res) { |
117 | if(res && res.code == 0){ | 117 | if(res && res.code == 0){ |
118 | closeDetail(true); | 118 | closeDetail(true); |
119 | - dataList.value = res.data; | 119 | + //Strat XuHaoJie 2021/12/31 10:56 TODO 解决列表不能展示数字类型的数据 暂时处理 |
120 | + let li =res.data.map(item =>{ | ||
121 | + let element = { | ||
122 | + deduction: item.deduction, | ||
123 | + id: item.id, | ||
124 | + item: item.item, | ||
125 | + projectScoreId: item.projectScoreId, | ||
126 | + rater: item.rater, | ||
127 | + remark: item.remark+'', | ||
128 | + score: item.score+'', | ||
129 | + standardScore: item.standardScore+'' | ||
130 | + } | ||
131 | + return element; | ||
132 | + }); | ||
133 | + dataList.value =li; | ||
134 | + //End XuHaoJie 2021/12/31 10:56 TODO 解决列表不能展示数字类型的数据 暂时处理 | ||
120 | } | 135 | } |
121 | }); | 136 | }); |
122 | } | 137 | } |
@@ -127,7 +142,11 @@ export default { | @@ -127,7 +142,11 @@ export default { | ||
127 | 142 | ||
128 | // 柱状图 | 143 | // 柱状图 |
129 | let score = () => { | 144 | let score = () => { |
130 | - proxy.$http.post("/api-web/bOpsScore/scoreRatio", {}, function (res) { | 145 | + let url = "/api-web/bOpsScore/scoreRatio"; |
146 | + if (props.projectId == 1) { | ||
147 | + url = "/api-web/bOpsScore/scoreRatio?ops=dzswj" | ||
148 | + } | ||
149 | + proxy.$http.post(url, {}, function (res) { | ||
131 | if (res && res.data) { | 150 | if (res && res.data) { |
132 | let arr = []; | 151 | let arr = []; |
133 | res.data.forEach(item => { | 152 | res.data.forEach(item => { |
@@ -115,17 +115,17 @@ export default { | @@ -115,17 +115,17 @@ export default { | ||
115 | 115 | ||
116 | const optionInit=()=>{ | 116 | const optionInit=()=>{ |
117 | 117 | ||
118 | - let data3=proxy.yAxisData[0]; | 118 | + let data3=proxy.yAxisData[2]; |
119 | let data4=proxy.yAxisData[3]; | 119 | let data4=proxy.yAxisData[3]; |
120 | let min2=proxy.calMin([data3,data4]); | 120 | let min2=proxy.calMin([data3,data4]); |
121 | let max2=proxy.calMax([data3,data4]); | 121 | let max2=proxy.calMax([data3,data4]); |
122 | let ySeriesCommon=[]; | 122 | let ySeriesCommon=[]; |
123 | proxy.legendData.map((item,index)=>{ | 123 | proxy.legendData.map((item,index)=>{ |
124 | let i=0; | 124 | let i=0; |
125 | - if(index%2==0 ||index%3==0){ | ||
126 | - i=0; | ||
127 | - }else{ | 125 | + if(index!=0 && (index%2==0 ||index%3==0)){ |
128 | i=1; | 126 | i=1; |
127 | + }else{ | ||
128 | + i=0; | ||
129 | } | 129 | } |
130 | let areaStyle=0; | 130 | let areaStyle=0; |
131 | if(i==2){ | 131 | if(i==2){ |
@@ -120,8 +120,6 @@ export default { | @@ -120,8 +120,6 @@ export default { | ||
120 | proxy.modleId=props.propsData.modleId; | 120 | proxy.modleId=props.propsData.modleId; |
121 | proxy.name=props.propsData.name; | 121 | proxy.name=props.propsData.name; |
122 | } | 122 | } |
123 | - console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr) | ||
124 | - | ||
125 | } | 123 | } |
126 | //添加Apm | 124 | //添加Apm |
127 | let addRes=(row,index)=>{ | 125 | let addRes=(row,index)=>{ |
@@ -258,7 +256,6 @@ export default { | @@ -258,7 +256,6 @@ export default { | ||
258 | //显示已添加过的应用列表数据 | 256 | //显示已添加过的应用列表数据 |
259 | let apmMonitorListChecked=Vue.ref([]); | 257 | let apmMonitorListChecked=Vue.ref([]); |
260 | let setListData=()=>{ | 258 | let setListData=()=>{ |
261 | - console.log("()",proxy.apmMonitorListChecked) | ||
262 | if(props.apmMonitorList){ | 259 | if(props.apmMonitorList){ |
263 | props.apmMonitorList.map((item,index)=>{ | 260 | props.apmMonitorList.map((item,index)=>{ |
264 | proxy.tableDataList.map(v=>{ | 261 | proxy.tableDataList.map(v=>{ |
@@ -51,7 +51,6 @@ export default { | @@ -51,7 +51,6 @@ export default { | ||
51 | let applicationMonitorVisible=Vue.ref(false); | 51 | let applicationMonitorVisible=Vue.ref(false); |
52 | 52 | ||
53 | Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{ | 53 | Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{ |
54 | - console.log("010101",newValue) | ||
55 | proxy.applicationMonitorVisible=newValue; | 54 | proxy.applicationMonitorVisible=newValue; |
56 | if(newValue){ | 55 | if(newValue){ |
57 | proxy.setBizId(); | 56 | proxy.setBizId(); |
@@ -94,8 +93,6 @@ export default { | @@ -94,8 +93,6 @@ export default { | ||
94 | proxy.modleId=props.propsData.modleId; | 93 | proxy.modleId=props.propsData.modleId; |
95 | proxy.name=props.propsData.name; | 94 | proxy.name=props.propsData.name; |
96 | } | 95 | } |
97 | - console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr) | ||
98 | - | ||
99 | } | 96 | } |
100 | //添加应用 | 97 | //添加应用 |
101 | let addRes=(row,index)=>{ | 98 | let addRes=(row,index)=>{ |
@@ -179,7 +176,6 @@ export default { | @@ -179,7 +176,6 @@ export default { | ||
179 | v.checked=false; | 176 | v.checked=false; |
180 | }) | 177 | }) |
181 | } | 178 | } |
182 | - console.log("selectchange",val,proxy.tableDataList) | ||
183 | } | 179 | } |
184 | 180 | ||
185 | //添加选中的 | 181 | //添加选中的 |
@@ -94,7 +94,6 @@ export default { | @@ -94,7 +94,6 @@ export default { | ||
94 | } | 94 | } |
95 | //获取接收到的传值 bizid | 95 | //获取接收到的传值 bizid |
96 | let setBizId=()=>{ | 96 | let setBizId=()=>{ |
97 | - console.log("props.propsData",props.propsData) | ||
98 | if(props.propsData){ | 97 | if(props.propsData){ |
99 | proxy.bizId=props.propsData.bizId; | 98 | proxy.bizId=props.propsData.bizId; |
100 | proxy.targetId=props.propsData.targetId; | 99 | proxy.targetId=props.propsData.targetId; |
@@ -105,8 +104,6 @@ export default { | @@ -105,8 +104,6 @@ export default { | ||
105 | }else{ | 104 | }else{ |
106 | proxy.isDetail=false; | 105 | proxy.isDetail=false; |
107 | } | 106 | } |
108 | - console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr) | ||
109 | - | ||
110 | } | 107 | } |
111 | // 监听编辑状态 | 108 | // 监听编辑状态 |
112 | Vue.watch(() => props.propsData.bizId, (newValue,oldValue) => { | 109 | Vue.watch(() => props.propsData.bizId, (newValue,oldValue) => { |
@@ -119,7 +116,6 @@ export default { | @@ -119,7 +116,6 @@ export default { | ||
119 | }); | 116 | }); |
120 | //资源类型改变查找基础列表 | 117 | //资源类型改变查找基础列表 |
121 | let changeRes=(val)=>{ | 118 | let changeRes=(val)=>{ |
122 | - console.log(val) | ||
123 | proxy.getEnvironmentData(); | 119 | proxy.getEnvironmentData(); |
124 | 120 | ||
125 | } | 121 | } |
@@ -139,8 +135,6 @@ export default { | @@ -139,8 +135,6 @@ export default { | ||
139 | pageSize:proxy.pageSize | 135 | pageSize:proxy.pageSize |
140 | 136 | ||
141 | } | 137 | } |
142 | - console.log("*/*/*",proxy.targetId) | ||
143 | - | ||
144 | proxy.$http.get('/api-web/fault/conf/base/getFaultBaseAllResInfo',params,function (res){ | 138 | proxy.$http.get('/api-web/fault/conf/base/getFaultBaseAllResInfo',params,function (res){ |
145 | if(res && res.data){ | 139 | if(res && res.data){ |
146 | proxy.count = res.count; | 140 | proxy.count = res.count; |
@@ -85,9 +85,7 @@ export default { | @@ -85,9 +85,7 @@ export default { | ||
85 | }) | 85 | }) |
86 | 86 | ||
87 | }) | 87 | }) |
88 | - console.log("baseListChecked",proxy.baseListChecked) | ||
89 | } | 88 | } |
90 | - console.log("hahahah",props.baseCount,proxy.count) | ||
91 | if(props.baseCount==proxy.count){ | 89 | if(props.baseCount==proxy.count){ |
92 | proxy.isLoading=true; | 90 | proxy.isLoading=true; |
93 | }else{ | 91 | }else{ |
@@ -98,7 +96,6 @@ export default { | @@ -98,7 +96,6 @@ export default { | ||
98 | 96 | ||
99 | // 监听编辑状态 | 97 | // 监听编辑状态 |
100 | Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{ | 98 | Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{ |
101 | - console.log("base",newValue) | ||
102 | proxy.baseVisible=newValue; | 99 | proxy.baseVisible=newValue; |
103 | if(newValue){ | 100 | if(newValue){ |
104 | proxy.setBizId(); | 101 | proxy.setBizId(); |
@@ -135,7 +132,6 @@ export default { | @@ -135,7 +132,6 @@ export default { | ||
135 | } | 132 | } |
136 | //获取接收到的传值 bizid | 133 | //获取接收到的传值 bizid |
137 | let setBizId=()=>{ | 134 | let setBizId=()=>{ |
138 | - console.log("props.propsData",props.propsData) | ||
139 | if(props.propsData){ | 135 | if(props.propsData){ |
140 | proxy.bizId=props.propsData.bizId; | 136 | proxy.bizId=props.propsData.bizId; |
141 | proxy.targetId=props.propsData.targetId; | 137 | proxy.targetId=props.propsData.targetId; |
@@ -151,7 +147,6 @@ export default { | @@ -151,7 +147,6 @@ export default { | ||
151 | 147 | ||
152 | //资源类型改变查找基础列表 | 148 | //资源类型改变查找基础列表 |
153 | let changeRes=(val)=>{ | 149 | let changeRes=(val)=>{ |
154 | - console.log(val) | ||
155 | proxy.getEnvironmentData(); | 150 | proxy.getEnvironmentData(); |
156 | 151 | ||
157 | } | 152 | } |
@@ -194,7 +194,6 @@ export default { | @@ -194,7 +194,6 @@ export default { | ||
194 | //获取已添加的环境基础 | 194 | //获取已添加的环境基础 |
195 | let callbackBaseList=(val)=>{ | 195 | let callbackBaseList=(val)=>{ |
196 | proxy.baseList=val; | 196 | proxy.baseList=val; |
197 | - console.log("callbackBaseList",val,proxy.baseList) | ||
198 | } | 197 | } |
199 | 198 | ||
200 | return{ | 199 | return{ |
@@ -494,8 +493,6 @@ export default { | @@ -494,8 +493,6 @@ export default { | ||
494 | setDetailConfig(typeVal){ | 493 | setDetailConfig(typeVal){ |
495 | let that=this; | 494 | let that=this; |
496 | if(this.configData && this.configData.length>0){ | 495 | if(this.configData && this.configData.length>0){ |
497 | - console.log("configData",this.configData,typeVal) | ||
498 | - console.log("that.docid",that.docId) | ||
499 | this.configData.map((item,index)=>{ | 496 | this.configData.map((item,index)=>{ |
500 | if(item.type==typeVal){ | 497 | if(item.type==typeVal){ |
501 | // that.targetId=item.targetId; | 498 | // that.targetId=item.targetId; |
@@ -518,7 +515,6 @@ export default { | @@ -518,7 +515,6 @@ export default { | ||
518 | if(typeVal=='base'){ | 515 | if(typeVal=='base'){ |
519 | this.getTargetId(typeVal); | 516 | this.getTargetId(typeVal); |
520 | } | 517 | } |
521 | - console.log("lll",this.targetId) | ||
522 | this.propsData={ | 518 | this.propsData={ |
523 | bizId:this.busTypeArr, | 519 | bizId:this.busTypeArr, |
524 | docId:this.docId, | 520 | docId:this.docId, |
@@ -531,7 +527,6 @@ export default { | @@ -531,7 +527,6 @@ export default { | ||
531 | }, | 527 | }, |
532 | //设置state | 528 | //设置state |
533 | switchState(typeVal,state){ | 529 | switchState(typeVal,state){ |
534 | - console.log("state",typeVal,state) | ||
535 | switch (typeVal) { | 530 | switch (typeVal) { |
536 | 531 | ||
537 | case "netlink": | 532 | case "netlink": |
@@ -582,7 +577,6 @@ export default { | @@ -582,7 +577,6 @@ export default { | ||
582 | }, | 577 | }, |
583 | //关闭网络测试添加配置节点弹框 | 578 | //关闭网络测试添加配置节点弹框 |
584 | getNetworkMonitorList(itemData){ | 579 | getNetworkMonitorList(itemData){ |
585 | - console.log("itemdata",itemData) | ||
586 | this.networkMonitorVisible=false; | 580 | this.networkMonitorVisible=false; |
587 | this.networkMonitorList=itemData.networkMonitorList; | 581 | this.networkMonitorList=itemData.networkMonitorList; |
588 | if(itemData.faultConfId){ | 582 | if(itemData.faultConfId){ |
@@ -598,7 +592,6 @@ export default { | @@ -598,7 +592,6 @@ export default { | ||
598 | item.targetId=val; | 592 | item.targetId=val; |
599 | } | 593 | } |
600 | }) | 594 | }) |
601 | - console.log("modeldata",this.modelData); | ||
602 | }, | 595 | }, |
603 | //获取模块对应的targetId | 596 | //获取模块对应的targetId |
604 | getTargetId(type){ | 597 | getTargetId(type){ |
@@ -634,7 +627,6 @@ export default { | @@ -634,7 +627,6 @@ export default { | ||
634 | bizId:this.busTypeArr | 627 | bizId:this.busTypeArr |
635 | 628 | ||
636 | } | 629 | } |
637 | - console.log("applist",params) | ||
638 | this.$http.get('/api-web/fault/conf/npm/npmList',params,function (res){ | 630 | this.$http.get('/api-web/fault/conf/npm/npmList',params,function (res){ |
639 | if(res && res.data){ | 631 | if(res && res.data){ |
640 | that.applicationMonitorList=res.data; | 632 | that.applicationMonitorList=res.data; |
@@ -659,7 +651,6 @@ export default { | @@ -659,7 +651,6 @@ export default { | ||
659 | this.getBaseList(); | 651 | this.getBaseList(); |
660 | }, | 652 | }, |
661 | getBaseList(){ | 653 | getBaseList(){ |
662 | - console.log('basic',this.$refs.basic) | ||
663 | this.$refs.basic.getEnvironmentData(); | 654 | this.$refs.basic.getEnvironmentData(); |
664 | 655 | ||
665 | }, | 656 | }, |
@@ -821,7 +812,6 @@ export default { | @@ -821,7 +812,6 @@ export default { | ||
821 | }, | 812 | }, |
822 | //保存模块类型-不包含故障定义模块 | 813 | //保存模块类型-不包含故障定义模块 |
823 | saveConfigDetailOther(){ | 814 | saveConfigDetailOther(){ |
824 | - console.log("save",this.state) | ||
825 | let that=this; | 815 | let that=this; |
826 | this.setState(); | 816 | this.setState(); |
827 | this.getTargetId(this.type); | 817 | this.getTargetId(this.type); |
@@ -833,7 +823,6 @@ export default { | @@ -833,7 +823,6 @@ export default { | ||
833 | } | 823 | } |
834 | 824 | ||
835 | }else if(this.type=='npm'){ | 825 | }else if(this.type=='npm'){ |
836 | - console.log("aaa",this.applicationMonitorList) | ||
837 | if(this.applicationMonitorList.length==0){ | 826 | if(this.applicationMonitorList.length==0){ |
838 | this.$global.showMsg('请先选择添加应用配置','warning'); | 827 | this.$global.showMsg('请先选择添加应用配置','warning'); |
839 | return; | 828 | return; |
@@ -1100,7 +1089,6 @@ export default { | @@ -1100,7 +1089,6 @@ export default { | ||
1100 | 1089 | ||
1101 | this.$http.get('/api-web/fault/conf/isExistByBizId/'+this.busTypeArr, {},function (res){ | 1090 | this.$http.get('/api-web/fault/conf/isExistByBizId/'+this.busTypeArr, {},function (res){ |
1102 | if(res && res.success){ | 1091 | if(res && res.success){ |
1103 | - console.log('sssss',that.busTypeArr) | ||
1104 | that.busTypeArr=val; | 1092 | that.busTypeArr=val; |
1105 | that.$forceUpdate(); | 1093 | that.$forceUpdate(); |
1106 | 1094 | ||
@@ -1148,7 +1136,6 @@ export default { | @@ -1148,7 +1136,6 @@ export default { | ||
1148 | }, | 1136 | }, |
1149 | watch:{ | 1137 | watch:{ |
1150 | busTypeArr(newValue, oldValue) { | 1138 | busTypeArr(newValue, oldValue) { |
1151 | - console.log("busTypeArr",newValue) | ||
1152 | 1139 | ||
1153 | } | 1140 | } |
1154 | 1141 |
@@ -104,7 +104,6 @@ export default { | @@ -104,7 +104,6 @@ export default { | ||
104 | let name=Vue.ref(); | 104 | let name=Vue.ref(); |
105 | 105 | ||
106 | Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{ | 106 | Vue.watch(()=>props.isDisplay,(newValue, oldValue)=>{ |
107 | -console.log("jdjdjdjdj",newValue) | ||
108 | proxy.networkMonitorVisible=newValue; | 107 | proxy.networkMonitorVisible=newValue; |
109 | if(newValue){ | 108 | if(newValue){ |
110 | proxy.setBizId(); | 109 | proxy.setBizId(); |
@@ -159,7 +158,6 @@ console.log("jdjdjdjdj",newValue) | @@ -159,7 +158,6 @@ console.log("jdjdjdjdj",newValue) | ||
159 | 158 | ||
160 | //获取链路信息列表 | 159 | //获取链路信息列表 |
161 | let getNetLinkList=()=>{ | 160 | let getNetLinkList=()=>{ |
162 | - console.log("333",proxy.targetId) | ||
163 | let params={ | 161 | let params={ |
164 | targetId:proxy.targetId | 162 | targetId:proxy.targetId |
165 | 163 | ||
@@ -181,13 +179,11 @@ console.log("jdjdjdjdj",newValue) | @@ -181,13 +179,11 @@ console.log("jdjdjdjdj",newValue) | ||
181 | let saveLinkAndNodeInfo=()=>{ | 179 | let saveLinkAndNodeInfo=()=>{ |
182 | if(proxy.linkName){ | 180 | if(proxy.linkName){ |
183 | let bNetNodeList=proxy.nodeData.flat(2); | 181 | let bNetNodeList=proxy.nodeData.flat(2); |
184 | - console.log('aarr--',bNetNodeList) | ||
185 | // bNetNodeList.nodeName=proxy.nodeName; | 182 | // bNetNodeList.nodeName=proxy.nodeName; |
186 | if(bNetNodeList[bNetNodeList.length-1].isAdd){ | 183 | if(bNetNodeList[bNetNodeList.length-1].isAdd){ |
187 | bNetNodeList.splice(bNetNodeList.length-1,1); | 184 | bNetNodeList.splice(bNetNodeList.length-1,1); |
188 | 185 | ||
189 | } | 186 | } |
190 | - console.log('&&',bNetNodeList) | ||
191 | bNetNodeList.map((item,index)=>{ | 187 | bNetNodeList.map((item,index)=>{ |
192 | item.sort=index; | 188 | item.sort=index; |
193 | }) | 189 | }) |
@@ -234,7 +230,6 @@ console.log("jdjdjdjdj",newValue) | @@ -234,7 +230,6 @@ console.log("jdjdjdjdj",newValue) | ||
234 | } | 230 | } |
235 | //添加节点 | 231 | //添加节点 |
236 | let addRes=(row,index)=>{ | 232 | let addRes=(row,index)=>{ |
237 | - console.log("row",row,proxy.nodeDataChecked) | ||
238 | let checked=false; | 233 | let checked=false; |
239 | proxy.nodeDataChecked.map((item,index)=>{ | 234 | proxy.nodeDataChecked.map((item,index)=>{ |
240 | if(row.id==item.id){ | 235 | if(row.id==item.id){ |
@@ -258,7 +253,6 @@ console.log("jdjdjdjdj",newValue) | @@ -258,7 +253,6 @@ console.log("jdjdjdjdj",newValue) | ||
258 | if(!proxy.nodeName){ | 253 | if(!proxy.nodeName){ |
259 | proxy.$global.showMsg('请填写链路节点名称','warning') | 254 | proxy.$global.showMsg('请填写链路节点名称','warning') |
260 | }else{ | 255 | }else{ |
261 | - console.log("2*2") | ||
262 | bNetNodeList.nodeName=proxy.nodeName; | 256 | bNetNodeList.nodeName=proxy.nodeName; |
263 | bNetNodeList.type='point'; | 257 | bNetNodeList.type='point'; |
264 | bNetNodeList.nodeType='point'; | 258 | bNetNodeList.nodeType='point'; |
@@ -286,7 +280,6 @@ console.log("jdjdjdjdj",newValue) | @@ -286,7 +280,6 @@ console.log("jdjdjdjdj",newValue) | ||
286 | 280 | ||
287 | if(proxy.flag){ | 281 | if(proxy.flag){ |
288 | //插入的是点 | 282 | //插入的是点 |
289 | - console.log("isadd",row.isAdd) | ||
290 | // if(row.isAdd){ | 283 | // if(row.isAdd){ |
291 | //isAdd为true代表是添加 | 284 | //isAdd为true代表是添加 |
292 | // proxy.nodeData.splice(length-1,0,[row]); | 285 | // proxy.nodeData.splice(length-1,0,[row]); |
@@ -309,8 +302,6 @@ console.log("jdjdjdjdj",newValue) | @@ -309,8 +302,6 @@ console.log("jdjdjdjdj",newValue) | ||
309 | // proxy.nodeData.push([{nodeName:'',id:'',isAdd:true}]) | 302 | // proxy.nodeData.push([{nodeName:'',id:'',isAdd:true}]) |
310 | 303 | ||
311 | } | 304 | } |
312 | - console.log(" proxy.nodeData", proxy.nodeData,proxy.nodeData.length) | ||
313 | - | ||
314 | proxy.nodeDataChecked=proxy.nodeData.flat(2); | 305 | proxy.nodeDataChecked=proxy.nodeData.flat(2); |
315 | proxy.addSetLIstVisible=false; | 306 | proxy.addSetLIstVisible=false; |
316 | 307 | ||
@@ -326,8 +317,6 @@ console.log("jdjdjdjdj",newValue) | @@ -326,8 +317,6 @@ console.log("jdjdjdjdj",newValue) | ||
326 | proxy.modleId=props.propsData.modleId; | 317 | proxy.modleId=props.propsData.modleId; |
327 | proxy.name=props.propsData.name; | 318 | proxy.name=props.propsData.name; |
328 | } | 319 | } |
329 | - console.log("*",props.propsData,proxy.bizId,proxy.busTypeArr) | ||
330 | - | ||
331 | } | 320 | } |
332 | 321 | ||
333 | 322 | ||
@@ -425,7 +414,6 @@ console.log("jdjdjdjdj",newValue) | @@ -425,7 +414,6 @@ console.log("jdjdjdjdj",newValue) | ||
425 | 414 | ||
426 | that.nodeDataChecked=that.nodeData.flat(2); | 415 | that.nodeDataChecked=that.nodeData.flat(2); |
427 | that.nodeName=''; | 416 | that.nodeName=''; |
428 | - console.log("delette",that.nodeData.length) | ||
429 | if(that.nodeData.length<1){ | 417 | if(that.nodeData.length<1){ |
430 | that.addSetLIstVisible=true; | 418 | that.addSetLIstVisible=true; |
431 | }else{ | 419 | }else{ |
@@ -460,14 +448,11 @@ console.log("jdjdjdjdj",newValue) | @@ -460,14 +448,11 @@ console.log("jdjdjdjdj",newValue) | ||
460 | for(let i=0;i<resData.length;i+=2){ | 448 | for(let i=0;i<resData.length;i+=2){ |
461 | arr.push(resData.slice(i,i+2)) | 449 | arr.push(resData.slice(i,i+2)) |
462 | } | 450 | } |
463 | - console.log("有节点",arr,arr.length) | ||
464 | that.nodeData=arr; | 451 | that.nodeData=arr; |
465 | - console.log('nodedata',that.nodeData,that.nodeData.length) | ||
466 | let length=that.nodeData.length; | 452 | let length=that.nodeData.length; |
467 | if(that.nodeData.length>0){ | 453 | if(that.nodeData.length>0){ |
468 | that.addSetLIstVisible=false; | 454 | that.addSetLIstVisible=false; |
469 | let length1=that.nodeData[length-1].length; | 455 | let length1=that.nodeData[length-1].length; |
470 | - console.log("length1",length1) | ||
471 | if(length1>1){ | 456 | if(length1>1){ |
472 | that.nodeData.push([{nodeName:'',id:'',isAdd:true}]) | 457 | that.nodeData.push([{nodeName:'',id:'',isAdd:true}]) |
473 | 458 | ||
@@ -489,7 +474,6 @@ console.log("jdjdjdjdj",newValue) | @@ -489,7 +474,6 @@ console.log("jdjdjdjdj",newValue) | ||
489 | }, | 474 | }, |
490 | //点击进入添加节点页面 | 475 | //点击进入添加节点页面 |
491 | addTableList(flag,itemNode){ | 476 | addTableList(flag,itemNode){ |
492 | - console.log("itemNode",itemNode) | ||
493 | // if(itemNode==-1 || itemNode.length>0){ | 477 | // if(itemNode==-1 || itemNode.length>0){ |
494 | // if(itemNode.length==1){ | 478 | // if(itemNode.length==1){ |
495 | // if(itemNode[0]) | 479 | // if(itemNode[0]) |
@@ -61,7 +61,6 @@ export default { | @@ -61,7 +61,6 @@ export default { | ||
61 | methods: { | 61 | methods: { |
62 | //处理 | 62 | //处理 |
63 | handleFault(item){ | 63 | handleFault(item){ |
64 | - console.log("333",item) | ||
65 | this.faultHandleForm=item; | 64 | this.faultHandleForm=item; |
66 | this.faultDiagnosisVisible=true; | 65 | this.faultDiagnosisVisible=true; |
67 | 66 |
@@ -119,17 +119,17 @@ export default { | @@ -119,17 +119,17 @@ export default { | ||
119 | } | 119 | } |
120 | const optionInit=()=>{ | 120 | const optionInit=()=>{ |
121 | 121 | ||
122 | - let data3=proxy.yAxisData[0]; | 122 | + let data3=proxy.yAxisData[2]; |
123 | let data4=proxy.yAxisData[3]; | 123 | let data4=proxy.yAxisData[3]; |
124 | let min2=proxy.calMin([data3,data4]); | 124 | let min2=proxy.calMin([data3,data4]); |
125 | let max2=proxy.calMax([data3,data4]); | 125 | let max2=proxy.calMax([data3,data4]); |
126 | let ySeriesCommon=[]; | 126 | let ySeriesCommon=[]; |
127 | proxy.legendData.map((item,index)=>{ | 127 | proxy.legendData.map((item,index)=>{ |
128 | let i=0; | 128 | let i=0; |
129 | - if(index%2==0 ||index%3==0){ | ||
130 | - i=0; | ||
131 | - }else{ | 129 | + if(index!=0 && (index%2==0 ||index%3==0)){ |
132 | i=1; | 130 | i=1; |
131 | + }else{ | ||
132 | + i=0; | ||
133 | } | 133 | } |
134 | let areaStyle=0; | 134 | let areaStyle=0; |
135 | if(i==2){ | 135 | if(i==2){ |
-
Please register or login to post a comment