From a6b8e203387cfa21dc569834324e2d1f814f884c Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@iotlink.com> Date: 星期三, 07 七月 2021 14:10:27 +0800 Subject: [PATCH] 修改系统监控接口地址 --- src/pages/analysisPower/index/App.vue | 33 +++++++++++++++++++++++++-------- 1 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/pages/analysisPower/index/App.vue b/src/pages/analysisPower/index/App.vue index a915dd9..1dc3b94 100644 --- a/src/pages/analysisPower/index/App.vue +++ b/src/pages/analysisPower/index/App.vue @@ -67,7 +67,7 @@ :cell-style="cellStyle" > <el-table-column label="搴忓彿" type="index" align="center" width="60px"></el-table-column> - <el-table-column label="鎽勫儚鏈哄悕绉�" align="center" show-overflow-tooltip sortable> + <el-table-column label="鎽勫儚鏈哄悕绉�" align="center" show-overflow-tooltip> <template slot-scope="scope"> <span :style="scope.row.is_running ? `color:#3d68e1` : '' " @@ -75,25 +75,33 @@ </template> </el-table-column> <el-table-column label="鎽勫儚鏈哄湴鍧�" prop="addr" align="center" show-overflow-tooltip sortable></el-table-column> - <el-table-column label="鎽勫儚鏈篒P" prop="ip" align="center" width="130px" sortable></el-table-column> - <el-table-column label="鎽勫儚鏈虹被鍨�" align="center" width="120px" sortable> + <el-table-column + label="鎽勫儚鏈篒P" + prop="ip" + align="center" + width="130px" + sortable + :sort-method="ipSortMethod" + ></el-table-column> + <el-table-column label="鎽勫儚鏈虹被鍨�" align="center" width="120px"> <template slot-scope="scope"> <span>{{scope.row.run_type | cameraType}}</span> </template> </el-table-column> - <el-table-column label="鎵ц绠楁硶" align="center" show-overflow-tooltip sortable> + <el-table-column label="鎵ц绠楁硶" align="center" show-overflow-tooltip> <template slot-scope="scope"> <span v-if="scope.row.run_type === -1 ">-</span> - <span v-else>{{scope.row.tasks | taskList}}</span> + <span v-else-if="scope.row.tasks != null ">{{scope.row.tasks | taskList}}</span> + <span v-else>-</span> </template> </el-table-column> - <el-table-column label="杩愯璁惧" align="center" width="160px"> + <el-table-column label="杩愯璁惧" align="center" width="160px" sortable> <template slot-scope="scope"> <span v-if="scope.row.run_type === -1 ">-</span> <span v-else>{{scope.row.runServerName}}</span> </template> </el-table-column> - <el-table-column label="鐘舵��" align="center" show-overflow-tooltip sortable width="100px"> + <el-table-column label="鐘舵��" align="center" show-overflow-tooltip width="100px"> <template slot-scope="scope"> <span v-if="scope.row.status === -1 ">-</span> <span v-else-if="scope.row.status === 2">{{"澶勭悊涓�"}}</span> @@ -240,7 +248,7 @@ ret = ret.toFixed(1) } - return ret + return ret < 0 ? 0 : ret }, isAdmin() { if ( @@ -283,6 +291,15 @@ clearTimeout(this.timeout); }, methods: { + ipSortMethod(a, b) { + if (Number(a.ip.substr(a.ip.lastIndexOf('.') + 1)) < Number(b.ip.substr(b.ip.lastIndexOf('.') + 1))) { + return -1; + } + if (Number(a.ip.substr(a.ip.lastIndexOf('.') + 1)) > Number(b.ip.substr(b.ip.lastIndexOf('.') + 1))) { + return 1; + } + return 0; + }, openDrawer() { this.initFormData(); this.drawer = true; -- Gitblit v1.8.0