2c31b6ac by lihua

数据产品添加逻辑空间

1 parent 4c2c9627
...@@ -669,6 +669,13 @@ export const deleteLogicSpace = (guids) => request({ ...@@ -669,6 +669,13 @@ export const deleteLogicSpace = (guids) => request({
669 data: guids 669 data: guids
670 }) 670 })
671 671
672 /** 根据领域guid获取对应的逻辑空间下拉列表选择 */
673 export const getLogicSpaceListByDomainGuid = (params) => request({
674 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/logic-list-by-domain`,
675 method: 'post',
676 data: params
677 })
678
672 /** ----------------------------- 提供方进行数据申请接口联调 ---------------------------------- */ 679 /** ----------------------------- 提供方进行数据申请接口联调 ---------------------------------- */
673 680
674 export const getDataApplyPageList = (params) => request({ 681 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') {
...@@ -1276,7 +1298,8 @@ const handleImportSave = (val) => { ...@@ -1276,7 +1298,8 @@ const handleImportSave = (val) => {
1276 <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table" 1298 <Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table"
1277 @table-select-change="hanldeTableSelectChange" /> 1299 @table-select-change="hanldeTableSelectChange" />
1278 <div class="row-add-btn"> 1300 <div class="row-add-btn">
1279 <el-button :disabled="productData.length >= apiList.length" link @click="addProduct" :icon="CirclePlus" v-preReClick>添加服务</el-button> 1301 <el-button :disabled="productData.length >= apiList.length" link @click="addProduct" :icon="CirclePlus"
1302 v-preReClick>添加服务</el-button>
1280 </div> 1303 </div>
1281 </ContentWrap> 1304 </ContentWrap>
1282 <ContentWrap v-if="baseInfoFormRef?.formInline?.damType != '2'" id="id-tableInfo" title="资源表" description="" 1305 <ContentWrap v-if="baseInfoFormRef?.formInline?.damType != '2'" id="id-tableInfo" title="资源表" description=""
......
...@@ -1326,9 +1326,9 @@ const respParamsTableInfo = ref({ ...@@ -1326,9 +1326,9 @@ const respParamsTableInfo = ref({
1326 <div v-if="detailInfo.domain == '004'">{{ '所属主题:' + (detailInfo.subjectDomainName || '--') }}</div> 1326 <div v-if="detailInfo.domain == '004'">{{ '所属主题:' + (detailInfo.subjectDomainName || '--') }}</div>
1327 </div> 1327 </div>
1328 <!-- </template> --> 1328 <!-- </template> -->
1329 <div class="row-extra-desc" v-if="detailInfo.spaceName"> 1329 <div class="row-extra-desc" v-if="detailInfo.logicSpaceName">
1330 <div class="per-extra-desc">{{ '权利主体:' + detailInfo.rightMainName }}</div> 1330 <div class="per-extra-desc">{{ '权利主体:' + detailInfo.rightMainName }}</div>
1331 <div>{{ '逻辑空间:' + detailInfo.spaceName }}</div> 1331 <div>{{ '逻辑空间:' + detailInfo.logicSpaceName }}</div>
1332 </div> 1332 </div>
1333 <div v-else v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }} 1333 <div v-else v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }}
1334 </div> 1334 </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!