updata: 分类分级目录模块开发
Showing
7 changed files
with
354 additions
and
11 deletions
| ... | @@ -3,8 +3,8 @@ VITE_APP_TITLE = 数据资产管理系统 | ... | @@ -3,8 +3,8 @@ VITE_APP_TITLE = 数据资产管理系统 |
| 3 | # 接口域名 | 3 | # 接口域名 |
| 4 | # VITE_API_BASEURL = https://www.zgsjzc.com/api | 4 | # VITE_API_BASEURL = https://www.zgsjzc.com/api |
| 5 | # VITE_API_BASEURL = https://swzl-test.csbr.cn/api | 5 | # VITE_API_BASEURL = https://swzl-test.csbr.cn/api |
| 6 | # VITE_API_BASEURL = http://localhost:9000 | 6 | VITE_API_BASEURL = http://localhost:9000 |
| 7 | VITE_API_BASEURL = http://10.4.82.1:28052/ | 7 | # VITE_API_BASEURL = http://10.4.82.1:28052/ |
| 8 | # 平台用户 接口请地址 | 8 | # 平台用户 接口请地址 |
| 9 | VITE_APP_USER_API_BASEURL = gateway-server/user | 9 | VITE_APP_USER_API_BASEURL = gateway-server/user |
| 10 | # 系统管理 接口地址 | 10 | # 系统管理 接口地址 |
| ... | @@ -25,8 +25,8 @@ VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service | ... | @@ -25,8 +25,8 @@ VITE_APP_PLAN_BASEURL = ms-daop-jgjf-data-plan-service |
| 25 | VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service | 25 | VITE_APP_QUALITY_BASEURL = ms-daop-data-quality-service |
| 26 | 26 | ||
| 27 | #数据盘点接口地址ms-daop-zcgl-data-inventory | 27 | #数据盘点接口地址ms-daop-zcgl-data-inventory |
| 28 | # VITE_APP_CHECK_BASEURL = /mock | 28 | VITE_APP_CHECK_BASEURL = /mock |
| 29 | VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory | 29 | # VITE_APP_CHECK_BASEURL = ms-daop-zcgl-data-inventory |
| 30 | 30 | ||
| 31 | #门户接口 | 31 | #门户接口 |
| 32 | VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal | 32 | VITE_API_PORTALURL = https://swzl-test.zgsjzc.com/portal | ... | ... |
| ... | @@ -226,3 +226,45 @@ export const getCgDirFieldPageList = (data) => request({ | ... | @@ -226,3 +226,45 @@ export const getCgDirFieldPageList = (data) => request({ |
| 226 | method: 'post', | 226 | method: 'post', |
| 227 | data | 227 | data |
| 228 | }) | 228 | }) |
| 229 | |||
| 230 | /** 获取字典列表 | ||
| 231 | * VITE_APP_PLAN_BASEURL 为环境变量 现在只是mock数据 | ||
| 232 | */ | ||
| 233 | export const getDictionary = (params) => request({ | ||
| 234 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/data-dictionary-general/list-all?state=1`, | ||
| 235 | method: 'post' | ||
| 236 | }) | ||
| 237 | |||
| 238 | |||
| 239 | |||
| 240 | /** 业务规则配置-新增 | ||
| 241 | * @param {Object} | ||
| 242 | * @path /biz-rule-config/save | ||
| 243 | */ | ||
| 244 | export const saveBizRuleConfig = (data) => request({ | ||
| 245 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/biz-rule-config/save`, | ||
| 246 | method: 'post', | ||
| 247 | data | ||
| 248 | }) | ||
| 249 | |||
| 250 | |||
| 251 | /**树形目录 | ||
| 252 | * @param {Object} | ||
| 253 | * @path /db-dir/tree-list | ||
| 254 | */ | ||
| 255 | export const getDbDirTreeList = (data) => request({ | ||
| 256 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/tree-list`, | ||
| 257 | method: 'post', | ||
| 258 | data | ||
| 259 | }) | ||
| 260 | |||
| 261 | /** | ||
| 262 | * 数据库目录-表数据列表查询 | ||
| 263 | * @param {Object} | ||
| 264 | * @path /db-dir/table/page-list | ||
| 265 | */ | ||
| 266 | export const getDbDirTablePageList = (data) => request({ | ||
| 267 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/page-list`, | ||
| 268 | method: 'post', | ||
| 269 | data | ||
| 270 | }) | ... | ... |
| ... | @@ -2,18 +2,296 @@ import type { MockMethod } from 'vite-plugin-mock' | ... | @@ -2,18 +2,296 @@ import type { MockMethod } from 'vite-plugin-mock' |
| 2 | import Mock from 'mockjs' | 2 | import Mock from 'mockjs' |
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | export const confirmDelivery = { | 5 | /** |
| 6 | url: '/mock/youthBoost/admin/shipment', | 6 | * { |
| 7 | "children": [ | ||
| 8 | { | ||
| 9 | "parentGuids": [ | ||
| 10 | "string" | ||
| 11 | ] | ||
| 12 | } | ||
| 13 | ], | ||
| 14 | "parentGuids": [ | ||
| 15 | "string" | ||
| 16 | ], | ||
| 17 | "guid": "string", | ||
| 18 | "tenantGuid": "string", | ||
| 19 | "cgDirName": "string", | ||
| 20 | "classifyName": "string", | ||
| 21 | "orderNum": 0, | ||
| 22 | "level": 0, | ||
| 23 | "levelCode": "string", | ||
| 24 | "parentGuid": "string" | ||
| 25 | } | ||
| 26 | */ | ||
| 27 | export const getCgDirTreeList = { | ||
| 28 | url: '/mock/cg-dir/tree-list', | ||
| 7 | method: 'post', | 29 | method: 'post', |
| 8 | response: ({body}:{body:any}) => { | 30 | response: ({body}:{body:any}) => { |
| 9 | 31 | ||
| 10 | return { | 32 | return { |
| 11 | code: 200, | 33 | code: '00000', |
| 34 | message: '成功', | ||
| 35 | 'data|10-30': [{ | ||
| 36 | guid: '@guid', | ||
| 37 | tenantGuid: '@guid', | ||
| 38 | cgDirName: '@cword(3, 10)', | ||
| 39 | classifyName: '@cword(3, 5)', | ||
| 40 | orderNum: '@integer(1, 100)', | ||
| 41 | level: '@integer(1, 3)', | ||
| 42 | levelCode: '@string("number", 6)', | ||
| 43 | parentGuid: '@guid', | ||
| 44 | 'parentGuids|1-2': ['@guid'], | ||
| 45 | 'children|0-3': [{ | ||
| 46 | guid: '@guid', | ||
| 47 | tenantGuid: '@guid', | ||
| 48 | cgDirName: '@cword(3, 5)', | ||
| 49 | classifyName: '@cword(3, 5)', | ||
| 50 | orderNum: '@integer(1, 100)', | ||
| 51 | level: '@integer(1, 3)', | ||
| 52 | levelCode: '@string("number", 6)', | ||
| 53 | parentGuid: '@guid', | ||
| 54 | 'parentGuids|1-2': ['@guid'] | ||
| 55 | }] | ||
| 56 | }] | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | /** | ||
| 62 | * "data": { | ||
| 63 | "totalRows": 0, | ||
| 64 | "totalPages": 0, | ||
| 65 | "pageSize": 0, | ||
| 66 | "pageIndex": 0, | ||
| 67 | "records": [ | ||
| 68 | { | ||
| 69 | "guid": "string", | ||
| 70 | "tenantGuid": "string", | ||
| 71 | "cgDirName": "string", | ||
| 72 | "dirGuid": "string", | ||
| 73 | "classifyName": "string", | ||
| 74 | "gradeDetailName": "string", | ||
| 75 | "label": "string", | ||
| 76 | "fieldName": "string", | ||
| 77 | "fieldChName": "string", | ||
| 78 | "tableName": "string", | ||
| 79 | "tableChName": "string", | ||
| 80 | "database": "string", | ||
| 81 | "databaseChName": "string" | ||
| 82 | } | ||
| 83 | ], | ||
| 84 | export const getCgDirFieldPageList = (data) => request({ | ||
| 85 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/cg-dir/field/page-list`, | ||
| 86 | method: 'post', | ||
| 87 | data | ||
| 88 | }) | ||
| 89 | */ | ||
| 90 | |||
| 91 | export const getCgDirFieldPageList = { | ||
| 92 | url: '/mock/cg-dir/field/page-list', | ||
| 93 | method: 'post', | ||
| 94 | response: ({body}:{body:any}) => { | ||
| 95 | return { | ||
| 96 | code: '00000', | ||
| 97 | message: '成功', | ||
| 98 | 'data': { | ||
| 99 | totalRows: '@integer(50, 100)', | ||
| 100 | totalPages: '@integer(1, 10)', | ||
| 101 | pageSize: 10, | ||
| 102 | pageIndex: 1, | ||
| 103 | 'records|20-30': [{ | ||
| 104 | guid: '@guid', | ||
| 105 | tenantGuid: '@guid', | ||
| 106 | cgDirName: '@cword(3, 5)', | ||
| 107 | dirGuid: '@guid', | ||
| 108 | classifyName: '@cword(3, 5)', | ||
| 109 | gradeDetailName: '@cword(3, 5)', | ||
| 110 | label: '@cword(3, 5)', | ||
| 111 | fieldName: '@cword(3, 5)', | ||
| 112 | fieldChName: '@cword(3, 5)', | ||
| 113 | tableName: '@cword(3, 5)', | ||
| 114 | tableChName: '@cword(3, 5)', | ||
| 115 | database: '@cword(3, 5)', | ||
| 116 | databaseChName: '@cword(3, 5)' | ||
| 117 | }] | ||
| 118 | } | ||
| 119 | } | ||
| 120 | } | ||
| 121 | } | ||
| 122 | |||
| 123 | /** | ||
| 124 | * | ||
| 125 | * export const getDictionary = (params) => request({ | ||
| 126 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/list-all?state=1`, | ||
| 127 | method: 'post' | ||
| 128 | }) | ||
| 129 | */ | ||
| 130 | |||
| 131 | export const getDictionary = { | ||
| 132 | url: '/mock/data-dictionary-general/list-all', | ||
| 133 | method: 'post', | ||
| 134 | response: ({body}:{body:any}) => { | ||
| 135 | return { | ||
| 136 | code: '00000', | ||
| 12 | message: '成功', | 137 | message: '成功', |
| 13 | data: [] | 138 | 'data|10-30': [{ |
| 139 | guid: '@guid', | ||
| 140 | tenantGuid: '@guid', | ||
| 141 | chName: '@cword(3, 5)', | ||
| 142 | classifyName: '@cword(3, 5)', | ||
| 143 | orderNum: '@integer(1, 100)', | ||
| 144 | level: '@integer(1, 3)', | ||
| 145 | levelCode: '@string("number", 6)', | ||
| 146 | parentGuid: '@guid', | ||
| 147 | 'parentGuids|1-2': ['@guid'], | ||
| 148 | 'children|0-3': [{ | ||
| 149 | guid: '@guid', | ||
| 150 | tenantGuid: '@guid', | ||
| 151 | chName: '@cword(3, 5)', | ||
| 152 | classifyName: '@cword(3, 5)', | ||
| 153 | orderNum: '@integer(1, 100)', | ||
| 154 | level: '@integer(1, 3)', | ||
| 155 | levelCode: '@string("number", 6)', | ||
| 156 | parentGuid: '@guid', | ||
| 157 | 'parentGuids|1-2': ['@guid'] | ||
| 158 | }] | ||
| 159 | }] | ||
| 14 | } | 160 | } |
| 15 | } | 161 | } |
| 16 | } | 162 | } |
| 17 | 163 | ||
| 164 | export const saveBizRuleConfig = { | ||
| 165 | url: '/mock/biz-rule-config/save', | ||
| 166 | method: 'post', | ||
| 167 | response: ({body}:{body:any}) => { | ||
| 168 | return { | ||
| 169 | code: '00000', | ||
| 170 | message: '成功' | ||
| 171 | } | ||
| 172 | } | ||
| 173 | } | ||
| 174 | |||
| 175 | /** | ||
| 176 | * "data": [ | ||
| 177 | { | ||
| 178 | "cgDirName": "string", | ||
| 179 | "childList": [ | ||
| 180 | { | ||
| 181 | "databaseGuid": "string", | ||
| 182 | "database": "string", | ||
| 183 | "databaseChName": "string", | ||
| 184 | "childList": [ | ||
| 185 | { | ||
| 186 | "tableGuid": "string", | ||
| 187 | "tableName": "string", | ||
| 188 | "tableChName": "string" | ||
| 189 | } | ||
| 190 | ] | ||
| 191 | } | ||
| 192 | ] | ||
| 193 | } | ||
| 194 | ], | ||
| 195 | export const getDbDirTreeList = (data) => request({ | ||
| 196 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/tree-list`, | ||
| 197 | method: 'post', | ||
| 198 | data | ||
| 199 | }) | ||
| 200 | */ | ||
| 201 | |||
| 202 | export const getDbDirTreeList = { | ||
| 203 | url: '/mock/db-dir/tree-list', | ||
| 204 | method: 'post', | ||
| 205 | response: ({body}:{body:any}) => { | ||
| 206 | return { | ||
| 207 | code: '00000', | ||
| 208 | message: '成功', | ||
| 209 | 'data|10-30': [{ | ||
| 210 | cgDirName: '@cword(3, 5)', | ||
| 211 | 'children|1-3': [{ | ||
| 212 | databaseGuid: '@guid', | ||
| 213 | database: '@cword(3, 5)', | ||
| 214 | databaseChName: '@cword(3, 5)', | ||
| 215 | 'children|1-3': [{ | ||
| 216 | tableGuid: '@guid', | ||
| 217 | tableName: '@cword(3, 5)', | ||
| 218 | tableChName: '@cword(3, 5)' | ||
| 219 | }] | ||
| 220 | }] | ||
| 221 | }] | ||
| 222 | } | ||
| 223 | } | ||
| 224 | } | ||
| 225 | |||
| 226 | /** | ||
| 227 | * /** | ||
| 228 | * 数据库目录-表数据列表查询 | ||
| 229 | * @param {Object} | ||
| 230 | * @path /db-dir/table/page-list | ||
| 231 | * export const getDbDirTablePageList = (data) => request({ | ||
| 232 | url: `${import.meta.env.VITE_APP_CHECK_BASEURL}/db-dir/table/page-list`, | ||
| 233 | method: 'post', | ||
| 234 | data | ||
| 235 | }) | ||
| 236 | "data": { | ||
| 237 | "totalRows": 0, | ||
| 238 | "totalPages": 0, | ||
| 239 | "pageSize": 0, | ||
| 240 | "pageIndex": 0, | ||
| 241 | "records": [ | ||
| 242 | { | ||
| 243 | "guid": "string", | ||
| 244 | "tenantGuid": "string", | ||
| 245 | "cgDirName": "string", | ||
| 246 | "dirGuid": "string", | ||
| 247 | "tableGuid": "string", | ||
| 248 | "tableName": "string", | ||
| 249 | "tableChName": "string", | ||
| 250 | "databaseGuid": "string", | ||
| 251 | "database": "string", | ||
| 252 | "databaseChName": "string", | ||
| 253 | "foundMode": 0, | ||
| 254 | "state": 0, | ||
| 255 | "isDataAsset": "string" | ||
| 256 | } | ||
| 257 | ], | ||
| 258 | } | ||
| 259 | */ | ||
| 260 | |||
| 261 | export const getDbDirTablePageList = { | ||
| 262 | url: '/mock/db-dir/table/page-list', | ||
| 263 | method: 'post', | ||
| 264 | response: ({body}:{body:any}) => { | ||
| 265 | const {pageIndex, pageSize} = body | ||
| 266 | return { | ||
| 267 | code: '00000', | ||
| 268 | message: '成功', | ||
| 269 | 'data': { | ||
| 270 | totalRows: '@integer(50, 100)', | ||
| 271 | totalPages: '@integer(1, 10)', | ||
| 272 | pageSize, | ||
| 273 | pageIndex, | ||
| 274 | 'records|20-30': [{ | ||
| 275 | guid: '@guid', | ||
| 276 | tenantGuid: '@guid', | ||
| 277 | cgDirName: '@cword(3, 5)', | ||
| 278 | dirGuid: '@guid', | ||
| 279 | tableGuid: '@guid', | ||
| 280 | tableName: '@cword(3, 5)', | ||
| 281 | tableChName: '@cword(3, 5)', | ||
| 282 | databaseGuid: '@guid', | ||
| 283 | database: '@cword(3, 5)', | ||
| 284 | databaseChName: '@cword(3, 5)', | ||
| 285 | foundMode: '@integer(1, 3)', | ||
| 286 | state: '@integer(0,2)', | ||
| 287 | isDataAsset: 'Y' | ||
| 288 | }] | ||
| 289 | } | ||
| 290 | } | ||
| 291 | } | ||
| 292 | } | ||
| 293 | |||
| 294 | |||
| 295 | |||
| 18 | 296 | ||
| 19 | export default [confirmDelivery] as MockMethod[] | 297 | export default [getCgDirTreeList,getCgDirFieldPageList, getDictionary,saveBizRuleConfig, getDbDirTreeList, getDbDirTablePageList] as MockMethod[] | ... | ... |
| ... | @@ -176,6 +176,20 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -176,6 +176,20 @@ const routes: RouteRecordRaw[] = [ |
| 176 | cache: true | 176 | cache: true |
| 177 | }, | 177 | }, |
| 178 | }, | 178 | }, |
| 179 | { | ||
| 180 | path: 'configure-rules', | ||
| 181 | name: 'configureRules', | ||
| 182 | component: () => import('@/views/data_inventory/configureRules.vue'), | ||
| 183 | meta: { | ||
| 184 | title: '配置业务规则', | ||
| 185 | sidebar: false, | ||
| 186 | breadcrumb: false, | ||
| 187 | cache: true, | ||
| 188 | reuse: true, | ||
| 189 | editPage: true, | ||
| 190 | activeMenu: '/data-inventory/classify-grade-catalogue', | ||
| 191 | }, | ||
| 192 | }, | ||
| 179 | ], | 193 | ], |
| 180 | } | 194 | } |
| 181 | ] | 195 | ] | ... | ... |
This diff is collapsed.
Click to expand it.
src/views/data_inventory/configureRules.vue
0 → 100644
| ... | @@ -7,7 +7,7 @@ import TableTools from '@/components/Tools/table_tools.vue'; | ... | @@ -7,7 +7,7 @@ import TableTools from '@/components/Tools/table_tools.vue'; |
| 7 | import { getGradeList } from "@/api/modules/dataInventory"; | 7 | import { getGradeList } from "@/api/modules/dataInventory"; |
| 8 | import { getLabelList, getClassifyGradeTreeList, saveLabel, getLabelPageList, deleteLabel, updateLabel } from "@/api/modules/dataLabel"; | 8 | import { getLabelList, getClassifyGradeTreeList, saveLabel, getLabelPageList, deleteLabel, updateLabel } from "@/api/modules/dataLabel"; |
| 9 | import { CirclePlus, Delete } from "@element-plus/icons-vue"; | 9 | import { CirclePlus, Delete } from "@element-plus/icons-vue"; |
| 10 | import { el, tr } from 'element-plus/es/locale'; | 10 | |
| 11 | 11 | ||
| 12 | const { proxy } = getCurrentInstance() as any; | 12 | const { proxy } = getCurrentInstance() as any; |
| 13 | const dialogLabelFormRef = ref(); | 13 | const dialogLabelFormRef = ref(); |
| ... | @@ -560,7 +560,6 @@ const searchClass = async (val: any, clear: boolean = false) => { | ... | @@ -560,7 +560,6 @@ const searchClass = async (val: any, clear: boolean = false) => { |
| 560 | return; | 560 | return; |
| 561 | } | 561 | } |
| 562 | if (val?.labelName?.length !== 0) { | 562 | if (val?.labelName?.length !== 0) { |
| 563 | console.log('调用了吗'); | ||
| 564 | tableInfo.value.loading = true; | 563 | tableInfo.value.loading = true; |
| 565 | const params = { | 564 | const params = { |
| 566 | pageIndex: page.value.curr, | 565 | pageIndex: page.value.curr, | ... | ... |
-
Please register or sign in to post a comment