优化运维

master
fanluyan 2 years ago
parent 011940e004
commit d8fe678fca

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

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

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

Loading…
Cancel
Save