fix: BUG修改
This commit is contained in:
parent
7ec70b3900
commit
fbbe9d5df8
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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user