优化运维

master
fanluyan 2 years ago
parent 011940e004
commit d8fe678fca

@ -211,8 +211,6 @@ export default {
},
//
submitUpload() {
// let arrList = "";
// arrList = [...this.activityForm.cmdidArr.trim().split("\n")];
if (this.activityForm.title == "") {
this.titleFlag = true;
return;
@ -232,6 +230,8 @@ export default {
.then((res) => {
console.log(res);
this.getactivityList();
this.activityForm.title = "";
this.activityForm.cmdidArr = "";
})
.catch((err) => {});
},

@ -57,6 +57,7 @@
</div>
</div>
<el-table
v-loading="tableLoaidng"
class="ywTableBox"
id="ywTable"
ref="ywMultipleTable"
@ -97,12 +98,19 @@
</el-table-column>
<el-table-column label="运维" prop="in_maintain" width="100" sortable>
<template slot="header" slot-scope="scope">
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAllYW"
@change="handlecheckAllYW"
>运维</el-checkbox
>
<span @click.stop>
<el-checkbox
v-model="checkAllYW"
@change="handlecheckAllYW"
:class="
(ywNumber == tableData.length && tableData.length != 0) ||
(ywNumber == 0 && tableData.length == 0)
? ''
: 'is-indeterminate'
"
></el-checkbox>
运维
</span>
</template>
<template slot-scope="scope">
<el-checkbox
@ -115,12 +123,19 @@
</el-table-column>
<el-table-column label="快心跳" prop="quick_hb" width="108" sortable>
<template slot="header" slot-scope="scope">
<el-checkbox
:indeterminate="isIndeterminate"
v-model="checkAllKXT"
@change="handlecheckAllKXT"
>快心跳</el-checkbox
>
<span @click.stop>
<el-checkbox
v-model="checkAllKXT"
@change="handlecheckAllKXT"
:class="
(kxtNumber == tableData.length && tableData.length != 0) ||
(kxtNumber == 0 && tableData.length == 0)
? ''
: 'is-indeterminate'
"
></el-checkbox>
快心跳
</span>
</template>
<template slot-scope="scope">
<el-checkbox
@ -429,42 +444,6 @@
}}
</template>
</el-table-column>
<!-- <el-table-column
label="版本"
min-width="120"
class-name="bbStyle"
v-if="bbcheck"
key="bb"
>
<template
slot-scope="scope"
v-if="
scope.row.raw_report.hasOwnProperty('msgs') &&
scope.row.raw_report.msgs.length !== 0
"
>
<el-tooltip placement="top" effect="light" :open-delay="600">
<div slot="content" class="contenBoxMsg">
<p><b>I1:</b>{{ scope.row.raw_report.msgs.i1Version }}</p>
<p><b>运维:</b>{{ scope.row.raw_report.msgs.maintainVersion }}</p>
<p><b>Camera:</b>{{ scope.row.raw_report.msgs.cameraService }}</p>
<p><b>AI:</b>{{ scope.row.raw_report.msgs.aiVersion }}</p>
<p><b>MCU:</b>{{ scope.row.raw_report.msgs.mcu }}</p>
</div>
<p>
<b>I1:</b>{{ scope.row.raw_report.msgs.i1Version }}<b>运维:</b
>{{ scope.row.raw_report.msgs.maintainVersion }}<b>Camera:</b
>{{ scope.row.raw_report.msgs.cameraService }}<b>AI:</b
>{{ scope.row.raw_report.msgs.aiVersion }}<b>MCU:</b
>{{ scope.row.raw_report.msgs.mcu }}
</p>
</el-tooltip>
</template>
</el-table-column> -->
</el-table>
<el-drawer
class="drawerBox"
@ -719,7 +698,7 @@ import htmlToExcel from "@/utils/htmlToExcel";
import { saveAs } from "file-saver";
import XLSX from "xlsx";
export default {
props: ["tableData", "onlineNum", "offlineNum", "noPicNum"],
props: ["tableData", "onlineNum", "offlineNum", "noPicNum", "tableLoaidng"],
components: {
rowMsgDialog,
},
@ -759,7 +738,7 @@ export default {
65290: "河南统一视频v2020",
},
multipleSelection: [],
isIndeterminate: false,
checkAllYW: false,
checkAllKXT: false,
@ -931,6 +910,7 @@ export default {
},
mounted() {
this.loadLocalStorage();
//this.getNumber();
// this.$nextTick(() => {
// this.getNumber();
// });
@ -999,11 +979,27 @@ export default {
this.ywNumber = this.tableData.filter(
(item) => item.in_maintain == 1
).length;
this.kxtNumber = this.tableData.filter(
(item) => item.quick_hb == 1
).length;
console.log("我这里是运维和快心跳的数据");
console.log(this.ywNumber, this.kxtNumber);
if (
this.ywNumber == this.tableData.length &&
this.tableData.length !== 0
) {
this.checkAllYW = true;
} else {
this.checkAllYW = false;
}
if (
this.kxtNumber == this.tableData.length &&
this.tableData.length !== 0
) {
this.checkAllKXT = true;
} else {
this.checkAllKXT = false;
}
},
//
handleExport() {
@ -1029,53 +1025,51 @@ export default {
this.$refs.rowMsgDialogref.display(val);
},
handlecheckAllYW(val) {
let totalCount = this.tableData.length;
let someStatusCount = 0;
console.log(val);
if (val) {
console.log("选中");
this.tableData.forEach((item) => {
item.in_maintain = 1;
console.log(item);
getdoActionApi({
act: "mntn",
termId: item.id,
mntn: 1,
console.log("我全选了了运维了");
console.log(this.tableData);
this.termidsArray = [];
for (let i = 0; i < this.tableData.length; i++) {
this.termidsArray.push(this.tableData[i].id);
}
this.termidsArray = [...new Set(this.termidsArray)];
console.log(this.termidsArray);
getdoActionApi({
act: "mntn",
termIds: this.termidsArray.join("-"),
mntn: 1,
})
.then((res) => {
console.log(res);
this.$parent.onSubmit();
})
.then((res) => {
console.log(res);
})
.catch((err) => {});
});
.catch((err) => {});
} else {
console.log("取消选中");
this.tableData.forEach((item) => {
item.in_maintain = 0;
someStatusCount = 0;
console.log(item);
getdoActionApi({
act: "mntn",
termId: item.id,
mntn: 0,
console.log("我取消了运维全选了");
console.log(this.tableData);
this.termidsArray = [];
for (let i = 0; i < this.tableData.length; i++) {
this.termidsArray.push(this.tableData[i].id);
}
this.termidsArray = [...new Set(this.termidsArray)];
console.log(this.termidsArray);
getdoActionApi({
act: "mntn",
termIds: this.termidsArray.join("-"),
mntn: 0,
})
.then((res) => {
console.log(res);
this.$parent.onSubmit();
})
.then((res) => {
console.log(res);
})
.catch((err) => {});
});
.catch((err) => {});
}
localStorage.setItem("checkAllYW", this.checkAllYW);
this.checkAllYW = totalCount == this.ywNumber ? true : false;
console.log(this.checkAllYW);
this.isIndeterminate = this.ywNumber > 0 && this.ywNumber < totalCount;
// this.isIndeterminate = false;
},
//
UpdateMaintainMode(val, row) {
console.log("运维");
console.log(val, row);
getdoActionApi({
act: "mntn",
termId: row.id,
@ -1088,48 +1082,46 @@ export default {
},
//
handlecheckAllKXT(val) {
let totalCount = this.tableData.length;
let someStatusCount = 0;
console.log(val);
if (val) {
console.log("选中");
this.tableData.forEach((item) => {
item.quick_hb = 1;
someStatusCount++;
console.log(item);
getdoActionApi({
act: "quickhb",
termId: item.id,
quickhb: 1,
console.log("我全选了快心跳了");
console.log(this.tableData);
this.termidsArray = [];
for (let i = 0; i < this.tableData.length; i++) {
this.termidsArray.push(this.tableData[i].id);
}
this.termidsArray = [...new Set(this.termidsArray)];
console.log(this.termidsArray);
getdoActionApi({
act: "quickhb",
termIds: this.termidsArray.join("-"),
quickhb: 1,
})
.then((res) => {
console.log(res);
this.$parent.onSubmit();
})
.then((res) => {
console.log(res);
})
.catch((err) => {});
});
.catch((err) => {});
} else {
console.log("取消选中");
this.tableData.forEach((item) => {
item.quick_hb = 0;
someStatusCount = 0;
console.log(item);
getdoActionApi({
act: "quickhb",
termId: item.id,
quickhb: 0,
console.log("我取消了运维全选了");
console.log(this.tableData);
this.termidsArray = [];
for (let i = 0; i < this.tableData.length; i++) {
this.termidsArray.push(this.tableData[i].id);
}
this.termidsArray = [...new Set(this.termidsArray)];
console.log(this.termidsArray);
getdoActionApi({
act: "quickhb",
termIds: this.termidsArray.join("-"),
quickhb: 0,
})
.then((res) => {
console.log(res);
this.$parent.onSubmit();
})
.then((res) => {
console.log(res);
})
.catch((err) => {});
});
.catch((err) => {});
}
localStorage.setItem("checkAllKXT", this.checkAllKXT);
this.checkAllKXT = totalCount === this.kxtNumber ? true : false;
this.isIndeterminate = this.kxtNumber > 0 && this.kxtNumber < totalCount;
// this.isIndeterminate = false;
},
//
UpdateQuickHbMode(val, row) {
@ -1565,7 +1557,7 @@ export default {
.el-table .caret-wrapper {
height: 24px;
width: 10px;
margin-left: 8px;
margin-left: 4px;
}
.el-table .sort-caret.ascending {
@ -1584,7 +1576,22 @@ export default {
.el-table .descending .sort-caret.descending {
border-top-color: #169e8c;
}
//
.is-indeterminate .el-checkbox__input .el-checkbox__inner {
background-color: #169e8c;
border-color: #169e8c;
}
.is-indeterminate .el-checkbox__input .el-checkbox__inner:before {
content: "";
position: absolute;
display: block;
background-color: #fff;
height: 2px;
transform: scale(0.5);
left: 0;
right: 0;
top: 5px;
}
.drawerBox {
.el-drawer {
width: 240px !important;

@ -190,7 +190,7 @@
:onlineNum="onlineNum"
:offlineNum="offlineNum"
:noPicNum="noPicNum"
v-loading="tableLoaidng"
:tableLoaidng="tableLoaidng"
></tableMain>
</div>
</div>
@ -244,9 +244,9 @@ export default {
], //
dataList: [],
tableLoaidng: true,
onlineNum: "", //线
offlineNum: "", //线
noPicNum: "", //
onlineNum: 0, //线
offlineNum: 0, //线
noPicNum: 0, //
intervalId: null, // ID
};
},

Loading…
Cancel
Save