|
@@ -17,13 +17,17 @@
|
|
|
listDictApi,
|
|
listDictApi,
|
|
|
getByIdDictApi,
|
|
getByIdDictApi,
|
|
|
deleteDictApi,
|
|
deleteDictApi,
|
|
|
- batchSaveUpdateDictApi,
|
|
|
|
|
|
|
+ saveUpdateDictApi,
|
|
|
} from './DataDictListView.api';
|
|
} from './DataDictListView.api';
|
|
|
|
|
+ import { storeToRefs } from 'pinia';
|
|
|
|
|
+ import { useUserStore } from '@/store/modules/user';
|
|
|
|
|
|
|
|
const emit = defineEmits(['code-change']);
|
|
const emit = defineEmits(['code-change']);
|
|
|
|
|
|
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
|
|
|
|
|
|
|
|
+ const { getIsPlatformTenant } = storeToRefs(useUserStore());
|
|
|
|
|
+
|
|
|
const handleCurrentChange = ({ row }: any) => {
|
|
const handleCurrentChange = ({ row }: any) => {
|
|
|
emit('code-change', row.id);
|
|
emit('code-change', row.id);
|
|
|
};
|
|
};
|
|
@@ -57,7 +61,7 @@
|
|
|
},
|
|
},
|
|
|
addEditConfig: {
|
|
addEditConfig: {
|
|
|
formConfig: {
|
|
formConfig: {
|
|
|
- schemas: getDataDictGroupAddEditSchemas(t),
|
|
|
|
|
|
|
+ schemas: getDataDictGroupAddEditSchemas(t, getIsPlatformTenant),
|
|
|
baseColProps: {
|
|
baseColProps: {
|
|
|
span: 24,
|
|
span: 24,
|
|
|
},
|
|
},
|
|
@@ -79,7 +83,7 @@
|
|
|
return listDictApi(parameter);
|
|
return listDictApi(parameter);
|
|
|
},
|
|
},
|
|
|
save: ({ body: { insertRecords, updateRecords } }) =>
|
|
save: ({ body: { insertRecords, updateRecords } }) =>
|
|
|
- batchSaveUpdateDictApi([...insertRecords, ...updateRecords]),
|
|
|
|
|
|
|
+ saveUpdateDictApi([...insertRecords, ...updateRecords][0]),
|
|
|
delete: ({ body: { removeRecords } }) => deleteDictApi(removeRecords),
|
|
delete: ({ body: { removeRecords } }) => deleteDictApi(removeRecords),
|
|
|
getById: (params) => getByIdDictApi(params.id),
|
|
getById: (params) => getByIdDictApi(params.id),
|
|
|
},
|
|
},
|