|
|
@@ -132,10 +132,9 @@ import {
|
|
|
getCurrentInstance,
|
|
|
computed,
|
|
|
} from 'vue';
|
|
|
-import { getDictItemList, fetchDeleteDict } from '@/api/dict';
|
|
|
+import { getDictItemList, fetchDeleteDictItem } from '@/api/dict';
|
|
|
import type { DictItemParams, DataList, ItemDataList } from '@/api/dict';
|
|
|
import { SizeProps, Pagination } from '@/types/global';
|
|
|
-import BTag from '@/components/business/b-tag/index.vue';
|
|
|
import { Modal } from '@arco-design/web-vue';
|
|
|
import useLoading from '@/hooks/loading';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
|
@@ -217,7 +216,7 @@ const pagination = reactive({
|
|
|
});
|
|
|
const generateFormModel = () => {
|
|
|
return {
|
|
|
- dictId: 0,
|
|
|
+ dictId: '0',
|
|
|
} as DictItemParams;
|
|
|
};
|
|
|
const renderData = ref<ItemDataList[]>([] as ItemDataList[]);
|
|
|
@@ -229,7 +228,7 @@ const listObj = ref<ItemDataList>({} as ItemDataList);
|
|
|
const this_ = getCurrentInstance()?.appContext.config.globalProperties;
|
|
|
function searchTable() {
|
|
|
// setLoading(true);
|
|
|
- formModel.value.dictId = Number(id);
|
|
|
+ formModel.value.dictId = id.toString();
|
|
|
getDictItemList(formModel.value)
|
|
|
.then(res => {
|
|
|
pagination.current = 1;
|
|
|
@@ -256,8 +255,6 @@ const updateListFun = () => {
|
|
|
searchTable();
|
|
|
};
|
|
|
const handleEditFun = (value: ItemDataList) => {
|
|
|
- value.dictCode = value.dictCode?.toString();
|
|
|
- console.log('aaa', value);
|
|
|
listObj.value = value as ItemDataList;
|
|
|
showEditDialog.value = true;
|
|
|
};
|
|
|
@@ -267,7 +264,7 @@ const handleDeleteFun = (id: number) => {
|
|
|
content: t('modal.warning.content'),
|
|
|
okText: t('searchTable.form.confirm'),
|
|
|
onBeforeOk: (done: (closed: boolean) => void) => {
|
|
|
- fetchDeleteDict({ id })
|
|
|
+ fetchDeleteDictItem({ id })
|
|
|
.then(res => {
|
|
|
if (res.success) {
|
|
|
this_?.$message.success(t('message.success'));
|