b384c219 by xukangle

Merge branch 'dev_20241202_xukangle' into develop

2 parents 47febc77 2ed7f89e
...@@ -46,8 +46,8 @@ const getCgDirTreeData = async () => { ...@@ -46,8 +46,8 @@ const getCgDirTreeData = async () => {
46 CgDirTreeList.value = res.data; 46 CgDirTreeList.value = res.data;
47 treeInfo.value.data = res.data; 47 treeInfo.value.data = res.data;
48 currentPath.value = [res.data[0].classifyName]; 48 currentPath.value = [res.data[0].classifyName];
49 treeInfo.value.expandedKey = [res.data[0].guid]; 49 treeInfo.value.expandedKey.push(res.data[0].classifyDetailGuid);
50 treeInfo.value.currentNodeKey = res.data[0].guid; 50 treeInfo.value.currentNodeKey = res.data[0].classifyDetailGuid;
51 searchItemList.value[1].options = res.data; 51 searchItemList.value[1].options = res.data;
52 treeInfo.value.loading = false; 52 treeInfo.value.loading = false;
53 } else { 53 } else {
...@@ -121,7 +121,7 @@ onMounted(async () => { ...@@ -121,7 +121,7 @@ onMounted(async () => {
121 }) 121 })
122 122
123 // 左侧tree-list 123 // 左侧tree-list
124 const treeInfo = ref({ 124 const treeInfo = ref<any>({
125 id: "data-tree", 125 id: "data-tree",
126 filter: true, 126 filter: true,
127 editTreeItem: false, 127 editTreeItem: false,
...@@ -133,7 +133,7 @@ const treeInfo = ref({ ...@@ -133,7 +133,7 @@ const treeInfo = ref({
133 value: "classifyDetailGuid", 133 value: "classifyDetailGuid",
134 }, 134 },
135 nodeKey: 'classifyDetailGuid', 135 nodeKey: 'classifyDetailGuid',
136 expandedKey: ['0'], 136 expandedKey: [],
137 currentNodeKey: '', 137 currentNodeKey: '',
138 expandOnNodeClick: false, 138 expandOnNodeClick: false,
139 data: [], 139 data: [],
...@@ -159,7 +159,7 @@ const searchItemList = ref([ ...@@ -159,7 +159,7 @@ const searchItemList = ref([
159 options: [], 159 options: [],
160 props: { 160 props: {
161 label: 'label', 161 label: 'label',
162 value: 'guid', 162 value: 'label',
163 }, 163 },
164 clearable: true, 164 clearable: true,
165 filterable: true, 165 filterable: true,
...@@ -176,7 +176,7 @@ const searchItemList = ref([ ...@@ -176,7 +176,7 @@ const searchItemList = ref([
176 lazy: false, 176 lazy: false,
177 props: { 177 props: {
178 label: "classifyName", 178 label: "classifyName",
179 value: "classifyDetailGuid", 179 value: "classifyName",
180 }, 180 },
181 block: false, 181 block: false,
182 filterable: false, 182 filterable: false,
...@@ -192,7 +192,7 @@ const searchItemList = ref([ ...@@ -192,7 +192,7 @@ const searchItemList = ref([
192 options: [], 192 options: [],
193 props: { 193 props: {
194 label: 'name', 194 label: 'name',
195 value: 'guid', 195 value: 'name',
196 }, 196 },
197 clearable: true, 197 clearable: true,
198 }, 198 },
...@@ -207,6 +207,7 @@ const toSearch = (val: any, clear: boolean = false) => { ...@@ -207,6 +207,7 @@ const toSearch = (val: any, clear: boolean = false) => {
207 selectedC.value = null; 207 selectedC.value = null;
208 searchItemList.value.map(item => item.default = '') 208 searchItemList.value.map(item => item.default = '')
209 } 209 }
210 console.log('toSearch', val);
210 // 差一个label标签 -- 未完成 211 // 差一个label标签 -- 未完成
211 if (activeName.value === 'first') { 212 if (activeName.value === 'first') {
212 getCgDirFieldPage({ 213 getCgDirFieldPage({
...@@ -215,6 +216,7 @@ const toSearch = (val: any, clear: boolean = false) => { ...@@ -215,6 +216,7 @@ const toSearch = (val: any, clear: boolean = false) => {
215 execGuid: execGuidInfo.value.execGuid, 216 execGuid: execGuidInfo.value.execGuid,
216 classifyDetail: val.classifyName, 217 classifyDetail: val.classifyName,
217 gradeDetailGuid: val.levelName, 218 gradeDetailGuid: val.levelName,
219 label: val.labelName,
218 databaseGuid: selectedA.value, 220 databaseGuid: selectedA.value,
219 tableGuid: selectedB.value, 221 tableGuid: selectedB.value,
220 fieldGuid: selectedC.value, 222 fieldGuid: selectedC.value,
...@@ -225,9 +227,12 @@ const toSearch = (val: any, clear: boolean = false) => { ...@@ -225,9 +227,12 @@ const toSearch = (val: any, clear: boolean = false) => {
225 pageIndex: 1, 227 pageIndex: 1,
226 pageSize: 50, 228 pageSize: 50,
227 execGuid: execGuidInfo.value.execGuid, 229 execGuid: execGuidInfo.value.execGuid,
228 databaseGuid: selectedA.value || '', 230 database: selectedA.value || '',
229 tableGuid: selectedB.value || '', 231 tableName: selectedB.value || '',
230 fieldGuid: selectedC.value || '', 232 fieldName: selectedC.value || '',
233 classifyDetailName: val.classifyName,
234 gradeDetailName: val.levelName,
235 label: val.labelName,
231 }); 236 });
232 } 237 }
233 if (activeName.value === 'second' && activeTab.value === 'word') { 238 if (activeName.value === 'second' && activeTab.value === 'word') {
...@@ -235,8 +240,11 @@ const toSearch = (val: any, clear: boolean = false) => { ...@@ -235,8 +240,11 @@ const toSearch = (val: any, clear: boolean = false) => {
235 pageIndex: 1, 240 pageIndex: 1,
236 pageSize: 50, 241 pageSize: 50,
237 execGuid: execGuidInfo.value.execGuid, 242 execGuid: execGuidInfo.value.execGuid,
238 databaseGuid: selectedA.value || '', 243 database: selectedA.value || '',
239 tableGuid: selectedB.value || '', 244 tableName: selectedB.value || '',
245 classifyDetailName: val.classifyName,
246 gradeDetailName: val.levelName,
247 label: val.labelName,
240 }); 248 });
241 } 249 }
242 }; 250 };
...@@ -327,8 +335,8 @@ const tableInfo = ref({ ...@@ -327,8 +335,8 @@ const tableInfo = ref({
327 fields: [ 335 fields: [
328 { label: "序号", type: "index", width: 56, align: "center" }, 336 { label: "序号", type: "index", width: 56, align: "center" },
329 { label: "字段名", field: "fieldName", width: 140 }, 337 { label: "字段名", field: "fieldName", width: 140 },
330 { label: "分类", field: "classifyDetailName", width: 180 }, 338 { label: "分类", field: "classifyDetailName", width: 120 },
331 { label: "分级", field: "gradeDetailName", width: 120 }, 339 { label: "分级", field: "gradeDetailName", width: 80 },
332 { label: "标签", field: "label", width: 140 }, 340 { label: "标签", field: "label", width: 140 },
333 { label: "规则", field: "ruleDetail", width: 180 }, 341 { label: "规则", field: "ruleDetail", width: 180 },
334 { label: "表名", field: "tableName", width: 120, align: 'center' }, 342 { label: "表名", field: "tableName", width: 120, align: 'center' },
...@@ -489,7 +497,8 @@ const dataBaseTableInfo = ref({ ...@@ -489,7 +497,8 @@ const dataBaseTableInfo = ref({
489 tableChName: scope.row.tableChName, 497 tableChName: scope.row.tableChName,
490 tableGuid: scope.row.tableGuid, 498 tableGuid: scope.row.tableGuid,
491 description: scope.row.description, 499 description: scope.row.description,
492 execGuid: execGuidInfo.value.execGuid 500 execGuid: execGuidInfo.value.execGuid,
501 databaseChName: scope.row.databaseChName,
493 } 502 }
494 }); 503 });
495 } 504 }
...@@ -508,9 +517,9 @@ const dataBaseTableInfo = ref({ ...@@ -508,9 +517,9 @@ const dataBaseTableInfo = ref({
508 tableGuid: scope.row.tableGuid, 517 tableGuid: scope.row.tableGuid,
509 execGuid: execGuidInfo.value.execGuid, 518 execGuid: execGuidInfo.value.execGuid,
510 tableChName: scope.row.tableChName, 519 tableChName: scope.row.tableChName,
511 database: dataBaseInfo.value.database, 520 database: scope.row.database,
512 databaseChName: dataBaseInfo.value.databaseChName, 521 databaseChName: scope.row.databaseChName,
513 databaseGuid: dataBaseInfo.value.databaseGuid, 522 databaseGuid: scope.row.databaseGuid,
514 } 523 }
515 }); 524 });
516 } else { 525 } else {
...@@ -522,9 +531,9 @@ const dataBaseTableInfo = ref({ ...@@ -522,9 +531,9 @@ const dataBaseTableInfo = ref({
522 tableGuid: scope.row.tableGuid, 531 tableGuid: scope.row.tableGuid,
523 execGuid: execGuidInfo.value.execGuid, 532 execGuid: execGuidInfo.value.execGuid,
524 tableChName: scope.row.tableChName, 533 tableChName: scope.row.tableChName,
525 database: dataBaseInfo.value.database, 534 database: scope.row.database,
526 databaseChName: dataBaseInfo.value.databaseChName, 535 databaseChName: scope.row.databaseChName,
527 databaseGuid: dataBaseInfo.value.databaseGuid, 536 databaseGuid: scope.row.databaseGuid,
528 } 537 }
529 }); 538 });
530 } 539 }
...@@ -803,6 +812,9 @@ const handleClick = (tab: any) => { ...@@ -803,6 +812,9 @@ const handleClick = (tab: any) => {
803 console.log(tab.props.name); 812 console.log(tab.props.name);
804 activeName.value = tab.props.name; 813 activeName.value = tab.props.name;
805 if (tab.props.name === 'second') { 814 if (tab.props.name === 'second') {
815 selectedA.value = null;
816 selectedB.value = null;
817 selectedC.value = null;
806 optionsA.value = []; 818 optionsA.value = [];
807 optionsB.value = []; 819 optionsB.value = [];
808 optionsC.value = []; 820 optionsC.value = [];
...@@ -811,6 +823,9 @@ const handleClick = (tab: any) => { ...@@ -811,6 +823,9 @@ const handleClick = (tab: any) => {
811 getDataBaseFieldData(); 823 getDataBaseFieldData();
812 getDbDirTableSelectData(1, {}); 824 getDbDirTableSelectData(1, {});
813 } else { 825 } else {
826 selectedA.value = null;
827 selectedB.value = null;
828 selectedC.value = null;
814 optionsA.value = []; 829 optionsA.value = [];
815 optionsB.value = []; 830 optionsB.value = [];
816 optionsC.value = []; 831 optionsC.value = [];
...@@ -865,8 +880,8 @@ const dataBaseTableDataList = ref<any>(); ...@@ -865,8 +880,8 @@ const dataBaseTableDataList = ref<any>();
865 const getDataBaseTableData = async (params = {}) => { 880 const getDataBaseTableData = async (params = {}) => {
866 dataBaseTableInfo.value.loading = true; 881 dataBaseTableInfo.value.loading = true;
867 const dataBaseParams = { 882 const dataBaseParams = {
868 pageIndex: 1, 883 pageIndex: dataBasePage.value.curr,
869 pageSize: 50, 884 pageSize: dataBasePage.value.limit,
870 databaseGuid: "", 885 databaseGuid: "",
871 isDataAsset: '', 886 isDataAsset: '',
872 execGuid: execGuidInfo.value.execGuid, 887 execGuid: execGuidInfo.value.execGuid,
...@@ -883,6 +898,7 @@ const getDataBaseTableData = async (params = {}) => { ...@@ -883,6 +898,7 @@ const getDataBaseTableData = async (params = {}) => {
883 dataBaseTableDataList.value = res.data.records; 898 dataBaseTableDataList.value = res.data.records;
884 dataBaseTableInfo.value.page.rows = res.data.totalRows; 899 dataBaseTableInfo.value.page.rows = res.data.totalRows;
885 dataBaseTableInfo.value.page.limit = res.data.pageSize 900 dataBaseTableInfo.value.page.limit = res.data.pageSize
901 dataBaseTableInfo.value.page.curr = res.data.pageIndex
886 dataBaseTableInfo.value.data = res.data.records; 902 dataBaseTableInfo.value.data = res.data.records;
887 } else { 903 } else {
888 proxy.$ElMessage.error(res.msg); 904 proxy.$ElMessage.error(res.msg);
...@@ -891,7 +907,6 @@ const getDataBaseTableData = async (params = {}) => { ...@@ -891,7 +907,6 @@ const getDataBaseTableData = async (params = {}) => {
891 }; 907 };
892 908
893 const dataBaseTablePageChange = (info) => { 909 const dataBaseTablePageChange = (info) => {
894 console.log('dataBaseTablePageChange', info);
895 dataBasePage.value.curr = Number(info.curr); 910 dataBasePage.value.curr = Number(info.curr);
896 dataBasePage.value.limit = Number(info.limit); 911 dataBasePage.value.limit = Number(info.limit);
897 getDataBaseTableData({ 912 getDataBaseTableData({
...@@ -908,7 +923,7 @@ const getDataBaseFieldData = async (params = {}) => { ...@@ -908,7 +923,7 @@ const getDataBaseFieldData = async (params = {}) => {
908 tableFieldsDataInfo.value.loading = true; 923 tableFieldsDataInfo.value.loading = true;
909 const dataBaseParams = { 924 const dataBaseParams = {
910 pageIndex: 1, 925 pageIndex: 1,
911 pageSize: 50, 926 pageSize: -1,
912 tableGuid: "", 927 tableGuid: "",
913 execGuid: execGuidInfo.value.execGuid, 928 execGuid: execGuidInfo.value.execGuid,
914 databaseGuid: "", 929 databaseGuid: "",
...@@ -1047,11 +1062,11 @@ const addIsShowClassifyTip = () => { ...@@ -1047,11 +1062,11 @@ const addIsShowClassifyTip = () => {
1047 } 1062 }
1048 1063
1049 const tipHeight = ref(200); 1064 const tipHeight = ref(200);
1050 const tipHeight1 = ref(220); 1065 const tipHeight1 = ref(165);
1051 const addIsShowDatabaseTip = () => { 1066 const addIsShowDatabaseTip = () => {
1052 isShowDatabaseTip.value = false; 1067 isShowDatabaseTip.value = false;
1053 tipHeight.value = 148; 1068 tipHeight.value = 148;
1054 tipHeight1.value = 168; 1069 tipHeight1.value = 103;
1055 } 1070 }
1056 1071
1057 // 表信息和字段信息切换 1072 // 表信息和字段信息切换
...@@ -1300,7 +1315,7 @@ onActivated(async () => { ...@@ -1300,7 +1315,7 @@ onActivated(async () => {
1300 </div> 1315 </div>
1301 <div class="btns-area"> 1316 <div class="btns-area">
1302 <div class="left-btns"> 1317 <div class="left-btns">
1303 <el-button type="primary" @click="addStandardSet">查看已生产报告</el-button> 1318 <!-- <el-button type="primary" @click="addStandardSet">查看已生产报告</el-button> -->
1304 <el-button @click="btnClick">导出</el-button> 1319 <el-button @click="btnClick">导出</el-button>
1305 <el-button @click="batchControlRules">批量配置业务规则</el-button> 1320 <el-button @click="batchControlRules">批量配置业务规则</el-button>
1306 </div> 1321 </div>
...@@ -1373,8 +1388,8 @@ onActivated(async () => { ...@@ -1373,8 +1388,8 @@ onActivated(async () => {
1373 </el-dropdown> 1388 </el-dropdown>
1374 </div> 1389 </div>
1375 <el-button @click="exportDB">导出</el-button> 1390 <el-button @click="exportDB">导出</el-button>
1376 <el-button>查看已生产报告</el-button> 1391 <!-- <el-button>查看已生产报告</el-button>
1377 <el-button>查看质量规则</el-button> 1392 <el-button>查看质量规则</el-button> -->
1378 </div> 1393 </div>
1379 <div class="right-btns"> 1394 <div class="right-btns">
1380 <el-checkbox v-model="checked" label="仅看规划数据资产表" size="large" @change="changeCheck" /> 1395 <el-checkbox v-model="checked" label="仅看规划数据资产表" size="large" @change="changeCheck" />
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 <script lang="ts" setup name="configureRules"> 5 <script lang="ts" setup name="configureRules">
6 import { ref } from "vue"; 6 import { ref } from "vue";
7 import useUserStore from "@/store/modules/user"; 7 import useUserStore from "@/store/modules/user";
8 import { getBizRuleConfigDetail, saveBizRuleConfig, } from '@/api/modules/dataInventory' 8 import { getBizRuleConfigDetail, getNewDataTypeList, saveBizRuleConfig, } from '@/api/modules/dataInventory'
9 const { proxy } = getCurrentInstance() as any; 9 const { proxy } = getCurrentInstance() as any;
10 const router = useRouter(); 10 const router = useRouter();
11 const route = useRoute(); 11 const route = useRoute();
...@@ -31,15 +31,29 @@ const getBizRuleConfigDetailData = async () => { ...@@ -31,15 +31,29 @@ const getBizRuleConfigDetailData = async () => {
31 proxy.$message.error(res.msg) 31 proxy.$message.error(res.msg)
32 } 32 }
33 } 33 }
34 // 获取字段类型
35 const fieldData = ref<any>([]);
36 const getFieldTypeData = async () => {
37 const params = {
38 dictType: "字段类型"
39 }
40 const res: any = await getNewDataTypeList(params);
41 if (res.code == proxy.$passCode) {
42 fieldData.value = res.data || [];
43 } else {
44 proxy.$ElMessage.error(res.msg);
45 }
46 }
34 47
35 onMounted(() => { 48 onMounted(async () => {
36 getBizRuleConfigDetailData() 49 await getFieldTypeData()
50 await getBizRuleConfigDetailData()
37 }) 51 })
38 52
39 53
40 const tableData1 = ref([ 54 const tableData1 = ref([
41 { 55 {
42 cgDirName: router.currentRoute.value.query.cgDirName, 56 databaseChName: router.currentRoute.value.query.databaseChName,
43 tableName: router.currentRoute.value.query.tableName, 57 tableName: router.currentRoute.value.query.tableName,
44 tableChName: router.currentRoute.value.query.tableChName, 58 tableChName: router.currentRoute.value.query.tableChName,
45 description: router.currentRoute.value.query.description, 59 description: router.currentRoute.value.query.description,
...@@ -276,7 +290,7 @@ const cancel = () => { ...@@ -276,7 +290,7 @@ const cancel = () => {
276 'max-height': 'calc(100% - 16px)', 290 'max-height': 'calc(100% - 16px)',
277 display: 'inline-block', 291 display: 'inline-block',
278 }"> 292 }">
279 <el-table-column prop="cgDirName" label="数据源" width="180" /> 293 <el-table-column prop="databaseChName" label="数据源" width="180" />
280 <el-table-column prop="tableName" label="表名称" width="180" /> 294 <el-table-column prop="tableName" label="表名称" width="180" />
281 <el-table-column prop="tableChName" label="数据库表" width="280" /> 295 <el-table-column prop="tableChName" label="数据库表" width="280" />
282 <el-table-column prop="description" label="描述" width="180" show-overflow-tooltip /> 296 <el-table-column prop="description" label="描述" width="180" show-overflow-tooltip />
...@@ -298,33 +312,37 @@ const cancel = () => { ...@@ -298,33 +312,37 @@ const cancel = () => {
298 <!-- 排序列(不可编辑) --> 312 <!-- 排序列(不可编辑) -->
299 <el-table-column type="index" label="排序" width="80" align="center" /> 313 <el-table-column type="index" label="排序" width="80" align="center" />
300 <!-- 字段中文名(不可编辑)fieldChName --> 314 <!-- 字段中文名(不可编辑)fieldChName -->
301 <el-table-column prop="fieldChName" label="字段中文名" width="120"> 315 <el-table-column prop="fieldChName" label="字段中文名" width="120" show-overflow-tooltip>
302 <template #default="scope"> 316 <template #default="scope">
303 {{ scope.row.fieldChName ? scope.row.fieldChName : '--' }} 317 {{ scope.row.fieldChName ? scope.row.fieldChName : '--' }}
304 </template> 318 </template>
305 </el-table-column> 319 </el-table-column>
306 <!-- 字段英文名(不可编辑) --> 320 <!-- 字段英文名(不可编辑) -->
307 <el-table-column prop="fieldName" label="字段英文名" width="120"> 321 <el-table-column prop="fieldName" label="字段英文名" width="120" show-overflow-tooltip>
308 <template #default="scope"> 322 <template #default="scope">
309 {{ scope.row.fieldName ? scope.row.fieldName : '--' }} 323 {{ scope.row.fieldName ? scope.row.fieldName : '--' }}
310 </template> 324 </template>
311 </el-table-column> 325 </el-table-column>
312 <!-- 分类(不可编辑)classifyName --> 326 <!-- 分类(不可编辑)classifyName -->
313 <!-- <el-table-column prop="fieldEnglish" label="分类" width="120"> 327 <el-table-column prop="classifyName" label="分类" width="80" show-overflow-tooltip>
314 <template #default="scope"> 328 <template #default="scope">
315 {{ scope.row.fieldEnglish ? scope.row.fieldEnglish : '--' }} 329 {{ scope.row.classifyName ? scope.row.classifyName : '--' }}
316 </template> 330 </template>
317 </el-table-column> --> 331 </el-table-column>
318 <!-- 分级(不可编辑) --> 332 <!-- 分级(不可编辑) -->
319 <!-- <el-table-column prop="gradeDetailName" label="分级" width="120" align="center"> 333 <el-table-column prop="gradeDetailName" label="分级" width="80" align="center" show-overflow-tooltip>
320 <template #default="scope"> 334 <template #default="scope">
321 {{ scope.row.gradeDetailName ? scope.row.gradeDetailName : '--' }} 335 {{ scope.row.gradeDetailName ? scope.row.gradeDetailName : '--' }}
322 </template> 336 </template>
323 </el-table-column> --> 337 </el-table-column>
324 <!-- 字段类型fieldType (不可编辑) --> 338 <!-- 字段类型fieldType (不可编辑) -->
325 <el-table-column prop="fieldType" label="字段类型" width="150" align="center"> 339 <el-table-column prop="fieldType" label="字段类型" width="120" align="center">
326 <template #default="scope"> 340 <template #default="scope">
327 {{ scope.row.fieldType ? scope.row.fieldType : '--' }} 341 {{
342
343 fieldData ? (fieldData.find((item: any) => item.value === scope.row.fieldType)?.label || '--')
344 : '--'
345 }}
328 </template> 346 </template>
329 </el-table-column> 347 </el-table-column>
330 348
......
...@@ -78,12 +78,22 @@ const labelPageList = ref<any>() ...@@ -78,12 +78,22 @@ const labelPageList = ref<any>()
78 const getLabelPageData = async () => { 78 const getLabelPageData = async () => {
79 refCount.value++; 79 refCount.value++;
80 tableInfo.value.loading = true; 80 tableInfo.value.loading = true;
81 const params = { 81 let params = {}
82 pageIndex: page.value.curr, 82 if (guids.value.length == 0) {
83 pageSize: page.value.limit, 83 params = {
84 classifyGuid: classifyGuid.value, 84 pageIndex: page.value.curr,
85 detailGuid: classifyDetailGuid.value 85 pageSize: page.value.limit,
86 classifyGuid: classifyGuid.value,
87 detailGuid: classifyDetailGuid.value
88 }
89 } else {
90 params = {
91 pageIndex: page.value.curr,
92 pageSize: page.value.limit,
93 guids: guids.value
94 }
86 } 95 }
96
87 const res: any = await getLabelPageList(params); 97 const res: any = await getLabelPageList(params);
88 if (res.code == proxy.$passCode) { 98 if (res.code == proxy.$passCode) {
89 labelPageList.value = res.data.records; 99 labelPageList.value = res.data.records;
...@@ -254,6 +264,10 @@ const tableInfo = ref({ ...@@ -254,6 +264,10 @@ const tableInfo = ref({
254 { 264 {
255 label: "编辑", value: "edit", click: async (scope) => { 265 label: "编辑", value: "edit", click: async (scope) => {
256 console.log('编辑', scope); 266 console.log('编辑', scope);
267 const index = findIndexInRecursiveData(classGradeTreeData.value, scope.row.classifyDetailGuid);
268 const temp = classGradeTreeData.value.slice(index, index + 1);
269 console.log('temp', temp);
270 newCreateGradeFormItems.value[1].options = transformDataForTree([temp[0]])
257 newCreateGradeStandardDialogInfo.value.submitBtnLoading = false; 271 newCreateGradeStandardDialogInfo.value.submitBtnLoading = false;
258 newCreateGradeStandardDialogInfo.value.title = '编辑标签'; 272 newCreateGradeStandardDialogInfo.value.title = '编辑标签';
259 classifyGuid.value = scope.row.classifyGuid; 273 classifyGuid.value = scope.row.classifyGuid;
...@@ -302,6 +316,28 @@ const tableInfo = ref({ ...@@ -302,6 +316,28 @@ const tableInfo = ref({
302 loading: false 316 loading: false
303 }); 317 });
304 318
319 const findIndexInRecursiveData = (data: any[], targetGuid: string): number => {
320 // 遍历数组
321 for (let i = 0; i < data.length; i++) {
322 const item = data[i];
323
324 // 检查当前项的 guid 是否匹配
325 if (item.guid === targetGuid) {
326 return i; // 返回当前索引
327 }
328
329 // 如果当前项有 children,则递归查询
330 if (item.children) {
331 const childIndex = findIndexInRecursiveData(item.children, targetGuid);
332 if (childIndex !== -1) {
333 return i; // 返回外层索引
334 }
335 }
336 }
337 return -1; // 如果没有找到匹配项,则返回 -1
338 };
339
340
305 // 批量删除 341 // 批量删除
306 const batchRemobe = async () => { 342 const batchRemobe = async () => {
307 // 批量删除,增加confirm确认弹窗 343 // 批量删除,增加confirm确认弹窗
...@@ -689,6 +725,7 @@ const classSearchItemList = ref<any>([ ...@@ -689,6 +725,7 @@ const classSearchItemList = ref<any>([
689 725
690 const guids = ref<any>([]) 726 const guids = ref<any>([])
691 const selectChange = async (val: any, row: any) => { 727 const selectChange = async (val: any, row: any) => {
728 console.log('selectChange', val, row);
692 if (val) { 729 if (val) {
693 guids.value = val; 730 guids.value = val;
694 } 731 }
......
...@@ -196,7 +196,7 @@ const getPreviewData = () => { ...@@ -196,7 +196,7 @@ const getPreviewData = () => {
196 196
197 const getTableStructure = () => { 197 const getTableStructure = () => {
198 let tableName = currDatasourceSelect.value.tableName; 198 let tableName = currDatasourceSelect.value.tableName;
199 console.log('tableName', currDatasourceSelect.value); 199 console.log('tableName');
200 currDsTableStructureLoading.value = true; 200 currDsTableStructureLoading.value = true;
201 currDsTableStructure.value = []; 201 currDsTableStructure.value = [];
202 getDsTableStructure({ 202 getDsTableStructure({
...@@ -275,7 +275,6 @@ const datasource_selection_all_change = (selection) => { ...@@ -275,7 +275,6 @@ const datasource_selection_all_change = (selection) => {
275 }); 275 });
276 }; 276 };
277 const datasource_selection_change = (selection, row) => { 277 const datasource_selection_change = (selection, row) => {
278 console.log(selection, row);
279 let index = selection.findIndex((s) => s.tableName == row.tableName); 278 let index = selection.findIndex((s) => s.tableName == row.tableName);
280 if (index === -1) { 279 if (index === -1) {
281 datasourceSelectedRows.value.splice( 280 datasourceSelectedRows.value.splice(
...@@ -331,6 +330,7 @@ watch( ...@@ -331,6 +330,7 @@ watch(
331 watch(currDatasourceSelect, (val) => { 330 watch(currDatasourceSelect, (val) => {
332 if (val?.tableName) { 331 if (val?.tableName) {
333 // getPreviewData(); 332 // getPreviewData();
333 console.log('currDatasourceSelect', currDatasourceSelect, val);
334 getTableStructure(); 334 getTableStructure();
335 } 335 }
336 }); 336 });
......
...@@ -13,8 +13,6 @@ import { ...@@ -13,8 +13,6 @@ import {
13 updateDbDirTable, 13 updateDbDirTable,
14 createTableSql, 14 createTableSql,
15 getDsTableStructures, 15 getDsTableStructures,
16 getDbDirFieldClassifyAndGrade,
17 getDbDirTableSelectList,
18 getTaskExeTreeList, 16 getTaskExeTreeList,
19 getGradeList, 17 getGradeList,
20 getNewDataTypeList, 18 getNewDataTypeList,
...@@ -178,8 +176,8 @@ onMounted(async () => { ...@@ -178,8 +176,8 @@ onMounted(async () => {
178 tableName: editInfoData.value.tableName, 176 tableName: editInfoData.value.tableName,
179 tableChName: editInfoData.value.tableChName, 177 tableChName: editInfoData.value.tableChName,
180 description: editInfoData.value.description, 178 description: editInfoData.value.description,
179 databaseChName: editInfoData.value.databaseChName,
181 }]; 180 }];
182 console.log('tableDataInfo', res.data.fieldRSVOS)
183 tableDataDetailInfo.value = res.data.fieldRSVOS; 181 tableDataDetailInfo.value = res.data.fieldRSVOS;
184 tableFieldsLoading.value = false; 182 tableFieldsLoading.value = false;
185 } else { 183 } else {
...@@ -214,8 +212,9 @@ const handlDsSelectedChange = (v, guid) => { ...@@ -214,8 +212,9 @@ const handlDsSelectedChange = (v, guid) => {
214 execGuid: execGuid.value, 212 execGuid: execGuid.value,
215 }); 213 });
216 }); 214 });
217 215 if (params.length > 0) {
218 getNextTableInfo(params); 216 getNextTableInfo(params);
217 }
219 }; 218 };
220 219
221 220
...@@ -280,6 +279,7 @@ const tableDataInfo = ref([ ...@@ -280,6 +279,7 @@ const tableDataInfo = ref([
280 tableName: '', 279 tableName: '',
281 tableChName: '', 280 tableChName: '',
282 description: '', 281 description: '',
282 databaseChName: route.query.databaseChName || '',
283 }, 283 },
284 ]) 284 ])
285 // 表格数据 285 // 表格数据
...@@ -856,6 +856,20 @@ const inputLengthKeyUp = (regexp, scope, field, max: any = null, min: any = null ...@@ -856,6 +856,20 @@ const inputLengthKeyUp = (regexp, scope, field, max: any = null, min: any = null
856 'max-height': 'calc(100% - 16px)', 856 'max-height': 'calc(100% - 16px)',
857 display: 'inline-block', 857 display: 'inline-block',
858 }" v-loading="tableFieldsLoading"> 858 }" v-loading="tableFieldsLoading">
859 <el-table-column prop="databaseChName" label="数据源" width="200px" align="left" show-overflow-tooltip>
860 <template #header>
861 <span>数据源</span>
862 <span style="color:red;margin-left: 2px;">*</span>
863 </template>
864 <template #default="scope">
865 <!-- <el-select v-model="scope.row['dataSourceGuid']" placeholder="请选择" :disabled="tableCreateInfo.isCreate"
866 @change="(val) => selectDatabaseChange(val)" clearable filterable>
867 <el-option v-for="opt in databaseList" :key="opt['guid']" :label="opt['databaseNameZh']"
868 :value="opt['guid']" />
869 </el-select> -->
870 <el-input v-model.trim="scope.row.databaseChName" :disabled="true" />
871 </template>
872 </el-table-column>
859 <!-- 表名称列 --> 873 <!-- 表名称列 -->
860 <el-table-column prop="tableName" label="表名称" width="180"> 874 <el-table-column prop="tableName" label="表名称" width="180">
861 <template #header> 875 <template #header>
......
...@@ -1527,7 +1527,6 @@ const saveDraftTable = async () => { ...@@ -1527,7 +1527,6 @@ const saveDraftTable = async () => {
1527 isDraft: 'Y', 1527 isDraft: 'Y',
1528 fieldRQVOList: TepmTableDataDetailInfo 1528 fieldRQVOList: TepmTableDataDetailInfo
1529 } 1529 }
1530 console.log(InParams, '--------------------------------------');
1531 const res: any = await saveDbDirTable(InParams); 1530 const res: any = await saveDbDirTable(InParams);
1532 if (res.code === proxy.$passCode) { 1531 if (res.code === proxy.$passCode) {
1533 proxy.$ElMessage.success('保存草稿成功!'); 1532 proxy.$ElMessage.success('保存草稿成功!');
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!