添加数据目录分类接口联调
Showing
3 changed files
with
31 additions
and
25 deletions
| ... | @@ -291,7 +291,7 @@ export const getParamsList = (params) => request({ | ... | @@ -291,7 +291,7 @@ export const getParamsList = (params) => request({ |
| 291 | // data: { paramCode: "DAM-TYPE" } | 291 | // data: { paramCode: "DAM-TYPE" } |
| 292 | // }) | 292 | // }) |
| 293 | export const getDamTypesList = (params) => request({ | 293 | export const getDamTypesList = (params) => request({ |
| 294 | url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType`, | 294 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/dict/data/get-by-dictType`, |
| 295 | method: 'get', | 295 | method: 'get', |
| 296 | params | 296 | params |
| 297 | }) | 297 | }) |
| ... | @@ -608,3 +608,9 @@ export const getDictData = (params) => request({ | ... | @@ -608,3 +608,9 @@ export const getDictData = (params) => request({ |
| 608 | method: 'post', | 608 | method: 'post', |
| 609 | data: params | 609 | data: params |
| 610 | }) | 610 | }) |
| 611 | |||
| 612 | export const addDictDictionary = (params) => request({ | ||
| 613 | url: `${import.meta.env.VITE_API_NEW_PORTAL}/dict/save-dict`, | ||
| 614 | method: 'post', | ||
| 615 | data: params | ||
| 616 | }) | ... | ... |
| ... | @@ -78,6 +78,7 @@ import { | ... | @@ -78,6 +78,7 @@ import { |
| 78 | getDictClass, | 78 | getDictClass, |
| 79 | removeDict, | 79 | removeDict, |
| 80 | getDictData, | 80 | getDictData, |
| 81 | addDictDictionary, | ||
| 81 | } from "@/api/modules/dataAsset"; | 82 | } from "@/api/modules/dataAsset"; |
| 82 | 83 | ||
| 83 | const { required } = useValidator(); | 84 | const { required } = useValidator(); |
| ... | @@ -574,8 +575,7 @@ const tableSelectionChange = (val) => { | ... | @@ -574,8 +575,7 @@ const tableSelectionChange = (val) => { |
| 574 | selectRowData.value = val.map((item) => item.guid); | 575 | selectRowData.value = val.map((item) => item.guid); |
| 575 | } | 576 | } |
| 576 | // 批量删除 | 577 | // 批量删除 |
| 577 | function batchDelete(param) { | 578 | const batchDelete = () => { |
| 578 | if (param == "delete") { | ||
| 579 | if (selectRowData.value.length == 0) { | 579 | if (selectRowData.value.length == 0) { |
| 580 | ElMessage({ | 580 | ElMessage({ |
| 581 | type: "info", | 581 | type: "info", |
| ... | @@ -597,7 +597,6 @@ function batchDelete(param) { | ... | @@ -597,7 +597,6 @@ function batchDelete(param) { |
| 597 | } | 597 | } |
| 598 | }) | 598 | }) |
| 599 | }); | 599 | }); |
| 600 | } | ||
| 601 | }; | 600 | }; |
| 602 | 601 | ||
| 603 | const tablePageChange = (info) => { | 602 | const tablePageChange = (info) => { |
| ... | @@ -674,7 +673,7 @@ const tableInfo = ref({ | ... | @@ -674,7 +673,7 @@ const tableInfo = ref({ |
| 674 | align: "center", | 673 | align: "center", |
| 675 | }, | 674 | }, |
| 676 | { | 675 | { |
| 677 | label: "字典描述", | 676 | label: "描述", |
| 678 | field: "remarks", | 677 | field: "remarks", |
| 679 | width: 160, | 678 | width: 160, |
| 680 | }, | 679 | }, |
| ... | @@ -814,19 +813,20 @@ const drawerBtnClick = (btn, info) => { | ... | @@ -814,19 +813,20 @@ const drawerBtnClick = (btn, info) => { |
| 814 | if (drawerInfo.value.type != 'add') { | 813 | if (drawerInfo.value.type != 'add') { |
| 815 | info.guid = currEditTableRow.value.guid; | 814 | info.guid = currEditTableRow.value.guid; |
| 816 | } | 815 | } |
| 817 | 816 | drawerInfo.value.footer.btns[1].loading = true; | |
| 818 | //TODO | 817 | addDictDictionary(info).then((res: any) => { |
| 819 | 818 | drawerInfo.value.footer.btns[1].loading = false; | |
| 820 | // dictApi.addDictionary(resultForm1).then(res => { | 819 | if (res.code === proxy.$passCode) { |
| 821 | // if (res.data.code === proxy.$passCode) { | 820 | proxy.$ElMessage({ |
| 822 | // proxy.$ElMessage({ | 821 | type: 'success', |
| 823 | // type: 'success', | 822 | message: message |
| 824 | // message: message | 823 | }) |
| 825 | // }) | 824 | drawerInfo.value.visible = false; |
| 826 | // drawerInfo.value.visible = false; | 825 | toSearch(params.value) |
| 827 | // toSearch(params.value) | 826 | } else { |
| 828 | // } | 827 | proxy.$ElMessage.error(res.msg); |
| 829 | // }); | 828 | } |
| 829 | }); | ||
| 830 | } else { | 830 | } else { |
| 831 | drawerInfo.value.container.id = "add-dictionary-form"; | 831 | drawerInfo.value.container.id = "add-dictionary-form"; |
| 832 | drawerInfo.value.visible = false; | 832 | drawerInfo.value.visible = false; | ... | ... |
| ... | @@ -8,7 +8,6 @@ import { useRouter, useRoute } from "vue-router"; | ... | @@ -8,7 +8,6 @@ import { useRouter, useRoute } from "vue-router"; |
| 8 | import useUserStore from "@/store/modules/user"; | 8 | import useUserStore from "@/store/modules/user"; |
| 9 | import { | 9 | import { |
| 10 | getAreaData, | 10 | getAreaData, |
| 11 | getParamsList, | ||
| 12 | } from "@/api/modules/queryService"; | 11 | } from "@/api/modules/queryService"; |
| 13 | import { | 12 | import { |
| 14 | registerCatalogSave, | 13 | registerCatalogSave, |
| ... | @@ -22,6 +21,7 @@ import { | ... | @@ -22,6 +21,7 @@ import { |
| 22 | getRegisterCatalogTableList, | 21 | getRegisterCatalogTableList, |
| 23 | checkDamTableChange, | 22 | checkDamTableChange, |
| 24 | getTenantList, | 23 | getTenantList, |
| 24 | getDamTypesList | ||
| 25 | } from "@/api/modules/dataAsset"; | 25 | } from "@/api/modules/dataAsset"; |
| 26 | import { | 26 | import { |
| 27 | getValidApi, | 27 | getValidApi, |
| ... | @@ -867,7 +867,7 @@ onBeforeMount(() => { | ... | @@ -867,7 +867,7 @@ onBeforeMount(() => { |
| 867 | }) | 867 | }) |
| 868 | } | 868 | } |
| 869 | 869 | ||
| 870 | getParamsList({ | 870 | getDamTypesList({ |
| 871 | dictType: "资产类型", | 871 | dictType: "资产类型", |
| 872 | }).then((res: any) => { | 872 | }).then((res: any) => { |
| 873 | if (res.code == proxy.$passCode) { | 873 | if (res.code == proxy.$passCode) { |
| ... | @@ -878,7 +878,7 @@ onBeforeMount(() => { | ... | @@ -878,7 +878,7 @@ onBeforeMount(() => { |
| 878 | proxy.$ElMessage.error(res.msg); | 878 | proxy.$ElMessage.error(res.msg); |
| 879 | } | 879 | } |
| 880 | }) | 880 | }) |
| 881 | getParamsList({ | 881 | getDamTypesList({ |
| 882 | dictType: "数据资产目录主题名称", | 882 | dictType: "数据资产目录主题名称", |
| 883 | }).then((res: any) => { | 883 | }).then((res: any) => { |
| 884 | if (res.code == proxy.$passCode) { | 884 | if (res.code == proxy.$passCode) { |
| ... | @@ -890,7 +890,7 @@ onBeforeMount(() => { | ... | @@ -890,7 +890,7 @@ onBeforeMount(() => { |
| 890 | } | 890 | } |
| 891 | }) | 891 | }) |
| 892 | 892 | ||
| 893 | getParamsList({ | 893 | getDamTypesList({ |
| 894 | dictType: "行业分类", | 894 | dictType: "行业分类", |
| 895 | }).then((res: any) => { | 895 | }).then((res: any) => { |
| 896 | if (res.code == proxy.$passCode) { | 896 | if (res.code == proxy.$passCode) { |
| ... | @@ -902,7 +902,7 @@ onBeforeMount(() => { | ... | @@ -902,7 +902,7 @@ onBeforeMount(() => { |
| 902 | } | 902 | } |
| 903 | }) | 903 | }) |
| 904 | 904 | ||
| 905 | getParamsList({ dictType: '领域' }).then((res: any) => { | 905 | getDamTypesList({ dictType: '领域' }).then((res: any) => { |
| 906 | if (res.code == proxy.$passCode) { | 906 | if (res.code == proxy.$passCode) { |
| 907 | domainDictList.value = res.data || []; | 907 | domainDictList.value = res.data || []; |
| 908 | let itemIndex = baseInfoFormItems.value.findIndex(item => item.field == 'domain'); | 908 | let itemIndex = baseInfoFormItems.value.findIndex(item => item.field == 'domain'); |
| ... | @@ -915,7 +915,7 @@ onBeforeMount(() => { | ... | @@ -915,7 +915,7 @@ onBeforeMount(() => { |
| 915 | } | 915 | } |
| 916 | }); | 916 | }); |
| 917 | 917 | ||
| 918 | getParamsList({ | 918 | getDamTypesList({ |
| 919 | dictType: "组织机构性质", | 919 | dictType: "组织机构性质", |
| 920 | }).then((res: any) => { | 920 | }).then((res: any) => { |
| 921 | if (res.code == proxy.$passCode) { | 921 | if (res.code == proxy.$passCode) { |
| ... | @@ -927,7 +927,7 @@ onBeforeMount(() => { | ... | @@ -927,7 +927,7 @@ onBeforeMount(() => { |
| 927 | } | 927 | } |
| 928 | }) | 928 | }) |
| 929 | 929 | ||
| 930 | getParamsList({ | 930 | getDamTypesList({ |
| 931 | dictType: "更新周期", | 931 | dictType: "更新周期", |
| 932 | }).then((res: any) => { | 932 | }).then((res: any) => { |
| 933 | if (res.code == proxy.$passCode) { | 933 | if (res.code == proxy.$passCode) { | ... | ... |
-
Please register or sign in to post a comment