| | |
| | | <template> |
| | | <div class="chartCon" @click="toParentPage"> |
| | | <div class="chartItem"> |
| | | <div class="chartCon" @dblclick="dblclick"> |
| | | <div class="chartItem" @click="clickItem('熔丝告警')"> |
| | | <ac-input id="AcInput0" ref="AcInput0"></ac-input> |
| | | </div> |
| | | <div class="chartItem"> |
| | | <div class="chartItem" @click="clickItem('跳闸')"> |
| | | <ac-input id="AcInput1" ref="AcInput1"></ac-input> |
| | | </div> |
| | | <div class="chartItem"> |
| | | <div class="chartItem" @click="clickItem('频率异常')"> |
| | | <ac-input id="AcInput2" ref="AcInput2"></ac-input> |
| | | </div> |
| | | <div class="chartItem"> |
| | | <div class="chartItem" @click="clickItem('三相不平衡')"> |
| | | <ac-input id="AcInput3" ref="AcInput3"></ac-input> |
| | | </div> |
| | | </div> |
| | |
| | | <script> |
| | | import AcInput from './AcInput.vue' |
| | | import { WebSocketClass } from '@/assets/js/socket' |
| | | import { checkboxs } from '@/assets/js/powerInfoData' |
| | | export default { |
| | | components: { |
| | | AcInput |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | toParentPage() { |
| | | window.parent.parent.postMessage({ |
| | | cmd: "syncPage", |
| | | params: { |
| | | pageInfo: { |
| | | label: "电源实时告警", |
| | | name: "powerRealtimeInfo", |
| | | src: "#/powerRealtimeInfo", |
| | | closable: true |
| | | }, |
| | | findParents(node, select) { |
| | | var parent = node.parentNode; |
| | | if (parent === null || parent.className.indexOf(select) != -1) { |
| | | return parent; |
| | | } else { |
| | | return this.findParents(parent, select); |
| | | } |
| | | }, |
| | | dblclick(e) { |
| | | this.isAllScreen = !this.isAllScreen |
| | | let parents = this.findParents(e.currentTarget, 'vdr') |
| | | if (this.isAllScreen) { |
| | | this.parentsStyle = JSON.parse(JSON.stringify(parents.style)); |
| | | parents.style.transform = 'none'; |
| | | parents.style.width = '100%'; |
| | | parents.style.height = '100%'; |
| | | parents.style.position = 'fixed'; |
| | | parents.style.left = 0; |
| | | parents.style.right = 0; |
| | | parents.style.bottom = 0; |
| | | parents.style.top = 0; |
| | | parents.style.zIndex = 99999; |
| | | } else { |
| | | parents.style.transform = this.parentsStyle.transform; |
| | | parents.style.width = this.parentsStyle.width; |
| | | parents.style.height = this.parentsStyle.height; |
| | | parents.style.position = this.parentsStyle.position; |
| | | parents.style.left = 'initial'; |
| | | parents.style.right = 'initial'; |
| | | parents.style.bottom = 'initial'; |
| | | parents.style.top = 'initial'; |
| | | parents.style.zIndex = 'auto'; |
| | | } |
| | | this.$refs.AcInput0.resize(); |
| | | this.$refs.AcInput1.resize(); |
| | | this.$refs.AcInput2.resize(); |
| | | this.$refs.AcInput3.resize(); |
| | | }, |
| | | toParentPage(value) { |
| | | if (typeof (value) == 'string') { |
| | | window.parent.parent.postMessage({ |
| | | cmd: "syncPage", |
| | | params: { |
| | | pageInfo: { |
| | | label: "电源实时告警", |
| | | name: "powerRealtimeInfo", |
| | | src: '#/powerRealtimeInfo/?alarmType=' + value, |
| | | closable: true |
| | | }, |
| | | } |
| | | }, "*"); |
| | | } |
| | | }, |
| | | clickItem(name) { |
| | | checkboxs.jlsr.map(item => { |
| | | if (item.label == name) { |
| | | this.toParentPage(item.value) |
| | | } |
| | | }, "*"); |
| | | }) |
| | | }, |
| | | setData(data) { |
| | | this.$nextTick(() => { |