Authored by 王涛
Showing 23 changed files with 337 additions and 70 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 });
@@ -472,6 +472,27 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form', @@ -472,6 +472,27 @@ layui.define(['common', 'tree', 'laypage', 'laytpl', 'upload', 'admin', 'form',
472 } 472 }
473 }) 473 })
474 474
  475 + //端口侦测
  476 + $("#resManagePostSense").unbind().on("click", function () {
  477 + //获取资源ids
  478 + var data = table.checkStatus('resManageTable').data;
  479 + var resIds = [];
  480 + $.each(data, function (i, e) {
  481 + resIds.push(e.resId)
  482 + })
  483 + if (data.length <= 0) {//不传参
  484 + layer.open({
  485 + type: 1
  486 + , title: '端口侦测'
  487 + , closeBtn: 1
  488 + , area: ['90%', '80%']
  489 + , id: 'lay_port_sense' //设定一个id,防止重复弹出
  490 + , content: '<iframe src="/vue3/index.html#/vue3/portSense" frameborder="0" class="layadmin-iframe"/>' //支持传入html
  491 + });
  492 + }else{//传参
  493 +
  494 + }
  495 + })
475 function openResManageCollHtml(callback){ 496 function openResManageCollHtml(callback){
476 if(data.length<=0){ 497 if(data.length<=0){
477 layer.msg("请选择资源", { offset: '15px' , icon: 7 , time: 1500 }); 498 layer.msg("请选择资源", { offset: '15px' , icon: 7 , time: 1500 });
@@ -469,7 +469,7 @@ layui.extend({ @@ -469,7 +469,7 @@ layui.extend({
469 new msgTips({ 469 new msgTips({
470 dom: ".right-bottom-tips", 470 dom: ".right-bottom-tips",
471 title: title, 471 title: title,
472 - message: `<p style="line-height: 18px;background: url(${imgUrl}) no-repeat;background-size: 100%;height: 160px;background-position-x: right;padding: 145px 22px 0; "><span style=" overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;" lay-tips="${content}">${content}</span><span class="title closeFault" style="position: absolute;top: 66px;left: 214px;">X</span><span style="position: absolute;left: 87px;top: 124px; font-weight: bold;float: right;">${title}</span></p>`, 472 + message: `<p style="line-height: 18px;background: url(${imgUrl}) no-repeat;background-size: 100%;height: 160px;background-position-x: right;padding: 145px 22px 0; "><span style=" overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;" title="${content}">${content}</span><span class="title closeFault" style="position: absolute;top: 66px;left: 214px;">X</span><span style="position: absolute;left: 87px;top: 124px; font-weight: bold;float: right;">${title}</span></p>`,
473 duration: 10000, 473 duration: 10000,
474 space: 10, 474 space: 10,
475 firstSpace: 8, 475 firstSpace: 8,
@@ -487,7 +487,7 @@ layui.extend({ @@ -487,7 +487,7 @@ layui.extend({
487 //} 487 //}
488 } 488 }
489 }) 489 })
490 - debugger 490 +
491 }, delay); 491 }, delay);
492 }else{ 492 }else{
493 setTimeout(function () { 493 setTimeout(function () {
@@ -89,6 +89,7 @@ @@ -89,6 +89,7 @@
89 <button id="res_relation_config" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe630;</i>关系配置</button> 89 <button id="res_relation_config" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe630;</i>关系配置</button>
90 <div class="right-btns" style="float: right"> 90 <div class="right-btns" style="float: right">
91 <button id="btn-resManageImport" type="button" class="hide"></button> 91 <button id="btn-resManageImport" type="button" class="hide"></button>
  92 + <button id="resManagePostSense" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe631;</i>端口侦测</button>
92 <button id="resManageImport" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe681;</i>导入</button> 93 <button id="resManageImport" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe681;</i>导入</button>
93 <button id="resManageExportExcel" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon layui-icon-export"></i>导出资源</button> 94 <button id="resManageExportExcel" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon layui-icon-export"></i>导出资源</button>
94 <button id="resManageDownloadTemp" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe601;</i>下载模板</button> 95 <button id="resManageDownloadTemp" type="button" class="layui-btn layui-btn-sm layui-btn-normal"><i class="layui-icon">&#xe601;</i>下载模板</button>
@@ -121,7 +121,6 @@ export default { @@ -121,7 +121,6 @@ export default {
121 proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) { 121 proxy.$http.get("/api-web/home/business/findAllBusType", {}, function(res) {
122 if (res && res.data) { 122 if (res && res.data) {
123 that.list = res.data; 123 that.list = res.data;
124 - console.log("getTree:",that.list);  
125 } 124 }
126 }) 125 })
127 }, 126 },
@@ -121,7 +121,6 @@ export default { @@ -121,7 +121,6 @@ export default {
121 proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) { 121 proxy.$http.get("/api-web/manage/kpi/list", {}, function(res) {
122 if (res && res.data) { 122 if (res && res.data) {
123 that.list = res.data; 123 that.list = res.data;
124 - console.log("getTree:",that.list);  
125 } 124 }
126 }) 125 })
127 }, 126 },
@@ -121,7 +121,6 @@ export default { @@ -121,7 +121,6 @@ export default {
121 proxy.$http.get("/api-web/home/resType/getTree?typeParentFlag=1", {}, function(res) { 121 proxy.$http.get("/api-web/home/resType/getTree?typeParentFlag=1", {}, function(res) {
122 if (res && res.data) { 122 if (res && res.data) {
123 that.list = res.data; 123 that.list = res.data;
124 - console.log("getTree:",that.list);  
125 } 124 }
126 }) 125 })
127 }, 126 },
@@ -95,7 +95,6 @@ export default { @@ -95,7 +95,6 @@ export default {
95 let pageSize = Vue.ref(props.pageSize); 95 let pageSize = Vue.ref(props.pageSize);
96 // let multipleSelection=Vue.ref([]); 96 // let multipleSelection=Vue.ref([]);
97 97
98 -  
99 /** 98 /**
100 * 获取宽度 99 * 获取宽度
101 * <p> 100 * <p>
@@ -187,7 +186,7 @@ export default { @@ -187,7 +186,7 @@ export default {
187 let toggleSelection=(rows)=> { 186 let toggleSelection=(rows)=> {
188 console.log("rows",rows) 187 console.log("rows",rows)
189 proxy.$nextTick(function () { 188 proxy.$nextTick(function () {
190 - console.log("set",props.dataList,props.multipleSelection) 189 + //console.log("set",props.dataList,props.multipleSelection)
191 190
192 if (rows) { 191 if (rows) {
193 rows.forEach(row => { 192 rows.forEach(row => {
@@ -27,6 +27,11 @@ const routes = [{ @@ -27,6 +27,11 @@ const routes = [{
27 path: '/assets/configmanager', 27 path: '/assets/configmanager',
28 name: 'configmanager', 28 name: 'configmanager',
29 component: () => myImport('views/assets/configmanager/index') 29 component: () => myImport('views/assets/configmanager/index')
  30 + },
  31 + {
  32 + path: '/vue3/portSense',
  33 + name: 'portSense',
  34 + component: () => myImport('views/portSense/index')
30 } 35 }
31 ]; 36 ];
32 37
  1 +<div>
  2 + <el-row>
  3 + <el-col :span="24">
  4 + <div class="set-add-div">
  5 + <el-row>
  6 + <el-col :span="24">
  7 + <div class="flex-div-start margin-top-bottom-10">
  8 + <el-input style="width:160px;" class="margin-right-10" v-model="keyWords"
  9 + placeholder="输入关键字"/>
  10 + <div class="flex-div-start">
  11 + <el-button type="primary" @click="onReset()">重置</el-button>
  12 + <el-button type="primary" @click="onBtnSearch()" style="margin-left: 10px">查询</el-button>
  13 + </div>
  14 +<!-- <el-select v-model="busTypeArr" multiple filterable clearable collapse-tags-->
  15 +<!-- placeholder="请选择业务">-->
  16 +<!-- <el-option-->
  17 +<!-- v-for="item in busTypeList"-->
  18 +<!-- :label="item.busTypeName" :value="item.busId"></el-option>-->
  19 +<!-- </el-select>-->
  20 + <el-dropdown style="margin-top: -15px;margin-left: 10px;">
  21 + <el-icon class="el-icon--right">
  22 + <arrow-down/>
  23 + </el-icon>
  24 + <cm-biz-type-tree-input multiple clearable collapseTags @callback="getBizType"/>
  25 + </el-dropdown>
  26 +
  27 + <el-dropdown style="margin-top: -15px;margin-left: 10px;">
  28 + <el-icon class="el-icon--right">
  29 + <arrow-down/>
  30 + </el-icon>
  31 + <cm-res-type-tree-input multiple clearable collapseTags @callback="getResType"/>
  32 + </el-dropdown>
  33 +
  34 + </div>
  35 + </el-col>
  36 + </el-row>
  37 + <el-row class="margin-bottom-50">
  38 + <el-col :span="24" class="table-height">
  39 + <cm-table-page v-if="portSenseData" :columns="columns"
  40 + :dataList="portSenseData"
  41 + :total="count"
  42 + :pageSize="pageSize"
  43 + @loaddata="loadTableDataList"
  44 + @selectionChange="selectionChange"
  45 + :showIndex="true"
  46 + :showSelection="true"
  47 + :showBorder="true"
  48 + :loading="false"
  49 + :showPage="true"
  50 + :showTools="true"
  51 + :height="(height - 500)">
  52 + <template #tools="{scope}">
  53 + <el-button type="text" size="small" @click.prevent="deleteItem(scope.row,scope.$index)">
  54 + 删除
  55 + </el-button>
  56 + </template>
  57 + </cm-table-page>
  58 + </el-col>
  59 + </el-row>
  60 + </div>
  61 + </el-col>
  62 + </el-row>
  63 + <!-- <div class="margin-top btn-faultDiagnosis flex-center position-bottom">-->
  64 + <!-- <el-button @click="cancleList">取消</el-button>-->
  65 + <!-- &lt;!&ndash; <el-button @click="saveList" type="primary">保存</el-button>&ndash;&gt;-->
  66 + <!-- </div>-->
  67 +</div>
  68 +<!--<div id="ssss">-->
  69 +<!-- {{ portSenseData[0] }}-->
  70 +<!-- {{columns}}-->
  71 +<!--</div>-->
  1 +export default {
  2 + name: 'portSense',
  3 + template: '',
  4 + components: {},
  5 + data() {
  6 + },
  7 + setup(props, {attrs, slots, emit}) {
  8 + const {proxy} = Vue.getCurrentInstance();
  9 + const columns = [
  10 + {
  11 + prop: 'resName',
  12 + label: '资源名称',
  13 + sortable: true,
  14 + align: 'center',
  15 + },
  16 + {
  17 + prop: 'ip',
  18 + label: 'ip地址',
  19 + sortable: true,
  20 + align: 'center',
  21 + },
  22 + {
  23 + prop: 'resTypeName',
  24 + label: '资源类型',
  25 + sortable: true,
  26 + align: 'center',
  27 + },
  28 + {
  29 + prop: 'lastCollTime',
  30 + label: '最近采集时间',
  31 + sortable: true,
  32 + align: 'center',
  33 + },
  34 + {
  35 + prop: 'linkState',
  36 + label: '连接状态',
  37 + sortable: true,
  38 + align: 'center',
  39 + }
  40 + ];
  41 + //配置列表总数
  42 + let count = Vue.ref(0);
  43 + //搜索关键字
  44 + let keyWords = Vue.ref('');
  45 + //列表数据
  46 + let portSenseData = Vue.ref([{resName:'123',ip:'1.2.3.4'}]);
  47 + //资源类型数据
  48 + let resTypeArr = Vue.ref([]);
  49 + //业务类型数据
  50 + let busTypeArr = Vue.ref([]);
  51 + //业务类型
  52 + let busTypeList = Vue.ref([]);
  53 + //资源类型数据
  54 + let resIdArr = Vue.ref([]);
  55 + //列表高度
  56 + let height = Vue.ref(window.innerHeight - 150);
  57 + //列表分页
  58 + let pageSize = Vue.ref(50);
  59 + let init = () => {
  60 + proxy.$http.get("/api-web/home/business/findAllBusType", {}, function (res) {
  61 + if (res && res.data) {
  62 + busTypeList.value = res.data;
  63 + }
  64 + })
  65 + }
  66 + // 挂载完
  67 + Vue.onMounted(() => {
  68 + init();
  69 + getListData();
  70 + })
  71 +
  72 + //定义列表参数
  73 + let getParams = Vue.ref({
  74 + keyWords: keyWords.value,
  75 + resTypes: resTypeArr.value.join(','),
  76 + resIds: resIdArr.value.join(','),
  77 + busIds: busTypeArr.value.join(','),
  78 + page: 1,
  79 + limit: pageSize
  80 + })
  81 + //获取列表数据
  82 + const getListData = () => {
  83 + proxy.$http.get("/api-web/bResourceExtendParam/page", getParams.value, function (res) {
  84 + if (res && res.data) {
  85 + // portSenseData.value = res.data;
  86 + // count.value = res.count;
  87 + }
  88 + })
  89 + }
  90 + // 点击按钮搜索
  91 + let onBtnSearch = () => {
  92 + loadTableDataList({page: 1, limit: pageSize});
  93 + }
  94 + // 重置
  95 + let onReset = () => {
  96 + keyWords.value = '';
  97 + resTypeArr.value = '';
  98 + resIdArr.value = '';
  99 + busTypeArr.value = '';
  100 + }
  101 + //获取资源类型
  102 + let getResType = (arr) => {
  103 + let types = arr.map(function (v) {
  104 + return v.id;
  105 + });
  106 + resTypeArr.value = types;
  107 + loadTableDataList({page: 1, limit: pageSize});
  108 + }
  109 + //获取业务系统
  110 + let getBizType = (arr) => {
  111 + let types = arr.map(function (v) {
  112 + return v.busId;
  113 + });
  114 + busTypeArr.value = types;
  115 + loadTableDataList({page: 1, limit: pageSize});
  116 + }
  117 +
  118 + //表格全选事件
  119 + let selectionChange = (val) => {
  120 + proxy.portSenseData.map((v, i) => {
  121 + v.checked = false;
  122 + });
  123 + let selectData = val;
  124 + if (selectData.length > 0) {
  125 + selectData.map((item, index) => {
  126 + proxy.portSenseData.map((v, i) => {
  127 + if (item.id == v.id) {
  128 + v.checked = true;
  129 + }
  130 + })
  131 + })
  132 + } else {
  133 + proxy.portSenseData.map((v, i) => {
  134 + v.checked = false;
  135 + })
  136 + }
  137 + }
  138 +
  139 + //删除单个数据
  140 + let deleteItem = (row, index) => {
  141 + let that = this;
  142 + this.$global.confirm("确认删除吗?", function () {
  143 + deleteItems = (that, [row.resId]);
  144 + })
  145 + }
  146 + //删除多个或单个
  147 + let deleteItems = (that, list) => {
  148 + let params = {
  149 + redIds: list.toString()
  150 + }
  151 + that.$http.get('/api-web/bResourceExtendParam/delete', params, function (res) {
  152 + if (res) {
  153 + that.$global.showMsg('删除成功');
  154 + loadTableDataList({page: 1, limit: pageSize});
  155 + }
  156 + // that.$emit('callbackDelete', item)
  157 + })
  158 + }
  159 +
  160 + //重新加载表格数据
  161 + let loadTableDataList = ({page, limit}) => {
  162 + getParams.page = page;
  163 + getParams.pageSize = limit;
  164 + getListData();
  165 + }
  166 + return {
  167 + count,
  168 + portSenseData,
  169 + columns,
  170 + height,
  171 + pageSize,
  172 +
  173 + keyWords,
  174 + resTypeArr,
  175 + busTypeArr,
  176 + busTypeList,
  177 +
  178 + selectionChange,
  179 + deleteItem,
  180 + onBtnSearch,
  181 + onReset,
  182 +
  183 + getListData,
  184 + loadTableDataList,
  185 +
  186 + getResType,
  187 + getBizType,
  188 + }
  189 + }
  190 +}
@@ -43,7 +43,7 @@ export default { @@ -43,7 +43,7 @@ export default {
43 label: '得分', 43 label: '得分',
44 sortable: true, 44 sortable: true,
45 },{ 45 },{
46 - prop: 'rater', 46 + prop: 'nickname',
47 label: '打分人', 47 label: '打分人',
48 sortable: true, 48 sortable: true,
49 },{ 49 },{
@@ -116,7 +116,23 @@ export default { @@ -116,7 +116,23 @@ 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 + nickname: item.nickname,
  128 + remark: item.remark+'',
  129 + score: item.score+'',
  130 + standardScore: item.standardScore+''
  131 + }
  132 + return element;
  133 + });
  134 + dataList.value =li;
  135 + //End XuHaoJie 2021/12/31 10:56 TODO 解决列表不能展示数字类型的数据 暂时处理
120 } 136 }
121 }); 137 });
122 } 138 }
@@ -127,7 +143,11 @@ export default { @@ -127,7 +143,11 @@ export default {
127 143
128 // 柱状图 144 // 柱状图
129 let score = () => { 145 let score = () => {
130 - proxy.$http.post("/api-web/bOpsScore/scoreRatio", {}, function (res) { 146 + let url = "/api-web/bOpsScore/scoreRatio";
  147 + if (props.projectId == 1) {
  148 + url = "/api-web/bOpsScore/scoreRatio?ops=dzswj"
  149 + }
  150 + proxy.$http.post(url, {}, function (res) {
131 if (res && res.data) { 151 if (res && res.data) {
132 let arr = []; 152 let arr = [];
133 res.data.forEach(item => { 153 res.data.forEach(item => {
@@ -378,7 +378,6 @@ export default { @@ -378,7 +378,6 @@ export default {
378 */ 378 */
379 // 保存用户信息 379 // 保存用户信息
380 let saveUser = () => { 380 let saveUser = () => {
381 - debugger  
382 proxy.$refs.rule.validate((valid) => { 381 proxy.$refs.rule.validate((valid) => {
383 if (valid) { 382 if (valid) {
384 console.log('submit!!'); 383 console.log('submit!!');
@@ -140,6 +140,11 @@ const routes = [{ @@ -140,6 +140,11 @@ const routes = [{
140 name: 'diagnosisDoc', 140 name: 'diagnosisDoc',
141 component: () => myImport('views/faultDiagnosis/components/diagnosisDoc/index') 141 component: () => myImport('views/faultDiagnosis/components/diagnosisDoc/index')
142 }*/ 142 }*/
  143 + ,{
  144 + path: '/vue3/portSense',
  145 + name: 'portSense',
  146 + component: () => myImport('views/portSense/index')
  147 + }
143 ]; 148 ];
144 149
145 // hash模式: createWebHashHistory 150 // hash模式: createWebHashHistory
@@ -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(item=='业务量'||item=='业务告警量'||item=='告警量'){
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){
@@ -192,7 +192,7 @@ export default { @@ -192,7 +192,7 @@ export default {
192 let str='<div>'+params[0].name+'</div>'; 192 let str='<div>'+params[0].name+'</div>';
193 let unit='%'; 193 let unit='%';
194 for(let i=0;i<params.length;i++){ 194 for(let i=0;i<params.length;i++){
195 - if(i==3){ 195 + if(params[i].seriesName=='业务量'||params[i].seriesName=='业务告警量'||params[i].seriesName=='告警量'){
196 unit=" 个" 196 unit=" 个"
197 }else{ 197 }else{
198 unit="%" 198 unit="%"
@@ -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(item=='业务量'||item=='业务告警量'||item=='告警量'){
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){
@@ -195,7 +195,7 @@ export default { @@ -195,7 +195,7 @@ export default {
195 let str='<div>'+params[0].name+'</div>'; 195 let str='<div>'+params[0].name+'</div>';
196 let unit='%'; 196 let unit='%';
197 for(let i=0;i<params.length;i++){ 197 for(let i=0;i<params.length;i++){
198 - if(i==3||i==2){ 198 + if(params[i].seriesName=='业务量'||params[i].seriesName=='业务告警量'||params[i].seriesName=='告警量'){
199 unit="个" 199 unit="个"
200 }else{ 200 }else{
201 unit="%" 201 unit="%"