4109a88f by lihua

接口联调

1 parent 2058fc52
...@@ -584,3 +584,10 @@ export const addDictDictionary = (params) => request({ ...@@ -584,3 +584,10 @@ export const addDictDictionary = (params) => request({
584 method: 'post', 584 method: 'post',
585 data: params 585 data: params
586 }) 586 })
587
588 /** 产品目录列表查询 */
589 export const getProductCategoryList = (params) => request({
590 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/tds-grounding-page-list`,
591 method: 'post',
592 data: params
593 })
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 <div class="aside_title">产品分类</div> 5 <div class="aside_title">产品分类</div>
6 <Tree ref="treeRef" :treeInfo="treeInfo" @nodeCheck="handleTreeNodeChange" /> 6 <Tree ref="treeRef" :treeInfo="treeInfo" @nodeCheck="handleTreeNodeChange" />
7 </div> 7 </div>
8 <!-- 主内容区域,包含搜索框和表格 --> 8 <!-- 主内容区域,包含搜索框和表格 -->
9 <div class="main_wrap"> 9 <div class="main_wrap">
10 <div class="header-bg"> 10 <div class="header-bg">
11 <el-input v-model.trim="page.searchKey" size="large" placeholder="请输入关键字搜索" :prefix-icon="Search" 11 <el-input v-model.trim="page.searchKey" size="large" placeholder="请输入关键字搜索" :prefix-icon="Search"
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
21 import { commonPageConfig } from '@/components/PageNav'; 21 import { commonPageConfig } from '@/components/PageNav';
22 import { Search } from '@element-plus/icons-vue'; 22 import { Search } from '@element-plus/icons-vue';
23 import { 23 import {
24 getDamTypesList 24 getDamTypesList,
25 getProductCategoryList
25 } from "@/api/modules/dataAsset"; 26 } from "@/api/modules/dataAsset";
26 import { USERROLE } from '@/utils/enum'; 27 import { USERROLE } from '@/utils/enum';
27 28
...@@ -99,23 +100,39 @@ const handleTreeNodeChange = (checkedObj, id, nodeObj) => { ...@@ -99,23 +100,39 @@ const handleTreeNodeChange = (checkedObj, id, nodeObj) => {
99 /** 产品类型 */ 100 /** 产品类型 */
100 if (halfCheckedKeys.includes('damType')) { 101 if (halfCheckedKeys.includes('damType')) {
101 // 获取勾选的子节点 102 // 获取勾选的子节点
102 treeRefs.getNode("damType").childNodes?.filter(c => c.checked == true); 103 page.value.damTypes = treeRefs.getNode("damType").childNodes?.filter(c => c.checked == true)?.map(d => d?.data?.value);
104 } else {
105 page.value.damTypes = [];
103 } 106 }
104 // 如果是全选,则不需要处理传参 107 // 如果是全选,则不需要处理传参
105 108
106 /** 数据来源 */ 109 /** 数据来源 */
107 if (halfCheckedKeys.includes('dataSources')) { 110 if (halfCheckedKeys.includes('dataSource')) {
108 111 page.value.dataSourcesList = treeRefs.getNode("dataSource").childNodes?.filter(c => c.checked == true)?.map(d => d?.data?.value);
112 } else {
113 page.value.dataSourcesList = [];
109 } 114 }
110 115
111 /** 行业分类 */ 116 /** 行业分类 */
117 if (halfCheckedKeys.includes('industry')) {
118 page.value.industryList = treeRefs.getNode("industry").childNodes?.filter(c => c.checked == true)?.map(d => d?.data?.value);
119 } else {
120 page.value.industryList = [];
121 }
112 122
113 /** 机构分类 */ 123 /** 机构分类 */
124 if (halfCheckedKeys.includes('institutionType')) {
125 page.value.institutionTypeList = treeRefs.getNode("institutionType").childNodes?.filter(c => c.checked == true)?.map(d => d?.data?.value);
126 } else {
127 page.value.institutionTypeList = [];
128 }
114 129
115 /** 领域及应用场景 */ 130 /** 领域及应用场景 */
116 if (halfCheckedKeys.includes('domain')) { 131 if (halfCheckedKeys.includes('domain')) {
117 // 计算领域下勾选的子节点,同时判断医疗健康和工业制造 132 // 计算领域下勾选的子节点,同时判断医疗健康和工业制造
118 } 133 }
134 page.value.curr = 1;
135 getSearchData();
119 } 136 }
120 137
121 /** 138 /**
...@@ -125,6 +142,13 @@ const handleTreeNodeChange = (checkedObj, id, nodeObj) => { ...@@ -125,6 +142,13 @@ const handleTreeNodeChange = (checkedObj, id, nodeObj) => {
125 const page = ref({ 142 const page = ref({
126 ...commonPageConfig, // 继承通用页面配置 143 ...commonPageConfig, // 继承通用页面配置
127 searchKey: '', // 搜索关键词 144 searchKey: '', // 搜索关键词
145 damTypes: [],
146 domainList: [],
147 industryList: [],
148 institutionTypeList: [],
149 dataSourcesList: [],
150 subjectDomainList: [],
151 medDepartList: []
128 }); 152 });
129 153
130 const oldKeyWord = ref(""); // 记录上次输入的关键字,避免重复搜索 154 const oldKeyWord = ref(""); // 记录上次输入的关键字,避免重复搜索
...@@ -164,7 +188,33 @@ const searchEnterFun = (event) => { ...@@ -164,7 +188,33 @@ const searchEnterFun = (event) => {
164 * @param clear - 是否清除现有数据 188 * @param clear - 是否清除现有数据
165 */ 189 */
166 const getSearchData = (clear = false) => { 190 const getSearchData = (clear = false) => {
167 // TODO: 实现具体的数据获取逻辑 191 tableInfo.value.loading = true;
192 getProductCategoryList({
193 pageIndex: page.value.curr,
194 pageSize: page.value.limit,
195 damName: page.value.searchKey,
196 damTypes: page.value.damTypes,
197 domains: page.value.domainList,
198 scenarios: page.value.subjectDomainList,
199 industrys: page.value.industryList,
200 institutionTypes: page.value.institutionTypeList,
201 dataSourceList: page.value.dataSourcesList,
202 medDepartmentCodes: page.value.medDepartList,
203 }).then((res: any) => {
204 tableInfo.value.loading = false;
205 if (res?.code == proxy.$passCode) {
206 const data = res.data || {};
207 tableInfo.value.data = data.records || []
208 tableInfo.value.page.limit = data.pageSize
209 tableInfo.value.page.curr = data.pageIndex
210 tableInfo.value.page.rows = data.totalRows
211 } else {
212 res?.msg && proxy.$ElMessage({
213 type: 'error',
214 message: res.msg,
215 })
216 }
217 })
168 } 218 }
169 219
170 /** 220 /**
...@@ -185,7 +235,7 @@ const tableInfo = ref({ ...@@ -185,7 +235,7 @@ const tableInfo = ref({
185 }, 235 },
186 { 236 {
187 label: "数据产品名称", 237 label: "数据产品名称",
188 field: "dataProductName", 238 field: "damName",
189 width: 160, 239 width: 160,
190 type: "text_btn", 240 type: "text_btn",
191 columClass: 'text_btn', 241 columClass: 'text_btn',
...@@ -202,17 +252,17 @@ const tableInfo = ref({ ...@@ -202,17 +252,17 @@ const tableInfo = ref({
202 router.push({ 252 router.push({
203 name: 'productSortCatalogDetail', 253 name: 'productSortCatalogDetail',
204 query: { 254 query: {
205 guid: scope.row.dataProductGuid, // 产品GUID 255 guid: scope.row.guid, // 产品GUID
206 type: 'detail', // 查看类型 256 type: 'detail', // 查看类型
207 foundMode: 'use', // 发现模式 257 foundMode: 'use', // 发现模式
208 name: scope.row.dataProductName, // 产品名称 258 name: scope.row.damName, // 产品名称
209 } 259 }
210 }); 260 });
211 } 261 }
212 }, 262 },
213 { label: "产品类型", field: "damTypeName", width: 100 }, 263 { label: "产品类型", field: "damTypeName", width: 100 },
214 { label: "应用场景", field: "scenarioName", width: 120 }, 264 { label: "应用场景", field: "scenarioName", width: 120 },
215 { label: "行业分类", field: "industryName", width: 140 }, 265 { label: "行业分类", field: "industryName", width: 220 },
216 { label: "机构分类", field: "institutionTypeName", width: 120 }, 266 { label: "机构分类", field: "institutionTypeName", width: 120 },
217 { 267 {
218 label: "数据来源", 268 label: "数据来源",
...@@ -223,9 +273,9 @@ const tableInfo = ref({ ...@@ -223,9 +273,9 @@ const tableInfo = ref({
223 return scope.row.dataSources && dataSourceList.value.find(i => i.value == scope.row.dataSources)?.label || '--' 273 return scope.row.dataSources && dataSourceList.value.find(i => i.value == scope.row.dataSources)?.label || '--'
224 } 274 }
225 }, 275 },
226 { label: "上架时间", field: "listingTime", width: 170 }, 276 { label: "上架时间", field: "groundingTime", width: 170 },
227 ], 277 ],
228 data: [{}], // 表格数据 278 data: [], // 表格数据
229 // 分页配置 279 // 分页配置
230 page: { 280 page: {
231 type: "normal", // 分页类型 281 type: "normal", // 分页类型
...@@ -250,7 +300,7 @@ const tableInfo = ref({ ...@@ -250,7 +300,7 @@ const tableInfo = ref({
250 name: 'productApplicationEdit', 300 name: 'productApplicationEdit',
251 query: { 301 query: {
252 damGuid: scope.row.guid, // 数据资产GUID 302 damGuid: scope.row.guid, // 数据资产GUID
253 damName: scope.row.dataProductName // 数据产品名称 303 damName: scope.row.damName // 数据产品名称
254 } 304 }
255 }); 305 });
256 } 306 }
...@@ -285,6 +335,7 @@ const medDepartmentCodeList: any = ref([]); // 科室代码列表 ...@@ -285,6 +335,7 @@ const medDepartmentCodeList: any = ref([]); // 科室代码列表
285 * 初始化树形控件所需的各种字典数据 335 * 初始化树形控件所需的各种字典数据
286 */ 336 */
287 onBeforeMount(() => { 337 onBeforeMount(() => {
338 getSearchData();
288 treeInfo.value.loading = true; // 开启加载状态 339 treeInfo.value.loading = true; // 开启加载状态
289 340
290 // 并发请求所有字典数据 341 // 并发请求所有字典数据
......
...@@ -277,6 +277,7 @@ const submit = () => { ...@@ -277,6 +277,7 @@ const submit = () => {
277 baseInfoFormRef.value?.ruleFormRef?.validate().then((valid, errorItem) => { 277 baseInfoFormRef.value?.ruleFormRef?.validate().then((valid, errorItem) => {
278 if (valid) { 278 if (valid) {
279 let formInline = baseInfoFormRef.value.formInline; 279 let formInline = baseInfoFormRef.value.formInline;
280 // TODO,判断成员不能重复添加选择,相同的角色。
280 // fullscreenLoading.value = true; 281 // fullscreenLoading.value = true;
281 // listingSavePortal(params).then((res: any) => { 282 // listingSavePortal(params).then((res: any) => {
282 // fullscreenLoading.value = false; 283 // fullscreenLoading.value = false;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
26 <div class="per" @click.stop="clickDetail(item)">详情</div> 26 <div class="per" @click.stop="clickDetail(item)">详情</div>
27 <div class="divider" @click.stop></div> 27 <div class="divider" @click.stop></div>
28 <div class="per" @click.stop="clickDelete(item)">删除</div> 28 <div class="per" @click.stop="clickDelete(item)">删除</div>
29 <!-- TODO 只有审批中才有删除 -->
29 </div> 30 </div>
30 </div> 31 </div>
31 </div> 32 </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!