|
@@ -1,34 +1,70 @@
|
|
|
<template>
|
|
|
<view class="app-container">
|
|
|
- <view v-if="iframeloading" class="loadding-box" :style="{
|
|
|
- height: wvHeight + 'px',
|
|
|
- width: wvWidth + 'px',
|
|
|
- marginTop: wvTop + 'px',
|
|
|
- border: 'none'
|
|
|
- }">
|
|
|
- <u-loading-icon></u-loading-icon>
|
|
|
+ <view
|
|
|
+ v-if="iframeloading"
|
|
|
+ class="loadding-box"
|
|
|
+ :style="{
|
|
|
+ height: wvHeight + 'px',
|
|
|
+ width: wvWidth + 'px',
|
|
|
+ marginTop: wvTop + 'px',
|
|
|
+ border: 'none',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <!-- <u-loading-icon></u-loading-icon> -->
|
|
|
</view>
|
|
|
- <iframe v-if="PageCur == 'tun2D'" ref="iframe" src="http://182.92.126.35:8098/" @load="viewLoad" :style="{
|
|
|
- height: wvHeight + 'px',
|
|
|
- width: wvWidth + 'px',
|
|
|
- marginTop: wvTop + 'px',
|
|
|
- border: 'none',
|
|
|
- background: '#000',
|
|
|
- }"></iframe>
|
|
|
- <Device v-if="PageCur == 'device'" :style="{ marginTop: wvTop + 20 + 'px' }"></Device>
|
|
|
+ <iframe
|
|
|
+ v-if="PageCur == 'tun2D'"
|
|
|
+ ref="iframe"
|
|
|
+ src="http://182.92.126.35:8098/"
|
|
|
+ @load="viewLoad"
|
|
|
+ :style="{
|
|
|
+ height: wvHeight + 'px',
|
|
|
+ width: wvWidth + 'px',
|
|
|
+ marginTop: wvTop + 'px',
|
|
|
+ border: 'none',
|
|
|
+ background: '#000',
|
|
|
+ }"
|
|
|
+ ></iframe>
|
|
|
+ <Device
|
|
|
+ v-if="PageCur == 'device'"
|
|
|
+ :style="{ marginTop: wvTop + 20 + 'px' }"
|
|
|
+ ></Device>
|
|
|
<filecenter :cur="PageCur" v-if="PageCur == 'filecenter'"></filecenter>
|
|
|
<warndata v-if="PageCur == 'warndata'" :cur="PageCur"></warndata>
|
|
|
<gasreport :cur="PageCur" v-if="PageCur == 'gasreport'"></gasreport>
|
|
|
<user :cur="PageCur" v-if="PageCur == 'user'"></user>
|
|
|
- <u-tabbar :value="PageCur" @change="NavChange" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true">
|
|
|
- <u-tabbar-item v-for="(item, index) in permission " :key="index" :text="item.meta.title" :name="item.component"
|
|
|
- :icon="index = 0 ? 'list-dot' : index == 1 ? 'calendar' : index == 2 ? 'plus-circle' : index == 3 ? 'file-text' : index == 4 ? 'bell' : 'list-dot'"></u-tabbar-item>
|
|
|
- <!-- <u-tabbar-item
|
|
|
+ <u-tabbar
|
|
|
+ :value="PageCur"
|
|
|
+ @change="NavChange"
|
|
|
+ :fixed="true"
|
|
|
+ :placeholder="true"
|
|
|
+ :safeAreaInsetBottom="true"
|
|
|
+ >
|
|
|
+ <u-tabbar-item
|
|
|
+ v-for="(item, index) in permission"
|
|
|
+ :key="index"
|
|
|
+ :text="item.meta.title"
|
|
|
+ :name="item.component"
|
|
|
+ :icon="
|
|
|
+ (index = 0
|
|
|
+ ? 'list-dot'
|
|
|
+ : index == 1
|
|
|
+ ? 'calendar'
|
|
|
+ : index == 2
|
|
|
+ ? 'plus-circle'
|
|
|
+ : index == 3
|
|
|
+ ? 'file-text'
|
|
|
+ : index == 4
|
|
|
+ ? 'bell'
|
|
|
+ : 'list-dot')
|
|
|
+ "
|
|
|
+ ></u-tabbar-item>
|
|
|
+ <!-- <u-tabbar-item
|
|
|
text="通风系统图"
|
|
|
name="tun2D"
|
|
|
icon="list-dot"
|
|
|
></u-tabbar-item> -->
|
|
|
- <!-- <u-tabbar-item
|
|
|
+ <!-- <u-tabbar-item
|
|
|
text="设备中心"
|
|
|
name="device"
|
|
|
icon="calendar"
|
|
@@ -48,11 +84,7 @@
|
|
|
name="gasreport"
|
|
|
icon="bell"
|
|
|
></u-tabbar-item> -->
|
|
|
- <u-tabbar-item
|
|
|
- text="我的"
|
|
|
- name="user"
|
|
|
- icon="bell"
|
|
|
- ></u-tabbar-item>
|
|
|
+ <u-tabbar-item text="我的" name="user" icon="bell"></u-tabbar-item>
|
|
|
</u-tabbar>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -77,28 +109,92 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
permission: function () {
|
|
|
- var data = uni.getStorageSync('menuPermission');
|
|
|
- console.log(JSON.stringify(data))
|
|
|
- if(data==null ||data==""||data.length==0){
|
|
|
- data = [{"redirect":null,"path":"/device","ver":null,"component":"device","route":"1","meta":{"keepAlive":false,"des":null,"internalOrExternal":false,"componentName":"device","title":"设备中心"},"name":"device","id":"1862300062379954178"},{"redirect":null,"path":"/warndata","ver":null,"component":"warndata","route":"1","meta":{"keepAlive":false,"des":null,"internalOrExternal":false,"componentName":"warndata","title":"预警分析"},"name":"warndata","id":"1862301272310829057"},{"redirect":null,"path":"/filecenter","ver":null,"component":"filecenter","route":"1","meta":{"keepAlive":false,"des":null,"internalOrExternal":false,"componentName":"filecenter","title":"文件共享中心"},"name":"filecenter","id":"1862301712700166146"},{"redirect":null,"path":"/gasreport","ver":null,"component":"gasreport","route":"1","meta":{"keepAlive":false,"des":null,"internalOrExternal":false,"componentName":"gasreport","title":"瓦斯上报"},"name":"gasreport","id":"1862302433877184513"}]
|
|
|
- }
|
|
|
- return data
|
|
|
- }
|
|
|
+ var data = uni.getStorageSync("menuPermission");
|
|
|
+ console.log(JSON.stringify(data));
|
|
|
+ if (data == null || data == "" || data.length == 0) {
|
|
|
+ data = [
|
|
|
+ {
|
|
|
+ redirect: null,
|
|
|
+ path: "/device",
|
|
|
+ ver: null,
|
|
|
+ component: "device",
|
|
|
+ route: "1",
|
|
|
+ meta: {
|
|
|
+ keepAlive: false,
|
|
|
+ des: null,
|
|
|
+ internalOrExternal: false,
|
|
|
+ componentName: "device",
|
|
|
+ title: "设备中心",
|
|
|
+ },
|
|
|
+ name: "device",
|
|
|
+ id: "1862300062379954178",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ redirect: null,
|
|
|
+ path: "/warndata",
|
|
|
+ ver: null,
|
|
|
+ component: "warndata",
|
|
|
+ route: "1",
|
|
|
+ meta: {
|
|
|
+ keepAlive: false,
|
|
|
+ des: null,
|
|
|
+ internalOrExternal: false,
|
|
|
+ componentName: "warndata",
|
|
|
+ title: "预警分析",
|
|
|
+ },
|
|
|
+ name: "warndata",
|
|
|
+ id: "1862301272310829057",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ redirect: null,
|
|
|
+ path: "/filecenter",
|
|
|
+ ver: null,
|
|
|
+ component: "filecenter",
|
|
|
+ route: "1",
|
|
|
+ meta: {
|
|
|
+ keepAlive: false,
|
|
|
+ des: null,
|
|
|
+ internalOrExternal: false,
|
|
|
+ componentName: "filecenter",
|
|
|
+ title: "文件共享中心",
|
|
|
+ },
|
|
|
+ name: "filecenter",
|
|
|
+ id: "1862301712700166146",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ redirect: null,
|
|
|
+ path: "/gasreport",
|
|
|
+ ver: null,
|
|
|
+ component: "gasreport",
|
|
|
+ route: "1",
|
|
|
+ meta: {
|
|
|
+ keepAlive: false,
|
|
|
+ des: null,
|
|
|
+ internalOrExternal: false,
|
|
|
+ componentName: "gasreport",
|
|
|
+ title: "瓦斯上报",
|
|
|
+ },
|
|
|
+ name: "gasreport",
|
|
|
+ id: "1862302433877184513",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ return data;
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
permission: {
|
|
|
handler(newV, oldV) {
|
|
|
- debugger
|
|
|
- if(newV!=null && newV != "")
|
|
|
- this.PageCur=newV[0].component
|
|
|
+ debugger;
|
|
|
+ if (newV != null && newV != "") this.PageCur = newV[0].component;
|
|
|
},
|
|
|
immediate: true,
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.changeWV();
|
|
|
},
|
|
|
- mounted() { },
|
|
|
+ mounted() {},
|
|
|
onShow() {
|
|
|
// this.changeWV()
|
|
|
},
|
|
@@ -136,9 +232,9 @@ export default {
|
|
|
_this.wvHeight = _this.isLandScape
|
|
|
? sysinfo.windowHeight - sysinfo.statusBarHeight - 20
|
|
|
: sysinfo.windowHeight -
|
|
|
- sysinfo.statusBarHeight -
|
|
|
- sysinfo.statusBarHeight -
|
|
|
- 38;
|
|
|
+ sysinfo.statusBarHeight -
|
|
|
+ sysinfo.statusBarHeight -
|
|
|
+ 38;
|
|
|
_this.wvWidth = _this.isLandScape
|
|
|
? sysinfo.windowWidth
|
|
|
: sysinfo.windowWidth;
|