4109a88f by lihua

接口联调

1 parent 2058fc52
......@@ -584,3 +584,10 @@ export const addDictDictionary = (params) => request({
method: 'post',
data: params
})
/** 产品目录列表查询 */
export const getProductCategoryList = (params) => request({
url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/tds-grounding-page-list`,
method: 'post',
data: params
})
\ No newline at end of file
......
......@@ -5,7 +5,7 @@
<div class="aside_title">产品分类</div>
<Tree ref="treeRef" :treeInfo="treeInfo" @nodeCheck="handleTreeNodeChange" />
</div>
<!-- 主内容区域,包含搜索框和表格 -->
<!-- 主内容区域,包含搜索框和表格 -->
<div class="main_wrap">
<div class="header-bg">
<el-input v-model.trim="page.searchKey" size="large" placeholder="请输入关键字搜索" :prefix-icon="Search"
......@@ -21,7 +21,8 @@
import { commonPageConfig } from '@/components/PageNav';
import { Search } from '@element-plus/icons-vue';
import {
getDamTypesList
getDamTypesList,
getProductCategoryList
} from "@/api/modules/dataAsset";
import { USERROLE } from '@/utils/enum';
......@@ -99,23 +100,39 @@ const handleTreeNodeChange = (checkedObj, id, nodeObj) => {
/** 产品类型 */
if (halfCheckedKeys.includes('damType')) {
// 获取勾选的子节点
treeRefs.getNode("damType").childNodes?.filter(c => c.checked == true);
page.value.damTypes = treeRefs.getNode("damType").childNodes?.filter(c => c.checked == true)?.map(d => d?.data?.value);
} else {
page.value.damTypes = [];
}
// 如果是全选,则不需要处理传参
/** 数据来源 */
if (halfCheckedKeys.includes('dataSources')) {
if (halfCheckedKeys.includes('dataSource')) {
page.value.dataSourcesList = treeRefs.getNode("dataSource").childNodes?.filter(c => c.checked == true)?.map(d => d?.data?.value);
} else {
page.value.dataSourcesList = [];
}
/** 行业分类 */
if (halfCheckedKeys.includes('industry')) {
page.value.industryList = treeRefs.getNode("industry").childNodes?.filter(c => c.checked == true)?.map(d => d?.data?.value);
} else {
page.value.industryList = [];
}
/** 机构分类 */
if (halfCheckedKeys.includes('institutionType')) {
page.value.institutionTypeList = treeRefs.getNode("institutionType").childNodes?.filter(c => c.checked == true)?.map(d => d?.data?.value);
} else {
page.value.institutionTypeList = [];
}
/** 领域及应用场景 */
if (halfCheckedKeys.includes('domain')) {
// 计算领域下勾选的子节点,同时判断医疗健康和工业制造
}
page.value.curr = 1;
getSearchData();
}
/**
......@@ -125,6 +142,13 @@ const handleTreeNodeChange = (checkedObj, id, nodeObj) => {
const page = ref({
...commonPageConfig, // 继承通用页面配置
searchKey: '', // 搜索关键词
damTypes: [],
domainList: [],
industryList: [],
institutionTypeList: [],
dataSourcesList: [],
subjectDomainList: [],
medDepartList: []
});
const oldKeyWord = ref(""); // 记录上次输入的关键字,避免重复搜索
......@@ -164,7 +188,33 @@ const searchEnterFun = (event) => {
* @param clear - 是否清除现有数据
*/
const getSearchData = (clear = false) => {
// TODO: 实现具体的数据获取逻辑
tableInfo.value.loading = true;
getProductCategoryList({
pageIndex: page.value.curr,
pageSize: page.value.limit,
damName: page.value.searchKey,
damTypes: page.value.damTypes,
domains: page.value.domainList,
scenarios: page.value.subjectDomainList,
industrys: page.value.industryList,
institutionTypes: page.value.institutionTypeList,
dataSourceList: page.value.dataSourcesList,
medDepartmentCodes: page.value.medDepartList,
}).then((res: any) => {
tableInfo.value.loading = false;
if (res?.code == proxy.$passCode) {
const data = res.data || {};
tableInfo.value.data = data.records || []
tableInfo.value.page.limit = data.pageSize
tableInfo.value.page.curr = data.pageIndex
tableInfo.value.page.rows = data.totalRows
} else {
res?.msg && proxy.$ElMessage({
type: 'error',
message: res.msg,
})
}
})
}
/**
......@@ -185,7 +235,7 @@ const tableInfo = ref({
},
{
label: "数据产品名称",
field: "dataProductName",
field: "damName",
width: 160,
type: "text_btn",
columClass: 'text_btn',
......@@ -202,17 +252,17 @@ const tableInfo = ref({
router.push({
name: 'productSortCatalogDetail',
query: {
guid: scope.row.dataProductGuid, // 产品GUID
guid: scope.row.guid, // 产品GUID
type: 'detail', // 查看类型
foundMode: 'use', // 发现模式
name: scope.row.dataProductName, // 产品名称
name: scope.row.damName, // 产品名称
}
});
}
},
{ label: "产品类型", field: "damTypeName", width: 100 },
{ label: "应用场景", field: "scenarioName", width: 120 },
{ label: "行业分类", field: "industryName", width: 140 },
{ label: "行业分类", field: "industryName", width: 220 },
{ label: "机构分类", field: "institutionTypeName", width: 120 },
{
label: "数据来源",
......@@ -223,9 +273,9 @@ const tableInfo = ref({
return scope.row.dataSources && dataSourceList.value.find(i => i.value == scope.row.dataSources)?.label || '--'
}
},
{ label: "上架时间", field: "listingTime", width: 170 },
{ label: "上架时间", field: "groundingTime", width: 170 },
],
data: [{}], // 表格数据
data: [], // 表格数据
// 分页配置
page: {
type: "normal", // 分页类型
......@@ -250,7 +300,7 @@ const tableInfo = ref({
name: 'productApplicationEdit',
query: {
damGuid: scope.row.guid, // 数据资产GUID
damName: scope.row.dataProductName // 数据产品名称
damName: scope.row.damName // 数据产品名称
}
});
}
......@@ -285,6 +335,7 @@ const medDepartmentCodeList: any = ref([]); // 科室代码列表
* 初始化树形控件所需的各种字典数据
*/
onBeforeMount(() => {
getSearchData();
treeInfo.value.loading = true; // 开启加载状态
// 并发请求所有字典数据
......
......@@ -277,6 +277,7 @@ const submit = () => {
baseInfoFormRef.value?.ruleFormRef?.validate().then((valid, errorItem) => {
if (valid) {
let formInline = baseInfoFormRef.value.formInline;
// TODO,判断成员不能重复添加选择,相同的角色。
// fullscreenLoading.value = true;
// listingSavePortal(params).then((res: any) => {
// fullscreenLoading.value = false;
......
......@@ -26,6 +26,7 @@
<div class="per" @click.stop="clickDetail(item)">详情</div>
<div class="divider" @click.stop></div>
<div class="per" @click.stop="clickDelete(item)">删除</div>
<!-- TODO 只有审批中才有删除 -->
</div>
</div>
</div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!