Authored by XuHaoJie

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

Showing 18 changed files with 226 additions and 100 deletions
@@ -201,29 +201,38 @@ global.openCmdbAssets = (resTypeId, resId, proxy) => { @@ -201,29 +201,38 @@ global.openCmdbAssets = (resTypeId, resId, proxy) => {
201 }); 201 });
202 } 202 }
203 203
204 -global.openDetail = (resId, resType, title) => {  
205 - // let url = `/#/res/resDetail/view/resId=${resId}`;  
206 - let url = window.top.location.href.split('/#')[0] + `/#/res/resDetail/view/resId=${resId}`;  
207 - if(resType){  
208 - url += '/resType=' + resType  
209 - }  
210 -  
211 - if(title){  
212 - url += '/title=' + title  
213 - }  
214 - let lyaui = window.parent.layui; 204 +global.openDetail = (resId, resType, proxy) => {
  205 + let lyaui = global.layui;
215 206
216 - debugger  
217 let editFlag = false; 207 let editFlag = false;
218 let provider = ''; 208 let provider = '';
219 - let name= 'test'; 209 + let name= '';
220 let ip = ''; 210 let ip = '';
221 let resTypeName = ''; 211 let resTypeName = '';
222 let adminName = ''; 212 let adminName = '';
223 let manageIp = ''; 213 let manageIp = '';
224 let collProtocol = ''; 214 let collProtocol = '';
225 215
226 - lyaui.commonCols.detailPage(resId, resType,editFlag,provider,name,ip,resTypeName,adminName,manageIp,collProtocol); 216 + // 获取资源详情
  217 + proxy.$http.get(`/api-web/v32/res/detail/${resId}`, {}, function (res) {
  218 + if (res && res.map) {
  219 + let data = res.map;
  220 +
  221 + provider = data.provider;
  222 + ip = data.ip;
  223 + resTypeName = data.resTypeName;
  224 + adminName = data.adminName;
  225 + manageIp = data.manageIp;
  226 + collProtocol = data.collProtocol;
  227 + name = data.resName;
  228 +
  229 + lyaui.commonCols.detailPage(resId, resType,editFlag,provider,name,ip,resTypeName,adminName,manageIp,collProtocol);
  230 + }
  231 + });
  232 +
  233 +
  234 +
  235 +
227 236
228 } 237 }
229 238
  1 +<el-link type="info" :underline="false" @click="openCmdbAssets"> {{textString}}</el-link>
  1 +export default {
  2 + name: 'assetsComponents',
  3 + template: '',
  4 + components: {},
  5 + props: {
  6 + // 资源名称
  7 + textString: {
  8 + type: String,
  9 + default: 0
  10 + },
  11 + // 展示文字 收藏、拓扑、资产 'start,topo,assets'
  12 + start: {
  13 + type: Boolean,
  14 + default: true
  15 + },
  16 + topo: {
  17 + type: Boolean,
  18 + default: true
  19 + },
  20 + assets: {
  21 + type: Boolean,
  22 + default: true
  23 + },
  24 + resId: {
  25 + type: String,
  26 + default: ''
  27 + },
  28 + resTypeId: {
  29 + type: String,
  30 + default: ''
  31 + },
  32 + resType: {
  33 + type: String,
  34 + default: ''
  35 + },
  36 + optionData: {
  37 + type: Array,
  38 + default: []
  39 + }
  40 +
  41 + },
  42 + data() {
  43 + return {}
  44 + },
  45 + setup(props, {attrs, slots, emit}) {
  46 +
  47 + const {proxy} = Vue.getCurrentInstance();
  48 +
  49 +
  50 + let openCmdbAssets = () => {
  51 + if (props.resId == '') {
  52 + proxy.$global.showMsg("资源编号不存在,请确认!","warning")
  53 + return;
  54 + }
  55 +
  56 + if (props.resTypeId == '') {
  57 + proxy.$global.showMsg("资源类型不存在,请确认!","warning")
  58 + return;
  59 + }
  60 +
  61 + proxy.$global.openCmdbAssets(props.resTypeId, props.resId, proxy);
  62 +
  63 + }
  64 +
  65 + return {
  66 + openCmdbAssets
  67 + }
  68 + }
  69 +}
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 :stroke-width="20" 5 :stroke-width="20"
6 :percentage="textValue" 6 :percentage="textValue"
7 :status="status"> 7 :status="status">
8 - <span>{{textValue == '' ? ' ' : textValue }} %</span> 8 + <span>{{textValue == '' ? ' ' : textValue + '%' }}</span>
9 </el-progress> 9 </el-progress>
10 </div> 10 </div>
11 - <div style="width: 50px">{{textString == '' ? ' - ' : textString }} </div> 11 + <div style="width: 50px">{{textString == '' ? '' : textString }} </div>
12 </div> 12 </div>
1 <div> 1 <div>
2 <el-dropdown> 2 <el-dropdown>
3 - <span class="el-dropdown-link" @click="openDetail" > 3 + <span class="el-dropdown-link" @click="openDetail" style="cursor:pointer">
4 {{textString}} 4 {{textString}}
5 <i class="el-icon-arrow-down" style="color: blue;font-weight: bold;" /> 5 <i class="el-icon-arrow-down" style="color: blue;font-weight: bold;" />
6 </span> 6 </span>
@@ -75,7 +75,7 @@ export default { @@ -75,7 +75,7 @@ export default {
75 favData.value = arr; 75 favData.value = arr;
76 dialogFlg.value = flg; 76 dialogFlg.value = flg;
77 } else { 77 } else {
78 - proxy.$global.showMsg("没有查询到收藏夹,请先添加!","warning") 78 + proxy.$global.showMsg("没有查询到收藏夹,请先添加!", "warning")
79 } 79 }
80 }); 80 });
81 } else { 81 } else {
@@ -91,7 +91,7 @@ export default { @@ -91,7 +91,7 @@ export default {
91 */ 91 */
92 let saveStart = () => { 92 let saveStart = () => {
93 if (props.resId == '') { 93 if (props.resId == '') {
94 - proxy.$global.showMsg("资源编号不存在,请确认!","warning") 94 + proxy.$global.showMsg("资源编号不存在,请确认!", "warning")
95 return; 95 return;
96 } 96 }
97 97
@@ -104,13 +104,12 @@ export default { @@ -104,13 +104,12 @@ export default {
104 proxy.$global.showMsg("收藏成功!") 104 proxy.$global.showMsg("收藏成功!")
105 } 105 }
106 }); 106 });
107 -  
108 } 107 }
109 108
110 109
111 let openTopoPage = () => { 110 let openTopoPage = () => {
112 if (props.resId == '') { 111 if (props.resId == '') {
113 - proxy.$global.showMsg("资源编号不存在,请确认!","warning") 112 + proxy.$global.showMsg("资源编号不存在,请确认!", "warning")
114 return; 113 return;
115 } 114 }
116 115
@@ -119,21 +118,21 @@ export default { @@ -119,21 +118,21 @@ export default {
119 118
120 let openDetail = () => { 119 let openDetail = () => {
121 if (props.resId == '') { 120 if (props.resId == '') {
122 - proxy.$global.showMsg("资源编号不存在,请确认!","warning") 121 + proxy.$global.showMsg("资源编号不存在,请确认!", "warning")
123 return; 122 return;
124 } 123 }
125 - proxy.$global.openDetail(props.resId,props.resType,props.title); 124 + proxy.$global.openDetail(props.resId, props.resType, proxy);
126 } 125 }
127 126
128 127
129 let openCmdbAssets = () => { 128 let openCmdbAssets = () => {
130 if (props.resId == '') { 129 if (props.resId == '') {
131 - proxy.$global.showMsg("资源编号不存在,请确认!","warning") 130 + proxy.$global.showMsg("资源编号不存在,请确认!", "warning")
132 return; 131 return;
133 } 132 }
134 133
135 if (props.resTypeId == '') { 134 if (props.resTypeId == '') {
136 - proxy.$global.showMsg("资源类型不存在,请确认!","warning") 135 + proxy.$global.showMsg("资源类型不存在,请确认!", "warning")
137 return; 136 return;
138 } 137 }
139 138
@@ -79,6 +79,7 @@ @@ -79,6 +79,7 @@
79 <el-option label="使用率组件" :value="'rateComponents'"></el-option> 79 <el-option label="使用率组件" :value="'rateComponents'"></el-option>
80 <el-option label="机房组件" :value="'machineRoomComponents'"></el-option> 80 <el-option label="机房组件" :value="'machineRoomComponents'"></el-option>
81 <el-option label="机柜组件" :value="'machineRoomDetailComponents'"></el-option> 81 <el-option label="机柜组件" :value="'machineRoomDetailComponents'"></el-option>
  82 + <el-option label="资产信息" :value="'assetsComponents'"></el-option>
82 </el-select> 83 </el-select>
83 </div> 84 </div>
84 85
@@ -209,6 +209,10 @@ export default { @@ -209,6 +209,10 @@ export default {
209 'machineRoomDetailComponents': Vue.defineAsyncComponent( 209 'machineRoomDetailComponents': Vue.defineAsyncComponent(
210 () => myImport('components/page/res/machineRoomDetailComponents/index') 210 () => myImport('components/page/res/machineRoomDetailComponents/index')
211 ), 211 ),
  212 + 'assetsComponents': Vue.defineAsyncComponent(
  213 + () => myImport('components/page/res/assetsComponents/index')
  214 + ),
  215 +
212 }, 216 },
213 data() { 217 data() {
214 return { 218 return {
@@ -1494,13 +1494,13 @@ export default { @@ -1494,13 +1494,13 @@ export default {
1494 Vue.onMounted(() => { 1494 Vue.onMounted(() => {
1495 }) 1495 })
1496 const goDetail=(item)=>{ 1496 const goDetail=(item)=>{
1497 - proxy.allowClickData.map((itemName,index)=>{  
1498 - if(item.name==itemName){ 1497 + // proxy.allowClickData.map((itemName,index)=>{
  1498 + // if(item.name==itemName){
1499 proxy.isDetailShow=true; 1499 proxy.isDetailShow=true;
1500 console.log("detail",item) 1500 console.log("detail",item)
1501 proxy.detailData=item; 1501 proxy.detailData=item;
1502 - }  
1503 - }) 1502 + // }
  1503 + // })
1504 1504
1505 } 1505 }
1506 1506
@@ -263,12 +263,12 @@ export default { @@ -263,12 +263,12 @@ export default {
263 263
264 }) 264 })
265 const goDetail=(item)=>{ 265 const goDetail=(item)=>{
266 - proxy.allowClickData.map((itemName,index)=>{  
267 - if(item.name==itemName){ 266 + // proxy.allowClickData.map((itemName,index)=>{
  267 + // if(item.name==itemName){
268 proxy.isDetailShow=true; 268 proxy.isDetailShow=true;
269 proxy.detailData=item; 269 proxy.detailData=item;
270 - }  
271 - }) 270 + // }
  271 + // })
272 } 272 }
273 273
274 return{ 274 return{
@@ -313,12 +313,12 @@ export default { @@ -313,12 +313,12 @@ export default {
313 313
314 }) 314 })
315 const goDetail=(item)=>{ 315 const goDetail=(item)=>{
316 - proxy.allowClickData.map((itemName,index)=>{  
317 - if(item.name==itemName){ 316 + // proxy.allowClickData.map((itemName,index)=>{
  317 + // if(item.name==itemName){
318 proxy.isDetailShow=true; 318 proxy.isDetailShow=true;
319 proxy.detailData=item; 319 proxy.detailData=item;
320 - }  
321 - }) 320 + // }
  321 + // })
322 } 322 }
323 323
324 return{ 324 return{
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <div class='img-serve' > 12 <div class='img-serve' >
13 13
14 <img src="/vue3/src/assets/images/machineRoom/icon-state.png" alt="" class='state'> 14 <img src="/vue3/src/assets/images/machineRoom/icon-state.png" alt="" class='state'>
15 - <div class='img-serve-text'>{{item.name}}</div> 15 + <div class='img-serve-text'>{{item.provider}}</div>
16 <div class='lamp'> 16 <div class='lamp'>
17 <img src="/vue3/src/assets/images/machineRoom/icon-weblogical.png" alt="" class='img-weblog'> 17 <img src="/vue3/src/assets/images/machineRoom/icon-weblogical.png" alt="" class='img-weblog'>
18 <div class='img-lamp'> 18 <div class='img-lamp'>
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 <p>品 牌:{{deviceDataInfo.brandName}}</p> 54 <p>品 牌:{{deviceDataInfo.brandName}}</p>
55 <p>型 号:{{deviceDataInfo.model}}</p> 55 <p>型 号:{{deviceDataInfo.model}}</p>
56 <p>序 列 号:{{deviceDataInfo.serialNumber}}</p> 56 <p>序 列 号:{{deviceDataInfo.serialNumber}}</p>
57 - <p>业 务 IP:{{deviceDataInfo.ServiceIP}}</p> 57 + <p>业 务 IP:{{deviceDataInfo.ip}}</p>
58 <p>用 途:{{deviceDataInfo.purpose}}</p> 58 <p>用 途:{{deviceDataInfo.purpose}}</p>
59 </div> 59 </div>
60 </div> 60 </div>
@@ -16,23 +16,23 @@ export default { @@ -16,23 +16,23 @@ export default {
16 deviceDataInfo:'',//设备详细信息 16 deviceDataInfo:'',//设备详细信息
17 deviceDatas: [ 17 deviceDatas: [
18 { 18 {
19 - name:'E12', 19 + name:'E12',//机柜名称
20 20
21 - cabinetCapacity :'42U',  
22 - deviceData:[ 21 + cabinetCapacity :'42U',//机柜总U位数-目前都是42U
  22 + deviceData:[//机柜所有的服务器
23 { 23 {
24 - name:'物理服务器',  
25 - resName:'管理决策二包(数据集市39)',  
26 - brandName:'浪潮',  
27 - model:'TS860',  
28 - serialNumber:'216365930',  
29 - ServiceIP:'80.12.73.39',  
30 - purpose:'管理决策二包使用',  
31 - uPosition:'1-8U', 24 + name:'物理服务器',//服务器名称
  25 + resName:'管理决策二包(数据集市39)',//服务器资源名称
  26 + brandName:'浪潮',//品牌
  27 + model:'TS860',//型号
  28 + serialNumber:'216365930',//序列号
  29 + ServiceIP:'80.12.73.39',//业务ip
  30 + purpose:'管理决策二包使用',//用途
  31 + uPosition:'1-8U',//U位
32 } 32 }
33 ], 33 ],
34 - deviceNum:'1',  
35 - alarmNum:'0' 34 + deviceNum:'1',//设备数量
  35 + alarmNum:'0'//警告量
36 }, 36 },
37 { 37 {
38 name:'E13', 38 name:'E13',
@@ -168,37 +168,67 @@ export default { @@ -168,37 +168,67 @@ export default {
168 setup(props, {attrs, slots, emit}) { 168 setup(props, {attrs, slots, emit}) {
169 const {proxy} = Vue.getCurrentInstance(); 169 const {proxy} = Vue.getCurrentInstance();
170 const isShowDevice=Vue.ref(false); 170 const isShowDevice=Vue.ref(false);
171 - 171 + const theirRoom=Vue.ref('');//机房名称
172 const CabinetNum=props.detailData.name;//机柜编号 172 const CabinetNum=props.detailData.name;//机柜编号
173 173
174 // 挂载完 174 // 挂载完
175 Vue.onMounted(() => { 175 Vue.onMounted(() => {
176 if(props.machineData.name.indexOf('huzhou')!=-1){ 176 if(props.machineData.name.indexOf('huzhou')!=-1){
177 proxy.isCenter=true; 177 proxy.isCenter=true;
  178 + proxy.theirRoom='湖州灾备';
178 }else{ 179 }else{
179 proxy.isCenter=false; 180 proxy.isCenter=false;
  181 + proxy.theirRoom='兴议机房';
  182 +
180 } 183 }
181 - proxy.getDeviceInfo(); 184 + proxy.getData();
  185 + // proxy.getDeviceInfo();
182 186
183 }) 187 })
  188 + const getData=()=>{
  189 + let parmas={
  190 + theirRoom:proxy.theirRoom,
  191 + theirCabinet:CabinetNum
  192 + }
  193 + $.get(proxy.domainName+'/api-web/v32/res/cabinet?access_token='+proxy.accessToken,parmas,function (res){
  194 +
  195 + console.log("res1",res)
  196 + if(res){
  197 + let resData=res.data;
  198 + let deviceDatas=[];
  199 + deviceDatas.push({
  200 + name:CabinetNum,//机柜名称
  201 + cabinetCapacity :'42U',//机柜总U位数-目前都是42U
  202 + deviceNum:resData.length,//设备数量
  203 + alarmNum:'0',//警告量
  204 + deviceData:resData
  205 + })
  206 + proxy.deviceDatas=deviceDatas;
  207 + console.log("devdats",proxy.deviceDatas)
  208 + proxy.getDeviceInfo()
  209 +
  210 + }
  211 + })
  212 + }
  213 +
184 const getDeviceInfo=()=>{ 214 const getDeviceInfo=()=>{
185 proxy.deviceDatas.map((item,index)=>{ 215 proxy.deviceDatas.map((item,index)=>{
186 if(CabinetNum==item.name){ 216 if(CabinetNum==item.name){
187 proxy.infoData=item; 217 proxy.infoData=item;
188 proxy.serviceData=item.deviceData 218 proxy.serviceData=item.deviceData
189 item.deviceData.map((itemD,indexD)=>{ 219 item.deviceData.map((itemD,indexD)=>{
190 - let strArr=itemD.uPosition.split("U");//[0]1-4 [1]U  
191 - let leftStrArr=strArr[0].split('-');//[0]1 [1]4  
192 - let leftStr=leftStrArr[0];  
193 - let rightStr=leftStrArr[1]; 220 + // let strArr=itemD.uPosition.split("U");//[0]1-4 [1]U
  221 + // let leftStrArr=strArr[0].split('-');//[0]1 [1]4
  222 + let leftStr=itemD.startU;//leftStrArr[0];
  223 + let rightStr=itemD.endU;//leftStrArr[1];
194 itemD.serviceHeight=rightStr;//nU的设备 224 itemD.serviceHeight=rightStr;//nU的设备
195 let serveNum=1; 225 let serveNum=1;
196 - if(leftStr==1){  
197 - serveNum=rightStr  
198 - }else{  
199 - serveNum=rightStr-leftStr; 226 + // if(leftStr==1){
  227 + // serveNum=rightStr
  228 + // }else{
  229 + serveNum=rightStr-leftStr+1;
200 230
201 - } 231 + // }
202 itemD.serviceClass='img-serve-'+serveNum;//设备的css的class 232 itemD.serviceClass='img-serve-'+serveNum;//设备的css的class
203 itemD.uClass=''; 233 itemD.uClass='';
204 if(leftStr>1){ 234 if(leftStr>1){
@@ -219,7 +249,9 @@ export default { @@ -219,7 +249,9 @@ export default {
219 return{ 249 return{
220 showDevice, 250 showDevice,
221 isShowDevice, 251 isShowDevice,
222 - getDeviceInfo 252 + getDeviceInfo,
  253 + getData,
  254 + theirRoom
223 } 255 }
224 } 256 }
225 } 257 }
@@ -26,7 +26,7 @@ export default { @@ -26,7 +26,7 @@ export default {
26 detailData:'',//详情数据 26 detailData:'',//详情数据
27 htmlName:'xiaoshansecond', 27 htmlName:'xiaoshansecond',
28 machineData:this.src, 28 machineData:this.src,
29 - allowClickData:['E12','E13'],//允许进入详情的机柜 29 + allowClickData:['E12','E13','F14'],//允许进入详情的机柜
30 tableData:[ 30 tableData:[
31 [ 31 [
32 32
@@ -477,12 +477,12 @@ export default { @@ -477,12 +477,12 @@ export default {
477 477
478 }) 478 })
479 const goDetail=(item)=>{ 479 const goDetail=(item)=>{
480 - proxy.allowClickData.map((itemName,index)=>{  
481 - if(item.name==itemName){ 480 + // proxy.allowClickData.map((itemName,index)=>{
  481 + // if(item.name==itemName){
482 proxy.isDetailShow=true; 482 proxy.isDetailShow=true;
483 proxy.detailData=item; 483 proxy.detailData=item;
484 - }  
485 - }) 484 + // }
  485 + // })
486 } 486 }
487 487
488 return{ 488 return{
@@ -1082,12 +1082,12 @@ export default { @@ -1082,12 +1082,12 @@ export default {
1082 1082
1083 }) 1083 })
1084 const goDetail=(item)=>{ 1084 const goDetail=(item)=>{
1085 - proxy.allowClickData.map((itemName,index)=>{  
1086 - if(item.name==itemName){ 1085 + // proxy.allowClickData.map((itemName,index)=>{
  1086 + // if(item.name==itemName){
1087 proxy.isDetailShow=true; 1087 proxy.isDetailShow=true;
1088 proxy.detailData=item; 1088 proxy.detailData=item;
1089 - }  
1090 - }) 1089 + // }
  1090 + // })
1091 } 1091 }
1092 1092
1093 return{ 1093 return{
@@ -621,12 +621,12 @@ export default { @@ -621,12 +621,12 @@ export default {
621 621
622 }) 622 })
623 const goDetail=(item)=>{ 623 const goDetail=(item)=>{
624 - proxy.allowClickData.map((itemName,index)=>{  
625 - if(item.name==itemName){ 624 + // proxy.allowClickData.map((itemName,index)=>{
  625 + // if(item.name==itemName){
626 proxy.isDetailShow=true; 626 proxy.isDetailShow=true;
627 proxy.detailData=item; 627 proxy.detailData=item;
628 - }  
629 - }) 628 + // }
  629 + // })
630 } 630 }
631 631
632 return{ 632 return{
@@ -13,13 +13,12 @@ @@ -13,13 +13,12 @@
13 <div style="height: 50px;text-align: left;margin-left: 10px;margin-top: 10px;display: flex"> 13 <div style="height: 50px;text-align: left;margin-left: 10px;margin-top: 10px;display: flex">
14 <div style="width: calc(100% - 100px)"> 14 <div style="width: calc(100% - 100px)">
15 <el-form :inline="true" :model="searchForm" class="demo-form-inline"> 15 <el-form :inline="true" :model="searchForm" class="demo-form-inline">
16 - <el-form-item label="资源名称">  
17 - <el-input v-model="searchForm.resName" placeholder="请输入资源名称"></el-input> 16 + <el-form-item v-for="searchInfo in obj.searchList" :label="searchInfo.name">
  17 + <el-input v-model="searchForm[searchInfo.key]" placeholder="请输入资源名称"></el-input>
18 </el-form-item> 18 </el-form-item>
19 19
20 <el-form-item> 20 <el-form-item>
21 - <el-button @click="onSubmit">查询</el-button>  
22 - 21 + <el-button @click="loadResList">查询</el-button>
23 </el-form-item> 22 </el-form-item>
24 </el-form> 23 </el-form>
25 </div> 24 </div>
@@ -30,34 +29,21 @@ @@ -30,34 +29,21 @@
30 29
31 <cm-table-page :columns="obj.columns" :dataList="obj.maps" @loaddata="getPage" :showIndex="true" 30 <cm-table-page :columns="obj.columns" :dataList="obj.maps" @loaddata="getPage" :showIndex="true"
32 :showBorder="true" :currentPage="currentPage" :total="total" :loading="false" 31 :showBorder="true" :currentPage="currentPage" :total="total" :loading="false"
33 - :showPage="true" :height="(height - 95)" :maxWidth="max"> 32 + :showPage="true" :height="(height - 95)"
  33 + :maxWidth="max">
34 <template #default="{row,prop,column}"> 34 <template #default="{row,prop,column}">
35 <component v-if="row[prop] && row[prop].props && row[prop].props.colComponents != null && row[prop].props.colComponents != ''" v-bind:is="row[prop].props.colComponents" 35 <component v-if="row[prop] && row[prop].props && row[prop].props.colComponents != null && row[prop].props.colComponents != ''" v-bind:is="row[prop].props.colComponents"
36 :resId="row.resId" 36 :resId="row.resId"
37 :resTypeId="currentNode.id" 37 :resTypeId="currentNode.id"
38 :textString="row[prop] == undefined ? '' : row[prop].value" 38 :textString="row[prop] == undefined ? '' : row[prop].value"
39 :optionData="row"></component> 39 :optionData="row"></component>
40 - <el-link v-else :underline="false" @click="item.click(scope.row)">{{row[prop] == undefined ? '' : row[prop].value }}</el-link> 40 + <el-link v-else :underline="false" @click="item.click(scope.row)">{{row[prop].value == undefined ? '' : row[prop].value }}</el-link>
41 </template> 41 </template>
42 </cm-table-page> 42 </cm-table-page>
43 </div> 43 </div>
44 </el-col> 44 </el-col>
45 </el-row> 45 </el-row>
46 46
47 - <cm-dialog :title="cellDetail.prop == 'cabinetNo' ? '机柜详情' : cellDetail.title" width="80%" :showDialogVisible="dialogFlg" :showFooter="false" @hidedialog="showDialog" :showOkBtn="false" cancelText="关闭">  
48 - <template v-slot>  
49 - <div v-if="cellDetail.prop == 'cabinetNo'" @click="openCabinet(false)" :style="{'background-image': 'url(' + cabinetNoSrc + ')'}" style=";height: 600px;background-repeat: no-repeat;background-position: center;background-size: 93% 100%;">  
50 - <!--<div style="font-weight: bold;font-size: 20px;">  
51 - {{cellDetail.row[cellDetail.prop]}}  
52 - </div>-->  
53 - </div>  
54 - <div v-if="cellDetail.prop == 'resPositon'" @click="openCabinet(false)" style="background-image: url('/vue3/src/assets/images/res/img02.jpg');height: 600px;background-repeat: no-repeat;background-position: center;background-size: 80%;">  
55 - <div style="font-weight: bold;font-size: 20px;">  
56 - <!--{{cellDetail.row[cellDetail.prop]}}布局图-->  
57 - </div>  
58 - </div>  
59 - </template>  
60 - </cm-dialog>  
61 47
62 <cm-dialog :title="configObj.title" width="80%" :showDialogVisible="showConfig" :showFooter="false" @hidedialog="showConfigDialog" :showOkBtn="false" cancelText="关闭"> 48 <cm-dialog :title="configObj.title" width="80%" :showDialogVisible="showConfig" :showFooter="false" @hidedialog="showConfigDialog" :showOkBtn="false" cancelText="关闭">
63 <template v-slot> 49 <template v-slot>
@@ -34,6 +34,15 @@ export default { @@ -34,6 +34,15 @@ export default {
34 'statusComponents': Vue.defineAsyncComponent( 34 'statusComponents': Vue.defineAsyncComponent(
35 () => myImport('components/page/res/statusComponents/index') 35 () => myImport('components/page/res/statusComponents/index')
36 ), 36 ),
  37 + 'machineRoomComponents': Vue.defineAsyncComponent(
  38 + () => myImport('components/page/res/machineRoomComponents/index')
  39 + ),
  40 + 'machineRoomDetailComponents': Vue.defineAsyncComponent(
  41 + () => myImport('components/page/res/machineRoomDetailComponents/index')
  42 + ),
  43 + 'assetsComponents': Vue.defineAsyncComponent(
  44 + () => myImport('components/page/res/assetsComponents/index')
  45 + ),
37 }, 46 },
38 data() { 47 data() {
39 return { 48 return {
@@ -54,7 +63,7 @@ export default { @@ -54,7 +63,7 @@ export default {
54 const currentNode = Vue.ref({}); 63 const currentNode = Vue.ref({});
55 // 搜索框内容 64 // 搜索框内容
56 const searchForm = Vue.ref({ 65 const searchForm = Vue.ref({
57 - resName: '' 66 +
58 }); 67 });
59 68
60 // 单元格点及保存的数据 69 // 单元格点及保存的数据
@@ -89,12 +98,17 @@ export default { @@ -89,12 +98,17 @@ export default {
89 }); 98 });
90 } 99 }
91 100
  101 + let page = Vue.ref(1);
  102 + let limit = Vue.ref(10);
  103 +
92 let loadResList = () => { 104 let loadResList = () => {
93 if (currentNode.value) { 105 if (currentNode.value) {
  106 + let fv = searchForm.value;
  107 +
94 // 查询参数 108 // 查询参数
95 let params = { 109 let params = {
96 - page: 1,  
97 - limit: 10, 110 + page: page.value,
  111 + limit: limit.value,
98 treeNodeId: currentNode.value.id, 112 treeNodeId: currentNode.value.id,
99 query: {} 113 query: {}
100 } 114 }
@@ -135,6 +149,16 @@ export default { @@ -135,6 +149,16 @@ export default {
135 } 149 }
136 } 150 }
137 151
  152 + let getPage = (pageInfo) =>{
  153 + console.log(pageInfo);
  154 + debugger;
  155 +
  156 + page.value = pageInfo.page;
  157 + limit.value = pageInfo.limit;
  158 + loadResList()
  159 + }
  160 +
  161 +
138 // 配置页面 162 // 配置页面
139 const {showConfig, configObj, showConfigDialog} = configPage() 163 const {showConfig, configObj, showConfigDialog} = configPage()
140 164
@@ -164,6 +188,7 @@ export default { @@ -164,6 +188,7 @@ export default {
164 cabinetNoSrc, 188 cabinetNoSrc,
165 total, 189 total,
166 max, 190 max,
  191 + getPage,
167 192
168 // 配置页面 193 // 配置页面
169 showConfig, configObj, showConfigDialog 194 showConfig, configObj, showConfigDialog