|
@@ -14,7 +14,7 @@ import {
|
|
|
deleteSystemOperlog,
|
|
deleteSystemOperlog,
|
|
|
getSystemOperlogList
|
|
getSystemOperlogList
|
|
|
} from "@/api/system/operlog";
|
|
} from "@/api/system/operlog";
|
|
|
-import { useDict, useDictValue } from "@/utils/dict";
|
|
|
|
|
|
|
+import { useDict, useDictValue, useDictClass } from "@/utils/dict";
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
|
|
|
|
|
defineOptions({
|
|
defineOptions({
|
|
@@ -60,15 +60,10 @@ const tableConfig: PlusColumn[] = [
|
|
|
options: computed(() => sys_oper_type.value),
|
|
options: computed(() => sys_oper_type.value),
|
|
|
fieldProps: value => {
|
|
fieldProps: value => {
|
|
|
return {
|
|
return {
|
|
|
- type: sys_oper_type.value.find((item: Ref) => item.value === value + "")
|
|
|
|
|
- ?.class
|
|
|
|
|
|
|
+ type: useDictClass("sys_oper_type", value + "")
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- formatter: (value, { column }) => {
|
|
|
|
|
- return (column.options as OptionsRow[])?.find(
|
|
|
|
|
- item => item.value === value + ""
|
|
|
|
|
- )?.label;
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ formatter: value => useDictValue("sys_oper_type", value),
|
|
|
hideInSearch: true
|
|
hideInSearch: true
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -101,15 +96,11 @@ const tableConfig: PlusColumn[] = [
|
|
|
options: computed(() => sys_common_status.value),
|
|
options: computed(() => sys_common_status.value),
|
|
|
fieldProps: value => {
|
|
fieldProps: value => {
|
|
|
return {
|
|
return {
|
|
|
- type: sys_common_status.value.find(
|
|
|
|
|
- (item: Ref) => item.value === value + ""
|
|
|
|
|
- )?.class
|
|
|
|
|
|
|
+ type: useDictClass("sys_common_status", value + "")
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- formatter: (value, { column }) => {
|
|
|
|
|
- return (column.options as OptionsRow[])?.find(
|
|
|
|
|
- item => item.value === value + ""
|
|
|
|
|
- )?.label;
|
|
|
|
|
|
|
+ formatter: value => {
|
|
|
|
|
+ return useDictValue("sys_common_status", value);
|
|
|
},
|
|
},
|
|
|
hideInSearch: true
|
|
hideInSearch: true
|
|
|
},
|
|
},
|