abc5146e by lxs

分类分级任务联调

1 parent d9e56607
...@@ -277,8 +277,8 @@ export const cgTaskDelete = (data) => request({ ...@@ -277,8 +277,8 @@ export const cgTaskDelete = (data) => request({
277 // 手动执行任务 277 // 手动执行任务
278 export const runExecTask = (data) => request({ 278 export const runExecTask = (data) => request({
279 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/exec-task`, 279 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task/exec-task`,
280 method: 'put', 280 method: 'post',
281 data 281 params: data
282 }) 282 })
283 283
284 // 分类分级任务日志 284 // 分类分级任务日志
...@@ -288,6 +288,47 @@ export const getTaskExecPageList = (data) => request({ ...@@ -288,6 +288,47 @@ export const getTaskExecPageList = (data) => request({
288 data 288 data
289 }) 289 })
290 290
291 // 分类分级任务执行树形数据
292 export const getTaskExeTreeList = (data) => request({
293 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec/classify/tree-list`,
294 method: 'get',
295 params: data
296 })
297
298 // 分类分级任务执行字段统计
299 export const getTaskFieldCount = (data) => request({
300 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field-cnt`,
301 method: 'get',
302 params: data
303 })
304
305 // 分类分级任务执行字段查询
306 export const execTaskFieldList = (data) => request({
307 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field-list-query`,
308 method: 'post',
309 data
310 })
311 // 分类分级任务执行库表查询
312 export const execTaskSheetList = (data) => request({
313 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-db-list-query`,
314 method: 'post',
315 data
316 })
317
318 // 分类分级任务执行任务确认
319 export const execTaskConfirm = (data) => request({
320 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-task`,
321 method: 'post',
322 data
323 })
324
325 // 分类分级任务执行字段确认
326 export const execFieldConfirm = (data) => request({
327 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-task-exec-result/confirm-field`,
328 method: 'post',
329 data
330 })
331
291 // 标签规则-分页 332 // 标签规则-分页
292 export const getCgLabelPageList = (data) => request({ 333 export const getCgLabelPageList = (data) => request({
293 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/page-list`, 334 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-label/page-list`,
...@@ -334,6 +375,18 @@ export const filterVal = (val, type) => { ...@@ -334,6 +375,18 @@ export const filterVal = (val, type) => {
334 status = '--'; 375 status = '--';
335 break; 376 break;
336 } 377 }
378 } else if(type == 'isCgChange'){
379 switch (val) {
380 case 'N':
381 status = '待确认';
382 break;
383 case 'Y':
384 status = '已确认';
385 break;
386 default:
387 status = '待确认';
388 break;
389 }
337 } 390 }
338 return status; 391 return status;
339 } 392 }
......
...@@ -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,
...@@ -19,6 +29,7 @@ const props = defineProps({ ...@@ -19,6 +29,7 @@ const props = defineProps({
19 } 29 }
20 }) 30 })
21 const formRef = ref() 31 const formRef = ref()
32 const formCascaderRef = ref();
22 const formInline: any = computed(() => { 33 const formInline: any = computed(() => {
23 let items = setFormFields(props.itemList); 34 let items = setFormFields(props.itemList);
24 return reactive(items); 35 return reactive(items);
...@@ -34,9 +45,16 @@ const resetForm = (formEl: FormInstance | undefined) => { ...@@ -34,9 +45,16 @@ const resetForm = (formEl: FormInstance | undefined) => {
34 emits('tableSearch', form, true) 45 emits('tableSearch', form, true)
35 }) 46 })
36 } 47 }
48 const getCascaderCheckedData = () => {
49 const formCascader = formCascaderRef.value[0] || formCascaderRef.value;
50 const data = formCascader.getCheckedNodes();
51 return data;
52 };
53
37 defineExpose({ 54 defineExpose({
38 formInline, 55 formInline,
39 formRef 56 formRef,
57 getCascaderCheckedData
40 }) 58 })
41 const setFormFields = (list: any) => { 59 const setFormFields = (list: any) => {
42 let obj = {} 60 let obj = {}
...@@ -68,10 +86,13 @@ const selectChange = (val, row) => { ...@@ -68,10 +86,13 @@ const selectChange = (val, row) => {
68 const handleTreeSelectNodeChange = (node, item) => { 86 const handleTreeSelectNodeChange = (node, item) => {
69 emits("treeSelectNodeChange", node, item); 87 emits("treeSelectNodeChange", node, item);
70 } 88 }
71 const handleTreeSelectNodeClick = (node, item)=>{ 89 const handleTreeSelectNodeClick = (node, item) => {
72 emits("treeSelectNodeClick", node, item); 90 emits("treeSelectNodeClick", node, item);
73 } 91 }
74 const inputChange = (val)=>{ 92 const cascaderChange = (val, item) => {
93 emits("cascaderChange", val, item);
94 }
95 const inputChange = (val) => {
75 onSubmit() 96 onSubmit()
76 } 97 }
77 onMounted(() => { 98 onMounted(() => {
...@@ -86,58 +107,49 @@ onMounted(() => { ...@@ -86,58 +107,49 @@ onMounted(() => {
86 :class="{ 'width_auto': item.type == 'radio-button' }" :prop="item.field"> 107 :class="{ 'width_auto': item.type == 'radio-button' }" :prop="item.field">
87 <template v-if="item.type == 'select'"> 108 <template v-if="item.type == 'select'">
88 <el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]" 109 <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)"> 110 :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" /> 111 @change="(val) => selectChange(val, item)">
112 <el-option v-for="opt in item.options" :label="item.props?.label ? opt[item.props.label] : opt.label"
113 :value="item.props?.value ? opt[item.props.value] : opt.value" />
91 </el-select> 114 </el-select>
92 </template> 115 </template>
93 <template v-else-if="item.type == 'input-select'"> 116 <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 ?? ''" 117 <el-input v-model.trim="formInline[item.field]" :placeholder="item.placeholder" class="input-with-select"
95 :suffix-icon="Search"> 118 :maxlength="item.maxlength ?? ''" :suffix-icon="Search">
96 <template #prepend> 119 <template #prepend>
97 <span v-for="child in item.children"> 120 <span v-for="child in item.children">
98 <el-select v-model="formItemList[child.field]" :placeholder="child.placeholder" 121 <el-select v-model="formItemList[child.field]" :placeholder="child.placeholder"
99 :clearable="item.clearable" style="vertical-align: inherit;"> 122 :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" /> 123 <el-option v-for="opts in child.options"
124 :label="child.props?.label ? opts[item.props.label] : opts.label"
125 :value="child.props?.value ? opts[item.props.value] : opts.value" />
101 </el-select> 126 </el-select>
102 </span> 127 </span>
103 </template> 128 </template>
104 </el-input> 129 </el-input>
105 </template> 130 </template>
106 <template v-else-if="item.type=='tree-select'"> 131 <template v-else-if="item.type == 'tree-select'">
107 <div class="select_slots_panel"> 132 <div class="select_slots_panel">
108 <div class="slot-prefix" v-for="child in item.children"> 133 <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)" > 134 <el-select v-model="formInline[child.field]" :placeholder="child.placeholder"
135 @change="(val) => selectChange(val, child)">
110 <el-option v-for="cpt in child.options" :label="cpt.label" :value="cpt.value" /> 136 <el-option v-for="cpt in child.options" :label="cpt.label" :value="cpt.value" />
111 </el-select> 137 </el-select>
112 </div> 138 </div>
113 </div> 139 </div>
114 <div class="slot-default"> 140 <div class="slot-default">
115 <el-tree-select 141 <el-tree-select v-model="formInline[item.field]" :data="item.options" :placeholder="item.placeholder"
116 v-model="formInline[item.field]" 142 :clearable="item.clearable" :filterable="item.filterable" :disabled="item.disabled"
117 :data="item.options" 143 :lazy="item.lazy ?? true" :check-strictly="item.checkStrictly ?? false" :node-key="item.nodeKey ?? 'guid'"
118 :placeholder="item.placeholder" 144 :load="(node, resolve) => treeSelectLoad(node, resolve, item)" :props="item.props"
119 :clearable="item.clearable" 145 :multiple="item.multiple ?? false" :render-after-expand="true" :teleported="item.teleported ?? true"
120 :filterable="item.filterable" 146 :default-expanded-keys="item.expandKeys" :collapse-tags-tooltip="item.collapseTagsTooltip ?? false"
121 :disabled="item.disabled" 147 :collapse-tags="item.collapseTags ?? false" :max-collapse-tags="item.maxTags ?? 1"
122 :lazy="item.lazy ?? true" 148 :show-checkbox="item.showCheckbox ?? false" @change="(val) => selectChange(val, item)"
123 :check-strictly = "item.checkStrictly ?? false" 149 @current-change="(node) => handleTreeSelectNodeChange(node, item)"
124 :node-key="item.nodeKey ?? 'guid'" 150 @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 151
140 <!-- <template #default="{ node, data }"> 152 <!-- <template #default="{ node, data }">
141 <template v-if="item.getName"> 153 <template v-if="item.getName">
142 <div 154 <div
143 class="left-code" 155 class="left-code"
...@@ -153,10 +165,10 @@ onMounted(() => { ...@@ -153,10 +165,10 @@ onMounted(() => {
153 {{ item.getName(data, node) }} 165 {{ item.getName(data, node) }}
154 </div> 166 </div>
155 </template> 167 </template>
156 <span v-else>{{ data[item.props.label] }}</span> 168 <span v-else>{{ data[item.props.label] }}</span>
157 </template> --> 169 </template> -->
158 </el-tree-select> 170 </el-tree-select>
159 </div> 171 </div>
160 172
161 </template> 173 </template>
162 <template v-else-if="item.type == 'date-time'"> 174 <template v-else-if="item.type == 'date-time'">
...@@ -178,13 +190,21 @@ onMounted(() => { ...@@ -178,13 +190,21 @@ onMounted(() => {
178 <div class="slot-default"> 190 <div class="slot-default">
179 <el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]" 191 <el-select :class="{ 'is-multiple': item.multiple }" v-model="formInline[item.field]"
180 :placeholder="item.placeholder" :multiple="item.multiple" collapse-tags collapse-tags-tooltip 192 :placeholder="item.placeholder" :multiple="item.multiple" collapse-tags collapse-tags-tooltip
181 @change="(val) => selectChange(val, item)" 193 @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"> 194 :clearable="item.clearable" v-loadmore="loadMore">
183 <el-option v-for="opt in item.options" :label="opt.label" :value="opt.value" /> 195 <el-option v-for="opt in item.options" :label="opt.label" :value="opt.value" />
184 </el-select> 196 </el-select>
185 </div> 197 </div>
186 </div> 198 </div>
187 </template> 199 </template>
200 <template v-else-if="item.type == 'cascader'">
201 <el-cascader ref="formCascaderRef" :class="[item.col, { is_block: item.block }]"
202 v-model="formInline[item.field]" :options="item.options" :props="item.props" :placeholder="item.placeholder"
203 :show-all-levels="item.showAllLevels ?? true" :clearable="item.clearable"
204 :filterable="item.filterable ?? false" :collapse-tags="item.collapse ?? false"
205 :collapse-tags-tooltip="item.tagsTooltip ?? false" :max-collapse-tags="item.maxTags ?? 1"
206 :disabled="item.disabled ?? false" @change="(val) => cascaderChange(val, item)" />
207 </template>
188 <template v-else> 208 <template v-else>
189 <el-input v-model.trim="formInline[item.field]" :placeholder="item.placeholder" :clearable="item.clearable" 209 <el-input v-model.trim="formInline[item.field]" :placeholder="item.placeholder" :clearable="item.clearable"
190 @clear="inputChange" /> 210 @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,14 @@ const handleTreeSelectNodeChange = (node, item) => { ...@@ -53,6 +53,14 @@ 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
60 const getCascaderCheckedData = ()=>{
61 return toolSearch.value.getCascaderCheckedData();
62 }
63
56 defineExpose({ 64 defineExpose({
57 toolSearch, 65 toolSearch,
58 }) 66 })
...@@ -61,14 +69,15 @@ defineExpose({ ...@@ -61,14 +69,15 @@ defineExpose({
61 <template> 69 <template>
62 <div class="table-tools"> 70 <div class="table-tools">
63 <div class="tools_search"> 71 <div class="tools_search">
64 <TableSearch ref="toolSearch" :itemList="itemList" :init="props.init??true" 72 <TableSearch ref="toolSearch" :itemList="itemList" :init="props.init??true"
65 :formId="formId" 73 :formId="formId"
66 @tableSearch="tableSearch" 74 @tableSearch="tableSearch"
67 @toolFilterChange="toolFilterChange" @loadMore="loadMore" 75 @toolFilterChange="toolFilterChange" @loadMore="loadMore"
68 @treeSelectLoad="treeSelectLoad" 76 @treeSelectLoad="treeSelectLoad"
69 @selectChange="selectChange" 77 @selectChange="selectChange"
70 @treeSelectNodeChange="handleTreeSelectNodeChange" 78 @treeSelectNodeChange="handleTreeSelectNodeChange"
71 @treeSelectNodeClick="treeSelectNodeClick" 79 @treeSelectNodeClick="treeSelectNodeClick"
80 @cascaderChange="cascaderChange"
72 /> 81 />
73 </div> 82 </div>
74 <div class="tools_bar" v-if="bars?.length"> 83 <div class="tools_bar" v-if="bars?.length">
......
...@@ -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,7 +33,7 @@ const useUserStore = defineStore( ...@@ -33,7 +33,7 @@ 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 return getTokenPromise.value = getTokenByCode(data).then((res: any) => { 37 return getTokenPromise.value = getTokenByCode(data).then((res: any) => {
38 getTokenPromise.value = null; 38 getTokenPromise.value = null;
39 console.log(res); 39 console.log(res);
......
...@@ -12,14 +12,13 @@ import useDataAssetStore from "@/store/modules/dataAsset"; ...@@ -12,14 +12,13 @@ import useDataAssetStore from "@/store/modules/dataAsset";
12 import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory"; 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 20
21 const loading = ref(false);
23 const page = ref({ 22 const page = ref({
24 limit: 50, 23 limit: 50,
25 curr: 1, 24 curr: 1,
...@@ -41,8 +40,8 @@ const tableInfo = ref({ ...@@ -41,8 +40,8 @@ const tableInfo = ref({
41 { 40 {
42 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) => {
43 router.push({ 42 router.push({
44 name: "templateConfig", 43 name: "classifyGradeCatalogue",
45 query: { guid: scope.row.damGuid }, 44 // query: { guid: scope.row.damGuid },
46 }); 45 });
47 } 46 }
48 }, 47 },
...@@ -68,13 +67,8 @@ const tableInfo = ref({ ...@@ -68,13 +67,8 @@ const tableInfo = ref({
68 } 67 }
69 }, 68 },
70 ], 69 ],
71 loading: false,
72 data: [], 70 data: [],
73 page: { 71 showPage: false,
74 type: "normal",
75 rows: 0,
76 ...page.value,
77 },
78 actionInfo: { 72 actionInfo: {
79 label: "操作", 73 label: "操作",
80 type: "btn", 74 type: "btn",
...@@ -97,21 +91,18 @@ const tableInfo = ref({ ...@@ -97,21 +91,18 @@ const tableInfo = ref({
97 }); 91 });
98 92
99 const getTableData = () => { 93 const getTableData = () => {
100 tableInfo.value.loading = true; 94 loading.value = true;
101 getCgTaskPageList( 95 getCgTaskPageList(
102 Object.assign({}, searchItemValue.value, { 96 Object.assign({}, searchItemValue.value, {
103 pageIndex: page.value.curr, 97 pageIndex: page.value.curr,
104 pageSize: page.value.limit, 98 pageSize: -1,
105 }) 99 })
106 ).then((res: any) => { 100 ).then((res: any) => {
107 tableInfo.value.loading = false; 101 loading.value = false;
108 tableInfo.value.data = res.data.records || []; 102 tableInfo.value.data = res.data.records || [];
109 tableInfo.value.page.curr = res.data.pageIndex;
110 tableInfo.value.page.limit = res.data.pageSize;
111 tableInfo.value.page.rows = res.data.totalRows;
112 }) 103 })
113 .catch((res) => { 104 .catch((res) => {
114 tableInfo.value.loading = false; 105 loading.value = false;
115 }); 106 });
116 }; 107 };
117 108
...@@ -122,10 +113,10 @@ const tableBtnClick = (scope, btn) => { ...@@ -122,10 +113,10 @@ const tableBtnClick = (scope, btn) => {
122 if (type == 'confirm' || type == 'modify' || type == 'edit' || type == "log") { 113 if (type == 'confirm' || type == 'modify' || type == 'edit' || type == "log") {
123 toPath(type); 114 toPath(type);
124 } else if (type == 'run') { 115 } else if (type == 'run') {
125 const guids = [currTableData.value.guid]; 116 const params = {guid: currTableData.value.guid};
126 runExecTask(guids).then((res: any) => { 117 runExecTask(params).then((res: any) => {
127 if (res.code == proxy.$passCode) { 118 if (res.code == proxy.$passCode) {
128 getFirstPageData(); 119 getTableData();
129 } else { 120 } else {
130 ElMessage({ 121 ElMessage({
131 type: "error", 122 type: "error",
...@@ -181,14 +172,6 @@ const toPath = (type) => { ...@@ -181,14 +172,6 @@ const toPath = (type) => {
181 } 172 }
182 } 173 }
183 174
184 const tablePageChange = (info) => {
185 page.value.curr = Number(info.curr);
186 page.value.limit = Number(info.limit);
187 tableInfo.value.page.limit = page.value.limit;
188 tableInfo.value.page.curr = page.value.curr;
189 getTableData();
190 };
191
192 const open = (msg, type, isBatch = false) => { 175 const open = (msg, type, isBatch = false) => {
193 ElMessageBox.confirm(msg, "提示", { 176 ElMessageBox.confirm(msg, "提示", {
194 confirmButtonText: "确定", 177 confirmButtonText: "确定",
...@@ -198,7 +181,7 @@ const open = (msg, type, isBatch = false) => { ...@@ -198,7 +181,7 @@ const open = (msg, type, isBatch = false) => {
198 const guids = [currTableData.value.guid]; 181 const guids = [currTableData.value.guid];
199 cgTaskDelete(guids).then((res: any) => { 182 cgTaskDelete(guids).then((res: any) => {
200 if (res.code == proxy.$passCode) { 183 if (res.code == proxy.$passCode) {
201 getFirstPageData(); 184 getTableData();
202 ElMessage({ 185 ElMessage({
203 type: "success", 186 type: "success",
204 message: "删除成功", 187 message: "删除成功",
...@@ -210,41 +193,35 @@ const open = (msg, type, isBatch = false) => { ...@@ -210,41 +193,35 @@ const open = (msg, type, isBatch = false) => {
210 }); 193 });
211 } 194 }
212 }).catch((res) => { 195 }).catch((res) => {
213 tableInfo.value.loading = false; 196
214 }); 197 });
215 }); 198 });
216 }; 199 };
217 200
218 const getFirstPageData = () => {
219 page.value.curr = 1
220 tableInfo.value.page.curr = 1;
221 getTableData();
222 }
223
224 onActivated(() => { 201 onActivated(() => {
225 // if (assetStore.isRefresh) {//如果是首次加载,则不需要调用 202 // if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
226 // getFirstPageData(); 203 // getFirstPageData();
227 // assetStore.set(false); 204 // assetStore.set(false);
228 // } 205 // }
229 getFirstPageData()
230 }) 206 })
231 207
232 onBeforeMount(() => { 208 onBeforeMount(() => {
233 209 getTableData()
234 }) 210 })
235 211
236 </script> 212 </script>
237 213
238 <template> 214 <template>
239 <div class="container_wrap" v-if="tableInfo.data.length"> 215 <div class="container_wrap" v-loading="loading">
240 <div class="table_panel_wrap"> 216 <div class="table_tool_wrap" v-if="tableInfo.data.length">
241 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 217 <div class="table_title">分类分级任务</div>
242 </div> 218 </div>
243 </div> 219 <div class="table_panel_wrap" v-if="tableInfo.data.length">
244 <div class="container_wrap" v-else> 220 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" />
245 <div class="card-noData"> 221 </div>
222 <div class="card-noData" v-else>
246 <img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" /> 223 <img src="@/assets/images/no-data.png" :style="{ width: '96px', height: '96px' }" />
247 <p>暂无日志记录</p> 224 <p>暂无分类分级任务,<span class="text_btn" @click="toPath('add')">去新建</span></p>
248 </div> 225 </div>
249 </div> 226 </div>
250 </template> 227 </template>
...@@ -252,7 +229,7 @@ onBeforeMount(() => { ...@@ -252,7 +229,7 @@ onBeforeMount(() => {
252 <style scoped lang="scss"> 229 <style scoped lang="scss">
253 .table_tool_wrap { 230 .table_tool_wrap {
254 width: 100%; 231 width: 100%;
255 height: 40px !important; 232 min-height: unset;
256 padding: 0 8px; 233 padding: 0 8px;
257 234
258 .table_title { 235 .table_title {
...@@ -266,8 +243,8 @@ onBeforeMount(() => { ...@@ -266,8 +243,8 @@ onBeforeMount(() => {
266 243
267 .table_panel_wrap { 244 .table_panel_wrap {
268 width: 100%; 245 width: 100%;
269 height: 100%; 246 height: calc(100% - 40px);
270 padding: 0px 8px 0; 247 padding: 8px 8px 16px;
271 } 248 }
272 249
273 .card-noData { 250 .card-noData {
......
...@@ -11,639 +11,45 @@ import { Search, Warning } from "@element-plus/icons-vue"; ...@@ -11,639 +11,45 @@ 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 { getCgTaskDetail, getTaskExeTreeList, getTaskFieldCount, execTaskFieldList, execTaskSheetList, execTaskConfirm, execFieldConfirm, filterVal, } from "@/api/modules/dataInventory";
15 import { getListingList, listingDelete, listingUpdateStatus, filterVal, getParamsDataList } from "@/api/modules/dataProduct";
16 15
17 const { proxy } = getCurrentInstance() as any; 16 const { proxy } = getCurrentInstance() as any;
18 const router = useRouter(); 17 const router = useRouter();
18 const route = useRoute();
19 const userStore = useUserStore(); 19 const userStore = useUserStore();
20 const userData = JSON.parse(userStore.userData); 20 const userData = JSON.parse(userStore.userData);
21 const assetStore = useDataAssetStore(); 21 const assetStore = useDataAssetStore();
22 const datas = [ 22
23 { 23 const classifyData = ref([
24 "updateTime": "2024-07-16 13:17:00", 24 { classifyName: '未分类', guid: 'unclassified' },
25 "updateUserName": "数往知来管理员", 25 ])
26 "guid": "4e0e76c48fa043d5b35d09f3ccc7c265", 26 const treeData = ref([
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 { 27 {
515 "children": [ 28 classifyName: "全部",
516 { 29 guid: "all",
517 "children": null, 30 children: [
518 "parentGuids": [ 31 { 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 ], 32 ],
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 }, 33 },
549 { 34 ]);
550 "children": null, 35 const currTreeNode = ref({})
551 "parentGuids": null, 36 const treeInfo: any = ref({
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 },
581 {
582 "children": [
583 {
584 "children": null,
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", 37 id: "data-pickup-tree",
623 filter: true, 38 filter: true,
624 queryValue: "", 39 queryValue: "",
625 queryPlaceholder: "输入组织名称搜索", 40 queryPlaceholder: "输入组织名称搜索",
626 props: { 41 props: {
627 label: "organisationName", 42 label: "classifyName",
628 value: "guid", 43 value: "guid",
629 }, 44 },
630 nodeKey: 'guid', 45 nodeKey: 'guid',
631 expandedKey: [], 46 expandedKey: [],
632 expandOnNodeClick: false, 47 expandOnNodeClick: false,
633 data: data1 || [], 48 data: [],
634 }); 49 });
635 50
636 const templateInfo = ref({ 51 const taskDetail = ref({})
637 title: '医疗数据分类分级模板', 52 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({ 53 const tabsInfo = ref({
648 activeName: 'field', 54 activeName: 'field',
649 tabs: [ 55 tabs: [
...@@ -652,99 +58,82 @@ const tabsInfo = ref({ ...@@ -652,99 +58,82 @@ const tabsInfo = ref({
652 ] 58 ]
653 }); 59 });
654 60
61 const sheetParams = ref({});
655 const sheetItemList = ref([ 62 const sheetItemList = ref([
656 { 63 {
657 type: "select", 64 type: "select",
658 label: "", 65 label: "",
659 placeholder: '变更类型', 66 placeholder: '变更类型',
660 field: 'dataSourceGuid', 67 field: 'isCgChange',
661 default: '', 68 default: '',
662 options: [], 69 options: [
663 props: { 70 { label: '已确认', value: 'Y' },
664 label: 'databaseNameZh', 71 { label: '待确认', value: 'N' },
665 value: 'guid' 72 ],
666 },
667 clearable: true, 73 clearable: true,
668 }, 74 },
669 { 75 {
670 type: "select", 76 type: "input",
671 label: "", 77 label: "",
672 placeholder: '数据库名', 78 placeholder: '数据库名',
673 field: 'dataSourceGuid', 79 field: 'databaseName',
674 default: '', 80 default: '',
675 options: [],
676 props: {
677 label: 'databaseNameZh',
678 value: 'guid'
679 },
680 clearable: true, 81 clearable: true,
681 }, 82 },
682 { 83 {
683 type: "select", 84 type: "input",
684 label: "", 85 label: "",
685 placeholder: '表中文/英文名', 86 placeholder: '表中文/英文名',
686 field: 'dataSourceGuid', 87 field: 'tableName',
687 default: '', 88 default: '',
688 options: [],
689 props: {
690 label: 'databaseNameZh',
691 value: 'guid'
692 },
693 clearable: true, 89 clearable: true,
694 }, 90 },
695 ]); 91 ]);
696 92 const fieldParams = ref({});
697 const fieldItemList = ref([ 93 const fieldItemList = ref([
698 { 94 {
699 type: "select", 95 type: "select",
700 label: "", 96 label: "",
701 placeholder: '变更类型', 97 placeholder: '变更类型',
702 field: 'dataSourceGuid', 98 field: 'isCgChange',
703 default: '', 99 default: '',
704 options: [], 100 options: [
705 props: { 101 { label: '已确认', value: 'Y' },
706 label: 'databaseNameZh', 102 { label: '待确认', value: 'N' },
707 value: 'guid' 103 ],
708 },
709 clearable: true, 104 clearable: true,
710 }, 105 },
711 { 106 {
712 type: "select", 107 type: "input",
713 label: "", 108 label: "",
714 placeholder: '字段中文/英文名', 109 placeholder: '字段中文/英文名',
715 field: 'dataSourceGuid', 110 field: 'fieldName',
716 default: '', 111 default: '',
717 options: [],
718 props: {
719 label: 'databaseNameZh',
720 value: 'guid'
721 },
722 clearable: true, 112 clearable: true,
723 }, 113 },
724 { 114 {
725 type: "select", 115 type: "input",
726 label: "", 116 label: "",
727 placeholder: '表中文/英文名', 117 placeholder: '表中文/英文名',
728 field: 'dataSourceGuid', 118 field: 'tableName',
729 default: '', 119 default: '',
730 options: [],
731 props: {
732 label: 'databaseNameZh',
733 value: 'guid'
734 },
735 clearable: true, 120 clearable: true,
736 }, 121 },
737 { 122 {
738 type: "select", 123 type: "cascader",
739 label: "", 124 label: "",
740 placeholder: '分类', 125 placeholder: '分类',
741 field: 'dataSourceGuid', 126 field: 'classifyName',
742 default: '', 127 default: [],
743 options: [], 128 options: [],
129 showAllLevels: true,
744 props: { 130 props: {
745 label: 'databaseNameZh', 131 checkStrictly: true,
746 value: 'guid' 132 expandTrigger: "hover",
133 label: "classifyName",
134 value: "guid",
747 }, 135 },
136 filterable: true,
748 clearable: true, 137 clearable: true,
749 }, 138 },
750 { 139 {
...@@ -755,28 +144,22 @@ const fieldItemList = ref([ ...@@ -755,28 +144,22 @@ const fieldItemList = ref([
755 default: '', 144 default: '',
756 options: [], 145 options: [],
757 props: { 146 props: {
758 label: 'databaseNameZh', 147 label: 'gradeName',
759 value: 'guid' 148 value: 'guid'
760 }, 149 },
761 clearable: true, 150 clearable: true,
762 }, 151 },
763 { 152 {
764 type: "select", 153 type: "input",
765 label: "", 154 label: "",
766 placeholder: '数据库名', 155 placeholder: '数据库名',
767 field: 'dataSourceGuid', 156 field: 'databaseName',
768 default: '', 157 default: '',
769 options: [],
770 props: {
771 label: 'databaseNameZh',
772 value: 'guid'
773 },
774 clearable: true, 158 clearable: true,
775 }, 159 },
776 ]); 160 ]);
777 161
778 const checked1 = ref(false); 162 const checked1 = ref(false);
779 const checked2 = ref(false);
780 163
781 const page = ref({ 164 const page = ref({
782 limit: 50, 165 limit: 50,
...@@ -789,33 +172,28 @@ const page = ref({ ...@@ -789,33 +172,28 @@ const page = ref({
789 { label: "200", value: 200 }, 172 { label: "200", value: 200 },
790 ], 173 ],
791 }); 174 });
792 const searchItemValue: any = ref({}); 175
793 const currTableData: any = ref({}); 176 const currTableData: any = ref({});
794 const sheetTableInfo = ref({ 177 const sheetTableInfo = ref({
795 id: "mapping-table", 178 id: "mapping-table",
796 fields: [ 179 fields: [
797 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 180 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
181 // {
182 // label: "分类分级变更状态", field: "isCgChange", width: 140, align: 'center', type: "tag", getName: (scope) => {
183 // return filterVal(scope.row.isCgChange, 'isCgChange');
184 // }
185 // },
186 { label: "表中文名", field: "tableChName", width: 120 },
798 { 187 {
799 label: "分类分级变更状态", field: "damCode", width: 140, align: 'center', type: "tag", getName: (scope) => { 188 label: "表英文名", field: "tableName", width: 200, type: "text_btn", value: 'tab'
800 return filterVal(scope.row.status, 'status');
801 }
802 },
803 { label: "表中文名", field: "damTypeName", width: 120 },
804 {
805 label: "表英文名", field: "damName", width: 200, type: "text_btn", columClass: 'text_btn', click: (scope) => {
806 router.push({
807 name: "templateConfig",
808 query: { guid: scope.row.damGuid },
809 });
810 }
811 }, 189 },
812 { label: "数据库名", field: "damTypeName", width: 120 }, 190 { label: "数据库名", field: "database", width: 120 },
813 { label: "字段数", field: "damTypeName", width: 96, align: 'right' }, 191 { label: "字段数", field: "fieldNum", width: 96, align: 'right' },
814 { label: "已分类字段数", field: "damTypeName", width: 120, align: 'right' }, 192 { label: "已分类字段数", field: "classifyFieldNum", width: 120, align: 'right' },
815 { label: "已分级字段数", field: "damTypeName", width: 120, align: 'right' }, 193 { label: "已分级字段数", field: "gradeFieldNum", width: 120, align: 'right' },
816 ], 194 ],
817 loading: false, 195 loading: false,
818 data: datas || [], 196 data: [],
819 page: { 197 page: {
820 type: "normal", 198 type: "normal",
821 rows: 0, 199 rows: 0,
...@@ -831,22 +209,35 @@ const fieldTableInfo = ref({ ...@@ -831,22 +209,35 @@ const fieldTableInfo = ref({
831 fields: [ 209 fields: [
832 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" }, 210 { label: "序号", type: "index", width: 56, align: "center", fixed: "left" },
833 { 211 {
834 label: "分类分级变更状态", field: "approveState", width: 140, align: 'center', type: "tag", getName: (scope) => { 212 label: "分类分级变更状态", field: "isCgChange", width: 140, align: 'center', type: "tag", getName: (scope) => {
835 return filterVal(scope.row.approveState, 'approveState'); 213 return filterVal(scope.row.isCgChange, 'isCgChange');
836 } 214 }
837 }, 215 },
838 { label: "字段名", field: "damTypeName", width: 200 }, 216 { label: "字段名", field: "fieldName", width: 120 },
839 { label: "字段中文名", field: "damTypeName", width: 200 }, 217 { label: "字段中文名", field: "fieldChName", width: 200 },
840 { label: "分类", field: "damTypeName", width: 280, type: 'select', columClass: 'edit_cell' }, 218 {
841 { label: "分级", field: "damTypeName", width: 120, type: 'select', columClass: 'edit_cell' }, 219 label: "分类", field: "classifyDetailName", width: 280,
842 { label: "标签", field: "damCode", width: 96 }, 220 type: "cascader",
843 { label: "规则", field: "damCode", width: 200 }, 221 options: [],
844 { label: "表中文名", field: "damTypeName", width: 120 }, 222 showAllLevels: true,
845 { label: "表英文名", field: "damName", width: 200 }, 223 props: {
846 { label: "数据库名", field: "damTypeName", width: 120 }, 224 checkStrictly: true,
225 expandTrigger: "hover",
226 label: "classifyName",
227 value: "guid",
228 },
229 filterable: true,
230 clearable: true,
231 },
232 { label: "分级", field: "gradeDetailName", width: 120, type: 'select' },
233 { label: "标签", field: "label", width: 96 },
234 { label: "规则", field: "ruleDetail", width: 200 },
235 { label: "表英文名", field: "tableName", width: 200 },
236 { label: "表中文名", field: "tableChName", width: 120 },
237 { label: "数据库名", field: "database", width: 120 },
847 ], 238 ],
848 loading: false, 239 loading: false,
849 data: data2 || [], 240 data: [],
850 showPage: true, 241 showPage: true,
851 page: { 242 page: {
852 type: "normal", 243 type: "normal",
...@@ -856,168 +247,183 @@ const fieldTableInfo = ref({ ...@@ -856,168 +247,183 @@ const fieldTableInfo = ref({
856 actionInfo: { 247 actionInfo: {
857 label: "操作", 248 label: "操作",
858 type: "btn", 249 type: "btn",
859 width: 80, 250 width: 60,
860 btns: (scope) => {
861 let row = scope.row, btnArr: any = [
862 { label: "编辑", value: "edit" },
863 ];
864 // if (row.approveState == 'Y') {
865 // if (row.listingStatus == 'Y') {
866 // btnArr.splice(0, 0, { label: "详情", value: "detail" });
867 // } else {
868 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
869 // }
870 // } else {
871 // if (row.approveState == 'A') {
872 // btnArr.splice(0, 0, { label: "详情", value: "detail" });
873 // } else {
874 // btnArr.splice(0, 0, { label: "编辑", value: "edit" }, { label: "详情", value: "detail" }, { label: "删除", value: "delete" });
875 // }
876 // }
877 return btnArr;
878 },
879 }, 251 },
880 }) 252 })
881 253
254 // 获取任务详情
255 const getTaskDetail = (data) => {
256 getCgTaskDetail(data).then((res: any) => {
257 if (res.code == proxy.$passCode) {
258 const data = res.data || {};
259 taskDetail.value = data;
260 getFieldCount({ execGuid: data.execGuid })
261 getFieldTree({ execGuid: data.execGuid })
262 getSheetTableData();
263 getFieldTableData();
264 }
265 })
266 }
267
268 // 获取字段统计
269 const getFieldCount = (data) => {
270 getTaskFieldCount(data).then((res: any) => {
271 if (res.code == proxy.$passCode) {
272 const data = res.data || {};
273 fieldCounts.value = data;
274 }
275 })
276 }
277
278 // 获取字段统计
279 const getFieldTree = (data) => {
280 getTaskExeTreeList(data).then((res: any) => {
281 if (res.code == proxy.$passCode) {
282 const data = res.data || [];
283 treeData.value[0].children.splice(1);
284 treeData.value[0].children.push(...data);
285 treeInfo.value.data = treeData.value;
286 treeInfo.value.expandedKey = ['all'];
287 classifyData.value.splice(1);
288 classifyData.value.push(...data);
289 fieldItemList.value[3].options = JSON.parse(JSON.stringify(classifyData.value));
290 fieldTableInfo.value.fields[4].options = JSON.parse(JSON.stringify(classifyData.value));
291 }
292 })
293 }
294
882 const tabChange = (val) => { 295 const tabChange = (val) => {
883 tabsInfo.value.activeName = val; 296 tabsInfo.value.activeName = val;
884 } 297 }
885 298
886 const nodeClick = (data) => { 299 const nodeClick = (data) => {
887 treeIndex.value = data 300 currTreeNode.value = data;
301 getFieldTableData();
888 } 302 }
889 303
890 const getTableData = () => { 304 // 获取库表数据
891 tableInfo.value.loading = true; 305 const getSheetTableData = () => {
892 getListingList( 306 sheetTableInfo.value.loading = true;
893 Object.assign({}, searchItemValue.value, { 307 execTaskSheetList(
894 pageIndex: page.value.curr, 308 Object.assign({}, { ...sheetParams.value }, {
895 pageSize: page.value.limit, 309 // changeStatus: checked2.value ? 'N' : 'Y',
310 execGuid: taskDetail.value.execGuid,
311 pageIndex: sheetTableInfo.value.page.curr,
312 pageSize: sheetTableInfo.value.page.limit,
313 })
314 ).then((res: any) => {
315 sheetTableInfo.value.loading = false;
316 if (res.code == proxy.$passCode) {
317 sheetTableInfo.value.data = res.data.records || [];
318 sheetTableInfo.value.page.curr = res.data.pageIndex;
319 sheetTableInfo.value.page.limit = res.data.pageSize;
320 sheetTableInfo.value.page.rows = res.data.totalRows;
321 }
322 })
323 .catch((res) => {
324 fieldTableInfo.value.loading = false;
325 });
326 };
327
328 // 获取字段表格数据
329 const getFieldTableData = () => {
330 fieldTableInfo.value.loading = true;
331 execTaskFieldList(
332 Object.assign({}, { ...sheetParams.value }, {
333 isClassify: checked1.value ? 'Y' : 'N',
334 changeStatus: '',
335 execGuid: taskDetail.value.execGuid,
336 classifyDetailGuid: currTreeNode.value.guid,
337 pageIndex: fieldTableInfo.value.page.curr,
338 pageSize: fieldTableInfo.value.page.limit,
896 }) 339 })
897 ).then((res: any) => { 340 ).then((res: any) => {
898 tableInfo.value.loading = false; 341 fieldTableInfo.value.loading = false;
899 tableInfo.value.data = res.data.records || []; 342 if (res.code == proxy.$passCode) {
900 tableInfo.value.page.curr = res.data.pageIndex; 343 let data = res.data.records || [];
901 tableInfo.value.page.limit = res.data.pageSize; 344 data.map(item => item.STATE = '');
902 tableInfo.value.page.rows = res.data.totalRows; 345 fieldTableInfo.value.data = data;
346 fieldTableInfo.value.page.curr = res.data.pageIndex;
347 fieldTableInfo.value.page.limit = res.data.pageSize;
348 fieldTableInfo.value.page.rows = res.data.totalRows;
349 }
903 }) 350 })
904 .catch((res) => { 351 .catch((res) => {
905 tableInfo.value.loading = false; 352 fieldTableInfo.value.loading = false;
906 }); 353 });
907 }; 354 };
908 355
356 const tableCellClassName = (scope) => {
357 return (scope.column.label == '分类' || scope.column.label == '分级') && scope.row['STATE'] === 'Running' ? 'edit_cell' : ''
358 }
359
909 const tableBtnClick = (scope, btn) => { 360 const tableBtnClick = (scope, btn) => {
910 const type = btn.value; 361 const type = btn.value;
911 const row = scope.row; 362 const row = scope.row;
912 currTableData.value = row; 363 currTableData.value = row;
913 if (type == "detail" || type === "edit") { 364 if (type == 'tab') {
914 toPath(type); 365 tabsInfo.value.activeName = 'field';
915 } else if (type === "delete") { 366 fieldItemList.value[2].default = row.tableName;
916 open("此操作将永久删除,是否继续?", "warning"); 367 } else if (type == "edit") {
917 } 368 row.STATE = 'Running';
918 }; 369 } else if (type == 'save') {
919 370
920 const toPath = (type = null) => { 371 row.STATE = '';
921 router.push({
922 name: "taskConfig",
923 query: {
924 type
925 },
926 });
927 }
928 372
929 const tablePageChange = (info) => { 373 }
930 page.value.curr = Number(info.curr);
931 page.value.limit = Number(info.limit);
932 tableInfo.value.page.limit = page.value.limit;
933 tableInfo.value.page.curr = page.value.curr;
934 getTableData();
935 }; 374 };
936 375
937 const open = (msg, type, isBatch = false) => { 376 const tablePageChange = (info) => {
938 ElMessageBox.confirm(msg, "提示", { 377 if (tabsInfo.value.activeName == 'sheet') {
939 confirmButtonText: "确定", 378 sheetTableInfo.value.page.limit = Number(info.limit);
940 cancelButtonText: "取消", 379 sheetTableInfo.value.page.curr = Number(info.curr);
941 type: type, 380 getSheetTableData();
942 }).then(() => { 381 } else {
943 const guids = [currTableData.value.guid]; 382 fieldTableInfo.value.page.limit = page.value.limit;
944 listingDelete(guids).then((res: any) => { 383 fieldTableInfo.value.page.curr = page.value.curr;
945 if (res.code == proxy.$passCode) { 384 getFieldTableData();
946 getFirstPageData(); 385 }
947 ElMessage({
948 type: "success",
949 message: "删除成功",
950 });
951 } else {
952 ElMessage({
953 type: "error",
954 message: res.msg,
955 });
956 }
957 }).catch((res) => {
958 tableInfo.value.loading = false;
959 });
960 });
961 }; 386 };
962 387
963 const getFirstPageData = () => {
964 page.value.curr = 1
965 tableInfo.value.page.curr = 1;
966 getTableData();
967 }
968
969 const btnClick = async (btn, bType = null) => { 388 const btnClick = async (btn, bType = null) => {
970 const type = btn.value; 389 const type = btn.value;
390 if (type == 'path') {
391 router.push({
392 name: "classifyGradeCatalogue",
393 // query: { guid: taskDetail.value.damGuid },
394 });
395 } else if (type == 'cancel') {
396 router.push({
397 name: "taskConfig",
398 });
399 } else if (type == 'confirm') {
400
401 }
971 }; 402 };
972 403
973 /** 搜索查询分类分级模板。 */ 404 /** 搜索查询分类分级模板。 */
974 const searchTemplate = (val: any, clear: boolean = false) => { 405 const searchSheet = (val: any, clear: boolean = false) => {
975 // page.value.curr = 1; 406 if (clear) {
976 // if (clear) { 407 sheetItemList.value.map(item => item.default = '')
977 // searchItemList.value.map(item => item.default = '') 408 }
978 // page.value.planName = ''; 409 sheetParams.value = Object.assign({}, { ...sheetParams.value }, { ...val });
979 // page.value.state = null; 410 getSheetTableData();
980 // getTableData();
981 // return;
982 // }
983 // page.value.planName = val.planName;
984 // page.value.state = val.state;
985 // getTableData();
986 }; 411 };
987 412
988 const changTable = () => { 413 const searchField = (val: any, clear: boolean = false) => {
989 // toSearch({}) 414 if (clear) {
415 fieldItemList.value.map(item => item.default = '')
416 }
417 fieldParams.value = Object.assign({}, { ...fieldParams.value }, { ...val });
418 getFieldTableData();
990 }; 419 };
991 420
992 const getPermissionList = (val, init = false) => {
993 let params: any = val ? { ...val } : {}
994 // params.pageIndex = listPage.value.curr;
995 // params.pageSize = listPage.value.limit;
996 // getPermissionDictList(params).then((res: any) => {
997 // if (res.code == proxy.$passCode) {
998 // const data = res.data?.records || []
999 // if (init) {
1000 // permissionList.value = JSON.parse(JSON.stringify(data))
1001 // currpermissionList.value = JSON.parse(JSON.stringify(data))
1002 // listPage.value.totalPages = res.data.totalPages
1003 // toSearch({})
1004 // } else {
1005 // permissionList.value.push(...JSON.parse(JSON.stringify(data)))
1006 // querySearch(asideSearchInput.value)
1007 // }
1008 // }
1009 // listLoading.value = false
1010 // }).catch(() => {
1011 // listLoading.value = false
1012 // })
1013 }
1014
1015 onActivated(() => { 421 onActivated(() => {
1016 422
1017 }) 423 })
1018 424
1019 onBeforeMount(() => { 425 onBeforeMount(() => {
1020 426 getTaskDetail({ guid: route.query.guid })
1021 }) 427 })
1022 428
1023 </script> 429 </script>
...@@ -1029,29 +435,35 @@ onBeforeMount(() => { ...@@ -1029,29 +435,35 @@ onBeforeMount(() => {
1029 <div class="template_panel"> 435 <div class="template_panel">
1030 <div class="panel_title"> 436 <div class="panel_title">
1031 <div class="title_wrap"> 437 <div class="title_wrap">
1032 <span class="title_text">{{ templateInfo.title }}</span> 438 <span class="title_text">{{ taskDetail.taskName }}</span>
1033 <el-tag type="warning">{{ templateInfo.mark }}</el-tag> 439 <el-tag type="warning">{{ filterVal(taskDetail.confirmStatus, 'confirmStatus') }}</el-tag>
1034 </div> 440 </div>
1035 </div> 441 </div>
1036 <div class="title_desc"> 442 <div class="title_desc">
1037 <div class="desc_group"> 443 <div class="desc_group">
1038 <div class="desc_item"> 444 <div class="desc_item">
1039 <span class="desc_label">目录名称:</span> 445 <span class="desc_label">目录名称:</span>
1040 <span class="desc_value text_btn">医疗数据</span> 446 <span class="desc_value text_btn" @click="btnClick({ value: 'path' })">{{ taskDetail.cgDirName || '--'
447 }}</span>
1041 </div> 448 </div>
1042 <div class="desc_item"> 449 <div class="desc_item">
1043 <span class="desc_label">执行时间:</span> 450 <span class="desc_label">执行时间:</span>
1044 <span class="desc_value">2021-12-12 09:12:13</span> 451 <span class="desc_value">{{ taskDetail.cgDirName || '--' }}</span>
1045 </div> 452 </div>
1046 </div> 453 </div>
1047 <div class="desc_group"> 454 <div class="desc_group">
1048 <div class="desc_item"> 455 <div class="desc_item">
1049 <span class="desc_label">分类:</span> 456 <span class="desc_label">分类:</span>
1050 <span class="desc_value text_btn">医疗数据</span> 457 <span class="desc_value text_btn">{{ taskDetail.classifyName || '--' }}</span>
458 </div>
459 <div class="desc_item">
460 <span class="desc_label">分级:</span>
461 <span class="desc_value text_btn">{{ taskDetail.gradeName || '--' }}</span>
1051 </div> 462 </div>
1052 <div class="desc_item"> 463 <div class="desc_item">
1053 <span class="desc_label">元数据名称:</span> 464 <span class="desc_label">元数据名称:</span>
1054 <span class="desc_value">名称1、名称2、名称3</span> 465 <span class="desc_value">{{ (taskDetail.metaNames || []).length ? taskDetail.metaNames.join(',') : '--'
466 }}</span>
1055 </div> 467 </div>
1056 </div> 468 </div>
1057 </div> 469 </div>
...@@ -1060,13 +472,13 @@ onBeforeMount(() => { ...@@ -1060,13 +472,13 @@ onBeforeMount(() => {
1060 <Warning /> 472 <Warning />
1061 </el-icon> 473 </el-icon>
1062 <span>本次分类分级任务共涉及: </span> 474 <span>本次分类分级任务共涉及: </span>
1063 <span class="text_btn">40</span> 475 <span class="text_btn">{{ changeNum(fieldCounts.tableNum || 0) }}</span>
1064 <span>张表,共</span> 476 <span>张表,共</span>
1065 <span class="text_btn">4023</span> 477 <span class="text_btn">{{ changeNum(fieldCounts.fieldNum || 0) }}</span>
1066 <span>个字段,已分类</span> 478 <span>个字段,已分类</span>
1067 <span class="text_btn">2099</span> 479 <span class="text_btn">{{ changeNum(fieldCounts.classifyFieldNum || 0) }}</span>
1068 <span>个字段,已分级</span> 480 <span>个字段,已分级</span>
1069 <span class="text_btn">1987</span> 481 <span class="text_btn">{{ changeNum(fieldCounts.gradeFieldNum || 0) }}</span>
1070 <span>个字段</span> 482 <span>个字段</span>
1071 </p> 483 </p>
1072 </div> 484 </div>
...@@ -1074,7 +486,7 @@ onBeforeMount(() => { ...@@ -1074,7 +486,7 @@ onBeforeMount(() => {
1074 <Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" /> 486 <Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" />
1075 <div class="panel" v-show="tabsInfo.activeName == 'sheet'"> 487 <div class="panel" v-show="tabsInfo.activeName == 'sheet'">
1076 <div class="table_tool_wrap"> 488 <div class="table_tool_wrap">
1077 <TableTools :searchItems="sheetItemList" :searchId="'template-manage-search'" @search="searchTemplate" /> 489 <TableTools :searchItems="sheetItemList" :searchId="'sheet-search'" :init="false" @search="searchSheet" />
1078 </div> 490 </div>
1079 <div class="table_panel_wrap"> 491 <div class="table_panel_wrap">
1080 <Table :tableInfo="sheetTableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 492 <Table :tableInfo="sheetTableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
...@@ -1082,13 +494,12 @@ onBeforeMount(() => { ...@@ -1082,13 +494,12 @@ onBeforeMount(() => {
1082 </div> 494 </div>
1083 <div class="panel flex" v-show="tabsInfo.activeName == 'field'"> 495 <div class="panel flex" v-show="tabsInfo.activeName == 'field'">
1084 <div class="box_left"> 496 <div class="box_left">
1085 <div class="aside_title">分类分级目录</div>
1086 <Tree :treeInfo="treeInfo" @nodeClick="nodeClick" /> 497 <Tree :treeInfo="treeInfo" @nodeClick="nodeClick" />
1087 </div> 498 </div>
1088 <div class="box_right"> 499 <div class="box_right">
1089 <div class="table_tool_wrap"> 500 <div class="table_tool_wrap">
1090 <TableTools :searchItems="fieldItemList" :searchId="'template-manage-search'" 501 <TableTools :searchItems="fieldItemList" :searchId="'field-search'" :init="false"
1091 @search="searchTemplate" /> 502 @search="searchField" />
1092 <div class="tools_btns"> 503 <div class="tools_btns">
1093 <div class="btns"> 504 <div class="btns">
1094 <el-button type="primary" plain @click="btnClick({ value: 'batch' })">批量变量分类分级</el-button> 505 <el-button type="primary" plain @click="btnClick({ value: 'batch' })">批量变量分类分级</el-button>
...@@ -1097,28 +508,30 @@ onBeforeMount(() => { ...@@ -1097,28 +508,30 @@ onBeforeMount(() => {
1097 </div> 508 </div>
1098 <div class="checkboxs"> 509 <div class="checkboxs">
1099 <el-checkbox v-model="checked1">仅看未分级分类</el-checkbox> 510 <el-checkbox v-model="checked1">仅看未分级分类</el-checkbox>
1100 <el-checkbox v-model="checked2">仅看变更</el-checkbox> 511 <!-- <el-checkbox v-model="checked2">仅看变更</el-checkbox> -->
1101 </div> 512 </div>
1102 </div> 513 </div>
1103 </div> 514 </div>
1104 <div class="table_panel_wrap panel"> 515 <div class="table_panel_wrap panel">
1105 <div class="table_panel"> 516 <div class="table_panel">
1106 <el-table ref="costTableRef" :data="fieldTableInfo.data" border :height="'100%'" 517 <el-table ref="costTableRef" :data="fieldTableInfo.data" border :height="'100%'"
1107 style="width: 100%; display: inline-block" :style="{ 'min-height': '100%' }"> 518 style="width: 100%; display: inline-block" :style="{ 'min-height': '100%' }"
519 :cell-class-name="tableCellClassName">
1108 <el-table-column v-for="(item, i) in fieldTableInfo.fields" :label="item.label" :width="item.width" 520 <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" 521 :min-width="item.minWidth" :fixed="item.fixed" :align="item.align"
1110 :sortable="item.sortable ?? false" :prop="item.field" :class-name="item.columClass" 522 :sortable="item.sortable ?? false" :prop="item.field" :class-name="item.columClass"
1111 show-overflow-tooltip> 523 show-overflow-tooltip>
1112 <template #default="scope"> 524 <template #default="scope">
1113 <div class="select_cell" v-if="item.type == 'select'"> 525 <el-tag v-if="item.type == 'tag'"
1114 <el-select v-model="scope.row[item.field]" :placeholder="item.placeholder" 526 :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{
1115 :disabled="item.disabled" :clearable="item.clearable || true" />
1116 </div>
1117 <div v-else-if="item.type == 'tag'">
1118 <el-tag :type="item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)">{{
1119 item.getName ? item.getName(scope) : tagMethod(scope.row, item.field) 527 item.getName ? item.getName(scope) : tagMethod(scope.row, item.field)
1120 }}</el-tag> 528 }}</el-tag>
1121 </div> 529 <el-select v-else-if="item.type == 'select' && scope.row['STATE'] === 'Running'"
530 v-model="scope.row[item.field]" :placeholder="item.placeholder"
531 :disabled="item.disabled ?? false" :clearable="item.clearable ?? true" size="small" />
532 <el-cascader v-else-if="item.type == 'cascader' && scope.row['STATE'] === 'Running'"
533 v-model="scope.row[item.field]" :options="item.options" :props="item.props"
534 :disabled="item.disabled ?? false" :clearable="item.clearable ?? true" size="small" />
1122 <span v-else> 535 <span v-else>
1123 {{ item.getName ? item.getName(scope) : scope.row[item.field] !== 0 && !scope.row[item.field] 536 {{ item.getName ? item.getName(scope) : scope.row[item.field] !== 0 && !scope.row[item.field]
1124 ? 537 ?
...@@ -1126,18 +539,11 @@ onBeforeMount(() => { ...@@ -1126,18 +539,11 @@ onBeforeMount(() => {
1126 </span> 539 </span>
1127 </template> 540 </template>
1128 </el-table-column> 541 </el-table-column>
1129 <el-table-column label="操作" :width="fieldTableInfo.actionInfo.width" 542 <el-table-column label="操作" :width="fieldTableInfo.actionInfo.width" fixed="right">
1130 :class-name="fieldTableInfo.actionInfo.columClass" fixed="right">
1131 <template #default="scope"> 543 <template #default="scope">
1132 <template v-for="(btn, b) in Array.isArray(fieldTableInfo.actionInfo.btns) 544 <span class="text_btn"
1133 ? fieldTableInfo.actionInfo.btns 545 @click="tableBtnClick(scope, { value: scope.row['STATE'] === 'Running' ? 'save' : 'edit' })"
1134 : fieldTableInfo.actionInfo.btns(scope)"> 546 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> 547 </template>
1142 </el-table-column> 548 </el-table-column>
1143 </el-table> 549 </el-table>
...@@ -1152,7 +558,7 @@ onBeforeMount(() => { ...@@ -1152,7 +558,7 @@ onBeforeMount(() => {
1152 <div class="tool_btns"> 558 <div class="tool_btns">
1153 <div class="btns"> 559 <div class="btns">
1154 <el-button @click="btnClick({ value: 'cancel' })">暂存</el-button> 560 <el-button @click="btnClick({ value: 'cancel' })">暂存</el-button>
1155 <el-button type="primary" @click="btnClick({ value: 'next' })">确认变更</el-button> 561 <el-button type="primary" @click="btnClick({ value: 'confirm' })">确认变更</el-button>
1156 </div> 562 </div>
1157 </div> 563 </div>
1158 </div> 564 </div>
...@@ -1290,10 +696,10 @@ onBeforeMount(() => { ...@@ -1290,10 +696,10 @@ onBeforeMount(() => {
1290 } 696 }
1291 697
1292 .panel_content { 698 .panel_content {
1293 height: 100%; 699 height: calc(100% - 145px);
1294 700
1295 .panel { 701 .panel {
1296 height: calc(100% - 47px); 702 height: calc(100% - 35px);
1297 padding: 0 16px; 703 padding: 0 16px;
1298 704
1299 &.flex { 705 &.flex {
...@@ -1319,12 +725,14 @@ onBeforeMount(() => { ...@@ -1319,12 +725,14 @@ onBeforeMount(() => {
1319 } 725 }
1320 726
1321 .tree_panel { 727 .tree_panel {
1322 padding: 0; 728 height: 100%;
729 padding: 8px 0;
1323 } 730 }
1324 } 731 }
1325 732
1326 .box_right { 733 .box_right {
1327 width: calc(100% - 240px); 734 width: calc(100% - 240px);
735 height: 100%;
1328 } 736 }
1329 } 737 }
1330 } 738 }
...@@ -1342,7 +750,7 @@ onBeforeMount(() => { ...@@ -1342,7 +750,7 @@ onBeforeMount(() => {
1342 :deep(.table_tool_wrap) { 750 :deep(.table_tool_wrap) {
1343 .table-tools { 751 .table-tools {
1344 .tools_search { 752 .tools_search {
1345 padding-top: 12px; 753 padding-top: 8px;
1346 } 754 }
1347 } 755 }
1348 } 756 }
...@@ -1356,17 +764,38 @@ onBeforeMount(() => { ...@@ -1356,17 +764,38 @@ onBeforeMount(() => {
1356 764
1357 .table_panel_wrap { 765 .table_panel_wrap {
1358 width: 100%; 766 width: 100%;
1359 height: calc(100% - 40px); 767 height: calc(100% - 48px);
1360 padding: 4px 0 0; 768 padding: 4px 0 0;
1361 769
1362 &.panel { 770 &.panel {
1363 height: calc(100% - 135px); 771 height: calc(100% - 171px);
1364 772
1365 .table_panel { 773 .table_panel {
1366 width: 100%; 774 width: 100%;
1367 height: 100%; 775 height: 100%;
1368 } 776 }
1369 } 777 }
778
779 :deep(.el-table) {
780 td.el-table__cell {
781 &.edit_cell {
782 padding: 0;
783
784 .cell {
785 padding: 0 4px;
786 line-height: 1;
787
788 .el-cascader {
789 width: 100%;
790
791 .el-input .el-input__inner {
792 height: auto !important;
793 }
794 }
795 }
796 }
797 }
798 }
1370 } 799 }
1371 } 800 }
1372 } 801 }
......
...@@ -152,14 +152,16 @@ const metadataTableInfo = ref({ ...@@ -152,14 +152,16 @@ const metadataTableInfo = ref({
152 152
153 const getTaskDetail = (data) => { 153 const getTaskDetail = (data) => {
154 getCgTaskDetail(data).then((res: any) => { 154 getCgTaskDetail(data).then((res: any) => {
155 const data = res.data || {}; 155 if (res.code == proxy.$passCode) {
156 taskDetail.value = data; 156 const data = res.data || {};
157 taskFormItems.value.map((item) => { 157 taskDetail.value = data;
158 item.default = data[item.field] || ''; 158 taskFormItems.value.map((item) => {
159 }) 159 item.default = data[item.field] || '';
160 selectRowData.value = data.metaGuids || []; 160 })
161 getPermissionList({}); 161 selectRowData.value = data.metaGuids || [];
162 getMetaTableData(); 162 getPermissionList({});
163 getMetaTableData();
164 }
163 }) 165 })
164 } 166 }
165 167
...@@ -179,22 +181,22 @@ const getTableData = () => { ...@@ -179,22 +181,22 @@ const getTableData = () => {
179 }) 181 })
180 ).then((res: any) => { 182 ).then((res: any) => {
181 tableInfo.value.loading = false; 183 tableInfo.value.loading = false;
182 tableInfo.value.data = res.data.records || []; 184 if (res.code == proxy.$passCode) {
183 tableInfo.value.page.curr = res.data.pageIndex; 185 tableInfo.value.data = res.data.records || [];
184 tableInfo.value.page.limit = res.data.pageSize; 186 tableInfo.value.page.curr = res.data.pageIndex;
185 tableInfo.value.page.rows = res.data.totalRows; 187 tableInfo.value.page.limit = res.data.pageSize;
188 tableInfo.value.page.rows = res.data.totalRows;
189 }
186 }) 190 })
187 .catch((res) => { 191 .catch((res) => {
188 tableInfo.value.loading = false; 192 tableInfo.value.loading = false;
189 }); 193 });
190 }; 194 };
191 195
192 const toPath = (type = null) => { 196 const toPath = () => {
193 router.push({ 197 router.push({
194 name: "taskConfig", 198 name: "taskConfig",
195 query: { 199 query: {},
196 type
197 },
198 }); 200 });
199 } 201 }
200 202
...@@ -218,17 +220,16 @@ const tablePageChange = (info) => { ...@@ -218,17 +220,16 @@ const tablePageChange = (info) => {
218 const getMetaTableData = () => { 220 const getMetaTableData = () => {
219 getMetaTableCollectList({}).then((res: any) => { 221 getMetaTableCollectList({}).then((res: any) => {
220 metadataTableInfo.value.loading = false; 222 metadataTableInfo.value.loading = false;
221 const data = res.data.records || []; 223 if (res.code == proxy.$passCode) {
222 metadataTableInfo.value.data = data; 224 const data = res.data.records || [];
223 // metadataTableInfo.value.page.curr = res.data.pageIndex; 225 metadataTableInfo.value.data = data;
224 // metadataTableInfo.value.page.limit = res.data.pageSize; 226 if (route.query.type === 'edit') {
225 // metadataTableInfo.value.page.rows = res.data.totalRows; 227 nextTick(() => {
226 if (route.query.type === 'edit') { 228 data.map((row) => {
227 nextTick(() => { 229 taskDetail.value.metaGuids.indexOf(row.guid) > -1 && metadataTableRef.value.tableRef.toggleRowSelection(row, true);
228 data.map((row) => { 230 });
229 taskDetail.value.metaGuids.indexOf(row.guid) > -1 && metadataTableRef.value.tableRef.toggleRowSelection(row, true); 231 })
230 }); 232 }
231 })
232 } 233 }
233 }) 234 })
234 } 235 }
...@@ -330,7 +331,7 @@ const listClick = (row) => { ...@@ -330,7 +331,7 @@ const listClick = (row) => {
330 }; 331 };
331 332
332 // 获取分类列表 333 // 获取分类列表
333 const getPermissionList = (val, init = false) => { 334 const getPermissionList = (val, init = true) => {
334 let params: any = val ? { ...val } : {} 335 let params: any = val ? { ...val } : {}
335 params.pageIndex = listPage.value.curr; 336 params.pageIndex = listPage.value.curr;
336 params.pageSize = listPage.value.limit; 337 params.pageSize = listPage.value.limit;
...@@ -343,18 +344,18 @@ const getPermissionList = (val, init = false) => { ...@@ -343,18 +344,18 @@ const getPermissionList = (val, init = false) => {
343 permissionList.value = JSON.parse(JSON.stringify(data)) 344 permissionList.value = JSON.parse(JSON.stringify(data))
344 currpermissionList.value = JSON.parse(JSON.stringify(data)) 345 currpermissionList.value = JSON.parse(JSON.stringify(data))
345 listPage.value.totalPages = res.data.totalPages 346 listPage.value.totalPages = res.data.totalPages
347 if (data.length) {
348 if (route.query.type == 'edit') {
349 templateInfo.value = data.filter(item => item.guid == taskDetail.value.classifyGuid)[0]
350 } else {
351 templateInfo.value = data[0];
352 }
353 getClassifyTree()
354 }
346 } else { 355 } else {
347 permissionList.value.push(...JSON.parse(JSON.stringify(data))) 356 permissionList.value.push(...JSON.parse(JSON.stringify(data)))
348 querySearch(asideSearchInput.value) 357 querySearch(asideSearchInput.value)
349 } 358 }
350 if (data.length) {
351 if (route.query.type == 'edit') {
352 templateInfo.value = data.filter(item => item.guid == taskDetail.value.classifyGuid)[0]
353 } else {
354 templateInfo.value = data[0];
355 }
356 getClassifyTree()
357 }
358 } 359 }
359 listLoading.value = false 360 listLoading.value = false
360 }).catch(() => { 361 }).catch(() => {
...@@ -365,23 +366,32 @@ const getPermissionList = (val, init = false) => { ...@@ -365,23 +366,32 @@ const getPermissionList = (val, init = false) => {
365 // 获取树形列表 366 // 获取树形列表
366 const getClassifyTree = () => { 367 const getClassifyTree = () => {
367 const params = { 368 const params = {
368 guid: templateInfo.value.guid 369 classifyGradeGuid: templateInfo.value.guid
369 } 370 }
370 treeInfo.value.loading = true; 371 treeInfo.value.loading = true;
371 getClassifyTreeList(params).then((res: any) => { 372 getClassifyTreeList(params).then((res: any) => {
373 treeInfo.value.loading = false;
372 if (res.code == proxy.$passCode) { 374 if (res.code == proxy.$passCode) {
373 const data = res.data || []; 375 const data = res.data || [];
374 treeInfo.value.data = data; 376 treeInfo.value.data = data;
375 treeInfoRef.value.setCurrentKey(''); 377 treeInfoRef.value.setCurrentKey('');
376 tableInfo.value.data = []; 378 tableInfo.value.data = [];
377 } 379 }
378 treeInfo.value.loading = false;
379 }).catch(() => { 380 }).catch(() => {
380 treeInfo.value.loading = false; 381 treeInfo.value.loading = false;
381 }) 382 })
382 } 383 }
383 384
384 onActivated(() => { 385 onActivated(() => {
386 // if (route.query.type == 'edit') {
387 // getTaskDetail({ guid: route.query.guid })
388 // } else {
389 // getPermissionList({});
390 // getMetaTableData();
391 // }
392 })
393
394 onBeforeMount(() => {
385 if (route.query.type == 'edit') { 395 if (route.query.type == 'edit') {
386 getTaskDetail({ guid: route.query.guid }) 396 getTaskDetail({ guid: route.query.guid })
387 } else { 397 } else {
...@@ -390,10 +400,6 @@ onActivated(() => { ...@@ -390,10 +400,6 @@ onActivated(() => {
390 } 400 }
391 }) 401 })
392 402
393 onBeforeMount(() => {
394 // getPermissionList({})
395 })
396
397 </script> 403 </script>
398 404
399 <template> 405 <template>
......
...@@ -12,8 +12,6 @@ import useDataAssetStore from "@/store/modules/dataAsset"; ...@@ -12,8 +12,6 @@ import useDataAssetStore from "@/store/modules/dataAsset";
12 import { getTaskExecPageList, filterVal } from "@/api/modules/dataInventory"; 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();
19 const route = useRoute(); 17 const route = useRoute();
...@@ -21,6 +19,7 @@ const userStore = useUserStore(); ...@@ -21,6 +19,7 @@ const userStore = useUserStore();
21 const userData = JSON.parse(userStore.userData); 19 const userData = JSON.parse(userStore.userData);
22 const assetStore = useDataAssetStore(); 20 const assetStore = useDataAssetStore();
23 21
22 const loading = ref(false);
24 const page = ref({ 23 const page = ref({
25 limit: 50, 24 limit: 50,
26 curr: 1, 25 curr: 1,
...@@ -63,7 +62,6 @@ const tableInfo = ref({ ...@@ -63,7 +62,6 @@ const tableInfo = ref({
63 } 62 }
64 }, 63 },
65 ], 64 ],
66 loading: false,
67 data: [], 65 data: [],
68 page: { 66 page: {
69 type: "normal", 67 type: "normal",
...@@ -84,7 +82,7 @@ const tableInfo = ref({ ...@@ -84,7 +82,7 @@ const tableInfo = ref({
84 }); 82 });
85 83
86 const getTableData = () => { 84 const getTableData = () => {
87 tableInfo.value.loading = true; 85 loading.value = true;
88 getTaskExecPageList( 86 getTaskExecPageList(
89 Object.assign({}, searchItemValue.value, { 87 Object.assign({}, searchItemValue.value, {
90 pageIndex: page.value.curr, 88 pageIndex: page.value.curr,
...@@ -92,14 +90,16 @@ const getTableData = () => { ...@@ -92,14 +90,16 @@ const getTableData = () => {
92 taskGuid: route.query.guid 90 taskGuid: route.query.guid
93 }) 91 })
94 ).then((res: any) => { 92 ).then((res: any) => {
95 tableInfo.value.loading = false; 93 loading.value = false;
96 tableInfo.value.data = res.data.records || []; 94 if (res.code == proxy.$passCode) {
97 tableInfo.value.page.curr = res.data.pageIndex; 95 tableInfo.value.data = res.data.records || [];
98 tableInfo.value.page.limit = res.data.pageSize; 96 tableInfo.value.page.curr = res.data.pageIndex;
99 tableInfo.value.page.rows = res.data.totalRows; 97 tableInfo.value.page.limit = res.data.pageSize;
98 tableInfo.value.page.rows = res.data.totalRows;
99 }
100 }) 100 })
101 .catch((res) => { 101 .catch((res) => {
102 tableInfo.value.loading = false; 102 loading.value = false;
103 }); 103 });
104 }; 104 };
105 105
...@@ -109,8 +109,6 @@ const tableBtnClick = (scope, btn) => { ...@@ -109,8 +109,6 @@ const tableBtnClick = (scope, btn) => {
109 currTableData.value = row; 109 currTableData.value = row;
110 if (type == "path") { 110 if (type == "path") {
111 toPath(type); 111 toPath(type);
112 } else if (type === "delete") {
113 open("此操作将永久删除,是否继续?", "warning");
114 } 112 }
115 }; 113 };
116 114
...@@ -133,32 +131,6 @@ const tablePageChange = (info) => { ...@@ -133,32 +131,6 @@ const tablePageChange = (info) => {
133 getTableData(); 131 getTableData();
134 }; 132 };
135 133
136 const open = (msg, type, isBatch = false) => {
137 ElMessageBox.confirm(msg, "提示", {
138 confirmButtonText: "确定",
139 cancelButtonText: "取消",
140 type: type,
141 }).then(() => {
142 const guids = [currTableData.value.guid];
143 listingDelete(guids).then((res: any) => {
144 if (res.code == proxy.$passCode) {
145 getFirstPageData();
146 ElMessage({
147 type: "success",
148 message: "删除成功",
149 });
150 } else {
151 ElMessage({
152 type: "error",
153 message: res.msg,
154 });
155 }
156 }).catch((res) => {
157 tableInfo.value.loading = false;
158 });
159 });
160 };
161
162 const getFirstPageData = () => { 134 const getFirstPageData = () => {
163 page.value.curr = 1 135 page.value.curr = 1
164 tableInfo.value.page.curr = 1; 136 tableInfo.value.page.curr = 1;
...@@ -176,18 +148,13 @@ onBeforeMount(() => { ...@@ -176,18 +148,13 @@ onBeforeMount(() => {
176 </script> 148 </script>
177 149
178 <template> 150 <template>
179 <div class="container_wrap" v-if="tableInfo.data.length"> 151 <div class="container_wrap" v-loading="loading">
180 <div class="table_tool_wrap"> 152 <div class="table_panel_wrap" v-if="tableInfo.data.length">
181 <div class="table_title">分类分级任务</div>
182 </div>
183 <div class="table_panel_wrap">
184 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" /> 153 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tablePageChange="tablePageChange" />
185 </div> 154 </div>
186 </div> 155 <div class="card-noData" v-else>
187 <div class="container_wrap" v-else>
188 <div class="card-noData">
189 <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' }" />
190 <p>暂无分类分级任务<span class="text_btn" @click="toPath('add')">去新建</span></p> 157 <p>暂无分类分级任务日志记录</p>
191 </div> 158 </div>
192 </div> 159 </div>
193 </template> 160 </template>
...@@ -209,7 +176,7 @@ onBeforeMount(() => { ...@@ -209,7 +176,7 @@ onBeforeMount(() => {
209 176
210 .table_panel_wrap { 177 .table_panel_wrap {
211 width: 100%; 178 width: 100%;
212 height: calc(100% - 40px); 179 height: 100%;
213 padding: 0px 8px 0; 180 padding: 0px 8px 0;
214 } 181 }
215 182
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!