分类分级任务联调
Showing
3 changed files
with
73 additions
and
102 deletions
| ... | @@ -282,8 +282,8 @@ export const getCgLabelPageList = (data) => request({ | ... | @@ -282,8 +282,8 @@ export const getCgLabelPageList = (data) => request({ |
| 282 | }) | 282 | }) |
| 283 | 283 | ||
| 284 | // 元数据采集任务-分页 | 284 | // 元数据采集任务-分页 |
| 285 | export const getMetaCollectTaskPageList = (data) => request({ | 285 | export const getMetaTableCollectList = (data) => request({ |
| 286 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/page-list`, | 286 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/meta-table-collect-list`, |
| 287 | method: 'post', | 287 | method: 'post', |
| 288 | data | 288 | data |
| 289 | }) | 289 | }) | ... | ... |
| ... | @@ -34,11 +34,7 @@ const useUserStore = defineStore( | ... | @@ -34,11 +34,7 @@ const useUserStore = defineStore( |
| 34 | data.platformGuid = "7f16f697aec111ef8656fa163e60becd"; | 34 | data.platformGuid = "7f16f697aec111ef8656fa163e60becd"; |
| 35 | data.userType = 2; | 35 | data.userType = 2; |
| 36 | data.validateUri = location.origin + '/'; | 36 | data.validateUri = location.origin + '/'; |
| 37 | debugger | ||
| 38 | debugger | ||
| 39 | return getTokenPromise.value = getTokenByCode(data).then((res: any) => { | 37 | return getTokenPromise.value = getTokenByCode(data).then((res: any) => { |
| 40 | debugger | ||
| 41 | debugger | ||
| 42 | getTokenPromise.value = null; | 38 | getTokenPromise.value = null; |
| 43 | console.log(res); | 39 | console.log(res); |
| 44 | if (res.code == '00000') { | 40 | if (res.code == '00000') { | ... | ... |
| ... | @@ -9,10 +9,7 @@ import useUserStore from "@/store/modules/user"; | ... | @@ -9,10 +9,7 @@ import useUserStore from "@/store/modules/user"; |
| 9 | import { ElMessage, ElMessageBox } from "element-plus"; | 9 | import { ElMessage, ElMessageBox } from "element-plus"; |
| 10 | import { Search } from "@element-plus/icons-vue"; | 10 | import { Search } from "@element-plus/icons-vue"; |
| 11 | import useDataAssetStore from "@/store/modules/dataAsset"; | 11 | import useDataAssetStore from "@/store/modules/dataAsset"; |
| 12 | import { getClassifyGradList, getClassifyTreeList, getCgLabelPageList, filterVal } from "@/api/modules/dataInventory"; | 12 | import { getClassifyGradList, getClassifyTreeList, getCgLabelPageList, getMetaTableCollectList, } from "@/api/modules/dataInventory"; |
| 13 | import { TableColumnWidth } from '@/utils/enum'; | ||
| 14 | |||
| 15 | import Table from "@/components/Table/index.vue"; | ||
| 16 | 13 | ||
| 17 | const { proxy } = getCurrentInstance() as any; | 14 | const { proxy } = getCurrentInstance() as any; |
| 18 | const router = useRouter(); | 15 | const router = useRouter(); |
| ... | @@ -31,28 +28,16 @@ const listPage = ref({ | ... | @@ -31,28 +28,16 @@ const listPage = ref({ |
| 31 | totalPages: 0 | 28 | totalPages: 0 |
| 32 | }) | 29 | }) |
| 33 | const currpermissionList: any = ref([]) | 30 | const currpermissionList: any = ref([]) |
| 34 | const templateInfo = ref({ | 31 | const templateInfo = ref({}) |
| 35 | title: '医疗数据分类', | ||
| 36 | descGroup: [ | ||
| 37 | { label: '模型确认人', value: '管理员 ' }, | ||
| 38 | { label: '模型确认时间', value: '2021-12-12 09:12:13' }, | ||
| 39 | ], | ||
| 40 | tags: [ | ||
| 41 | { type: 'info', name: '医疗行业分类' }, | ||
| 42 | { type: 'success', name: '五级' }, | ||
| 43 | { type: 'primary', name: 'V5' }, | ||
| 44 | ], | ||
| 45 | desc: '适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康。' | ||
| 46 | }) | ||
| 47 | const treeIndex: any = ref({}) | 32 | const treeIndex: any = ref({}) |
| 48 | 33 | ||
| 49 | const treeInfo = ref({ | 34 | const treeInfo = ref({ |
| 50 | id: "data-pickup-tree", | 35 | id: "data-pickup-tree", |
| 51 | filter: true, | 36 | filter: true, |
| 52 | queryValue: "", | 37 | queryValue: "", |
| 53 | queryPlaceholder: "输入组织名称搜索", | 38 | queryPlaceholder: "请输入分类名称搜索", |
| 54 | props: { | 39 | props: { |
| 55 | label: "organisationName", | 40 | label: "classifyName", |
| 56 | value: "guid", | 41 | value: "guid", |
| 57 | }, | 42 | }, |
| 58 | nodeKey: 'guid', | 43 | nodeKey: 'guid', |
| ... | @@ -105,17 +90,20 @@ const page = ref({ | ... | @@ -105,17 +90,20 @@ const page = ref({ |
| 105 | { label: "200", value: 200 }, | 90 | { label: "200", value: 200 }, |
| 106 | ], | 91 | ], |
| 107 | }); | 92 | }); |
| 108 | const searchItemValue: any = ref({}); | 93 | const searchItemValue: any = ref({ |
| 94 | classifyGuid: '', | ||
| 95 | detailGuid: '' | ||
| 96 | }); | ||
| 109 | const currTableData: any = ref({}); | 97 | const currTableData: any = ref({}); |
| 110 | 98 | ||
| 111 | const tableInfo = ref({ | 99 | const tableInfo = ref({ |
| 112 | id: "mapping-table", | 100 | id: "mapping-table", |
| 113 | fields: [ | 101 | fields: [ |
| 114 | { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, | 102 | { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, |
| 115 | { label: "标签", field: "damCode", width: 96 }, | 103 | { label: "标签", field: "label", width: 96 }, |
| 116 | { label: "分类", field: "damTypeName", width: 380 }, | 104 | { label: "分类", field: "classifyDetailName", width: 380 }, |
| 117 | { label: "分级", field: "damName", width: 55 }, | 105 | { label: "分级", field: "gradeDetailName", width: 55 }, |
| 118 | { label: "规则", field: "damTypeName", width: 380 }, | 106 | { label: "规则", field: "rule", width: 380 }, |
| 119 | ], | 107 | ], |
| 120 | loading: false, | 108 | loading: false, |
| 121 | data: [], | 109 | data: [], |
| ... | @@ -154,11 +142,15 @@ const metadataTableInfo = ref({ | ... | @@ -154,11 +142,15 @@ const metadataTableInfo = ref({ |
| 154 | 142 | ||
| 155 | const nodeClick = (data) => { | 143 | const nodeClick = (data) => { |
| 156 | treeIndex.value = data | 144 | treeIndex.value = data |
| 145 | searchItemValue.value.classifyGuid = templateInfo.value.guid; | ||
| 146 | searchItemValue.value.detailGuid = data.guid; | ||
| 147 | getTableData(); | ||
| 157 | } | 148 | } |
| 158 | 149 | ||
| 150 | // 获取标签数据 | ||
| 159 | const getTableData = () => { | 151 | const getTableData = () => { |
| 160 | tableInfo.value.loading = true; | 152 | tableInfo.value.loading = true; |
| 161 | getListingList( | 153 | getCgLabelPageList( |
| 162 | Object.assign({}, searchItemValue.value, { | 154 | Object.assign({}, searchItemValue.value, { |
| 163 | pageIndex: page.value.curr, | 155 | pageIndex: page.value.curr, |
| 164 | pageSize: page.value.limit, | 156 | pageSize: page.value.limit, |
| ... | @@ -203,36 +195,14 @@ const tablePageChange = (info) => { | ... | @@ -203,36 +195,14 @@ const tablePageChange = (info) => { |
| 203 | getTableData(); | 195 | getTableData(); |
| 204 | }; | 196 | }; |
| 205 | 197 | ||
| 206 | const open = (msg, type, isBatch = false) => { | 198 | const getMetaTableData = () => { |
| 207 | ElMessageBox.confirm(msg, "提示", { | 199 | getMetaTableCollectList({}).then((res: any) => { |
| 208 | confirmButtonText: "确定", | 200 | metadataTableInfo.value.loading = false; |
| 209 | cancelButtonText: "取消", | 201 | metadataTableInfo.value.data = res.data.records || []; |
| 210 | type: type, | 202 | metadataTableInfo.value.page.curr = res.data.pageIndex; |
| 211 | }).then(() => { | 203 | metadataTableInfo.value.page.limit = res.data.pageSize; |
| 212 | const guids = [currTableData.value.guid]; | 204 | metadataTableInfo.value.page.rows = res.data.totalRows; |
| 213 | listingDelete(guids).then((res: any) => { | 205 | }) |
| 214 | if (res.code == proxy.$passCode) { | ||
| 215 | getFirstPageData(); | ||
| 216 | ElMessage({ | ||
| 217 | type: "success", | ||
| 218 | message: "删除成功", | ||
| 219 | }); | ||
| 220 | } else { | ||
| 221 | ElMessage({ | ||
| 222 | type: "error", | ||
| 223 | message: res.msg, | ||
| 224 | }); | ||
| 225 | } | ||
| 226 | }).catch((res) => { | ||
| 227 | tableInfo.value.loading = false; | ||
| 228 | }); | ||
| 229 | }); | ||
| 230 | }; | ||
| 231 | |||
| 232 | const getFirstPageData = () => { | ||
| 233 | page.value.curr = 1 | ||
| 234 | tableInfo.value.page.curr = 1; | ||
| 235 | getTableData(); | ||
| 236 | } | 206 | } |
| 237 | 207 | ||
| 238 | const querySearch = (queryString: string) => { | 208 | const querySearch = (queryString: string) => { |
| ... | @@ -263,10 +233,13 @@ const handleScroll = () => { | ... | @@ -263,10 +233,13 @@ const handleScroll = () => { |
| 263 | } | 233 | } |
| 264 | } | 234 | } |
| 265 | 235 | ||
| 266 | const changTable = () => { | 236 | // 点击分类列表 |
| 267 | // toSearch({}) | 237 | const listClick = (row) => { |
| 238 | templateInfo.value = row; | ||
| 239 | getClassifyTree() | ||
| 268 | }; | 240 | }; |
| 269 | 241 | ||
| 242 | // 获取分类列表 | ||
| 270 | const getPermissionList = (val, init = false) => { | 243 | const getPermissionList = (val, init = false) => { |
| 271 | let params: any = val ? { ...val } : {} | 244 | let params: any = val ? { ...val } : {} |
| 272 | params.pageIndex = listPage.value.curr; | 245 | params.pageIndex = listPage.value.curr; |
| ... | @@ -286,6 +259,7 @@ const getPermissionList = (val, init = false) => { | ... | @@ -286,6 +259,7 @@ const getPermissionList = (val, init = false) => { |
| 286 | } | 259 | } |
| 287 | if (data.length) { | 260 | if (data.length) { |
| 288 | templateInfo.value = data[0]; | 261 | templateInfo.value = data[0]; |
| 262 | getClassifyTree() | ||
| 289 | } | 263 | } |
| 290 | } | 264 | } |
| 291 | listLoading.value = false | 265 | listLoading.value = false |
| ... | @@ -294,21 +268,26 @@ const getPermissionList = (val, init = false) => { | ... | @@ -294,21 +268,26 @@ const getPermissionList = (val, init = false) => { |
| 294 | }) | 268 | }) |
| 295 | } | 269 | } |
| 296 | 270 | ||
| 297 | const getClassifyTree = (data) => { | 271 | // 获取树形列表 |
| 272 | const getClassifyTree = () => { | ||
| 298 | const params = { | 273 | const params = { |
| 299 | guid: data.guid | 274 | guid: templateInfo.value.guid |
| 300 | } | 275 | } |
| 301 | getClassifyTreeList(params).then((res: any) => { | 276 | getClassifyTreeList(params).then((res: any) => { |
| 302 | 277 | if (res.code == proxy.$passCode) { | |
| 278 | const data = res.data || []; | ||
| 279 | treeInfo.value.data = data; | ||
| 280 | } | ||
| 303 | }) | 281 | }) |
| 304 | } | 282 | } |
| 305 | 283 | ||
| 306 | onActivated(() => { | 284 | onActivated(() => { |
| 307 | 285 | getPermissionList({}); | |
| 286 | getMetaTableData(); | ||
| 308 | }) | 287 | }) |
| 309 | 288 | ||
| 310 | onBeforeMount(() => { | 289 | onBeforeMount(() => { |
| 311 | getPermissionList({}) | 290 | // getPermissionList({}) |
| 312 | }) | 291 | }) |
| 313 | 292 | ||
| 314 | </script> | 293 | </script> |
| ... | @@ -323,7 +302,7 @@ onBeforeMount(() => { | ... | @@ -323,7 +302,7 @@ onBeforeMount(() => { |
| 323 | </div> | 302 | </div> |
| 324 | <div class="aside_list" v-loading="listLoading" v-infinite-scroll="handleScroll"> | 303 | <div class="aside_list" v-loading="listLoading" v-infinite-scroll="handleScroll"> |
| 325 | <div class="list_item" v-for="(item, i) in currpermissionList" :class="{ active: selectIndex == i }" | 304 | <div class="list_item" v-for="(item, i) in currpermissionList" :class="{ active: selectIndex == i }" |
| 326 | @click="selectIndex = i; changTable();" v-preReClick>{{ item.name }}</div> | 305 | @click="selectIndex = i; listClick(item);" v-preReClick>{{ item.name }}</div> |
| 327 | </div> | 306 | </div> |
| 328 | </div> | 307 | </div> |
| 329 | <div class="main_wrap" :class="{ full: step == 1 }"> | 308 | <div class="main_wrap" :class="{ full: step == 1 }"> |
| ... | @@ -331,15 +310,15 @@ onBeforeMount(() => { | ... | @@ -331,15 +310,15 @@ onBeforeMount(() => { |
| 331 | <div class="template_panel"> | 310 | <div class="template_panel"> |
| 332 | <div class="title_item"> | 311 | <div class="title_item"> |
| 333 | <span class="title_label">分类标准:</span> | 312 | <span class="title_label">分类标准:</span> |
| 334 | <span class="title_text">{{ templateInfo.name }}</span> | 313 | <span class="title_text">{{ templateInfo.name || '--' }}</span> |
| 335 | </div> | 314 | </div> |
| 336 | <div class="title_item"> | 315 | <div class="title_item"> |
| 337 | <span class="title_label">分级标准:</span> | 316 | <span class="title_label">分级标准:</span> |
| 338 | <span class="title_text">{{ templateInfo.name }}</span> | 317 | <span class="title_text">{{ templateInfo.refGradeName || '--' }}</span> |
| 339 | </div> | 318 | </div> |
| 340 | <div class="title_item is_block"> | 319 | <div class="title_item is_block"> |
| 341 | <span class="title_label">分级标准:</span> | 320 | <span class="title_label">描述:</span> |
| 342 | <span>{{ templateInfo.desc }}</span> | 321 | <span class="title_text">{{ templateInfo.description || '--' }}</span> |
| 343 | </div> | 322 | </div> |
| 344 | </div> | 323 | </div> |
| 345 | <div class="panel_content"> | 324 | <div class="panel_content"> |
| ... | @@ -443,44 +422,40 @@ onBeforeMount(() => { | ... | @@ -443,44 +422,40 @@ onBeforeMount(() => { |
| 443 | } | 422 | } |
| 444 | 423 | ||
| 445 | .template_panel { | 424 | .template_panel { |
| 446 | padding: 0 8px; | ||
| 447 | |||
| 448 | .panel_title { | ||
| 449 | display: flex; | 425 | display: flex; |
| 450 | justify-content: space-between; | 426 | flex-wrap: wrap; |
| 451 | align-items: center; | 427 | padding: 16px 16px 8px; |
| 452 | margin: 8px 0; | ||
| 453 | |||
| 454 | .title_text { | ||
| 455 | font-size: 16px; | ||
| 456 | color: #212121; | ||
| 457 | line-height: 24px; | ||
| 458 | font-weight: 600; | ||
| 459 | } | ||
| 460 | 428 | ||
| 461 | .title_desc { | 429 | .title_item { |
| 462 | display: flex; | 430 | display: flex; |
| 431 | margin-bottom: 8px; | ||
| 463 | 432 | ||
| 464 | .desc_group { | 433 | +.title_item { |
| 465 | margin-left: 16px; | 434 | margin-left: 40px; |
| 466 | } | ||
| 467 | } | ||
| 468 | } | 435 | } |
| 469 | 436 | ||
| 470 | .panel_tags { | 437 | .title_label { |
| 471 | .el-tag { | 438 | display: block; |
| 472 | margin-right: 8px; | 439 | width: 80px; |
| 473 | } | 440 | line-height: 1.5; |
| 474 | } | 441 | } |
| 475 | 442 | ||
| 476 | .panel_desc { | 443 | .title_text { |
| 477 | margin: 8px 0 16px; | ||
| 478 | font-size: 14px; | ||
| 479 | color: #666; | ||
| 480 | line-height: 1.5; | 444 | line-height: 1.5; |
| 445 | } | ||
| 446 | |||
| 447 | &.is_block { | ||
| 448 | width: 100%; | ||
| 449 | margin-left: 0; | ||
| 450 | |||
| 451 | .title_text { | ||
| 452 | display: block; | ||
| 453 | width: calc(100% - 80px); | ||
| 481 | text-align: justify; | 454 | text-align: justify; |
| 482 | } | 455 | } |
| 483 | } | 456 | } |
| 457 | } | ||
| 458 | } | ||
| 484 | 459 | ||
| 485 | .panel_content { | 460 | .panel_content { |
| 486 | height: 100%; | 461 | height: 100%; |
| ... | @@ -491,7 +466,7 @@ onBeforeMount(() => { | ... | @@ -491,7 +466,7 @@ onBeforeMount(() => { |
| 491 | .box_left { | 466 | .box_left { |
| 492 | width: 240px; | 467 | width: 240px; |
| 493 | height: 100%; | 468 | height: 100%; |
| 494 | padding: 12px 0; | 469 | padding-top: 12px; |
| 495 | border-right: 1px solid #d9d9d9; | 470 | border-right: 1px solid #d9d9d9; |
| 496 | 471 | ||
| 497 | .aside_title { | 472 | .aside_title { |
| ... | @@ -510,7 +485,7 @@ onBeforeMount(() => { | ... | @@ -510,7 +485,7 @@ onBeforeMount(() => { |
| 510 | 485 | ||
| 511 | .box_right { | 486 | .box_right { |
| 512 | width: 100%; | 487 | width: 100%; |
| 513 | padding: 12px 0; | 488 | padding-top: 12px; |
| 514 | 489 | ||
| 515 | .el-breadcrumb { | 490 | .el-breadcrumb { |
| 516 | padding: 0 12px; | 491 | padding: 0 12px; |
| ... | @@ -521,7 +496,7 @@ onBeforeMount(() => { | ... | @@ -521,7 +496,7 @@ onBeforeMount(() => { |
| 521 | 496 | ||
| 522 | .table_panel_wrap { | 497 | .table_panel_wrap { |
| 523 | width: 100%; | 498 | width: 100%; |
| 524 | height: calc(100% - 40px); | 499 | height: 100%; |
| 525 | padding: 0 12px; | 500 | padding: 0 12px; |
| 526 | } | 501 | } |
| 527 | } | 502 | } | ... | ... |
-
Please register or sign in to post a comment