| | |
| | | </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="{ |
| | |
| | | <script> |
| | | import SettingBox from "./SettingBox"; |
| | | import { getCameraByPage } from "@/api/clusterManage"; |
| | | import { changeRunType } from "@/api/pollConfig"; |
| | | |
| | | export default { |
| | | props: { |
| | | id: {}, |
| | |
| | | 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: { |