Merge branch 'bjxz-dev' of http://139.9.66.234:18023/dhp/zhgdyunapp into bjxz-rain
This commit is contained in:
commit
e7f3088498
13
main.js
13
main.js
@ -305,19 +305,6 @@ Vue.prototype.sendRequest = function(param) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 按钮权限控制指令
|
||||
Vue.directive('permission', {
|
||||
inserted: (el, binding) => {
|
||||
const {
|
||||
value
|
||||
} = binding;
|
||||
// 判断当前用户是否拥有该按钮权限
|
||||
if (!Vue.prototype.checkPermission(value)) {
|
||||
el.parentNode.removeChild(el);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 判断权限的函数
|
||||
Vue.prototype.checkPermission = function(permission) {
|
||||
var permissions = JSON.parse(uni.getStorageSync("userInfo")).menuAuthority.menuList;
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
<view class="tabType" @click="changeTab(3)" :class="checkedTab==3?'checkedTab':'noCheckTab'">安全</view>
|
||||
<view class="tabType" @click="changeTab(4)" :class="checkedTab==4?'checkedTab':'noCheckTab'">AI</view>
|
||||
<view class="tabType" @click="changeTab(5)" :class="checkedTab==5?'checkedTab':'noCheckTab'">通知公告</view>
|
||||
<view class="tabType" @click="changeTab(6)" :class="checkedTab==6?'checkedTab':'noCheckTab'">安全履职预警</view>
|
||||
</view>
|
||||
<view class="centerContent">
|
||||
<view class="uni-form-item">
|
||||
@ -172,6 +173,8 @@
|
||||
json.type = 8
|
||||
} else if (this.checkedTab == 5) {
|
||||
json.notInType = "8,10,11"
|
||||
} else if (this.checkedTab == 6) {
|
||||
json.type = 35
|
||||
}
|
||||
var that = this
|
||||
this.sendRequest({
|
||||
@ -202,7 +205,8 @@
|
||||
box-shadow: 0 0 10px rgba(194, 194, 194, 0.5);
|
||||
|
||||
.tabType {
|
||||
width: 33%;
|
||||
// width: 33%;
|
||||
width: max-content;
|
||||
line-height: 43px;
|
||||
border-bottom: 1px solid rgba(194, 194, 194, 0.2);
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image v-permission="{key: 'clgl_blackWhiteList', menuPath: '/project/carManage/carManage'}" v-if="type !== 'supplier'" v-show="tabIndex==1" src="/static/addImg.png" class="addImg"
|
||||
<image v-if="type !== 'supplier' && checkPermission({key: 'clgl_blackWhiteList', menuPath: '/project/carManage/carManage'})" v-show="tabIndex==1" src="/static/addImg.png" class="addImg"
|
||||
@click="goAdd('')"></image>
|
||||
<levitatedsphere :x="100" :y="80"></levitatedsphere>
|
||||
</view>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<view class="fullHeight">
|
||||
<headers :showBack="true">
|
||||
<headers class="fixedheader" :showBack="true">
|
||||
<view class="headerName">
|
||||
巡检点信息
|
||||
</view>
|
||||
</headers>
|
||||
<view class="content">
|
||||
<view class="content" :style="{ 'padding-top': (statusBarHeight+52) + 'px' }">
|
||||
<view class="splitTitle">
|
||||
巡检信息
|
||||
</view>
|
||||
@ -107,9 +107,11 @@
|
||||
sendData: "",
|
||||
nowTime: 0,
|
||||
time: 0,
|
||||
statusBarHeight:0,
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
|
||||
this.checkOpenGPSServiceByAndroid()
|
||||
console.log(e.data, '我的测试数据')
|
||||
console.log(e, '我的测试数据')
|
||||
@ -415,6 +417,18 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.fixedheader {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
|
||||
// /deep/.headerBox {
|
||||
// background: #2b8df3;
|
||||
// color: #fff;
|
||||
// }
|
||||
}
|
||||
.content {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user