| | |
| | | v-model="breakerAddr" |
| | | class="dark" |
| | | size="mini" |
| | | @change="getList" |
| | | @change="resetBreakerName" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option label="全部" value=""></el-option> |
| | |
| | | v-for="(item, idx) in breakerAddrList" |
| | | :key="'type_' + idx" |
| | | :label="item" |
| | | :value="idx" |
| | | :value="item" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | |
| | | v-for="(item, idx) in breakerNameList" |
| | | :key="'level_' + idx" |
| | | :label="item" |
| | | :value="idx" |
| | | :value="item" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | |
| | | import Panel from "@/components/panel.vue"; |
| | | import gradientBtn from "@/components/gradientBtn.vue"; |
| | | |
| | | |
| | | import { getList } from "./js/apis"; |
| | | import { |
| | | getBreakerAddr, |
| | | getBreakerType, |
| | | getBreakerName, |
| | | getBreakerNamesInGroup, |
| | | } from "@/views/devManager/js/apis"; |
| | | export default { |
| | | name: "", |
| | |
| | | date1: "", |
| | | date2: "", |
| | | breakerAddrList: [], |
| | | breakerNameList: [], |
| | | breakerNameListObj: {}, |
| | | // breakerNameList: [], |
| | | total: 0, |
| | | table: { |
| | | headers: [ |
| | |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | breakerNameList() { |
| | | let obj = this.breakerNameListObj; |
| | | return obj[this.breakerAddr || 'All'] || []; |
| | | } |
| | | }, |
| | | methods: { |
| | | getBreakerName() { |
| | | getBreakerName() |
| | | .then((res) => { |
| | | let list = []; |
| | | let { code, data, data2 } = res.data; |
| | | if (code && data) { |
| | | list = data2; |
| | | } |
| | | this.breakerNameList = list; |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | }); |
| | | // getBreakerName() { |
| | | // getBreakerName() |
| | | // .then((res) => { |
| | | // let list = []; |
| | | // let { code, data, data2 } = res.data; |
| | | // if (code && data) { |
| | | // list = data2; |
| | | // } |
| | | // this.breakerNameList = list; |
| | | // }) |
| | | // .catch((err) => { |
| | | // console.log(err); |
| | | // }); |
| | | // }, |
| | | resetBreakerName() { |
| | | if (this.breakerNameList.indexOf(this.breakerName) < 0) { |
| | | this.breakerName = ""; |
| | | } |
| | | this.getList(); |
| | | }, |
| | | getBreakerAddr() { |
| | | getBreakerAddr() |
| | |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | details() { |
| | | this.$router.push("/data-record/disjunctor-details"); |
| | | details(record) { |
| | | let { breakerId, scope: breakerAddr, createDay: date } = record; |
| | | this.$router.push({ |
| | | path: "/data-record/disjunctor-details", |
| | | query: { |
| | | breakerId, |
| | | date, |
| | | breakerAddr, |
| | | pageFlag: Math.random() |
| | | }, |
| | | }); |
| | | }, |
| | | getList() { |
| | | let params = { |
| | | pageNum: this.pageNum, |
| | | pageSize: this.pageSize, |
| | | // devType: this.devType, |
| | | // almStartTime: this.date1 |
| | | // ? this.date1 + " 00:00:00" |
| | | // : "2023-01-01 00:00:00", |
| | | // almStartTime1: this.date2 |
| | | // ? this.date2 + " 23:59:59" |
| | | // : new Date().format("yyyy-MM-dd hh:mm:ss"), |
| | | // almLevel: this.almLevel, |
| | | number: this.breakerName || undefined, |
| | | scope: this.breakerAddr || undefined, |
| | | startTime: this.date1 || undefined, |
| | | endTime: this.date2 || undefined, |
| | | }; |
| | | console.log("=====9=", params, JSON.stringify(params)); |
| | | // this.SOCKET1.send(JSON.stringify(params)); |
| | |
| | | let total1 = 0; |
| | | if (code) { |
| | | list1 = list.map((v) => { |
| | | v.operateType = v.status ? '合闸' : '分闸'; |
| | | v.operateType = v.status ? "合闸" : "分闸"; |
| | | return v; |
| | | }); |
| | | total1 = total; |
| | |
| | | this.pageNum = val; |
| | | this.getList(); |
| | | }, |
| | | getBreakerNamesInGroup() { |
| | | getBreakerNamesInGroup() |
| | | .then((res) => { |
| | | let obj = { All: [] }; |
| | | let { code, data, data2 } = res.data; |
| | | if (code && data) { |
| | | // console.log(data); |
| | | Object.keys(data2) |
| | | .sort() |
| | | .forEach((v) => { |
| | | const list = data2[v].map((vv) => vv.breakerName); |
| | | obj[v] = list; |
| | | obj['All'].push(...list); |
| | | }); |
| | | } |
| | | this.breakerNameListObj = obj; |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | }, |
| | | |
| | | mounted() { |
| | | this.getBreakerAddr(); |
| | | this.getBreakerName(); |
| | | // this.getBreakerName(); |
| | | this.getBreakerNamesInGroup(); |
| | | this.getList(); |
| | | }, |
| | | }; |
| | |
| | | font-weight: bold; |
| | | padding: 0 6px; |
| | | border: 0 none; |
| | | /deep/ span { |
| | | :deep(span) { |
| | | display: flex; |
| | | color: inherit; |
| | | justify-content: space-between; |
| | |
| | | .p-content { |
| | | flex: 1; |
| | | margin-top: 4px; |
| | | /deep/ .content { |
| | | :deep(.content) { |
| | | background: #011f39; |
| | | } |
| | | .panel-content { |
| | |
| | | } |
| | | } |
| | | |
| | | /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner { |
| | | :deep(.el-checkbox__input.is-disabled.is-checked) .el-checkbox__inner { |
| | | background-color: #2155ff; |
| | | } |
| | | } |