3e1d2d46 by lihua

数据产品添加逻辑空间

1 parent eed5b08c
...@@ -633,6 +633,13 @@ export const deleteLogicSpace = (guids) => request({ ...@@ -633,6 +633,13 @@ export const deleteLogicSpace = (guids) => request({
633 data: guids 633 data: guids
634 }) 634 })
635 635
636 /** 根据领域guid获取对应的逻辑空间下拉列表选择 */
637 export const getLogicSpaceListByDomainGuid = (params) => request({
638 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/logic-list-by-domain`,
639 method: 'post',
640 data: params
641 })
642
636 /** ----------------------------- 提供方进行数据申请接口联调 ---------------------------------- */ 643 /** ----------------------------- 提供方进行数据申请接口联调 ---------------------------------- */
637 644
638 export const getDataApplyPageList = (params) => request({ 645 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,
...@@ -461,11 +462,11 @@ const baseInfoFormItems = ref([ ...@@ -461,11 +462,11 @@ const baseInfoFormItems = ref([
461 label: "逻辑空间", 462 label: "逻辑空间",
462 type: "select", 463 type: "select",
463 placeholder: "请选择", 464 placeholder: "请选择",
464 field: "spaceGuid", 465 field: "logicSpaceGuid",
465 default: '', 466 default: '',
466 props: { 467 props: {
467 value: 'value', 468 value: 'logicSpaceGuid',
468 label: 'label' 469 label: 'spaceName'
469 }, 470 },
470 multiple: false, 471 multiple: false,
471 options: logicSpaceList.value, 472 options: logicSpaceList.value,
...@@ -743,8 +744,9 @@ const baseSelectChange = (val, item, row) => { ...@@ -743,8 +744,9 @@ const baseSelectChange = (val, item, row) => {
743 } else if (item.field == 'domain') { 744 } else if (item.field == 'domain') {
744 row.scenario = ''; //清空下应用场景 745 row.scenario = ''; //清空下应用场景
745 // TODO,更新下逻辑空间的列表,顺便清空值。 746 // TODO,更新下逻辑空间的列表,顺便清空值。
746 row.spaceGuid = ''; 747 row.logicSpaceGuid = '';
747 setFormItems(row); 748 setFormItems(row);
749 getLogicSpaceList(val)
748 } 750 }
749 } 751 }
750 752
...@@ -874,6 +876,24 @@ const addAssetTable = () => { ...@@ -874,6 +876,24 @@ const addAssetTable = () => {
874 importTableFieldVisible.value = true; 876 importTableFieldVisible.value = true;
875 } 877 }
876 878
879 const getLogicSpaceList = (domainGuid) => {
880 if (!domainGuid) {
881 logicSpaceList.value = [];
882 let item = baseInfoFormItems.value.find(item => item.field == 'logicSpaceGuid');
883 item && (item.options = logicSpaceList.value);
884 return;
885 }
886 getLogicSpaceListByDomainGuid({ domain: domainGuid }).then((res: any) => {
887 if (res?.code == proxy.$passCode) {
888 logicSpaceList.value = res.data || [];
889 let item = baseInfoFormItems.value.find(item => item.field == 'logicSpaceGuid');
890 item && (item.options = logicSpaceList.value);
891 } else {
892 res?.msg && proxy.$ElMessage.error(res.msg);
893 }
894 })
895 }
896
877 onActivated(() => { 897 onActivated(() => {
878 getValidApi().then((res: any) => { 898 getValidApi().then((res: any) => {
879 if (res.code == proxy.$passCode) { 899 if (res.code == proxy.$passCode) {
...@@ -894,11 +914,11 @@ onBeforeMount(() => { ...@@ -894,11 +914,11 @@ onBeforeMount(() => {
894 }) 914 })
895 if (damGuid.value) { 915 if (damGuid.value) {
896 fullscreenLoading.value = true; 916 fullscreenLoading.value = true;
897
898 getRegisterCatalogDetail({ guid: damGuid.value }).then((res: any) => { 917 getRegisterCatalogDetail({ guid: damGuid.value }).then((res: any) => {
899 fullscreenLoading.value = false; 918 fullscreenLoading.value = false;
900 if (res.code == proxy.$passCode) { 919 if (res.code == proxy.$passCode) {
901 detailInfo.value = res.data || {}; 920 detailInfo.value = res.data || {};
921 getLogicSpaceList(detailInfo.value['domain']);
902 baseInfoFormItems.value.forEach((item: any) => { 922 baseInfoFormItems.value.forEach((item: any) => {
903 item.default = detailInfo.value[item.field] == null ? '' : detailInfo.value[item.field]; 923 item.default = detailInfo.value[item.field] == null ? '' : detailInfo.value[item.field];
904 if (item.field == 'subjectDomain') { 924 if (item.field == 'subjectDomain') {
...@@ -988,6 +1008,8 @@ onBeforeMount(() => { ...@@ -988,6 +1008,8 @@ onBeforeMount(() => {
988 fullscreenLoading.value = false; 1008 fullscreenLoading.value = false;
989 } 1009 }
990 }); 1010 });
1011 } else {
1012 getLogicSpaceList('003')//默认是医疗健康领域
991 } 1013 }
992 1014
993 if (route.query.dataSources == '1') { 1015 if (route.query.dataSources == '1') {
...@@ -1333,7 +1355,8 @@ const handleImportSave = (val) => { ...@@ -1333,7 +1355,8 @@ const handleImportSave = (val) => {
1333 <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table" 1355 <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table"
1334 @table-select-change="hanldeTableSelectChange" /> 1356 @table-select-change="hanldeTableSelectChange" />
1335 <div class="row-add-btn"> 1357 <div class="row-add-btn">
1336 <el-button :disabled="productData.length >= apiList.length" link @click="addProduct" :icon="CirclePlus" v-preReClick>添加服务</el-button> 1358 <el-button :disabled="productData.length >= apiList.length" link @click="addProduct" :icon="CirclePlus"
1359 v-preReClick>添加服务</el-button>
1337 </div> 1360 </div>
1338 </ContentWrap> 1361 </ContentWrap>
1339 <ContentWrap v-if="baseInfoFormRef?.formInline?.damType != '2' && baseInfoFormRef?.formInline?.isFileResource != 'Y'" id="id-tableInfo" title="资源表" description="" 1362 <ContentWrap v-if="baseInfoFormRef?.formInline?.damType != '2' && baseInfoFormRef?.formInline?.isFileResource != 'Y'" id="id-tableInfo" title="资源表" description=""
......
...@@ -1366,9 +1366,9 @@ const respParamsTableInfo = ref({ ...@@ -1366,9 +1366,9 @@ const respParamsTableInfo = ref({
1366 <div v-if="detailInfo.domain == '004'">{{ '所属主题:' + (detailInfo.subjectDomainName || '--') }}</div> 1366 <div v-if="detailInfo.domain == '004'">{{ '所属主题:' + (detailInfo.subjectDomainName || '--') }}</div>
1367 </div> 1367 </div>
1368 <!-- </template> --> 1368 <!-- </template> -->
1369 <div class="row-extra-desc" v-if="detailInfo.spaceName"> 1369 <div class="row-extra-desc" v-if="detailInfo.logicSpaceName">
1370 <div class="per-extra-desc">{{ '权利主体:' + detailInfo.rightMainName }}</div> 1370 <div class="per-extra-desc">{{ '权利主体:' + detailInfo.rightMainName }}</div>
1371 <div>{{ '逻辑空间:' + detailInfo.spaceName }}</div> 1371 <div>{{ '逻辑空间:' + detailInfo.logicSpaceName }}</div>
1372 </div> 1372 </div>
1373 <div v-else v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }} 1373 <div v-else v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }}
1374 </div> 1374 </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!