d04e0078 by xukangle

Merge branch 'develop' into dev_20241202_xukangle

2 parents cc7ff2f3 57b32e7c
...@@ -5,13 +5,13 @@ import request from "@/utils/request"; ...@@ -5,13 +5,13 @@ import request from "@/utils/request";
5 **/ 5 **/
6 // 新增 6 // 新增
7 export const addMetaDataTask = (params) => request({ 7 export const addMetaDataTask = (params) => request({
8 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/add`, 8 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/add`,
9 method: 'post', 9 method: 'post',
10 data: params 10 data: params
11 }) 11 })
12 // 删除 12 // 删除
13 export const deleteMetaDataTask = (params) => request({ 13 export const deleteMetaDataTask = (params) => request({
14 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/del`, 14 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/del`,
15 method: 'delete', 15 method: 'delete',
16 data: params 16 data: params
17 }) 17 })
...@@ -24,24 +24,24 @@ export const getMetaDataTask = (params) => request({ ...@@ -24,24 +24,24 @@ export const getMetaDataTask = (params) => request({
24 24
25 // 修改 25 // 修改
26 export const updateMetaDataTask = (params) => request({ 26 export const updateMetaDataTask = (params) => request({
27 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/update`, 27 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/update`,
28 method: 'put', 28 method: 'put',
29 data: params 29 data: params
30 }) 30 })
31 // 详情 31 // 详情
32 export const getMetaDataTaskDetail = (params) => request({ 32 export const getMetaDataTaskDetail = (params) => request({
33 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/detail/${params}`, 33 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/detail/${params}`,
34 method: 'get' 34 method: 'get'
35 }) 35 })
36 // 上线下线 36 // 上线下线
37 export const updateMetaDataState = (params) => request({ 37 export const updateMetaDataState = (params) => request({
38 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/change-state`, 38 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/change-state`,
39 method: 'get', 39 method: 'get',
40 params 40 params
41 }) 41 })
42 // 名称唯一性验证 42 // 名称唯一性验证
43 export const checkMetaDataTask = (params) => request({ 43 export const checkMetaDataTask = (params) => request({
44 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/check-exist`, 44 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/check-exist`,
45 method: 'post', 45 method: 'post',
46 data: { 46 data: {
47 collectTaskName: params, 47 collectTaskName: params,
...@@ -49,18 +49,18 @@ export const checkMetaDataTask = (params) => request({ ...@@ -49,18 +49,18 @@ export const checkMetaDataTask = (params) => request({
49 }) 49 })
50 // 执行元数据采集任务 50 // 执行元数据采集任务
51 export const executeMetaDataTask = (params) => request({ 51 export const executeMetaDataTask = (params) => request({
52 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/execute/${params}`, 52 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/execute/${params}`,
53 method: 'get' 53 method: 'get'
54 }) 54 })
55 // 执行日志 55 // 执行日志
56 export const getMetaDataTaskLog = (params) => request({ 56 export const getMetaDataTaskLog = (params) => request({
57 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-exec/page-list`, 57 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-exec/page-list`,
58 method: 'post', 58 method: 'post',
59 data: params 59 data: params
60 }) 60 })
61 // 61 //
62 export const saveMetaReportAnalysis = (params) => request({ 62 export const saveMetaReportAnalysis = (params) => request({
63 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage-analysis-report/add`, 63 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage-analysis-report/add`,
64 method: 'post', 64 method: 'post',
65 data: params 65 data: params
66 }) 66 })
...@@ -99,86 +99,86 @@ export const getMetaSheetField = (params) => request({ ...@@ -99,86 +99,86 @@ export const getMetaSheetField = (params) => request({
99 }) 99 })
100 // 表索引查询 100 // 表索引查询
101 export const getMetaSheetKeys = (params) => request({ 101 export const getMetaSheetKeys = (params) => request({
102 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-table-index-list`, 102 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/meta-table-index-list`,
103 method: 'post', 103 method: 'post',
104 params 104 params
105 }) 105 })
106 // 变更查询 106 // 变更查询
107 export const getMetaChange = (params) => request({ 107 export const getMetaChange = (params) => request({
108 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-collect-change-list`, 108 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/meta-collect-change-list`,
109 method: 'post', 109 method: 'post',
110 data: params 110 data: params
111 }) 111 })
112 // 变更明细 112 // 变更明细
113 export const getMetaChangeRecord = (params) => request({ 113 export const getMetaChangeRecord = (params) => request({
114 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-change-record-list`, 114 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/meta-change-record-list`,
115 method: 'post', 115 method: 'post',
116 data: params 116 data: params
117 }) 117 })
118 // 118 //
119 export const getMetacompareList = (params) => request({ 119 export const getMetacompareList = (params) => request({
120 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-change-compare-list/${params}`, 120 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/meta-change-compare-list/${params}`,
121 method: 'get', 121 method: 'get',
122 //data: params 122 //data: params
123 }) 123 })
124 124
125 // 表信息详情 125 // 表信息详情
126 export const getMetaDetail = (params) => request({ 126 export const getMetaDetail = (params) => request({
127 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/detail/${params}`, 127 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/detail/${params}`,
128 method: 'get', 128 method: 'get',
129 }) 129 })
130 130
131 /** 根据表获取血缘数据 */ 131 /** 根据表获取血缘数据 */
132 export const getTableLineage = (params) => request({ 132 export const getTableLineage = (params) => request({
133 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/lineage-query?guid=${params.guid}&lineageType=tb`, 133 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage/lineage-query?guid=${params.guid}&lineageType=tb`,
134 method: 'get', 134 method: 'get',
135 }) 135 })
136 136
137 /** 根据字段获取血缘数据 */ 137 /** 根据字段获取血缘数据 */
138 export const getTableFieldLineage = (params) => request({ 138 export const getTableFieldLineage = (params) => request({
139 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/lineage-query?guid=${params.guid}&lineageType=co`, 139 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage/lineage-query?guid=${params.guid}&lineageType=co`,
140 method: 'get', 140 method: 'get',
141 }) 141 })
142 142
143 /** 获取表的所有字段血缘数据 */ 143 /** 获取表的所有字段血缘数据 */
144 export const getTableAllFieldLineage = (params) => request({ 144 export const getTableAllFieldLineage = (params) => request({
145 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/lineage-query-field?databaseName=${params.databaseName}&tableName=${params.tableName}`, 145 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage/lineage-query-field?databaseName=${params.databaseName}&tableName=${params.tableName}`,
146 method: 'get', 146 method: 'get',
147 }) 147 })
148 148
149 // 查询列表 149 // 查询列表
150 export const getMetaList = (params) => request({ 150 export const getMetaList = (params) => request({
151 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/list-meta-all`, 151 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/list-meta-all`,
152 method: 'post', 152 method: 'post',
153 data:params 153 data:params
154 }) 154 })
155 // 元数据表字段查询 155 // 元数据表字段查询
156 export const getMetaTableField = (params) => request({ 156 export const getMetaTableField = (params) => request({
157 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/meta-table-field-list`, 157 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/meta-table-field-list`,
158 method: 'post', 158 method: 'post',
159 params, 159 params,
160 }) 160 })
161 // 保存血缘字段节点 161 // 保存血缘字段节点
162 export const saveLineageField = (params) => request({ 162 export const saveLineageField = (params) => request({
163 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/save-field`, 163 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage/save-field`,
164 method: 'post', 164 method: 'post',
165 data:params 165 data:params
166 }) 166 })
167 // 保存血源节点 167 // 保存血源节点
168 export const saveLineageTable = (params) => request({ 168 export const saveLineageTable = (params) => request({
169 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/save-table`, 169 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage/save-table`,
170 method: 'post', 170 method: 'post',
171 data:params 171 data:params
172 }) 172 })
173 // 删除血源节点 173 // 删除血源节点
174 export const delLineageTable = (params) => request({ 174 export const delLineageTable = (params) => request({
175 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/del-vertex?vertexId=${params.vertexId}`, 175 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage/del-vertex?vertexId=${params.vertexId}`,
176 method: 'delete', 176 method: 'delete',
177 //data:params 177 //data:params
178 }) 178 })
179 /** 获取同步任务变更记录 */ 179 /** 获取同步任务变更记录 */
180 export const getTaskChangeList = (params) => request({ 180 export const getTaskChangeList = (params) => request({
181 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/task-change-record/page-list`, 181 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/task-change-record/page-list`,
182 method: 'post', 182 method: 'post',
183 data:params 183 data:params
184 }) 184 })
...@@ -200,41 +200,41 @@ export const getDatabase = (params) => request({ ...@@ -200,41 +200,41 @@ export const getDatabase = (params) => request({
200 /** 源数据分析报告 */ 200 /** 源数据分析报告 */
201 /**查询列表 */ 201 /**查询列表 */
202 export const getAnalysisReportList = (params) => request({ 202 export const getAnalysisReportList = (params) => request({
203 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage-analysis-report/list`, 203 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage-analysis-report/list`,
204 method: 'post', 204 method: 'post',
205 data: params 205 data: params
206 }) 206 })
207 207
208 /** 根据guid删除 */ 208 /** 根据guid删除 */
209 export const delAnalysisRepor = (params) => request({ 209 export const delAnalysisRepor = (params) => request({
210 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage-analysis-report/del`, 210 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage-analysis-report/del`,
211 method: 'delete', 211 method: 'delete',
212 data: params 212 data: params
213 }) 213 })
214 /** 根据guid更新 */ 214 /** 根据guid更新 */
215 export const updateAnalysisRepor = (params) => request({ 215 export const updateAnalysisRepor = (params) => request({
216 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage-analysis-report/update`, 216 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage-analysis-report/update`,
217 method: 'put', 217 method: 'put',
218 data: params 218 data: params
219 }) 219 })
220 /** 删除边 */ 220 /** 删除边 */
221 export const delLineAge = (params) => request({ 221 export const delLineAge = (params) => request({
222 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/lineage/del-edge?euid=${params}`, 222 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/lineage/del-edge?euid=${params}`,
223 method: 'delete', 223 method: 'delete',
224 }) 224 })
225 /** 判断是否有元数据数据 */ 225 /** 判断是否有元数据数据 */
226 export const checkTableData = (params) => request({ 226 export const checkTableData = (params) => request({
227 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-table/check-table-data/${params}`, 227 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-table/check-table-data/${params}`,
228 method: 'get', 228 method: 'get',
229 }) 229 })
230 /**校验任务是否有数据库信息 */ 230 /**校验任务是否有数据库信息 */
231 export const checkDatabaseIsExist = (dataSourceGuid) => request({ 231 export const checkDatabaseIsExist = (dataSourceGuid) => request({
232 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/meta-collect-task/check-database-is-exist/${dataSourceGuid}`, 232 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/meta-collect-task/check-database-is-exist/${dataSourceGuid}`,
233 method: 'get', 233 method: 'get',
234 }) 234 })
235 /**同步任务 变更详情展示 */ 235 /**同步任务 变更详情展示 */
236 236
237 export const syncChangeDetail = (guid) => request({ 237 export const syncChangeDetail = (guid) => request({
238 url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/task-change-record/sync-change-detail/${guid}`, 238 url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/task-change-record/sync-change-detail/${guid}`,
239 method: 'get', 239 method: 'get',
240 }) 240 })
......
...@@ -6,11 +6,13 @@ ...@@ -6,11 +6,13 @@
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 { ElMessage, ElMessageBox } from "element-plus"; 8 import { ElMessage, ElMessageBox } from "element-plus";
9 import useDataAssetStore from "@/store/modules/dataAsset";
9 import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory"; 10 import { filterVal, getCgTaskPageList, cgTaskDelete, runExecTask } from "@/api/modules/dataInventory";
10 import { TableColumnWidth } from '@/utils/enum'; 11 import { TableColumnWidth } from '@/utils/enum';
11 12
12 const { proxy } = getCurrentInstance() as any; 13 const { proxy } = getCurrentInstance() as any;
13 const router = useRouter(); 14 const router = useRouter();
15 const assetStore = useDataAssetStore();
14 16
15 const loading = ref(false); 17 const loading = ref(false);
16 const page = ref({ 18 const page = ref({
...@@ -35,7 +37,7 @@ const tableInfo = ref({ ...@@ -35,7 +37,7 @@ const tableInfo = ref({
35 label: "目录名称", field: "cgDirName", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => { 37 label: "目录名称", field: "cgDirName", width: 120, type: "text_btn", columClass: 'text_btn', click: (scope) => {
36 router.push({ 38 router.push({
37 name: "classifyGradeCatalogue", 39 name: "classifyGradeCatalogue",
38 query: { name: scope.row.cgDirName }, 40 query: { classifyGuid: scope.row.classifyGuid },
39 }); 41 });
40 } 42 }
41 }, 43 },
...@@ -48,6 +50,8 @@ const tableInfo = ref({ ...@@ -48,6 +50,8 @@ const tableInfo = ref({
48 { 50 {
49 label: "执行状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 51 label: "执行状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
50 return filterVal(scope.row.status, 'status'); 52 return filterVal(scope.row.status, 'status');
53 }, tagType: (scope) => {
54 return scope.row.status == 'Y' ? 'success' : scope.row.status == 'E' ? 'danger' : 'info';
51 } 55 }
52 }, 56 },
53 { label: "任务修改人", field: "updateUserName", width: 120 }, 57 { label: "任务修改人", field: "updateUserName", width: 120 },
...@@ -59,8 +63,8 @@ const tableInfo = ref({ ...@@ -59,8 +63,8 @@ const tableInfo = ref({
59 label: "结果状态", field: "confirmStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 63 label: "结果状态", field: "confirmStatus", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
60 return filterVal(scope.row.confirmStatus, 'confirmStatus'); 64 return filterVal(scope.row.confirmStatus, 'confirmStatus');
61 }, tagType: (scope) => { 65 }, tagType: (scope) => {
62 return scope.row.confirmStatus=='Y'?'success':'warning'; 66 return scope.row.confirmStatus == 'Y' ? 'success' : 'warning';
63 }, 67 }
64 }, 68 },
65 ], 69 ],
66 data: [], 70 data: [],
...@@ -71,10 +75,10 @@ const tableInfo = ref({ ...@@ -71,10 +75,10 @@ const tableInfo = ref({
71 width: 280, 75 width: 280,
72 btns: (scope) => { 76 btns: (scope) => {
73 let row = scope.row, btnArr: any = [ 77 let row = scope.row, btnArr: any = [
74 { label: "手动执行", value: "run" }, 78 { label: "手动执行", value: "run", disabled: row.status != 'Y' && row.status != 'E' },
75 { label: "编辑", value: "edit" }, 79 { label: "编辑", value: "edit", disabled: row.status != 'Y' && row.status != 'E' },
76 { label: "日志", value: "log" }, 80 { label: "日志", value: "log" },
77 { label: "删除", value: "delete" } 81 { label: "删除", value: "delete", disabled: row.status != 'Y' && row.status != 'E' }
78 ]; 82 ];
79 if (row.confirmStatus == 'Y') { 83 if (row.confirmStatus == 'Y') {
80 btnArr.splice(0, 0, { label: "结果修改", value: "modify" }); 84 btnArr.splice(0, 0, { label: "结果修改", value: "modify" });
...@@ -109,7 +113,7 @@ const tableBtnClick = (scope, btn) => { ...@@ -109,7 +113,7 @@ const tableBtnClick = (scope, btn) => {
109 if (type == 'confirm' || type == 'modify' || type == 'edit' || type == "log") { 113 if (type == 'confirm' || type == 'modify' || type == 'edit' || type == "log") {
110 toPath(type); 114 toPath(type);
111 } else if (type == 'run') { 115 } else if (type == 'run') {
112 const params = {guid: currTableData.value.guid}; 116 const params = { guid: currTableData.value.guid };
113 runExecTask(params).then((res: any) => { 117 runExecTask(params).then((res: any) => {
114 if (res.code == proxy.$passCode) { 118 if (res.code == proxy.$passCode) {
115 getTableData(); 119 getTableData();
...@@ -196,10 +200,10 @@ const open = (msg, type, isBatch = false) => { ...@@ -196,10 +200,10 @@ const open = (msg, type, isBatch = false) => {
196 }; 200 };
197 201
198 onActivated(() => { 202 onActivated(() => {
199 // if (assetStore.isRefresh) {//如果是首次加载,则不需要调用 203 if (assetStore.isRefresh) {//如果是首次加载,则不需要调用
200 // getFirstPageData(); 204 getTableData()
201 // assetStore.set(false); 205 assetStore.set(false);
202 // } 206 }
203 }) 207 })
204 208
205 onBeforeMount(() => { 209 onBeforeMount(() => {
......
...@@ -8,6 +8,8 @@ import { useRouter, useRoute } from "vue-router"; ...@@ -8,6 +8,8 @@ import { useRouter, useRoute } from "vue-router";
8 import { ElMessage, ElMessageBox } from "element-plus"; 8 import { ElMessage, ElMessageBox } from "element-plus";
9 import { Search, Warning, ArrowUp } from "@element-plus/icons-vue"; 9 import { Search, Warning, ArrowUp } from "@element-plus/icons-vue";
10 import { tagMethod, tagType, changeNum } from "@/utils/common"; 10 import { tagMethod, tagType, changeNum } from "@/utils/common";
11 import useUserStore from "@/store/modules/user";
12 import useDataAssetStore from "@/store/modules/dataAsset";
11 import TableTools from '@/components/Tools/table_tools.vue'; 13 import TableTools from '@/components/Tools/table_tools.vue';
12 import { 14 import {
13 getCgTaskDetail, 15 getCgTaskDetail,
...@@ -25,8 +27,12 @@ import { ...@@ -25,8 +27,12 @@ import {
25 const { proxy } = getCurrentInstance() as any; 27 const { proxy } = getCurrentInstance() as any;
26 const router = useRouter(); 28 const router = useRouter();
27 const route = useRoute(); 29 const route = useRoute();
30 const userStore = useUserStore();
31 const fullPath = route.fullPath;
32 const assetStore = useDataAssetStore();
28 33
29 const loading = ref(false); 34 const loading = ref(false);
35 const showBtns = ref(true);
30 const gradeList = ref([]); 36 const gradeList = ref([]);
31 const treeData = ref([ 37 const treeData = ref([
32 { 38 {
...@@ -341,7 +347,7 @@ const dialogInfo: any = ref({ ...@@ -341,7 +347,7 @@ const dialogInfo: any = ref({
341 size: 480, 347 size: 480,
342 direction: "column", 348 direction: "column",
343 header: { 349 header: {
344 title: "新建", 350 title: "批量变更",
345 }, 351 },
346 type: 'form', 352 type: 'form',
347 contents: [ 353 contents: [
...@@ -371,6 +377,7 @@ const getTaskDetail = (param) => { ...@@ -371,6 +377,7 @@ const getTaskDetail = (param) => {
371 loading.value = false; 377 loading.value = false;
372 if (res.code == proxy.$passCode) { 378 if (res.code == proxy.$passCode) {
373 taskDetail.value = res.data || {}; 379 taskDetail.value = res.data || {};
380 taskDetail.value.confirmStatus != 'Y' && (showBtns.value = true);
374 getFieldCount() 381 getFieldCount()
375 getSheetFieldList({ type: 1 }); 382 getSheetFieldList({ type: 1 });
376 getFieldTree() 383 getFieldTree()
...@@ -618,7 +625,7 @@ const btnClick = async (btn, bType = null) => { ...@@ -618,7 +625,7 @@ const btnClick = async (btn, bType = null) => {
618 router.push({ 625 router.push({
619 name: "classifyGradeCatalogue", 626 name: "classifyGradeCatalogue",
620 query: { 627 query: {
621 name: taskDetail.value.cgDirName 628 classifyGuid: taskDetail.value.classifyGuid
622 } 629 }
623 }); 630 });
624 } else if (type == 'batch') { 631 } else if (type == 'batch') {
...@@ -659,6 +666,8 @@ const saveTask = () => { ...@@ -659,6 +666,8 @@ const saveTask = () => {
659 loading.value = false; 666 loading.value = false;
660 if (res.code == proxy.$passCode) { 667 if (res.code == proxy.$passCode) {
661 ElMessage.success('变更成功'); 668 ElMessage.success('变更成功');
669 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
670 assetStore.set(true);
662 router.push({ 671 router.push({
663 name: "taskConfig", 672 name: "taskConfig",
664 }); 673 });
...@@ -690,6 +699,7 @@ const searchField = (val: any, clear: boolean = false) => { ...@@ -690,6 +699,7 @@ const searchField = (val: any, clear: boolean = false) => {
690 const cascaderChange = (val, info) => { 699 const cascaderChange = (val, info) => {
691 if (dialogInfo.value.visible) { 700 if (dialogInfo.value.visible) {
692 const cascaderData = dialogRef.value.getCascaderCheckedData(); 701 const cascaderData = dialogRef.value.getCascaderCheckedData();
702 formItems.value[0].default = val || [];
693 formItems.value[1].default = cascaderData.length ? cascaderData[0].data.gradeGuid : ''; 703 formItems.value[1].default = cascaderData.length ? cascaderData[0].data.gradeGuid : '';
694 } else { 704 } else {
695 if (info && info.row) { 705 if (info && info.row) {
...@@ -788,6 +798,7 @@ onActivated(() => { ...@@ -788,6 +798,7 @@ onActivated(() => {
788 798
789 onBeforeMount(() => { 799 onBeforeMount(() => {
790 if (route.query.type == 'log') { 800 if (route.query.type == 'log') {
801 showBtns.value = false;
791 getTaskDetail({ guid: route.query.guid, execGuid: route.query.execGuid }); 802 getTaskDetail({ guid: route.query.guid, execGuid: route.query.execGuid });
792 } else { 803 } else {
793 getTaskDetail({ guid: route.query.guid }); 804 getTaskDetail({ guid: route.query.guid });
...@@ -806,7 +817,7 @@ onMounted(() => { ...@@ -806,7 +817,7 @@ onMounted(() => {
806 <template> 817 <template>
807 <div class="container_wrap full flex" v-loading="loading"> 818 <div class="container_wrap full flex" v-loading="loading">
808 <div class="main_wrap full"> 819 <div class="main_wrap full">
809 <div class="content_main panel"> 820 <div class="content_main panel" :class="{ full: !showBtns }">
810 <div class="template_panel" :class="{ active: !titleClose }"> 821 <div class="template_panel" :class="{ active: !titleClose }">
811 <div class="panel_title"> 822 <div class="panel_title">
812 <div class="title_wrap"> 823 <div class="title_wrap">
...@@ -887,7 +898,7 @@ onMounted(() => { ...@@ -887,7 +898,7 @@ onMounted(() => {
887 @selectChange="selectChange" @cascaderChange="cascaderChange" @search="searchField" /> 898 @selectChange="selectChange" @cascaderChange="cascaderChange" @search="searchField" />
888 <div class="tools_btns"> 899 <div class="tools_btns">
889 <div class="btns"> 900 <div class="btns">
890 <el-button type="primary" plain @click="btnClick({ value: 'batch' })">批量变分类分级</el-button> 901 <el-button type="primary" plain @click="btnClick({ value: 'batch' })">批量变分类分级</el-button>
891 <el-button plain @click="btnClick({ value: 'import' })">导入</el-button> 902 <el-button plain @click="btnClick({ value: 'import' })">导入</el-button>
892 <el-button plain @click="btnClick({ value: 'export' })">导出</el-button> 903 <el-button plain @click="btnClick({ value: 'export' })">导出</el-button>
893 </div> 904 </div>
...@@ -951,7 +962,7 @@ onMounted(() => { ...@@ -951,7 +962,7 @@ onMounted(() => {
951 </div> 962 </div>
952 </div> 963 </div>
953 </div> 964 </div>
954 <div class="tool_btns"> 965 <div class="tool_btns" v-if="showBtns">
955 <div class="btns"> 966 <div class="btns">
956 <el-button @click="btnClick({ value: 'cancel' })">暂存</el-button> 967 <el-button @click="btnClick({ value: 'cancel' })">暂存</el-button>
957 <el-button type="primary" @click="btnClick({ value: 'confirm' })">确认变更</el-button> 968 <el-button type="primary" @click="btnClick({ value: 'confirm' })">确认变更</el-button>
...@@ -1027,6 +1038,10 @@ onMounted(() => { ...@@ -1027,6 +1038,10 @@ onMounted(() => {
1027 padding: 0 16px; 1038 padding: 0 16px;
1028 } 1039 }
1029 1040
1041 &.full {
1042 height: 100%;
1043 }
1044
1030 .template_panel { 1045 .template_panel {
1031 padding: 0 16px; 1046 padding: 0 16px;
1032 height: 40px; 1047 height: 40px;
......
...@@ -7,14 +7,20 @@ import { ref, onMounted } from "vue"; ...@@ -7,14 +7,20 @@ import { ref, onMounted } from "vue";
7 import { useRouter, useRoute } from "vue-router"; 7 import { useRouter, useRoute } from "vue-router";
8 import { ElMessage, ElMessageBox } from "element-plus"; 8 import { ElMessage, ElMessageBox } from "element-plus";
9 import { Search } from "@element-plus/icons-vue"; 9 import { Search } from "@element-plus/icons-vue";
10 import useUserStore from "@/store/modules/user";
11 import useDataAssetStore from "@/store/modules/dataAsset";
10 import { getCgTaskDetail, getClassifyGradList, getClassifyTreeList, getCgLabelPageList, getMetaTableCollectList, cgTaskSave, cgTaskUpdate } from "@/api/modules/dataInventory"; 12 import { getCgTaskDetail, getClassifyGradList, getClassifyTreeList, getCgLabelPageList, getMetaTableCollectList, cgTaskSave, cgTaskUpdate } from "@/api/modules/dataInventory";
11 13
12 const { proxy } = getCurrentInstance() as any; 14 const { proxy } = getCurrentInstance() as any;
13 const router = useRouter(); 15 const router = useRouter();
14 const route = useRoute(); 16 const route = useRoute();
17 const userStore = useUserStore();
18 const fullPath = route.fullPath;
19 const assetStore = useDataAssetStore();
15 20
21 const loading = ref(false);
16 const step = ref(0); 22 const step = ref(0);
17 const selectIndex = ref(0); 23 const selectIndex = ref('');
18 const taskDetail = ref({}); 24 const taskDetail = ref({});
19 const asideSearchInput = ref(""); 25 const asideSearchInput = ref("");
20 const permissionList: any = ref([]) 26 const permissionList: any = ref([])
...@@ -56,6 +62,7 @@ const taskFormItems: any = ref([ ...@@ -56,6 +62,7 @@ const taskFormItems: any = ref([
56 field: 'taskName', 62 field: 'taskName',
57 default: '', 63 default: '',
58 maxlength: 50, 64 maxlength: 50,
65 clearable: true,
59 required: true 66 required: true
60 }, 67 },
61 { 68 {
...@@ -65,6 +72,7 @@ const taskFormItems: any = ref([ ...@@ -65,6 +72,7 @@ const taskFormItems: any = ref([
65 field: 'cgDirName', 72 field: 'cgDirName',
66 default: '', 73 default: '',
67 maxlength: 50, 74 maxlength: 50,
75 clearable: true,
68 required: true 76 required: true
69 }, 77 },
70 ]) 78 ])
...@@ -190,9 +198,10 @@ const getTableData = () => { ...@@ -190,9 +198,10 @@ const getTableData = () => {
190 }; 198 };
191 199
192 const toPath = () => { 200 const toPath = () => {
201 userStore.setTabbar(userStore.tabbar.filter((tab: any) => tab.fullPath !== fullPath));
202 assetStore.set(true);
193 router.push({ 203 router.push({
194 name: "taskConfig", 204 name: "taskConfig",
195 query: {},
196 }); 205 });
197 } 206 }
198 207
...@@ -222,7 +231,7 @@ const getMetaTableData = () => { ...@@ -222,7 +231,7 @@ const getMetaTableData = () => {
222 if (route.query.type === 'edit') { 231 if (route.query.type === 'edit') {
223 nextTick(() => { 232 nextTick(() => {
224 data.map((row) => { 233 data.map((row) => {
225 taskDetail.value.metaGuids.indexOf(row.guid) > -1 && metadataTableRef.value.tableRef.toggleRowSelection(row, true); 234 taskDetail.value.metaGuids.indexOf(row.databaseGuid) > -1 && metadataTableRef.value.tableRef.toggleRowSelection(row, true);
226 }); 235 });
227 }) 236 })
228 } 237 }
...@@ -258,7 +267,9 @@ const btnClick = async (btn, bType = null) => { ...@@ -258,7 +267,9 @@ const btnClick = async (btn, bType = null) => {
258 const subForm = { ...form }; 267 const subForm = { ...form };
259 submitForm(formEl, subForm); 268 submitForm(formEl, subForm);
260 } else { 269 } else {
261 toPath() 270 router.push({
271 name: "taskConfig",
272 });
262 } 273 }
263 }; 274 };
264 275
...@@ -266,6 +277,7 @@ const submitForm = (formEl, info) => { ...@@ -266,6 +277,7 @@ const submitForm = (formEl, info) => {
266 if (!formEl) return; 277 if (!formEl) return;
267 formEl.validate((valid, fields) => { 278 formEl.validate((valid, fields) => {
268 if (valid) { 279 if (valid) {
280 loading.value = true;
269 const params = { 281 const params = {
270 classifyGuid: templateInfo.value.guid, 282 classifyGuid: templateInfo.value.guid,
271 metaGuids: selectRowData.value, 283 metaGuids: selectRowData.value,
...@@ -275,6 +287,7 @@ const submitForm = (formEl, info) => { ...@@ -275,6 +287,7 @@ const submitForm = (formEl, info) => {
275 params.guid = taskDetail.value.guid; 287 params.guid = taskDetail.value.guid;
276 params.execGuid = taskDetail.value.execGuid; 288 params.execGuid = taskDetail.value.execGuid;
277 cgTaskUpdate(params).then((res: any) => { 289 cgTaskUpdate(params).then((res: any) => {
290 loading.value = false;
278 if (res.code == proxy.$passCode) { 291 if (res.code == proxy.$passCode) {
279 toPath() 292 toPath()
280 } else { 293 } else {
...@@ -288,9 +301,11 @@ const submitForm = (formEl, info) => { ...@@ -288,9 +301,11 @@ const submitForm = (formEl, info) => {
288 type: "error", 301 type: "error",
289 message: '请求失败', 302 message: '请求失败',
290 }); 303 });
304 loading.value = false;
291 }) 305 })
292 } else { 306 } else {
293 cgTaskSave(params).then((res: any) => { 307 cgTaskSave(params).then((res: any) => {
308 loading.value = false;
294 if (res.code == proxy.$passCode) { 309 if (res.code == proxy.$passCode) {
295 toPath() 310 toPath()
296 } else { 311 } else {
...@@ -304,6 +319,7 @@ const submitForm = (formEl, info) => { ...@@ -304,6 +319,7 @@ const submitForm = (formEl, info) => {
304 type: "error", 319 type: "error",
305 message: '请求失败', 320 message: '请求失败',
306 }); 321 });
322 loading.value = false;
307 }) 323 })
308 } 324 }
309 } else { 325 } else {
...@@ -322,6 +338,7 @@ const handleScroll = () => { ...@@ -322,6 +338,7 @@ const handleScroll = () => {
322 338
323 // 点击分类列表 339 // 点击分类列表
324 const listClick = (row) => { 340 const listClick = (row) => {
341 selectIndex.value = row.guid;
325 templateInfo.value = row; 342 templateInfo.value = row;
326 getClassifyTree(); 343 getClassifyTree();
327 searchItemValue.value.classifyGuid = row.guid; 344 searchItemValue.value.classifyGuid = row.guid;
...@@ -409,7 +426,7 @@ onMounted(() => { ...@@ -409,7 +426,7 @@ onMounted(() => {
409 </script> 426 </script>
410 427
411 <template> 428 <template>
412 <div class="container_wrap full flex"> 429 <div class="container_wrap full flex" v-loading="loading">
413 <div class="aside_wrap" v-show="step == 0"> 430 <div class="aside_wrap" v-show="step == 0">
414 <div class="aside_title">选择分类</div> 431 <div class="aside_title">选择分类</div>
415 <!-- <div class="aside_search"> 432 <!-- <div class="aside_search">
...@@ -417,8 +434,8 @@ onMounted(() => { ...@@ -417,8 +434,8 @@ onMounted(() => {
417 @change="querySearch" /> 434 @change="querySearch" />
418 </div> --> 435 </div> -->
419 <div class="aside_list" v-loading="listLoading" v-infinite-scroll="handleScroll"> 436 <div class="aside_list" v-loading="listLoading" v-infinite-scroll="handleScroll">
420 <div class="list_item" v-for="(item, i) in currpermissionList" :class="{ active: selectIndex == i }" 437 <div class="list_item" v-for="(item, i) in currpermissionList" :class="{ active: selectIndex == item.guid }"
421 @click="selectIndex = i; listClick(item);" v-preReClick>{{ item.name }}</div> 438 @click="listClick(item);" v-preReClick>{{ item.name }}</div>
422 </div> 439 </div>
423 </div> 440 </div>
424 <div class="main_wrap" :class="{ full: step == 1 }"> 441 <div class="main_wrap" :class="{ full: step == 1 }">
......
...@@ -52,6 +52,8 @@ const tableInfo = ref({ ...@@ -52,6 +52,8 @@ const tableInfo = ref({
52 { 52 {
53 label: "结果状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => { 53 label: "结果状态", field: "status", width: TableColumnWidth.STATE, align: 'center', type: "tag", getName: (scope) => {
54 return filterVal(scope.row.status, 'confirmStatus'); 54 return filterVal(scope.row.status, 'confirmStatus');
55 }, tagType: (scope) => {
56 return scope.row.confirmStatus == 'Y' ? 'success' : 'warning';
55 } 57 }
56 }, 58 },
57 ], 59 ],
...@@ -131,11 +133,11 @@ const getFirstPageData = () => { ...@@ -131,11 +133,11 @@ const getFirstPageData = () => {
131 } 133 }
132 134
133 onActivated(() => { 135 onActivated(() => {
134 getFirstPageData() 136 // getFirstPageData()
135 }) 137 })
136 138
137 onBeforeMount(() => { 139 onBeforeMount(() => {
138 140 getFirstPageData()
139 }) 141 })
140 142
141 </script> 143 </script>
...@@ -170,7 +172,7 @@ onBeforeMount(() => { ...@@ -170,7 +172,7 @@ onBeforeMount(() => {
170 .table_panel_wrap { 172 .table_panel_wrap {
171 width: 100%; 173 width: 100%;
172 height: 100%; 174 height: 100%;
173 padding: 0px 8px 0; 175 padding: 12px 8px 0;
174 } 176 }
175 177
176 .card-noData { 178 .card-noData {
......
...@@ -104,7 +104,7 @@ const tableInfo = ref({ ...@@ -104,7 +104,7 @@ const tableInfo = ref({
104 actionInfo: { 104 actionInfo: {
105 label: "操作", 105 label: "操作",
106 type: "btn", 106 type: "btn",
107 width: 230, 107 width: 210,
108 fixed: 'right', 108 fixed: 'right',
109 btns: (scope) => { 109 btns: (scope) => {
110 const row = scope.row 110 const row = scope.row
...@@ -114,7 +114,7 @@ const tableInfo = ref({ ...@@ -114,7 +114,7 @@ const tableInfo = ref({
114 } else { 114 } else {
115 btnsArr.splice(0, 0, { label: "立即执行", value: "carry", disabled: row.taskState === 0 || row.execState == 1 }) 115 btnsArr.splice(0, 0, { label: "立即执行", value: "carry", disabled: row.taskState === 0 || row.execState == 1 })
116 } 116 }
117 btnsArr.push({ label: "编辑", value: "edit", disabled: row.taskState === 1 || row.isCarry || row.execState == 1 }); 117 // btnsArr.push({ label: "编辑", value: "edit", disabled: row.taskState === 1 || row.isCarry || row.execState == 1 });
118 btnsArr.push({ label: "删除", value: "delete", disabled: row.isCarry || row.taskState === 1 || row.execState == 1 }); 118 btnsArr.push({ label: "删除", value: "delete", disabled: row.isCarry || row.taskState === 1 || row.execState == 1 });
119 btnsArr.push({ label: "执行日志", value: "log" }); 119 btnsArr.push({ label: "执行日志", value: "log" });
120 return btnsArr 120 return btnsArr
...@@ -472,18 +472,19 @@ const setDetailInfo = (row) => { ...@@ -472,18 +472,19 @@ const setDetailInfo = (row) => {
472 } 472 }
473 473
474 const getDataSourceList = () => { 474 const getDataSourceList = () => {
475 getDatabase({ connectStatus: 1 }).then((res: any) => { 475 // TODO
476 if (res.code == proxy.$passCode) { 476 // getDatabase({ connectStatus: 1 }).then((res: any) => {
477 dataSourceList.value = res.data || []; 477 // if (res.code == proxy.$passCode) {
478 formItems.value[1].options = dataSourceList.value; 478 // dataSourceList.value = res.data || [];
479 searchItemList.value[1].options = dataSourceList.value; 479 // formItems.value[1].options = dataSourceList.value;
480 } else { 480 // searchItemList.value[1].options = dataSourceList.value;
481 proxy.$ElMessage({ 481 // } else {
482 type: "error", 482 // proxy.$ElMessage({
483 message: res.msg, 483 // type: "error",
484 }); 484 // message: res.msg,
485 } 485 // });
486 }) 486 // }
487 // })
487 } 488 }
488 489
489 const radioGroupChange = (val, info) => { 490 const radioGroupChange = (val, info) => {
...@@ -597,7 +598,7 @@ onBeforeMount(() => { ...@@ -597,7 +598,7 @@ onBeforeMount(() => {
597 <!-- 头部搜索 --> 598 <!-- 头部搜索 -->
598 <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" :init="false" /> 599 <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" :init="false" />
599 <div class="tools_btns"> 600 <div class="tools_btns">
600 <el-button type="primary" @click="loadDrawer">新建</el-button> 601 <!-- <el-button type="primary" @click="loadDrawer">新建</el-button> -->
601 <el-button @click="importMeta">导入</el-button> 602 <el-button @click="importMeta">导入</el-button>
602 </div> 603 </div>
603 </div> 604 </div>
......
...@@ -61,7 +61,7 @@ const tabsInfo = ref({ ...@@ -61,7 +61,7 @@ const tabsInfo = ref({
61 tabs: [ 61 tabs: [
62 { label: '基础信息', name: 'first' }, 62 { label: '基础信息', name: 'first' },
63 // / { label: '数据血缘', name: 'second' }, 63 // / { label: '数据血缘', name: 'second' },
64 { label: '变更记录', name: 'third' } 64 //{ label: '变更记录', name: 'third' }
65 ] 65 ]
66 }) 66 })
67 /** 切换布局 */ 67 /** 切换布局 */
...@@ -191,13 +191,14 @@ const tabsPaneMap = ref({ ...@@ -191,13 +191,14 @@ const tabsPaneMap = ref({
191 type: 'table', 191 type: 'table',
192 tableInfo: fieldTableInfo.value, 192 tableInfo: fieldTableInfo.value,
193 show: true 193 show: true
194 }, { 194 },
195 title: '索引信息', 195 // {
196 type: 'table', 196 // title: '索引信息',
197 isIndex: true, 197 // type: 'table',
198 tableInfo: indexTableInfo.value, 198 // isIndex: true,
199 show: true 199 // tableInfo: indexTableInfo.value,
200 }, 200 // show: true
201 // },
201 ], 202 ],
202 second: [ 203 second: [
203 { 204 {
...@@ -309,10 +310,10 @@ const lineageDataLoading = ref(true); ...@@ -309,10 +310,10 @@ const lineageDataLoading = ref(true);
309 const getDetailInfo = () => { 310 const getDetailInfo = () => {
310 getSheetDetail() 311 getSheetDetail()
311 getSheetField() 312 getSheetField()
312 getSheetKeys() 313 // getSheetKeys()
313 logPage.value.curr = 1 314 logPage.value.curr = 1
314 getSheetLog(); 315 //getSheetLog();
315 getTableLineageMap(); 316 // getTableLineageMap();
316 } 317 }
317 318
318 const getSheetDetail = () => { 319 const getSheetDetail = () => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!