fix: BUG修改
This commit is contained in:
parent
e041ea2646
commit
b202c4dc1c
@ -277,6 +277,27 @@ Vue.use(vuescroll, {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 按钮权限控制指令
|
||||||
|
Vue.directive('permission', {
|
||||||
|
inserted: (el, binding)=>{
|
||||||
|
const { value } = binding;
|
||||||
|
// 判断当前用户是否拥有该按钮权限
|
||||||
|
if (!checkPermission(value)) {
|
||||||
|
el.parentNode.removeChild(el);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 判断权限的函数
|
||||||
|
function checkPermission(permission) {
|
||||||
|
var permissions = store.state.userInfo.menuAuthority.menuList;
|
||||||
|
permissions = permissions.filter(
|
||||||
|
(x) => x.menuName == permission.moduleName
|
||||||
|
)[0];
|
||||||
|
let index = permissions.actionList.findIndex(
|
||||||
|
(x) => x.actionCode == permission.key
|
||||||
|
)
|
||||||
|
return index != -1?true:false;
|
||||||
|
}
|
||||||
// 加载缩略图
|
// 加载缩略图
|
||||||
Vue.prototype.downloadImgMin = function(row) {
|
Vue.prototype.downloadImgMin = function(row) {
|
||||||
let fileUrl = store.state.FILEURL + row.fileUrl
|
let fileUrl = store.state.FILEURL + row.fileUrl
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
plain
|
plain
|
||||||
>{{ $t("message.laborMange.refresh") }}</el-button
|
>{{ $t("message.laborMange.refresh") }}</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
v-if="
|
v-if="
|
||||||
menuList.actionList.findIndex(
|
menuList.actionList.findIndex(
|
||||||
(x) => x.actionCode == 'qrcodeAg'
|
(x) => x.actionCode == 'qrcodeAg'
|
||||||
@ -76,6 +76,13 @@
|
|||||||
@click="openCode"
|
@click="openCode"
|
||||||
plain
|
plain
|
||||||
>人员录入二维码</el-button
|
>人员录入二维码</el-button
|
||||||
|
> -->
|
||||||
|
<el-button
|
||||||
|
v-permission="{key: 'qrcodeAg', moduleName: '人员登记培训'}"
|
||||||
|
type="primary"
|
||||||
|
@click="openCode"
|
||||||
|
plain
|
||||||
|
>人员录入二维码</el-button
|
||||||
>
|
>
|
||||||
<!-- <el-button type="primary" @click="editProjectSettingDialog = true"
|
<!-- <el-button type="primary" @click="editProjectSettingDialog = true"
|
||||||
>{{ $t("message.laborMange.mobilePersonnelEntryOptions") }}</el-button
|
>{{ $t("message.laborMange.mobilePersonnelEntryOptions") }}</el-button
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user