数据产品添加逻辑空间
Showing
3 changed files
with
40 additions
and
10 deletions
| ... | @@ -627,6 +627,13 @@ export const deleteLogicSpace = (guids) => request({ | ... | @@ -627,6 +627,13 @@ export const deleteLogicSpace = (guids) => request({ |
| 627 | data: guids | 627 | data: guids |
| 628 | }) | 628 | }) |
| 629 | 629 | ||
| 630 | /** 根据领域guid获取对应的逻辑空间下拉列表选择 */ | ||
| 631 | export const getLogicSpaceListByDomainGuid = (params) => request({ | ||
| 632 | url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/logic-list-by-domain`, | ||
| 633 | method: 'post', | ||
| 634 | data: params | ||
| 635 | }) | ||
| 636 | |||
| 630 | /** ----------------------------- 提供方进行数据申请接口联调 ---------------------------------- */ | 637 | /** ----------------------------- 提供方进行数据申请接口联调 ---------------------------------- */ |
| 631 | 638 | ||
| 632 | export const getDataApplyPageList = (params) => request({ | 639 | export const getDataApplyPageList = (params) => request({ | ... | ... |
| ... | @@ -22,6 +22,7 @@ import { | ... | @@ -22,6 +22,7 @@ import { |
| 22 | checkDamTableChange, | 22 | checkDamTableChange, |
| 23 | getTenantList, | 23 | getTenantList, |
| 24 | getDamTypesList,//获取数据目录分类。 | 24 | getDamTypesList,//获取数据目录分类。 |
| 25 | getLogicSpaceListByDomainGuid, | ||
| 25 | } from "@/api/modules/dataAsset"; | 26 | } from "@/api/modules/dataAsset"; |
| 26 | import { | 27 | import { |
| 27 | getValidApi, | 28 | getValidApi, |
| ... | @@ -432,11 +433,11 @@ const baseInfoFormItems = ref([ | ... | @@ -432,11 +433,11 @@ const baseInfoFormItems = ref([ |
| 432 | label: "逻辑空间", | 433 | label: "逻辑空间", |
| 433 | type: "select", | 434 | type: "select", |
| 434 | placeholder: "请选择", | 435 | placeholder: "请选择", |
| 435 | field: "spaceGuid", | 436 | field: "logicSpaceGuid", |
| 436 | default: '', | 437 | default: '', |
| 437 | props: { | 438 | props: { |
| 438 | value: 'value', | 439 | value: 'logicSpaceGuid', |
| 439 | label: 'label' | 440 | label: 'spaceName' |
| 440 | }, | 441 | }, |
| 441 | multiple: false, | 442 | multiple: false, |
| 442 | options: logicSpaceList.value, | 443 | options: logicSpaceList.value, |
| ... | @@ -702,8 +703,9 @@ const baseSelectChange = (val, item, row) => { | ... | @@ -702,8 +703,9 @@ const baseSelectChange = (val, item, row) => { |
| 702 | } else if (item.field == 'domain') { | 703 | } else if (item.field == 'domain') { |
| 703 | row.scenario = ''; //清空下应用场景 | 704 | row.scenario = ''; //清空下应用场景 |
| 704 | // TODO,更新下逻辑空间的列表,顺便清空值。 | 705 | // TODO,更新下逻辑空间的列表,顺便清空值。 |
| 705 | row.spaceGuid = ''; | 706 | row.logicSpaceGuid = ''; |
| 706 | setFormItems(row); | 707 | setFormItems(row); |
| 708 | getLogicSpaceList(val) | ||
| 707 | } | 709 | } |
| 708 | } | 710 | } |
| 709 | 711 | ||
| ... | @@ -725,7 +727,7 @@ const getAPIOptions = (scope) => { | ... | @@ -725,7 +727,7 @@ const getAPIOptions = (scope) => { |
| 725 | const usedApiGuids = new Set( | 727 | const usedApiGuids = new Set( |
| 726 | productData.value.map(p => p.apiGuid) | 728 | productData.value.map(p => p.apiGuid) |
| 727 | ); | 729 | ); |
| 728 | 730 | ||
| 729 | return apiList.value.map(api => ({ | 731 | return apiList.value.map(api => ({ |
| 730 | ...api, | 732 | ...api, |
| 731 | disabled: api.guid !== scope.row.guid && usedApiGuids.has(api.guid) | 733 | disabled: api.guid !== scope.row.guid && usedApiGuids.has(api.guid) |
| ... | @@ -827,11 +829,29 @@ const addAssetTable = () => { | ... | @@ -827,11 +829,29 @@ const addAssetTable = () => { |
| 827 | importTableFieldVisible.value = true; | 829 | importTableFieldVisible.value = true; |
| 828 | } | 830 | } |
| 829 | 831 | ||
| 832 | const getLogicSpaceList = (domainGuid) => { | ||
| 833 | if (!domainGuid) { | ||
| 834 | logicSpaceList.value = []; | ||
| 835 | let item = baseInfoFormItems.value.find(item => item.field == 'logicSpaceGuid'); | ||
| 836 | item && (item.options = logicSpaceList.value); | ||
| 837 | return; | ||
| 838 | } | ||
| 839 | getLogicSpaceListByDomainGuid({ domain: domainGuid }).then((res: any) => { | ||
| 840 | if (res?.code == proxy.$passCode) { | ||
| 841 | logicSpaceList.value = res.data || []; | ||
| 842 | let item = baseInfoFormItems.value.find(item => item.field == 'logicSpaceGuid'); | ||
| 843 | item && (item.options = logicSpaceList.value); | ||
| 844 | } else { | ||
| 845 | res?.msg && proxy.$ElMessage.error(res.msg); | ||
| 846 | } | ||
| 847 | }) | ||
| 848 | } | ||
| 849 | |||
| 830 | onActivated(() => { | 850 | onActivated(() => { |
| 831 | getValidApi().then((res: any) => { | 851 | getValidApi().then((res: any) => { |
| 832 | if (res.code == proxy.$passCode) { | 852 | if (res.code == proxy.$passCode) { |
| 833 | apiList.value = res.data || []; | 853 | apiList.value = res.data || []; |
| 834 | // productTableInfo.value.editInfo.apiGuid.getOptions = (scope) => getAPIOptions(scope); | 854 | // productTableInfo.value.editInfo.apiGuid.getOptions = (scope) => getAPIOptions(scope); |
| 835 | } else { | 855 | } else { |
| 836 | proxy.$ElMessage.error(res.msg); | 856 | proxy.$ElMessage.error(res.msg); |
| 837 | } | 857 | } |
| ... | @@ -847,11 +867,11 @@ onBeforeMount(() => { | ... | @@ -847,11 +867,11 @@ onBeforeMount(() => { |
| 847 | }) | 867 | }) |
| 848 | if (damGuid.value) { | 868 | if (damGuid.value) { |
| 849 | fullscreenLoading.value = true; | 869 | fullscreenLoading.value = true; |
| 850 | |||
| 851 | getRegisterCatalogDetail({ guid: damGuid.value }).then((res: any) => { | 870 | getRegisterCatalogDetail({ guid: damGuid.value }).then((res: any) => { |
| 852 | fullscreenLoading.value = false; | 871 | fullscreenLoading.value = false; |
| 853 | if (res.code == proxy.$passCode) { | 872 | if (res.code == proxy.$passCode) { |
| 854 | detailInfo.value = res.data || {}; | 873 | detailInfo.value = res.data || {}; |
| 874 | getLogicSpaceList(detailInfo.value['domain']); | ||
| 855 | baseInfoFormItems.value.forEach((item: any) => { | 875 | baseInfoFormItems.value.forEach((item: any) => { |
| 856 | item.default = detailInfo.value[item.field] == null ? '' : detailInfo.value[item.field]; | 876 | item.default = detailInfo.value[item.field] == null ? '' : detailInfo.value[item.field]; |
| 857 | if (item.field == 'subjectDomain') { | 877 | if (item.field == 'subjectDomain') { |
| ... | @@ -936,6 +956,8 @@ onBeforeMount(() => { | ... | @@ -936,6 +956,8 @@ onBeforeMount(() => { |
| 936 | fullscreenLoading.value = false; | 956 | fullscreenLoading.value = false; |
| 937 | } | 957 | } |
| 938 | }); | 958 | }); |
| 959 | } else { | ||
| 960 | getLogicSpaceList('003')//默认是医疗健康领域 | ||
| 939 | } | 961 | } |
| 940 | 962 | ||
| 941 | if (route.query.dataSources == '1') { | 963 | if (route.query.dataSources == '1') { |
| ... | @@ -1273,7 +1295,8 @@ const handleImportSave = (val) => { | ... | @@ -1273,7 +1295,8 @@ const handleImportSave = (val) => { |
| 1273 | <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table" | 1295 | <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table" |
| 1274 | @table-select-change="hanldeTableSelectChange" /> | 1296 | @table-select-change="hanldeTableSelectChange" /> |
| 1275 | <div class="row-add-btn"> | 1297 | <div class="row-add-btn"> |
| 1276 | <el-button :disabled="productData.length >= apiList.length" link @click="addProduct" :icon="CirclePlus" v-preReClick>添加服务</el-button> | 1298 | <el-button :disabled="productData.length >= apiList.length" link @click="addProduct" :icon="CirclePlus" |
| 1299 | v-preReClick>添加服务</el-button> | ||
| 1277 | </div> | 1300 | </div> |
| 1278 | </ContentWrap> | 1301 | </ContentWrap> |
| 1279 | <ContentWrap v-if="baseInfoFormRef?.formInline?.damType != '2'" id="id-tableInfo" title="资源表" description="" | 1302 | <ContentWrap v-if="baseInfoFormRef?.formInline?.damType != '2'" id="id-tableInfo" title="资源表" description="" | ... | ... |
| ... | @@ -1314,9 +1314,9 @@ const respParamsTableInfo = ref({ | ... | @@ -1314,9 +1314,9 @@ const respParamsTableInfo = ref({ |
| 1314 | <div v-if="detailInfo.domain == '004'">{{ '所属主题:' + (detailInfo.subjectDomainName || '--') }}</div> | 1314 | <div v-if="detailInfo.domain == '004'">{{ '所属主题:' + (detailInfo.subjectDomainName || '--') }}</div> |
| 1315 | </div> | 1315 | </div> |
| 1316 | <!-- </template> --> | 1316 | <!-- </template> --> |
| 1317 | <div class="row-extra-desc" v-if="detailInfo.spaceName"> | 1317 | <div class="row-extra-desc" v-if="detailInfo.logicSpaceName"> |
| 1318 | <div class="per-extra-desc">{{ '权利主体:' + detailInfo.rightMainName }}</div> | 1318 | <div class="per-extra-desc">{{ '权利主体:' + detailInfo.rightMainName }}</div> |
| 1319 | <div>{{ '逻辑空间:' + detailInfo.spaceName }}</div> | 1319 | <div>{{ '逻辑空间:' + detailInfo.logicSpaceName }}</div> |
| 1320 | </div> | 1320 | </div> |
| 1321 | <div v-else v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }} | 1321 | <div v-else v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }} |
| 1322 | </div> | 1322 | </div> | ... | ... |
-
Please register or sign in to post a comment