751d9bbf by xukangle

Merge branch 'develop' into dev_20241202_xukangle

2 parents 1fec05c1 a36959df
...@@ -230,6 +230,17 @@ export const getClassifyGradList = (data) => request({ ...@@ -230,6 +230,17 @@ export const getClassifyGradList = (data) => request({
230 data 230 data
231 }) 231 })
232 232
233 /**
234 * 分级列表详情
235 * @param {Object}
236 * @path /classify-grade/page-list
237 */
238
239 export const getClassifyGradDetail = (data) => request({
240 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/classify-grade/detail`,
241 method: 'get',
242 params: data
243 })
233 244
234 /** 245 /**
235 * 分级新增 246 * 分级新增
...@@ -397,6 +408,178 @@ export const getCgDirFieldPageList = (data) => request({ ...@@ -397,6 +408,178 @@ export const getCgDirFieldPageList = (data) => request({
397 data 408 data
398 }) 409 })
399 410
411
412 // 分来分级任务-分页
413 export const getCgTaskPageList = (data) => request({
414 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/page-list`,
415 method: 'post',
416 data
417 })
418
419 // 分来分级任务-详情
420 export const getCgTaskDetail = (data) => request({
421 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/detail`,
422 method: 'get',
423 params: data
424 })
425
426 // 分来分级任务-新增
427 export const cgTaskSave = (data) => request({
428 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/save`,
429 method: 'post',
430 data
431 })
432
433 // 分来分级任务-修改
434 export const cgTaskUpdate = (data) => request({
435 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/update`,
436 method: 'put',
437 data
438 })
439
440 // 分来分级任务-删除
441 export const cgTaskDelete = (data) => request({
442 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/delete`,
443 method: 'delete',
444 data
445 })
446
447 // 手动执行任务
448 export const runExecTask = (data) => request({
449 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/exec-task`,
450 method: 'post',
451 params: data
452 })
453
454 // 分类分级任务日志
455 export const getTaskExecPageList = (data) => request({
456 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec/page-list`,
457 method: 'post',
458 data
459 })
460
461 // 分类分级任务执行树形数据
462 export const getTaskExeTreeList = (data) => request({
463 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec/classify/tree-list`,
464 method: 'get',
465 params: data
466 })
467
468 // 分类分级任务执行字段统计
469 export const getTaskFieldCount = (data) => request({
470 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field-cnt`,
471 method: 'get',
472 params: data
473 })
474
475 // 分类分级任务执行数据库信息查询
476 export const getDbFieldList = (data) => request({
477 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-query-db-list`,
478 method: 'get',
479 params: data
480 })
481
482 // 分类分级任务执行字段查询
483 export const execTaskFieldList = (data) => request({
484 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field-list-query`,
485 method: 'post',
486 data
487 })
488 // 分类分级任务执行库表查询
489 export const execTaskSheetList = (data) => request({
490 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-db-list-query`,
491 method: 'post',
492 data
493 })
494
495 // 分类分级任务执行任务确认
496 export const execTaskConfirm = (data) => request({
497 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-task`,
498 method: 'post',
499 params: data
500 })
501
502 // 分类分级任务执行字段确认
503 export const execFieldConfirm = (data) => request({
504 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field`,
505 method: 'post',
506 data
507 })
508
509 // 标签规则-分页
510 export const getCgLabelPageList = (data) => request({
511 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/page-list`,
512 method: 'post',
513 data
514 })
515
516 // 元数据采集任务-分页
517 export const getMetaTableCollectList = (data) => request({
518 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/meta-table-collect-list`,
519 method: 'post',
520 data
521 })
522
523 export const filterVal = (val, type) => {
524 let status = '--';
525 if(type == 'status'){
526 switch (val) {
527 case 'N':
528 status = '未运行';
529 break;
530 case 'Y':
531 status = '成功';
532 break;
533 case 'E':
534 status = '失败';
535 break;
536 case 'R':
537 status = '运行中';
538 break;
539 default:
540 status = '未运行';
541 break;
542 }
543 } else if(type == 'confirmStatus'){
544 switch (val) {
545 case 'N':
546 status = '待确认';
547 break;
548 case 'Y':
549 status = '已确认';
550 break;
551 default:
552 status = '--';
553 break;
554 }
555 } else if(type == 'isCgChange'){
556 switch (val) {
557 case 'N':
558 status = '待确认';
559 break;
560 case 'Y':
561 status = '已确认';
562 break;
563 default:
564 status = '待确认';
565 break;
566 }
567 } else if(type == 'changeStatus'){
568 switch (val) {
569 case 'N':
570 status = '待确认';
571 break;
572 case 'Y':
573 status = '已确认';
574 break;
575 default:
576 status = '--';
577 break;
578 }
579 }
580 return status;
581 }
582
400 /** 获取字典列表 583 /** 获取字典列表
401 * VITE_APP_PLAN_BASEURL 为环境变量 现在只是mock数据 584 * VITE_APP_PLAN_BASEURL 为环境变量 现在只是mock数据
402 */ 585 */
......
...@@ -498,6 +498,11 @@ const scheduleChange = (val, rowValue) => { ...@@ -498,6 +498,11 @@ const scheduleChange = (val, rowValue) => {
498 const treeSelectNodeChange = (node, item, nodeObj) => { 498 const treeSelectNodeChange = (node, item, nodeObj) => {
499 emits("treeSelectNodeChange", node, item, nodeObj); 499 emits("treeSelectNodeChange", node, item, nodeObj);
500 } 500 }
501
502 const getCascaderCheckedData = () => {
503 const dialogForm = dialogFormRef.value[0] || dialogFormRef.value;
504 return dialogForm.getCascaderCheckedData();
505 }
501 const setTreeChecked = (checkedKeys, leafOnly: boolean = false) => { 506 const setTreeChecked = (checkedKeys, leafOnly: boolean = false) => {
502 nextTick(() => { 507 nextTick(() => {
503 const formTree = formTreeRef.value[0] || formTreeRef.value; 508 const formTree = formTreeRef.value[0] || formTreeRef.value;
...@@ -533,7 +538,8 @@ defineExpose({ ...@@ -533,7 +538,8 @@ defineExpose({
533 formTreeRef, 538 formTreeRef,
534 setTableRowSelected, 539 setTableRowSelected,
535 setTreeChecked, 540 setTreeChecked,
536 getDialogConRef 541 getDialogConRef,
542 getCascaderCheckedData
537 }); 543 });
538 </script> 544 </script>
539 545
......
...@@ -3,7 +3,17 @@ import { computed, reactive, ref } from 'vue' ...@@ -3,7 +3,17 @@ import { computed, reactive, ref } from 'vue'
3 import { Search } from '@element-plus/icons-vue' 3 import { Search } from '@element-plus/icons-vue'
4 import type { FormInstance, FormRules } from 'element-plus' 4 import type { FormInstance, FormRules } from 'element-plus'
5 import { debounce } from "@/utils/common" 5 import { debounce } from "@/utils/common"
6 const emits = defineEmits(["tableSearch", "toolFilterChange", "loadMore","remoteMethod","treeSelectLoad","selectChange","treeSelectNodeChange","treeSelectNodeClick"]); 6 const emits = defineEmits([
7 "tableSearch",
8 "toolFilterChange",
9 "loadMore",
10 "remoteMethod",
11 "treeSelectLoad",
12 "selectChange",
13 "treeSelectNodeChange",
14 "treeSelectNodeClick",
15 "cascaderChange",
16 ]);
7 const props = defineProps({ 17 const props = defineProps({
8 itemList: { 18 itemList: {
9 type: Array, 19 type: Array,
...@@ -34,6 +44,7 @@ const resetForm = (formEl: FormInstance | undefined) => { ...@@ -34,6 +44,7 @@ const resetForm = (formEl: FormInstance | undefined) => {
34 emits('tableSearch', form, true) 44 emits('tableSearch', form, true)
35 }) 45 })
36 } 46 }
47
37 defineExpose({ 48 defineExpose({
38 formInline, 49 formInline,
39 formRef 50 formRef
...@@ -68,10 +79,13 @@ const selectChange = (val, row) => { ...@@ -68,10 +79,13 @@ const selectChange = (val, row) => {
68 const handleTreeSelectNodeChange = (node, item) => { 79 const handleTreeSelectNodeChange = (node, item) => {
69 emits("treeSelectNodeChange", node, item); 80 emits("treeSelectNodeChange", node, item);
70 } 81 }
71 const handleTreeSelectNodeClick = (node, item)=>{ 82 const handleTreeSelectNodeClick = (node, item) => {
72 emits("treeSelectNodeClick", node, item); 83 emits("treeSelectNodeClick", node, item);
73 } 84 }
74 const inputChange = (val)=>{ 85 const cascaderChange = (val, item) => {
86 emits("cascaderChange", val, item);
87 }
88 const inputChange = (val) => {
75 onSubmit() 89 onSubmit()
76 } 90 }
77 onMounted(() => { 91 onMounted(() => {
...@@ -86,58 +100,49 @@ onMounted(() => { ...@@ -86,58 +100,49 @@ onMounted(() => {
86 :class="{ 'width_auto': item.type == 'radio-button' }" :prop="item.field"> 100 :class="{ 'width_auto': item.type == 'radio-button' }" :prop="item.field">
87 <template v-if="item.type == 'select'"> 101 <template v-if="item.type == 'select'">
88 <el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]" 102 <el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]"
89 :placeholder="item.placeholder" :clearable="item.clearable" :filterable="item.filterable" @change="(val) => selectChange(val, item)"> 103 :placeholder="item.placeholder" :clearable="item.clearable" :filterable="item.filterable"
90 <el-option v-for="opt in item.options" :label="item.props?.label ? opt[item.props.label] : opt.label" :value="item.props?.value ? opt[item.props.value] : opt.value" /> 104 :disabled="item.disabled ?? false" @change="(val) => selectChange(val, item)">
105 <el-option v-for="opt in item.options" :label="item.props?.label ? opt[item.props.label] : opt.label"
106 :value="item.props?.value ? opt[item.props.value] : opt.value" />
91 </el-select> 107 </el-select>
92 </template> 108 </template>
93 <template v-else-if="item.type == 'input-select'"> 109 <template v-else-if="item.type == 'input-select'">
94 <el-input v-model.trim="formInline[item.field]" :placeholder="item.placeholder" class="input-with-select" :maxlength="item.maxlength ?? ''" 110 <el-input v-model.trim="formInline[item.field]" :placeholder="item.placeholder" class="input-with-select"
95 :suffix-icon="Search"> 111 :maxlength="item.maxlength ?? ''" :suffix-icon="Search">
96 <template #prepend> 112 <template #prepend>
97 <span v-for="child in item.children"> 113 <span v-for="child in item.children">
98 <el-select v-model="formItemList[child.field]" :placeholder="child.placeholder" 114 <el-select v-model="formItemList[child.field]" :placeholder="child.placeholder"
99 :clearable="item.clearable" style="vertical-align: inherit;"> 115 :clearable="item.clearable" style="vertical-align: inherit;">
100 <el-option v-for="opts in child.options" :label="child.props?.label ? opts[item.props.label] : opts.label" :value="child.props?.value ? opts[item.props.value] : opts.value" /> 116 <el-option v-for="opts in child.options"
117 :label="child.props?.label ? opts[item.props.label] : opts.label"
118 :value="child.props?.value ? opts[item.props.value] : opts.value" />
101 </el-select> 119 </el-select>
102 </span> 120 </span>
103 </template> 121 </template>
104 </el-input> 122 </el-input>
105 </template> 123 </template>
106 <template v-else-if="item.type=='tree-select'"> 124 <template v-else-if="item.type == 'tree-select'">
107 <div class="select_slots_panel"> 125 <div class="select_slots_panel">
108 <div class="slot-prefix" v-for="child in item.children"> 126 <div class="slot-prefix" v-for="child in item.children">
109 <el-select v-model="formInline[child.field]" :placeholder="child.placeholder" @change="(val) => selectChange(val, child)" > 127 <el-select v-model="formInline[child.field]" :placeholder="child.placeholder"
128 @change="(val) => selectChange(val, child)">
110 <el-option v-for="cpt in child.options" :label="cpt.label" :value="cpt.value" /> 129 <el-option v-for="cpt in child.options" :label="cpt.label" :value="cpt.value" />
111 </el-select> 130 </el-select>
112 </div> 131 </div>
113 </div> 132 </div>
114 <div class="slot-default"> 133 <div class="slot-default">
115 <el-tree-select 134 <el-tree-select v-model="formInline[item.field]" :data="item.options" :placeholder="item.placeholder"
116 v-model="formInline[item.field]" 135 :clearable="item.clearable" :filterable="item.filterable" :disabled="item.disabled"
117 :data="item.options" 136 :lazy="item.lazy ?? true" :check-strictly="item.checkStrictly ?? false" :node-key="item.nodeKey ?? 'guid'"
118 :placeholder="item.placeholder" 137 :load="(node, resolve) => treeSelectLoad(node, resolve, item)" :props="item.props"
119 :clearable="item.clearable" 138 :multiple="item.multiple ?? false" :render-after-expand="true" :teleported="item.teleported ?? true"
120 :filterable="item.filterable" 139 :default-expanded-keys="item.expandKeys" :collapse-tags-tooltip="item.collapseTagsTooltip ?? false"
121 :disabled="item.disabled" 140 :collapse-tags="item.collapseTags ?? false" :max-collapse-tags="item.maxTags ?? 1"
122 :lazy="item.lazy ?? true" 141 :show-checkbox="item.showCheckbox ?? false" @change="(val) => selectChange(val, item)"
123 :check-strictly = "item.checkStrictly ?? false" 142 @current-change="(node) => handleTreeSelectNodeChange(node, item)"
124 :node-key="item.nodeKey ?? 'guid'" 143 @node-click="(node) => handleTreeSelectNodeClick(node, item)">
125 :load="(node, resolve) => treeSelectLoad(node, resolve, item)"
126 :props="item.props"
127 :multiple="item.multiple ?? false"
128 :render-after-expand="true"
129 :teleported="item.teleported ?? true"
130 :default-expanded-keys="item.expandKeys"
131 :collapse-tags-tooltip="item.collapseTagsTooltip ?? false"
132 :collapse-tags="item.collapseTags ?? false"
133 :max-collapse-tags="item.maxTags ?? 1"
134 :show-checkbox="item.showCheckbox ?? false"
135 @change="(val) => selectChange(val, item)"
136 @current-change="(node) => handleTreeSelectNodeChange(node, item)"
137 @node-click = "(node)=>handleTreeSelectNodeClick(node, item)"
138 >
139 144
140 <!-- <template #default="{ node, data }"> 145 <!-- <template #default="{ node, data }">
141 <template v-if="item.getName"> 146 <template v-if="item.getName">
142 <div 147 <div
143 class="left-code" 148 class="left-code"
...@@ -153,10 +158,10 @@ onMounted(() => { ...@@ -153,10 +158,10 @@ onMounted(() => {
153 {{ item.getName(data, node) }} 158 {{ item.getName(data, node) }}
154 </div> 159 </div>
155 </template> 160 </template>
156 <span v-else>{{ data[item.props.label] }}</span> 161 <span v-else>{{ data[item.props.label] }}</span>
157 </template> --> 162 </template> -->
158 </el-tree-select> 163 </el-tree-select>
159 </div> 164 </div>
160 165
161 </template> 166 </template>
162 <template v-else-if="item.type == 'date-time'"> 167 <template v-else-if="item.type == 'date-time'">
...@@ -178,13 +183,21 @@ onMounted(() => { ...@@ -178,13 +183,21 @@ onMounted(() => {
178 <div class="slot-default"> 183 <div class="slot-default">
179 <el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]" 184 <el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]"
180 :placeholder="item.placeholder" :multiple="item.multiple" collapse-tags collapse-tags-tooltip 185 :placeholder="item.placeholder" :multiple="item.multiple" collapse-tags collapse-tags-tooltip
181 @change="(val) => selectChange(val, item)" 186 @change="(val) => selectChange(val, item)" :max-collapse-tags="3" :filterable="item.filterable"
182 :max-collapse-tags="3" :filterable="item.filterable" :clearable="item.clearable" v-loadmore="loadMore"> 187 :clearable="item.clearable" v-loadmore="loadMore">
183 <el-option v-for="opt in item.options" :label="opt.label" :value="opt.value" /> 188 <el-option v-for="opt in item.options" :label="opt.label" :value="opt.value" />
184 </el-select> 189 </el-select>
185 </div> 190 </div>
186 </div> 191 </div>
187 </template> 192 </template>
193 <template v-else-if="item.type == 'cascader'">
194 <el-cascader ref="formCascaderRef" :class="[item.col, { is_block: item.block }]"
195 v-model="formInline[item.field]" :options="item.options" :props="item.props" :placeholder="item.placeholder"
196 :show-all-levels="item.showAllLevels ?? true" :clearable="item.clearable"
197 :filterable="item.filterable ?? false" :collapse-tags="item.collapse ?? false"
198 :collapse-tags-tooltip="item.tagsTooltip ?? false" :max-collapse-tags="item.maxTags ?? 1"
199 :disabled="item.disabled ?? false" @change="(val) => cascaderChange(val, item)" />
200 </template>
188 <template v-else> 201 <template v-else>
189 <el-input v-model.trim="formInline[item.field]" :placeholder="item.placeholder" :clearable="item.clearable" 202 <el-input v-model.trim="formInline[item.field]" :placeholder="item.placeholder" :clearable="item.clearable"
190 @clear="inputChange" /> 203 @clear="inputChange" />
......
1 <script lang="ts" setup name="TableTools"> 1 <script lang="ts" setup name="TableTools">
2 import TableSearch from './table_search.vue' 2 import TableSearch from './table_search.vue'
3 const emits = defineEmits(["search", "filterChange","loadMore","remoteMethod","treeSelectLoad","selectChange","treeSelectNodeChange","treeSelectNodeClick"]); 3 const emits = defineEmits(["search", "filterChange","loadMore","remoteMethod","treeSelectLoad","selectChange","treeSelectNodeChange","treeSelectNodeClick","cascaderChange"]);
4 const props = defineProps({ 4 const props = defineProps({
5 searchItems: { 5 searchItems: {
6 type: Array, 6 type: Array,
...@@ -53,6 +53,10 @@ const handleTreeSelectNodeChange = (node, item) => { ...@@ -53,6 +53,10 @@ const handleTreeSelectNodeChange = (node, item) => {
53 const treeSelectNodeClick = (node, item)=>{ 53 const treeSelectNodeClick = (node, item)=>{
54 emits("treeSelectNodeClick", node, item); 54 emits("treeSelectNodeClick", node, item);
55 } 55 }
56 const cascaderChange = (val, item) => {
57 emits("cascaderChange", val, item);
58 }
59
56 defineExpose({ 60 defineExpose({
57 toolSearch, 61 toolSearch,
58 }) 62 })
...@@ -61,14 +65,15 @@ defineExpose({ ...@@ -61,14 +65,15 @@ defineExpose({
61 <template> 65 <template>
62 <div class="table-tools"> 66 <div class="table-tools">
63 <div class="tools_search"> 67 <div class="tools_search">
64 <TableSearch ref="toolSearch" :itemList="itemList" :init="props.init??true" 68 <TableSearch ref="toolSearch" :itemList="itemList" :init="props.init??true"
65 :formId="formId" 69 :formId="formId"
66 @tableSearch="tableSearch" 70 @tableSearch="tableSearch"
67 @toolFilterChange="toolFilterChange" @loadMore="loadMore" 71 @toolFilterChange="toolFilterChange" @loadMore="loadMore"
68 @treeSelectLoad="treeSelectLoad" 72 @treeSelectLoad="treeSelectLoad"
69 @selectChange="selectChange" 73 @selectChange="selectChange"
70 @treeSelectNodeChange="handleTreeSelectNodeChange" 74 @treeSelectNodeChange="handleTreeSelectNodeChange"
71 @treeSelectNodeClick="treeSelectNodeClick" 75 @treeSelectNodeClick="treeSelectNodeClick"
76 @cascaderChange="cascaderChange"
72 /> 77 />
73 </div> 78 </div>
74 <div class="tools_bar" v-if="bars?.length"> 79 <div class="tools_bar" v-if="bars?.length">
......
...@@ -55,7 +55,7 @@ const getSvgElement = async (item:any)=>{ ...@@ -55,7 +55,7 @@ const getSvgElement = async (item:any)=>{
55 } 55 }
56 // reslove(122) 56 // reslove(122)
57 // }) 57 // })
58 58
59 59
60 } 60 }
61 </script> 61 </script>
...@@ -67,7 +67,7 @@ const getSvgElement = async (item:any)=>{ ...@@ -67,7 +67,7 @@ const getSvgElement = async (item:any)=>{
67 <el-menu-item :title="item1.meta?.title ?? '[ 无标题 ]'" :index="resolveRoutePath(basePath, item1.path || '')"> 67 <el-menu-item :title="item1.meta?.title ?? '[ 无标题 ]'" :index="resolveRoutePath(basePath, item1.path || '')">
68 <el-icon v-if="item1.meta?.icon" class="title-icon" > 68 <el-icon v-if="item1.meta?.icon" class="title-icon" >
69 <!-- <img :src="item.meta.icon" v-if="item.meta.icon.indexOf('http')>-1" alt=""> --> 69 <!-- <img :src="item.meta.icon" v-if="item.meta.icon.indexOf('http')>-1" alt=""> -->
70 70
71 <!-- {{ item.meta.icon }} --> 71 <!-- {{ item.meta.icon }} -->
72 <template v-if="item1.meta.icon.indexOf('svg')>-1"> 72 <template v-if="item1.meta.icon.indexOf('svg')>-1">
73 <i v-html="item1.meta.icon" :key="item1.meta.icon" v-if="!item1.meta.isEle"></i> 73 <i v-html="item1.meta.icon" :key="item1.meta.icon" v-if="!item1.meta.isEle"></i>
......
...@@ -74,15 +74,8 @@ const routes: RouteRecordRaw[] = [ ...@@ -74,15 +74,8 @@ const routes: RouteRecordRaw[] = [
74 sidebar: false, 74 sidebar: false,
75 breadcrumb: false, 75 breadcrumb: false,
76 cache: true, 76 cache: true,
77 reuse: true,
78 editPage: true,
79 activeMenu: '/data-inventory/classify-grade-manage/task-config' 77 activeMenu: '/data-inventory/classify-grade-manage/task-config'
80 }, 78 },
81 beforeEnter: (to, from) => {
82 // if (to.query.name) {
83 // to.meta.title = `编辑-${to.query.name}`;
84 // }
85 }
86 }, 79 },
87 { 80 {
88 path: 'template-config', 81 path: 'template-config',
...@@ -119,7 +112,7 @@ const routes: RouteRecordRaw[] = [ ...@@ -119,7 +112,7 @@ const routes: RouteRecordRaw[] = [
119 }, 112 },
120 beforeEnter: (to, from) => { 113 beforeEnter: (to, from) => {
121 if (to.query.classStandardName) { 114 if (to.query.classStandardName) {
122 to.meta.title = `编辑-${to.query.classStandardName}`; 115 to.meta.title = `编辑-${to.query.classStandardName}`;
123 } 116 }
124 } 117 }
125 }, 118 },
......
...@@ -33,12 +33,8 @@ const useUserStore = defineStore( ...@@ -33,12 +33,8 @@ const useUserStore = defineStore(
33 function getToken(data, state) { 33 function getToken(data, state) {
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 == 'http://localhost:9000' ? 'http://localhost:9000/' : 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') {
...@@ -105,9 +101,9 @@ const useUserStore = defineStore( ...@@ -105,9 +101,9 @@ const useUserStore = defineStore(
105 }).then((resInfo: any) => { 101 }).then((resInfo: any) => {
106 getTokenPromise.value = null; 102 getTokenPromise.value = null;
107 if (resInfo.code == '00000'){ 103 if (resInfo.code == '00000'){
108 localStorage.setItem('token',resInfo.data.access_token); 104 localStorage.setItem('token',resInfo.data.accessToken);
109 token.value = resInfo.data.access_token; 105 token.value = resInfo.data.accessToken;
110 localStorage.setItem('refresh_token',resInfo.data.refresh_token); 106 localStorage.setItem('refresh_token',resInfo.data.refreshToken);
111 const expiresIn = (Date.now() + 1700000) + ""; 107 const expiresIn = (Date.now() + 1700000) + "";
112 localStorage.setItem('expiresIn', expiresIn); 108 localStorage.setItem('expiresIn', expiresIn);
113 } else { 109 } else {
......
...@@ -112,7 +112,7 @@ service.interceptors.request.use( ...@@ -112,7 +112,7 @@ service.interceptors.request.use(
112 return config; 112 return config;
113 }; 113 };
114 /** 若是刷新token的请求,则不需要等refreshToken完成。 */ 114 /** 若是刷新token的请求,则不需要等refreshToken完成。 */
115 if (config.url.includes('/csbr-zuul/user/refreshToken')) { 115 if (config.url.includes('/user/refreshToken')) {
116 return process(); 116 return process();
117 } 117 }
118 let expiresIn = localStorage.getItem('expiresIn'); 118 let expiresIn = localStorage.getItem('expiresIn');
......
...@@ -9,329 +9,16 @@ import useUserStore from "@/store/modules/user"; ...@@ -9,329 +9,16 @@ import useUserStore from "@/store/modules/user";
9 import { ElMessage, ElMessageBox } from "element-plus"; 9 import { ElMessage, ElMessageBox } from "element-plus";
10 10
11 import useDataAssetStore from "@/store/modules/dataAsset"; 11 import useDataAssetStore from "@/store/modules/dataAsset";
12 import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList } from "@/api/modules/dataProduct"; 12 import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory";
13 import { TableColumnWidth } from '@/utils/enum'; 13 import { TableColumnWidth } from '@/utils/enum';
14 14
15 import Table from "@/components/Table/index.vue";
16
17 const { proxy } = getCurrentInstance() as any; 15 const { proxy } = getCurrentInstance() as any;
18 const router = useRouter(); 16 const router = useRouter();
19 const userStore = useUserStore(); 17 const userStore = useUserStore();
20 const userData = JSON.parse(userStore.userData); 18 const userData = JSON.parse(userStore.userData);
21 const assetStore = useDataAssetStore(); 19 const assetStore = useDataAssetStore();
22 const datas = [
23 {
24 "updateTime": "2024-07-16 13:17:00",
25 "updateUserName": "数往知来管理员",
26 "guid": "4e0e76c48fa043d5b35d09f3ccc7c265",
27 "approvalGuid": null,
28 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
29 "fieldStandardCode": "COL202406070021",
30 "dataVersion": 1,
31 "chName": "地址",
32 "enName": "address",
33 "dataTypeValue": "字符型",
34 "dataTypeCode": "varchar",
35 "dataDicGuid": "",
36 "dataDicName": null,
37 "isDataDic": "N",
38 "fieldLength": 600,
39 "fieldPrecision": null,
40 "dataState": 0,
41 "approveState": "N",
42 "dataCategory": "合伙人",
43 "dataEncryptionLevel": "界面加密",
44 "businessDefDesc": "地址",
45 "flowFlag": null,
46 "flowCode": null,
47 "functionCode": null,
48 "createStaffGuid": null,
49 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
50 "displayVersion": "V1",
51 "standardSetName": null,
52 "ruleType": null
53 },
54 {
55 "updateTime": "2024-01-27 10:19:45",
56 "updateUserName": "数往知来管理员",
57 "guid": "bc630207357c466dbff7613ea38985cc",
58 "approvalGuid": null,
59 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
60 "fieldStandardCode": "COL202401260124",
61 "dataVersion": 1,
62 "chName": "包含最小销售包装单元数量",
63 "enName": "inboxQuantity",
64 "dataTypeValue": "整型",
65 "dataTypeCode": "int",
66 "dataDicGuid": null,
67 "dataDicName": null,
68 "isDataDic": null,
69 "fieldLength": null,
70 "fieldPrecision": null,
71 "dataState": 1,
72 "approveState": "A",
73 "dataCategory": null,
74 "dataEncryptionLevel": "明文显示",
75 "businessDefDesc": "当前药品追溯码中包含的最小销售包装单元药品追溯码的数量,发货类型为03时可选",
76 "flowFlag": null,
77 "flowCode": null,
78 "functionCode": null,
79 "createStaffGuid": null,
80 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
81 "displayVersion": "V1",
82 "standardSetName": null,
83 "ruleType": null
84 },
85 {
86 "updateTime": "2024-01-27 11:03:59",
87 "updateUserName": "审批人4",
88 "guid": "420f2a68bd4441bf92010eadf698b685",
89 "approvalGuid": null,
90 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
91 "fieldStandardCode": "COL202401260122",
92 "dataVersion": 1,
93 "chName": "包装层级",
94 "enName": "packageLevel",
95 "dataTypeValue": "字符型",
96 "dataTypeCode": "varchar",
97 "dataDicGuid": null,
98 "dataDicName": null,
99 "isDataDic": null,
100 "fieldLength": 200,
101 "fieldPrecision": null,
102 "dataState": 1,
103 "approveState": "A",
104 "dataCategory": null,
105 "dataEncryptionLevel": "明文显示",
106 "businessDefDesc": "当前药品追溯码所处包装层级描述,发货类型为03时可选",
107 "flowFlag": null,
108 "flowCode": null,
109 "functionCode": null,
110 "createStaffGuid": null,
111 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
112 "displayVersion": "V1",
113 "standardSetName": null,
114 "ruleType": null
115 },
116 {
117 "updateTime": "2024-06-06 10:01:06",
118 "updateUserName": "审批人1",
119 "guid": "f841e1848ab94b1e81a0217a09a7a3d3",
120 "approvalGuid": "b674bffe8d2f4132918016b6baaf75aa",
121 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
122 "fieldStandardCode": "COL202401260120",
123 "dataVersion": 1,
124 "chName": "上一级包装药品追溯码",
125 "enName": "parentDTC",
126 "dataTypeValue": "字符型",
127 "dataTypeCode": "varchar",
128 "dataDicGuid": "",
129 "dataDicName": null,
130 "isDataDic": "N",
131 "fieldLength": 200,
132 "fieldPrecision": null,
133 "dataState": 1,
134 "approveState": "Y",
135 "dataCategory": "",
136 "dataEncryptionLevel": "明文显示",
137 "businessDefDesc": "当前药品追溯码大一级包装上的药品追溯码,发货类型为03时可选;当存在上一级包装时必选",
138 "flowFlag": null,
139 "flowCode": null,
140 "functionCode": null,
141 "createStaffGuid": null,
142 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
143 "displayVersion": "V1",
144 "standardSetName": null,
145 "ruleType": null
146 },
147 {
148 "updateTime": "2024-01-26 00:10:47",
149 "updateUserName": "数往知来管理员",
150 "guid": "d4d42dea2a5844b4a7f9238806ea507b",
151 "approvalGuid": null,
152 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
153 "fieldStandardCode": "COL202401260118",
154 "dataVersion": 1,
155 "chName": "药品追溯码",
156 "enName": "DTC",
157 "dataTypeValue": "字符型",
158 "dataTypeCode": "varchar",
159 "dataDicGuid": null,
160 "dataDicName": null,
161 "isDataDic": null,
162 "fieldLength": 200,
163 "fieldPrecision": null,
164 "dataState": 0,
165 "approveState": "N",
166 "dataCategory": null,
167 "dataEncryptionLevel": "明文显示",
168 "businessDefDesc": "用于唯一标识药品各级销售包装单元的代码,发货类型为03时可选",
169 "flowFlag": null,
170 "flowCode": null,
171 "functionCode": null,
172 "createStaffGuid": null,
173 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
174 "displayVersion": "V1",
175 "standardSetName": null,
176 "ruleType": null
177 },
178 {
179 "updateTime": "2024-01-26 00:10:47",
180 "updateUserName": "数往知来管理员",
181 "guid": "ff9d0e4f6fbb444c8dcf6f67bffcb659",
182 "approvalGuid": null,
183 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
184 "fieldStandardCode": "COL202401260116",
185 "dataVersion": 1,
186 "chName": "发货数量",
187 "enName": "deliveryQuantity",
188 "dataTypeValue": "整型",
189 "dataTypeCode": "int",
190 "dataDicGuid": null,
191 "dataDicName": null,
192 "isDataDic": null,
193 "fieldLength": null,
194 "fieldPrecision": null,
195 "dataState": 0,
196 "approveState": "N",
197 "dataCategory": null,
198 "dataEncryptionLevel": "明文显示",
199 "businessDefDesc": "发货的最小销售包装单元数量",
200 "flowFlag": null,
201 "flowCode": null,
202 "functionCode": null,
203 "createStaffGuid": null,
204 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
205 "displayVersion": "V1",
206 "standardSetName": null,
207 "ruleType": null
208 },
209 {
210 "updateTime": "2024-01-26 00:10:46",
211 "updateUserName": "数往知来管理员",
212 "guid": "fe88ac9e8d9c4f148833dbb3976fca77",
213 "approvalGuid": null,
214 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
215 "fieldStandardCode": "COL202401260114",
216 "dataVersion": 1,
217 "chName": "药品生产批号",
218 "enName": "batch",
219 "dataTypeValue": "字符型",
220 "dataTypeCode": "varchar",
221 "dataDicGuid": null,
222 "dataDicName": null,
223 "isDataDic": null,
224 "fieldLength": 20,
225 "fieldPrecision": null,
226 "dataState": 0,
227 "approveState": "N",
228 "dataCategory": null,
229 "dataEncryptionLevel": "明文显示",
230 "businessDefDesc": "药品包装上标示的生产批号",
231 "flowFlag": null,
232 "flowCode": null,
233 "functionCode": null,
234 "createStaffGuid": null,
235 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
236 "displayVersion": "V1",
237 "standardSetName": null,
238 "ruleType": null
239 },
240 {
241 "updateTime": "2024-01-26 00:10:45",
242 "updateUserName": "数往知来管理员",
243 "guid": "9759837e0d72472ab7441c1873c9159a",
244 "approvalGuid": null,
245 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
246 "fieldStandardCode": "COL202401260112",
247 "dataVersion": 1,
248 "chName": "药品有效期截止日期",
249 "enName": "expirationDate",
250 "dataTypeValue": "日期型",
251 "dataTypeCode": "date",
252 "dataDicGuid": null,
253 "dataDicName": null,
254 "isDataDic": null,
255 "fieldLength": null,
256 "fieldPrecision": null,
257 "dataState": 0,
258 "approveState": "N",
259 "dataCategory": null,
260 "dataEncryptionLevel": "明文显示",
261 "businessDefDesc": "药品有效期的截止日期",
262 "flowFlag": null,
263 "flowCode": null,
264 "functionCode": null,
265 "createStaffGuid": null,
266 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
267 "displayVersion": "V1",
268 "standardSetName": null,
269 "ruleType": null
270 },
271 {
272 "updateTime": "2024-01-26 00:10:45",
273 "updateUserName": "数往知来管理员",
274 "guid": "a39ed6123c6a420d9d1265315e714f86",
275 "approvalGuid": null,
276 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
277 "fieldStandardCode": "COL202401260110",
278 "dataVersion": 1,
279 "chName": "药品生产日期",
280 "enName": "productionDate",
281 "dataTypeValue": "日期型",
282 "dataTypeCode": "date",
283 "dataDicGuid": null,
284 "dataDicName": null,
285 "isDataDic": null,
286 "fieldLength": null,
287 "fieldPrecision": null,
288 "dataState": 0,
289 "approveState": "N",
290 "dataCategory": null,
291 "dataEncryptionLevel": "明文显示",
292 "businessDefDesc": "药品包装上标示的生产日期",
293 "flowFlag": null,
294 "flowCode": null,
295 "functionCode": null,
296 "createStaffGuid": null,
297 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
298 "displayVersion": "V1",
299 "standardSetName": null,
300 "ruleType": null
301 },
302 {
303 "updateTime": "2024-01-26 00:10:45",
304 "updateUserName": "数往知来管理员",
305 "guid": "ea597c1b8bb24a5ab053a80b084de98c",
306 "approvalGuid": null,
307 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
308 "fieldStandardCode": "COL202401260108",
309 "dataVersion": 1,
310 "chName": "统一社会信用代码(进口药品代理企业)",
311 "enName": "drugImporterUSCID",
312 "dataTypeValue": "字符型",
313 "dataTypeCode": "varchar",
314 "dataDicGuid": null,
315 "dataDicName": null,
316 "isDataDic": null,
317 "fieldLength": 18,
318 "fieldPrecision": null,
319 "dataState": 0,
320 "approveState": "N",
321 "dataCategory": null,
322 "dataEncryptionLevel": "明文显示",
323 "businessDefDesc": "进口药品代理企业的统一社会信用代码,进口药品必选;没有统一社会信用代码时使用组织机构代码",
324 "flowFlag": null,
325 "flowCode": null,
326 "functionCode": null,
327 "createStaffGuid": null,
328 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
329 "displayVersion": "V1",
330 "standardSetName": null,
331 "ruleType": null
332 }
333 ]
334 20
21 const loading = ref(false);
335 const page = ref({ 22 const page = ref({
336 limit: 50, 23 limit: 50,
337 curr: 1, 24 curr: 1,
...@@ -353,82 +40,71 @@ const tableInfo = ref({ ...@@ -353,82 +40,71 @@ const tableInfo = ref({
353 { 40 {
354 label: "目录名称", field: "cgDirName", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => { 41 label: "目录名称", field: "cgDirName", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => {
355 router.push({ 42 router.push({
356 name: "templateConfig", 43 name: "classifyGradeCatalogue",
357 query: { guid: scope.row.damGuid }, 44 // query: { guid: scope.row.damGuid },
358 }); 45 });
359 } 46 }
360 }, 47 },
361 { label: "分类分级模板", field: "cgTemplateName", width: 200 }, 48 {
362 { label: "元数据", field: "metaNames", width: 200 }, 49 label: "元数据", field: "metaNames", width: 200, getName: (scope) => {
50 const metaNames = scope.row.metaNames || [];
51 return metaNames.join(',');
52 }
53 },
363 { 54 {
364 label: "执行状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 55 label: "执行状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
365 return filterVal(scope.row.status, 'status'); 56 return filterVal(scope.row.status, 'status');
366 } 57 }
367 }, 58 },
368 { label: "任务修改人", field: "dataCategory", width: 120 }, 59 { label: "任务修改人", field: "updateUserName", width: 120 },
369 { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME }, 60 { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
370 { label: "确认次数", field: "fieldLength", width: 96, align: 'right' }, 61 { label: "确认次数", field: "confirmCnt", width: 96, align: 'right' },
371 { label: "结果确认人", field: "updateUserName", width: 120 }, 62 { label: "结果确认人", field: "confirmUserName", width: 120 },
372 { label: "确认时间", field: "updateTime", width: TableColumnWidth.DATETIME }, 63 { label: "确认时间", field: "confirmTime", width: TableColumnWidth.DATETIME },
373 { 64 {
374 label: "结果状态", field: "approveState", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 65 label: "结果状态", field: "confirmStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
375 return filterVal(scope.row.approveState, 'approveState'); 66 return filterVal(scope.row.confirmStatus, 'confirmStatus');
376 } 67 }, tagType: (scope) => {
68 return scope.row.confirmStatus=='Y'?'success':'warning';
69 },
377 }, 70 },
378 ], 71 ],
379 loading: false, 72 data: [],
380 data: datas || [], 73 showPage: false,
381 page: {
382 type: "normal",
383 rows: 0,
384 ...page.value,
385 },
386 actionInfo: { 74 actionInfo: {
387 label: "操作", 75 label: "操作",
388 type: "btn", 76 type: "btn",
389 width: 280, 77 width: 280,
390 btns: (scope) => { 78 btns: (scope) => {
391 let row = scope.row, btnArr: any = [ 79 let row = scope.row, btnArr: any = [
392 { label: "结果确认", value: "confirm" }, 80 { label: "手动执行", value: "run" },
393 { label: "结果修改", value: "modify" },
394 { label: "编辑", value: "edit" }, 81 { label: "编辑", value: "edit" },
395 { label: "日志", value: "log" }, 82 { label: "日志", value: "log" },
396 { label: "删除", value: "delete" } 83 { label: "删除", value: "delete" }
397 ]; 84 ];
398 // if (row.approveState == 'Y') { 85 if (row.confirmStatus == 'Y') {
399 // if (row.listingStatus == 'Y') { 86 btnArr.splice(0, 0, { label: "结果修改", value: "modify" });
400 // btnArr.splice(0, 0, { label: "详情", value: "detail" }); 87 } else {
401 // } else { 88 btnArr.splice(0, 0, { label: "结果确认", value: "confirm", disabled: row.status != 'Y' });
402 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" }); 89 }
403 // }
404 // } else {
405 // if (row.approveState == 'A') {
406 // btnArr.splice(0, 0, { label: "详情", value: "detail" });
407 // } else {
408 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
409 // }
410 // }
411 return btnArr; 90 return btnArr;
412 }, 91 },
413 }, 92 },
414 }); 93 });
415 94
416 const getTableData = () => { 95 const getTableData = () => {
417 tableInfo.value.loading = true; 96 loading.value = true;
418 getListingList( 97 getCgTaskPageList(
419 Object.assign({}, searchItemValue.value, { 98 Object.assign({}, searchItemValue.value, {
420 pageIndex: page.value.curr, 99 pageIndex: page.value.curr,
421 pageSize: page.value.limit, 100 pageSize: -1,
422 }) 101 })
423 ).then((res: any) => { 102 ).then((res: any) => {
424 tableInfo.value.loading = false; 103 loading.value = false;
425 tableInfo.value.data = res.data.records || []; 104 tableInfo.value.data = res.data.records || [];
426 tableInfo.value.page.curr = res.data.pageIndex;
427 tableInfo.value.page.limit = res.data.pageSize;
428 tableInfo.value.page.rows = res.data.totalRows;
429 }) 105 })
430 .catch((res) => { 106 .catch((res) => {
431 tableInfo.value.loading = false; 107 loading.value = false;
432 }); 108 });
433 }; 109 };
434 110
...@@ -436,8 +112,25 @@ const tableBtnClick = (scope, btn) => { ...@@ -436,8 +112,25 @@ const tableBtnClick = (scope, btn) => {
436 const type = btn.value; 112 const type = btn.value;
437 const row = scope.row; 113 const row = scope.row;
438 currTableData.value = row; 114 currTableData.value = row;
439 if(type == 'confirm' || type == 'modify' || type == 'edit' || type == "log"){ 115 if (type == 'confirm' || type == 'modify' || type == 'edit' || type == "log") {
440 toPath(type); 116 toPath(type);
117 } else if (type == 'run') {
118 const params = {guid: currTableData.value.guid};
119 runExecTask(params).then((res: any) => {
120 if (res.code == proxy.$passCode) {
121 getTableData();
122 } else {
123 ElMessage({
124 type: "error",
125 message: res.msg,
126 });
127 }
128 }).catch((res) => {
129 ElMessage({
130 type: "error",
131 message: '请求失败',
132 });
133 });
441 } else if (type === "delete") { 134 } else if (type === "delete") {
442 open("此操作将永久删除,是否继续?", "warning"); 135 open("此操作将永久删除,是否继续?", "warning");
443 } 136 }
...@@ -451,21 +144,22 @@ const toPath = (type) => { ...@@ -451,21 +144,22 @@ const toPath = (type) => {
451 type 144 type
452 }, 145 },
453 }); 146 });
454 } else if(type == 'edit'){ 147 } else if (type == 'edit') {
455 router.push({ 148 router.push({
456 name: "taskEdit", 149 name: "taskEdit",
457 query: { 150 query: {
458 guid: currTableData.value.guid, 151 guid: currTableData.value.guid,
459 name: currTableData.value.damName, 152 name: currTableData.value.taskName,
460 type 153 type
461 }, 154 },
462 }); 155 });
463 } else if(type == 'confirm' || type == 'modify'){ 156 } else if (type == 'confirm' || type == 'modify') {
464 router.push({ 157 router.push({
465 name: "taskDetail", 158 name: "taskDetail",
466 query: { 159 query: {
467 guid: currTableData.value.guid, 160 guid: currTableData.value.guid,
468 name: currTableData.value.damName, 161 name: currTableData.value.taskName,
162 detail: JSON.stringify(currTableData.value),
469 type 163 type
470 }, 164 },
471 }); 165 });
...@@ -474,21 +168,13 @@ const toPath = (type) => { ...@@ -474,21 +168,13 @@ const toPath = (type) => {
474 name: "taskLog", 168 name: "taskLog",
475 query: { 169 query: {
476 guid: currTableData.value.guid, 170 guid: currTableData.value.guid,
477 name: currTableData.value.damName, 171 name: currTableData.value.taskName,
478 type 172 type
479 }, 173 },
480 }); 174 });
481 } 175 }
482 } 176 }
483 177
484 const tablePageChange = (info) => {
485 page.value.curr = Number(info.curr);
486 page.value.limit = Number(info.limit);
487 tableInfo.value.page.limit = page.value.limit;
488 tableInfo.value.page.curr = page.value.curr;
489 getTableData();
490 };
491
492 const open = (msg, type, isBatch = false) => { 178 const open = (msg, type, isBatch = false) => {
493 ElMessageBox.confirm(msg, "提示", { 179 ElMessageBox.confirm(msg, "提示", {
494 confirmButtonText: "确定", 180 confirmButtonText: "确定",
...@@ -496,9 +182,9 @@ const open = (msg, type, isBatch = false) => { ...@@ -496,9 +182,9 @@ const open = (msg, type, isBatch = false) => {
496 type: type, 182 type: type,
497 }).then(() => { 183 }).then(() => {
498 const guids = [currTableData.value.guid]; 184 const guids = [currTableData.value.guid];
499 listingDelete(guids).then((res: any) => { 185 cgTaskDelete(guids).then((res: any) => {
500 if (res.code == proxy.$passCode) { 186 if (res.code == proxy.$passCode) {
501 getFirstPageData(); 187 getTableData();
502 ElMessage({ 188 ElMessage({
503 type: "success", 189 type: "success",
504 message: "删除成功", 190 message: "删除成功",
...@@ -510,41 +196,33 @@ const open = (msg, type, isBatch = false) => { ...@@ -510,41 +196,33 @@ const open = (msg, type, isBatch = false) => {
510 }); 196 });
511 } 197 }
512 }).catch((res) => { 198 }).catch((res) => {
513 tableInfo.value.loading = false; 199
514 }); 200 });
515 }); 201 });
516 }; 202 };
517 203
518 const getFirstPageData = () => {
519 page.value.curr = 1
520 tableInfo.value.page.curr = 1;
521 getTableData();
522 }
523
524 onActivated(() => { 204 onActivated(() => {
525 if (assetStore.isRefresh) {//如果是首次加载,则不需要调用 205 // if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
526 getFirstPageData(); 206 // getFirstPageData();
527 assetStore.set(false); 207 // assetStore.set(false);
528 } 208 // }
529 }) 209 })
530 210
531 onBeforeMount(() => { 211 onBeforeMount(() => {
532 212 getTableData()
533 }) 213 })
534 214
535 </script> 215 </script>
536 216
537 <template> 217 <template>
538 <div class="container_wrap" v-if="tableInfo.data.length"> 218 <div class="container_wrap" v-loading="loading">
539 <div class="table_tool_wrap"> 219 <div class="table_tool_wrap" v-if="tableInfo.data.length">
540 <div class="table_title">分类分级任务</div> 220 <div class="table_title">分类分级任务</div>
541 </div> 221 </div>
542 <div class="table_panel_wrap"> 222 <div class="table_panel_wrap" v-if="tableInfo.data.length">
543 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 223 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" />
544 </div> 224 </div>
545 </div> 225 <div class="card-noData" v-else>
546 <div class="container_wrap" v-else>
547 <div class="card-noData">
548 <img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" /> 226 <img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
549 <p>暂无分类分级任务,<span class="text_btn" @click="toPath('add')">去新建</span></p> 227 <p>暂无分类分级任务,<span class="text_btn" @click="toPath('add')">去新建</span></p>
550 </div> 228 </div>
...@@ -554,7 +232,7 @@ onBeforeMount(() => { ...@@ -554,7 +232,7 @@ onBeforeMount(() => {
554 <style scoped lang="scss"> 232 <style scoped lang="scss">
555 .table_tool_wrap { 233 .table_tool_wrap {
556 width: 100%; 234 width: 100%;
557 height: 40px !important; 235 min-height: unset;
558 padding: 0 8px; 236 padding: 0 8px;
559 237
560 .table_title { 238 .table_title {
...@@ -569,7 +247,7 @@ onBeforeMount(() => { ...@@ -569,7 +247,7 @@ onBeforeMount(() => {
569 .table_panel_wrap { 247 .table_panel_wrap {
570 width: 100%; 248 width: 100%;
571 height: calc(100% - 40px); 249 height: calc(100% - 40px);
572 padding: 0px 8px 0; 250 padding: 8px 8px 16px;
573 } 251 }
574 252
575 .card-noData { 253 .card-noData {
......
...@@ -11,639 +11,55 @@ import { Search, Warning } from "@element-plus/icons-vue"; ...@@ -11,639 +11,55 @@ import { Search, Warning } from "@element-plus/icons-vue";
11 import { setItemsDisabled, tagMethod, tagType, changeNum, } from "@/utils/common"; 11 import { setItemsDisabled, tagMethod, tagType, changeNum, } from "@/utils/common";
12 import useDataAssetStore from "@/store/modules/dataAsset"; 12 import useDataAssetStore from "@/store/modules/dataAsset";
13 import TableTools from '@/components/Tools/table_tools.vue'; 13 import TableTools from '@/components/Tools/table_tools.vue';
14 import Table from "@/components/Table/index.vue"; 14 import {
15 import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList } from "@/api/modules/dataProduct"; 15 getTaskExeTreeList,
16 getTaskFieldCount,
17 execTaskFieldList,
18 execTaskSheetList,
19 execTaskConfirm,
20 execFieldConfirm,
21 filterVal,
22 getGradeList,
23 getDbFieldList
24 } from "@/api/modules/dataInventory";
16 25
17 const { proxy } = getCurrentInstance() as any; 26 const { proxy } = getCurrentInstance() as any;
18 const router = useRouter(); 27 const router = useRouter();
28 const route = useRoute();
19 const userStore = useUserStore(); 29 const userStore = useUserStore();
20 const userData = JSON.parse(userStore.userData); 30 const userData = JSON.parse(userStore.userData);
21 const assetStore = useDataAssetStore(); 31 const assetStore = useDataAssetStore();
22 const datas = [ 32 const detailData = JSON.parse(route.query.detail);
23 { 33
24 "updateTime": "2024-07-16 13:17:00", 34 const gradeList = ref([]);
25 "updateUserName": "数往知来管理员", 35 const treeData = ref([
26 "guid": "4e0e76c48fa043d5b35d09f3ccc7c265",
27 "approvalGuid": null,
28 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
29 "fieldStandardCode": "COL202406070021",
30 "dataVersion": 1,
31 "chName": "地址",
32 "enName": "address",
33 "dataTypeValue": "字符型",
34 "dataTypeCode": "varchar",
35 "dataDicGuid": "",
36 "dataDicName": null,
37 "isDataDic": "N",
38 "fieldLength": 600,
39 "fieldPrecision": null,
40 "dataState": 0,
41 "approveState": "N",
42 "dataCategory": "合伙人",
43 "dataEncryptionLevel": "界面加密",
44 "businessDefDesc": "地址",
45 "flowFlag": null,
46 "flowCode": null,
47 "functionCode": null,
48 "createStaffGuid": null,
49 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
50 "displayVersion": "V1",
51 "standardSetName": null,
52 "ruleType": null
53 },
54 {
55 "updateTime": "2024-01-27 10:19:45",
56 "updateUserName": "数往知来管理员",
57 "guid": "bc630207357c466dbff7613ea38985cc",
58 "approvalGuid": null,
59 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
60 "fieldStandardCode": "COL202401260124",
61 "dataVersion": 1,
62 "chName": "包含最小销售包装单元数量",
63 "enName": "inboxQuantity",
64 "dataTypeValue": "整型",
65 "dataTypeCode": "int",
66 "dataDicGuid": null,
67 "dataDicName": null,
68 "isDataDic": null,
69 "fieldLength": null,
70 "fieldPrecision": null,
71 "dataState": 1,
72 "approveState": "A",
73 "dataCategory": null,
74 "dataEncryptionLevel": "明文显示",
75 "businessDefDesc": "当前药品追溯码中包含的最小销售包装单元药品追溯码的数量,发货类型为03时可选",
76 "flowFlag": null,
77 "flowCode": null,
78 "functionCode": null,
79 "createStaffGuid": null,
80 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
81 "displayVersion": "V1",
82 "standardSetName": null,
83 "ruleType": null
84 },
85 {
86 "updateTime": "2024-01-27 11:03:59",
87 "updateUserName": "审批人4",
88 "guid": "420f2a68bd4441bf92010eadf698b685",
89 "approvalGuid": null,
90 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
91 "fieldStandardCode": "COL202401260122",
92 "dataVersion": 1,
93 "chName": "包装层级",
94 "enName": "packageLevel",
95 "dataTypeValue": "字符型",
96 "dataTypeCode": "varchar",
97 "dataDicGuid": null,
98 "dataDicName": null,
99 "isDataDic": null,
100 "fieldLength": 200,
101 "fieldPrecision": null,
102 "dataState": 1,
103 "approveState": "A",
104 "dataCategory": null,
105 "dataEncryptionLevel": "明文显示",
106 "businessDefDesc": "当前药品追溯码所处包装层级描述,发货类型为03时可选",
107 "flowFlag": null,
108 "flowCode": null,
109 "functionCode": null,
110 "createStaffGuid": null,
111 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
112 "displayVersion": "V1",
113 "standardSetName": null,
114 "ruleType": null
115 },
116 {
117 "updateTime": "2024-06-06 10:01:06",
118 "updateUserName": "审批人1",
119 "guid": "f841e1848ab94b1e81a0217a09a7a3d3",
120 "approvalGuid": "b674bffe8d2f4132918016b6baaf75aa",
121 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
122 "fieldStandardCode": "COL202401260120",
123 "dataVersion": 1,
124 "chName": "上一级包装药品追溯码",
125 "enName": "parentDTC",
126 "dataTypeValue": "字符型",
127 "dataTypeCode": "varchar",
128 "dataDicGuid": "",
129 "dataDicName": null,
130 "isDataDic": "N",
131 "fieldLength": 200,
132 "fieldPrecision": null,
133 "dataState": 1,
134 "approveState": "Y",
135 "dataCategory": "",
136 "dataEncryptionLevel": "明文显示",
137 "businessDefDesc": "当前药品追溯码大一级包装上的药品追溯码,发货类型为03时可选;当存在上一级包装时必选",
138 "flowFlag": null,
139 "flowCode": null,
140 "functionCode": null,
141 "createStaffGuid": null,
142 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
143 "displayVersion": "V1",
144 "standardSetName": null,
145 "ruleType": null
146 },
147 {
148 "updateTime": "2024-01-26 00:10:47",
149 "updateUserName": "数往知来管理员",
150 "guid": "d4d42dea2a5844b4a7f9238806ea507b",
151 "approvalGuid": null,
152 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
153 "fieldStandardCode": "COL202401260118",
154 "dataVersion": 1,
155 "chName": "药品追溯码",
156 "enName": "DTC",
157 "dataTypeValue": "字符型",
158 "dataTypeCode": "varchar",
159 "dataDicGuid": null,
160 "dataDicName": null,
161 "isDataDic": null,
162 "fieldLength": 200,
163 "fieldPrecision": null,
164 "dataState": 0,
165 "approveState": "N",
166 "dataCategory": null,
167 "dataEncryptionLevel": "明文显示",
168 "businessDefDesc": "用于唯一标识药品各级销售包装单元的代码,发货类型为03时可选",
169 "flowFlag": null,
170 "flowCode": null,
171 "functionCode": null,
172 "createStaffGuid": null,
173 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
174 "displayVersion": "V1",
175 "standardSetName": null,
176 "ruleType": null
177 },
178 {
179 "updateTime": "2024-01-26 00:10:47",
180 "updateUserName": "数往知来管理员",
181 "guid": "ff9d0e4f6fbb444c8dcf6f67bffcb659",
182 "approvalGuid": null,
183 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
184 "fieldStandardCode": "COL202401260116",
185 "dataVersion": 1,
186 "chName": "发货数量",
187 "enName": "deliveryQuantity",
188 "dataTypeValue": "整型",
189 "dataTypeCode": "int",
190 "dataDicGuid": null,
191 "dataDicName": null,
192 "isDataDic": null,
193 "fieldLength": null,
194 "fieldPrecision": null,
195 "dataState": 0,
196 "approveState": "N",
197 "dataCategory": null,
198 "dataEncryptionLevel": "明文显示",
199 "businessDefDesc": "发货的最小销售包装单元数量",
200 "flowFlag": null,
201 "flowCode": null,
202 "functionCode": null,
203 "createStaffGuid": null,
204 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
205 "displayVersion": "V1",
206 "standardSetName": null,
207 "ruleType": null
208 },
209 {
210 "updateTime": "2024-01-26 00:10:46",
211 "updateUserName": "数往知来管理员",
212 "guid": "fe88ac9e8d9c4f148833dbb3976fca77",
213 "approvalGuid": null,
214 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
215 "fieldStandardCode": "COL202401260114",
216 "dataVersion": 1,
217 "chName": "药品生产批号",
218 "enName": "batch",
219 "dataTypeValue": "字符型",
220 "dataTypeCode": "varchar",
221 "dataDicGuid": null,
222 "dataDicName": null,
223 "isDataDic": null,
224 "fieldLength": 20,
225 "fieldPrecision": null,
226 "dataState": 0,
227 "approveState": "N",
228 "dataCategory": null,
229 "dataEncryptionLevel": "明文显示",
230 "businessDefDesc": "药品包装上标示的生产批号",
231 "flowFlag": null,
232 "flowCode": null,
233 "functionCode": null,
234 "createStaffGuid": null,
235 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
236 "displayVersion": "V1",
237 "standardSetName": null,
238 "ruleType": null
239 },
240 {
241 "updateTime": "2024-01-26 00:10:45",
242 "updateUserName": "数往知来管理员",
243 "guid": "9759837e0d72472ab7441c1873c9159a",
244 "approvalGuid": null,
245 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
246 "fieldStandardCode": "COL202401260112",
247 "dataVersion": 1,
248 "chName": "药品有效期截止日期",
249 "enName": "expirationDate",
250 "dataTypeValue": "日期型",
251 "dataTypeCode": "date",
252 "dataDicGuid": null,
253 "dataDicName": null,
254 "isDataDic": null,
255 "fieldLength": null,
256 "fieldPrecision": null,
257 "dataState": 0,
258 "approveState": "N",
259 "dataCategory": null,
260 "dataEncryptionLevel": "明文显示",
261 "businessDefDesc": "药品有效期的截止日期",
262 "flowFlag": null,
263 "flowCode": null,
264 "functionCode": null,
265 "createStaffGuid": null,
266 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
267 "displayVersion": "V1",
268 "standardSetName": null,
269 "ruleType": null
270 },
271 {
272 "updateTime": "2024-01-26 00:10:45",
273 "updateUserName": "数往知来管理员",
274 "guid": "a39ed6123c6a420d9d1265315e714f86",
275 "approvalGuid": null,
276 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
277 "fieldStandardCode": "COL202401260110",
278 "dataVersion": 1,
279 "chName": "药品生产日期",
280 "enName": "productionDate",
281 "dataTypeValue": "日期型",
282 "dataTypeCode": "date",
283 "dataDicGuid": null,
284 "dataDicName": null,
285 "isDataDic": null,
286 "fieldLength": null,
287 "fieldPrecision": null,
288 "dataState": 0,
289 "approveState": "N",
290 "dataCategory": null,
291 "dataEncryptionLevel": "明文显示",
292 "businessDefDesc": "药品包装上标示的生产日期",
293 "flowFlag": null,
294 "flowCode": null,
295 "functionCode": null,
296 "createStaffGuid": null,
297 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
298 "displayVersion": "V1",
299 "standardSetName": null,
300 "ruleType": null
301 },
302 {
303 "updateTime": "2024-01-26 00:10:45",
304 "updateUserName": "数往知来管理员",
305 "guid": "ea597c1b8bb24a5ab053a80b084de98c",
306 "approvalGuid": null,
307 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
308 "fieldStandardCode": "COL202401260108",
309 "dataVersion": 1,
310 "chName": "统一社会信用代码(进口药品代理企业)",
311 "enName": "drugImporterUSCID",
312 "dataTypeValue": "字符型",
313 "dataTypeCode": "varchar",
314 "dataDicGuid": null,
315 "dataDicName": null,
316 "isDataDic": null,
317 "fieldLength": 18,
318 "fieldPrecision": null,
319 "dataState": 0,
320 "approveState": "N",
321 "dataCategory": null,
322 "dataEncryptionLevel": "明文显示",
323 "businessDefDesc": "进口药品代理企业的统一社会信用代码,进口药品必选;没有统一社会信用代码时使用组织机构代码",
324 "flowFlag": null,
325 "flowCode": null,
326 "functionCode": null,
327 "createStaffGuid": null,
328 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
329 "displayVersion": "V1",
330 "standardSetName": null,
331 "ruleType": null
332 }
333 ]
334 const data1 = [
335 {
336 "children": [
337 {
338 "children": null,
339 "parentGuids": [
340 "c32ddd77191ff4afe149538ef4b2e0c3"
341 ],
342 "guid": "9c92df55a19cdce88f61e20a8e1e8a65",
343 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
344 "organisationCode": "11150001",
345 "organisationName": "链享供应链运营一部",
346 "bizState": "Y",
347 "createTime": "2023-10-25 14:23:31",
348 "createUserName": "测试",
349 "parentGuid": "c32ddd77191ff4afe149538ef4b2e0c3",
350 "orderNum": 1,
351 "level": 2,
352 "levelCode": "1.1",
353 "displayCreateTime": "2023-10-25 14:23:31"
354 }
355 ],
356 "parentGuids": null,
357 "guid": "c32ddd77191ff4afe149538ef4b2e0c3",
358 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
359 "organisationCode": "1115004",
360 "organisationName": "链享供应链",
361 "bizState": "Y",
362 "createTime": "2023-08-15 12:59:10",
363 "createUserName": "测试",
364 "parentGuid": "",
365 "orderNum": 2,
366 "level": 0,
367 "levelCode": "1",
368 "displayCreateTime": "2023-08-15 12:59:10"
369 },
370 {
371 "children": [
372 {
373 "children": [
374 {
375 "children": null,
376 "parentGuids": [
377 "e10332122834077907cd5ea61fa576c1",
378 "cdae7bb3cafb560482cad1b89a1e4b78"
379 ],
380 "guid": "16ea472a155c07433a63220f2ae1afe9",
381 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
382 "organisationCode": "11160011",
383 "organisationName": "链享运营一部1组",
384 "bizState": "S",
385 "createTime": "2023-10-25 13:15:57",
386 "createUserName": "测试",
387 "parentGuid": "cdae7bb3cafb560482cad1b89a1e4b78",
388 "orderNum": 1,
389 "level": 2,
390 "levelCode": "2.1.1",
391 "displayCreateTime": "2023-10-25 13:15:57"
392 }
393 ],
394 "parentGuids": [
395 "e10332122834077907cd5ea61fa576c1"
396 ],
397 "guid": "cdae7bb3cafb560482cad1b89a1e4b78",
398 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
399 "organisationCode": "1116001",
400 "organisationName": "链享运营一部",
401 "bizState": "S",
402 "createTime": "2023-10-25 13:14:15",
403 "createUserName": "测试",
404 "parentGuid": "e10332122834077907cd5ea61fa576c1",
405 "orderNum": 1,
406 "level": 1,
407 "levelCode": "2.1",
408 "displayCreateTime": "2023-10-25 13:14:15"
409 },
410 {
411 "children": null,
412 "parentGuids": [
413 "e10332122834077907cd5ea61fa576c1"
414 ],
415 "guid": "d98b44ffb35e4d17cf68f9a922e1c7b7",
416 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
417 "organisationCode": null,
418 "organisationName": "二部",
419 "bizState": "Y",
420 "createTime": "2023-10-26 09:45:36",
421 "createUserName": "测试",
422 "parentGuid": "e10332122834077907cd5ea61fa576c1",
423 "orderNum": 2,
424 "level": 1,
425 "levelCode": "2.2",
426 "displayCreateTime": "2023-10-26 09:45:36"
427 }
428 ],
429 "parentGuids": null,
430 "guid": "e10332122834077907cd5ea61fa576c1",
431 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
432 "organisationCode": "1115005",
433 "organisationName": "链享医药",
434 "bizState": "Y",
435 "createTime": "2023-09-12 15:59:35",
436 "createUserName": "测试",
437 "parentGuid": null,
438 "orderNum": 3,
439 "level": 0,
440 "levelCode": "2",
441 "displayCreateTime": "2023-09-12 15:59:35"
442 },
443 {
444 "children": [
445 {
446 "children": null,
447 "parentGuids": [
448 "9bd46f0f4fcf429518fae6ecb4849a9e"
449 ],
450 "guid": "870f23ae47e036eb88b35f726c31959b",
451 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
452 "organisationCode": null,
453 "organisationName": "运用三部",
454 "bizState": "Y",
455 "createTime": "2024-04-28 16:33:24",
456 "createUserName": "数往知来管理员",
457 "parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
458 "orderNum": 3,
459 "level": 1,
460 "levelCode": "3.3",
461 "displayCreateTime": "2024-04-28 16:33:24"
462 },
463 {
464 "children": null,
465 "parentGuids": [
466 "9bd46f0f4fcf429518fae6ecb4849a9e"
467 ],
468 "guid": "e06049046241dd71b153f227dbe7f801",
469 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
470 "organisationCode": null,
471 "organisationName": "运营二部",
472 "bizState": "Y",
473 "createTime": "2023-11-14 16:01:50",
474 "createUserName": "数往知来管理员",
475 "parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
476 "orderNum": 40,
477 "level": 1,
478 "levelCode": "3.2",
479 "displayCreateTime": "2023-11-14 16:01:50"
480 },
481 {
482 "children": null,
483 "parentGuids": [
484 "9bd46f0f4fcf429518fae6ecb4849a9e"
485 ],
486 "guid": "731cd185c868da8af48b492068ffaed4",
487 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
488 "organisationCode": null,
489 "organisationName": "运营一部",
490 "bizState": "Y",
491 "createTime": "2023-11-14 15:19:35",
492 "createUserName": "测试",
493 "parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
494 "orderNum": 41,
495 "level": 1,
496 "levelCode": "3.1",
497 "displayCreateTime": "2023-11-14 15:19:35"
498 }
499 ],
500 "parentGuids": null,
501 "guid": "9bd46f0f4fcf429518fae6ecb4849a9e",
502 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
503 "organisationCode": null,
504 "organisationName": "药企服务事业部1",
505 "bizState": "Y",
506 "createTime": "2023-11-14 14:49:14",
507 "createUserName": "数往知来管理员",
508 "parentGuid": "",
509 "orderNum": 4,
510 "level": 0,
511 "levelCode": "3",
512 "displayCreateTime": "2023-11-14 14:49:14"
513 },
514 { 36 {
515 "children": [ 37 classifyName: "全部",
516 { 38 guid: "all",
517 "children": null, 39 children: [
518 "parentGuids": [ 40 { classifyName: '未分类', guid: 'unclassified' }
519 "23be149ea3167a3f7f2d383023336efe"
520 ],
521 "guid": "e5f2b4958ee2d99309a41e0c6e1447c8",
522 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
523 "organisationCode": null,
524 "organisationName": "智能存储装备部",
525 "bizState": "Y",
526 "createTime": "2023-11-14 16:09:36",
527 "createUserName": "数往知来管理员",
528 "parentGuid": "23be149ea3167a3f7f2d383023336efe",
529 "orderNum": 51,
530 "level": 1,
531 "levelCode": "4.1",
532 "displayCreateTime": "2023-11-14 16:09:36"
533 }
534 ], 41 ],
535 "parentGuids": null,
536 "guid": "23be149ea3167a3f7f2d383023336efe",
537 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
538 "organisationCode": null,
539 "organisationName": "医药物联网事业部",
540 "bizState": "Y",
541 "createTime": "2023-11-14 15:11:35",
542 "createUserName": "数往知来管理员",
543 "parentGuid": "",
544 "orderNum": 5,
545 "level": 0,
546 "levelCode": "4",
547 "displayCreateTime": "2023-11-14 15:11:35"
548 },
549 {
550 "children": null,
551 "parentGuids": null,
552 "guid": "1d82e875163749ca9ae45809ec432ae8",
553 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
554 "organisationCode": null,
555 "organisationName": "财务管理中心",
556 "bizState": "S",
557 "createTime": "2023-11-14 15:14:07",
558 "createUserName": "数往知来管理员",
559 "parentGuid": "",
560 "orderNum": 6,
561 "level": 0,
562 "levelCode": "6",
563 "displayCreateTime": "2023-11-14 15:14:07"
564 },
565 {
566 "children": null,
567 "parentGuids": null,
568 "guid": "cd9e6a0c76102364a9e88b79b28b0b32",
569 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
570 "organisationCode": null,
571 "organisationName": "资产服务",
572 "bizState": "Y",
573 "createTime": "2024-08-14 11:40:33",
574 "createUserName": "数往知来管理员",
575 "parentGuid": "",
576 "orderNum": 7,
577 "level": 0,
578 "levelCode": "9",
579 "displayCreateTime": "2024-08-14 11:40:33"
580 }, 42 },
581 { 43 ]);
582 "children": [ 44 const currTreeNode = ref({ classifyName: "全部", guid: "all" })
583 { 45 const treeInfoRef = ref();
584 "children": null, 46 const treeInfo: any = ref({
585 "parentGuids": [
586 "dac448b77fa35f798bb4a06d8fd86334"
587 ],
588 "guid": "cb76777efe69182cfb2c75d41944553c",
589 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
590 "organisationCode": null,
591 "organisationName": "审批1",
592 "bizState": "Y",
593 "createTime": "2024-01-17 14:28:36",
594 "createUserName": "数往知来管理员",
595 "parentGuid": "dac448b77fa35f798bb4a06d8fd86334",
596 "orderNum": 100,
597 "level": 1,
598 "levelCode": "8.1",
599 "displayCreateTime": "2024-01-17 14:28:36"
600 }
601 ],
602 "parentGuids": null,
603 "guid": "dac448b77fa35f798bb4a06d8fd86334",
604 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
605 "organisationCode": null,
606 "organisationName": "审批组织",
607 "bizState": "Y",
608 "createTime": "2024-01-16 11:38:24",
609 "createUserName": "数往知来管理员",
610 "parentGuid": "",
611 "orderNum": 99,
612 "level": 0,
613 "levelCode": "8",
614 "displayCreateTime": "2024-01-16 11:38:24"
615 }
616 ]
617 const data2 = [
618 {}
619 ]
620 const treeIndex: any = ref({})
621 const treeInfo = ref({
622 id: "data-pickup-tree", 47 id: "data-pickup-tree",
623 filter: true, 48 filter: true,
624 queryValue: "", 49 queryValue: "",
625 queryPlaceholder: "输入组织名称搜索", 50 queryPlaceholder: "输入组织名称搜索",
626 props: { 51 props: {
627 label: "organisationName", 52 label: "classifyName",
628 value: "guid", 53 value: "guid",
629 }, 54 },
630 nodeKey: 'guid', 55 nodeKey: 'guid',
631 expandedKey: [], 56 expandedKey: [],
632 expandOnNodeClick: false, 57 expandOnNodeClick: false,
633 data: data1 || [], 58 data: [],
634 }); 59 });
635 60
636 const templateInfo = ref({ 61 const taskDetail: any = ref({})
637 title: '医疗数据分类分级模板', 62 const fieldCounts = ref({})
638 mark: '待确认',
639 descGroup: [
640 { label: '目录名称', value: '医疗数据', type: 'text_btn' },
641 { label: '执行时间', value: '2021-12-12 09:12:13' },
642 { label: '分级分类模板', value: '医疗数据分级分类', type: 'text_btn' },
643 { label: '版本', value: 'V5' },
644 { label: '元数据名称', value: '名称1、名称2、名称3' },
645 ],
646 })
647 const tabsInfo = ref({ 63 const tabsInfo = ref({
648 activeName: 'field', 64 activeName: 'field',
649 tabs: [ 65 tabs: [
...@@ -651,31 +67,19 @@ const tabsInfo = ref({ ...@@ -651,31 +67,19 @@ const tabsInfo = ref({
651 { label: '字段', name: 'field' }, 67 { label: '字段', name: 'field' },
652 ] 68 ]
653 }); 69 });
654 70 const cascaderRef = ref();
71 const sheetParams = ref({});
655 const sheetItemList = ref([ 72 const sheetItemList = ref([
656 { 73 {
657 type: "select", 74 type: "select",
658 label: "", 75 label: "",
659 placeholder: '变更类型',
660 field: 'dataSourceGuid',
661 default: '',
662 options: [],
663 props: {
664 label: 'databaseNameZh',
665 value: 'guid'
666 },
667 clearable: true,
668 },
669 {
670 type: "select",
671 label: "",
672 placeholder: '数据库名', 76 placeholder: '数据库名',
673 field: 'dataSourceGuid', 77 field: 'databaseGuid',
674 default: '', 78 default: '',
675 options: [], 79 options: [],
676 props: { 80 props: {
677 label: 'databaseNameZh', 81 label: 'name',
678 value: 'guid' 82 value: 'dbGuid'
679 }, 83 },
680 clearable: true, 84 clearable: true,
681 }, 85 },
...@@ -683,41 +87,41 @@ const sheetItemList = ref([ ...@@ -683,41 +87,41 @@ const sheetItemList = ref([
683 type: "select", 87 type: "select",
684 label: "", 88 label: "",
685 placeholder: '表中文/英文名', 89 placeholder: '表中文/英文名',
686 field: 'dataSourceGuid', 90 field: 'tableGuid',
687 default: '', 91 default: '',
688 options: [], 92 options: [],
689 props: { 93 props: {
690 label: 'databaseNameZh', 94 label: 'name',
691 value: 'guid' 95 value: 'dbGuid'
692 }, 96 },
693 clearable: true, 97 clearable: true,
98 disabled: true
694 }, 99 },
695 ]); 100 ]);
696 101 const fieldParams = ref({});
697 const fieldItemList = ref([ 102 const fieldItemList = ref([
698 { 103 {
699 type: "select", 104 type: "select",
700 label: "", 105 label: "",
701 placeholder: '变更类型', 106 placeholder: '确认状态',
702 field: 'dataSourceGuid', 107 field: 'changeStatus',
703 default: '', 108 default: '',
704 options: [], 109 options: [
705 props: { 110 { label: '已确认', value: 'Y' },
706 label: 'databaseNameZh', 111 { label: '待确认', value: 'N' },
707 value: 'guid' 112 ],
708 },
709 clearable: true, 113 clearable: true,
710 }, 114 },
711 { 115 {
712 type: "select", 116 type: "select",
713 label: "", 117 label: "",
714 placeholder: '字段中文/英文名', 118 placeholder: '数据库名',
715 field: 'dataSourceGuid', 119 field: 'databaseGuid',
716 default: '', 120 default: '',
717 options: [], 121 options: [],
718 props: { 122 props: {
719 label: 'databaseNameZh', 123 label: 'name',
720 value: 'guid' 124 value: 'dbGuid'
721 }, 125 },
722 clearable: true, 126 clearable: true,
723 }, 127 },
...@@ -725,59 +129,62 @@ const fieldItemList = ref([ ...@@ -725,59 +129,62 @@ const fieldItemList = ref([
725 type: "select", 129 type: "select",
726 label: "", 130 label: "",
727 placeholder: '表中文/英文名', 131 placeholder: '表中文/英文名',
728 field: 'dataSourceGuid', 132 field: 'tableGuid',
729 default: '', 133 default: '',
730 options: [], 134 options: [],
731 props: { 135 props: {
732 label: 'databaseNameZh', 136 label: 'name',
733 value: 'guid' 137 value: 'dbGuid'
734 }, 138 },
735 clearable: true, 139 clearable: true,
140 disabled: true
736 }, 141 },
737 { 142 {
738 type: "select", 143 type: "select",
739 label: "", 144 label: "",
740 placeholder: '分类', 145 placeholder: '字段中文/英文名',
741 field: 'dataSourceGuid', 146 field: 'fieldGuid',
742 default: '', 147 default: '',
743 options: [], 148 options: [],
744 props: { 149 props: {
745 label: 'databaseNameZh', 150 label: 'name',
746 value: 'guid' 151 value: 'dbGuid'
747 }, 152 },
748 clearable: true, 153 clearable: true,
154 disabled: true
749 }, 155 },
750 { 156 {
751 type: "select", 157 type: "cascader",
752 label: "", 158 label: "",
753 placeholder: '分', 159 placeholder: '分',
754 field: 'dataSourceGuid', 160 field: 'classifyName',
755 default: '', 161 default: [],
756 options: [], 162 options: [],
163 showAllLevels: false,
757 props: { 164 props: {
758 label: 'databaseNameZh', 165 checkStrictly: true,
759 value: 'guid' 166 expandTrigger: "hover",
167 label: "classifyName",
168 value: "guid",
760 }, 169 },
170 filterable: true,
761 clearable: true, 171 clearable: true,
762 }, 172 },
763 { 173 {
764 type: "select", 174 type: "select",
765 label: "", 175 label: "",
766 placeholder: '数据库名', 176 placeholder: '分级',
767 field: 'dataSourceGuid', 177 field: 'gradeDetailGuid',
768 default: '', 178 default: '',
769 options: [], 179 options: [],
770 props: { 180 props: {
771 label: 'databaseNameZh', 181 label: 'gradeName',
772 value: 'guid' 182 value: 'guid'
773 }, 183 },
774 clearable: true, 184 clearable: true,
775 }, 185 },
776 ]); 186 ]);
777 187
778 const checked1 = ref(false);
779 const checked2 = ref(false);
780
781 const page = ref({ 188 const page = ref({
782 limit: 50, 189 limit: 50,
783 curr: 1, 190 curr: 1,
...@@ -789,33 +196,28 @@ const page = ref({ ...@@ -789,33 +196,28 @@ const page = ref({
789 { label: "200", value: 200 }, 196 { label: "200", value: 200 },
790 ], 197 ],
791 }); 198 });
792 const searchItemValue: any = ref({}); 199
793 const currTableData: any = ref({}); 200 const currTableData: any = ref({});
794 const sheetTableInfo = ref({ 201 const sheetTableInfo = ref({
795 id: "mapping-table", 202 id: "mapping-table",
796 fields: [ 203 fields: [
797 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 204 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
205 // {
206 // label: "分类分级变更状态", field: "isCgChange", width: 140, align: 'center', type: "tag", getName: (scope) => {
207 // return filterVal(scope.row.isCgChange, 'isCgChange');
208 // }
209 // },
210 { label: "表中文名", field: "tableChName", width: 120 },
798 { 211 {
799 label: "分类分级变更状态", field: "damCode", width: 140, align: 'center', type: "tag", getName: (scope) => { 212 label: "表英文名", field: "tableName", width: 200, type: "text_btn", value: 'tab'
800 return filterVal(scope.row.status, 'status');
801 }
802 }, 213 },
803 { label: "表中文名", field: "damTypeName", width: 120 }, 214 { label: "数据库名", field: "database", width: 120 },
804 { 215 { label: "字段数", field: "fieldNum", width: 96, align: 'right' },
805 label: "表英文名", field: "damName", width: 200, type: "text_btn", columClass: 'text_btn', click: (scope) => { 216 { label: "已分类字段数", field: "classifyFieldNum", width: 120, align: 'right' },
806 router.push({ 217 { label: "已分级字段数", field: "gradeFieldNum", width: 120, align: 'right' },
807 name: "templateConfig",
808 query: { guid: scope.row.damGuid },
809 });
810 }
811 },
812 { label: "数据库名", field: "damTypeName", width: 120 },
813 { label: "字段数", field: "damTypeName", width: 96, align: 'right' },
814 { label: "已分类字段数", field: "damTypeName", width: 120, align: 'right' },
815 { label: "已分级字段数", field: "damTypeName", width: 120, align: 'right' },
816 ], 218 ],
817 loading: false, 219 loading: false,
818 data: datas || [], 220 data: [],
819 page: { 221 page: {
820 type: "normal", 222 type: "normal",
821 rows: 0, 223 rows: 0,
...@@ -825,28 +227,54 @@ const sheetTableInfo = ref({ ...@@ -825,28 +227,54 @@ const sheetTableInfo = ref({
825 show: false 227 show: false
826 }, 228 },
827 }); 229 });
828 230 const selectRowData = ref([]);
829 const fieldTableInfo = ref({ 231 const fieldTableInfo = ref({
830 id: "metadata-table", 232 id: "metadata-table",
831 fields: [ 233 fields: [
832 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 234 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
833 { 235 {
834 label: "分类分级变更状态", field: "approveState", width: 140, align: 'center', type: "tag", getName: (scope) => { 236 label: "确认状态", field: "changeStatus", width: 96, align: 'center', type: "tag", getName: (scope) => {
835 return filterVal(scope.row.approveState, 'approveState'); 237 return filterVal(scope.row.changeStatus, 'changeStatus');
238 }, tagType: (scope) => {
239 return scope.row.changeStatus == 'Y' ? 'success' : 'warning';
240 },
241 },
242 { label: "字段名", field: "fieldName", width: 120 },
243 { label: "字段中文名", field: "fieldChName", width: 200 },
244 {
245 label: "分类", field: "classifyDetailGuid", width: 280,
246 type: "cascader",
247 options: [],
248 showAllLevels: false,
249 props: {
250 checkStrictly: false,
251 expandTrigger: "hover",
252 label: "classifyName",
253 value: "guid",
254 },
255 filterable: true,
256 clearable: true,
257 getName: (scope) => {
258 if (scope.row['STATE'] === 'Running') {
259 const classifyNames = scope.row.classifyDetailGuidRoutes || [];
260 return classifyNames;
261 } else {
262 const classifyNames = scope.row.classifyDetailNameRoutes || [];
263 return classifyNames.length ? classifyNames.join('/') : '--';
264 }
836 } 265 }
837 }, 266 },
838 { label: "字段名", field: "damTypeName", width: 200 }, 267 {
839 { label: "字段中文名", field: "damTypeName", width: 200 }, 268 label: "分级", field: "gradeDetailName", width: 120, type: 'select', options: [], props: { label: 'gradeName', value: 'guid' },
840 { label: "分类", field: "damTypeName", width: 280, type: 'select', columClass: 'edit_cell' }, 269 },
841 { label: "分级", field: "damTypeName", width: 120, type: 'select', columClass: 'edit_cell' }, 270 { label: "标签", field: "label", width: 96 },
842 { label: "标签", field: "damCode", width: 96 }, 271 { label: "规则", field: "ruleDetail", width: 200 },
843 { label: "规则", field: "damCode", width: 200 }, 272 { label: "表英文名", field: "tableName", width: 200 },
844 { label: "表中文名", field: "damTypeName", width: 120 }, 273 { label: "表中文名", field: "tableChName", width: 120 },
845 { label: "表英文名", field: "damName", width: 200 }, 274 { label: "数据库名", field: "database", width: 120 },
846 { label: "数据库名", field: "damTypeName", width: 120 },
847 ], 275 ],
848 loading: false, 276 loading: false,
849 data: data2 || [], 277 data: [],
850 showPage: true, 278 showPage: true,
851 page: { 279 page: {
852 type: "normal", 280 type: "normal",
...@@ -856,168 +284,445 @@ const fieldTableInfo = ref({ ...@@ -856,168 +284,445 @@ const fieldTableInfo = ref({
856 actionInfo: { 284 actionInfo: {
857 label: "操作", 285 label: "操作",
858 type: "btn", 286 type: "btn",
859 width: 80, 287 width: 60,
860 btns: (scope) => { 288 },
861 let row = scope.row, btnArr: any = [ 289 })
862 { label: "编辑", value: "edit" }, 290
863 ]; 291 const formItems = ref([
864 // if (row.approveState == 'Y') { 292 {
865 // if (row.listingStatus == 'Y') { 293 label: "分类",
866 // btnArr.splice(0, 0, { label: "详情", value: "detail" }); 294 type: "cascader",
867 // } else { 295 placeholder: "请选择",
868 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" }); 296 field: "classifyName",
869 // } 297 default: [],
870 // } else { 298 options: [],
871 // if (row.approveState == 'A') { 299 showAllLevels: false,
872 // btnArr.splice(0, 0, { label: "详情", value: "detail" }); 300 props: {
873 // } else { 301 checkStrictly: false,
874 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" }); 302 expandTrigger: "hover",
875 // } 303 label: "classifyName",
876 // } 304 value: "guid",
877 return btnArr; 305 },
306 filterable: true,
307 clearable: true,
308 required: true,
309 block: true,
310 },
311 {
312 label: '分级',
313 type: 'select',
314 placeholder: '请选择',
315 field: 'gradeGuid',
316 default: '',
317 options: [],
318 props: {
319 value: 'guid',
320 label: 'gradeName'
878 }, 321 },
322 clearable: true,
323 required: true,
324 block: true,
325 },
326 ]);
327
328 const formRules = ref({
329 classifyName: [
330 { required: true, trigger: 'change', message: "请选择分类" }
331 ],
332 gradeGuid: [
333 { required: true, trigger: 'change', message: "请选择分级" }
334 ],
335 });
336
337 const dialogRef = ref();
338 const dialogInfo: any = ref({
339 visible: false,
340 size: 480,
341 direction: "column",
342 header: {
343 title: "新建",
344 },
345 type: 'form',
346 contents: [
347 {
348 type: 'form',
349 title: '',
350 formInfo: {
351 id: 'confirm-upload-file',
352 items: formItems.value,
353 rules: formRules.value
354 }
355 }
356 ],
357 footer: {
358 visible: true,
359 btns: [
360 { type: "default", label: "取消", value: "cancel" },
361 { type: "primary", label: "确定", value: "submit" },
362 ],
879 }, 363 },
880 }) 364 })
881 365
366 // 获取字段统计
367 const getFieldCount = () => {
368 getTaskFieldCount({ execGuid: taskDetail.value.execGuid }).then((res: any) => {
369 if (res.code == proxy.$passCode) {
370 const data = res.data || {};
371 fieldCounts.value = data;
372 } else {
373 ElMessage.error(res.msg);
374 }
375 })
376 }
377
378 // 获取分级数据
379 const getGradeData = () => {
380 getGradeList({ classifyGradeGuid: taskDetail.value.gradeGuid, pageIndex: 1, pageSize: -1 }).then((res: any) => {
381 if (res.code == proxy.$passCode) {
382 let data = res.data.records || [];
383 data.map(d => d.gradeName = d.dataGrade + '级');
384 gradeList.value = JSON.parse(JSON.stringify(data));
385 formItems.value[1].options = JSON.parse(JSON.stringify(data));
386 fieldItemList.value[5].options = JSON.parse(JSON.stringify(data));
387 fieldTableInfo.value.fields[5].options = JSON.parse(JSON.stringify(data));
388 } else {
389 ElMessage.error(res.msg);
390 }
391 })
392 }
393
394 // 获取分类树形数据
395 const getFieldTree = () => {
396 treeInfo.value.loading = true;
397 getTaskExeTreeList({ execGuid: taskDetail.value.execGuid }).then((res: any) => {
398 treeInfo.value.loading = false;
399 if (res.code == proxy.$passCode) {
400 const data = res.data || [];
401 treeData.value[0].children.splice(1);
402 treeData.value[0].children.push(...data);
403 treeInfo.value.data = treeData.value;
404 treeInfo.value.expandedKey = ['all'];
405 treeInfoRef.value.setCurrentKey('all');
406 formItems.value[0].options = JSON.parse(JSON.stringify(data));
407 fieldItemList.value[4].options = JSON.parse(JSON.stringify(data));
408 fieldTableInfo.value.fields[4].options = JSON.parse(JSON.stringify(data));
409 } else {
410 ElMessage.error(res.msg);
411 }
412 }).catch(() => {
413 treeInfo.value.loading = false;
414 })
415 }
416
417 // 获取库、表、字段信息
418 const getSheetFieldList = (params, tId = null) => {
419 getDbFieldList({ execGuid: taskDetail.value.execGuid, ...params }).then(res => {
420 if (res.code == proxy.$passCode) {
421 const data = res.data || [];
422 if (params.type == 1) {
423 sheetItemList.value[0].options = JSON.parse(JSON.stringify(data));
424 fieldItemList.value[1].options = JSON.parse(JSON.stringify(data));
425 } else if (params.type == 2) {
426 if (tabsInfo.value.activeName == 'sheet') {
427 sheetItemList.value[1].options = JSON.parse(JSON.stringify(data));
428 } else {
429 fieldItemList.value[2].options = JSON.parse(JSON.stringify(data));
430 if (tId) {
431 fieldItemList.value[2].default = tId;
432 }
433 }
434 } else {
435 fieldItemList.value[3].options = JSON.parse(JSON.stringify(data));
436 }
437 } else {
438 ElMessage.error(res.msg);
439 }
440 })
441 }
442
882 const tabChange = (val) => { 443 const tabChange = (val) => {
883 tabsInfo.value.activeName = val; 444 tabsInfo.value.activeName = val;
884 } 445 }
885 446
886 const nodeClick = (data) => { 447 const nodeClick = (data) => {
887 treeIndex.value = data 448 currTreeNode.value = data;
449 if (data.guid == 'all') {
450 getFieldTableData({ isClassify: '' })
451 } else if (data.guid == 'unclassified') {
452 getFieldTableData({ isClassify: 'N' })
453 } else {
454 getFieldTableData({ isClassify: 'Y', classifyDetail: data.guid });
455 const parentGuids = data.parentGuids || [];
456 parentGuids.push(data.guid)
457 fieldItemList.value[4].default = parentGuids;
458 }
888 } 459 }
889 460
890 const getTableData = () => { 461 // 获取库表数据
891 tableInfo.value.loading = true; 462 const getSheetTableData = () => {
892 getListingList( 463 sheetTableInfo.value.loading = true;
893 Object.assign({}, searchItemValue.value, { 464 execTaskSheetList(
894 pageIndex: page.value.curr, 465 Object.assign({}, { ...sheetParams.value }, {
895 pageSize: page.value.limit, 466 execGuid: taskDetail.value.execGuid,
467 pageIndex: sheetTableInfo.value.page.curr,
468 pageSize: sheetTableInfo.value.page.limit,
896 }) 469 })
897 ).then((res: any) => { 470 ).then((res: any) => {
898 tableInfo.value.loading = false; 471 sheetTableInfo.value.loading = false;
899 tableInfo.value.data = res.data.records || []; 472 if (res.code == proxy.$passCode) {
900 tableInfo.value.page.curr = res.data.pageIndex; 473 sheetTableInfo.value.data = res.data.records || [];
901 tableInfo.value.page.limit = res.data.pageSize; 474 sheetTableInfo.value.page.curr = res.data.pageIndex;
902 tableInfo.value.page.rows = res.data.totalRows; 475 sheetTableInfo.value.page.limit = res.data.pageSize;
476 sheetTableInfo.value.page.rows = res.data.totalRows;
477 } else {
478 ElMessage.error(res.msg);
479 }
903 }) 480 })
904 .catch((res) => { 481 .catch((res) => {
905 tableInfo.value.loading = false; 482 fieldTableInfo.value.loading = false;
906 }); 483 });
907 }; 484 };
908 485
486 // 获取字段表格数据
487 const getFieldTableData = (param: any = {}) => {
488 fieldTableInfo.value.loading = true;
489 let params: any = {
490 ...fieldParams.value,
491 ...param,
492 execGuid: taskDetail.value.execGuid,
493 pageIndex: fieldTableInfo.value.page.curr,
494 pageSize: fieldTableInfo.value.page.limit,
495 }
496 delete params.classifyName
497 execTaskFieldList(params).then((res: any) => {
498 fieldTableInfo.value.loading = false;
499 if (res.code == proxy.$passCode) {
500 let data = res.data.records || [];
501 data.map(item => item.STATE = '');
502 fieldTableInfo.value.data = data;
503 fieldTableInfo.value.page.curr = res.data.pageIndex;
504 fieldTableInfo.value.page.limit = res.data.pageSize;
505 fieldTableInfo.value.page.rows = res.data.totalRows;
506 } else {
507 ElMessage.error(res.msg);
508 }
509 })
510 .catch((res) => {
511 fieldTableInfo.value.loading = false;
512 });
513 };
514
515 const tableCellClassName = (scope) => {
516 return (scope.column.label == '分类' || scope.column.label == '分级') && scope.row['STATE'] === 'Running' ? 'edit_cell' : ''
517 }
518
519 const rowSelectable = (row, index) => {
520 return row.selectable ?? true;
521 };
522
523 const tableSelectionChange = (val) => {
524 selectRowData.value = val;
525 };
526
527 const getCascaderCheckedData = () => {
528 const formCascader = cascaderRef.value[0] || cascaderRef.value;
529 const data = formCascader.getCheckedNodes();
530 return data;
531 };
532
909 const tableBtnClick = (scope, btn) => { 533 const tableBtnClick = (scope, btn) => {
910 const type = btn.value; 534 const type = btn.value;
911 const row = scope.row; 535 const row = scope.row;
912 currTableData.value = row; 536 currTableData.value = row;
913 if (type == "detail" || type === "edit") { 537 if (type == 'tab') {
914 toPath(type); 538 tabsInfo.value.activeName = 'field';
915 } else if (type === "delete") { 539 fieldItemList.value.map(item => item.default = '')
916 open("此操作将永久删除,是否继续?", "warning"); 540 fieldItemList.value[1].default = row.databaseGuid;
541 fieldItemList.value[2].disabled = false;
542 treeInfo.value.expandedKey = ['all'];
543 treeInfoRef.value.setCurrentKey('all');
544 getSheetFieldList({ type: 2, databaseGuid: row.databaseGuid }, row.tableGuid);
545 getFieldTableData({ databaseGuid: row.databaseGuid, tableGuid: row.tableGuid });
546 } else if (type == "edit") {
547 row.STATE = 'Running';
548 } else if (type == 'save') {
549 const cascaderData = getCascaderCheckedData();
550 row.classifyDetailNameRoutes = cascaderData.length ? cascaderData[0].pathLabels : [];
551 row.classifyDetailGuidRoutes = cascaderData.length ? cascaderData[0].pathValues : [];
552 row.classifyDetailGuid = cascaderData.length ? cascaderData[0].value : '';
553 row.classifyDetailName = cascaderData.length ? cascaderData[0].label : '';
554 row.STATE = '';
555 if (cascaderData.length && row.gradeDetailName) {
556 const params = [
557 {
558 guid: row.guid,
559 classifyDetailGuid: row.classifyDetailGuid,
560 classifyDetailName: row.classifyDetailName,
561 gradeDetailGuid: row.gradeDetailGuid,
562 gradeDetailName: row.gradeDetailName,
563 }
564 ];
565 saveFields(params)
566 }
917 } 567 }
918 }; 568 };
919 569
920 const toPath = (type = null) => {
921 router.push({
922 name: "taskConfig",
923 query: {
924 type
925 },
926 });
927 }
928
929 const tablePageChange = (info) => { 570 const tablePageChange = (info) => {
930 page.value.curr = Number(info.curr); 571 if (tabsInfo.value.activeName == 'sheet') {
931 page.value.limit = Number(info.limit); 572 sheetTableInfo.value.page.limit = Number(info.limit);
932 tableInfo.value.page.limit = page.value.limit; 573 sheetTableInfo.value.page.curr = Number(info.curr);
933 tableInfo.value.page.curr = page.value.curr; 574 getSheetTableData();
934 getTableData(); 575 } else {
576 fieldTableInfo.value.page.limit = page.value.limit;
577 fieldTableInfo.value.page.curr = page.value.curr;
578 getFieldTableData();
579 }
935 }; 580 };
936 581
937 const open = (msg, type, isBatch = false) => { 582 const btnClick = async (btn, bType = null) => {
938 ElMessageBox.confirm(msg, "提示", { 583 const type = btn.value;
939 confirmButtonText: "确定", 584 if (type == 'path') {
940 cancelButtonText: "取消", 585 router.push({
941 type: type, 586 name: "classifyGradeCatalogue",
942 }).then(() => { 587 });
943 const guids = [currTableData.value.guid]; 588 } else if (type == 'batch') {
944 listingDelete(guids).then((res: any) => { 589 if (selectRowData.value.length == 0) {
945 if (res.code == proxy.$passCode) { 590 ElMessage.warning('请选择需要操作的数据');
946 getFirstPageData(); 591 return
947 ElMessage({ 592 }
948 type: "success", 593 dialogInfo.value.visible = true;
949 message: "删除成功", 594 } else if (type == 'cancel') {
950 }); 595 router.push({
951 } else { 596 name: "taskConfig",
952 ElMessage({
953 type: "error",
954 message: res.msg,
955 });
956 }
957 }).catch((res) => {
958 tableInfo.value.loading = false;
959 }); 597 });
960 }); 598 } else if (type == 'confirm') {
599 saveTask();
600 }
961 }; 601 };
962 602
963 const getFirstPageData = () => { 603 // 保存字段
964 page.value.curr = 1 604 const saveFields = (params, isBatch = false) => {
965 tableInfo.value.page.curr = 1; 605 execFieldConfirm(params).then((res: any) => {
966 getTableData(); 606 if (res.code == proxy.$passCode) {
607 ElMessage.success('保存成功');
608 isBatch && getFieldTableData();
609 } else {
610 ElMessage.error(res.msg);
611 }
612 })
967 } 613 }
968 614
969 const btnClick = async (btn, bType = null) => { 615 // 任务确认
970 const type = btn.value; 616 const saveTask = () => {
971 }; 617 execTaskConfirm({ execGuid: taskDetail.value.execGuid }).then((res: any) => {
618 if (res.code == proxy.$passCode) {
619 ElMessage.success('保存成功');
620 router.push({
621 name: "taskConfig",
622 });
623 } else {
624 ElMessage.error(res.msg);
625 }
626 })
627 }
972 628
973 /** 搜索查询分类分级模板。 */ 629 /** 搜索查询分类分级模板。 */
974 const searchTemplate = (val: any, clear: boolean = false) => { 630 const searchSheet = (val: any, clear: boolean = false) => {
975 // page.value.curr = 1; 631 if (clear) {
976 // if (clear) { 632 sheetItemList.value.map(item => item.default = '')
977 // searchItemList.value.map(item => item.default = '') 633 }
978 // page.value.planName = ''; 634 sheetParams.value = Object.assign({}, { ...sheetParams.value }, { ...val });
979 // page.value.state = null; 635 getSheetTableData();
980 // getTableData();
981 // return;
982 // }
983 // page.value.planName = val.planName;
984 // page.value.state = val.state;
985 // getTableData();
986 }; 636 };
987 637
988 const changTable = () => { 638 const searchField = (val: any, clear: boolean = false) => {
989 // toSearch({}) 639 if (clear) {
640 fieldItemList.value.map(item => item.default = '')
641 }
642 fieldParams.value = Object.assign({}, { ...fieldParams.value }, { ...val });
643 getFieldTableData();
990 }; 644 };
991 645
992 const getPermissionList = (val, init = false) => { 646 const cascaderChange = (val, row) => {
993 let params: any = val ? { ...val } : {} 647 console.log(val, row);
994 // params.pageIndex = listPage.value.curr; 648 };
995 // params.pageSize = listPage.value.limit; 649
996 // getPermissionDictList(params).then((res: any) => { 650 const selectChange = (val, item, scope = null) => {
997 // if (res.code == proxy.$passCode) { 651 if (scope) {
998 // const data = res.data?.records || [] 652 let row = scope.row;
999 // if (init) { 653 row.gradeGuid = val || '';
1000 // permissionList.value = JSON.parse(JSON.stringify(data)) 654 row.gradeDetailName = val ? item.options.find(i => i.guid == val)?.gradeName : '';
1001 // currpermissionList.value = JSON.parse(JSON.stringify(data)) 655 } else {
1002 // listPage.value.totalPages = res.data.totalPages 656 if (tabsInfo.value.activeName == 'sheet') {
1003 // toSearch({}) 657 if (!val) {
1004 // } else { 658 sheetItemList.value[1].default = '';
1005 // permissionList.value.push(...JSON.parse(JSON.stringify(data))) 659 sheetItemList.value[1].disabled = true;
1006 // querySearch(asideSearchInput.value) 660 } else {
1007 // } 661 sheetItemList.value[1].disabled = false;
1008 // } 662 }
1009 // listLoading.value = false 663 } else {
1010 // }).catch(() => { 664 if (item.field == "databaseGuid") {
1011 // listLoading.value = false 665 if (!val) {
1012 // }) 666 fieldItemList.value[2].default = '';
667 fieldItemList.value[3].default = '';
668 fieldItemList.value[2].disabled = true;
669 fieldItemList.value[3].disabled = true;
670 } else {
671 fieldItemList.value[2].disabled = false;
672 }
673 } else {
674 if (!val) {
675 fieldItemList.value[3].default = '';
676 fieldItemList.value[3].disabled = true;
677 } else {
678 fieldItemList.value[3].disabled = false;
679 }
680 }
681 }
682 if (val) {
683 const params = {
684 type: item.field == "databaseGuid" ? 2 : 3,
685 dbGuid: val || ''
686 }
687 getSheetFieldList(params)
688 }
689 }
1013 } 690 }
1014 691
692 const dialogBtnClick = (btn, info) => {
693 if (btn.value == 'submit') {
694 let params: any = []
695 const cascaderData = dialogRef.value.getCascaderCheckedData();
696 const gradeName = gradeList.value.find(i => i.guid == info.gradeGuid)?.gradeName;
697 selectRowData.value.map((item: any) => {
698 const param = {
699 guid: item.guid,
700 classifyDetailGuid: cascaderData[0].value,
701 classifyDetailName: cascaderData[0].label,
702 gradeDetailGuid: info.gradeGuid,
703 gradeDetailName: gradeName,
704 }
705 params.push(param)
706 })
707 saveFields(params, true);
708 dialogInfo.value.visible = false;
709 } else if (btn.value == 'cancel') {
710 dialogInfo.value.visible = false;
711 }
712 };
713
1015 onActivated(() => { 714 onActivated(() => {
1016 715
1017 }) 716 })
1018 717
1019 onBeforeMount(() => { 718 onBeforeMount(() => {
1020 719 taskDetail.value = detailData;
720 getFieldCount()
721 getSheetFieldList({ type: 1 });
722 getFieldTree()
723 getSheetTableData();
724 getFieldTableData();
725 getGradeData();
1021 }) 726 })
1022 727
1023 </script> 728 </script>
...@@ -1029,29 +734,37 @@ onBeforeMount(() => { ...@@ -1029,29 +734,37 @@ onBeforeMount(() => {
1029 <div class="template_panel"> 734 <div class="template_panel">
1030 <div class="panel_title"> 735 <div class="panel_title">
1031 <div class="title_wrap"> 736 <div class="title_wrap">
1032 <span class="title_text">{{ templateInfo.title }}</span> 737 <span class="title_text">{{ taskDetail.taskName }}</span>
1033 <el-tag type="warning">{{ templateInfo.mark }}</el-tag> 738 <el-tag :type="taskDetail.confirmStatus == 'Y' ? 'success' : 'warning'">{{
739 filterVal(taskDetail.confirmStatus,
740 'confirmStatus') }}</el-tag>
1034 </div> 741 </div>
1035 </div> 742 </div>
1036 <div class="title_desc"> 743 <div class="title_desc">
1037 <div class="desc_group"> 744 <div class="desc_group">
1038 <div class="desc_item"> 745 <div class="desc_item">
1039 <span class="desc_label">目录名称:</span> 746 <span class="desc_label">目录名称:</span>
1040 <span class="desc_value text_btn">医疗数据</span> 747 <span class="desc_value text_btn" @click="btnClick({ value: 'path' })">{{ taskDetail.cgDirName || '--'
748 }}</span>
1041 </div> 749 </div>
1042 <div class="desc_item"> 750 <div class="desc_item">
1043 <span class="desc_label">执行时间:</span> 751 <span class="desc_label">执行时间:</span>
1044 <span class="desc_value">2021-12-12 09:12:13</span> 752 <span class="desc_value">{{ taskDetail.cgDirName || '--' }}</span>
1045 </div> 753 </div>
1046 </div> 754 </div>
1047 <div class="desc_group"> 755 <div class="desc_group">
1048 <div class="desc_item"> 756 <div class="desc_item">
1049 <span class="desc_label">分类:</span> 757 <span class="desc_label">分类:</span>
1050 <span class="desc_value text_btn">医疗数据</span> 758 <span class="desc_value text_btn">{{ taskDetail.classifyName || '--' }}</span>
759 </div>
760 <div class="desc_item">
761 <span class="desc_label">分级:</span>
762 <span class="desc_value text_btn">{{ taskDetail.gradeName || '--' }}</span>
1051 </div> 763 </div>
1052 <div class="desc_item"> 764 <div class="desc_item">
1053 <span class="desc_label">元数据名称:</span> 765 <span class="desc_label">元数据名称:</span>
1054 <span class="desc_value">名称1、名称2、名称3</span> 766 <span class="desc_value">{{ (taskDetail.metaNames || []).length ? taskDetail.metaNames.join(',') : '--'
767 }}</span>
1055 </div> 768 </div>
1056 </div> 769 </div>
1057 </div> 770 </div>
...@@ -1060,13 +773,13 @@ onBeforeMount(() => { ...@@ -1060,13 +773,13 @@ onBeforeMount(() => {
1060 <Warning /> 773 <Warning />
1061 </el-icon> 774 </el-icon>
1062 <span>本次分类分级任务共涉及: </span> 775 <span>本次分类分级任务共涉及: </span>
1063 <span class="text_btn">40</span> 776 <span class="text_btn">{{ changeNum(fieldCounts.tableNum || 0) }}</span>
1064 <span>张表,共</span> 777 <span>张表,共</span>
1065 <span class="text_btn">4023</span> 778 <span class="text_btn">{{ changeNum(fieldCounts.fieldNum || 0) }}</span>
1066 <span>个字段,已分类</span> 779 <span>个字段,已分类</span>
1067 <span class="text_btn">2099</span> 780 <span class="text_btn">{{ changeNum(fieldCounts.classifyFieldNum || 0) }}</span>
1068 <span>个字段,已分级</span> 781 <span>个字段,已分级</span>
1069 <span class="text_btn">1987</span> 782 <span class="text_btn">{{ changeNum(fieldCounts.gradeFieldNum || 0) }}</span>
1070 <span>个字段</span> 783 <span>个字段</span>
1071 </p> 784 </p>
1072 </div> 785 </div>
...@@ -1074,7 +787,8 @@ onBeforeMount(() => { ...@@ -1074,7 +787,8 @@ onBeforeMount(() => {
1074 <Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" /> 787 <Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" />
1075 <div class="panel" v-show="tabsInfo.activeName == 'sheet'"> 788 <div class="panel" v-show="tabsInfo.activeName == 'sheet'">
1076 <div class="table_tool_wrap"> 789 <div class="table_tool_wrap">
1077 <TableTools :searchItems="sheetItemList" :searchId="'template-manage-search'" @search="searchTemplate" /> 790 <TableTools :searchItems="sheetItemList" :searchId="'sheet-search'" :init="false"
791 @selectChange="selectChange" @search="searchSheet" />
1078 </div> 792 </div>
1079 <div class="table_panel_wrap"> 793 <div class="table_panel_wrap">
1080 <Table :tableInfo="sheetTableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 794 <Table :tableInfo="sheetTableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
...@@ -1082,43 +796,54 @@ onBeforeMount(() => { ...@@ -1082,43 +796,54 @@ onBeforeMount(() => {
1082 </div> 796 </div>
1083 <div class="panel flex" v-show="tabsInfo.activeName == 'field'"> 797 <div class="panel flex" v-show="tabsInfo.activeName == 'field'">
1084 <div class="box_left"> 798 <div class="box_left">
1085 <div class="aside_title">分类分级目录</div> 799 <Tree ref="treeInfoRef" :treeInfo="treeInfo" @nodeClick="nodeClick" />
1086 <Tree :treeInfo="treeInfo" @nodeClick="nodeClick" />
1087 </div> 800 </div>
1088 <div class="box_right"> 801 <div class="box_right">
1089 <div class="table_tool_wrap"> 802 <div class="table_tool_wrap">
1090 <TableTools :searchItems="fieldItemList" :searchId="'template-manage-search'" 803 <TableTools :searchItems="fieldItemList" :searchId="'field-search'" :init="false"
1091 @search="searchTemplate" /> 804 @selectChange="selectChange" @cascaderChange="cascaderChange" @search="searchField" />
1092 <div class="tools_btns"> 805 <div class="tools_btns">
1093 <div class="btns"> 806 <div class="btns">
1094 <el-button type="primary" plain @click="btnClick({ value: 'batch' })">批量变量分类分级</el-button> 807 <el-button type="primary" plain @click="btnClick({ value: 'batch' })">批量变量分类分级</el-button>
1095 <el-button plain @click="btnClick({ value: 'import' })">导入</el-button> 808 <el-button plain @click="btnClick({ value: 'import' })">导入</el-button>
1096 <el-button plain @click="btnClick({ value: 'export' })">导出</el-button> 809 <el-button plain @click="btnClick({ value: 'export' })">导出</el-button>
1097 </div> 810 </div>
1098 <div class="checkboxs">
1099 <el-checkbox v-model="checked1">仅看未分级分类</el-checkbox>
1100 <el-checkbox v-model="checked2">仅看变更</el-checkbox>
1101 </div>
1102 </div> 811 </div>
1103 </div> 812 </div>
1104 <div class="table_panel_wrap panel"> 813 <div class="table_panel_wrap panel">
1105 <div class="table_panel"> 814 <div class="table_panel" v-loading="fieldTableInfo.loading">
1106 <el-table ref="costTableRef" :data="fieldTableInfo.data" border :height="'100%'" 815 <el-table ref="costTableRef" :data="fieldTableInfo.data" border :height="'100%'"
1107 style="width: 100%; display: inline-block" :style="{ 'min-height': '100%' }"> 816 style="width: 100%; display: inline-block" :style="{ 'max-height': 'calc(100% - 44px)' }"
817 :cell-class-name="tableCellClassName" @selection-change="tableSelectionChange">
818 <el-table-column type="selection" align="center" :width="32" :selectable="rowSelectable"
819 fixed="left" />
1108 <el-table-column v-for="(item, i) in fieldTableInfo.fields" :label="item.label" :width="item.width" 820 <el-table-column v-for="(item, i) in fieldTableInfo.fields" :label="item.label" :width="item.width"
1109 :min-width="item.minWidth" :fixed="item.fixed" :align="item.align" 821 :min-width="item.minWidth" :fixed="item.fixed" :align="item.align"
1110 :sortable="item.sortable ?? false" :prop="item.field" :class-name="item.columClass" 822 :sortable="item.sortable ?? false" :prop="item.field" :class-name="item.columClass"
1111 show-overflow-tooltip> 823 show-overflow-tooltip>
1112 <template #default="scope"> 824 <template #default="scope">
1113 <div class="select_cell" v-if="item.type == 'select'"> 825 <span v-if="item.type == 'index'">
1114 <el-select v-model="scope.row[item.field]" :placeholder="item.placeholder" 826 {{
1115 :disabled="item.disabled" :clearable="item.clearable || true" /> 827 fieldTableInfo.page.curr !== undefined
1116 </div> 828 ? (fieldTableInfo.page.curr - 1) * fieldTableInfo.page.limit + scope.$index + 1
1117 <div v-else-if="item.type == 'tag'"> 829 : scope.$index + 1
1118 <el-tag :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{ 830 }}
831 </span>
832 <el-tag v-else-if="item.type == 'tag'"
833 :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{
1119 item.getName ? item.getName(scope) : tagMethod(scope.row, item.field) 834 item.getName ? item.getName(scope) : tagMethod(scope.row, item.field)
1120 }}</el-tag> 835 }}</el-tag>
1121 </div> 836 <el-select v-else-if="item.type == 'select' && scope.row['STATE'] === 'Running'"
837 v-model="scope.row[item.field]" :placeholder="item.placeholder"
838 :disabled="item.disabled ?? false" :clearable="item.clearable ?? true" size="small"
839 @change="(val) => selectChange(val, item, scope)">
840 <el-option v-for="opt in item.options" :key="opt.value"
841 :label="opt[item.props?.label ?? 'label']" :value="opt[item.props?.value ?? 'value']" />
842 </el-select>
843 <el-cascader v-else-if="item.type == 'cascader' && scope.row['STATE'] === 'Running'"
844 ref="cascaderRef" v-model="scope.row[item.field]" :options="item.options" :props="item.props"
845 :show-all-levels="item.showAllLevels ?? true" :disabled="item.disabled ?? false"
846 :clearable="item.clearable ?? true" size="small" />
1122 <span v-else> 847 <span v-else>
1123 {{ item.getName ? item.getName(scope) : scope.row[item.field] !== 0 && !scope.row[item.field] 848 {{ item.getName ? item.getName(scope) : scope.row[item.field] !== 0 && !scope.row[item.field]
1124 ? 849 ?
...@@ -1126,18 +851,11 @@ onBeforeMount(() => { ...@@ -1126,18 +851,11 @@ onBeforeMount(() => {
1126 </span> 851 </span>
1127 </template> 852 </template>
1128 </el-table-column> 853 </el-table-column>
1129 <el-table-column label="操作" :width="fieldTableInfo.actionInfo.width" 854 <el-table-column label="操作" :width="fieldTableInfo.actionInfo.width" fixed="right">
1130 :class-name="fieldTableInfo.actionInfo.columClass" fixed="right">
1131 <template #default="scope"> 855 <template #default="scope">
1132 <template v-for="(btn, b) in Array.isArray(fieldTableInfo.actionInfo.btns) 856 <span class="text_btn"
1133 ? fieldTableInfo.actionInfo.btns 857 @click="tableBtnClick(scope, { value: scope.row['STATE'] === 'Running' ? 'save' : 'edit' })"
1134 : fieldTableInfo.actionInfo.btns(scope)"> 858 v-preReClick>{{ scope.row['STATE'] === 'Running' ? '保存' : '编辑' }}</span>
1135 <span class="operate_btn" :class="{ active: btn.visible ?? true }" v-if="btn.visible ?? true">
1136 <span class="text_btn" :class="{ 'is-disabled': !!btn.disabled }"
1137 @click="(btn.click && !btn.disabled && !scope.row.disabled) ? btn.click(scope, btn) : tableBtnClick(scope, btn)"
1138 v-preReClick>{{ btn.label }}</span>
1139 </span>
1140 </template>
1141 </template> 859 </template>
1142 </el-table-column> 860 </el-table-column>
1143 </el-table> 861 </el-table>
...@@ -1152,10 +870,11 @@ onBeforeMount(() => { ...@@ -1152,10 +870,11 @@ onBeforeMount(() => {
1152 <div class="tool_btns"> 870 <div class="tool_btns">
1153 <div class="btns"> 871 <div class="btns">
1154 <el-button @click="btnClick({ value: 'cancel' })">暂存</el-button> 872 <el-button @click="btnClick({ value: 'cancel' })">暂存</el-button>
1155 <el-button type="primary" @click="btnClick({ value: 'next' })">确认变更</el-button> 873 <el-button type="primary" @click="btnClick({ value: 'confirm' })">确认变更</el-button>
1156 </div> 874 </div>
1157 </div> 875 </div>
1158 </div> 876 </div>
877 <Dialog ref="dialogRef" :dialogInfo="dialogInfo" @btnClick="dialogBtnClick" />
1159 </div> 878 </div>
1160 </template> 879 </template>
1161 880
...@@ -1290,10 +1009,10 @@ onBeforeMount(() => { ...@@ -1290,10 +1009,10 @@ onBeforeMount(() => {
1290 } 1009 }
1291 1010
1292 .panel_content { 1011 .panel_content {
1293 height: 100%; 1012 height: calc(100% - 145px);
1294 1013
1295 .panel { 1014 .panel {
1296 height: calc(100% - 47px); 1015 height: calc(100% - 35px);
1297 padding: 0 16px; 1016 padding: 0 16px;
1298 1017
1299 &.flex { 1018 &.flex {
...@@ -1319,12 +1038,16 @@ onBeforeMount(() => { ...@@ -1319,12 +1038,16 @@ onBeforeMount(() => {
1319 } 1038 }
1320 1039
1321 .tree_panel { 1040 .tree_panel {
1322 padding: 0; 1041 height: 100%;
1042 padding: 8px 0;
1323 } 1043 }
1324 } 1044 }
1325 1045
1326 .box_right { 1046 .box_right {
1327 width: calc(100% - 240px); 1047 width: calc(100% - 240px);
1048 height: 100%;
1049 display: flex;
1050 flex-direction: column;
1328 } 1051 }
1329 } 1052 }
1330 } 1053 }
...@@ -1342,7 +1065,7 @@ onBeforeMount(() => { ...@@ -1342,7 +1065,7 @@ onBeforeMount(() => {
1342 :deep(.table_tool_wrap) { 1065 :deep(.table_tool_wrap) {
1343 .table-tools { 1066 .table-tools {
1344 .tools_search { 1067 .tools_search {
1345 padding-top: 12px; 1068 padding-top: 8px;
1346 } 1069 }
1347 } 1070 }
1348 } 1071 }
...@@ -1356,15 +1079,37 @@ onBeforeMount(() => { ...@@ -1356,15 +1079,37 @@ onBeforeMount(() => {
1356 1079
1357 .table_panel_wrap { 1080 .table_panel_wrap {
1358 width: 100%; 1081 width: 100%;
1359 height: calc(100% - 40px); 1082 height: calc(100% - 49px);
1360 padding: 4px 0 0; 1083 padding: 4px 0 0;
1361 1084
1362 &.panel { 1085 &.panel {
1363 height: calc(100% - 135px); 1086 flex: 1;
1364 1087
1365 .table_panel { 1088 .table_panel {
1366 width: 100%; 1089 width: 100%;
1367 height: 100%; 1090 height: 100%;
1091 overflow: hidden;
1092 }
1093 }
1094
1095 :deep(.el-table) {
1096 td.el-table__cell {
1097 &.edit_cell {
1098 padding: 0;
1099
1100 .cell {
1101 padding: 0 4px;
1102 line-height: 1;
1103
1104 .el-cascader {
1105 width: 100%;
1106
1107 .el-input .el-input__inner {
1108 height: auto !important;
1109 }
1110 }
1111 }
1112 }
1368 } 1113 }
1369 } 1114 }
1370 } 1115 }
......
...@@ -9,303 +9,18 @@ import useUserStore from "@/store/modules/user"; ...@@ -9,303 +9,18 @@ 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 { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList } from "@/api/modules/dataProduct"; 12 import { getCgTaskDetail, getClassifyGradList, getClassifyTreeList, getCgLabelPageList, getMetaTableCollectList, cgTaskSave, cgTaskUpdate } 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();
16 const route = useRoute();
19 const userStore = useUserStore(); 17 const userStore = useUserStore();
20 const userData = JSON.parse(userStore.userData); 18 const userData = JSON.parse(userStore.userData);
21 const assetStore = useDataAssetStore(); 19 const assetStore = useDataAssetStore();
22 20
23 const data1 = [
24 {
25 "children": [
26 {
27 "children": null,
28 "parentGuids": [
29 "c32ddd77191ff4afe149538ef4b2e0c3"
30 ],
31 "guid": "9c92df55a19cdce88f61e20a8e1e8a65",
32 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
33 "organisationCode": "11150001",
34 "organisationName": "链享供应链运营一部",
35 "bizState": "Y",
36 "createTime": "2023-10-25 14:23:31",
37 "createUserName": "测试",
38 "parentGuid": "c32ddd77191ff4afe149538ef4b2e0c3",
39 "orderNum": 1,
40 "level": 2,
41 "levelCode": "1.1",
42 "displayCreateTime": "2023-10-25 14:23:31"
43 }
44 ],
45 "parentGuids": null,
46 "guid": "c32ddd77191ff4afe149538ef4b2e0c3",
47 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
48 "organisationCode": "1115004",
49 "organisationName": "链享供应链",
50 "bizState": "Y",
51 "createTime": "2023-08-15 12:59:10",
52 "createUserName": "测试",
53 "parentGuid": "",
54 "orderNum": 2,
55 "level": 0,
56 "levelCode": "1",
57 "displayCreateTime": "2023-08-15 12:59:10"
58 },
59 {
60 "children": [
61 {
62 "children": [
63 {
64 "children": null,
65 "parentGuids": [
66 "e10332122834077907cd5ea61fa576c1",
67 "cdae7bb3cafb560482cad1b89a1e4b78"
68 ],
69 "guid": "16ea472a155c07433a63220f2ae1afe9",
70 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
71 "organisationCode": "11160011",
72 "organisationName": "链享运营一部1组",
73 "bizState": "S",
74 "createTime": "2023-10-25 13:15:57",
75 "createUserName": "测试",
76 "parentGuid": "cdae7bb3cafb560482cad1b89a1e4b78",
77 "orderNum": 1,
78 "level": 2,
79 "levelCode": "2.1.1",
80 "displayCreateTime": "2023-10-25 13:15:57"
81 }
82 ],
83 "parentGuids": [
84 "e10332122834077907cd5ea61fa576c1"
85 ],
86 "guid": "cdae7bb3cafb560482cad1b89a1e4b78",
87 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
88 "organisationCode": "1116001",
89 "organisationName": "链享运营一部",
90 "bizState": "S",
91 "createTime": "2023-10-25 13:14:15",
92 "createUserName": "测试",
93 "parentGuid": "e10332122834077907cd5ea61fa576c1",
94 "orderNum": 1,
95 "level": 1,
96 "levelCode": "2.1",
97 "displayCreateTime": "2023-10-25 13:14:15"
98 },
99 {
100 "children": null,
101 "parentGuids": [
102 "e10332122834077907cd5ea61fa576c1"
103 ],
104 "guid": "d98b44ffb35e4d17cf68f9a922e1c7b7",
105 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
106 "organisationCode": null,
107 "organisationName": "二部",
108 "bizState": "Y",
109 "createTime": "2023-10-26 09:45:36",
110 "createUserName": "测试",
111 "parentGuid": "e10332122834077907cd5ea61fa576c1",
112 "orderNum": 2,
113 "level": 1,
114 "levelCode": "2.2",
115 "displayCreateTime": "2023-10-26 09:45:36"
116 }
117 ],
118 "parentGuids": null,
119 "guid": "e10332122834077907cd5ea61fa576c1",
120 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
121 "organisationCode": "1115005",
122 "organisationName": "链享医药",
123 "bizState": "Y",
124 "createTime": "2023-09-12 15:59:35",
125 "createUserName": "测试",
126 "parentGuid": null,
127 "orderNum": 3,
128 "level": 0,
129 "levelCode": "2",
130 "displayCreateTime": "2023-09-12 15:59:35"
131 },
132 {
133 "children": [
134 {
135 "children": null,
136 "parentGuids": [
137 "9bd46f0f4fcf429518fae6ecb4849a9e"
138 ],
139 "guid": "870f23ae47e036eb88b35f726c31959b",
140 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
141 "organisationCode": null,
142 "organisationName": "运用三部",
143 "bizState": "Y",
144 "createTime": "2024-04-28 16:33:24",
145 "createUserName": "数往知来管理员",
146 "parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
147 "orderNum": 3,
148 "level": 1,
149 "levelCode": "3.3",
150 "displayCreateTime": "2024-04-28 16:33:24"
151 },
152 {
153 "children": null,
154 "parentGuids": [
155 "9bd46f0f4fcf429518fae6ecb4849a9e"
156 ],
157 "guid": "e06049046241dd71b153f227dbe7f801",
158 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
159 "organisationCode": null,
160 "organisationName": "运营二部",
161 "bizState": "Y",
162 "createTime": "2023-11-14 16:01:50",
163 "createUserName": "数往知来管理员",
164 "parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
165 "orderNum": 40,
166 "level": 1,
167 "levelCode": "3.2",
168 "displayCreateTime": "2023-11-14 16:01:50"
169 },
170 {
171 "children": null,
172 "parentGuids": [
173 "9bd46f0f4fcf429518fae6ecb4849a9e"
174 ],
175 "guid": "731cd185c868da8af48b492068ffaed4",
176 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
177 "organisationCode": null,
178 "organisationName": "运营一部",
179 "bizState": "Y",
180 "createTime": "2023-11-14 15:19:35",
181 "createUserName": "测试",
182 "parentGuid": "9bd46f0f4fcf429518fae6ecb4849a9e",
183 "orderNum": 41,
184 "level": 1,
185 "levelCode": "3.1",
186 "displayCreateTime": "2023-11-14 15:19:35"
187 }
188 ],
189 "parentGuids": null,
190 "guid": "9bd46f0f4fcf429518fae6ecb4849a9e",
191 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
192 "organisationCode": null,
193 "organisationName": "药企服务事业部1",
194 "bizState": "Y",
195 "createTime": "2023-11-14 14:49:14",
196 "createUserName": "数往知来管理员",
197 "parentGuid": "",
198 "orderNum": 4,
199 "level": 0,
200 "levelCode": "3",
201 "displayCreateTime": "2023-11-14 14:49:14"
202 },
203 {
204 "children": [
205 {
206 "children": null,
207 "parentGuids": [
208 "23be149ea3167a3f7f2d383023336efe"
209 ],
210 "guid": "e5f2b4958ee2d99309a41e0c6e1447c8",
211 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
212 "organisationCode": null,
213 "organisationName": "智能存储装备部",
214 "bizState": "Y",
215 "createTime": "2023-11-14 16:09:36",
216 "createUserName": "数往知来管理员",
217 "parentGuid": "23be149ea3167a3f7f2d383023336efe",
218 "orderNum": 51,
219 "level": 1,
220 "levelCode": "4.1",
221 "displayCreateTime": "2023-11-14 16:09:36"
222 }
223 ],
224 "parentGuids": null,
225 "guid": "23be149ea3167a3f7f2d383023336efe",
226 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
227 "organisationCode": null,
228 "organisationName": "医药物联网事业部",
229 "bizState": "Y",
230 "createTime": "2023-11-14 15:11:35",
231 "createUserName": "数往知来管理员",
232 "parentGuid": "",
233 "orderNum": 5,
234 "level": 0,
235 "levelCode": "4",
236 "displayCreateTime": "2023-11-14 15:11:35"
237 },
238 {
239 "children": null,
240 "parentGuids": null,
241 "guid": "1d82e875163749ca9ae45809ec432ae8",
242 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
243 "organisationCode": null,
244 "organisationName": "财务管理中心",
245 "bizState": "S",
246 "createTime": "2023-11-14 15:14:07",
247 "createUserName": "数往知来管理员",
248 "parentGuid": "",
249 "orderNum": 6,
250 "level": 0,
251 "levelCode": "6",
252 "displayCreateTime": "2023-11-14 15:14:07"
253 },
254 {
255 "children": null,
256 "parentGuids": null,
257 "guid": "cd9e6a0c76102364a9e88b79b28b0b32",
258 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
259 "organisationCode": null,
260 "organisationName": "资产服务",
261 "bizState": "Y",
262 "createTime": "2024-08-14 11:40:33",
263 "createUserName": "数往知来管理员",
264 "parentGuid": "",
265 "orderNum": 7,
266 "level": 0,
267 "levelCode": "9",
268 "displayCreateTime": "2024-08-14 11:40:33"
269 },
270 {
271 "children": [
272 {
273 "children": null,
274 "parentGuids": [
275 "dac448b77fa35f798bb4a06d8fd86334"
276 ],
277 "guid": "cb76777efe69182cfb2c75d41944553c",
278 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
279 "organisationCode": null,
280 "organisationName": "审批1",
281 "bizState": "Y",
282 "createTime": "2024-01-17 14:28:36",
283 "createUserName": "数往知来管理员",
284 "parentGuid": "dac448b77fa35f798bb4a06d8fd86334",
285 "orderNum": 100,
286 "level": 1,
287 "levelCode": "8.1",
288 "displayCreateTime": "2024-01-17 14:28:36"
289 }
290 ],
291 "parentGuids": null,
292 "guid": "dac448b77fa35f798bb4a06d8fd86334",
293 "tenantGuid": "9e5b9d7bfd8c4f4f8079e05de19bf7e0",
294 "organisationCode": null,
295 "organisationName": "审批组织",
296 "bizState": "Y",
297 "createTime": "2024-01-16 11:38:24",
298 "createUserName": "数往知来管理员",
299 "parentGuid": "",
300 "orderNum": 99,
301 "level": 0,
302 "levelCode": "8",
303 "displayCreateTime": "2024-01-16 11:38:24"
304 }
305 ]
306
307 const step = ref(0); 21 const step = ref(0);
308 const selectIndex = ref(0); 22 const selectIndex = ref(0);
23 const taskDetail = ref({});
309 const asideSearchInput = ref(""); 24 const asideSearchInput = ref("");
310 const permissionList: any = ref([]) 25 const permissionList: any = ref([])
311 const listLoading = ref(false) 26 const listLoading = ref(false)
...@@ -314,63 +29,29 @@ const listPage = ref({ ...@@ -314,63 +29,29 @@ const listPage = ref({
314 curr: 1, 29 curr: 1,
315 totalPages: 0 30 totalPages: 0
316 }) 31 })
317 const currpermissionList: any = ref([ 32 const currpermissionList: any = ref([])
318 { 33 const templateInfo = ref({})
319 "guid": "62d01ad586774db2bb3955dfb2d18366", 34 const treeInfoRef = ref();
320 "productGuid": null,
321 "productName": null,
322 "dataPermissionName": "当前用户",
323 "bizState": "Y",
324 "createUserName": "数往知来管理员",
325 "createTime": "2024-01-24 14:08:43",
326 "sqlScript": null,
327 "dataSourceGuid": null
328 },
329 {
330 "guid": "d68a27c1998540a2b8e8f22a2d5eebef",
331 "productGuid": null,
332 "productName": null,
333 "dataPermissionName": "组织权限",
334 "bizState": "Y",
335 "createUserName": "数往知来管理员",
336 "createTime": "2024-01-24 11:47:02",
337 "sqlScript": null,
338 "dataSourceGuid": null
339 }
340 ])
341 const templateInfo = ref({
342 title: '医疗数据分类',
343 descGroup: [
344 { label: '模型确认人', value: '管理员 ' },
345 { label: '模型确认时间', value: '2021-12-12 09:12:13' },
346 ],
347 tags: [
348 { type: 'info', name: '医疗行业分类' },
349 { type: 'success', name: '五级' },
350 { type: 'primary', name: 'V5' },
351 ],
352 desc: '适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康管理部门、公共卫生服务机构、相关专项业务服务机构、相关信息技术服务机构等开展医疗健康数据分类分级。适用于各级医疗机构、卫生健康。'
353 })
354 const treeIndex: any = ref({})
355
356 const treeInfo = ref({ 35 const treeInfo = ref({
357 id: "data-pickup-tree", 36 id: "data-pickup-tree",
358 filter: true, 37 filter: true,
359 queryValue: "", 38 queryValue: "",
360 queryPlaceholder: "输入组织名称搜索", 39 loading: false,
40 queryPlaceholder: "请输入分类名称搜索",
361 props: { 41 props: {
362 label: "organisationName", 42 label: "classifyName",
363 value: "guid", 43 value: "guid",
364 }, 44 },
365 nodeKey: 'guid', 45 nodeKey: 'guid',
366 expandedKey: [], 46 expandedKey: [],
367 expandOnNodeClick: false, 47 expandOnNodeClick: false,
368 data: data1 || [], 48 data: [],
369 }); 49 });
370 50
371 const expand1 = ref(true) 51 const expand1 = ref(true)
372 const expand2 = ref(true) 52 const expand2 = ref(true)
373 53
54 const taskFormRef = ref();
374 const taskFormItems: any = ref([ 55 const taskFormItems: any = ref([
375 { 56 {
376 label: '任务名称', 57 label: '任务名称',
...@@ -385,7 +66,7 @@ const taskFormItems: any = ref([ ...@@ -385,7 +66,7 @@ const taskFormItems: any = ref([
385 label: '分级分类目录名称', 66 label: '分级分类目录名称',
386 type: 'input', 67 type: 'input',
387 placeholder: '请输入', 68 placeholder: '请输入',
388 field: 'catalogName', 69 field: 'cgDirName',
389 default: '', 70 default: '',
390 maxlength: 50, 71 maxlength: 50,
391 required: true 72 required: true
...@@ -396,7 +77,7 @@ const taskFormRules = ref({ ...@@ -396,7 +77,7 @@ const taskFormRules = ref({
396 taskName: [ 77 taskName: [
397 { required: true, trigger: 'blur', message: "请填写任务名称" } 78 { required: true, trigger: 'blur', message: "请填写任务名称" }
398 ], 79 ],
399 catalogName: [ 80 cgDirName: [
400 { required: true, trigger: 'blur', message: "请填写分级分类目录名称" } 81 { required: true, trigger: 'blur', message: "请填写分级分类目录名称" }
401 ], 82 ],
402 }); 83 });
...@@ -412,17 +93,25 @@ const page = ref({ ...@@ -412,17 +93,25 @@ const page = ref({
412 { label: "200", value: 200 }, 93 { label: "200", value: 200 },
413 ], 94 ],
414 }); 95 });
415 const searchItemValue: any = ref({}); 96 const searchItemValue: any = ref({
97 classifyGuid: '',
98 detailGuid: ''
99 });
416 const currTableData: any = ref({}); 100 const currTableData: any = ref({});
417 101 const selectRowData = ref([])
418 const tableInfo = ref({ 102 const tableInfo = ref({
419 id: "mapping-table", 103 id: "mapping-table",
420 fields: [ 104 fields: [
421 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 105 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
422 { label: "标签", field: "damCode", width: 96 }, 106 { label: "标签", field: "label", width: 96 },
423 { label: "分类", field: "damTypeName", width: 380 }, 107 {
424 { label: "分级", field: "damName", width: 55 }, 108 label: "分类", field: "classifyNames", width: 380, getName: (scope) => {
425 { label: "规则", field: "damTypeName", width: 380 }, 109 const names = scope.row.classifyNames || [];
110 return names.join('/');
111 }
112 },
113 { label: "分级", field: "gradeDetailName", width: 55 },
114 { label: "规则", field: "rule", width: 380 },
426 ], 115 ],
427 loading: false, 116 loading: false,
428 data: [], 117 data: [],
...@@ -436,110 +125,113 @@ const tableInfo = ref({ ...@@ -436,110 +125,113 @@ const tableInfo = ref({
436 }, 125 },
437 }); 126 });
438 127
128 const metadataTableRef = ref();
439 const metadataTableInfo = ref({ 129 const metadataTableInfo = ref({
440 id: "metadata-table", 130 id: "metadata-table",
441 multiple: true, 131 multiple: true,
442 rowKey: 'guid', 132 rowKey: 'guid',
443 fields: [ 133 fields: [
444 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 134 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
445 { label: "数据库名称", field: "damCode", width: 200 }, 135 { label: "数据库名称", field: "databaseNameZh", width: 200 },
446 { label: "数据库名", field: "damTypeName", width: 200 }, 136 { label: "数据库名", field: "databaseName", width: 200 },
447 { label: "总表数", field: "damName", width: 120, align: "right" }, 137 { label: "总表数", field: "tableCount", width: 120, align: "right" },
448 { label: "存储量(约/MB)", field: "damTypeName", width: 200, align: "right" }, 138 { label: "存储量(约/MB)", field: "storageCapacities", width: 200, align: "right" },
449 ], 139 ],
450 loading: false, 140 loading: false,
451 data: [], 141 data: [],
452 page: { 142 showPage: false,
453 type: "normal", 143 // page: {
454 rows: 0, 144 // type: "normal",
455 ...page.value, 145 // rows: 0,
456 }, 146 // ...page.value,
147 // },
457 actionInfo: { 148 actionInfo: {
458 show: false 149 show: false
459 }, 150 },
460 }) 151 })
461 152
153 const getTaskDetail = (data) => {
154 getCgTaskDetail(data).then((res: any) => {
155 if (res.code == proxy.$passCode) {
156 const data = res.data || {};
157 taskDetail.value = data;
158 taskFormItems.value.map((item) => {
159 item.default = data[item.field] || '';
160 })
161 selectRowData.value = data.metaGuids || [];
162 getPermissionList({});
163 getMetaTableData();
164 }
165 })
166 }
167
462 const nodeClick = (data) => { 168 const nodeClick = (data) => {
463 treeIndex.value = data 169 searchItemValue.value.classifyGuid = templateInfo.value.guid;
170 searchItemValue.value.detailGuid = data.guid;
171 getTableData();
464 } 172 }
465 173
174 // 获取标签数据
466 const getTableData = () => { 175 const getTableData = () => {
467 tableInfo.value.loading = true; 176 tableInfo.value.loading = true;
468 getListingList( 177 getCgLabelPageList(
469 Object.assign({}, searchItemValue.value, { 178 Object.assign({}, searchItemValue.value, {
470 pageIndex: page.value.curr, 179 pageIndex: page.value.curr,
471 pageSize: page.value.limit, 180 pageSize: page.value.limit,
472 }) 181 })
473 ).then((res: any) => { 182 ).then((res: any) => {
474 tableInfo.value.loading = false; 183 tableInfo.value.loading = false;
475 tableInfo.value.data = res.data.records || []; 184 if (res.code == proxy.$passCode) {
476 tableInfo.value.page.curr = res.data.pageIndex; 185 tableInfo.value.data = res.data.records || [];
477 tableInfo.value.page.limit = res.data.pageSize; 186 tableInfo.value.page.curr = res.data.pageIndex;
478 tableInfo.value.page.rows = res.data.totalRows; 187 tableInfo.value.page.limit = res.data.pageSize;
188 tableInfo.value.page.rows = res.data.totalRows;
189 }
479 }) 190 })
480 .catch((res) => { 191 .catch((res) => {
481 tableInfo.value.loading = false; 192 tableInfo.value.loading = false;
482 }); 193 });
483 }; 194 };
484 195
485 const tableBtnClick = (scope, btn) => { 196 const toPath = () => {
486 const type = btn.value;
487 const row = scope.row;
488 currTableData.value = row;
489 if (type == "detail" || type === "edit") {
490 toPath(type);
491 } else if (type === "delete") {
492 open("此操作将永久删除,是否继续?", "warning");
493 }
494 };
495
496 const toPath = (type = null) => {
497 router.push({ 197 router.push({
498 name: "taskConfig", 198 name: "taskConfig",
499 query: { 199 query: {},
500 type
501 },
502 }); 200 });
503 } 201 }
504 202
505 const tablePageChange = (info) => { 203 const tableSelectionChange = (val) => {
506 page.value.curr = Number(info.curr); 204 selectRowData.value = val.map((item) => item.databaseGuid);
507 page.value.limit = Number(info.limit);
508 tableInfo.value.page.limit = page.value.limit;
509 tableInfo.value.page.curr = page.value.curr;
510 getTableData();
511 }; 205 };
512 206
513 const open = (msg, type, isBatch = false) => { 207 const tablePageChange = (info) => {
514 ElMessageBox.confirm(msg, "提示", { 208 if (step.value == 0) {
515 confirmButtonText: "确定", 209 page.value.curr = Number(info.curr);
516 cancelButtonText: "取消", 210 page.value.limit = Number(info.limit);
517 type: type, 211 tableInfo.value.page.limit = page.value.limit;
518 }).then(() => { 212 tableInfo.value.page.curr = page.value.curr;
519 const guids = [currTableData.value.guid]; 213 getTableData();
520 listingDelete(guids).then((res: any) => { 214 } else {
521 if (res.code == proxy.$passCode) { 215
522 getFirstPageData(); 216 }
523 ElMessage({
524 type: "success",
525 message: "删除成功",
526 });
527 } else {
528 ElMessage({
529 type: "error",
530 message: res.msg,
531 });
532 }
533 }).catch((res) => {
534 tableInfo.value.loading = false;
535 });
536 });
537 }; 217 };
538 218
539 const getFirstPageData = () => { 219 // 获取元数据表格
540 page.value.curr = 1 220 const getMetaTableData = () => {
541 tableInfo.value.page.curr = 1; 221 getMetaTableCollectList({}).then((res: any) => {
542 getTableData(); 222 metadataTableInfo.value.loading = false;
223 if (res.code == proxy.$passCode) {
224 const data = res.data.records || [];
225 metadataTableInfo.value.data = data;
226 if (route.query.type === 'edit') {
227 nextTick(() => {
228 data.map((row) => {
229 taskDetail.value.metaGuids.indexOf(row.guid) > -1 && metadataTableRef.value.tableRef.toggleRowSelection(row, true);
230 });
231 })
232 }
233 }
234 })
543 } 235 }
544 236
545 const querySearch = (queryString: string) => { 237 const querySearch = (queryString: string) => {
...@@ -557,11 +249,73 @@ const btnClick = async (btn, bType = null) => { ...@@ -557,11 +249,73 @@ const btnClick = async (btn, bType = null) => {
557 step.value++; 249 step.value++;
558 } else if (type == 'prev') { 250 } else if (type == 'prev') {
559 step.value--; 251 step.value--;
252 } else if (type == 'path') {
253 if (selectRowData.value.length == 0) {
254 ElMessage({
255 type: 'warning',
256 message: '请选择元数据'
257 })
258 return
259 }
260 const formEl = taskFormRef.value.ruleFormRef;
261 const form = taskFormRef.value.formInline;
262 const subForm = { ...form };
263 submitForm(formEl, subForm);
560 } else { 264 } else {
561 toPath() 265 toPath()
562 } 266 }
563 }; 267 };
564 268
269 const submitForm = (formEl, info) => {
270 if (!formEl) return;
271 formEl.validate((valid, fields) => {
272 if (valid) {
273 const params = {
274 classifyGuid: templateInfo.value.guid,
275 metaGuids: selectRowData.value,
276 ...info
277 }
278 if (route.query.type === 'edit') {
279 params.guid = taskDetail.value.guid;
280 params.execGuid = taskDetail.value.execGuid;
281 cgTaskUpdate(params).then((res: any) => {
282 if (res.code == proxy.$passCode) {
283 toPath()
284 } else {
285 ElMessage({
286 type: "error",
287 message: res.msg,
288 });
289 }
290 }).catch(() => {
291 ElMessage({
292 type: "error",
293 message: '请求失败',
294 });
295 })
296 } else {
297 cgTaskSave(params).then((res: any) => {
298 if (res.code == proxy.$passCode) {
299 toPath()
300 } else {
301 ElMessage({
302 type: "error",
303 message: res.msg,
304 });
305 }
306 }).catch(() => {
307 ElMessage({
308 type: "error",
309 message: '请求失败',
310 });
311 })
312 }
313 } else {
314 console.log("error submit!", fields);
315 }
316 });
317 };
318
565 // 监听滚动事件 319 // 监听滚动事件
566 const handleScroll = () => { 320 const handleScroll = () => {
567 if (listPage.value.curr < listPage.value.totalPages) { 321 if (listPage.value.curr < listPage.value.totalPages) {
...@@ -570,40 +324,80 @@ const handleScroll = () => { ...@@ -570,40 +324,80 @@ const handleScroll = () => {
570 } 324 }
571 } 325 }
572 326
573 const changTable = () => { 327 // 点击分类列表
574 // toSearch({}) 328 const listClick = (row) => {
329 templateInfo.value = row;
330 getClassifyTree()
575 }; 331 };
576 332
577 const getPermissionList = (val, init = false) => { 333 // 获取分类列表
334 const getPermissionList = (val, init = true) => {
578 let params: any = val ? { ...val } : {} 335 let params: any = val ? { ...val } : {}
579 params.pageIndex = listPage.value.curr; 336 params.pageIndex = listPage.value.curr;
580 params.pageSize = listPage.value.limit; 337 params.pageSize = listPage.value.limit;
338 params.type = 'C';
581 listLoading.value = true 339 listLoading.value = true
582 // getPermissionDictList(params).then((res: any) => { 340 getClassifyGradList(params).then((res: any) => {
583 // if (res.code == proxy.$passCode) { 341 if (res.code == proxy.$passCode) {
584 // const data = res.data?.records || [] 342 const data = res.data?.records || []
585 // if (init) { 343 if (init) {
586 // permissionList.value = JSON.parse(JSON.stringify(data)) 344 permissionList.value = JSON.parse(JSON.stringify(data))
587 // currpermissionList.value = JSON.parse(JSON.stringify(data)) 345 currpermissionList.value = JSON.parse(JSON.stringify(data))
588 // listPage.value.totalPages = res.data.totalPages 346 listPage.value.totalPages = res.data.totalPages
589 // toSearch({}) 347 if (data.length) {
590 // } else { 348 if (route.query.type == 'edit') {
591 // permissionList.value.push(...JSON.parse(JSON.stringify(data))) 349 templateInfo.value = data.filter(item => item.guid == taskDetail.value.classifyGuid)[0]
592 // querySearch(asideSearchInput.value) 350 } else {
593 // } 351 templateInfo.value = data[0];
594 // } 352 }
595 // listLoading.value = false 353 getClassifyTree()
596 // }).catch(() => { 354 }
597 // listLoading.value = false 355 } else {
598 // }) 356 permissionList.value.push(...JSON.parse(JSON.stringify(data)))
357 querySearch(asideSearchInput.value)
358 }
359 }
360 listLoading.value = false
361 }).catch(() => {
362 listLoading.value = false
363 })
599 } 364 }
600 365
601 onActivated(() => { 366 // 获取树形列表
367 const getClassifyTree = () => {
368 const params = {
369 classifyGradeGuid: templateInfo.value.guid
370 }
371 treeInfo.value.loading = true;
372 getClassifyTreeList(params).then((res: any) => {
373 treeInfo.value.loading = false;
374 if (res.code == proxy.$passCode) {
375 const data = res.data || [];
376 treeInfo.value.data = data;
377 treeInfoRef.value.setCurrentKey('');
378 tableInfo.value.data = [];
379 }
380 }).catch(() => {
381 treeInfo.value.loading = false;
382 })
383 }
602 384
385 onActivated(() => {
386 // if (route.query.type == 'edit') {
387 // getTaskDetail({ guid: route.query.guid })
388 // } else {
389 // getPermissionList({});
390 // getMetaTableData();
391 // }
603 }) 392 })
604 393
605 onBeforeMount(() => { 394 onBeforeMount(() => {
606 395 if (route.query.type == 'edit') {
396 getTaskDetail({ guid: route.query.guid })
397 } else {
398 getPermissionList({});
399 getMetaTableData();
400 }
607 }) 401 })
608 402
609 </script> 403 </script>
...@@ -618,46 +412,38 @@ onBeforeMount(() => { ...@@ -618,46 +412,38 @@ onBeforeMount(() => {
618 </div> 412 </div>
619 <div class="aside_list" v-loading="listLoading" v-infinite-scroll="handleScroll"> 413 <div class="aside_list" v-loading="listLoading" v-infinite-scroll="handleScroll">
620 <div class="list_item" v-for="(item, i) in currpermissionList" :class="{ active: selectIndex == i }" 414 <div class="list_item" v-for="(item, i) in currpermissionList" :class="{ active: selectIndex == i }"
621 @click="selectIndex = i; changTable();" v-preReClick>{{ item.dataPermissionName }}</div> 415 @click="selectIndex = i; listClick(item);" v-preReClick>{{ item.name }}</div>
622 </div> 416 </div>
623 </div> 417 </div>
624 <div class="main_wrap" :class="{ full: step == 1 }"> 418 <div class="main_wrap" :class="{ full: step == 1 }">
625 <div class="content_main" v-show="step == 0"> 419 <div class="content_main" v-show="step == 0">
626 <div class="template_panel"> 420 <div class="template_panel">
627 <div class="panel_title"> 421 <div class="title_item">
628 <span class="title_text">{{ templateInfo.title }}</span> 422 <span class="title_label">分类标准:</span>
629 <div class="title_desc"> 423 <span class="title_text">{{ templateInfo.name || '--' }}</span>
630 <div class="desc_group" v-for="desc in templateInfo.descGroup">
631 <span class="desc_label">{{ desc.label }}</span>
632 <span class="desc_value">{{ desc.value }}</span>
633 </div>
634 </div>
635 </div> 424 </div>
636 <div class="panel_tags"> 425 <div class="title_item">
637 <el-tag v-for="tag in templateInfo.tags" :type="tag.type">{{ tag.name }}</el-tag> 426 <span class="title_label">分级标准:</span>
427 <span class="title_text">{{ templateInfo.refGradeName || '--' }}</span>
428 </div>
429 <div class="title_item is_block">
430 <span class="title_label">描述:</span>
431 <span class="title_text">{{ templateInfo.description || '--' }}</span>
638 </div> 432 </div>
639 <p class="panel_desc">{{ templateInfo.desc }}</p>
640 </div> 433 </div>
641 <div class="panel_content"> 434 <div class="panel_content">
642 <div class="box_left"> 435 <div class="box_left">
643 <div class="aside_title">分类分级目录</div> 436 <Tree ref="treeInfoRef" :treeInfo="treeInfo" @nodeClick="nodeClick" />
644 <Tree :treeInfo="treeInfo" @nodeClick="nodeClick" />
645 </div> 437 </div>
646 <div class="box_right"> 438 <div class="box_right">
647 <el-breadcrumb separator="/">
648 <el-breadcrumb-item>全部</el-breadcrumb-item>
649 <el-breadcrumb-item>promotion management</el-breadcrumb-item>
650 <el-breadcrumb-item>promotion list</el-breadcrumb-item>
651 <el-breadcrumb-item>promotion detail</el-breadcrumb-item>
652 </el-breadcrumb>
653 <div class="table_panel_wrap"> 439 <div class="table_panel_wrap">
654 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 440 <Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" />
655 </div> 441 </div>
656 </div> 442 </div>
657 </div> 443 </div>
658 </div> 444 </div>
659 <div class="content_main panel" v-show="step == 1"> 445 <div class="content_main panel" v-show="step == 1">
660 <ContentWrap id="id-approveInfo" title="创建任务" expandSwicth style="margin-top: 15px" :isExpand="expand1" 446 <ContentWrap title="创建任务" expandSwicth style="margin-top: 15px" :isExpand="expand1"
661 @expand="(v) => expand1 = v"> 447 @expand="(v) => expand1 = v">
662 <div class="form_panel"> 448 <div class="form_panel">
663 <Form ref="taskFormRef" formId="edit-standard-form" :itemList="taskFormItems" :rules="taskFormRules" 449 <Form ref="taskFormRef" formId="edit-standard-form" :itemList="taskFormItems" :rules="taskFormRules"
...@@ -666,7 +452,9 @@ onBeforeMount(() => { ...@@ -666,7 +452,9 @@ onBeforeMount(() => {
666 </ContentWrap> 452 </ContentWrap>
667 <ContentWrap id="id-approveInfo" title="选择元数据" expandSwicth style="margin-top: 15px" :isExpand="expand2" 453 <ContentWrap id="id-approveInfo" title="选择元数据" expandSwicth style="margin-top: 15px" :isExpand="expand2"
668 @expand="(v) => expand2 = v"> 454 @expand="(v) => expand2 = v">
669 <Table :tableInfo="metadataTableInfo" /> 455 <div class="table_panel_wrap full">
456 <Table ref="metadataTableRef" :tableInfo="metadataTableInfo" @tableSelectionChange="tableSelectionChange" />
457 </div>
670 </ContentWrap> 458 </ContentWrap>
671 </div> 459 </div>
672 <div class="tool_btns"> 460 <div class="tool_btns">
...@@ -746,42 +534,38 @@ onBeforeMount(() => { ...@@ -746,42 +534,38 @@ onBeforeMount(() => {
746 } 534 }
747 535
748 .template_panel { 536 .template_panel {
749 padding: 0 8px; 537 display: flex;
538 flex-wrap: wrap;
539 padding: 16px 16px 8px;
750 540
751 .panel_title { 541 .title_item {
752 display: flex; 542 display: flex;
753 justify-content: space-between; 543 margin-bottom: 8px;
754 align-items: center;
755 margin: 8px 0;
756 544
757 .title_text { 545 +.title_item {
758 font-size: 16px; 546 margin-left: 40px;
759 color: #212121;
760 line-height: 24px;
761 font-weight: 600;
762 } 547 }
763 548
764 .title_desc { 549 .title_label {
765 display: flex; 550 display: block;
766 551 width: 80px;
767 .desc_group { 552 line-height: 1.5;
768 margin-left: 16px;
769 }
770 } 553 }
771 }
772 554
773 .panel_tags { 555 .title_text {
774 .el-tag { 556 line-height: 1.5;
775 margin-right: 8px;
776 } 557 }
777 }
778 558
779 .panel_desc { 559 &.is_block {
780 margin: 8px 0 16px; 560 width: 100%;
781 font-size: 14px; 561 margin-left: 0;
782 color: #666; 562
783 line-height: 1.5; 563 .title_text {
784 text-align: justify; 564 display: block;
565 width: calc(100% - 80px);
566 text-align: justify;
567 }
568 }
785 } 569 }
786 } 570 }
787 571
...@@ -806,12 +590,13 @@ onBeforeMount(() => { ...@@ -806,12 +590,13 @@ onBeforeMount(() => {
806 } 590 }
807 591
808 .tree_panel { 592 .tree_panel {
809 padding: 0; 593 height: 100%;
810 } 594 }
811 } 595 }
812 596
813 .box_right { 597 .box_right {
814 width: 100%; 598 width: calc(100% - 240px);
599 padding-top: 8px;
815 600
816 .el-breadcrumb { 601 .el-breadcrumb {
817 padding: 0 12px; 602 padding: 0 12px;
...@@ -820,10 +605,26 @@ onBeforeMount(() => { ...@@ -820,10 +605,26 @@ onBeforeMount(() => {
820 } 605 }
821 } 606 }
822 607
608 :deep(#id-approveInfo) {
609 height: calc(100% - 192px);
610
611 .el-card__body {
612 height: calc(100% - 50px) !important;
613
614 .card-body-content {
615 height: 100%;
616 }
617 }
618 }
619
823 .table_panel_wrap { 620 .table_panel_wrap {
824 width: 100%; 621 width: 100%;
825 height: calc(100% - 40px); 622 height: 100%;
826 padding: 0 12px; 623 padding: 0 12px;
624
625 &.full {
626 padding: 0;
627 }
827 } 628 }
828 } 629 }
829 630
......
...@@ -9,329 +9,17 @@ import useUserStore from "@/store/modules/user"; ...@@ -9,329 +9,17 @@ import useUserStore from "@/store/modules/user";
9 import { ElMessage, ElMessageBox } from "element-plus"; 9 import { ElMessage, ElMessageBox } from "element-plus";
10 10
11 import useDataAssetStore from "@/store/modules/dataAsset"; 11 import useDataAssetStore from "@/store/modules/dataAsset";
12 import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList } from "@/api/modules/dataProduct"; 12 import { getTaskExecPageList, filterVal } from "@/api/modules/dataInventory";
13 import { TableColumnWidth } from '@/utils/enum'; 13 import { TableColumnWidth } from '@/utils/enum';
14 14
15 import Table from "@/components/Table/index.vue";
16
17 const { proxy } = getCurrentInstance() as any; 15 const { proxy } = getCurrentInstance() as any;
18 const router = useRouter(); 16 const router = useRouter();
17 const route = useRoute();
19 const userStore = useUserStore(); 18 const userStore = useUserStore();
20 const userData = JSON.parse(userStore.userData); 19 const userData = JSON.parse(userStore.userData);
21 const assetStore = useDataAssetStore(); 20 const assetStore = useDataAssetStore();
22 const datas = [
23 {
24 "updateTime": "2024-07-16 13:17:00",
25 "updateUserName": "数往知来管理员",
26 "guid": "4e0e76c48fa043d5b35d09f3ccc7c265",
27 "approvalGuid": null,
28 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
29 "fieldStandardCode": "COL202406070021",
30 "dataVersion": 1,
31 "chName": "地址",
32 "enName": "address",
33 "dataTypeValue": "字符型",
34 "dataTypeCode": "varchar",
35 "dataDicGuid": "",
36 "dataDicName": null,
37 "isDataDic": "N",
38 "fieldLength": 600,
39 "fieldPrecision": null,
40 "dataState": 0,
41 "approveState": "N",
42 "dataCategory": "合伙人",
43 "dataEncryptionLevel": "界面加密",
44 "businessDefDesc": "地址",
45 "flowFlag": null,
46 "flowCode": null,
47 "functionCode": null,
48 "createStaffGuid": null,
49 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
50 "displayVersion": "V1",
51 "standardSetName": null,
52 "ruleType": null
53 },
54 {
55 "updateTime": "2024-01-27 10:19:45",
56 "updateUserName": "数往知来管理员",
57 "guid": "bc630207357c466dbff7613ea38985cc",
58 "approvalGuid": null,
59 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
60 "fieldStandardCode": "COL202401260124",
61 "dataVersion": 1,
62 "chName": "包含最小销售包装单元数量",
63 "enName": "inboxQuantity",
64 "dataTypeValue": "整型",
65 "dataTypeCode": "int",
66 "dataDicGuid": null,
67 "dataDicName": null,
68 "isDataDic": null,
69 "fieldLength": null,
70 "fieldPrecision": null,
71 "dataState": 1,
72 "approveState": "A",
73 "dataCategory": null,
74 "dataEncryptionLevel": "明文显示",
75 "businessDefDesc": "当前药品追溯码中包含的最小销售包装单元药品追溯码的数量,发货类型为03时可选",
76 "flowFlag": null,
77 "flowCode": null,
78 "functionCode": null,
79 "createStaffGuid": null,
80 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
81 "displayVersion": "V1",
82 "standardSetName": null,
83 "ruleType": null
84 },
85 {
86 "updateTime": "2024-01-27 11:03:59",
87 "updateUserName": "审批人4",
88 "guid": "420f2a68bd4441bf92010eadf698b685",
89 "approvalGuid": null,
90 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
91 "fieldStandardCode": "COL202401260122",
92 "dataVersion": 1,
93 "chName": "包装层级",
94 "enName": "packageLevel",
95 "dataTypeValue": "字符型",
96 "dataTypeCode": "varchar",
97 "dataDicGuid": null,
98 "dataDicName": null,
99 "isDataDic": null,
100 "fieldLength": 200,
101 "fieldPrecision": null,
102 "dataState": 1,
103 "approveState": "A",
104 "dataCategory": null,
105 "dataEncryptionLevel": "明文显示",
106 "businessDefDesc": "当前药品追溯码所处包装层级描述,发货类型为03时可选",
107 "flowFlag": null,
108 "flowCode": null,
109 "functionCode": null,
110 "createStaffGuid": null,
111 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
112 "displayVersion": "V1",
113 "standardSetName": null,
114 "ruleType": null
115 },
116 {
117 "updateTime": "2024-06-06 10:01:06",
118 "updateUserName": "审批人1",
119 "guid": "f841e1848ab94b1e81a0217a09a7a3d3",
120 "approvalGuid": "b674bffe8d2f4132918016b6baaf75aa",
121 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
122 "fieldStandardCode": "COL202401260120",
123 "dataVersion": 1,
124 "chName": "上一级包装药品追溯码",
125 "enName": "parentDTC",
126 "dataTypeValue": "字符型",
127 "dataTypeCode": "varchar",
128 "dataDicGuid": "",
129 "dataDicName": null,
130 "isDataDic": "N",
131 "fieldLength": 200,
132 "fieldPrecision": null,
133 "dataState": 1,
134 "approveState": "Y",
135 "dataCategory": "",
136 "dataEncryptionLevel": "明文显示",
137 "businessDefDesc": "当前药品追溯码大一级包装上的药品追溯码,发货类型为03时可选;当存在上一级包装时必选",
138 "flowFlag": null,
139 "flowCode": null,
140 "functionCode": null,
141 "createStaffGuid": null,
142 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
143 "displayVersion": "V1",
144 "standardSetName": null,
145 "ruleType": null
146 },
147 {
148 "updateTime": "2024-01-26 00:10:47",
149 "updateUserName": "数往知来管理员",
150 "guid": "d4d42dea2a5844b4a7f9238806ea507b",
151 "approvalGuid": null,
152 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
153 "fieldStandardCode": "COL202401260118",
154 "dataVersion": 1,
155 "chName": "药品追溯码",
156 "enName": "DTC",
157 "dataTypeValue": "字符型",
158 "dataTypeCode": "varchar",
159 "dataDicGuid": null,
160 "dataDicName": null,
161 "isDataDic": null,
162 "fieldLength": 200,
163 "fieldPrecision": null,
164 "dataState": 0,
165 "approveState": "N",
166 "dataCategory": null,
167 "dataEncryptionLevel": "明文显示",
168 "businessDefDesc": "用于唯一标识药品各级销售包装单元的代码,发货类型为03时可选",
169 "flowFlag": null,
170 "flowCode": null,
171 "functionCode": null,
172 "createStaffGuid": null,
173 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
174 "displayVersion": "V1",
175 "standardSetName": null,
176 "ruleType": null
177 },
178 {
179 "updateTime": "2024-01-26 00:10:47",
180 "updateUserName": "数往知来管理员",
181 "guid": "ff9d0e4f6fbb444c8dcf6f67bffcb659",
182 "approvalGuid": null,
183 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
184 "fieldStandardCode": "COL202401260116",
185 "dataVersion": 1,
186 "chName": "发货数量",
187 "enName": "deliveryQuantity",
188 "dataTypeValue": "整型",
189 "dataTypeCode": "int",
190 "dataDicGuid": null,
191 "dataDicName": null,
192 "isDataDic": null,
193 "fieldLength": null,
194 "fieldPrecision": null,
195 "dataState": 0,
196 "approveState": "N",
197 "dataCategory": null,
198 "dataEncryptionLevel": "明文显示",
199 "businessDefDesc": "发货的最小销售包装单元数量",
200 "flowFlag": null,
201 "flowCode": null,
202 "functionCode": null,
203 "createStaffGuid": null,
204 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
205 "displayVersion": "V1",
206 "standardSetName": null,
207 "ruleType": null
208 },
209 {
210 "updateTime": "2024-01-26 00:10:46",
211 "updateUserName": "数往知来管理员",
212 "guid": "fe88ac9e8d9c4f148833dbb3976fca77",
213 "approvalGuid": null,
214 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
215 "fieldStandardCode": "COL202401260114",
216 "dataVersion": 1,
217 "chName": "药品生产批号",
218 "enName": "batch",
219 "dataTypeValue": "字符型",
220 "dataTypeCode": "varchar",
221 "dataDicGuid": null,
222 "dataDicName": null,
223 "isDataDic": null,
224 "fieldLength": 20,
225 "fieldPrecision": null,
226 "dataState": 0,
227 "approveState": "N",
228 "dataCategory": null,
229 "dataEncryptionLevel": "明文显示",
230 "businessDefDesc": "药品包装上标示的生产批号",
231 "flowFlag": null,
232 "flowCode": null,
233 "functionCode": null,
234 "createStaffGuid": null,
235 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
236 "displayVersion": "V1",
237 "standardSetName": null,
238 "ruleType": null
239 },
240 {
241 "updateTime": "2024-01-26 00:10:45",
242 "updateUserName": "数往知来管理员",
243 "guid": "9759837e0d72472ab7441c1873c9159a",
244 "approvalGuid": null,
245 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
246 "fieldStandardCode": "COL202401260112",
247 "dataVersion": 1,
248 "chName": "药品有效期截止日期",
249 "enName": "expirationDate",
250 "dataTypeValue": "日期型",
251 "dataTypeCode": "date",
252 "dataDicGuid": null,
253 "dataDicName": null,
254 "isDataDic": null,
255 "fieldLength": null,
256 "fieldPrecision": null,
257 "dataState": 0,
258 "approveState": "N",
259 "dataCategory": null,
260 "dataEncryptionLevel": "明文显示",
261 "businessDefDesc": "药品有效期的截止日期",
262 "flowFlag": null,
263 "flowCode": null,
264 "functionCode": null,
265 "createStaffGuid": null,
266 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
267 "displayVersion": "V1",
268 "standardSetName": null,
269 "ruleType": null
270 },
271 {
272 "updateTime": "2024-01-26 00:10:45",
273 "updateUserName": "数往知来管理员",
274 "guid": "a39ed6123c6a420d9d1265315e714f86",
275 "approvalGuid": null,
276 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
277 "fieldStandardCode": "COL202401260110",
278 "dataVersion": 1,
279 "chName": "药品生产日期",
280 "enName": "productionDate",
281 "dataTypeValue": "日期型",
282 "dataTypeCode": "date",
283 "dataDicGuid": null,
284 "dataDicName": null,
285 "isDataDic": null,
286 "fieldLength": null,
287 "fieldPrecision": null,
288 "dataState": 0,
289 "approveState": "N",
290 "dataCategory": null,
291 "dataEncryptionLevel": "明文显示",
292 "businessDefDesc": "药品包装上标示的生产日期",
293 "flowFlag": null,
294 "flowCode": null,
295 "functionCode": null,
296 "createStaffGuid": null,
297 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
298 "displayVersion": "V1",
299 "standardSetName": null,
300 "ruleType": null
301 },
302 {
303 "updateTime": "2024-01-26 00:10:45",
304 "updateUserName": "数往知来管理员",
305 "guid": "ea597c1b8bb24a5ab053a80b084de98c",
306 "approvalGuid": null,
307 "standardSetGuid": "58d1178a04904d599284fc1e61594c43",
308 "fieldStandardCode": "COL202401260108",
309 "dataVersion": 1,
310 "chName": "统一社会信用代码(进口药品代理企业)",
311 "enName": "drugImporterUSCID",
312 "dataTypeValue": "字符型",
313 "dataTypeCode": "varchar",
314 "dataDicGuid": null,
315 "dataDicName": null,
316 "isDataDic": null,
317 "fieldLength": 18,
318 "fieldPrecision": null,
319 "dataState": 0,
320 "approveState": "N",
321 "dataCategory": null,
322 "dataEncryptionLevel": "明文显示",
323 "businessDefDesc": "进口药品代理企业的统一社会信用代码,进口药品必选;没有统一社会信用代码时使用组织机构代码",
324 "flowFlag": null,
325 "flowCode": null,
326 "functionCode": null,
327 "createStaffGuid": null,
328 "createUserId": "98df01b8d86c46f786dd10b4d0eb11dd",
329 "displayVersion": "V1",
330 "standardSetName": null,
331 "ruleType": null
332 }
333 ]
334 21
22 const loading = ref(false);
335 const page = ref({ 23 const page = ref({
336 limit: 50, 24 limit: 50,
337 curr: 1, 25 curr: 1,
...@@ -349,30 +37,32 @@ const tableInfo = ref({ ...@@ -349,30 +37,32 @@ const tableInfo = ref({
349 id: "mapping-table", 37 id: "mapping-table",
350 fields: [ 38 fields: [
351 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 39 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
352 { label: "任务名称", field: "chName", width: 96 }, 40 { label: "任务名称", field: "taskName", width: 96 },
353 { 41 {
354 label: "目录名称", field: "dataTypeValue", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => { 42 label: "目录名称", field: "cgDirName", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => {
355 router.push({ 43 router.push({
356 name: "templateConfig", 44 name: "templateConfig",
357 query: { guid: scope.row.damGuid }, 45 query: { guid: scope.row.damGuid },
358 }); 46 });
359 } 47 }
360 }, 48 },
361 { label: "分类分级模板", field: "dataTypeValue", width: 200 }, 49 {
362 { label: "元数据", field: "fieldStandardCode", width: 200 }, 50 label: "元数据", field: "metaNames", width: 200, getName: (scope) => {
363 { label: "任务修改人", field: "dataCategory", width: 120 }, 51 const metaNames = scope.row.metaNames || [];
52 return metaNames.join(',');
53 }
54 },
55 { label: "任务修改人", field: "updateUserName", width: 120 },
364 { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME }, 56 { label: "修改时间", field: "updateTime", width: TableColumnWidth.DATETIME },
365 { label: "确认次数", field: "fieldLength", width: 96, align: 'right' }, 57 { label: "结果确认人", field: "confirmUserName", width: 120 },
366 { label: "结果确认人", field: "updateUserName", width: 120 }, 58 { label: "确认时间", field: "confirmTime", width: TableColumnWidth.DATETIME },
367 { label: "确认时间", field: "updateTime", width: TableColumnWidth.DATETIME },
368 { 59 {
369 label: "结果状态", field: "approveState", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 60 label: "结果状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
370 return filterVal(scope.row.approveState, 'approveState'); 61 return filterVal(scope.row.status, 'confirmStatus');
371 } 62 }
372 }, 63 },
373 ], 64 ],
374 loading: false, 65 data: [],
375 data: datas || [],
376 page: { 66 page: {
377 type: "normal", 67 type: "normal",
378 rows: 0, 68 rows: 0,
...@@ -386,40 +76,30 @@ const tableInfo = ref({ ...@@ -386,40 +76,30 @@ const tableInfo = ref({
386 let row = scope.row, btnArr: any = [ 76 let row = scope.row, btnArr: any = [
387 { label: "查看结果", value: "path" }, 77 { label: "查看结果", value: "path" },
388 ]; 78 ];
389 // if (row.approveState == 'Y') {
390 // if (row.listingStatus == 'Y') {
391 // btnArr.splice(0, 0, { label: "详情", value: "detail" });
392 // } else {
393 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
394 // }
395 // } else {
396 // if (row.approveState == 'A') {
397 // btnArr.splice(0, 0, { label: "详情", value: "detail" });
398 // } else {
399 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
400 // }
401 // }
402 return btnArr; 79 return btnArr;
403 }, 80 },
404 }, 81 },
405 }); 82 });
406 83
407 const getTableData = () => { 84 const getTableData = () => {
408 tableInfo.value.loading = true; 85 loading.value = true;
409 getListingList( 86 getTaskExecPageList(
410 Object.assign({}, searchItemValue.value, { 87 Object.assign({}, searchItemValue.value, {
411 pageIndex: page.value.curr, 88 pageIndex: page.value.curr,
412 pageSize: page.value.limit, 89 pageSize: page.value.limit,
90 taskGuid: route.query.guid
413 }) 91 })
414 ).then((res: any) => { 92 ).then((res: any) => {
415 tableInfo.value.loading = false; 93 loading.value = false;
416 tableInfo.value.data = res.data.records || []; 94 if (res.code == proxy.$passCode) {
417 tableInfo.value.page.curr = res.data.pageIndex; 95 tableInfo.value.data = res.data.records || [];
418 tableInfo.value.page.limit = res.data.pageSize; 96 tableInfo.value.page.curr = res.data.pageIndex;
419 tableInfo.value.page.rows = res.data.totalRows; 97 tableInfo.value.page.limit = res.data.pageSize;
98 tableInfo.value.page.rows = res.data.totalRows;
99 }
420 }) 100 })
421 .catch((res) => { 101 .catch((res) => {
422 tableInfo.value.loading = false; 102 loading.value = false;
423 }); 103 });
424 }; 104 };
425 105
...@@ -429,8 +109,6 @@ const tableBtnClick = (scope, btn) => { ...@@ -429,8 +109,6 @@ const tableBtnClick = (scope, btn) => {
429 currTableData.value = row; 109 currTableData.value = row;
430 if (type == "path") { 110 if (type == "path") {
431 toPath(type); 111 toPath(type);
432 } else if (type === "delete") {
433 open("此操作将永久删除,是否继续?", "warning");
434 } 112 }
435 }; 113 };
436 114
...@@ -453,32 +131,6 @@ const tablePageChange = (info) => { ...@@ -453,32 +131,6 @@ const tablePageChange = (info) => {
453 getTableData(); 131 getTableData();
454 }; 132 };
455 133
456 const open = (msg, type, isBatch = false) => {
457 ElMessageBox.confirm(msg, "提示", {
458 confirmButtonText: "确定",
459 cancelButtonText: "取消",
460 type: type,
461 }).then(() => {
462 const guids = [currTableData.value.guid];
463 listingDelete(guids).then((res: any) => {
464 if (res.code == proxy.$passCode) {
465 getFirstPageData();
466 ElMessage({
467 type: "success",
468 message: "删除成功",
469 });
470 } else {
471 ElMessage({
472 type: "error",
473 message: res.msg,
474 });
475 }
476 }).catch((res) => {
477 tableInfo.value.loading = false;
478 });
479 });
480 };
481
482 const getFirstPageData = () => { 134 const getFirstPageData = () => {
483 page.value.curr = 1 135 page.value.curr = 1
484 tableInfo.value.page.curr = 1; 136 tableInfo.value.page.curr = 1;
...@@ -486,10 +138,7 @@ const getFirstPageData = () => { ...@@ -486,10 +138,7 @@ const getFirstPageData = () => {
486 } 138 }
487 139
488 onActivated(() => { 140 onActivated(() => {
489 if (assetStore.isRefresh) {//如果是首次加载,则不需要调用 141 getFirstPageData()
490 getFirstPageData();
491 assetStore.set(false);
492 }
493 }) 142 })
494 143
495 onBeforeMount(() => { 144 onBeforeMount(() => {
...@@ -499,18 +148,13 @@ onBeforeMount(() => { ...@@ -499,18 +148,13 @@ onBeforeMount(() => {
499 </script> 148 </script>
500 149
501 <template> 150 <template>
502 <div class="container_wrap" v-if="tableInfo.data.length"> 151 <div class="container_wrap" v-loading="loading">
503 <div class="table_tool_wrap"> 152 <div class="table_panel_wrap" v-if="tableInfo.data.length">
504 <div class="table_title">分类分级任务</div>
505 </div>
506 <div class="table_panel_wrap">
507 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 153 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
508 </div> 154 </div>
509 </div> 155 <div class="card-noData" v-else>
510 <div class="container_wrap" v-else>
511 <div class="card-noData">
512 <img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" /> 156 <img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
513 <p>暂无分类分级任务<span class="text_btn" @click="toPath('add')">去新建</span></p> 157 <p>暂无分类分级任务日志记录</p>
514 </div> 158 </div>
515 </div> 159 </div>
516 </template> 160 </template>
...@@ -532,7 +176,7 @@ onBeforeMount(() => { ...@@ -532,7 +176,7 @@ onBeforeMount(() => {
532 176
533 .table_panel_wrap { 177 .table_panel_wrap {
534 width: 100%; 178 width: 100%;
535 height: calc(100% - 40px); 179 height: 100%;
536 padding: 0px 8px 0; 180 padding: 0px 8px 0;
537 } 181 }
538 182
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!