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 = JSON.parse(uni.getStorageSync("userInfo")).menuAuthority.menuList;
|
||||||
// var permissions = store.state.userInfo.menuAuthority.menuList;
|
// var permissions = store.state.userInfo.menuAuthority.menuList;
|
||||||
permissions = permissions.filter(
|
permissions = permissions.filter(
|
||||||
@ -321,6 +321,18 @@ Vue.prototype.checkPermission = function(permission) {
|
|||||||
)
|
)
|
||||||
return index != -1 ? true : false;
|
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({
|
const app = new Vue({
|
||||||
...App
|
...App
|
||||||
})
|
})
|
||||||
|
|||||||
@ -83,7 +83,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.btnAuth = this.checkPermission({key: 'ai_disposition', menuPath: '/project/aiAnalysis/warningList'})
|
this.btnAuth = this.checkBtnPermission({key: 'ai_disposition', menuPath: '/project/aiAnalysis/warningList'})
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
this.systemInfo = uni.getStorageSync('systemInfo')
|
this.systemInfo = uni.getStorageSync('systemInfo')
|
||||||
|
|||||||
@ -144,7 +144,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
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));
|
this.alarmItem = JSON.parse(decodeURIComponent(option.item));
|
||||||
console.log('alarmItem', this.alarmItem)
|
console.log('alarmItem', this.alarmItem)
|
||||||
},
|
},
|
||||||
|
|||||||
@ -119,7 +119,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
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.info = JSON.parse(options.info);
|
||||||
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
|
this.statusBarHeight = uni.getStorageSync('systemInfo').statusBarHeight
|
||||||
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
|
this.projectSn = JSON.parse(uni.getStorageSync('projectDetail')).projectSn;
|
||||||
|
|||||||
@ -189,7 +189,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</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>
|
@click="goAdd('')"></image>
|
||||||
<levitatedsphere :x="100" :y="80"></levitatedsphere>
|
<levitatedsphere :x="100" :y="80"></levitatedsphere>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -157,7 +157,7 @@
|
|||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
onLoad(val){
|
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
|
this.detailId = val.id
|
||||||
// if(val.)
|
// if(val.)
|
||||||
// this.initData()
|
// this.initData()
|
||||||
|
|||||||
@ -236,11 +236,11 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.btnAuth = this.checkPermission({
|
this.btnAuth = this.checkBtnPermission({
|
||||||
key: 'emergencyDisposal_add',
|
key: 'emergencyDisposal_add',
|
||||||
menuPath: '/project/emergencyDisposal/emergencyDisposal'
|
menuPath: '/project/emergencyDisposal/emergencyDisposal'
|
||||||
})
|
})
|
||||||
this.btnEditAuth = this.checkPermission({
|
this.btnEditAuth = this.checkBtnPermission({
|
||||||
key: 'emergencyDisposal_edit',
|
key: 'emergencyDisposal_edit',
|
||||||
menuPath: '/project/emergencyDisposal/emergencyDisposal'
|
menuPath: '/project/emergencyDisposal/emergencyDisposal'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -226,11 +226,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.btnEditAuth = this.checkPermission({
|
this.btnEditAuth = this.checkBtnPermission({
|
||||||
key: 'inspectionLedger_edit',
|
key: 'inspectionLedger_edit',
|
||||||
menuPath: '/project/quality/inspectionLedger'
|
menuPath: '/project/quality/inspectionLedger'
|
||||||
})
|
})
|
||||||
this.btnDeleteAuth = this.checkPermission({
|
this.btnDeleteAuth = this.checkBtnPermission({
|
||||||
key: 'inspectionLedger_delete',
|
key: 'inspectionLedger_delete',
|
||||||
menuPath: '/project/quality/inspectionLedger'
|
menuPath: '/project/quality/inspectionLedger'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -159,7 +159,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.btnAuth = this.checkPermission({key: 'inspectionLedger_add', menuPath: '/project/quality/inspectionLedger'})
|
this.btnAuth = this.checkBtnPermission({key: 'inspectionLedger_add', menuPath: '/project/quality/inspectionLedger'})
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getTime()
|
this.getTime()
|
||||||
|
|||||||
@ -226,11 +226,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.btnEditAuth = this.checkPermission({
|
this.btnEditAuth = this.checkBtnPermission({
|
||||||
key: 'inspectionLedger_edit',
|
key: 'inspectionLedger_edit',
|
||||||
menuPath: '/project/safeSame/inspectionLedger'
|
menuPath: '/project/safeSame/inspectionLedger'
|
||||||
})
|
})
|
||||||
this.btnDeleteAuth = this.checkPermission({
|
this.btnDeleteAuth = this.checkBtnPermission({
|
||||||
key: 'inspectionLedger_delete',
|
key: 'inspectionLedger_delete',
|
||||||
menuPath: '/project/safeSame/inspectionLedger'
|
menuPath: '/project/safeSame/inspectionLedger'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -180,7 +180,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.btnAuth = this.checkPermission({key: 'inspectionLedger_add', menuPath: '/project/safeSame/inspectionLedger'})
|
this.btnAuth = this.checkBtnPermission({key: 'inspectionLedger_add', menuPath: '/project/safeSame/inspectionLedger'})
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getTime()
|
this.getTime()
|
||||||
|
|||||||
@ -238,7 +238,7 @@
|
|||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
onLoad(val){
|
onLoad(val){
|
||||||
this.btnAuth = this.checkPermission({
|
this.btnAuth = this.checkBtnPermission({
|
||||||
key: 'blindPlugWork_add',
|
key: 'blindPlugWork_add',
|
||||||
menuPath: '/project/specialWork/blindPlugWork'
|
menuPath: '/project/specialWork/blindPlugWork'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -190,7 +190,7 @@
|
|||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
onLoad(val){
|
onLoad(val){
|
||||||
this.btnAuth = this.checkPermission({
|
this.btnAuth = this.checkBtnPermission({
|
||||||
key: 'fireWork_add',
|
key: 'fireWork_add',
|
||||||
menuPath: '/project/specialWork/fireWork'
|
menuPath: '/project/specialWork/fireWork'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -202,7 +202,7 @@
|
|||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
onLoad(val){
|
onLoad(val){
|
||||||
this.btnAuth = this.checkPermission({
|
this.btnAuth = this.checkBtnPermission({
|
||||||
key: 'startBuildingWork_add',
|
key: 'startBuildingWork_add',
|
||||||
menuPath: '/project/specialWork/startBuildingWork'
|
menuPath: '/project/specialWork/startBuildingWork'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -201,7 +201,7 @@
|
|||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
onLoad(val){
|
onLoad(val){
|
||||||
this.btnAuth = this.checkPermission({
|
this.btnAuth = this.checkBtnPermission({
|
||||||
key: 'towerOverWork_add',
|
key: 'towerOverWork_add',
|
||||||
menuPath: '/project/specialWork/towerOverWork'
|
menuPath: '/project/specialWork/towerOverWork'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -201,7 +201,7 @@
|
|||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
onLoad(val){
|
onLoad(val){
|
||||||
this.btnAuth = this.checkPermission({
|
this.btnAuth = this.checkBtnPermission({
|
||||||
key: 'riggingOutWork_add',
|
key: 'riggingOutWork_add',
|
||||||
menuPath: '/project/specialWork/riggingOutWork'
|
menuPath: '/project/specialWork/riggingOutWork'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -278,7 +278,7 @@
|
|||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
onLoad(val){
|
onLoad(val){
|
||||||
this.btnAuth = this.checkPermission({
|
this.btnAuth = this.checkBtnPermission({
|
||||||
key: 'confinedSpaceWork_add',
|
key: 'confinedSpaceWork_add',
|
||||||
menuPath: '/project/specialWork/confinedSpaceWork'
|
menuPath: '/project/specialWork/confinedSpaceWork'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -210,7 +210,7 @@
|
|||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
onLoad(val){
|
onLoad(val){
|
||||||
this.btnAuth = this.checkPermission({
|
this.btnAuth = this.checkBtnPermission({
|
||||||
key: 'disconnectionWork_add',
|
key: 'disconnectionWork_add',
|
||||||
menuPath: '/project/specialWork/disconnectionWork'
|
menuPath: '/project/specialWork/disconnectionWork'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -222,7 +222,7 @@
|
|||||||
},200)
|
},200)
|
||||||
},
|
},
|
||||||
onLoad(val){
|
onLoad(val){
|
||||||
this.btnAuth = this.checkPermission({
|
this.btnAuth = this.checkBtnPermission({
|
||||||
key: 'temporaryPowerWork_add',
|
key: 'temporaryPowerWork_add',
|
||||||
menuPath: '/project/specialWork/temporaryPowerWork'
|
menuPath: '/project/specialWork/temporaryPowerWork'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -58,7 +58,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
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.projectSn = JSON.parse(uni.getStorageSync("userInfo")).sn
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
},
|
},
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
this.getDetails()
|
this.getDetails()
|
||||||
},
|
},
|
||||||
onLoad(vai) {
|
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
|
this.id = vai.itemS
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
|
|||||||
@ -73,12 +73,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-box" v-if="isPass && ![2,3].includes(itemFrom.auditType)">
|
<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="cancle-btn" @click="isPass = false">驳回</view>
|
||||||
<view class="pass-btn" @click="passAudit">通过</view>
|
<view class="pass-btn" @click="passAudit">通过</view>
|
||||||
</view>
|
</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>
|
||||||
</view>
|
</view>
|
||||||
@ -95,10 +95,12 @@
|
|||||||
isPass: true,
|
isPass: true,
|
||||||
form: {
|
form: {
|
||||||
feedbackContent: ''
|
feedbackContent: ''
|
||||||
}
|
},
|
||||||
|
btnEditAuth: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
this.btnEditAuth = this.checkBtnPermission({key: 'jdsp_edit', menuPath: '/project/progressManagementAg/progressApproval'})
|
||||||
this.itemFrom = JSON.parse(option.obj);
|
this.itemFrom = JSON.parse(option.obj);
|
||||||
if (this.itemFrom) {
|
if (this.itemFrom) {
|
||||||
this.filterItemForm();
|
this.filterItemForm();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user