|
|
|
@ -40,6 +40,9 @@
|
|
|
|
|
<span
|
|
|
|
|
>未上传图片:<el-tag type="danger">{{ noPicNum }}</el-tag></span
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
>磁盘异常数量:<el-tag type="danger">{{ freeNum }}</el-tag></span
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
>装置总数:<el-tag type="info">{{ tableData.length }}</el-tag></span
|
|
|
|
|
>
|
|
|
|
@ -69,24 +72,54 @@
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
height="calc(100% - 40px)"
|
|
|
|
|
:default-sort="{ order: 'descending' }"
|
|
|
|
|
:row-class-name="tableRowSetting"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="selection" :reserve-selection="true" width="50">
|
|
|
|
|
<el-table-column
|
|
|
|
|
type="selection"
|
|
|
|
|
:reserve-selection="true"
|
|
|
|
|
width="50"
|
|
|
|
|
fixed
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column type="index" width="50" label="序号" fixed>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column type="index" width="50" label="序号"> </el-table-column>
|
|
|
|
|
<!-- <el-table-column prop="id" label="ID" width="60" sortable>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<el-table-column prop="oid" label="出厂ID" width="150" sortable>
|
|
|
|
|
<el-table-column prop="oid" label="出厂ID" width="180" sortable fixed>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{
|
|
|
|
|
scope.row.raw_report.hasOwnProperty("oid")
|
|
|
|
|
? scope.row.raw_report.oid
|
|
|
|
|
: ""
|
|
|
|
|
}}
|
|
|
|
|
<span
|
|
|
|
|
class="redMlxf"
|
|
|
|
|
v-if="
|
|
|
|
|
scope.row.list &&
|
|
|
|
|
scope.row.list[0].estimatedPublishTime * 1000 - newupdatatime > 0
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<b v-if="scope.row.list[0].cmdDesc == ''">{{
|
|
|
|
|
cmdCn[scope.row.list[0].cmdName]
|
|
|
|
|
}}</b
|
|
|
|
|
><b v-else>{{ scope.row.list[0].cmdDesc }}</b>
|
|
|
|
|
|
|
|
|
|
<b
|
|
|
|
|
v-if="
|
|
|
|
|
scope.row.list[0].estimatedPublishTime * 1000 - newupdatatime >
|
|
|
|
|
0
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
{{ remainingTime(scope.row.list[0]) }}
|
|
|
|
|
</b>
|
|
|
|
|
</span>
|
|
|
|
|
<span v-else>
|
|
|
|
|
{{
|
|
|
|
|
scope.row.raw_report.hasOwnProperty("oid")
|
|
|
|
|
? scope.row.raw_report.oid
|
|
|
|
|
: ""
|
|
|
|
|
}}
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="cmdid" label="装置编号" width="150" sortable>
|
|
|
|
|
<el-table-column prop="cmdid" label="装置编号" width="150" sortable fixed>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="状态" width="72">
|
|
|
|
|
<el-table-column label="状态" width="72" fixed>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-tag
|
|
|
|
|
type="success"
|
|
|
|
@ -96,7 +129,13 @@
|
|
|
|
|
<el-tag type="danger" v-else>离线</el-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="运维" prop="in_maintain" width="100" sortable>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="运维"
|
|
|
|
|
prop="in_maintain"
|
|
|
|
|
width="100"
|
|
|
|
|
sortable
|
|
|
|
|
fixed
|
|
|
|
|
>
|
|
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
|
|
<p :class="ywNumber != 0 ? 'redClass' : 'noClass'">
|
|
|
|
|
{{ ywNumber }}<span> / {{ tableData.length }}</span>
|
|
|
|
@ -124,7 +163,13 @@
|
|
|
|
|
></el-checkbox>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="快心跳" prop="quick_hb" width="108" sortable>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="快心跳"
|
|
|
|
|
prop="quick_hb"
|
|
|
|
|
width="108"
|
|
|
|
|
sortable
|
|
|
|
|
fixed
|
|
|
|
|
>
|
|
|
|
|
<template slot="header" slot-scope="scope">
|
|
|
|
|
<p :class="kxtNumber != 0 ? 'redClass' : 'noClass'">
|
|
|
|
|
{{ kxtNumber }}<span> / {{ tableData.length }}</span>
|
|
|
|
@ -362,7 +407,7 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="SIM卡" v-if="simcheck" min-width="160" key="sim">
|
|
|
|
|
<el-table-column label="卡1" width="148" prop="simcard1">
|
|
|
|
|
<el-table-column label="卡1" width="158" prop="simcard1">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{
|
|
|
|
|
scope.row.raw_report.msgs.hasOwnProperty("simcard1")
|
|
|
|
@ -371,7 +416,7 @@
|
|
|
|
|
}}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="卡2" width="148" prop="simcard2">
|
|
|
|
|
<el-table-column label="卡2" width="158" prop="simcard2">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{
|
|
|
|
|
scope.row.raw_report.msgs.hasOwnProperty("simcard2")
|
|
|
|
@ -381,6 +426,22 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="磁盘剩余空间"
|
|
|
|
|
v-if="freecheck"
|
|
|
|
|
min-width="100"
|
|
|
|
|
key="free"
|
|
|
|
|
sortable
|
|
|
|
|
:sort-method="sortfreeNumbers"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{
|
|
|
|
|
scope.row.raw_report.msgs.hasOwnProperty("freeROM")
|
|
|
|
|
? scope.row.raw_report.msgs.freeROM
|
|
|
|
|
: ""
|
|
|
|
|
}}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="CMA服务器" v-if="cmacheck" width="160" key="cma">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{
|
|
|
|
@ -496,6 +557,9 @@
|
|
|
|
|
<el-checkbox v-model="simcheck" @change="saveLocalStorage"
|
|
|
|
|
>SIM卡</el-checkbox
|
|
|
|
|
>
|
|
|
|
|
<el-checkbox v-model="freecheck" @change="saveLocalStorage"
|
|
|
|
|
>磁盘剩余空间</el-checkbox
|
|
|
|
|
>
|
|
|
|
|
<el-checkbox v-model="cmacheck" @change="saveLocalStorage"
|
|
|
|
|
>CMA服务器</el-checkbox
|
|
|
|
|
>
|
|
|
|
@ -701,58 +765,11 @@
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 装置详细信息 -->
|
|
|
|
|
<rowMsgDialog ref="rowMsgDialogref"></rowMsgDialog>
|
|
|
|
|
<div class="taskMask">
|
|
|
|
|
<el-tooltip class="item" effect="dark" content="任务列表" placement="top">
|
|
|
|
|
<el-button
|
|
|
|
|
icon="el-icon-set-up"
|
|
|
|
|
type="primary"
|
|
|
|
|
round
|
|
|
|
|
@click="showTaskDraw"
|
|
|
|
|
>
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</div>
|
|
|
|
|
<el-drawer
|
|
|
|
|
class="taskDrawDialog"
|
|
|
|
|
title="待下发终端列表"
|
|
|
|
|
:visible.sync="taskdrawer"
|
|
|
|
|
direction="rtl"
|
|
|
|
|
>
|
|
|
|
|
<div class="commandList" v-if="leftCommand.length != 0">
|
|
|
|
|
<p class="comLi" v-for="(item, index) in leftCommand" :key="index">
|
|
|
|
|
<span class="indexClass">{{ index + 1 }}</span>
|
|
|
|
|
<span class="comMsg"
|
|
|
|
|
><b>时间:{{ item.createTime }}</b>
|
|
|
|
|
<b>设备ID:{{ item.cmdid }}</b>
|
|
|
|
|
<b v-if="item.cmd.fileName">apk版本:{{ item.cmd.fileName }}</b>
|
|
|
|
|
<b v-if="item.cmdDesc == ''">命令:{{ cmdCn[item.cmdName] }}</b
|
|
|
|
|
><b v-else>命令:{{ item.cmdDesc }}</b>
|
|
|
|
|
<b v-if="item.estimatedPublishTime * 1000 - newupdatatime > 0"
|
|
|
|
|
>命令预计拿走时间:
|
|
|
|
|
|
|
|
|
|
{{
|
|
|
|
|
$moment(item.estimatedPublishTime * 1000).format(
|
|
|
|
|
"MM-DD HH:mm:ss"
|
|
|
|
|
)
|
|
|
|
|
}}
|
|
|
|
|
{{ remainingTime(item) }}
|
|
|
|
|
</b>
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="commandList" v-else>
|
|
|
|
|
<p>暂无下发命令</p>
|
|
|
|
|
</div>
|
|
|
|
|
</el-drawer>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
getdoActionApi,
|
|
|
|
|
getqueryUpgradesApi,
|
|
|
|
|
getqueryCmdsApi,
|
|
|
|
|
} from "@/utils/api/index";
|
|
|
|
|
import { getdoActionApi, getqueryUpgradesApi } from "@/utils/api/index";
|
|
|
|
|
import rowMsgDialog from "./rowMsgDialog.vue";
|
|
|
|
|
import htmlToExcel from "@/utils/htmlToExcel";
|
|
|
|
|
import { saveAs } from "file-saver";
|
|
|
|
@ -785,7 +802,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return {
|
|
|
|
|
updateTime: null,
|
|
|
|
|
newupdatatime: null,
|
|
|
|
|
cmdCn: {
|
|
|
|
|
yw_cmd_android_reboot: "重启设备",
|
|
|
|
@ -819,6 +835,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
ywNumber: 0,
|
|
|
|
|
kxtNumber: 0,
|
|
|
|
|
freeNum: 0,
|
|
|
|
|
|
|
|
|
|
nowTime: new Date().getTime() / 1000,
|
|
|
|
|
gycheck: true,
|
|
|
|
@ -837,6 +854,7 @@ export default {
|
|
|
|
|
Cameracheck: false,
|
|
|
|
|
AIcheck: false,
|
|
|
|
|
MCUcheck: false,
|
|
|
|
|
freecheck: false,
|
|
|
|
|
//运维操作列表
|
|
|
|
|
operateOptions: [
|
|
|
|
|
{ id: 1, name: "重启设备" },
|
|
|
|
@ -981,31 +999,40 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
runCommand: [],
|
|
|
|
|
leftCommand: [],
|
|
|
|
|
newupdatatime: null,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.loadLocalStorage();
|
|
|
|
|
this.startCountdown(); // 在组件挂载后开始倒计时
|
|
|
|
|
//this.getNumber();
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// this.getNumber();
|
|
|
|
|
// });
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
tableData: {
|
|
|
|
|
handler(newVal) {
|
|
|
|
|
// 数据发生变化时的处理逻辑
|
|
|
|
|
console.log("数据已更新:", newVal);
|
|
|
|
|
|
|
|
|
|
this.getNumber();
|
|
|
|
|
this.startCountdown();
|
|
|
|
|
},
|
|
|
|
|
deep: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
methods: {
|
|
|
|
|
tableRowSetting({ row }) {
|
|
|
|
|
if (row.raw_report.msgs.hasOwnProperty("freeROM")) {
|
|
|
|
|
// console.log(row.raw_report.msgs.freeROM);
|
|
|
|
|
// console.log(parseInt(row.raw_report.msgs.freeROM));
|
|
|
|
|
if (parseInt(row.raw_report.msgs.freeROM) < 40) {
|
|
|
|
|
return "has-color";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 根据if条件定义到该行
|
|
|
|
|
// if (row.rank === 1) {
|
|
|
|
|
// return "has-color";
|
|
|
|
|
// }
|
|
|
|
|
// return "";
|
|
|
|
|
},
|
|
|
|
|
sortNumbers(a, b) {
|
|
|
|
|
return (
|
|
|
|
|
Number(a.raw_report.msgs.rebootTimes) -
|
|
|
|
@ -1040,6 +1067,12 @@ export default {
|
|
|
|
|
Number(b.raw_report.msgs.numberOfHb)
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
sortfreeNumbers(a, b) {
|
|
|
|
|
return (
|
|
|
|
|
parseInt(a.raw_report.msgs.freeROM) -
|
|
|
|
|
parseInt(b.raw_report.msgs.freeROM)
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
// sortSignature1(a, b) {
|
|
|
|
|
// return (
|
|
|
|
|
// Number(a.raw_report.msgs.signature1.split("/")[0]) -
|
|
|
|
@ -1079,6 +1112,11 @@ export default {
|
|
|
|
|
} else {
|
|
|
|
|
this.checkAllKXT = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.freeNum =
|
|
|
|
|
this.$refs.ywMultipleTable.$el.getElementsByClassName(
|
|
|
|
|
"has-color"
|
|
|
|
|
).length;
|
|
|
|
|
},
|
|
|
|
|
//导出表格
|
|
|
|
|
handleExport() {
|
|
|
|
@ -1237,6 +1275,7 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.$parent.fetchData();
|
|
|
|
|
switch (this.formIssue.operate) {
|
|
|
|
|
case 1:
|
|
|
|
|
console.log("重启");
|
|
|
|
@ -1446,6 +1485,7 @@ export default {
|
|
|
|
|
localStorage.setItem("Cameracheck", this.Cameracheck);
|
|
|
|
|
localStorage.setItem("AIcheck", this.AIcheck);
|
|
|
|
|
localStorage.setItem("MCUcheck", this.MCUcheck);
|
|
|
|
|
localStorage.setItem("freecheck", this.freecheck);
|
|
|
|
|
|
|
|
|
|
this.adjustTableHeight();
|
|
|
|
|
},
|
|
|
|
@ -1502,6 +1542,9 @@ export default {
|
|
|
|
|
this.MCUcheck = localStorage.getItem("MCUcheck")
|
|
|
|
|
? JSON.parse(localStorage.getItem("MCUcheck"))
|
|
|
|
|
: false;
|
|
|
|
|
this.freecheck = localStorage.getItem("freecheck")
|
|
|
|
|
? JSON.parse(localStorage.getItem("freecheck"))
|
|
|
|
|
: false;
|
|
|
|
|
|
|
|
|
|
console.log(
|
|
|
|
|
"规约:" + this.gycheck,
|
|
|
|
@ -1524,21 +1567,6 @@ export default {
|
|
|
|
|
this.$refs.ywMultipleTable.doLayout(); // 调用 el-table 的 doLayout 方法重新布局
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
showTaskDraw() {
|
|
|
|
|
this.taskdrawer = true;
|
|
|
|
|
this.getCmdList();
|
|
|
|
|
},
|
|
|
|
|
getCmdList() {
|
|
|
|
|
//this.leftComLoading = true;
|
|
|
|
|
getqueryCmdsApi({ p: 1, ps: 10000 })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.runCommand = res.data;
|
|
|
|
|
this.leftCommand = this.runCommand;
|
|
|
|
|
this.updateTime = new Date();
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
startCountdown() {
|
|
|
|
|
this.newupdatatime = new Date().getTime(); // 更新当前时间
|
|
|
|
|
// 清空之前可能存在的定时器
|
|
|
|
@ -1548,8 +1576,13 @@ export default {
|
|
|
|
|
// 开始倒计时,每秒执行一次remainingTime方法
|
|
|
|
|
this.intervalId = setInterval(() => {
|
|
|
|
|
this.newupdatatime = new Date().getTime(); // 更新当前时间
|
|
|
|
|
this.leftCommand.forEach((item) => {
|
|
|
|
|
this.remainingTime(item); // 重新计算每个项目的剩余时间
|
|
|
|
|
this.tableData.forEach((item) => {
|
|
|
|
|
//console.log(item);
|
|
|
|
|
if (item.list) {
|
|
|
|
|
this.remainingTime(item.list[0]);
|
|
|
|
|
}
|
|
|
|
|
// let params = item.list[0];
|
|
|
|
|
// this.remainingTime(params); // 重新计算每个项目的剩余时间
|
|
|
|
|
});
|
|
|
|
|
}, 1000); // 每秒执行一次
|
|
|
|
|
},
|
|
|
|
@ -1563,10 +1596,16 @@ export default {
|
|
|
|
|
const minutes = Math.floor(difference / 60000);
|
|
|
|
|
const seconds = Math.floor((difference % 60000) / 1000);
|
|
|
|
|
if (minutes == 0 && seconds == 0) {
|
|
|
|
|
this.getCmdList();
|
|
|
|
|
this.$parent.fetchData();
|
|
|
|
|
return `命令已下发`;
|
|
|
|
|
} else {
|
|
|
|
|
return ` 预估剩余:${minutes} 分钟 ${seconds} 秒`;
|
|
|
|
|
if (minutes < 10 && seconds < 10) {
|
|
|
|
|
return ` 0${minutes} : 0${seconds} `;
|
|
|
|
|
} else if (minutes < 10) {
|
|
|
|
|
return ` 0${minutes} : ${seconds} `;
|
|
|
|
|
} else {
|
|
|
|
|
return ` ${minutes} : ${seconds} `;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -1642,6 +1681,13 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.has-color {
|
|
|
|
|
background: #f5dab1;
|
|
|
|
|
}
|
|
|
|
|
.has-color td.el-table__cell {
|
|
|
|
|
background: #f5dab1 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-table--scrollable-y .el-table__body-wrapper {
|
|
|
|
|
height: calc(100% - 40px) !important;
|
|
|
|
|
}
|
|
|
|
@ -1827,6 +1873,13 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.redMlxf {
|
|
|
|
|
color: #f00;
|
|
|
|
|
b {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: normal;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.contenBoxMsg {
|
|
|
|
|
p {
|