数据目录接口联调
Showing
2 changed files
with
82 additions
and
18 deletions
| ... | @@ -233,7 +233,9 @@ onBeforeMount(() => { | ... | @@ -233,7 +233,9 @@ onBeforeMount(() => { |
| 233 | // } | 233 | // } |
| 234 | // }) | 234 | // }) |
| 235 | fullscreenLoading.value = true; | 235 | fullscreenLoading.value = true; |
| 236 | getRegisterCatalogDetail(route.query.guid).then((res: any) => { | 236 | getRegisterCatalogDetail({ |
| 237 | guid: route.query.damGuid | ||
| 238 | }).then((res: any) => { | ||
| 237 | fullscreenLoading.value = false; | 239 | fullscreenLoading.value = false; |
| 238 | if (res?.code == proxy.$passCode) { | 240 | if (res?.code == proxy.$passCode) { |
| 239 | let detail = res.data || {}; | 241 | let detail = res.data || {}; | ... | ... |
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | @blur="toSearch(true, true)" @keyup.enter.native="searchEnterFun" clearable /> | 12 | @blur="toSearch(true, true)" @keyup.enter.native="searchEnterFun" clearable /> |
| 13 | </div> | 13 | </div> |
| 14 | <Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" | 14 | <Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" |
| 15 | style="height: calc(100% - 96px);margin: 16px 16px 0px;" /> | 15 | style="height: calc(100% - 96px);margin: 16px 16px 0px;width: calc(100% - 32px);" /> |
| 16 | </div> | 16 | </div> |
| 17 | </div> | 17 | </div> |
| 18 | </template> | 18 | </template> |
| ... | @@ -90,11 +90,10 @@ const treeInfo = ref({ | ... | @@ -90,11 +90,10 @@ const treeInfo = ref({ |
| 90 | * @param nodeObj - 节点对象 | 90 | * @param nodeObj - 节点对象 |
| 91 | */ | 91 | */ |
| 92 | const handleTreeNodeChange = (checkedObj, id, nodeObj) => { | 92 | const handleTreeNodeChange = (checkedObj, id, nodeObj) => { |
| 93 | debugger | ||
| 94 | let treeRefs = treeRef.value.treeRef; | 93 | let treeRefs = treeRef.value.treeRef; |
| 95 | let checkedKeys = checkedObj.checkedObj || []; // 全勾选的所有节点 | 94 | let checkedObjs = checkedObj.checkedObj || []; // 全勾选的所有节点 |
| 96 | let halfCheckedKeys = checkedObj.halfCheckedKeys || []; // 半勾选的节点 | 95 | let halfCheckedKeys = checkedObj.halfCheckedKeys || []; // 半勾选的节点 |
| 97 | 96 | let checkedKeys = checkedObj.checkedKeys || []; | |
| 98 | // 思路:一个个的分类判断是否在半勾选,如果是,就将其勾选的子节点获取出来 | 97 | // 思路:一个个的分类判断是否在半勾选,如果是,就将其勾选的子节点获取出来 |
| 99 | 98 | ||
| 100 | /** 产品类型 */ | 99 | /** 产品类型 */ |
| ... | @@ -128,8 +127,73 @@ const handleTreeNodeChange = (checkedObj, id, nodeObj) => { | ... | @@ -128,8 +127,73 @@ const handleTreeNodeChange = (checkedObj, id, nodeObj) => { |
| 128 | } | 127 | } |
| 129 | 128 | ||
| 130 | /** 领域及应用场景 */ | 129 | /** 领域及应用场景 */ |
| 130 | page.value.domainList = []; | ||
| 131 | page.value.scenarioList = []; | ||
| 132 | page.value.subjectDomainList = []; | ||
| 133 | page.value.medDepartList = []; | ||
| 131 | if (halfCheckedKeys.includes('domain')) { | 134 | if (halfCheckedKeys.includes('domain')) { |
| 132 | // 计算领域下勾选的子节点,同时判断医疗健康和工业制造 | 135 | // 计算领域下勾选的子节点,同时判断医疗健康和工业制造 |
| 136 | domainDictList.value.forEach(domainItem => { | ||
| 137 | if (domainItem.value == '003') {//包含医疗健康,所属科室 | ||
| 138 | if (halfCheckedKeys.includes('003')) { | ||
| 139 | if (halfCheckedKeys.includes('scenario3')) {// | ||
| 140 | let list = treeRefs.getNode('scenario3')?.childNodes?.filter(c => c.checked == true); | ||
| 141 | list?.forEach(item => { | ||
| 142 | page.value.scenarioList.push(item.value); | ||
| 143 | }); | ||
| 144 | } | ||
| 145 | if (halfCheckedKeys.includes('medDepartmentCode')) { | ||
| 146 | treeRefs.getNode('medDepartmentCode').childNodes?.forEach(node => { | ||
| 147 | if (node.checked && node.isLeaf) { | ||
| 148 | page.value.medDepartList.push(node.data.value); | ||
| 149 | } else if (node.checked || (!node.isLeaf && node.indeterminate)) { //不是叶子节点 | ||
| 150 | node.childNodes?.forEach(childNode => { | ||
| 151 | if (childNode.checked && childNode.isLeaf) { | ||
| 152 | page.value.medDepartList.push(childNode.data.value); | ||
| 153 | } | ||
| 154 | }); | ||
| 155 | } | ||
| 156 | }); | ||
| 157 | } else if (checkedKeys.includes(domainItem.value)) { | ||
| 158 | page.value.domainList.push(domainItem.value); //全选要加入 | ||
| 159 | } | ||
| 160 | } | ||
| 161 | else if (domainItem.value == '004') {//包含医工业制造,所属主题 | ||
| 162 | if (halfCheckedKeys.includes('004')) { | ||
| 163 | if (halfCheckedKeys.includes('scenario4')) {// | ||
| 164 | let list = treeRefs.getNode('scenario4')?.childNodes?.filter(c => c.checked == true); | ||
| 165 | list?.forEach(item => { | ||
| 166 | page.value.scenarioList.push(item.value); | ||
| 167 | }); | ||
| 168 | } | ||
| 169 | if (halfCheckedKeys.includes('subjectDomain')) { | ||
| 170 | treeRefs.getNode('subjectDomain').childNodes?.forEach(node => { | ||
| 171 | if (node.checked && node.isLeaf) { | ||
| 172 | page.value.subjectDomainList.push(node.data.value); | ||
| 173 | } else if (node.checked || (!node.isLeaf && node.indeterminate)) { //不是叶子节点 | ||
| 174 | node.childNodes?.forEach(childNode => { | ||
| 175 | if (childNode.checked && childNode.isLeaf) { | ||
| 176 | page.value.subjectDomainList.push(childNode.data.value); | ||
| 177 | } | ||
| 178 | }); | ||
| 179 | } | ||
| 180 | }); | ||
| 181 | } | ||
| 182 | } else if (checkedKeys.includes(domainItem.value)) { | ||
| 183 | page.value.domainList.push(domainItem.value); //全选要加入 | ||
| 184 | } | ||
| 185 | } else { | ||
| 186 | if (halfCheckedKeys.includes(domainItem.value)) { | ||
| 187 | let list = treeRefs.getNode(domainItem.value)?.childNodes?.filter(c => c.checked == true); | ||
| 188 | list?.forEach(item => { | ||
| 189 | page.value.scenarioList.push(item.value); | ||
| 190 | }); | ||
| 191 | } else if (checkedKeys.includes(domainItem.value)) { | ||
| 192 | page.value.domainList.push(domainItem.value); //全选要加入 | ||
| 193 | } | ||
| 194 | } | ||
| 195 | } | ||
| 196 | }) | ||
| 133 | } | 197 | } |
| 134 | page.value.curr = 1; | 198 | page.value.curr = 1; |
| 135 | getSearchData(); | 199 | getSearchData(); |
| ... | @@ -143,7 +207,8 @@ const page = ref({ | ... | @@ -143,7 +207,8 @@ const page = ref({ |
| 143 | ...commonPageConfig, // 继承通用页面配置 | 207 | ...commonPageConfig, // 继承通用页面配置 |
| 144 | searchKey: '', // 搜索关键词 | 208 | searchKey: '', // 搜索关键词 |
| 145 | damTypes: [], | 209 | damTypes: [], |
| 146 | domainList: [], | 210 | domainList: <any>[], |
| 211 | scenarioList: <any>[], | ||
| 147 | industryList: [], | 212 | industryList: [], |
| 148 | institutionTypeList: [], | 213 | institutionTypeList: [], |
| 149 | dataSourcesList: [], | 214 | dataSourcesList: [], |
| ... | @@ -195,7 +260,8 @@ const getSearchData = (clear = false) => { | ... | @@ -195,7 +260,8 @@ const getSearchData = (clear = false) => { |
| 195 | damName: page.value.searchKey, | 260 | damName: page.value.searchKey, |
| 196 | damTypes: page.value.damTypes, | 261 | damTypes: page.value.damTypes, |
| 197 | domains: page.value.domainList, | 262 | domains: page.value.domainList, |
| 198 | scenarios: page.value.subjectDomainList, | 263 | scenarios: page.value.scenarioList, |
| 264 | subjectDomains: page.value.subjectDomainList, | ||
| 199 | industrys: page.value.industryList, | 265 | industrys: page.value.industryList, |
| 200 | institutionTypes: page.value.institutionTypeList, | 266 | institutionTypes: page.value.institutionTypeList, |
| 201 | dataSourceList: page.value.dataSourcesList, | 267 | dataSourceList: page.value.dataSourcesList, |
| ... | @@ -240,15 +306,8 @@ const tableInfo = ref({ | ... | @@ -240,15 +306,8 @@ const tableInfo = ref({ |
| 240 | type: "text_btn", | 306 | type: "text_btn", |
| 241 | columClass: 'text_btn', | 307 | columClass: 'text_btn', |
| 242 | value: "detail", | 308 | value: "detail", |
| 243 | // 合同状态为06时禁用点击 | ||
| 244 | disabled: (scope) => { | ||
| 245 | return scope.row.contractStatus == '06'; | ||
| 246 | }, | ||
| 247 | // 点击查看详细信息 | 309 | // 点击查看详细信息 |
| 248 | click: (scope) => { | 310 | click: (scope) => { |
| 249 | if (scope.row.contractStatus == '06') { | ||
| 250 | return; | ||
| 251 | } | ||
| 252 | router.push({ | 311 | router.push({ |
| 253 | name: 'productSortCatalogDetail', | 312 | name: 'productSortCatalogDetail', |
| 254 | query: { | 313 | query: { |
| ... | @@ -261,9 +320,8 @@ const tableInfo = ref({ | ... | @@ -261,9 +320,8 @@ const tableInfo = ref({ |
| 261 | } | 320 | } |
| 262 | }, | 321 | }, |
| 263 | { label: "产品类型", field: "damTypeName", width: 100 }, | 322 | { label: "产品类型", field: "damTypeName", width: 100 }, |
| 264 | { label: "应用场景", field: "scenarioName", width: 120 }, | ||
| 265 | { label: "行业分类", field: "industryName", width: 220 }, | 323 | { label: "行业分类", field: "industryName", width: 220 }, |
| 266 | { label: "机构分类", field: "institutionTypeName", width: 120 }, | 324 | { label: "机构分类", field: "institutionTypeName", width: 110 }, |
| 267 | { | 325 | { |
| 268 | label: "数据来源", | 326 | label: "数据来源", |
| 269 | field: "dataSources", | 327 | field: "dataSources", |
| ... | @@ -273,6 +331,10 @@ const tableInfo = ref({ | ... | @@ -273,6 +331,10 @@ const tableInfo = ref({ |
| 273 | return scope.row.dataSources && dataSourceList.value.find(i => i.value == scope.row.dataSources)?.label || '--' | 331 | return scope.row.dataSources && dataSourceList.value.find(i => i.value == scope.row.dataSources)?.label || '--' |
| 274 | } | 332 | } |
| 275 | }, | 333 | }, |
| 334 | { label: "领域", field: "domainName", width: 120 }, | ||
| 335 | { label: "应用场景", field: "scenarioName", width: 120 }, | ||
| 336 | { label: "所属科室", field: "medDepartmentCodeName", width: 110 }, | ||
| 337 | { label: "所属主题", field: "subjectDomainName", width: 120 }, | ||
| 276 | { label: "上架时间", field: "groundingTime", width: 170 }, | 338 | { label: "上架时间", field: "groundingTime", width: 170 }, |
| 277 | ], | 339 | ], |
| 278 | data: [], // 表格数据 | 340 | data: [], // 表格数据 |
| ... | @@ -422,7 +484,7 @@ onBeforeMount(() => { | ... | @@ -422,7 +484,7 @@ onBeforeMount(() => { |
| 422 | let item = domainDictList.value.find(i => i.value == '003'); // 医疗健康,下级应用场景和所属科室 | 484 | let item = domainDictList.value.find(i => i.value == '003'); // 医疗健康,下级应用场景和所属科室 |
| 423 | let childDictList = item.childDictList || []; | 485 | let childDictList = item.childDictList || []; |
| 424 | item.childDictList = [{ | 486 | item.childDictList = [{ |
| 425 | value: 'scenario', | 487 | value: 'scenario3', |
| 426 | label: '应用场景', | 488 | label: '应用场景', |
| 427 | childDictList: childDictList | 489 | childDictList: childDictList |
| 428 | }]; | 490 | }]; |
| ... | @@ -437,7 +499,7 @@ onBeforeMount(() => { | ... | @@ -437,7 +499,7 @@ onBeforeMount(() => { |
| 437 | let item4 = domainDictList.value.find(i => i.value == '004'); // 工业制造 | 499 | let item4 = domainDictList.value.find(i => i.value == '004'); // 工业制造 |
| 438 | let childDictList4 = item4.childDictList || []; | 500 | let childDictList4 = item4.childDictList || []; |
| 439 | item4.childDictList = [{ | 501 | item4.childDictList = [{ |
| 440 | value: 'scenario', | 502 | value: 'scenario4', |
| 441 | label: '应用场景', | 503 | label: '应用场景', |
| 442 | childDictList: childDictList4 | 504 | childDictList: childDictList4 |
| 443 | }]; | 505 | }]; | ... | ... |
-
Please register or sign in to post a comment