提交 fe3273d4 authored 作者: 龙菲's avatar 龙菲

修复审核按钮显示判断的问题

上级 feefd50a
......@@ -33,3 +33,4 @@ export const checkStatus = [
}
]
......@@ -2,6 +2,7 @@
// 本文件提供前端定义的字典值的翻译功能
// 增加时先引入,后在allList中添加
// 本文件已经导出为全局变量,直接this.$constantsTool.getLabelByValue即可使用
import { checkStatus } from "./approval"
import { themeType } from "./display"
......@@ -22,6 +23,22 @@ const constantsTool = {
}
return item.label
},
// 获取value
getValueByLabel(dictName, label) {
const list = constantsTool.allList[dictName]
if (!list) {
return ''
}
const item = list.find((item) => {
return item.label == label
})
if (!item) {
return ''
}
return item.value
},
// 获取字典列表
getList(dictName) {
return constantsTool.allList[dictName]
......
......@@ -190,11 +190,22 @@ export default {
...mapGetters(["dicts", "userInfo"]),
getOperation(row) {
return (row) => {
return [viewButton, approvalButton, reSubmitButtton];
const label = this.$constantsTool.getLabelByValue(
"checkStatus",
row.checkStatus
);
// const isAdmin = roles.find(item=>{
// return
// })
switch (label) {
case "已驳回":
return [viewButton, approvalButton, reSubmitButtton];
break;
case "审核中":
return [viewButton, approvalButton];
break;
case "已通过":
return [viewButton];
break;
}
// 管理员2种
// 1 查看详情和审批
// 2 查看详情 管理员操作——已审核、被驳回的条目能够操作的
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论