219 lines
7.0 KiB
Vue

<template>
<view class="specialOperations">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName">
特种作业
</view>
</headers>
<view class="sp-menu">
<!-- <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>
</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>
<view class="item-text">
<text>动火作业</text>
</view>
</view>
<view class="menu-item" @click="handleNavigateTo(2)">
<view class="item-icon">
<image src="@/static/specialOperations/limitSpaceWork.png"></image>
</view>
<view class="item-text">
<text>受限空间作业</text>
</view>
</view>
<view class="menu-item" @click="handleNavigateTo(3)">
<view class="item-icon">
<image src="@/static/specialOperations/bindPlatePlug.png"></image>
</view>
<view class="item-text">
<text>盲板抽堵作业</text>
</view>
</view>
<view class="menu-item" @click="handleNavigateTo(4)">
<view class="item-icon">
<image src="@/static/specialOperations/highJob.png"></image>
</view>
<view class="item-text">
<text>高处作业</text>
</view>
</view>
<view class="menu-item" @click="handleNavigateTo(5)">
<view class="item-icon">
<image src="@/static/specialOperations/hoistSafe.png"></image>
</view>
<view class="item-text">
<text>吊装安全作业</text>
</view>
</view>
<view class="menu-item" @click="handleNavigateTo(6)">
<view class="item-icon">
<image src="@/static/specialOperations/tempElectricity.png"></image>
</view>
<view class="item-text">
<text>临时用电作业</text>
</view>
</view>
<view class="menu-item" @click="handleNavigateTo(7)">
<view class="item-icon">
<image src="@/static/specialOperations/groundSafe.png"></image>
</view>
<view class="item-text">
<text>动土作业</text>
</view>
</view>
<view class="menu-item" @click="handleNavigateTo(8)">
<view class="item-icon">
<image src="@/static/specialOperations/openCircuit.png"></image>
</view>
<view class="item-text">
<text>断路作业</text>
</view>
</view>
</view>
<levitatedsphere :x="100" :y="80"></levitatedsphere>
</view>
</template>
<script>
import levitatedsphere from "@/components/levitatedsphere/levitatedsphere.vue"
import headers from '../../../components/headers/headers.vue'
export default {
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 === "/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" })
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" })
}
}
}
</script>
<style lang="scss">
.specialOperations{
.fixedheader{
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 2;
}
.sp-menu{
margin: 0 38rpx;
padding-top: 200rpx;
// height: 1200rpx;
// height: 1000rpx;
// background-color: darkred;
display: grid;
grid-gap: 24rpx;
grid-template-columns: repeat(2, 1fr);
// grid-template-columns: repeat(auto-fill, 220rpx);
// place-items: center;
// justify-content: center;
.menu-item{
// width: 220rpx;
height: 274rpx;
// background-color: darkblue;
box-shadow: 0px 8rpx 15rpx 0px rgba(219,229,255,0.6);
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.item-icon{
// width: 220rpx;
// height: 220rpx;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 14rpx;
image{
width: 66rpx;
height: 86rpx;
}
}
.item-text{
align-items: center;
width: 220rpx;
height: 54rpx;
display: flex;
justify-content: center;
align-items: center;
text{
text-align: center;
display: flex;
justify-content: center;
}
}
}
}
}
</style>