From b200eed05d5bff2e12a45331bdc062f4b00bebf7 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期四, 28 七月 2022 10:20:51 +0800
Subject: [PATCH] 列表样式
---
src/views/hashrate/HashManage/components/EquipmentForm.vue | 43 +++++++++++++++++++++++--------------------
1 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/src/views/hashrate/HashManage/components/EquipmentForm.vue b/src/views/hashrate/HashManage/components/EquipmentForm.vue
index 5522d29..bbf7174 100644
--- a/src/views/hashrate/HashManage/components/EquipmentForm.vue
+++ b/src/views/hashrate/HashManage/components/EquipmentForm.vue
@@ -83,10 +83,10 @@
</el-table-column>
<el-table-column label="瀹炴椂/杞" align="center" width="100px">
<template slot-scope="scope">
- <span v-if="scope.row.runType === -1">-</span>
+ <span v-if="scope.row.runType == -1">-</span>
<toggle-button
v-else
- :value="scope.row.runType === 1"
+ :value="scope.row.runType == 1"
:width="60"
:labels="{ checked: '瀹炴椂', unchecked: '杞' }"
:color="{
@@ -126,6 +126,8 @@
<script>
import SettingBox from "./SettingBox";
import { getCameraByPage } from "@/api/clusterManage";
+import { changeRunType } from "@/api/pollConfig";
+
export default {
props: {
id: {},
@@ -185,25 +187,26 @@
this.$emit("hiddenList");
},
pollSwitch(row) {
- changeRunType({ camera_ids: [row.id], run_type: row.run_type ^ 1 }).then(
- (rsp) => {
- if (rsp && rsp.success) {
- this.$notify({
- type: "success",
- message: "閰嶇疆鎴愬姛",
- });
-
- row.run_type = row.run_type ^ 1;
- } else {
- this.$notify({
- type: "error",
- message: "閰嶇疆澶辫触",
- });
- }
-
- // this.PollData.fetchPollList();
+ row.runType = row.runType ^ 1;
+ changeRunType({
+ camera_ids: [row.id],
+ run_type: row.runType ^ 1,
+ clusterId: row.clusterId,
+ }).then((rsp) => {
+ if (rsp && rsp.success) {
+ this.$notify({
+ type: "success",
+ message: "閰嶇疆鎴愬姛",
+ });
+ } else {
+ this.$notify({
+ type: "error",
+ message: "閰嶇疆澶辫触",
+ });
}
- );
+
+ // this.PollData.fetchPollList();
+ });
},
},
filters: {
--
Gitblit v1.8.0