| | |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | notice: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | }, |
| | | computed: { |
| | | title() { |
| | |
| | | option: { key_r, index, option }, |
| | | } = this; |
| | | // 通过index获得它在flag数组中的index |
| | | if (index!=undefined) { |
| | | if (index != undefined) { |
| | | let propIdx = Math.floor(index / 25); |
| | | let prop_key_r = key_r[propIdx]; |
| | | let _key_r = datas[prop_key_r]; |
| | |
| | | setModeControl(params) |
| | | .then((res) => { |
| | | let { code, data, msg } = res.data; |
| | | if (code && data && this.notice) { |
| | | this.$notify({ |
| | | title: "注意", |
| | | message: |
| | | "监控管理模式已被置为'手动'模式, 若需要切换需要手动操作", |
| | | type: "warning", |
| | | }); |
| | | } |
| | | this.$layer.close(loading); |
| | | this.$message(msg); |
| | | }) |
| | |
| | | > |
| | | <template v-slot="{ data, index }"> |
| | | <card-module |
| | | notice |
| | | :ref="'module_states_' + index" |
| | | :option="data[index]" |
| | | :datas="rtData" |
| | |
| | | const other_control = [ |
| | | { |
| | | label: "系统均浮充状态", |
| | | key_r: 'junFloatStateReal', |
| | | key_w: 'battChrstate', |
| | | flag: 'battChrstateFlag', |
| | | key_r: "junFloatStateReal", |
| | | key_w: "battChrstate", |
| | | flag: "battChrstateFlag", |
| | | option: ["浮充", "均充"], |
| | | }, |
| | | { |
| | | label: "监控管理模式", |
| | | key_r: "monitorMode", |
| | | key_w: "monitorMode", |
| | | flag: "monitorModeFlag", |
| | | option: ["自动", "手动"], |
| | | }, |
| | | // { |
| | | // label: "电池组测试", |
| | |
| | | setModeControl(params) |
| | | .then((res) => { |
| | | let { code, data, msg } = res.data; |
| | | if (code && data) { |
| | | // 提示用户需要手动切换状态 |
| | | this.showNotice(); |
| | | } |
| | | this.$layer.close(loading); |
| | | this.$message(msg); |
| | | }) |
| | |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | showNotice() { |
| | | this.$notify({ |
| | | title: "注意", |
| | | message: "监控管理模式已被置为'手动'模式, 若需要切换需要手动操作", |
| | | type: 'warning' |
| | | }); |
| | | }, |
| | | batchModule(state) { |
| | | let title = "是否批量修改模块开关机状态"; |
| | |
| | | let propIdx = Math.floor(index / 25); |
| | | let prop_key_w = key_w[propIdx]; |
| | | let prop_flag = flag[propIdx]; |
| | | |
| | | |
| | | params[prop_key_w] = setBitAtPositions( |
| | | 0, |
| | | v.indexs.map((vv) => vv % 25), |
| | |
| | | setModeControl(params) |
| | | .then((res) => { |
| | | let { code, data, msg } = res.data; |
| | | if (code && data) { |
| | | this.showNotice(); |
| | | } |
| | | this.$layer.close(loading); |
| | | this.$message(msg); |
| | | }) |