2c31b6ac by lihua

数据产品添加逻辑空间

1 parent 4c2c9627
......@@ -669,6 +669,13 @@ export const deleteLogicSpace = (guids) => request({
data: guids
})
/** 根据领域guid获取对应的逻辑空间下拉列表选择 */
export const getLogicSpaceListByDomainGuid = (params) => request({
url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/logic-list-by-domain`,
method: 'post',
data: params
})
/** ----------------------------- 提供方进行数据申请接口联调 ---------------------------------- */
export const getDataApplyPageList = (params) => request({
......
......@@ -22,6 +22,7 @@ import {
checkDamTableChange,
getTenantList,
getDamTypesList,//获取数据目录分类。
getLogicSpaceListByDomainGuid,
} from "@/api/modules/dataAsset";
import {
getValidApi,
......@@ -432,11 +433,11 @@ const baseInfoFormItems = ref([
label: "逻辑空间",
type: "select",
placeholder: "请选择",
field: "spaceGuid",
field: "logicSpaceGuid",
default: '',
props: {
value: 'value',
label: 'label'
value: 'logicSpaceGuid',
label: 'spaceName'
},
multiple: false,
options: logicSpaceList.value,
......@@ -702,8 +703,9 @@ const baseSelectChange = (val, item, row) => {
} else if (item.field == 'domain') {
row.scenario = ''; //清空下应用场景
// TODO,更新下逻辑空间的列表,顺便清空值。
row.spaceGuid = '';
row.logicSpaceGuid = '';
setFormItems(row);
getLogicSpaceList(val)
}
}
......@@ -827,6 +829,24 @@ const addAssetTable = () => {
importTableFieldVisible.value = true;
}
const getLogicSpaceList = (domainGuid) => {
if (!domainGuid) {
logicSpaceList.value = [];
let item = baseInfoFormItems.value.find(item => item.field == 'logicSpaceGuid');
item && (item.options = logicSpaceList.value);
return;
}
getLogicSpaceListByDomainGuid({ domain: domainGuid }).then((res: any) => {
if (res?.code == proxy.$passCode) {
logicSpaceList.value = res.data || [];
let item = baseInfoFormItems.value.find(item => item.field == 'logicSpaceGuid');
item && (item.options = logicSpaceList.value);
} else {
res?.msg && proxy.$ElMessage.error(res.msg);
}
})
}
onActivated(() => {
getValidApi().then((res: any) => {
if (res.code == proxy.$passCode) {
......@@ -847,11 +867,11 @@ onBeforeMount(() => {
})
if (damGuid.value) {
fullscreenLoading.value = true;
getRegisterCatalogDetail({ guid: damGuid.value }).then((res: any) => {
fullscreenLoading.value = false;
if (res.code == proxy.$passCode) {
detailInfo.value = res.data || {};
getLogicSpaceList(detailInfo.value['domain']);
baseInfoFormItems.value.forEach((item: any) => {
item.default = detailInfo.value[item.field] == null ? '' : detailInfo.value[item.field];
if (item.field == 'subjectDomain') {
......@@ -936,6 +956,8 @@ onBeforeMount(() => {
fullscreenLoading.value = false;
}
});
} else {
getLogicSpaceList('003')//默认是医疗健康领域
}
if (route.query.dataSources == '1') {
......@@ -1276,7 +1298,8 @@ const handleImportSave = (val) => {
<Table ref="productTableRef" :tableInfo="productTableInfo" class="fiveRow-table"
@table-select-change="hanldeTableSelectChange" />
<div class="row-add-btn">
<el-button :disabled="productData.length >= apiList.length" link @click="addProduct" :icon="CirclePlus" v-preReClick>添加服务</el-button>
<el-button :disabled="productData.length >= apiList.length" link @click="addProduct" :icon="CirclePlus"
v-preReClick>添加服务</el-button>
</div>
</ContentWrap>
<ContentWrap v-if="baseInfoFormRef?.formInline?.damType != '2'" id="id-tableInfo" title="资源表" description=""
......
......@@ -1326,9 +1326,9 @@ const respParamsTableInfo = ref({
<div v-if="detailInfo.domain == '004'">{{ '所属主题:' + (detailInfo.subjectDomainName || '--') }}</div>
</div>
<!-- </template> -->
<div class="row-extra-desc" v-if="detailInfo.spaceName">
<div class="row-extra-desc" v-if="detailInfo.logicSpaceName">
<div class="per-extra-desc">{{ '权利主体:' + detailInfo.rightMainName }}</div>
<div>{{ '逻辑空间:' + detailInfo.spaceName }}</div>
<div>{{ '逻辑空间:' + detailInfo.logicSpaceName }}</div>
</div>
<div v-else v-show="detailInfo.rightMainName" class="applicationScenarios">{{ '权利主体:' + detailInfo.rightMainName }}
</div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!