Authored by ww

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

@@ -132,15 +132,15 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd @@ -132,15 +132,15 @@ layui.define(['common', 'admin', 'echarts', 'common', 'table', 'sessions', 'layd
132 $.each(e.backlist[j], function (h, n) { 132 $.each(e.backlist[j], function (h, n) {
133 if (h != "resId") { 133 if (h != "resId") {
134 if (/失败/.test(n)) { 134 if (/失败/.test(n)) {
135 - tr += '<td style="text-align: center"><i class="layui-icon layui-icon-close" style="font-size: 20px!important; color: #ff252c!important;"></i></td>' 135 + tr += '<td style="text-align: center"><i class="layui-icon layui-icon-close" style="font-size: 20px!important; color: #ff252c!important; font-family: layui-icon !important;"></i></td>'
136 } else if (/成功/.test(n)) { 136 } else if (/成功/.test(n)) {
137 - tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-ok" style="font-size: 20px!important; color: #1dff1c!important;"></i></p><p style="margin-top: 8px;text-align: center">主楼+综改</p></td>' 137 + tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-ok" style="font-size: 20px!important; color: #1dff1c!important; font-family: layui-icon !important;"></i></p><p style="margin-top: 8px;text-align: center">主楼+综改</p></td>'
138 } else if (/备份中/.test(n)) { 138 } else if (/备份中/.test(n)) {
139 tr += '<td style="text-align: center"><span style="color:#ffe40e!important;">' + n + '</span></td>' 139 tr += '<td style="text-align: center"><span style="color:#ffe40e!important;">' + n + '</span></td>'
140 } else if (/未备份/.test(n)) { 140 } else if (/未备份/.test(n)) {
141 tr += '<td style="text-align: center"><span style="color:magenta!important;">' + n + '</span></td>' 141 tr += '<td style="text-align: center"><span style="color:magenta!important;">' + n + '</span></td>'
142 } else if (/历史存放/.test(n)) { 142 } else if (/历史存放/.test(n)) {
143 - tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-log" style="font-size: 20px!important; color: #1e9fff!important;"></i></p><p style="margin-top: 8px;text-align: center">综改</p></td>' 143 + tr += '<td><p style="text-align: center"><i class="layui-icon layui-icon-log" style="font-size: 20px!important; color: #1e9fff!important; font-family: layui-icon !important;"></i></p><p style="margin-top: 8px;text-align: center">综改</p></td>'
144 } else if (/全备/.test(n)) { 144 } else if (/全备/.test(n)) {
145 tr += '<td style="text-align: center"><span style="color:#1DFF1C!important;">' + n + '</span></td>' 145 tr += '<td style="text-align: center"><span style="color:#1DFF1C!important;">' + n + '</span></td>'
146 } else if (/已失效/.test(n)){ 146 } else if (/已失效/.test(n)){
@@ -72,9 +72,9 @@ layui.define(['table', 'form','laytpl', 'sessions', 'admin', 'common', 'echarts' @@ -72,9 +72,9 @@ layui.define(['table', 'form','laytpl', 'sessions', 'admin', 'common', 'echarts'
72 72
73 function renderIsDiscovery(isRecovery) { 73 function renderIsDiscovery(isRecovery) {
74 if(isRecovery=="1"){ 74 if(isRecovery=="1"){
75 - return '<i class="layui-icon layui-icon-ok" style="font-size: 20px!important; color: #1dff1c!important;"></i>'; 75 + return '<i class="layui-icon layui-icon-ok" style="font-size: 20px!important; color: #1dff1c!important; font-family: layui-icon !important;"></i>';
76 }else { 76 }else {
77 - return '<i class="layui-icon layui-icon-close" style="font-size: 20px!important; color: #ff252c!important;"></i>'; 77 + return '<i class="layui-icon layui-icon-close" style="font-size: 20px!important; color: #ff252c!important; font-family: layui-icon !important;"></i>';
78 } 78 }
79 } 79 }
80 $("#orgSearchBtn").on("click",function () { 80 $("#orgSearchBtn").on("click",function () {
@@ -85,8 +85,8 @@ @@ -85,8 +85,8 @@
85 <el-step title="配置端口" description="" /> 85 <el-step title="配置端口" description="" />
86 </el-steps> 86 </el-steps>
87 87
88 - <div v-if="stepActive == 1" style="display: flex;justify-content: space-around;padding: 0px 25%;">  
89 - <el-tree-select 88 + <div v-if="stepActive == 1">
  89 + <!--<el-tree-select
90 v-model="portSenseConfigData" 90 v-model="portSenseConfigData"
91 :data="resTreeArr" 91 :data="resTreeArr"
92 filterable 92 filterable
@@ -95,7 +95,48 @@ @@ -95,7 +95,48 @@
95 :render-after-expand="false" 95 :render-after-expand="false"
96 :size="$global.elementConfig.size.input" 96 :size="$global.elementConfig.size.input"
97 show-checkbox 97 show-checkbox
98 - :props="typeProps"/> 98 + :props="typeProps"/>-->
  99 + <el-row style="margin-bottom: 5px;margin-top: 5px">
  100 + <el-col :span="24">
  101 + <div class="flex-div-start margin-top-bottom-10">
  102 + <el-tooltip>
  103 + <template #content>关键字检索包含<br/>资源名称<br/>IP地址</template>
  104 + <el-input :size="$global.elementConfig.size.input" clearable
  105 + placeholder="输入关键字"
  106 + style="width:160px;margin-left: 10px;float: left;margin-right:6px;"
  107 + v-model="uncheckedParams.keyWords"/>
  108 + </el-input>
  109 + </el-tooltip>
  110 + <div style="margin-right:6px;">
  111 + <cm-biz-type-tree-input @callback="getUncheckedBizType" clearable collapseTags multiple/>
  112 + </div>
  113 + <div style="margin-right:6px;">
  114 + <cm-res-type-tree-input @callback="getUncheckedResType" clearable collapseTags multiple/>
  115 + </div>
  116 + <div class="flex-div-start" style="float: left;">
  117 + <!-- <el-button type="primary" @click="onReset()">重置</el-button>-->
  118 + <el-button :size="$global.elementConfig.size.button" @click="loadResTree()" style="margin-left: 6px" type="primary">搜索
  119 + </el-button>
  120 + </div>
  121 +
  122 + </div>
  123 + </el-col>
  124 + </el-row>
  125 + <cm-table-page :columns="uncheckedResColumns"
  126 + :dataList="uncheckedResData"
  127 + :height="(height - 190)"
  128 + :pageSize="uncheckedParams.limit"
  129 + :showBorder="true"
  130 + :showIndex="true"
  131 + :showPage="true"
  132 + :showSelection="true"
  133 + :showTools="false"
  134 + :total="uncheckedResTotal"
  135 + @loaddata="loadUncheckedTable"
  136 + @selectionChange="uncheckedResChange">
  137 + <template #default="{row,prop,column}">
  138 + </template>
  139 + </cm-table-page>
99 <el-button style="margin-top: 12px" @click="next">下一步</el-button> 140 <el-button style="margin-top: 12px" @click="next">下一步</el-button>
100 </div> 141 </div>
101 142
@@ -247,13 +247,96 @@ export default { @@ -247,13 +247,96 @@ export default {
247 getListData({page: 1, limit: pageSize.value}); 247 getListData({page: 1, limit: pageSize.value});
248 } 248 }
249 249
  250 + let uncheckedResColumns = Vue.ref([
  251 + {
  252 + prop: 'resName',
  253 + label: '资源名称',
  254 + sortable: true,
  255 + align: 'center',
  256 + },
  257 + {
  258 + prop: 'ip',
  259 + label: 'ip地址',
  260 + sortable: true,
  261 + align: 'center',
  262 + },
  263 + {
  264 + prop: 'resTypeName',
  265 + label: '资源类型',
  266 + sortable: true,
  267 + align: 'center',
  268 + },
  269 + {
  270 + prop: 'healthDesc',
  271 + label: '资源状态',
  272 + sortable: true,
  273 + align: 'center',
  274 + },
  275 + {
  276 + prop: 'linkState',
  277 + label: '连接状态',
  278 + sortable: true,
  279 + align: 'center',
  280 + },
  281 + {
  282 + prop: 'adminName',
  283 + label: '负责人',
  284 + sortable: true,
  285 + align: 'center',
  286 + },
  287 + {
  288 + prop: 'phone',
  289 + label: '负责人电话',
  290 + sortable: true,
  291 + align: 'center',
  292 + },
  293 + {
  294 + prop: 'lastCollTime',
  295 + label: '最近采集时间',
  296 + sortable: true,
  297 + align: 'center',
  298 + }
  299 + ])
  300 + let uncheckedResData = Vue.ref([]);
  301 + let uncheckedResTotal = Vue.ref(0);
  302 + let uncheckedResChange = (val)=>{
  303 + portSenseConfigData.value = val.map(item=>item.resId);
  304 + }
  305 + let uncheckedParams = Vue.ref({
  306 + keyWords:'',
  307 + resTypes:[],
  308 + busIds:[],
  309 + page:1,
  310 + limit:20,
  311 + })
250 const loadResTree = () => { 312 const loadResTree = () => {
251 - proxy.$http.get('/mj/user/selectResTreeAndSelectRes', {userId: proxy.$global.common.getUserId()}, function (res) { 313 + let params = {
  314 + keyWords:uncheckedParams.value.keyWords,
  315 + resTypes:uncheckedParams.value.resTypes.join(','),
  316 + busIds:uncheckedParams.value.busIds.join(','),
  317 + page:uncheckedParams.value.page,
  318 + limit:uncheckedParams.value.limit,
  319 + }
  320 + proxy.$http.get('/api-web/bResourceExtendParam/addPage', params, function (res) {
252 if (res && res.success && res.data) { 321 if (res && res.success && res.data) {
253 - resTreeArr.value = res.data.options; 322 + uncheckedResData.value = res.data;
  323 + uncheckedResTotal.value = res.count;
254 } 324 }
255 }) 325 })
256 } 326 }
  327 + const loadUncheckedTable = ({page, limit})=>{
  328 + uncheckedParams.value.page = page;
  329 + uncheckedParams.value.limit = limit;
  330 + loadResTree();
  331 + }
  332 + const getUncheckedResType = (arr)=>{
  333 + uncheckedParams.value.resTypes = arr.map(item=>item.id)
  334 + loadResTree();
  335 + }
  336 + const getUncheckedBizType = (arr)=>{
  337 + uncheckedParams.value.busIds = arr.map(item=>item.busId)
  338 + loadResTree();
  339 + }
257 340
258 // 挂载完 341 // 挂载完
259 Vue.onMounted(() => { 342 Vue.onMounted(() => {
@@ -302,6 +385,16 @@ export default { @@ -302,6 +385,16 @@ export default {
302 title, 385 title,
303 portSenseConfigData, 386 portSenseConfigData,
304 showPortSenseDialog, 387 showPortSenseDialog,
  388 +
  389 + loadResTree,
  390 + uncheckedParams,
  391 + uncheckedResColumns,
  392 + uncheckedResData,
  393 + uncheckedResTotal,
  394 + uncheckedResChange,
  395 + loadUncheckedTable,
  396 + getUncheckedBizType,
  397 + getUncheckedResType,
305 } 398 }
306 } 399 }
307 } 400 }