ZZJ
2022-04-20 b4495445fbfc616a2126587ce9eec205fc1cbe19
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: {