diff --git a/src/utils/api/index.js b/src/utils/api/index.js
index f9489a4..84f477c 100644
--- a/src/utils/api/index.js
+++ b/src/utils/api/index.js
@@ -28,6 +28,30 @@ export function getqueryTermsApi(data) {
},
});
}
+//获取规约
+
+export function getqueryProtocolApi(data) {
+ return request({
+ url: "api/queryProtocol.php",
+ method: "get",
+ params: data,
+ headers: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ },
+ });
+}
+//获取活动列表
+
+export function getqueryActivityApi(data) {
+ return request({
+ url: "api/queryActivity.php",
+ method: "get",
+ params: data,
+ headers: {
+ "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
+ },
+ });
+}
//运维,快心跳
export function getdoActionApi(data) {
return request({
diff --git a/src/views/homePage/components/tableMain.vue b/src/views/homePage/components/tableMain.vue
index 325fddd..4ccc36e 100644
--- a/src/views/homePage/components/tableMain.vue
+++ b/src/views/homePage/components/tableMain.vue
@@ -25,6 +25,12 @@
multipleSelection.length
}}
+ 运维:{{ ywNumber }}
+ 快心跳:{{ kxtNumber }}
在线:{{ onlineNum }}
@@ -89,7 +95,15 @@
离线
-
+
+
+ 运维
+
-
+
+
+ 快心跳
+
-
+
{{
scope.row.raw_report.hasOwnProperty("msgs")
@@ -610,6 +632,12 @@ export default {
65290: "河南统一视频v2020",
},
multipleSelection: [],
+ isIndeterminate: false,
+ checkAllYW: false,
+ checkAllKXT: false,
+
+ ywNumber: 0,
+ kxtNumber: 0,
nowTime: new Date().getTime() / 1000,
gycheck: false,
@@ -771,18 +799,34 @@ export default {
},
mounted() {
this.loadLocalStorage();
+ // this.$nextTick(() => {
+ // this.getNumber();
+ // });
},
watch: {
tableData: {
handler(newVal) {
// 数据发生变化时的处理逻辑
console.log("数据已更新:", newVal);
+ this.getNumber();
},
deep: true,
},
},
methods: {
+ //获取运维勾选和快心跳勾选个数
+ getNumber() {
+ console.log(this.tableData);
+ this.ywNumber = this.tableData.filter(
+ (item) => item.in_maintain == 1
+ ).length;
+
+ this.kxtNumber = this.tableData.filter(
+ (item) => item.quick_hb == 1
+ ).length;
+ console.log(this.ywNumber, this.kxtNumber);
+ },
//导出表格
handleExport() {
htmlToExcel.getExcel("#ywTable", "设备运维信息");
@@ -806,7 +850,50 @@ export default {
console.log(val);
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,
+ })
+ .then((res) => {
+ console.log(res);
+ })
+ .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,
+ })
+ .then((res) => {
+ console.log(res);
+ })
+ .catch((err) => {});
+ });
+ }
+
+ localStorage.setItem("checkAllYW", this.checkAllYW);
+ this.checkAllYW = totalCount === this.ywNumber ? true : false;
+ this.isIndeterminate = this.ywNumber > 0 && this.ywNumber < totalCount;
+ // this.isIndeterminate = false;
+ },
//运维
UpdateMaintainMode(val, row) {
console.log("运维");
@@ -821,6 +908,51 @@ export default {
.catch((err) => {});
},
//快心跳
+ 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,
+ })
+ .then((res) => {
+ console.log(res);
+ })
+ .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,
+ })
+ .then((res) => {
+ console.log(res);
+ })
+ .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) {
console.log("快心跳");
getdoActionApi({
@@ -888,7 +1020,7 @@ export default {
console.log("上传日志");
var params = {
act: "upload-logs",
- url: "http://180.166.218.222:40102/upload/",
+ url: "http://180.166.218.222:40101/upload/",
termIds: this.idArray.join("-"),
};
this.changeIssue(params);
@@ -1062,6 +1194,12 @@ export default {
localStorage.setItem("bbcheck", this.bbcheck);
},
loadLocalStorage() {
+ this.checkAllKXT = localStorage.getItem("checkAllKXT", this.checkAllKXT)
+ ? JSON.parse(localStorage.getItem("checkAllKXT"))
+ : false;
+ this.checkAllYW = localStorage.getItem("checkAllYW", this.checkAllYW)
+ ? JSON.parse(localStorage.getItem("checkAllYW"))
+ : false;
this.gycheck = localStorage.getItem("gycheck")
? JSON.parse(localStorage.getItem("gycheck"))
: false;
@@ -1141,6 +1279,9 @@ export default {
.el-table__cell {
text-align: center;
+ .cell {
+ padding: 0px;
+ }
}
.bbStyle {
text-align: left;
diff --git a/src/views/homePage/index.vue b/src/views/homePage/index.vue
index 70cd60a..79a31fa 100644
--- a/src/views/homePage/index.vue
+++ b/src/views/homePage/index.vue
@@ -44,6 +44,36 @@
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -153,7 +183,7 @@