fix: BUG修改
This commit is contained in:
parent
0047487dce
commit
1fba2d9c88
16
main.js
16
main.js
@ -305,8 +305,8 @@ Vue.prototype.sendRequest = function(param) {
|
||||
}
|
||||
});
|
||||
}
|
||||
// 判断权限的函数
|
||||
Vue.prototype.checkPermission = function(permission) {
|
||||
// 判断按钮权限的函数
|
||||
Vue.prototype.checkBtnPermission = function(permission) {
|
||||
var permissions = JSON.parse(uni.getStorageSync("userInfo")).menuAuthority.menuList;
|
||||
// var permissions = store.state.userInfo.menuAuthority.menuList;
|
||||
permissions = permissions.filter(
|
||||
@ -321,6 +321,18 @@ Vue.prototype.checkPermission = function(permission) {
|
||||
)
|
||||
return index != -1 ? true : false;
|
||||
}
|
||||
Vue.prototype.checkMenuPermission = function(permission) {
|
||||
var permissions = JSON.parse(uni.getStorageSync("userInfo")).menuAuthority.menuList;
|
||||
// var permissions = store.state.userInfo.menuAuthority.menuList;
|
||||
permissions = permissions.filter(
|
||||
(x) => x.path == permission.menuPath
|
||||
)[0];
|
||||
if (!permissions) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.btnAuth = this.checkPermission({key: 'ai_disposition', menuPath: '/project/aiAnalysis/warningList'})
|
||||
this.btnAuth = this.checkBtnPermission({key: 'ai_disposition', menuPath: '/project/aiAnalysis/warningList'})
|
||||
},
|
||||
onShow(){
|
||||
this.systemInfo = uni.getStorageSync('systemInfo')
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.btnAuth = this.checkPermission({key: 'dealPush_push', menuPath: '/project/aiAnalysis/dealPushManage'})
|
||||
this.btnAuth = this.checkBtnPermission({key: 'dealPush_push', menuPath: '/project/aiAnalysis/dealPushManage'})
|
||||
this.alarmItem = JSON.parse(decodeURIComponent(option.item));
|
||||
console.log('alarmItem', this.alarmItem)
|
||||
},
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.btnAuth = this.checkPermission({key: 'selfInspect_scanCheck', menuPath: '/project/inspecPoint/selfInspect'})
|
||||
this.btnAuth = this.checkBtnPermission({key: 'selfInspect_scanCheck', menuPath: '/project/inspecPoint/selfInspect'})
|
||||
this.info = JSON.parse(options.info);
|
||||
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
|
||||
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
|
||||
|
||||
@ -189,7 +189,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image v-if="type !== 'supplier' && checkPermission({key: 'clgl_blackWhiteList', menuPath: '/project/carManage/carManage'})" v-show="tabIndex==1" src="/static/addImg.png" class="addImg"
|
||||
<image v-if="type !== 'supplier' && checkBtnPermission({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>
|
||||
|
||||
@ -157,7 +157,7 @@
|
||||
},200)
|
||||
},
|
||||
onLoad(val){
|
||||
this.btnAuth = this.checkPermission({key: 'wdgc_add', menuPath: '/project/dangerousBigProject/parameter'})
|
||||
this.btnAuth = this.checkBtnPermission({key: 'wdgc_add', menuPath: '/project/dangerousBigProject/parameter'})
|
||||
this.detailId = val.id
|
||||
// if(val.)
|
||||
// this.initData()
|
||||
|
||||
@ -236,11 +236,11 @@
|
||||
|
||||
},
|
||||
onLoad(options) {
|
||||
this.btnAuth = this.checkPermission({
|
||||
this.btnAuth = this.checkBtnPermission({
|
||||
key: 'emergencyDisposal_add',
|
||||
menuPath: '/project/emergencyDisposal/emergencyDisposal'
|
||||
})
|
||||
this.btnEditAuth = this.checkPermission({
|
||||
this.btnEditAuth = this.checkBtnPermission({
|
||||
key: 'emergencyDisposal_edit',
|
||||
menuPath: '/project/emergencyDisposal/emergencyDisposal'
|
||||
})
|
||||
|
||||
@ -226,11 +226,11 @@
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.btnEditAuth = this.checkPermission({
|
||||
this.btnEditAuth = this.checkBtnPermission({
|
||||
key: 'inspectionLedger_edit',
|
||||
menuPath: '/project/quality/inspectionLedger'
|
||||
})
|
||||
this.btnDeleteAuth = this.checkPermission({
|
||||
this.btnDeleteAuth = this.checkBtnPermission({
|
||||
key: 'inspectionLedger_delete',
|
||||
menuPath: '/project/quality/inspectionLedger'
|
||||
})
|
||||
|
||||
@ -159,7 +159,7 @@
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.btnAuth = this.checkPermission({key: 'inspectionLedger_add', menuPath: '/project/quality/inspectionLedger'})
|
||||
this.btnAuth = this.checkBtnPermission({key: 'inspectionLedger_add', menuPath: '/project/quality/inspectionLedger'})
|
||||
},
|
||||
mounted() {
|
||||
this.getTime()
|
||||
|
||||
@ -226,11 +226,11 @@
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.btnEditAuth = this.checkPermission({
|
||||
this.btnEditAuth = this.checkBtnPermission({
|
||||
key: 'inspectionLedger_edit',
|
||||
menuPath: '/project/safeSame/inspectionLedger'
|
||||
})
|
||||
this.btnDeleteAuth = this.checkPermission({
|
||||
this.btnDeleteAuth = this.checkBtnPermission({
|
||||
key: 'inspectionLedger_delete',
|
||||
menuPath: '/project/safeSame/inspectionLedger'
|
||||
})
|
||||
|
||||
@ -180,7 +180,7 @@
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.btnAuth = this.checkPermission({key: 'inspectionLedger_add', menuPath: '/project/safeSame/inspectionLedger'})
|
||||
this.btnAuth = this.checkBtnPermission({key: 'inspectionLedger_add', menuPath: '/project/safeSame/inspectionLedger'})
|
||||
},
|
||||
mounted() {
|
||||
this.getTime()
|
||||
|
||||
@ -238,7 +238,7 @@
|
||||
},200)
|
||||
},
|
||||
onLoad(val){
|
||||
this.btnAuth = this.checkPermission({
|
||||
this.btnAuth = this.checkBtnPermission({
|
||||
key: 'blindPlugWork_add',
|
||||
menuPath: '/project/specialWork/blindPlugWork'
|
||||
})
|
||||
|
||||
@ -190,7 +190,7 @@
|
||||
},200)
|
||||
},
|
||||
onLoad(val){
|
||||
this.btnAuth = this.checkPermission({
|
||||
this.btnAuth = this.checkBtnPermission({
|
||||
key: 'fireWork_add',
|
||||
menuPath: '/project/specialWork/fireWork'
|
||||
})
|
||||
|
||||
@ -202,7 +202,7 @@
|
||||
},200)
|
||||
},
|
||||
onLoad(val){
|
||||
this.btnAuth = this.checkPermission({
|
||||
this.btnAuth = this.checkBtnPermission({
|
||||
key: 'startBuildingWork_add',
|
||||
menuPath: '/project/specialWork/startBuildingWork'
|
||||
})
|
||||
|
||||
@ -201,7 +201,7 @@
|
||||
},200)
|
||||
},
|
||||
onLoad(val){
|
||||
this.btnAuth = this.checkPermission({
|
||||
this.btnAuth = this.checkBtnPermission({
|
||||
key: 'towerOverWork_add',
|
||||
menuPath: '/project/specialWork/towerOverWork'
|
||||
})
|
||||
|
||||
@ -201,7 +201,7 @@
|
||||
},200)
|
||||
},
|
||||
onLoad(val){
|
||||
this.btnAuth = this.checkPermission({
|
||||
this.btnAuth = this.checkBtnPermission({
|
||||
key: 'riggingOutWork_add',
|
||||
menuPath: '/project/specialWork/riggingOutWork'
|
||||
})
|
||||
|
||||
@ -278,7 +278,7 @@
|
||||
},200)
|
||||
},
|
||||
onLoad(val){
|
||||
this.btnAuth = this.checkPermission({
|
||||
this.btnAuth = this.checkBtnPermission({
|
||||
key: 'confinedSpaceWork_add',
|
||||
menuPath: '/project/specialWork/confinedSpaceWork'
|
||||
})
|
||||
|
||||
@ -210,7 +210,7 @@
|
||||
},200)
|
||||
},
|
||||
onLoad(val){
|
||||
this.btnAuth = this.checkPermission({
|
||||
this.btnAuth = this.checkBtnPermission({
|
||||
key: 'disconnectionWork_add',
|
||||
menuPath: '/project/specialWork/disconnectionWork'
|
||||
})
|
||||
|
||||
@ -222,7 +222,7 @@
|
||||
},200)
|
||||
},
|
||||
onLoad(val){
|
||||
this.btnAuth = this.checkPermission({
|
||||
this.btnAuth = this.checkBtnPermission({
|
||||
key: 'temporaryPowerWork_add',
|
||||
menuPath: '/project/specialWork/temporaryPowerWork'
|
||||
})
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.btnAuth = this.checkPermission({key: 'trainPlan_add', menuPath: '/project/examSystem2/trainPlan'})
|
||||
this.btnAuth = this.checkBtnPermission({key: 'trainPlan_add', menuPath: '/project/examSystem2/trainPlan'})
|
||||
this.projectSn = JSON.parse(uni.getStorageSync("userInfo")).sn
|
||||
this.getDataList();
|
||||
},
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
this.getDetails()
|
||||
},
|
||||
onLoad(vai) {
|
||||
this.btnAuth = this.checkPermission({key: 'trainPlan_add', menuPath: '/project/labor/visitRecord'})
|
||||
this.btnAuth = this.checkBtnPermission({key: 'trainPlan_add', menuPath: '/project/labor/visitRecord'})
|
||||
this.id = vai.itemS
|
||||
},
|
||||
onReachBottom() {
|
||||
|
||||
@ -73,12 +73,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box" v-if="isPass && ![2,3].includes(itemFrom.auditType)">
|
||||
<view class="btn-box">
|
||||
<view class="btn-box" v-if="btnEditAuth">
|
||||
<view class="cancle-btn" @click="isPass = false">驳回</view>
|
||||
<view class="pass-btn" @click="passAudit">通过</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="addProgess" v-if="!isPass && ![2,3].includes(itemFrom.auditType)" @click="submitAudit">
|
||||
<view class="addProgess" v-if="btnEditAuth && !isPass && ![2,3].includes(itemFrom.auditType)" @click="submitAudit">
|
||||
提交
|
||||
</view>
|
||||
</view>
|
||||
@ -95,10 +95,12 @@
|
||||
isPass: true,
|
||||
form: {
|
||||
feedbackContent: ''
|
||||
}
|
||||
},
|
||||
btnEditAuth: true
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.btnEditAuth = this.checkBtnPermission({key: 'jdsp_edit', menuPath: '/project/progressManagementAg/progressApproval'})
|
||||
this.itemFrom = JSON.parse(option.obj);
|
||||
if (this.itemFrom) {
|
||||
this.filterItemForm();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user