Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop
Showing
14 changed files
with
203 additions
and
113 deletions
| ... | @@ -33,6 +33,9 @@ VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service | ... | @@ -33,6 +33,9 @@ VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service |
| 33 | # VITE_APP_CHECK_BASEURL = /mock | 33 | # VITE_APP_CHECK_BASEURL = /mock |
| 34 | VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory | 34 | VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory |
| 35 | 35 | ||
| 36 | #数据源接口地址 | ||
| 37 | VITE_APP_DATA_SOURCE_URL = ms-daop-data-source-service | ||
| 38 | |||
| 36 | # 数据字典接口地址 | 39 | # 数据字典接口地址 |
| 37 | VITE_APP_CONFIG_URL = 'ms-daop-configure-service' | 40 | VITE_APP_CONFIG_URL = 'ms-daop-configure-service' |
| 38 | 41 | ... | ... |
| ... | @@ -62,6 +62,9 @@ VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory | ... | @@ -62,6 +62,9 @@ VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory |
| 62 | # 数据字典接口地址 | 62 | # 数据字典接口地址 |
| 63 | VITE_APP_CONFIG_URL = 'ms-daop-configure-service' | 63 | VITE_APP_CONFIG_URL = 'ms-daop-configure-service' |
| 64 | 64 | ||
| 65 | #数据源接口地址 | ||
| 66 | VITE_APP_DATA_SOURCE_URL = ms-daop-data-source-service | ||
| 67 | |||
| 65 | # 文件上传下载接口地址 | 68 | # 文件上传下载接口地址 |
| 66 | VITE_APP_COMMON_URL = 'ms-daop-common-service' | 69 | VITE_APP_COMMON_URL = 'ms-daop-common-service' |
| 67 | 70 | ... | ... |
| ... | @@ -764,8 +764,8 @@ export const createTableSql = (data) => request({ | ... | @@ -764,8 +764,8 @@ export const createTableSql = (data) => request({ |
| 764 | * @param {no params} | 764 | * @param {no params} |
| 765 | * @path /cg-dir/export | 765 | * @path /cg-dir/export |
| 766 | */ | 766 | */ |
| 767 | export const exportCgDir = () => request({ | 767 | export const exportCgDir = (params) => request({ |
| 768 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/export`, | 768 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/export?execGuid=${params.execGuid}`, |
| 769 | method: 'post', | 769 | method: 'post', |
| 770 | responseType: 'blob', | 770 | responseType: 'blob', |
| 771 | }) | 771 | }) |
| ... | @@ -792,6 +792,21 @@ export const getDbDirDetail = (params) => request({ | ... | @@ -792,6 +792,21 @@ export const getDbDirDetail = (params) => request({ |
| 792 | method: 'get', | 792 | method: 'get', |
| 793 | }) | 793 | }) |
| 794 | 794 | ||
| 795 | /** | ||
| 796 | * 数据库目录修改规划数据资产 | ||
| 797 | * @param {Object} | ||
| 798 | * @path /db-dir/table/update-data-asset | ||
| 799 | * | ||
| 800 | */ | ||
| 801 | |||
| 802 | export const updateDataAsset = (data) => request({ | ||
| 803 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/update-data-asset`, | ||
| 804 | method: 'post', | ||
| 805 | data | ||
| 806 | }) | ||
| 807 | |||
| 808 | |||
| 809 | |||
| 795 | /*********************业务规则配置 ************数据库目录************************* */ | 810 | /*********************业务规则配置 ************数据库目录************************* */ |
| 796 | 811 | ||
| 797 | /** | 812 | /** | ... | ... |
| ... | @@ -192,7 +192,7 @@ export const getMetaChangeList = (params) => request({ | ... | @@ -192,7 +192,7 @@ export const getMetaChangeList = (params) => request({ |
| 192 | 192 | ||
| 193 | /** 获取数据库选择列表 */ | 193 | /** 获取数据库选择列表 */ |
| 194 | export const getDatabase = (params) => request({ | 194 | export const getDatabase = (params) => request({ |
| 195 | url: `${import.meta.env.VITE_APP_API_BASEURL}/data-source/get-source-list`, | 195 | url: `${import.meta.env.VITE_APP_DATA_SOURCE_URL}/data-source/get-source-list`, |
| 196 | method: 'post', | 196 | method: 'post', |
| 197 | data: params | 197 | data: params |
| 198 | }) | 198 | }) | ... | ... |
| ... | @@ -235,8 +235,8 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -235,8 +235,8 @@ const routes: RouteRecordRaw[] = [ |
| 235 | reuse: true | 235 | reuse: true |
| 236 | }, | 236 | }, |
| 237 | beforeEnter: (to, from) => { | 237 | beforeEnter: (to, from) => { |
| 238 | if (to.query.domainName) { | 238 | if (to.query.editOpt) { |
| 239 | to.meta.title = `已有表新建(${to.query.domainName})`; | 239 | to.meta.title = `编辑-(${to.query.tableChName})`; |
| 240 | to.meta.editPage = true; | 240 | to.meta.editPage = true; |
| 241 | } | 241 | } |
| 242 | } | 242 | } | ... | ... |
| ... | @@ -93,46 +93,46 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -93,46 +93,46 @@ const routes: RouteRecordRaw[] = [ |
| 93 | }, | 93 | }, |
| 94 | ], | 94 | ], |
| 95 | }, | 95 | }, |
| 96 | // { | 96 | { |
| 97 | // path: '/data-meta/metadata-lineage', | 97 | path: '/data-meta/metadata-lineage', |
| 98 | // component: Layout, | 98 | component: Layout, |
| 99 | // meta: { | 99 | meta: { |
| 100 | // title: '元数据血缘', | 100 | title: '元数据血缘', |
| 101 | // icon: 'ep:grid', | 101 | icon: 'ep:grid', |
| 102 | // }, | 102 | }, |
| 103 | // children: [ | 103 | children: [ |
| 104 | // { | 104 | { |
| 105 | // path: 'analysis-view', | 105 | path: 'analysis-view', |
| 106 | // name: 'analysisView', | 106 | name: 'analysisView', |
| 107 | // component: () => import('@/views/data_meta/analysisView.vue'), | 107 | component: () => import('@/views/data_meta/analysisView.vue'), |
| 108 | // meta: { | 108 | meta: { |
| 109 | // title: '查看血缘', | 109 | title: '查看血缘', |
| 110 | // breadcrumb: false, | 110 | breadcrumb: false, |
| 111 | // cache: true | 111 | cache: true |
| 112 | // }, | 112 | }, |
| 113 | // }, | 113 | }, |
| 114 | // { | 114 | { |
| 115 | // path: 'change-detection', | 115 | path: 'change-detection', |
| 116 | // name: 'changeDetection', | 116 | name: 'changeDetection', |
| 117 | // component: () => import('@/views/data_meta/changeDetection.vue'), | 117 | component: () => import('@/views/data_meta/changeDetection.vue'), |
| 118 | // meta: { | 118 | meta: { |
| 119 | // title: '血缘变更检测', | 119 | title: '血缘变更检测', |
| 120 | // breadcrumb: false, | 120 | breadcrumb: false, |
| 121 | // cache: true | 121 | cache: true |
| 122 | // }, | 122 | }, |
| 123 | // }, | 123 | }, |
| 124 | // { | 124 | { |
| 125 | // path: 'analysis-reports', | 125 | path: 'analysis-reports', |
| 126 | // name: 'analysisReports', | 126 | name: 'analysisReports', |
| 127 | // component: () => import('@/views/data_meta/analysisReports.vue'), | 127 | component: () => import('@/views/data_meta/analysisReports.vue'), |
| 128 | // meta: { | 128 | meta: { |
| 129 | // title: '血缘关系解析', | 129 | title: '血缘关系解析', |
| 130 | // breadcrumb: false, | 130 | breadcrumb: false, |
| 131 | // cache: true | 131 | cache: true |
| 132 | // }, | 132 | }, |
| 133 | // }, | 133 | }, |
| 134 | // ], | 134 | ], |
| 135 | // }, | 135 | }, |
| 136 | ] | 136 | ] |
| 137 | 137 | ||
| 138 | export default routes | 138 | export default routes | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -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(); |
| ... | @@ -13,6 +13,7 @@ const fullPath = route.fullPath; | ... | @@ -13,6 +13,7 @@ const fullPath = route.fullPath; |
| 13 | const userStore = useUserStore(); | 13 | const userStore = useUserStore(); |
| 14 | const bizRuleConfigData = ref<any>() | 14 | const bizRuleConfigData = ref<any>() |
| 15 | const getBizRuleConfigDetailData = async () => { | 15 | const getBizRuleConfigDetailData = async () => { |
| 16 | tableFieldsLoading.value = true | ||
| 16 | const params = { | 17 | const params = { |
| 17 | tableGuid: router.currentRoute.value.query.tableGuid, | 18 | tableGuid: router.currentRoute.value.query.tableGuid, |
| 18 | execGuid: router.currentRoute.value.query.execGuid | 19 | execGuid: router.currentRoute.value.query.execGuid |
| ... | @@ -25,22 +26,37 @@ const getBizRuleConfigDetailData = async () => { | ... | @@ -25,22 +26,37 @@ const getBizRuleConfigDetailData = async () => { |
| 25 | item.isEdit = false | 26 | item.isEdit = false |
| 26 | }) | 27 | }) |
| 27 | tableData.value = bizRuleConfigData.value | 28 | tableData.value = bizRuleConfigData.value |
| 29 | tableFieldsLoading.value = false | ||
| 28 | } else { | 30 | } else { |
| 29 | proxy.$message.error(res.msg) | 31 | proxy.$message.error(res.msg) |
| 30 | } | 32 | } |
| 31 | } | 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 | } | ||
| 32 | 47 | ||
| 33 | onMounted(() => { | 48 | onMounted(async () => { |
| 34 | getBizRuleConfigDetailData() | 49 | await getFieldTypeData() |
| 50 | await getBizRuleConfigDetailData() | ||
| 35 | }) | 51 | }) |
| 36 | 52 | ||
| 37 | 53 | ||
| 38 | const tableData1 = ref([ | 54 | const tableData1 = ref([ |
| 39 | { | 55 | { |
| 40 | cgDirName: router.currentRoute.value.query.cgDirName, | 56 | databaseChName: router.currentRoute.value.query.databaseChName || '--', |
| 41 | tableName: router.currentRoute.value.query.tableName, | 57 | tableName: router.currentRoute.value.query.tableName || '--', |
| 42 | tableChName: router.currentRoute.value.query.tableChName, | 58 | tableChName: router.currentRoute.value.query.tableChName || '--', |
| 43 | description: router.currentRoute.value.query.description, | 59 | description: router.currentRoute.value.query.description || '--', |
| 44 | }, | 60 | }, |
| 45 | ]) | 61 | ]) |
| 46 | // 表格数据 | 62 | // 表格数据 |
| ... | @@ -71,7 +87,7 @@ const moveUp = () => { | ... | @@ -71,7 +87,7 @@ const moveUp = () => { |
| 71 | return; | 87 | return; |
| 72 | } | 88 | } |
| 73 | selectedRows.value.forEach((row: any) => { | 89 | selectedRows.value.forEach((row: any) => { |
| 74 | const index = tableData.value.findIndex((item) => item.guid === row.guid); | 90 | const index = tableData.value.findIndex((item) => item.tableData === row.tableData); |
| 75 | if (index > 0) { | 91 | if (index > 0) { |
| 76 | [tableData.value[index - 1], tableData.value[index]] = [ | 92 | [tableData.value[index - 1], tableData.value[index]] = [ |
| 77 | tableData.value[index], | 93 | tableData.value[index], |
| ... | @@ -89,7 +105,7 @@ const moveDown = () => { | ... | @@ -89,7 +105,7 @@ const moveDown = () => { |
| 89 | } | 105 | } |
| 90 | // 倒序遍历选中行 | 106 | // 倒序遍历选中行 |
| 91 | [...selectedRows.value].reverse().forEach((row: any) => { | 107 | [...selectedRows.value].reverse().forEach((row: any) => { |
| 92 | const index = tableData.value.findIndex((item) => item.guid === row.guid); | 108 | const index = tableData.value.findIndex((item) => item.tableData === row.tableData); |
| 93 | if (index < tableData.value.length - 1) { | 109 | if (index < tableData.value.length - 1) { |
| 94 | [tableData.value[index], tableData.value[index + 1]] = [ | 110 | [tableData.value[index], tableData.value[index + 1]] = [ |
| 95 | tableData.value[index + 1], | 111 | tableData.value[index + 1], |
| ... | @@ -98,6 +114,30 @@ const moveDown = () => { | ... | @@ -98,6 +114,30 @@ const moveDown = () => { |
| 98 | } | 114 | } |
| 99 | }); | 115 | }); |
| 100 | }; | 116 | }; |
| 117 | // 删除行 | ||
| 118 | const deleteRow = (index) => { | ||
| 119 | // confirm 弹窗 | ||
| 120 | proxy.$confirm('是否删除该行数据?', '提示', { | ||
| 121 | confirmButtonText: '确定', | ||
| 122 | cancelButtonText: '取消', | ||
| 123 | type: 'warning', | ||
| 124 | }).then(() => { | ||
| 125 | tableData.value.splice(index, 1) | ||
| 126 | }).catch(() => { | ||
| 127 | proxy.$message({ | ||
| 128 | type: 'info', | ||
| 129 | message: '已取消删除' | ||
| 130 | }); | ||
| 131 | }); | ||
| 132 | } | ||
| 133 | // 批量删除功能 | ||
| 134 | const batchDelete = () => { | ||
| 135 | selectedRows.value.forEach((row: any) => { | ||
| 136 | const index = tableData.value.findIndex((item) => item.tableData === row.tableData); | ||
| 137 | if (index !== -1) tableData.value.splice(index, 1); | ||
| 138 | }); | ||
| 139 | selectedRows.value = []; | ||
| 140 | }; | ||
| 101 | 141 | ||
| 102 | // 编辑行 | 142 | // 编辑行 |
| 103 | const editRow = (row) => { | 143 | const editRow = (row) => { |
| ... | @@ -125,19 +165,6 @@ const saveRow = (row) => { | ... | @@ -125,19 +165,6 @@ const saveRow = (row) => { |
| 125 | } | 165 | } |
| 126 | row.isEdit = false | 166 | row.isEdit = false |
| 127 | } | 167 | } |
| 128 | |||
| 129 | // 删除行 | ||
| 130 | const deleteRow = (index) => { | ||
| 131 | tableData.value.splice(index, 1) | ||
| 132 | } | ||
| 133 | // 批量删除功能 | ||
| 134 | const batchDelete = () => { | ||
| 135 | selectedRows.value.forEach((row: any) => { | ||
| 136 | const index = tableData.value.findIndex((item) => item.id === row.id); | ||
| 137 | if (index !== -1) tableData.value.splice(index, 1); | ||
| 138 | }); | ||
| 139 | selectedRows.value = []; | ||
| 140 | }; | ||
| 141 | const data = [ | 168 | const data = [ |
| 142 | { | 169 | { |
| 143 | value: '1', | 170 | value: '1', |
| ... | @@ -274,7 +301,7 @@ const cancel = () => { | ... | @@ -274,7 +301,7 @@ const cancel = () => { |
| 274 | 'max-height': 'calc(100% - 16px)', | 301 | 'max-height': 'calc(100% - 16px)', |
| 275 | display: 'inline-block', | 302 | display: 'inline-block', |
| 276 | }"> | 303 | }"> |
| 277 | <el-table-column prop="cgDirName" label="数据源" width="180" /> | 304 | <el-table-column prop="databaseChName" label="数据源" width="180" /> |
| 278 | <el-table-column prop="tableName" label="表名称" width="180" /> | 305 | <el-table-column prop="tableName" label="表名称" width="180" /> |
| 279 | <el-table-column prop="tableChName" label="数据库表" width="280" /> | 306 | <el-table-column prop="tableChName" label="数据库表" width="280" /> |
| 280 | <el-table-column prop="description" label="描述" width="180" show-overflow-tooltip /> | 307 | <el-table-column prop="description" label="描述" width="180" show-overflow-tooltip /> |
| ... | @@ -296,33 +323,37 @@ const cancel = () => { | ... | @@ -296,33 +323,37 @@ const cancel = () => { |
| 296 | <!-- 排序列(不可编辑) --> | 323 | <!-- 排序列(不可编辑) --> |
| 297 | <el-table-column type="index" label="排序" width="80" align="center" /> | 324 | <el-table-column type="index" label="排序" width="80" align="center" /> |
| 298 | <!-- 字段中文名(不可编辑)fieldChName --> | 325 | <!-- 字段中文名(不可编辑)fieldChName --> |
| 299 | <el-table-column prop="fieldChName" label="字段中文名" width="120"> | 326 | <el-table-column prop="fieldChName" label="字段中文名" width="120" show-overflow-tooltip> |
| 300 | <template #default="scope"> | 327 | <template #default="scope"> |
| 301 | {{ scope.row.fieldChName ? scope.row.fieldChName : '--' }} | 328 | {{ scope.row.fieldChName ? scope.row.fieldChName : '--' }} |
| 302 | </template> | 329 | </template> |
| 303 | </el-table-column> | 330 | </el-table-column> |
| 304 | <!-- 字段英文名(不可编辑) --> | 331 | <!-- 字段英文名(不可编辑) --> |
| 305 | <el-table-column prop="fieldName" label="字段英文名" width="120"> | 332 | <el-table-column prop="fieldName" label="字段英文名" width="120" show-overflow-tooltip> |
| 306 | <template #default="scope"> | 333 | <template #default="scope"> |
| 307 | {{ scope.row.fieldName ? scope.row.fieldName : '--' }} | 334 | {{ scope.row.fieldName ? scope.row.fieldName : '--' }} |
| 308 | </template> | 335 | </template> |
| 309 | </el-table-column> | 336 | </el-table-column> |
| 310 | <!-- 分类(不可编辑)classifyName --> | 337 | <!-- 分类(不可编辑)classifyName --> |
| 311 | <!-- <el-table-column prop="fieldEnglish" label="分类" width="120"> | 338 | <el-table-column prop="classifyName" label="分类" width="80" show-overflow-tooltip> |
| 312 | <template #default="scope"> | 339 | <template #default="scope"> |
| 313 | {{ scope.row.fieldEnglish ? scope.row.fieldEnglish : '--' }} | 340 | {{ scope.row.classifyName ? scope.row.classifyName : '--' }} |
| 314 | </template> | 341 | </template> |
| 315 | </el-table-column> --> | 342 | </el-table-column> |
| 316 | <!-- 分级(不可编辑) --> | 343 | <!-- 分级(不可编辑) --> |
| 317 | <!-- <el-table-column prop="gradeDetailName" label="分级" width="120" align="center"> | 344 | <el-table-column prop="gradeDetailName" label="分级" width="80" align="center" show-overflow-tooltip> |
| 318 | <template #default="scope"> | 345 | <template #default="scope"> |
| 319 | {{ scope.row.gradeDetailName ? scope.row.gradeDetailName : '--' }} | 346 | {{ scope.row.gradeDetailName ? scope.row.gradeDetailName : '--' }} |
| 320 | </template> | 347 | </template> |
| 321 | </el-table-column> --> | 348 | </el-table-column> |
| 322 | <!-- 字段类型fieldType (不可编辑) --> | 349 | <!-- 字段类型fieldType (不可编辑) --> |
| 323 | <el-table-column prop="fieldType" label="字段类型" width="150" align="center"> | 350 | <el-table-column prop="fieldType" label="字段类型" width="120" align="center"> |
| 324 | <template #default="scope"> | 351 | <template #default="scope"> |
| 325 | {{ scope.row.fieldType ? scope.row.fieldType : '--' }} | 352 | {{ |
| 353 | |||
| 354 | fieldData ? (fieldData.find((item: any) => item.value === scope.row.fieldType)?.label || '--') | ||
| 355 | : '--' | ||
| 356 | }} | ||
| 326 | </template> | 357 | </template> |
| 327 | </el-table-column> | 358 | </el-table-column> |
| 328 | 359 | ... | ... |
| ... | @@ -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,8 +264,13 @@ const tableInfo = ref({ | ... | @@ -254,8 +264,13 @@ 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 = '编辑标签'; |
| 273 | classifyGuid.value = scope.row.classifyGuid; | ||
| 259 | await getGradeListData(scope.row.gradeGuid); | 274 | await getGradeListData(scope.row.gradeGuid); |
| 260 | // 遍历classGradeTreeData 找到对应的guid item的refGradeGuid | 275 | // 遍历classGradeTreeData 找到对应的guid item的refGradeGuid |
| 261 | classGradeTreeData.value.forEach((element: any) => { | 276 | classGradeTreeData.value.forEach((element: any) => { |
| ... | @@ -301,6 +316,28 @@ const tableInfo = ref({ | ... | @@ -301,6 +316,28 @@ const tableInfo = ref({ |
| 301 | loading: false | 316 | loading: false |
| 302 | }); | 317 | }); |
| 303 | 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 | |||
| 304 | // 批量删除 | 341 | // 批量删除 |
| 305 | const batchRemobe = async () => { | 342 | const batchRemobe = async () => { |
| 306 | // 批量删除,增加confirm确认弹窗 | 343 | // 批量删除,增加confirm确认弹窗 |
| ... | @@ -401,6 +438,7 @@ const tableBtnClick = async (scope, value) => { | ... | @@ -401,6 +438,7 @@ const tableBtnClick = async (scope, value) => { |
| 401 | // newCreateGradeStandardDialogInfo.value.visible = true; | 438 | // newCreateGradeStandardDialogInfo.value.visible = true; |
| 402 | newCreateGradeStandardDialogInfo.value.submitBtnLoading = false; | 439 | newCreateGradeStandardDialogInfo.value.submitBtnLoading = false; |
| 403 | newCreateGradeStandardDialogInfo.value.title = '编辑标签'; | 440 | newCreateGradeStandardDialogInfo.value.title = '编辑标签'; |
| 441 | classifyGuid.value = scope.row.classifyGuid; | ||
| 404 | await getGradeListData(scope.row.gradeGuid); | 442 | await getGradeListData(scope.row.gradeGuid); |
| 405 | // 遍历classGradeTreeData 找到对应的guid item的refGradeGuid | 443 | // 遍历classGradeTreeData 找到对应的guid item的refGradeGuid |
| 406 | classGradeTreeData.value.forEach((element: any) => { | 444 | classGradeTreeData.value.forEach((element: any) => { |
| ... | @@ -687,6 +725,7 @@ const classSearchItemList = ref<any>([ | ... | @@ -687,6 +725,7 @@ const classSearchItemList = ref<any>([ |
| 687 | 725 | ||
| 688 | const guids = ref<any>([]) | 726 | const guids = ref<any>([]) |
| 689 | const selectChange = async (val: any, row: any) => { | 727 | const selectChange = async (val: any, row: any) => { |
| 728 | console.log('selectChange', val, row); | ||
| 690 | if (val) { | 729 | if (val) { |
| 691 | guids.value = val; | 730 | guids.value = val; |
| 692 | } | 731 | } |
| ... | @@ -798,7 +837,7 @@ const positionOptions = [ | ... | @@ -798,7 +837,7 @@ const positionOptions = [ |
| 798 | ]; | 837 | ]; |
| 799 | // 语言options | 838 | // 语言options |
| 800 | const languageOptions = [ | 839 | const languageOptions = [ |
| 801 | { label: '中文名', value: 'zhName' }, | 840 | { label: '中文名', value: 'chName' }, |
| 802 | { label: '英文名', value: 'enName' }, | 841 | { label: '英文名', value: 'enName' }, |
| 803 | ]; | 842 | ]; |
| 804 | // 当前悬停的行索引 | 843 | // 当前悬停的行索引 | ... | ... |
| ... | @@ -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 | }); | ... | ... |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
| ... | @@ -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: 210, | 107 | width: 230, |
| 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,19 +472,18 @@ const setDetailInfo = (row) => { | ... | @@ -472,19 +472,18 @@ const setDetailInfo = (row) => { |
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | const getDataSourceList = () => { | 474 | const getDataSourceList = () => { |
| 475 | // TODO | 475 | getDatabase({ connectStatus: 1 }).then((res: any) => { |
| 476 | // getDatabase({ connectStatus: 1 }).then((res: any) => { | 476 | if (res.code == proxy.$passCode) { |
| 477 | // if (res.code == proxy.$passCode) { | 477 | dataSourceList.value = res.data || []; |
| 478 | // dataSourceList.value = res.data || []; | 478 | formItems.value[1].options = dataSourceList.value; |
| 479 | // formItems.value[1].options = dataSourceList.value; | 479 | searchItemList.value[1].options = dataSourceList.value; |
| 480 | // searchItemList.value[1].options = dataSourceList.value; | 480 | } else { |
| 481 | // } else { | 481 | proxy.$ElMessage({ |
| 482 | // proxy.$ElMessage({ | 482 | type: "error", |
| 483 | // type: "error", | 483 | message: res.msg, |
| 484 | // message: res.msg, | 484 | }); |
| 485 | // }); | 485 | } |
| 486 | // } | 486 | }) |
| 487 | // }) | ||
| 488 | } | 487 | } |
| 489 | 488 | ||
| 490 | const radioGroupChange = (val, info) => { | 489 | const radioGroupChange = (val, info) => { |
| ... | @@ -598,7 +597,7 @@ onBeforeMount(() => { | ... | @@ -598,7 +597,7 @@ onBeforeMount(() => { |
| 598 | <!-- 头部搜索 --> | 597 | <!-- 头部搜索 --> |
| 599 | <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" :init="false" /> | 598 | <TableTools :searchItems="searchItemList" :searchId="'data-source-search'" @search="toSearch" :init="false" /> |
| 600 | <div class="tools_btns"> | 599 | <div class="tools_btns"> |
| 601 | <!-- <el-button type="primary" @click="loadDrawer">新建</el-button> --> | 600 | <el-button type="primary" @click="loadDrawer">新建</el-button> |
| 602 | <el-button @click="importMeta">导入</el-button> | 601 | <el-button @click="importMeta">导入</el-button> |
| 603 | </div> | 602 | </div> |
| 604 | </div> | 603 | </div> | ... | ... |
| ... | @@ -60,8 +60,8 @@ const tabsInfo = ref({ | ... | @@ -60,8 +60,8 @@ const tabsInfo = ref({ |
| 60 | activeName: '', | 60 | activeName: '', |
| 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 | /** 切换布局 */ |
| ... | @@ -192,13 +192,13 @@ const tabsPaneMap = ref({ | ... | @@ -192,13 +192,13 @@ const tabsPaneMap = ref({ |
| 192 | tableInfo: fieldTableInfo.value, | 192 | tableInfo: fieldTableInfo.value, |
| 193 | show: true | 193 | show: true |
| 194 | }, | 194 | }, |
| 195 | // { | 195 | { |
| 196 | // title: '索引信息', | 196 | title: '索引信息', |
| 197 | // type: 'table', | 197 | type: 'table', |
| 198 | // isIndex: true, | 198 | isIndex: true, |
| 199 | // tableInfo: indexTableInfo.value, | 199 | tableInfo: indexTableInfo.value, |
| 200 | // show: true | 200 | show: true |
| 201 | // }, | 201 | }, |
| 202 | ], | 202 | ], |
| 203 | second: [ | 203 | second: [ |
| 204 | { | 204 | { |
| ... | @@ -310,10 +310,10 @@ const lineageDataLoading = ref(true); | ... | @@ -310,10 +310,10 @@ const lineageDataLoading = ref(true); |
| 310 | const getDetailInfo = () => { | 310 | const getDetailInfo = () => { |
| 311 | getSheetDetail() | 311 | getSheetDetail() |
| 312 | getSheetField() | 312 | getSheetField() |
| 313 | // getSheetKeys() | 313 | getSheetKeys() |
| 314 | logPage.value.curr = 1 | 314 | logPage.value.curr = 1 |
| 315 | //getSheetLog(); | 315 | getSheetLog(); |
| 316 | // getTableLineageMap(); | 316 | getTableLineageMap(); |
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | const getSheetDetail = () => { | 319 | const getSheetDetail = () => { | ... | ... |
-
Please register or sign in to post a comment