| | |
| | | screenTitleBg: null, |
| | | screenBg: null, |
| | | isHeader: true, |
| | | isNow: true |
| | | isNow: true, |
| | | state: 1, |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.$route.query.userId) { |
| | | localStorage.setItem('userId', this.$route.query.userId); |
| | | } |
| | | if (this.$route.query.newPlatform) { |
| | | sessionStorage.setItem('newPlatform', this.$route.query.newPlatform); |
| | | } |
| | | this.nowlayOut.appName = this.$route.query.name; |
| | | if (this.$route.query.head && this.$route.query.head == 1) { |
| | | this.isHeader = false |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | |
| | | // 加载布局数据 |
| | | loadLayout() { |
| | | let sendData = { |
| | |
| | | nowBox[0].appendChild(chartModular.$el) |
| | | this.modularArr.push(chartModular); |
| | | } |
| | | chartModular.setData(); |
| | | if (chartModular.id == "chart14") { |
| | | this.$nextTick(() => { |
| | | chartModular.$children[0].setData() |
| | | }) |
| | | } else { |
| | | chartModular.setData(); |
| | | } |
| | | chartModular.resize(); |
| | | }, 0) |
| | | |
| | | }) |
| | | |
| | | window.addEventListener("message", (msg) => { |
| | | // 处理数据 |
| | | this.state = msg.data.state |
| | | if (this.state == 1) { |
| | | this.modularArr.map(item => { |
| | | if (item.postData) { |
| | | item.postData() |
| | | } |
| | | }) |
| | | } else if (this.state == 0) { |
| | | this.modularArr.map(item => { |
| | | if (item.outClear) { |
| | | item.outClear() |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |