|
@@ -10,7 +10,7 @@
|
|
|
border: 'none',
|
|
|
}"
|
|
|
>
|
|
|
- <!-- <u-loading-icon></u-loading-icon> -->
|
|
|
+ <u-loading-icon></u-loading-icon>
|
|
|
</view>
|
|
|
<iframe
|
|
|
v-if="PageCur == 'tun2D'"
|
|
@@ -25,14 +25,14 @@
|
|
|
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>
|
|
|
+ <Device
|
|
|
+ v-show="PageCur == 'device'"
|
|
|
+ :style="{ marginTop: wvTop + 20 + 'px' }"
|
|
|
+ ></Device>
|
|
|
+ <filecenter :cur="PageCur" v-show="PageCur == 'filecenter'"></filecenter>
|
|
|
+ <warndata v-show="PageCur == 'warndata'" :cur="PageCur"></warndata>
|
|
|
+ <gasreport :cur="PageCur" v-show="PageCur == 'gasreport'"></gasreport>
|
|
|
+ <user :cur="PageCur" v-show="PageCur == 'user'"></user>
|
|
|
<u-tabbar
|
|
|
:value="PageCur"
|
|
|
@change="NavChange"
|
|
@@ -40,51 +40,27 @@
|
|
|
: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
|
|
|
- text="设备中心"
|
|
|
- name="device"
|
|
|
- icon="calendar"
|
|
|
- ></u-tabbar-item>
|
|
|
- <u-tabbar-item
|
|
|
- text="预警分析"
|
|
|
- name="warndata"
|
|
|
- icon="plus-circle"
|
|
|
- ></u-tabbar-item>
|
|
|
- <u-tabbar-item
|
|
|
- text="文件共享"
|
|
|
- name="filecenter"
|
|
|
- icon="file-text"
|
|
|
- ></u-tabbar-item>
|
|
|
- <u-tabbar-item
|
|
|
- text="瓦斯日报"
|
|
|
- name="gasreport"
|
|
|
- icon="bell"
|
|
|
- ></u-tabbar-item> -->
|
|
|
- <u-tabbar-item text="我的" name="user" icon="bell"></u-tabbar-item>
|
|
|
+ <u-tabbar-item v-show="menus.device != null"
|
|
|
+ text="设备中心"
|
|
|
+ name="device"
|
|
|
+ icon="calendar"
|
|
|
+ ></u-tabbar-item>
|
|
|
+ <u-tabbar-item v-show="menus.warndata != null"
|
|
|
+ text="预警分析"
|
|
|
+ name="warndata"
|
|
|
+ icon="plus-circle"
|
|
|
+ ></u-tabbar-item>
|
|
|
+ <u-tabbar-item v-show="menus.filecenter != null"
|
|
|
+ text="文件共享"
|
|
|
+ name="filecenter"
|
|
|
+ icon="file-text"
|
|
|
+ ></u-tabbar-item>
|
|
|
+ <u-tabbar-item v-show="menus.gasreport != null"
|
|
|
+ text="瓦斯日报"
|
|
|
+ name="gasreport"
|
|
|
+ icon="bell"
|
|
|
+ ></u-tabbar-item>
|
|
|
+ <u-tabbar-item text="我的" name="user" icon="bell"></u-tabbar-item>
|
|
|
</u-tabbar>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -99,19 +75,21 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
isLandScape: "",
|
|
|
- PageCur: "",
|
|
|
+ PageCur: "device",
|
|
|
tun3DPage: null,
|
|
|
wvHeight: getApp().globalData.windowHeight,
|
|
|
wvWidth: getApp().globalData.windowWidth,
|
|
|
wvTop: 0,
|
|
|
- iframeloading: true,
|
|
|
+ iframeloading: false,
|
|
|
+ menus:{}
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
permission: function () {
|
|
|
var data = uni.getStorageSync("menuPermission");
|
|
|
console.log(JSON.stringify(data));
|
|
|
- if (data == null || data == "" || data.length == 0) {
|
|
|
+ if (data == null || data == "" || data.length == 0)
|
|
|
+ {
|
|
|
data = [
|
|
|
{
|
|
|
redirect: null,
|
|
@@ -179,6 +157,9 @@ export default {
|
|
|
},
|
|
|
];
|
|
|
}
|
|
|
+ for(var i=0;i<data.length;i++){
|
|
|
+ this.menus[data[i].component] = data[i].component
|
|
|
+ }
|
|
|
return data;
|
|
|
},
|
|
|
},
|
|
@@ -191,9 +172,7 @@ export default {
|
|
|
immediate: true,
|
|
|
}
|
|
|
},
|
|
|
- onLoad(option) {
|
|
|
-
|
|
|
- this.$tip.success(option.ticket)
|
|
|
+ onLoad() {
|
|
|
this.changeWV();
|
|
|
},
|
|
|
mounted() {},
|
|
@@ -255,7 +234,6 @@ export default {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
-
|
|
|
.loadding-box {
|
|
|
position: absolute;
|
|
|
display: flex;
|