Authored by 张凯

Merge branch 'master' of http://113.200.75.45:82/monitor_v3/hg-monitor-web into joke

Showing 18 changed files with 208 additions and 313 deletions
@@ -276,7 +276,7 @@ @@ -276,7 +276,7 @@
276 align-items: flex-start; 276 align-items: flex-start;
277 } 277 }
278 .list-step-name{ 278 .list-step-name{
279 - margin-left: 10px; 279 + /*margin-left: 10px;*/
280 margin-top: 10px; 280 margin-top: 10px;
281 color:#999999; 281 color:#999999;
282 } 282 }
@@ -303,6 +303,16 @@ @@ -303,6 +303,16 @@
303 width: 84px; 303 width: 84px;
304 border-top:5px solid #cccccc; 304 border-top:5px solid #cccccc;
305 } 305 }
  306 +.list-line-none{
  307 + display: inline-block;
  308 + width: 34px;
  309 +}
  310 +.width-100{
  311 + width:100px;
  312 + display: inline-block;
  313 + text-align: left;
  314 +}
  315 +
306 .list-line.isActive{ 316 .list-line.isActive{
307 border-top-color:#3B91FF; 317 border-top-color:#3B91FF;
308 } 318 }
@@ -12,6 +12,11 @@ @@ -12,6 +12,11 @@
12 :showTools="false" 12 :showTools="false"
13 :maxWidth="width" 13 :maxWidth="width"
14 :height="200"> 14 :height="200">
  15 + <template #tools="{scope}" v-if="showDetail">
  16 + <el-button type="text" size="small" @click.prevent="handleClick(scope.row,scope.$index)">
  17 + 明细
  18 + </el-button>
  19 + </template>
15 </cm-table-page> 20 </cm-table-page>
16 </div> 21 </div>
17 22
@@ -23,11 +23,16 @@ export default { @@ -23,11 +23,16 @@ export default {
23 props: { 23 props: {
24 faultType:{ 24 faultType:{
25 type: String, 25 type: String,
26 - default:'NPM' 26 + default:''
27 }, 27 },
28 faultNo:{ 28 faultNo:{
29 type: String, 29 type: String,
30 default:'' 30 default:''
  31 + },
  32 + // 展示详情页
  33 + showDetail:{
  34 + type: String,
  35 + default:''
31 } 36 }
32 }, 37 },
33 setup(props, {attrs, slots, emit}) { 38 setup(props, {attrs, slots, emit}) {
@@ -41,268 +46,7 @@ export default { @@ -41,268 +46,7 @@ export default {
41 46
42 47
43 let getPage = () =>{ 48 let getPage = () =>{
44 - let data = {  
45 - "5e991f126b8ee03541976384": [  
46 - {  
47 - "id": "da57056823be410c848a4a4ab821de41",  
48 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
49 - "faultNo": "GZ202112130014",  
50 - "targetId": "11cdc282437a91174d808e114954463d",  
51 - "targetType": "NPM",  
52 - "itemId": "ccb5404e731ff9b7c2344c2806b41442",  
53 - "timestap": "2021-12-13T12:31:08.988+0800",  
54 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
55 - "bizName": "电子税务局",  
56 - "resId": "5e991f126b8ee03541976384",  
57 - "resName": "各地市-网上申报Weblogic",  
58 - "resType": "NPM_STREAM",  
59 - "kpiId": "count",  
60 - "kpiName": "业务量",  
61 - "flag": "base",  
62 - "kpiValue": "26299",  
63 - "collTime": "2021-12-04 10:50:00",  
64 - "dataType": "last",  
65 - "createTimeToMonth": "2021-12"  
66 - },  
67 - {  
68 - "id": "bd8c7d4fdf1247d195652251c95acca0",  
69 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
70 - "faultNo": "GZ202112130014",  
71 - "targetId": "11cdc282437a91174d808e114954463d",  
72 - "targetType": "NPM",  
73 - "itemId": "ccb5404e731ff9b7c2344c2806b41442",  
74 - "timestap": "2021-12-13T12:31:08.988+0800",  
75 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
76 - "bizName": "电子税务局",  
77 - "resId": "5e991f126b8ee03541976384",  
78 - "resName": "各地市-网上申报Weblogic",  
79 - "resType": "NPM_STREAM",  
80 - "kpiId": "response_rate",  
81 - "kpiName": "响应率",  
82 - "flag": "base",  
83 - "kpiValue": "47.25",  
84 - "collTime": "2021-12-04 10:50:00",  
85 - "dataType": "last",  
86 - "createTimeToMonth": "2021-12"  
87 - },  
88 - {  
89 - "id": "a9e00473c9964300bde164c1183ebe1d",  
90 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
91 - "faultNo": "GZ202112130014",  
92 - "targetId": "11cdc282437a91174d808e114954463d",  
93 - "targetType": "NPM",  
94 - "itemId": "ccb5404e731ff9b7c2344c2806b41442",  
95 - "timestap": "2021-12-13T12:31:08.988+0800",  
96 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
97 - "bizName": "电子税务局",  
98 - "resId": "5e991f126b8ee03541976384",  
99 - "resName": "各地市-网上申报Weblogic",  
100 - "resType": "NPM_STREAM",  
101 - "kpiId": "success_rate",  
102 - "kpiName": "成功率",  
103 - "flag": "base",  
104 - "kpiValue": "100",  
105 - "collTime": "2021-12-04 10:50:00",  
106 - "dataType": "last",  
107 - "createTimeToMonth": "2021-12"  
108 - }  
109 - ],  
110 - "5e966cec6b8e8d2938be120a": [  
111 - {  
112 - "id": "1f12837a6faf4193a3867759ee3d0bb8",  
113 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
114 - "faultNo": "GZ202112130014",  
115 - "targetId": "11cdc282437a91174d808e114954463d",  
116 - "targetType": "NPM",  
117 - "itemId": "2ba02341a1c5dc28f6a2bd362be58ca9",  
118 - "timestap": "2021-12-13T12:29:14.907+0800",  
119 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
120 - "bizName": "电子税务局",  
121 - "resId": "5e966cec6b8e8d2938be120a",  
122 - "resName": "nginx-Nginx代理 ",  
123 - "resType": "NPM_STREAM",  
124 - "kpiId": "count",  
125 - "kpiName": "业务量",  
126 - "flag": "base",  
127 - "kpiValue": "26299",  
128 - "collTime": "2021-12-04 10:50:00",  
129 - "dataType": "last",  
130 - "createTimeToMonth": "2021-12"  
131 - },  
132 - {  
133 - "id": "11c19383b95c4ec8b30ea07f5c9e3f42",  
134 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
135 - "faultNo": "GZ202112130014",  
136 - "targetId": "11cdc282437a91174d808e114954463d",  
137 - "targetType": "NPM",  
138 - "itemId": "2ba02341a1c5dc28f6a2bd362be58ca9",  
139 - "timestap": "2021-12-13T12:29:14.907+0800",  
140 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
141 - "bizName": "电子税务局",  
142 - "resId": "5e966cec6b8e8d2938be120a",  
143 - "resName": "nginx-Nginx代理 ",  
144 - "resType": "NPM_STREAM",  
145 - "kpiId": "response_rate",  
146 - "kpiName": "响应率",  
147 - "flag": "base",  
148 - "kpiValue": "47.25",  
149 - "collTime": "2021-12-04 10:50:00",  
150 - "dataType": "last",  
151 - "createTimeToMonth": "2021-12"  
152 - },  
153 - {  
154 - "id": "426fe02a1ebd4949a68167612933c880",  
155 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
156 - "faultNo": "GZ202112130014",  
157 - "targetId": "11cdc282437a91174d808e114954463d",  
158 - "targetType": "NPM",  
159 - "itemId": "2ba02341a1c5dc28f6a2bd362be58ca9",  
160 - "timestap": "2021-12-13T12:29:14.907+0800",  
161 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
162 - "bizName": "电子税务局",  
163 - "resId": "5e966cec6b8e8d2938be120a",  
164 - "resName": "nginx-Nginx代理 ",  
165 - "resType": "NPM_STREAM",  
166 - "kpiId": "success_rate",  
167 - "kpiName": "成功率",  
168 - "flag": "base",  
169 - "kpiValue": "100",  
170 - "collTime": "2021-12-04 10:50:00",  
171 - "dataType": "last",  
172 - "createTimeToMonth": "2021-12"  
173 - }  
174 - ],  
175 - "5e9594b66b8e8d293845bd70": [  
176 - {  
177 - "id": "84e0ad1f09e049fd97efe18c5eb9a40b",  
178 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
179 - "faultNo": "GZ202112130014",  
180 - "targetId": "11cdc282437a91174d808e114954463d",  
181 - "targetType": "NPM",  
182 - "itemId": "953ff1ab4a718866a2b91ae5da50627e",  
183 - "timestap": "2021-12-13T12:30:15.355+0800",  
184 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
185 - "bizName": "电子税务局",  
186 - "resId": "5e9594b66b8e8d293845bd70",  
187 - "resName": "MQ-EDAS",  
188 - "resType": "NPM_STREAM",  
189 - "kpiId": "count",  
190 - "kpiName": "业务量",  
191 - "flag": "base",  
192 - "kpiValue": "26299",  
193 - "collTime": "2021-12-04 10:50:00",  
194 - "dataType": "last",  
195 - "createTimeToMonth": "2021-12"  
196 - },  
197 - {  
198 - "id": "e0e71be7a26f469b932f3b197c2ea7e8",  
199 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
200 - "faultNo": "GZ202112130014",  
201 - "targetId": "11cdc282437a91174d808e114954463d",  
202 - "targetType": "NPM",  
203 - "itemId": "953ff1ab4a718866a2b91ae5da50627e",  
204 - "timestap": "2021-12-13T12:30:15.355+0800",  
205 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
206 - "bizName": "电子税务局",  
207 - "resId": "5e9594b66b8e8d293845bd70",  
208 - "resName": "MQ-EDAS",  
209 - "resType": "NPM_STREAM",  
210 - "kpiId": "response_rate",  
211 - "kpiName": "响应率",  
212 - "flag": "base",  
213 - "kpiValue": "47.25",  
214 - "collTime": "2021-12-04 10:50:00",  
215 - "dataType": "last",  
216 - "createTimeToMonth": "2021-12"  
217 - },  
218 - {  
219 - "id": "bd21a27f24cd459792c562a1a9067d98",  
220 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
221 - "faultNo": "GZ202112130014",  
222 - "targetId": "11cdc282437a91174d808e114954463d",  
223 - "targetType": "NPM",  
224 - "itemId": "953ff1ab4a718866a2b91ae5da50627e",  
225 - "timestap": "2021-12-13T12:30:15.355+0800",  
226 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
227 - "bizName": "电子税务局",  
228 - "resId": "5e9594b66b8e8d293845bd70",  
229 - "resName": "MQ-EDAS",  
230 - "resType": "NPM_STREAM",  
231 - "kpiId": "success_rate",  
232 - "kpiName": "成功率",  
233 - "flag": "base",  
234 - "kpiValue": "100",  
235 - "collTime": "2021-12-04 10:50:00",  
236 - "dataType": "last",  
237 - "createTimeToMonth": "2021-12"  
238 - }  
239 - ],  
240 - "5e991f126b8ee03541976383": [  
241 - {  
242 - "id": "f2a46c0548d74659bcf84b149029b4ea",  
243 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
244 - "faultNo": "GZ202112130014",  
245 - "targetId": "11cdc282437a91174d808e114954463d",  
246 - "targetType": "NPM",  
247 - "itemId": "d6fab6451da3d14dada155670c15ae5e",  
248 - "timestap": "2021-12-13T12:31:28.472+0800",  
249 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
250 - "bizName": "电子税务局",  
251 - "resId": "5e991f126b8ee03541976383",  
252 - "resName": "各地市-涉税文书Weblogic",  
253 - "resType": "NPM_STREAM",  
254 - "kpiId": "count",  
255 - "kpiName": "业务量",  
256 - "flag": "base",  
257 - "kpiValue": "26299",  
258 - "collTime": "2021-12-04 10:50:00",  
259 - "dataType": "last",  
260 - "createTimeToMonth": "2021-12"  
261 - },  
262 - {  
263 - "id": "0b2d9d77ea6c4c0e8bc280802c48721c",  
264 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
265 - "faultNo": "GZ202112130014",  
266 - "targetId": "11cdc282437a91174d808e114954463d",  
267 - "targetType": "NPM",  
268 - "itemId": "d6fab6451da3d14dada155670c15ae5e",  
269 - "timestap": "2021-12-13T12:31:28.472+0800",  
270 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
271 - "bizName": "电子税务局",  
272 - "resId": "5e991f126b8ee03541976383",  
273 - "resName": "各地市-涉税文书Weblogic",  
274 - "resType": "NPM_STREAM",  
275 - "kpiId": "response_rate",  
276 - "kpiName": "响应率",  
277 - "flag": "base",  
278 - "kpiValue": "47.25",  
279 - "collTime": "2021-12-04 10:50:00",  
280 - "dataType": "last",  
281 - "createTimeToMonth": "2021-12"  
282 - },  
283 - {  
284 - "id": "0ca1b9a73c5b4a34a49361a121eea219",  
285 - "faultId": "e011b982f0d2405a9d4d43df57199d05",  
286 - "faultNo": "GZ202112130014",  
287 - "targetId": "11cdc282437a91174d808e114954463d",  
288 - "targetType": "NPM",  
289 - "itemId": "d6fab6451da3d14dada155670c15ae5e",  
290 - "timestap": "2021-12-13T12:31:28.472+0800",  
291 - "bizId": "53bebbd79f384f619513b50666ea1d48",  
292 - "bizName": "电子税务局",  
293 - "resId": "5e991f126b8ee03541976383",  
294 - "resName": "各地市-涉税文书Weblogic",  
295 - "resType": "NPM_STREAM",  
296 - "kpiId": "success_rate",  
297 - "kpiName": "成功率",  
298 - "flag": "base",  
299 - "kpiValue": "100",  
300 - "collTime": "2021-12-04 10:50:00",  
301 - "dataType": "last",  
302 - "createTimeToMonth": "2021-12"  
303 - }  
304 - ]  
305 - }; 49 + let data = {};
306 50
307 let dataList = []; 51 let dataList = [];
308 let col = [{ 52 let col = [{
@@ -124,7 +124,17 @@ export default { @@ -124,7 +124,17 @@ export default {
124 } 124 }
125 //添加所有数据 125 //添加所有数据
126 let saveAll=()=>{ 126 let saveAll=()=>{
  127 + let params={
  128 + busId:proxy.bizId
  129 + }
  130 + proxy.$http.post('/api-web/fault/conf/apm/saveOrUpdate',[params],function (res){
  131 + if(res && res.object){
  132 + proxy.$global.showMsg('添加成功','success');
  133 + proxy.targetId=res.src;
  134 + proxy.APMVisible=false;
  135 + }
127 136
  137 + })
128 } 138 }
129 //切换资源获取指标列表 139 //切换资源获取指标列表
130 let changeRes=(val)=>{ 140 let changeRes=(val)=>{
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 <div class="flex-div-start"> 30 <div class="flex-div-start">
31 <el-button type="primary" @click="onReset()">重置</el-button> 31 <el-button type="primary" @click="onReset()">重置</el-button>
32 <el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button> 32 <el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button>
33 - <el-button type="primary" @click="saveAll()" style="margin-left: 10px">全部添加</el-button> 33 + <el-button type="primary" :disabled="isLoading" @click="saveAll()" style="margin-left: 10px">全部添加</el-button>
34 </div> 34 </div>
35 </div> 35 </div>
36 </el-col> 36 </el-col>
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 <el-row class="margin-bottom-50"> 38 <el-row class="margin-bottom-50">
39 <el-col :span="24" class="table-height"> 39 <el-col :span="24" class="table-height">
40 <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList" 40 <cm-table-page :columns="columns" :dataList="tableDataList" @loaddata="loadTableDataList"
41 - :showIndex="true" :total="count" 41 + :showIndex="true" :total="count"
42 :showBorder="true" :loading="false" 42 :showBorder="true" :loading="false"
43 :showPage="true" :showTools="true" :height="(height - 500)"> 43 :showPage="true" :showTools="true" :height="(height - 500)">
44 <template #default="{row,prop,column}"> 44 <template #default="{row,prop,column}">
@@ -52,6 +52,7 @@ export default { @@ -52,6 +52,7 @@ export default {
52 let kpiList = Vue.ref([]); 52 let kpiList = Vue.ref([]);
53 let busTypeList = Vue.ref([]); 53 let busTypeList = Vue.ref([]);
54 let networkMonitorList=Vue.ref([]); 54 let networkMonitorList=Vue.ref([]);
  55 + let isLoading=Vue.ref(false);//按钮加载中
55 let init = () =>{ 56 let init = () =>{
56 proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) { 57 proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
57 if (res && res.data) { 58 if (res && res.data) {
@@ -106,10 +107,27 @@ export default { @@ -106,10 +107,27 @@ export default {
106 107
107 108
108 } 109 }
  110 + //全部添加
109 let saveAll=()=>{ 111 let saveAll=()=>{
  112 + proxy.isLoading=true;
  113 + let params={
  114 + targetId:proxy.targetId,
  115 + npmList:[npmList]
  116 + }
  117 +
  118 + proxy.$http.post('/api-web/fault/conf/npm/batchAddNpm',params,function (res){
  119 + if(res){
  120 + proxy.$global.showMsg('添加成功','success');
  121 + proxy.targetId=res.str
  122 + proxy.applicationMonitorVisible=false;
  123 + }
  124 +
  125 + })
  126 +
110 127
111 } 128 }
112 return { 129 return {
  130 + isLoading,
113 saveAll, 131 saveAll,
114 networkMonitorList, 132 networkMonitorList,
115 setBizId, 133 setBizId,
@@ -167,7 +185,7 @@ export default { @@ -167,7 +185,7 @@ export default {
167 bizId: this.bizId, 185 bizId: this.bizId,
168 configId: this.config, 186 configId: this.config,
169 page: 1, 187 page: 1,
170 - limit: 5 188 + pageSize: 5
171 } 189 }
172 }, 190 },
173 //关闭弹框 191 //关闭弹框
@@ -38,13 +38,13 @@ @@ -38,13 +38,13 @@
38 :showIndex="true" :total="count" 38 :showIndex="true" :total="count"
39 :showBorder="true" :loading="false" 39 :showBorder="true" :loading="false"
40 :showPage="true" :showTools="true" :height="(height - 500)"> 40 :showPage="true" :showTools="true" :height="(height - 500)">
41 - <template #default="{row,prop,column}"> 41 + <!-- <template #default="{row,prop,column}">
42 <div v-if="prop == 'kpiName'" class="list-data"> 42 <div v-if="prop == 'kpiName'" class="list-data">
43 <span class="list-data-text">{{row.kpiName }}</span> 43 <span class="list-data-text">{{row.kpiName }}</span>
44 -<!-- <img :id="row.index" @click="deleteItem(row)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="img-delete cursorClass">--> 44 + <img :id="row.index" @click="deleteItem(row)" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" class="img-delete cursorClass">
45 45
46 </div> 46 </div>
47 - </template> 47 + </template>-->
48 <template #tools="{scope}"> 48 <template #tools="{scope}">
49 <el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)"> 49 <el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)">
50 删除 50 删除
@@ -19,7 +19,7 @@ export default { @@ -19,7 +19,7 @@ export default {
19 align: 'center', 19 align: 'center',
20 }, 20 },
21 { 21 {
22 - prop: 'ip', 22 + prop: 'ipAddr',
23 label: 'ip地址', 23 label: 'ip地址',
24 sortable: true, 24 sortable: true,
25 align: 'center', 25 align: 'center',
@@ -204,18 +204,20 @@ export default { @@ -204,18 +204,20 @@ export default {
204 //删除表格指标 204 //删除表格指标
205 deleteItem(item){ 205 deleteItem(item){
206 let that=this; 206 let that=this;
207 - let params={  
208 - id:item.id 207 + this.$global.confirm("确认删除指标吗?", function () {
  208 + let params = {
  209 + id: item.id
209 } 210 }
210 - this.$http.get('/api-web/fault/conf/base/deleteById',params,function (res){  
211 - if(res){ 211 + that.$http.get('/api-web/fault/conf/base/deleteById', params, function (res) {
  212 + if (res) {
212 that.$global.showMsg('删除成功'); 213 that.$global.showMsg('删除成功');
213 that.getEnvironmentData(); 214 that.getEnvironmentData();
214 215
215 } 216 }
216 - that.$emit('callbackDelete',item) 217 + that.$emit('callbackDelete', item)
217 218
218 }) 219 })
  220 + })
219 221
220 }, 222 },
221 //获取基础环境资源列表数据 223 //获取基础环境资源列表数据
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <el-col :span="6"> 16 <el-col :span="6">
17 <div class="grid-content bg-purple"> 17 <div class="grid-content bg-purple">
18 <span class="fault-book-input-text">名称</span> 18 <span class="fault-book-input-text">名称</span>
19 - <el-input v-model="name" placeholder="请输入名称" class="fault-book-input"/> 19 + <el-input v-model="name" placeholder="请输入名称" maxlength="50" class="fault-book-input"/>
20 </div> 20 </div>
21 </el-col> 21 </el-col>
22 </el-row> 22 </el-row>
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==1}]" @click="clickDaultDefinitionFunc(1)" shadow="hover"><span class="card-name">故障定义</span></el-card> 30 <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==1}]" @click="clickDaultDefinitionFunc(1)" shadow="hover"><span class="card-name">故障定义</span></el-card>
31 </el-col> 31 </el-col>
32 <el-col :span="3"> 32 <el-col :span="3">
33 - <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==2}]" @click="clickNetworkMonitorFunc(2)" shadow="hover"><span class="card-name">网络</span></el-card> 33 + <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==2}]" @click="clickNetworkMonitorFunc(2)" shadow="hover"><span class="card-name">网络</span></el-card>
34 </el-col> 34 </el-col>
35 <el-col :span="3"> 35 <el-col :span="3">
36 <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==3}]" @click="applicationMonitorFunc(3)" shadow="hover"><span class="card-name">应用检测</span></el-card> 36 <el-card :class="['fault-book-title-card-text',{'isActive':isActiveIndex==3}]" @click="applicationMonitorFunc(3)" shadow="hover"><span class="card-name">应用检测</span></el-card>
@@ -130,6 +130,7 @@ export default { @@ -130,6 +130,7 @@ export default {
130 logMonitionVisible:false,//日志监测弹框 130 logMonitionVisible:false,//日志监测弹框
131 subscriptionReportVisible:false,//订阅人员弹框 131 subscriptionReportVisible:false,//订阅人员弹框
132 bizName:'',//业务名称 132 bizName:'',//业务名称
  133 + ruleData:[],//故障规则定义数据
133 } 134 }
134 }, 135 },
135 setup(props){ 136 setup(props){
@@ -199,7 +200,16 @@ export default { @@ -199,7 +200,16 @@ export default {
199 {type:'log',targetId:''}, 200 {type:'log',targetId:''},
200 {type:'report',targetId:''}, 201 {type:'report',targetId:''},
201 ] 202 ]
  203 + //规则名字
  204 + let ruleName=Vue.ref('产生告警时触发');
  205 + //故障规则id
  206 + let ruleId=Vue.ref();
  207 + //模块id
  208 + let modleId=Vue.ref();
202 return{ 209 return{
  210 + modleId,
  211 + ruleId,
  212 + ruleName,
203 isLoading, 213 isLoading,
204 modelData, 214 modelData,
205 faultDefinitionRadio, 215 faultDefinitionRadio,
@@ -256,6 +266,11 @@ export default { @@ -256,6 +266,11 @@ export default {
256 if(!this.isSaveModel()){ 266 if(!this.isSaveModel()){
257 return; 267 return;
258 } 268 }
  269 + this.configData.map(item=>{
  270 + if(item.type=='netlink'){
  271 + this.modleId=item.id;
  272 + }
  273 + })
259 this.hiddenAll(); 274 this.hiddenAll();
260 this.networkMonitorHide = true; 275 this.networkMonitorHide = true;
261 this.isActiveIndex=index; 276 this.isActiveIndex=index;
@@ -271,6 +286,11 @@ export default { @@ -271,6 +286,11 @@ export default {
271 if(!this.isSaveModel()){ 286 if(!this.isSaveModel()){
272 return; 287 return;
273 } 288 }
  289 + this.configData.map(item=>{
  290 + if(item.type=='npm'){
  291 + this.modleId=item.id;
  292 + }
  293 + })
274 this.hiddenAll(); 294 this.hiddenAll();
275 this.applicationMonitorHide = true; 295 this.applicationMonitorHide = true;
276 this.isActiveIndex=index; 296 this.isActiveIndex=index;
@@ -285,6 +305,11 @@ export default { @@ -285,6 +305,11 @@ export default {
285 if(!this.isSaveModel()){ 305 if(!this.isSaveModel()){
286 return; 306 return;
287 } 307 }
  308 + this.configData.map(item=>{
  309 + if(item.type=='base'){
  310 + this.modleId=item.id;
  311 + }
  312 + })
288 this.postPropsData('base',index); 313 this.postPropsData('base',index);
289 /*if(this.busTypeArr){ 314 /*if(this.busTypeArr){
290 this.hiddenAll(); 315 this.hiddenAll();
@@ -302,6 +327,11 @@ export default { @@ -302,6 +327,11 @@ export default {
302 if(!this.isSaveModel()){ 327 if(!this.isSaveModel()){
303 return; 328 return;
304 } 329 }
  330 + this.configData.map(item=>{
  331 + if(item.type=='apm'){
  332 + this.modleId=item.id;
  333 + }
  334 + })
305 this.hiddenAll(); 335 this.hiddenAll();
306 this.apmMonitorHide = true; 336 this.apmMonitorHide = true;
307 this.isActiveIndex=index; 337 this.isActiveIndex=index;
@@ -315,6 +345,11 @@ export default { @@ -315,6 +345,11 @@ export default {
315 if(!this.isSaveModel()){ 345 if(!this.isSaveModel()){
316 return; 346 return;
317 } 347 }
  348 + this.configData.map(item=>{
  349 + if(item.type=='log'){
  350 + this.modleId=item.id;
  351 + }
  352 + })
318 this.$global.showMsg('敬请期待...','warning'); 353 this.$global.showMsg('敬请期待...','warning');
319 return; 354 return;
320 this.hiddenAll(); 355 this.hiddenAll();
@@ -330,6 +365,11 @@ export default { @@ -330,6 +365,11 @@ export default {
330 if(!this.isSaveModel()){ 365 if(!this.isSaveModel()){
331 return; 366 return;
332 } 367 }
  368 + this.configData.map(item=>{
  369 + if(item.type=='report'){
  370 + this.modleId=item.id;
  371 + }
  372 + })
333 this.$global.showMsg('敬请期待...','warning'); 373 this.$global.showMsg('敬请期待...','warning');
334 return; 374 return;
335 this.hiddenAll(); 375 this.hiddenAll();
@@ -632,6 +672,26 @@ export default { @@ -632,6 +672,26 @@ export default {
632 } 672 }
633 673
634 }, 674 },
  675 + //获取故障规则定义的详情
  676 + getRuleDetail(){
  677 +
  678 + let that=this;
  679 + let params={}
  680 + this.$http.get('/api-web/fault/conf/rule/'+this.docId,params,function (res){
  681 + if(res && res.data){
  682 + that.ruleData=res.data;
  683 + if(that.ruleData.length>0){
  684 + that.kpiId=that.ruleData[0].kpiId;
  685 + that.triggerValue=that.ruleData[0].triggerValue;
  686 + that.ruleId=that.ruleData[0].id;
  687 + }
  688 +
  689 +
  690 +
  691 + }
  692 +
  693 + })
  694 + },
635 //保存模块类型 695 //保存模块类型
636 saveConfigDetail(){ 696 saveConfigDetail(){
637 if(!this.busTypeArr){ 697 if(!this.busTypeArr){
@@ -698,6 +758,7 @@ export default { @@ -698,6 +758,7 @@ export default {
698 type:this.type, 758 type:this.type,
699 targetId:this.targetId, 759 targetId:this.targetId,
700 state:this.state, 760 state:this.state,
  761 + id:this.modleId,
701 faultConfig:{ 762 faultConfig:{
702 id:this.faultConfId, 763 id:this.faultConfId,
703 name:this.name, 764 name:this.name,
@@ -804,6 +865,8 @@ export default { @@ -804,6 +865,8 @@ export default {
804 type:'alarm', 865 type:'alarm',
805 triggerValue: this.triggerValue, 866 triggerValue: this.triggerValue,
806 kpiId: this.kpiId, 867 kpiId: this.kpiId,
  868 + name:this.ruleName,
  869 + id:this.ruleId,
807 870
808 faultConfig: { 871 faultConfig: {
809 id: this.faultConfId, 872 id: this.faultConfId,
@@ -834,14 +897,14 @@ export default { @@ -834,14 +897,14 @@ export default {
834 let that=this; 897 let that=this;
835 this.getTargetId('base') 898 this.getTargetId('base')
836 let params={ 899 let params={
837 - targetId:this.targetId,  
838 - bizId:this.busTypeArr 900 + // targetId:this.targetId,
  901 + busId:this.busTypeArr
839 } 902 }
840 this.$http.post('/api-web/fault/conf/base/saveOrUpdate',params,function (res){ 903 this.$http.post('/api-web/fault/conf/base/saveOrUpdate',params,function (res){
841 if(res && res.success){ 904 if(res && res.success){
842 - that.targetId=res.object.targetId; 905 + that.targetId=res.str;
843 that.setTargetId(that.targetId) 906 that.setTargetId(that.targetId)
844 - // that.$global.showMsg('保存成功') 907 + that.$global.showMsg('保存成功')
845 // that.alarmList=res.data; 908 // that.alarmList=res.data;
846 that.saveConfigDetailOther(); 909 that.saveConfigDetailOther();
847 }else{ 910 }else{
@@ -859,7 +922,7 @@ export default { @@ -859,7 +922,7 @@ export default {
859 let params={ 922 let params={
860 id:item.id, 923 id:item.id,
861 } 924 }
862 - this.$http.get('/api-web/fault/conf/netLink/deleteNetLinkAndNodeById',params,function (res){ 925 + that.$http.get('/api-web/fault/conf/netLink/deleteNetLinkAndNodeById',params,function (res){
863 if(res){ 926 if(res){
864 that.$global.showMsg("删除成功!"); 927 that.$global.showMsg("删除成功!");
865 that.getNetLinkList(); 928 that.getNetLinkList();
@@ -961,6 +1024,7 @@ export default { @@ -961,6 +1024,7 @@ export default {
961 this.init() 1024 this.init()
962 this.getQueryKpiInfo(); 1025 this.getQueryKpiInfo();
963 this.getDetailByid(); 1026 this.getDetailByid();
  1027 + this.getRuleDetail();
964 }, 1028 },
965 unmounted () {} 1029 unmounted () {}
966 1030
@@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
2 <el-row> 2 <el-row>
3 <el-col :span="6"> 3 <el-col :span="6">
4 <div class="search-input margin-30 flex-div-start"> 4 <div class="search-input margin-30 flex-div-start">
5 - <el-input v-model="input" placeholder="故障诊断" class="fault-book-input-text" />  
6 - <span class="search-text" style="border-radius: 4px">搜索</span> 5 + <el-input v-model="name" placeholder="故障诊断" class="fault-book-input-text" />
  6 + <span class="search-text" style="border-radius: 4px" @click="searchList">搜索</span>
7 </div> 7 </div>
8 8
9 </el-col> 9 </el-col>
@@ -5,6 +5,7 @@ export default { @@ -5,6 +5,7 @@ export default {
5 props:['diagnosisData'], 5 props:['diagnosisData'],
6 data () { 6 data () {
7 return { 7 return {
  8 + name:'',
8 9
9 } 10 }
10 }, 11 },
@@ -25,6 +26,11 @@ export default { @@ -25,6 +26,11 @@ export default {
25 componentName:'Diagnosis' 26 componentName:'Diagnosis'
26 } 27 }
27 this.$emit('getItemDetail',params) 28 this.$emit('getItemDetail',params)
  29 + },
  30 + //搜索列表
  31 + searchList(){
  32 + this.$emit('searchList',this.name)
  33 +
28 } 34 }
29 }, 35 },
30 mounted () { 36 mounted () {
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 </div> 9 </div>
10 <div @click="clickList(item,index)" :class="['list-net',{'isActive':index==isClickNet}]" v-for="(item, index) in networkMonitorList" :key="index"> 10 <div @click="clickList(item,index)" :class="['list-net',{'isActive':index==isClickNet}]" v-for="(item, index) in networkMonitorList" :key="index">
11 <div class="flex-div-center "> 11 <div class="flex-div-center ">
12 - <div class="multiple-choice-button">{{item.linkName}}</div> 12 + <div class="multiple-choice-button text-overflow" :title="item.linkName">{{item.linkName}}</div>
13 <img v-show="index==isClickNet" @click="deleteNetLink(item,index)" class="img-delete" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" alt=""> 13 <img v-show="index==isClickNet" @click="deleteNetLink(item,index)" class="img-delete" src="./src/assets/images/faultDiagnosis/icon-item-delete.png" alt="">
14 </div> 14 </div>
15 </div> 15 </div>
@@ -81,11 +81,15 @@ @@ -81,11 +81,15 @@
81 <span @click="addTableList(false)" v-if="index+1<nodeData.length" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span> 81 <span @click="addTableList(false)" v-if="index+1<nodeData.length" :class="['list-line','cursorClass',{'isActive':itemNode.length>1}]"></span>
82 </el-tooltip> 82 </el-tooltip>
83 </div> 83 </div>
84 - <div v-show="itemNode[0].nodeName" class="list-step-name">  
85 - {{itemNode[0].nodeName}} 84 + <div v-show="itemNode[0].nodeName" class="list-step-name flex-div-start">
  85 + <span class="text-overflow width-100" :title="itemNode[0].nodeName">
  86 + {{itemNode[0].nodeName}}
  87 + </span>
  88 + <span class="list-line-none"></span>
86 </div> 89 </div>
87 - <div v-show="!itemNode[0].nodeName" class="list-step-name">  
88 - 点击添加 90 + <div v-show="!itemNode[0].nodeName" class="list-step-name flex-div-start">
  91 + <span class="width-100">点击添加</span>
  92 + <span class="list-line-none"></span>
89 </div> 93 </div>
90 </div> 94 </div>
91 </el-col> 95 </el-col>
@@ -330,7 +330,7 @@ export default { @@ -330,7 +330,7 @@ export default {
330 let params={ 330 let params={
331 id:item.id, 331 id:item.id,
332 } 332 }
333 - this.$http.get('/api-web/fault/conf/netLink/deleteNetLinkAndNodeById',params,function (res){ 333 + that.$http.get('/api-web/fault/conf/netLink/deleteNetLinkAndNodeById',params,function (res){
334 if(res){ 334 if(res){
335 that.$global.showMsg("删除成功!"); 335 that.$global.showMsg("删除成功!");
336 that.getNetLinkList(); 336 that.getNetLinkList();
@@ -385,9 +385,13 @@ export default { @@ -385,9 +385,13 @@ export default {
385 console.log("有节点",arr,arr.length) 385 console.log("有节点",arr,arr.length)
386 that.nodeData=arr; 386 that.nodeData=arr;
387 console.log('nodedata',that.nodeData,that.nodeData.length) 387 console.log('nodedata',that.nodeData,that.nodeData.length)
  388 + let length=that.nodeData.length;
388 if(that.nodeData.length>0){ 389 if(that.nodeData.length>0){
389 that.addSetLIstVisible=false; 390 that.addSetLIstVisible=false;
390 - that.nodeData.push([{nodeName:'',id:'',isAdd:true}]) 391 + // if(that.nodeData[length-1].length>1){
  392 + that.nodeData.push([{nodeName:'',id:'',isAdd:true}])
  393 +
  394 + // }
391 395
392 }else{ 396 }else{
393 that.addSetLIstVisible=true; 397 that.addSetLIstVisible=true;
1 -<component :is="componentItem" :diagnosisData="diagnosisData" @backIndex="backIndexFun" @getItem="getItem" @getItemDetail="getItemDetail" :detailData="detailData" /> 1 +<component :is="componentItem" :diagnosisData="diagnosisData" @searchList="searchList" @backIndex="backIndexFun" @getItem="getItem" @getItemDetail="getItemDetail" :detailData="detailData" />
2 <!--<FaultAddIndex></FaultAddIndex>--> 2 <!--<FaultAddIndex></FaultAddIndex>-->
@@ -34,6 +34,8 @@ export default { @@ -34,6 +34,8 @@ export default {
34 let diagnosisData=Vue.ref(); 34 let diagnosisData=Vue.ref();
35 //选择的文档列表详情数据 35 //选择的文档列表详情数据
36 let detailData=Vue.ref(); 36 let detailData=Vue.ref();
  37 + //搜索关键字
  38 + let name=Vue.ref();
37 39
38 40
39 // 挂载完 41 // 挂载完
@@ -46,7 +48,8 @@ export default { @@ -46,7 +48,8 @@ export default {
46 const getListData=()=>{ 48 const getListData=()=>{
47 let params={ 49 let params={
48 page:1, 50 page:1,
49 - pageSize:10 51 + pageSize:10,
  52 + name:proxy.name
50 53
51 } 54 }
52 proxy.$http.get('/api-web/fault/conf/page',params,function (res){ 55 proxy.$http.get('/api-web/fault/conf/page',params,function (res){
@@ -62,6 +65,11 @@ export default { @@ -62,6 +65,11 @@ export default {
62 65
63 }) 66 })
64 } 67 }
  68 + //搜索列表
  69 + let searchList=(val)=>{
  70 + proxy.name=val;
  71 + proxy.getListData();
  72 + }
65 //新增故障 73 //新增故障
66 const getItem=(content)=>{ 74 const getItem=(content)=>{
67 console.log("111",content) 75 console.log("111",content)
@@ -82,6 +90,8 @@ export default { @@ -82,6 +90,8 @@ export default {
82 90
83 91
84 return { 92 return {
  93 + name,
  94 + searchList,
85 allComponent, 95 allComponent,
86 componentItem, 96 componentItem,
87 count, 97 count,
@@ -57,7 +57,8 @@ @@ -57,7 +57,8 @@
57 placement="top" :color="item.color" :hollow="true"> 57 placement="top" :color="item.color" :hollow="true">
58 <el-card> 58 <el-card>
59 <component v-bind:is="item.components" :faultType="item.faultType" 59 <component v-bind:is="item.components" :faultType="item.faultType"
60 - :faultNo="faultDetailDetailInfo.faultNo"/> 60 + :faultNo="faultDetailDetailInfo.faultNo"
  61 + :showDetail="item.detail"/>
61 </el-card> 62 </el-card>
62 </el-timeline-item> 63 </el-timeline-item>
63 </el-timeline> 64 </el-timeline>
@@ -105,7 +106,7 @@ @@ -105,7 +106,7 @@
105 </el-col> 106 </el-col>
106 <el-col :span="12"> 107 <el-col :span="12">
107 <el-form-item label="影响范围" prop="influencescope"> 108 <el-form-item label="影响范围" prop="influencescope">
108 - <el-input v-model="handleInfoForm.influencescope" :disabled="true"></el-input> 109 + <el-input v-model="handleInfoForm.influencescope"></el-input>
109 </el-form-item> 110 </el-form-item>
110 </el-col> 111 </el-col>
111 </el-row> 112 </el-row>
@@ -152,7 +153,7 @@ @@ -152,7 +153,7 @@
152 153
153 <el-form-item> 154 <el-form-item>
154 <el-button @click="showHandleInfoDialog(false)">取消</el-button> 155 <el-button @click="showHandleInfoDialog(false)">取消</el-button>
155 - <el-button type="primary" @click="saveHandleInfo('handleForm')">保存</el-button> 156 + <el-button type="primary" @click="saveHandleInfo('handleForm',getPage)">保存</el-button>
156 </el-form-item> 157 </el-form-item>
157 </el-form> 158 </el-form>
158 </template> 159 </template>
@@ -11,26 +11,36 @@ const faultDetail = () => { @@ -11,26 +11,36 @@ const faultDetail = () => {
11 let faultDetailDetailInfo = Vue.ref({ 11 let faultDetailDetailInfo = Vue.ref({
12 faultNo: '', 12 faultNo: '',
13 items: [{ 13 items: [{
14 - faultType: 'BASE',  
15 - faultTypeName: '基础', 14 + faultType: 'DIALTEST',
  15 + faultTypeName: '拨测',
16 components: 'result-item', 16 components: 'result-item',
17 - color: '#67C23A'  
18 - }, {  
19 - faultType: 'NETLINK',  
20 - faultTypeName: '网络链路',  
21 - components: 'netLinks',  
22 - color: '#409EFF'  
23 - }, { 17 + color: '#67C23A',
  18 + detail:false
  19 + },{
24 faultType: 'NPM', 20 faultType: 'NPM',
25 faultTypeName: 'NPM', 21 faultTypeName: 'NPM',
26 components: 'result-item', 22 components: 'result-item',
27 - color: '#E6A23C'  
28 - }, { 23 + color: '#E6A23C',
  24 + detail:false
  25 + },{
  26 + faultType: 'BASE',
  27 + faultTypeName: '基础',
  28 + components: 'result-item',
  29 + color: '#67C23A',
  30 + detail:true
  31 + }, {
29 faultType: 'APM', 32 faultType: 'APM',
30 faultTypeName: 'APM', 33 faultTypeName: 'APM',
31 components: 'result-item', 34 components: 'result-item',
32 - color: '#F56C6C'  
33 - }] 35 + color: '#F56C6C',
  36 + detail:true
  37 + }/*, {
  38 + faultType: 'NETLINK',
  39 + faultTypeName: '网络链路',
  40 + components: 'netLinks',
  41 + color: '#409EFF',
  42 + detail:true
  43 + }*/]
34 }); 44 });
35 45
36 /** 46 /**
@@ -144,12 +154,19 @@ const handleInfo = () => { @@ -144,12 +154,19 @@ const handleInfo = () => {
144 * 作者: Wang 154 * 作者: Wang
145 * 时间:2021/12/14 23:05 155 * 时间:2021/12/14 23:05
146 */ 156 */
147 - let saveHandleInfo = (key) => { 157 + let saveHandleInfo = (key,callback) => {
148 proxy.$refs[key].validate((valid) => { 158 proxy.$refs[key].validate((valid) => {
149 if (valid) { 159 if (valid) {
150 - alert('submit!') 160 + proxy.$http.post('/api-web/fault/solve',handleInfoForm.value,function (res){
  161 + if(res && res.success){
  162 + proxy.$global.showMsg("处理成功!");
  163 + showHandleInfoDialog(false);
  164 + } else {
  165 + proxy.$global.showMsg("处理失败,请联系管理员!");
  166 + }
  167 + callback();
  168 + });
151 } else { 169 } else {
152 - console.log('error submit!!')  
153 return false 170 return false
154 } 171 }
155 }) 172 })