From a355aafef5a635bd31a701127cea097338cee0a7 Mon Sep 17 00:00:00 2001 From: whyczyk <525500596@qq.com> Date: 星期三, 13 十月 2021 14:55:22 +0800 Subject: [PATCH] 图形跳转对应参数界面功能 --- src/components/charts/AcInputWarp.vue | 42 ++++++++++++++++++++++++++---------------- 1 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/components/charts/AcInputWarp.vue b/src/components/charts/AcInputWarp.vue index b61e281..03a003e 100644 --- a/src/components/charts/AcInputWarp.vue +++ b/src/components/charts/AcInputWarp.vue @@ -1,15 +1,15 @@ <template> - <div class="chartCon" @click="toParentPage"> - <div class="chartItem"> + <div class="chartCon"> + <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> @@ -18,6 +18,7 @@ <script> import AcInput from './AcInput.vue' import { WebSocketClass } from '@/assets/js/socket' +import { checkboxs } from '@/assets/js/powerInfoData' export default { components: { AcInput @@ -31,18 +32,27 @@ }, methods: { - toParentPage() { - window.parent.parent.postMessage({ - cmd: "syncPage", - params: { - pageInfo: { - label: "鐢垫簮瀹炴椂鍛婅", - name: "powerRealtimeInfo", - src: "#/powerRealtimeInfo", - closable: true - }, + 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(() => { -- Gitblit v1.9.1