7166760b by xukangle

Merge branch 'develop' into dev_20241202_xukangle

2 parents 433bc83b c2785dc2
...@@ -24,7 +24,8 @@ const props = defineProps({ ...@@ -24,7 +24,8 @@ const props = defineProps({
24 24
25 const emits = defineEmits(["expand"]); 25 const emits = defineEmits(["expand"]);
26 26
27 const isExpanded = ref(true); 27 // const isExpanded = ref(true);
28 const isExpanded = ref(props.isExpand);
28 29
29 watch( 30 watch(
30 () => props.isExpand, 31 () => props.isExpand,
...@@ -46,14 +47,10 @@ const expandSwicthHandler = () => { ...@@ -46,14 +47,10 @@ const expandSwicthHandler = () => {
46 </script> 47 </script>
47 48
48 <template> 49 <template>
49 <ElCard 50 <ElCard class="v-content-wrap" shadow="never" :body-style="{
50 class="v-content-wrap"
51 shadow="never"
52 :body-style="{
53 padding: `0px`, 51 padding: `0px`,
54 height: `${isExpanded ? contentHeight + 28 : 0}px`, 52 height: `${isExpanded ? contentHeight + 28 : 0}px`,
55 }" 53 }">
56 >
57 <template v-if="title" #header> 54 <template v-if="title" #header>
58 <div class="card-title" @click="expandSwicthHandler"> 55 <div class="card-title" @click="expandSwicthHandler">
59 <span v-if="expandSwicth" style="padding-right: 5px; cursor: pointer"> 56 <span v-if="expandSwicth" style="padding-right: 5px; cursor: pointer">
......
...@@ -15,7 +15,7 @@ const { required, orderNum } = useValidator(); ...@@ -15,7 +15,7 @@ const { required, orderNum } = useValidator();
15 const { proxy } = getCurrentInstance() as any; 15 const { proxy } = getCurrentInstance() as any;
16 const router = useRouter(); 16 const router = useRouter();
17 const route = useRoute(); 17 const route = useRoute();
18 const fullPath = route.query.fullPath; 18 const fullPath = route.fullPath;
19 const userStore = useUserStore(); 19 const userStore = useUserStore();
20 20
21 const fullscreenLoading = ref(false); 21 const fullscreenLoading = ref(false);
...@@ -501,6 +501,7 @@ const saveUpdate = async () => { ...@@ -501,6 +501,7 @@ const saveUpdate = async () => {
501 }); 501 });
502 saveLoading.value = false; 502 saveLoading.value = false;
503 } else { 503 } else {
504 saveLoading.value = false;
504 proxy.$ElMessage.error(res.msg); 505 proxy.$ElMessage.error(res.msg);
505 } 506 }
506 } 507 }
...@@ -517,6 +518,8 @@ const changeShowMethod = () => { ...@@ -517,6 +518,8 @@ const changeShowMethod = () => {
517 } 518 }
518 519
519 const cancel = () => { 520 const cancel = () => {
521 console.log(userStore.tabbar);
522 console.log(fullPath);
520 proxy.$openMessageBox("当前页面尚未保存,确定放弃修改吗?", () => { 523 proxy.$openMessageBox("当前页面尚未保存,确定放弃修改吗?", () => {
521 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath)); 524 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
522 router.push({ 525 router.push({
...@@ -673,7 +676,7 @@ const initGraph = () => { ...@@ -673,7 +676,7 @@ const initGraph = () => {
673 }, 676 },
674 getHGap: function getHGap() { 677 getHGap: function getHGap() {
675 return 80; 678 return 80;
676 } 679 },
677 } 680 }
678 }); 681 });
679 graph.data(shapeTreeListData.value[0]); 682 graph.data(shapeTreeListData.value[0]);
...@@ -799,12 +802,16 @@ onMounted(() => { ...@@ -799,12 +802,16 @@ onMounted(() => {
799 // }); 802 // });
800 }) 803 })
801 804
805 const isExpand = ref<boolean>(router.currentRoute.value.query.isExpand == 'true');
806
807
802 </script> 808 </script>
803 809
804 <template> 810 <template>
805 <div class="container_wrap" v-loading="fullscreenLoading"> 811 <div class="container_wrap" v-loading="fullscreenLoading">
806 <div class="content_main"> 812 <div class="content_main">
807 <ContentWrap id="id-baseInfo" title="基础信息" description="" style="margin-top: 8px;"> 813 <ContentWrap id="id-baseInfo" title="基础信息" description="" style="margin-top: 8px;" :expandSwicth="true"
814 :isExpand="isExpand">
808 <Form ref="formRef" :itemList="classStandardFormItems" formId="main-model-edit" col="col3" /> 815 <Form ref="formRef" :itemList="classStandardFormItems" formId="main-model-edit" col="col3" />
809 </ContentWrap> 816 </ContentWrap>
810 <ContentWrap id="id-classStandard" class="detail-content" title="分类标准" description="" 817 <ContentWrap id="id-classStandard" class="detail-content" title="分类标准" description=""
...@@ -852,6 +859,7 @@ onMounted(() => { ...@@ -852,6 +859,7 @@ onMounted(() => {
852 .content_main { 859 .content_main {
853 height: calc(100% - 44px); 860 height: calc(100% - 44px);
854 padding: 10px 16px; 861 padding: 10px 16px;
862 overflow: auto;
855 } 863 }
856 864
857 .bottom_tool_wrap { 865 .bottom_tool_wrap {
...@@ -870,6 +878,7 @@ onMounted(() => { ...@@ -870,6 +878,7 @@ onMounted(() => {
870 878
871 .card-body-content { 879 .card-body-content {
872 height: 100%; 880 height: 100%;
881 overflow: auto;
873 } 882 }
874 } 883 }
875 } 884 }
...@@ -885,11 +894,11 @@ onMounted(() => { ...@@ -885,11 +894,11 @@ onMounted(() => {
885 } 894 }
886 895
887 .shape-main { 896 .shape-main {
888 height: calc(100% - 160px); 897 height: calc(100% - 44px);
889 } 898 }
890 899
891 .table_panel { 900 .table_panel {
892 height: calc(100% - 160px) !important; 901 height: calc(100% - 44px) !important;
893 } 902 }
894 903
895 .node-details-popup { 904 .node-details-popup {
......
...@@ -10,7 +10,7 @@ import { saveGrade, getGradeList, deleteGrade, getLargeCategoryList, updateGrade ...@@ -10,7 +10,7 @@ import { saveGrade, getGradeList, deleteGrade, getLargeCategoryList, updateGrade
10 import useUserStore from "@/store/modules/user"; 10 import useUserStore from "@/store/modules/user";
11 const userStore = useUserStore(); 11 const userStore = useUserStore();
12 const route = useRoute(); 12 const route = useRoute();
13 const fullPath = route.query.fullPath; 13 const fullPath = route.fullPath;
14 onBeforeMount(() => { 14 onBeforeMount(() => {
15 getGradeListData(); 15 getGradeListData();
16 getDataGrade(); 16 getDataGrade();
...@@ -114,7 +114,7 @@ const tableInfo = ref({ ...@@ -114,7 +114,7 @@ const tableInfo = ref({
114 multiple: true, 114 multiple: true,
115 fields: [ 115 fields: [
116 { label: "序号", type: 'index', width: 56, align: "center" }, 116 { label: "序号", type: 'index', width: 56, align: "center" },
117 { label: "排序", field: 'orderNum', width: 56, align: "center" }, 117 // { label: "排序", field: 'orderNum', width: 56, align: "center" },
118 { 118 {
119 label: "数据级别", field: "dataGrade", width: 120, getName: (scope) => { 119 label: "数据级别", field: "dataGrade", width: 120, getName: (scope) => {
120 let dataGrade = scope.row.dataGrade; 120 let dataGrade = scope.row.dataGrade;
...@@ -140,7 +140,7 @@ const tableInfo = ref({ ...@@ -140,7 +140,7 @@ const tableInfo = ref({
140 console.log(scope); 140 console.log(scope);
141 filterDataGradeEdit(scope.row.dataGrade); 141 filterDataGradeEdit(scope.row.dataGrade);
142 newCreateGradeStandardDialogInfo.value.visible = true; 142 newCreateGradeStandardDialogInfo.value.visible = true;
143 newCreateGradeStandardDialogInfo.value.title = '编辑分类'; 143 newCreateGradeStandardDialogInfo.value.title = '编辑标准';
144 newCreateGradeFormItems.value.forEach(item => { 144 newCreateGradeFormItems.value.forEach(item => {
145 item.default = scope.row[item.field]; 145 item.default = scope.row[item.field];
146 }) 146 })
...@@ -231,7 +231,7 @@ const newCreateGradeFormItems = ref([{ ...@@ -231,7 +231,7 @@ const newCreateGradeFormItems = ref([{
231 visible: true, 231 visible: true,
232 }, 232 },
233 { 233 {
234 label: '序号', 234 label: '序号',
235 type: 'input', 235 type: 'input',
236 maxlength: 19, 236 maxlength: 19,
237 placeholder: '请输入', 237 placeholder: '请输入',
...@@ -268,7 +268,7 @@ const newCreateGradeFormRules = ref({ ...@@ -268,7 +268,7 @@ const newCreateGradeFormRules = ref({
268 const newCreateGradeStandardDialogInfo = ref({ 268 const newCreateGradeStandardDialogInfo = ref({
269 visible: false, 269 visible: false,
270 size: 860, 270 size: 860,
271 title: "添加分类", 271 title: "新增标准",
272 type: "", 272 type: "",
273 formInfo: { 273 formInfo: {
274 id: "grade-form", 274 id: "grade-form",
...@@ -281,9 +281,8 @@ const newCreateGradeStandardDialogInfo = ref({ ...@@ -281,9 +281,8 @@ const newCreateGradeStandardDialogInfo = ref({
281 newCreateGradeStandardDialogInfo.value.visible = false; 281 newCreateGradeStandardDialogInfo.value.visible = false;
282 }, 282 },
283 submit: async (btn, info) => { 283 submit: async (btn, info) => {
284 console.log(info, guid);
285 newCreateGradeStandardDialogInfo.value.submitBtnLoading = true; 284 newCreateGradeStandardDialogInfo.value.submitBtnLoading = true;
286 if (newCreateGradeStandardDialogInfo.value.title === '编辑分类') { 285 if (newCreateGradeStandardDialogInfo.value.title === '编辑标准') {
287 const params = { 286 const params = {
288 ...info, 287 ...info,
289 guid: editClassifyGradeGuid.value, 288 guid: editClassifyGradeGuid.value,
...@@ -294,7 +293,7 @@ const newCreateGradeStandardDialogInfo = ref({ ...@@ -294,7 +293,7 @@ const newCreateGradeStandardDialogInfo = ref({
294 if (res.code == proxy.$passCode) { 293 if (res.code == proxy.$passCode) {
295 proxy.$ElMessage({ 294 proxy.$ElMessage({
296 type: 'success', 295 type: 'success',
297 message: '修改分类成功' 296 message: '编辑标准成功'
298 }) 297 })
299 getGradeListData(); 298 getGradeListData();
300 newCreateGradeStandardDialogInfo.value.submitBtnLoading = false; 299 newCreateGradeStandardDialogInfo.value.submitBtnLoading = false;
...@@ -312,7 +311,7 @@ const newCreateGradeStandardDialogInfo = ref({ ...@@ -312,7 +311,7 @@ const newCreateGradeStandardDialogInfo = ref({
312 if (res.code == proxy.$passCode) { 311 if (res.code == proxy.$passCode) {
313 proxy.$ElMessage({ 312 proxy.$ElMessage({
314 type: 'success', 313 type: 'success',
315 message: '新增分类成功' 314 message: '新增标准成功'
316 }) 315 })
317 getGradeListData(); 316 getGradeListData();
318 newCreateGradeStandardDialogInfo.value.submitBtnLoading = false; 317 newCreateGradeStandardDialogInfo.value.submitBtnLoading = false;
...@@ -369,6 +368,7 @@ const saveUpdate = async () => { ...@@ -369,6 +368,7 @@ const saveUpdate = async () => {
369 }); 368 });
370 saveLoading.value = false; 369 saveLoading.value = false;
371 } else { 370 } else {
371 saveLoading.value = false;
372 proxy.$ElMessage.error(res.msg); 372 proxy.$ElMessage.error(res.msg);
373 } 373 }
374 } 374 }
...@@ -417,6 +417,7 @@ const cancel = () => { ...@@ -417,6 +417,7 @@ const cancel = () => {
417 .content_main { 417 .content_main {
418 height: calc(100% - 44px); 418 height: calc(100% - 44px);
419 padding: 10px 16px; 419 padding: 10px 16px;
420 overflow: auto;
420 421
421 .table-top-btns { 422 .table-top-btns {
422 margin-bottom: 12px; 423 margin-bottom: 12px;
......
...@@ -5,18 +5,12 @@ ...@@ -5,18 +5,12 @@
5 <script lang="ts" setup name="taskConfig"> 5 <script lang="ts" setup name="taskConfig">
6 import { ref, onMounted } from "vue"; 6 import { ref, onMounted } from "vue";
7 import { useRouter, useRoute } from "vue-router"; 7 import { useRouter, useRoute } from "vue-router";
8 import useUserStore from "@/store/modules/user";
9 import { ElMessage, ElMessageBox } from "element-plus"; 8 import { ElMessage, ElMessageBox } from "element-plus";
10
11 import useDataAssetStore from "@/store/modules/dataAsset";
12 import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory"; 9 import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory";
13 import { TableColumnWidth } from '@/utils/enum'; 10 import { TableColumnWidth } from '@/utils/enum';
14 11
15 const { proxy } = getCurrentInstance() as any; 12 const { proxy } = getCurrentInstance() as any;
16 const router = useRouter(); 13 const router = useRouter();
17 const userStore = useUserStore();
18 const userData = JSON.parse(userStore.userData);
19 const assetStore = useDataAssetStore();
20 14
21 const loading = ref(false); 15 const loading = ref(false);
22 const page = ref({ 16 const page = ref({
...@@ -159,7 +153,7 @@ const toPath = (type) => { ...@@ -159,7 +153,7 @@ const toPath = (type) => {
159 query: { 153 query: {
160 guid: currTableData.value.guid, 154 guid: currTableData.value.guid,
161 name: currTableData.value.taskName, 155 name: currTableData.value.taskName,
162 detail: JSON.stringify(currTableData.value), 156 execGuid: currTableData.value.execGuid,
163 type 157 type
164 }, 158 },
165 }); 159 });
......
...@@ -5,13 +5,12 @@ ...@@ -5,13 +5,12 @@
5 <script lang="ts" setup name="taskDetail"> 5 <script lang="ts" setup name="taskDetail">
6 import { ref, onMounted } from "vue"; 6 import { ref, onMounted } from "vue";
7 import { useRouter, useRoute } from "vue-router"; 7 import { useRouter, useRoute } from "vue-router";
8 import useUserStore from "@/store/modules/user";
9 import { ElMessage, ElMessageBox } from "element-plus"; 8 import { ElMessage, ElMessageBox } from "element-plus";
10 import { Search, Warning } from "@element-plus/icons-vue"; 9 import { Search, Warning } from "@element-plus/icons-vue";
11 import { setItemsDisabled, tagMethod, tagType, changeNum, } from "@/utils/common"; 10 import { tagMethod, tagType, changeNum } from "@/utils/common";
12 import useDataAssetStore from "@/store/modules/dataAsset";
13 import TableTools from '@/components/Tools/table_tools.vue'; 11 import TableTools from '@/components/Tools/table_tools.vue';
14 import { 12 import {
13 getCgTaskDetail,
15 getTaskExeTreeList, 14 getTaskExeTreeList,
16 getTaskFieldCount, 15 getTaskFieldCount,
17 execTaskFieldList, 16 execTaskFieldList,
...@@ -26,22 +25,17 @@ import { ...@@ -26,22 +25,17 @@ import {
26 const { proxy } = getCurrentInstance() as any; 25 const { proxy } = getCurrentInstance() as any;
27 const router = useRouter(); 26 const router = useRouter();
28 const route = useRoute(); 27 const route = useRoute();
29 const userStore = useUserStore();
30 const userData = JSON.parse(userStore.userData);
31 const assetStore = useDataAssetStore();
32 const detailData = JSON.parse(route.query.detail);
33 28
29 const loading = ref(false);
34 const gradeList = ref([]); 30 const gradeList = ref([]);
35 const treeData = ref([ 31 const treeData = ref([
36 { 32 {
37 classifyName: "全部", 33 classifyName: "全部",
38 guid: "all", 34 classifyDetailGuid: "all",
39 children: [ 35 children: [],
40 { classifyName: '未分类', guid: 'unclassified' }
41 ],
42 }, 36 },
43 ]); 37 ]);
44 const currTreeNode = ref({ classifyName: "全部", guid: "all" }) 38 const currTreeNode = ref({ classifyName: "全部", classifyDetailGuid: "all" })
45 const treeInfoRef = ref(); 39 const treeInfoRef = ref();
46 const treeInfo: any = ref({ 40 const treeInfo: any = ref({
47 id: "data-pickup-tree", 41 id: "data-pickup-tree",
...@@ -50,9 +44,9 @@ const treeInfo: any = ref({ ...@@ -50,9 +44,9 @@ const treeInfo: any = ref({
50 queryPlaceholder: "输入组织名称搜索", 44 queryPlaceholder: "输入组织名称搜索",
51 props: { 45 props: {
52 label: "classifyName", 46 label: "classifyName",
53 value: "guid", 47 value: "classifyDetailGuid",
54 }, 48 },
55 nodeKey: 'guid', 49 nodeKey: 'classifyDetailGuid',
56 expandedKey: [], 50 expandedKey: [],
57 expandOnNodeClick: false, 51 expandOnNodeClick: false,
58 data: [], 52 data: [],
...@@ -69,6 +63,7 @@ const tabsInfo = ref({ ...@@ -69,6 +63,7 @@ const tabsInfo = ref({
69 }); 63 });
70 const cascaderRef = ref(); 64 const cascaderRef = ref();
71 const sheetParams = ref({}); 65 const sheetParams = ref({});
66 const sheetSearchRef = ref();
72 const sheetItemList = ref([ 67 const sheetItemList = ref([
73 { 68 {
74 type: "select", 69 type: "select",
...@@ -99,6 +94,7 @@ const sheetItemList = ref([ ...@@ -99,6 +94,7 @@ const sheetItemList = ref([
99 }, 94 },
100 ]); 95 ]);
101 const fieldParams = ref({}); 96 const fieldParams = ref({});
97 const fieldSearchRef = ref();
102 const fieldItemList = ref([ 98 const fieldItemList = ref([
103 { 99 {
104 type: "select", 100 type: "select",
...@@ -165,7 +161,7 @@ const fieldItemList = ref([ ...@@ -165,7 +161,7 @@ const fieldItemList = ref([
165 checkStrictly: true, 161 checkStrictly: true,
166 expandTrigger: "hover", 162 expandTrigger: "hover",
167 label: "classifyName", 163 label: "classifyName",
168 value: "guid", 164 value: "classifyDetailGuid",
169 }, 165 },
170 filterable: true, 166 filterable: true,
171 clearable: true, 167 clearable: true,
...@@ -250,7 +246,7 @@ const fieldTableInfo = ref({ ...@@ -250,7 +246,7 @@ const fieldTableInfo = ref({
250 checkStrictly: false, 246 checkStrictly: false,
251 expandTrigger: "hover", 247 expandTrigger: "hover",
252 label: "classifyName", 248 label: "classifyName",
253 value: "guid", 249 value: "classifyDetailGuid",
254 }, 250 },
255 filterable: true, 251 filterable: true,
256 clearable: true, 252 clearable: true,
...@@ -301,7 +297,7 @@ const formItems = ref([ ...@@ -301,7 +297,7 @@ const formItems = ref([
301 checkStrictly: false, 297 checkStrictly: false,
302 expandTrigger: "hover", 298 expandTrigger: "hover",
303 label: "classifyName", 299 label: "classifyName",
304 value: "guid", 300 value: "classifyDetailGuid",
305 }, 301 },
306 filterable: true, 302 filterable: true,
307 clearable: true, 303 clearable: true,
...@@ -363,6 +359,29 @@ const dialogInfo: any = ref({ ...@@ -363,6 +359,29 @@ const dialogInfo: any = ref({
363 }, 359 },
364 }) 360 })
365 361
362 // 获取任务详情
363 const getTaskDetail = (param) => {
364 loading.value = true;
365 getCgTaskDetail(param).then((res: any) => {
366 loading.value = false;
367 if (res.code == proxy.$passCode) {
368 taskDetail.value = res.data || {};
369 getFieldCount()
370 getSheetFieldList({ type: 1 });
371 getFieldTree()
372 getGradeData();
373 nextTick(() => {
374 getSheetTableData();
375 getFieldTableData();
376 })
377 } else {
378 ElMessage.error(res.msg);
379 }
380 }).catch(() => {
381 loading.value = false;
382 })
383 }
384
366 // 获取字段统计 385 // 获取字段统计
367 const getFieldCount = () => { 386 const getFieldCount = () => {
368 getTaskFieldCount({ execGuid: taskDetail.value.execGuid }).then((res: any) => { 387 getTaskFieldCount({ execGuid: taskDetail.value.execGuid }).then((res: any) => {
...@@ -398,13 +417,16 @@ const getFieldTree = () => { ...@@ -398,13 +417,16 @@ const getFieldTree = () => {
398 treeInfo.value.loading = false; 417 treeInfo.value.loading = false;
399 if (res.code == proxy.$passCode) { 418 if (res.code == proxy.$passCode) {
400 const data = res.data || []; 419 const data = res.data || [];
401 treeData.value[0].children.splice(1); 420 const children: any = [
402 treeData.value[0].children.push(...data); 421 { classifyName: '未分类', classifyDetailGuid: 'unclassified' },
422 ...data
423 ]
424 treeData.value[0].children = children;
403 treeInfo.value.data = treeData.value; 425 treeInfo.value.data = treeData.value;
404 treeInfo.value.expandedKey = ['all']; 426 treeInfo.value.expandedKey = ['all'];
405 treeInfoRef.value.setCurrentKey('all'); 427 treeInfoRef.value.setCurrentKey('all');
406 formItems.value[0].options = JSON.parse(JSON.stringify(data)); 428 formItems.value[0].options = JSON.parse(JSON.stringify(data));
407 fieldItemList.value[4].options = JSON.parse(JSON.stringify(data)); 429 fieldItemList.value[4].options = JSON.parse(JSON.stringify(children));
408 fieldTableInfo.value.fields[4].options = JSON.parse(JSON.stringify(data)); 430 fieldTableInfo.value.fields[4].options = JSON.parse(JSON.stringify(data));
409 } else { 431 } else {
410 ElMessage.error(res.msg); 432 ElMessage.error(res.msg);
...@@ -444,25 +466,26 @@ const tabChange = (val) => { ...@@ -444,25 +466,26 @@ const tabChange = (val) => {
444 tabsInfo.value.activeName = val; 466 tabsInfo.value.activeName = val;
445 } 467 }
446 468
447 const nodeClick = (data) => { 469 const nodeClick = (data, node) => {
448 currTreeNode.value = data; 470 currTreeNode.value = data;
449 if (data.guid == 'all') { 471 if (data.classifyDetailGuid == 'all') {
450 getFieldTableData({ isClassify: '' }) 472 fieldItemList.value[4].default = [];
451 } else if (data.guid == 'unclassified') { 473 getFieldTableData()
452 getFieldTableData({ isClassify: 'N' })
453 } else { 474 } else {
454 getFieldTableData({ isClassify: 'Y', classifyDetail: data.guid });
455 const parentGuids = data.parentGuids || []; 475 const parentGuids = data.parentGuids || [];
456 parentGuids.push(data.guid) 476 parentGuids.push(data.classifyDetailGuid)
457 fieldItemList.value[4].default = parentGuids; 477 fieldItemList.value[4].default = parentGuids;
478 console.log('tree', parentGuids)
479 getFieldTableData();
458 } 480 }
459 } 481 }
460 482
461 // 获取库表数据 483 // 获取库表数据
462 const getSheetTableData = () => { 484 const getSheetTableData = () => {
463 sheetTableInfo.value.loading = true; 485 sheetTableInfo.value.loading = true;
486 const sheetParams = sheetSearchRef.value.toolSearch.formInline || {};
464 execTaskSheetList( 487 execTaskSheetList(
465 Object.assign({}, { ...sheetParams.value }, { 488 Object.assign({}, { ...sheetParams }, {
466 execGuid: taskDetail.value.execGuid, 489 execGuid: taskDetail.value.execGuid,
467 pageIndex: sheetTableInfo.value.page.curr, 490 pageIndex: sheetTableInfo.value.page.curr,
468 pageSize: sheetTableInfo.value.page.limit, 491 pageSize: sheetTableInfo.value.page.limit,
...@@ -484,15 +507,20 @@ const getSheetTableData = () => { ...@@ -484,15 +507,20 @@ const getSheetTableData = () => {
484 }; 507 };
485 508
486 // 获取字段表格数据 509 // 获取字段表格数据
487 const getFieldTableData = (param: any = {}) => { 510 const getFieldTableData = () => {
488 fieldTableInfo.value.loading = true; 511 fieldTableInfo.value.loading = true;
512 const fieldParams = fieldSearchRef.value.toolSearch.formInline || {};
489 let params: any = { 513 let params: any = {
490 ...fieldParams.value, 514 ...fieldParams,
491 ...param,
492 execGuid: taskDetail.value.execGuid, 515 execGuid: taskDetail.value.execGuid,
493 pageIndex: fieldTableInfo.value.page.curr, 516 pageIndex: fieldTableInfo.value.page.curr,
494 pageSize: fieldTableInfo.value.page.limit, 517 pageSize: fieldTableInfo.value.page.limit,
495 } 518 }
519 const classifyName = params.classifyName?.at(-1) || undefined;
520 params.isClassify = classifyName === undefined ? '' : classifyName == 'unclassified' ? 'N' : 'Y';
521 if (classifyName && classifyName != 'unclassified') {
522 params.classifyDetail = classifyName;
523 }
496 delete params.classifyName 524 delete params.classifyName
497 execTaskFieldList(params).then((res: any) => { 525 execTaskFieldList(params).then((res: any) => {
498 fieldTableInfo.value.loading = false; 526 fieldTableInfo.value.loading = false;
...@@ -542,7 +570,7 @@ const tableBtnClick = (scope, btn) => { ...@@ -542,7 +570,7 @@ const tableBtnClick = (scope, btn) => {
542 treeInfo.value.expandedKey = ['all']; 570 treeInfo.value.expandedKey = ['all'];
543 treeInfoRef.value.setCurrentKey('all'); 571 treeInfoRef.value.setCurrentKey('all');
544 getSheetFieldList({ type: 2, databaseGuid: row.databaseGuid }, row.tableGuid); 572 getSheetFieldList({ type: 2, databaseGuid: row.databaseGuid }, row.tableGuid);
545 getFieldTableData({ databaseGuid: row.databaseGuid, tableGuid: row.tableGuid }); 573 getFieldTableData();
546 } else if (type == "edit") { 574 } else if (type == "edit") {
547 row.STATE = 'Running'; 575 row.STATE = 'Running';
548 } else if (type == 'save') { 576 } else if (type == 'save') {
...@@ -573,8 +601,8 @@ const tablePageChange = (info) => { ...@@ -573,8 +601,8 @@ const tablePageChange = (info) => {
573 sheetTableInfo.value.page.curr = Number(info.curr); 601 sheetTableInfo.value.page.curr = Number(info.curr);
574 getSheetTableData(); 602 getSheetTableData();
575 } else { 603 } else {
576 fieldTableInfo.value.page.limit = page.value.limit; 604 fieldTableInfo.value.page.limit = Number(info.limit);
577 fieldTableInfo.value.page.curr = page.value.curr; 605 fieldTableInfo.value.page.curr = Number(info.curr);
578 getFieldTableData(); 606 getFieldTableData();
579 } 607 }
580 }; 608 };
...@@ -602,27 +630,35 @@ const btnClick = async (btn, bType = null) => { ...@@ -602,27 +630,35 @@ const btnClick = async (btn, bType = null) => {
602 630
603 // 保存字段 631 // 保存字段
604 const saveFields = (params, isBatch = false) => { 632 const saveFields = (params, isBatch = false) => {
633 loading.value = true;
605 execFieldConfirm(params).then((res: any) => { 634 execFieldConfirm(params).then((res: any) => {
635 loading.value = false;
606 if (res.code == proxy.$passCode) { 636 if (res.code == proxy.$passCode) {
607 ElMessage.success('保存成功'); 637 ElMessage.success('保存成功');
608 isBatch && getFieldTableData(); 638 isBatch && getFieldTableData();
609 } else { 639 } else {
610 ElMessage.error(res.msg); 640 ElMessage.error(res.msg);
611 } 641 }
642 }).catch(() => {
643 loading.value = false;
612 }) 644 })
613 } 645 }
614 646
615 // 任务确认 647 // 任务确认
616 const saveTask = () => { 648 const saveTask = () => {
649 loading.value = true;
617 execTaskConfirm({ execGuid: taskDetail.value.execGuid }).then((res: any) => { 650 execTaskConfirm({ execGuid: taskDetail.value.execGuid }).then((res: any) => {
651 loading.value = false;
618 if (res.code == proxy.$passCode) { 652 if (res.code == proxy.$passCode) {
619 ElMessage.success('保存成功'); 653 ElMessage.success('变更成功');
620 router.push({ 654 router.push({
621 name: "taskConfig", 655 name: "taskConfig",
622 }); 656 });
623 } else { 657 } else {
624 ElMessage.error(res.msg); 658 ElMessage.error(res.msg);
625 } 659 }
660 }).catch(() => {
661 loading.value = false;
626 }) 662 })
627 } 663 }
628 664
...@@ -644,7 +680,10 @@ const searchField = (val: any, clear: boolean = false) => { ...@@ -644,7 +680,10 @@ const searchField = (val: any, clear: boolean = false) => {
644 }; 680 };
645 681
646 const cascaderChange = (val, row) => { 682 const cascaderChange = (val, row) => {
647 console.log(val, row); 683 treeInfoRef.value.expandedKey = val || ['all'];
684 treeInfoRef.value.setCurrentKey(val?.at(-1) || 'all');
685 console.log('cascader', val)
686 getFieldTableData();
648 }; 687 };
649 688
650 const selectChange = (val, item, scope = null) => { 689 const selectChange = (val, item, scope = null) => {
...@@ -716,28 +755,30 @@ onActivated(() => { ...@@ -716,28 +755,30 @@ onActivated(() => {
716 }) 755 })
717 756
718 onBeforeMount(() => { 757 onBeforeMount(() => {
719 taskDetail.value = detailData; 758 if (route.query.type == 'log') {
720 getFieldCount() 759 getTaskDetail({ guid: route.query.guid, execGuid: route.query.execGuid });
721 getSheetFieldList({ type: 1 }); 760 } else {
722 getFieldTree() 761 getTaskDetail({ guid: route.query.guid });
723 getSheetTableData(); 762 }
724 getFieldTableData(); 763 })
725 getGradeData(); 764
765 onMounted(() => {
766
726 }) 767 })
727 768
728 </script> 769 </script>
729 770
730 <template> 771 <template>
731 <div class="container_wrap full flex"> 772 <div class="container_wrap full flex" v-loading="loading">
732 <div class="main_wrap full"> 773 <div class="main_wrap full">
733 <div class="content_main panel"> 774 <div class="content_main panel">
734 <div class="template_panel"> 775 <div class="template_panel">
735 <div class="panel_title"> 776 <div class="panel_title">
736 <div class="title_wrap"> 777 <div class="title_wrap">
737 <span class="title_text">{{ taskDetail.taskName }}</span> 778 <span class="title_text">{{ taskDetail.taskName }}</span>
738 <el-tag :type="taskDetail.confirmStatus == 'Y' ? 'success' : 'warning'">{{ 779 <el-tag :type="taskDetail.confirmStatus == 'Y' ? 'success' : 'warning'">
739 filterVal(taskDetail.confirmStatus, 780 {{ filterVal(taskDetail.confirmStatus, 'confirmStatus') }}
740 'confirmStatus') }}</el-tag> 781 </el-tag>
741 </div> 782 </div>
742 </div> 783 </div>
743 <div class="title_desc"> 784 <div class="title_desc">
...@@ -749,17 +790,17 @@ onBeforeMount(() => { ...@@ -749,17 +790,17 @@ onBeforeMount(() => {
749 </div> 790 </div>
750 <div class="desc_item"> 791 <div class="desc_item">
751 <span class="desc_label">执行时间:</span> 792 <span class="desc_label">执行时间:</span>
752 <span class="desc_value">{{ taskDetail.cgDirName || '--' }}</span> 793 <span class="desc_value">{{ taskDetail.updateTime || '--' }}</span>
753 </div> 794 </div>
754 </div> 795 </div>
755 <div class="desc_group"> 796 <div class="desc_group">
756 <div class="desc_item"> 797 <div class="desc_item">
757 <span class="desc_label">分类:</span> 798 <span class="desc_label">分类:</span>
758 <span class="desc_value text_btn">{{ taskDetail.classifyName || '--' }}</span> 799 <span class="desc_value">{{ taskDetail.classifyName || '--' }}</span>
759 </div> 800 </div>
760 <div class="desc_item"> 801 <div class="desc_item">
761 <span class="desc_label">分级:</span> 802 <span class="desc_label">分级:</span>
762 <span class="desc_value text_btn">{{ taskDetail.gradeName || '--' }}</span> 803 <span class="desc_value">{{ taskDetail.gradeName || '--' }}</span>
763 </div> 804 </div>
764 <div class="desc_item"> 805 <div class="desc_item">
765 <span class="desc_label">元数据名称:</span> 806 <span class="desc_label">元数据名称:</span>
...@@ -787,7 +828,7 @@ onBeforeMount(() => { ...@@ -787,7 +828,7 @@ onBeforeMount(() => {
787 <Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" /> 828 <Tabs class="panel_tabs" :tabs-info="tabsInfo" @tab-change="tabChange" />
788 <div class="panel" v-show="tabsInfo.activeName == 'sheet'"> 829 <div class="panel" v-show="tabsInfo.activeName == 'sheet'">
789 <div class="table_tool_wrap"> 830 <div class="table_tool_wrap">
790 <TableTools :searchItems="sheetItemList" :searchId="'sheet-search'" :init="false" 831 <TableTools ref="sheetSearchRef" :searchItems="sheetItemList" :searchId="'sheet-search'" :init="false"
791 @selectChange="selectChange" @search="searchSheet" /> 832 @selectChange="selectChange" @search="searchSheet" />
792 </div> 833 </div>
793 <div class="table_panel_wrap"> 834 <div class="table_panel_wrap">
...@@ -800,7 +841,7 @@ onBeforeMount(() => { ...@@ -800,7 +841,7 @@ onBeforeMount(() => {
800 </div> 841 </div>
801 <div class="box_right"> 842 <div class="box_right">
802 <div class="table_tool_wrap"> 843 <div class="table_tool_wrap">
803 <TableTools :searchItems="fieldItemList" :searchId="'field-search'" :init="false" 844 <TableTools ref="fieldSearchRef" :searchItems="fieldItemList" :searchId="'field-search'" :init="false"
804 @selectChange="selectChange" @cascaderChange="cascaderChange" @search="searchField" /> 845 @selectChange="selectChange" @cascaderChange="cascaderChange" @search="searchField" />
805 <div class="tools_btns"> 846 <div class="tools_btns">
806 <div class="btns"> 847 <div class="btns">
......
...@@ -5,18 +5,13 @@ ...@@ -5,18 +5,13 @@
5 <script lang="ts" setup name="taskEdit"> 5 <script lang="ts" setup name="taskEdit">
6 import { ref, onMounted } from "vue"; 6 import { ref, onMounted } from "vue";
7 import { useRouter, useRoute } from "vue-router"; 7 import { useRouter, useRoute } from "vue-router";
8 import useUserStore from "@/store/modules/user";
9 import { ElMessage, ElMessageBox } from "element-plus"; 8 import { ElMessage, ElMessageBox } from "element-plus";
10 import { Search } from "@element-plus/icons-vue"; 9 import { Search } from "@element-plus/icons-vue";
11 import useDataAssetStore from "@/store/modules/dataAsset";
12 import { getCgTaskDetail, getClassifyGradList, getClassifyTreeList, getCgLabelPageList, getMetaTableCollectList, cgTaskSave, cgTaskUpdate } from "@/api/modules/dataInventory"; 10 import { getCgTaskDetail, getClassifyGradList, getClassifyTreeList, getCgLabelPageList, getMetaTableCollectList, cgTaskSave, cgTaskUpdate } from "@/api/modules/dataInventory";
13 11
14 const { proxy } = getCurrentInstance() as any; 12 const { proxy } = getCurrentInstance() as any;
15 const router = useRouter(); 13 const router = useRouter();
16 const route = useRoute(); 14 const route = useRoute();
17 const userStore = useUserStore();
18 const userData = JSON.parse(userStore.userData);
19 const assetStore = useDataAssetStore();
20 15
21 const step = ref(0); 16 const step = ref(0);
22 const selectIndex = ref(0); 17 const selectIndex = ref(0);
......
...@@ -5,20 +5,13 @@ ...@@ -5,20 +5,13 @@
5 <script lang="ts" setup name="taskLog"> 5 <script lang="ts" setup name="taskLog">
6 import { ref, onMounted } from "vue"; 6 import { ref, onMounted } from "vue";
7 import { useRouter, useRoute } from "vue-router"; 7 import { useRouter, useRoute } from "vue-router";
8 import useUserStore from "@/store/modules/user";
9 import { ElMessage, ElMessageBox } from "element-plus"; 8 import { ElMessage, ElMessageBox } from "element-plus";
10
11 import useDataAssetStore from "@/store/modules/dataAsset";
12 import { getTaskExecPageList, filterVal } from "@/api/modules/dataInventory"; 9 import { getTaskExecPageList, filterVal } from "@/api/modules/dataInventory";
13 import { TableColumnWidth } from '@/utils/enum'; 10 import { TableColumnWidth } from '@/utils/enum';
14 11
15 const { proxy } = getCurrentInstance() as any; 12 const { proxy } = getCurrentInstance() as any;
16 const router = useRouter(); 13 const router = useRouter();
17 const route = useRoute(); 14 const route = useRoute();
18 const userStore = useUserStore();
19 const userData = JSON.parse(userStore.userData);
20 const assetStore = useDataAssetStore();
21
22 const loading = ref(false); 15 const loading = ref(false);
23 const page = ref({ 16 const page = ref({
24 limit: 50, 17 limit: 50,
...@@ -71,12 +64,11 @@ const tableInfo = ref({ ...@@ -71,12 +64,11 @@ const tableInfo = ref({
71 actionInfo: { 64 actionInfo: {
72 label: "操作", 65 label: "操作",
73 type: "btn", 66 type: "btn",
74 width: 100, 67 width: 90,
75 btns: (scope) => { 68 btns: (scope) => {
76 let row = scope.row, btnArr: any = [ 69 return [
77 { label: "查看结果", value: "path" }, 70 { label: "查看结果", value: "log" },
78 ]; 71 ];
79 return btnArr;
80 }, 72 },
81 }, 73 },
82 }); 74 });
...@@ -107,7 +99,7 @@ const tableBtnClick = (scope, btn) => { ...@@ -107,7 +99,7 @@ const tableBtnClick = (scope, btn) => {
107 const type = btn.value; 99 const type = btn.value;
108 const row = scope.row; 100 const row = scope.row;
109 currTableData.value = row; 101 currTableData.value = row;
110 if (type == "path") { 102 if (type == "log") {
111 toPath(type); 103 toPath(type);
112 } 104 }
113 }; 105 };
...@@ -116,8 +108,9 @@ const toPath = (type) => { ...@@ -116,8 +108,9 @@ const toPath = (type) => {
116 router.push({ 108 router.push({
117 name: "taskDetail", 109 name: "taskDetail",
118 query: { 110 query: {
119 guid: currTableData.value.guid, 111 guid: currTableData.value.taskGuid,
120 name: currTableData.value.damName, 112 name: currTableData.value.taskName,
113 execGuid: currTableData.value.guid,
121 type 114 type
122 }, 115 },
123 }); 116 });
......
...@@ -158,7 +158,8 @@ const handleClassDataClick = (item, des = '') => { ...@@ -158,7 +158,8 @@ const handleClassDataClick = (item, des = '') => {
158 type: des === '' ? '配置' : des, 158 type: des === '' ? '配置' : des,
159 classStandardName: item.name, 159 classStandardName: item.name,
160 refGradeGuid: item.refGradeGuid, 160 refGradeGuid: item.refGradeGuid,
161 description: item.description 161 description: item.description,
162 isExpand: item.isExpand || false
162 } 163 }
163 }); 164 });
164 } 165 }
...@@ -276,7 +277,8 @@ const newCreateClassStandardDialogInfo = ref({ ...@@ -276,7 +277,8 @@ const newCreateClassStandardDialogInfo = ref({
276 name: item.name, 277 name: item.name,
277 guid: item.guid, 278 guid: item.guid,
278 refGradeGuid: item.refGradeGuid, 279 refGradeGuid: item.refGradeGuid,
279 description: item.description 280 description: item.description,
281 isExpand: true
280 } 282 }
281 handleClassDataClick(params, ''); 283 handleClassDataClick(params, '');
282 } 284 }
...@@ -312,6 +314,7 @@ const newCreateClassStandardDialogInfo = ref({ ...@@ -312,6 +314,7 @@ const newCreateClassStandardDialogInfo = ref({
312 }) 314 })
313 315
314 const newCreateClass = () => { 316 const newCreateClass = () => {
317 newCreateClassStandardDialogInfo.value.submitBtnLoading = false;
315 newCreateClassStandardDialogInfo.value.visible = true; 318 newCreateClassStandardDialogInfo.value.visible = true;
316 classStandardFormItems.value.forEach(item => item.default = ''); 319 classStandardFormItems.value.forEach(item => item.default = '');
317 } 320 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!