添加特种作业菜单权限
This commit is contained in:
parent
b9a4fd162f
commit
8a82ee43c1
8
main.js
8
main.js
@ -37,16 +37,16 @@ if (process.env.NODE_ENV === 'development') {
|
||||
console.log('开发环境')
|
||||
// Vue.prototype.url_config = 'http://47.93.215.234:9809/' // 鞍钢正式地址(弃用)
|
||||
// Vue.prototype.url_config = 'http://42.180.188.17:9809/' // 鞍钢正式地址
|
||||
// Vue.prototype.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址
|
||||
Vue.prototype.url_config = 'http://42.180.188.17:11211/' // 鞍钢测试地址
|
||||
// Vue.prototype.url_config = 'http://182.90.224.237:51234/' //雄哥内网穿透地址
|
||||
// Vue.prototype.url_config = 'http://jxj.zhgdyun.com:61212/' //杰哥内网穿透地址
|
||||
Vue.prototype.url_config = ' http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// Vue.prototype.url_config = ' http://192.168.34.221:28888/' //郭圣雄本地
|
||||
// Vue.prototype.url_config = 'http://192.168.34.221:9111/' //郭圣雄本地
|
||||
// Vue.prototype.url_config = 'http://192.168.34.155:19111/' //彭洁本地
|
||||
// Vue.prototype.work_url = 'http://47.93.215.234:19997' // 工作流线上地址(弃用)
|
||||
// Vue.prototype.work_url = 'http://42.180.188.17:19997' // 工作流线上地址
|
||||
// Vue.prototype.work_url = 'http://42.180.188.17:19097' // 工作流测试地址
|
||||
Vue.prototype.work_url = 'http://192.168.34.138:5173' // 工作流地址
|
||||
Vue.prototype.work_url = 'http://42.180.188.17:19097' // 工作流测试地址
|
||||
// Vue.prototype.work_url = 'http://192.168.34.138:5173' // 工作流地址
|
||||
// Vue.prototype.work_url = 'http://139.9.66.234:5173' // 工作流地址
|
||||
// Vue.prototype.work_url = 'http://192.168.34.126:5173' // 工作流地址
|
||||
// Vue.prototype.url_config = 'http://8.142.139.165:7080/' // 湖里
|
||||
|
||||
@ -5,8 +5,17 @@
|
||||
特种作业
|
||||
</view>
|
||||
</headers>
|
||||
<view class="sp-menu">
|
||||
<view class="menu-item" @click="handleNavigateTo(1)">
|
||||
<view class="sp-menu" v-if="menuList.length > 0">
|
||||
<view class="menu-item" @click="handleNavigateTo(item.path)" v-for="(item,i) in menuList">
|
||||
<view class="item-icon">
|
||||
<image :src="'/static/specialOperations/'+item.iconImg"></image>
|
||||
<!-- <image src="@/static/specialOperations/tempElectricity.png"></image> -->
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<text>{{item.menuName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="menu-item" @click="handleNavigateTo(1)">
|
||||
<view class="item-icon">
|
||||
<image src="@/static/specialOperations/fireWork.png"></image>
|
||||
</view>
|
||||
@ -69,7 +78,7 @@
|
||||
<view class="item-text">
|
||||
<text>断路作业</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -80,19 +89,57 @@
|
||||
navigationBarTitleText: '页面标题',
|
||||
data() {
|
||||
return {
|
||||
|
||||
userInfo:{},
|
||||
moduleList:[],
|
||||
menuList:[],
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
uni.showLoading({
|
||||
title: "加载中...",
|
||||
})
|
||||
setTimeout(() =>{
|
||||
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
|
||||
this.moduleList = this.userInfo.menuAuthority.moduleList
|
||||
this.moduleList.map(item => {
|
||||
if(item.plugin === "specialOperations") this.menuList = item.menuList
|
||||
})
|
||||
if(this.menuList.length > 0){
|
||||
this.menuList.map(item => {
|
||||
if(item.path === "/project/specialWork/fireWork") item.iconImg = 'fireWork.png'
|
||||
if(item.path === "/project/specialWork/confinedSpaceWork") item.iconImg = 'limitSpaceWork.png'
|
||||
if(item.path === "/project/specialWork/blindPlugWork") item.iconImg = 'bindPlatePlug.png'
|
||||
if(item.path === "/project/specialWork/towerOverWork") item.iconImg = 'highJob.png'
|
||||
if(item.path === "/project/specialWork/riggingOutWork") item.iconImg = 'hoistSafe.png'
|
||||
if(item.path === "/project/specialWork/temporaryPowerWork") item.iconImg = 'tempElectricity.png'
|
||||
if(item.path === "/project/specialWork/startBuildingWork") item.iconImg = 'groundSafe.png'
|
||||
if(item.path === "/project/specialWork/disconnectionWork") item.iconImg = 'openCircuit.png'
|
||||
})
|
||||
}
|
||||
console.log("userInfo=======================",this.userInfo);
|
||||
console.log("moduleList=======================",this.moduleList);
|
||||
},500)
|
||||
uni.hideLoading()
|
||||
},
|
||||
methods:{
|
||||
handleNavigateTo(val){
|
||||
if(val === 1) uni.navigateTo({ url: "./fireWork/checkList" })
|
||||
if(val === 2) uni.navigateTo({ url: "./limitSpaceWork/checkList" })
|
||||
if(val === 3) uni.navigateTo({ url: "./bindPlatePlug/checkList" })
|
||||
if(val === 4) uni.navigateTo({ url: "./highJob/checkList" })
|
||||
if(val === 5) uni.navigateTo({ url: "./hoistSafe/checkList" })
|
||||
if(val === 6) uni.navigateTo({ url: "./tempElectricity/checkList" })
|
||||
if(val === 7) uni.navigateTo({ url: "./groundSafe/checkList" })
|
||||
if(val === 8) uni.navigateTo({ url: "./openCircuit/checkList" })
|
||||
if(val === "/project/specialWork/fireWork") uni.navigateTo({ url: "./fireWork/checkList" })
|
||||
if(val === "/project/specialWork/confinedSpaceWork") uni.navigateTo({ url: "./limitSpaceWork/checkList" })
|
||||
if(val === "/project/specialWork/blindPlugWork") uni.navigateTo({ url: "./bindPlatePlug/checkList" })
|
||||
if(val === "/project/specialWork/towerOverWork") uni.navigateTo({ url: "./highJob/checkList" })
|
||||
if(val === "/project/specialWork/riggingOutWork") uni.navigateTo({ url: "./hoistSafe/checkList" })
|
||||
if(val === "/project/specialWork/temporaryPowerWork") uni.navigateTo({ url: "./tempElectricity/checkList" })
|
||||
if(val === "/project/specialWork/startBuildingWork") uni.navigateTo({ url: "./groundSafe/checkList" })
|
||||
if(val === "/project/specialWork/disconnectionWork") uni.navigateTo({ url: "./openCircuit/checkList" })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,8 +5,17 @@
|
||||
特种作业
|
||||
</view>
|
||||
</headers>
|
||||
<view class="sp-menu">
|
||||
<view class="menu-item" @click="handleNavigateTo(1)">
|
||||
<view class="sp-menu" v-if="menuList.length > 0">
|
||||
<view class="menu-item" @click="handleNavigateTo(item.path)" v-for="(item,i) in menuList">
|
||||
<view class="item-icon">
|
||||
<image :src="'/static/specialOperations/'+item.iconImg"></image>
|
||||
<!-- <image src="@/static/specialOperations/tempElectricity.png"></image> -->
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<text>{{item.menuName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="menu-item" @click="handleNavigateTo(1)">
|
||||
<view class="item-icon">
|
||||
<image src="@/static/specialOperations/fireWork.png"></image>
|
||||
</view>
|
||||
@ -69,7 +78,7 @@
|
||||
<view class="item-text">
|
||||
<text>断路作业</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -80,19 +89,57 @@
|
||||
navigationBarTitleText: '页面标题',
|
||||
data() {
|
||||
return {
|
||||
|
||||
userInfo:{},
|
||||
moduleList:[],
|
||||
menuList:[],
|
||||
};
|
||||
},
|
||||
onReady() {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
uni.showLoading({
|
||||
title: "加载中...",
|
||||
})
|
||||
setTimeout(() =>{
|
||||
this.userInfo = JSON.parse(uni.getStorageSync('userInfo'))
|
||||
this.moduleList = this.userInfo.menuAuthority.moduleList
|
||||
this.moduleList.map(item => {
|
||||
if(item.plugin === "specialOperations") this.menuList = item.menuList
|
||||
})
|
||||
if(this.menuList.length > 0){
|
||||
this.menuList.map(item => {
|
||||
if(item.path === "/project/specialWork/fireWork") item.iconImg = 'fireWork.png'
|
||||
if(item.path === "/project/specialWork/confinedSpaceWork") item.iconImg = 'limitSpaceWork.png'
|
||||
if(item.path === "/project/specialWork/blindPlugWork") item.iconImg = 'bindPlatePlug.png'
|
||||
if(item.path === "/project/specialWork/towerOverWork") item.iconImg = 'highJob.png'
|
||||
if(item.path === "/project/specialWork/riggingOutWork") item.iconImg = 'hoistSafe.png'
|
||||
if(item.path === "/project/specialWork/temporaryPowerWork") item.iconImg = 'tempElectricity.png'
|
||||
if(item.path === "/project/specialWork/startBuildingWork") item.iconImg = 'groundSafe.png'
|
||||
if(item.path === "/project/specialWork/disconnectionWork") item.iconImg = 'openCircuit.png'
|
||||
})
|
||||
}
|
||||
console.log("userInfo=======================",this.userInfo);
|
||||
console.log("moduleList=======================",this.moduleList);
|
||||
},500)
|
||||
uni.hideLoading()
|
||||
},
|
||||
methods:{
|
||||
handleNavigateTo(val){
|
||||
if(val === 1) uni.navigateTo({ url: "./fireWork/work" })
|
||||
if(val === 2) uni.navigateTo({ url: "./limitSpaceWork/work" })
|
||||
if(val === 3) uni.navigateTo({ url: "./bindPlatePlug/work" })
|
||||
if(val === 4) uni.navigateTo({ url: "./highJob/work" })
|
||||
if(val === 5) uni.navigateTo({ url: "./hoistSafe/work" })
|
||||
if(val === 6) uni.navigateTo({ url: "./tempElectricity/work" })
|
||||
if(val === 7) uni.navigateTo({ url: "./groundSafe/work" })
|
||||
if(val === 8) uni.navigateTo({ url: "./openCircuit/work" })
|
||||
if(val === "/project/specialWork/fireWork") uni.navigateTo({ url: "./fireWork/work" })
|
||||
if(val === "/project/specialWork/confinedSpaceWork") uni.navigateTo({ url: "./limitSpaceWork/work" })
|
||||
if(val === "/project/specialWork/blindPlugWork") uni.navigateTo({ url: "./bindPlatePlug/work" })
|
||||
if(val === "/project/specialWork/towerOverWork") uni.navigateTo({ url: "./highJob/work" })
|
||||
if(val === "/project/specialWork/riggingOutWork") uni.navigateTo({ url: "./hoistSafe/work" })
|
||||
if(val === "/project/specialWork/temporaryPowerWork") uni.navigateTo({ url: "./tempElectricity/work" })
|
||||
if(val === "/project/specialWork/startBuildingWork") uni.navigateTo({ url: "./groundSafe/work" })
|
||||
if(val === "/project/specialWork/disconnectionWork") uni.navigateTo({ url: "./openCircuit/work" })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user