9324c603 by lihua

产品只能在门户上架

1 parent dd863cd4
......@@ -321,6 +321,11 @@ export const getDamTypesList = (params) => request({
// params
// })
/** 获取权利主体下拉列表 */
export const getDamCatalogRightMainList = () => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/right-main-list`,
method: 'get',
})
export const getDamCatalogTable = (params) => request({
url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/page-list`,
......
......@@ -22,7 +22,6 @@ import {
getRegisterCatalogTableList,
checkDamTableChange,
getTenantList,
getRegisterCatalogProductList
} from "@/api/modules/dataAsset";
import {
getValidApi,
......@@ -759,22 +758,6 @@ const addAssetTable = () => {
}
onBeforeMount(() => {
// const currentTenantGuid = localStorage.getItem('currentTenantGuid');
// getCurrentUserInfo({tenantGuid: currentTenantGuid}).then((res: any) => {
// console.log(res, 'getCurrentUserInfo');
// if (res.code == '00000') {
// localStorage.setItem('userData', JSON.stringify(res.data));
// } else {
// ElMessage.error(res.msg)
// }
// })
// if (route.query.guid && route.query.foundMode == '2') {
// baseInfoFormItems.value[0].disabled = true;
// baseInfoFormItems.value[1].disabled = true;
// baseInfoFormItems.value[2].disabled = true;
// baseInfoFormItems.value[5].disabled = true;
// }
getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => {
if (res?.code == proxy.$passCode) {
parentAreaData.value = res.data ?? [];
......@@ -884,22 +867,6 @@ onBeforeMount(() => {
})
}
// getRegisterCatalogProductList().then((res: any) => {
// catalogProductList.value = [];
// if (res.code == proxy.$passCode) {
// catalogProductList.value = res.data || [];
// baseInfoFormItems.value[0].options = catalogProductList.value;
// if (detailInfo.value?.productCode) {
// let item = catalogProductList.value.find(c => c.productId == detailInfo.value?.productCode);
// if (!item) {
// baseInfoFormItems.value[0].default = detailInfo.value.damName;
// }
// }
// } else {
// proxy.$ElMessage.error(res.msg);
// }
// })
getParamsList({
dictType: "资产类型",
}).then((res: any) => {
......
......@@ -7,10 +7,10 @@ import { ref } from "vue";
import TableTools from "@/components/Tools/table_tools.vue";
import { useRouter, useRoute } from "vue-router";
import {
getParamsList,
getDamCatalogTable,
registerCatalogDelete,
getDamTypesList,
getDamCatalogRightMainList,
getDataReceiveContract
} from "@/api/modules/dataAsset";
import { commonPageConfig } from "@/utils/enum";
......@@ -33,21 +33,26 @@ const props = defineProps({
const router = useRouter();
const { proxy } = getCurrentInstance() as any;
const damTypes: any = ref([]);
const dataSources: any = ref([]);
const subjectDomainListData: any = ref([])
// const subjectDomainListData: any = ref([])
// 登记状态 Y 已登记 N 未登记
const isRegisterOptions = ref<any>([
{ label: "已登记", value: "Y" },
{ label: "未登记", value: "N" },
])
/** 数据列表中所有的权利主体 */
const rightMainTenantList: any = ref([]);
// 数据来源 1:自建 2:加工交付
const damTypesOptions = ref<any>([
{ label: "自建", value: 1 },
{ label: "加工交付", value: 2 },
{ label: "江苏专区", value: 4 },
// { label: "可信数据空间", value: 5 },
])
// const damTypesOptions = ref<any>([
// { label: "自建", value: 1 },
// { label: "加工交付", value: 2 },
// { label: "专区", value: 3 },
// { label: "江苏专区", value: 4 },
// // { label: "数据港", value: 5 },
// ])
const searchItemList = ref([
{
type: "input",
......@@ -71,40 +76,40 @@ const searchItemList = ref([
label: 'label'
}
},
{
label: '所属主题',
type: 'tree-select',
placeholder: '所属主题',
field: 'subjectDomain',
nodeKey: 'value',
options: subjectDomainListData.value,
//showAllLevels: false,
checkStrictly: false,//只能选择叶子节点。
lazy: false,
multiple: true,
collapseTagsTooltip: true,
collapseTags: true,
props: {
label: "label",
value: "value",
},
filterable: true,
clearable: true,
default: [],
showCheckbox: true
},
// {
// label: '所属主题',
// type: 'tree-select',
// placeholder: '所属主题',
// field: 'subjectDomain',
// nodeKey: 'value',
// options: subjectDomainListData.value,
// //showAllLevels: false,
// checkStrictly: false,//只能选择叶子节点。
// lazy: false,
// multiple: true,
// collapseTagsTooltip: true,
// collapseTags: true,
// props: {
// label: "label",
// value: "value",
// },
// filterable: true,
// clearable: true,
// default: [],
// showCheckbox: true
// },
{
type: "select",
label: "",
field: "foundMode",
field: "rightMain",
default: "",
placeholder: "产品来源",
placeholder: "权利主体",
clearable: true,
filterable: true,
options: damTypesOptions.value,
options: rightMainTenantList.value,
props: {
value: 'value',
label: 'label'
value: 'right_main',
label: 'right_main_name'
}
},
{
......@@ -132,8 +137,7 @@ const pageInfo = ref({
tenantGuid: "",
dataSources: "",
isRegister: "",
foundMode: "",
subjectDomain: [],
rightMain: ''
});
const listDataLoading = ref(false);
......@@ -143,16 +147,6 @@ const listData: any = ref([]);
/** 记录点击省略号弹出菜单的visible */
const cardBtnVisible: any = ref(false);
const getTableBtns = (row) => {
if (row.isRegister == 'Y' || row.foundMode == 2) {
return [];
}
let btnsArr: any[] = [];
btnsArr.push({ label: "编辑", value: "edit" });
btnsArr.push({ label: "删除", value: "delete" });
return btnsArr;
};
const currTableData: any = ref({});
const tableBtnClick = (scope, btn) => {
......@@ -201,18 +195,17 @@ const handleDataClick = (item) => {
}
};
const getTableData = () => {
const getTableData = (isPage = false) => {
listDataLoading.value = true;
getDamCatalogTable({
pageSize: pageInfo.value.limit,
pageIndex: pageInfo.value.curr,
damName: pageInfo.value.damName,
damType: pageInfo.value.damType,
subjectDomain: pageInfo.value.subjectDomain || [],
tenantGuid: pageInfo.value.tenantGuid,
dataSources: props.dataSources,
isRegister: pageInfo.value.isRegister,
foundMode: pageInfo.value.foundMode,
rightMain: pageInfo.value.rightMain
}).then((res: any) => {
listDataLoading.value = false;
if (res.code == proxy.$passCode) {
......@@ -224,6 +217,19 @@ const getTableData = () => {
} else {
proxy.$ElMessage.error(res.msg);
}
});
if (isPage) {
return;
}
//TODO。获取权利主体下拉接口,每次表格数据变化都需要更新,除了分页场景。
getDamCatalogRightMainList().then((res: any) => {
if (res.code == proxy.$passCode) {
rightMainTenantList.value = res.data || [];
let item = searchItemList.value.find(item => item.field == 'rightMain');
item && (item.options = rightMainTenantList.value);
} else {
proxy.$ElMessage.error(res.msg);
}
})
};
......@@ -234,19 +240,17 @@ const toSearch = (val: any, clear: boolean = false) => {
searchItemList.value.map((item) => (item.default = ""));
pageInfo.value.damName = "";
pageInfo.value.damType = "";
pageInfo.value.subjectDomain = [];
pageInfo.value.tenantGuid = "";
pageInfo.value.isRegister = "";
pageInfo.value.rightMain = '';
// pageInfo.value.dataSources = "";
pageInfo.value.foundMode = "";
} else {
pageInfo.value.damName = val.damName;
pageInfo.value.damType = val.damType;
pageInfo.value.subjectDomain = val.subjectDomain;
pageInfo.value.tenantGuid = val.tenantGuid;
pageInfo.value.isRegister = val.isRegister;
pageInfo.value.rightMain = val.rightMain;
// pageInfo.value.dataSources = val.dataSources;
pageInfo.value.foundMode = val.foundMode;
}
getTableData();
};
......@@ -254,7 +258,7 @@ const toSearch = (val: any, clear: boolean = false) => {
const pageChange = (info) => {
pageInfo.value.curr = Number(info.curr);
pageInfo.value.limit = Number(info.limit);
getTableData();
getTableData(true);
};
onActivated(() => {
......@@ -268,18 +272,6 @@ onActivated(() => {
onBeforeMount(() => {
getDamTypesList({
dictType: "数据来源",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
dataSources.value = res.data || [];
let item = searchItemList.value.find(item => item.field == 'dataSources');
item && (item.options = dataSources.value);
} else {
proxy.$ElMessage.error(res.msg);
}
})
getDamTypesList({
dictType: "资产类型",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
......@@ -290,30 +282,7 @@ onBeforeMount(() => {
proxy.$ElMessage.error(res.msg);
}
})
getParamsList({
dictType: "数据资产目录主题名称",
}).then((res: any) => {
if (res.code == proxy.$passCode) {
subjectDomainListData.value = replaceChildDictListKey(res.data) || [];
let item = searchItemList.value.find(item => item.field == 'subjectDomain');
item && (item.options = subjectDomainListData.value);
} else {
proxy.$ElMessage.error(res.msg);
}
})
});
function replaceChildDictListKey(data) {
if (Array.isArray(data)) {
return data.map(item => replaceChildDictListKey(item));
} else if (data && typeof data === 'object') {
const { childDictList, ...rest } = data;
return {
...rest,
children: childDictList ? replaceChildDictListKey(childDictList) : undefined,
};
}
return data;
}
const handleCreate = () => {
router.push({
......@@ -455,12 +424,13 @@ const handleUploadClose = (itemGuid) => {
</div>
<div class="v-middle">
<div class="mid-content">
<div class="left">登记主体</div>
<div class="left">权利主体</div>
<div class="right">{{ item.rightMainName || '--' }}</div>
</div>
<div class="mid-content">
<div class="left">产品来源</div>
<div class="right">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : (item.foundMode == 2 ? '加工交付' : (item.foundMode == 4 ? '江苏专区' : (item.foundMode == 5 ? '可信数据空间' : '专区')))) : '--'
<!-- TODO,要改成连接器名称 -->
<div class="right">{{ item.foundMode ? (item.foundMode === 1 ? '自建' : (item.foundMode == 2 ? '加工交付' : (item.foundMode == 4 ? '江苏专区' : (item.foundMode == 5 ? '数据港' : '专区')))) : '--'
}}</div>
</div>
<div class="mid-content">
......@@ -469,6 +439,7 @@ const handleUploadClose = (itemGuid) => {
</div>
</div>
<div class="v-bottom">
<!-- TODO,只有数据交付之后才可以编辑和删除 -->
<el-button plain v-if="!(item.isRegister == 'Y' || item.foundMode == 2 || item.foundMode == 4 || item.foundMode == 5)"
@click.stop="tableBtnClick(item, 'delete')">删除</el-button>
<el-button plain v-if="!(item.isRegister == 'Y' || item.foundMode == 4)" @click.stop="handleDataClick(item)">编辑</el-button>
......@@ -477,10 +448,6 @@ const handleUploadClose = (itemGuid) => {
</div>
</div>
</div>
<!-- <div v-if="listData.length" class="card-noData">
<img src="../../assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
<span>暂无数据资源目录</span>
</div> -->
</div>
</div>
......
......@@ -93,7 +93,7 @@ const tableInfo = ref({
fields: [
{ label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
{ label: "数据产品编号", field: "productCode", width: 154 },
{ label: "数据证书编号", field: "damCode", width: 154 },
// { label: "数据证书编号", field: "damCode", width: 154 },
{ label: "数据产品名称", field: "damName", width: 180 },
{
label: "产品类型", field: "damTypeName", width: 100
......@@ -103,7 +103,7 @@ const tableInfo = ref({
return scope.row.isPublicData == 'Y' ? '是' : '否';
}
},
{ label: "上架分类", field: "exchangeName", width: 140 },
// { label: "上架分类", field: "exchangeName", width: 140 },
{
label: "审批状态", field: "approveVO", type: "approveTag", width: TableColumnWidth.STATE, align: 'center'
},
......@@ -246,6 +246,9 @@ const getListingCountData = () => {
flowDetailLoading.value = false;
if (res.code == proxy.$passCode) {
demandListData.value = res.data || [];
if (demandListData.value?.length) {
demandListData.value = [demandListData.value[0]];
}
let valueData = chunk(demandListData.value, 4);
carouselInfo.value.list = valueData;
carouselInfo.value.arrow = valueData.length > 1 ? 'hover' : 'never';
......@@ -969,15 +972,15 @@ const rejectDialogBtnClick = (btn, info) => {
<!-- <div class="list-content" v-if="demandListData.length > 0">
</div> -->
<div class="v-tip">
<!-- <div class="v-tip">
<div class="tip-icon"></div>
<div class="tip-des">
在各数交所上架时,会同时在门户、专区和主平台门户进行展示;在门户上架则只会在门户上架,不会在数交所、专区及主平台门户上架。
</div>
</div>
</div> -->
</div>
<div class="table_panel_wrap" :style="{
height: demandListData.length > 0 ? 'calc(100% - 291px)' : 'calc(100% - 54px)'
height: 'calc(100% - 240px)'
}">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange"
@tableSwitchBeforeChange="tableSwitchBeforeChange" />
......
......@@ -1929,10 +1929,10 @@ const rejectDialogBtnClick = (btn, info) => {
<span class="item_label">资产类型:</span>
<span class="item_value">{{ flowDetail.damTypeName || '--' }}</span>
</div>
<div class="list_item" v-if="route.query.exchangeGuid">
<!-- <div class="list_item" v-if="route.query.exchangeGuid">
<span class="item_label">证书编号:</span>
<span class="item_value">{{ flowDetail.damCode || '--' }}</span>
</div>
</div> -->
<div class="list_item" v-if="flowDetail.productCode">
<span class="item_label">产品编号:</span>
<span class="item_value">{{ flowDetail.productCode || '--' }}</span>
......@@ -1963,10 +1963,10 @@ const rejectDialogBtnClick = (btn, info) => {
<span class="item_value">{{ flowDetail.caseNumber != null ? changeNum(flowDetail.caseNumber, 0) : '--'
}}</span>
</div>
<div class="list_item" v-if="route.query.exchangeGuid">
<!-- <div class="list_item" v-if="route.query.exchangeGuid">
<span class="item_label">登记数交所:</span>
<span class="item_value">{{ flowDetail.exchangeName || '--' }}</span>
</div>
</div> -->
<div class="list_item is_block">
<span class="item_label">数据覆盖地域:</span>
<span class="item_value"
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!