Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop
Showing
11 changed files
with
298 additions
and
41 deletions
| ... | @@ -404,7 +404,137 @@ export const getSankeyData = (guid) => request({ | ... | @@ -404,7 +404,137 @@ export const getSankeyData = (guid) => request({ |
| 404 | 404 | ||
| 405 | /** 数仓目录树列表查询 */ | 405 | /** 数仓目录树列表查询 */ |
| 406 | export const getDataWareCatalogList = (params) => request({ | 406 | export const getDataWareCatalogList = (params) => request({ |
| 407 | url: `${import.meta.env.VITE_APP_DATA_DELIVERY}delivery/ms-daop-data-plan-service/data-catalog-directory/tree-list`, | 407 | // url: `${import.meta.env.VITE_APP_DATA_DELIVERY}delivery/ms-daop-data-plan-service/data-catalog-directory/tree-list`, |
| 408 | url: `http://localhost:9000/delivery/ms-daop-data-plan-service/data-catalog-directory/tree-list`, | ||
| 408 | method: 'post', | 409 | method: 'post', |
| 409 | data: params | 410 | data: params |
| 410 | }) | 411 | }) |
| 412 | |||
| 413 | export const getAllFlowData = (dictType) => request({ | ||
| 414 | url: `${import.meta.env.VITE_APP_CONFIG_URL}/dict/data/get-by-dictType?dictType=${dictType}`, | ||
| 415 | method: 'get', | ||
| 416 | }) | ||
| 417 | |||
| 418 | /** 元数据标准guid查询新建数据集字段 */ | ||
| 419 | export const getMetaStandardDsField = (guid) => request({ | ||
| 420 | url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/get-standard?metaStandardGuid=${guid}`, | ||
| 421 | method: 'get' | ||
| 422 | }) | ||
| 423 | |||
| 424 | /** 表分类类型 */ | ||
| 425 | export const tableCategoryList = [ | ||
| 426 | { | ||
| 427 | value: 1, | ||
| 428 | label: "明细表", | ||
| 429 | }, | ||
| 430 | { | ||
| 431 | value: 2, | ||
| 432 | label: "汇总表", | ||
| 433 | }, | ||
| 434 | { | ||
| 435 | value: 3, | ||
| 436 | label: "应用表", | ||
| 437 | }, | ||
| 438 | { | ||
| 439 | value: 6, | ||
| 440 | label: "业务表", | ||
| 441 | }, | ||
| 442 | // { | ||
| 443 | // value: 4, | ||
| 444 | // label: "维度表", | ||
| 445 | // }, | ||
| 446 | // { | ||
| 447 | // value: 5, | ||
| 448 | // label: "缓慢变化维", | ||
| 449 | // } | ||
| 450 | ]; | ||
| 451 | |||
| 452 | /** 同步策略 */ | ||
| 453 | export const syncPolicys = [ | ||
| 454 | { | ||
| 455 | value: 1, | ||
| 456 | label: "实时", | ||
| 457 | }, | ||
| 458 | { | ||
| 459 | value: 2, | ||
| 460 | label: "增量", | ||
| 461 | }, | ||
| 462 | { | ||
| 463 | value: 3, | ||
| 464 | label: "全量", | ||
| 465 | }, | ||
| 466 | { | ||
| 467 | value: 4, | ||
| 468 | label: "增量加更新", | ||
| 469 | }, | ||
| 470 | ]; | ||
| 471 | |||
| 472 | /** 维表类型 */ | ||
| 473 | export const dimTypeList = [{ | ||
| 474 | label: "列表", | ||
| 475 | value: 1, | ||
| 476 | }, | ||
| 477 | { | ||
| 478 | label: "层级", | ||
| 479 | value: 2, | ||
| 480 | }, | ||
| 481 | { | ||
| 482 | label: "螺旋", | ||
| 483 | value: 3, | ||
| 484 | }, | ||
| 485 | { | ||
| 486 | label: "通用", | ||
| 487 | value: 4, | ||
| 488 | }]; | ||
| 489 | |||
| 490 | /** 表模型分类 */ | ||
| 491 | export const tableModels = [ | ||
| 492 | { | ||
| 493 | label: "主键模型", | ||
| 494 | value: 1, | ||
| 495 | }, | ||
| 496 | { | ||
| 497 | label: "聚合模型", | ||
| 498 | value: 2, | ||
| 499 | }, | ||
| 500 | { | ||
| 501 | label: "明细模型", | ||
| 502 | value: 3, | ||
| 503 | } | ||
| 504 | ]; | ||
| 505 | |||
| 506 | /** 聚合方式 */ | ||
| 507 | export const aggMethodList = [{ | ||
| 508 | value: 'SUM', | ||
| 509 | }, { | ||
| 510 | value: 'MAX' | ||
| 511 | }, { | ||
| 512 | value: 'MIN' | ||
| 513 | }, { | ||
| 514 | value: 'REPLACE' | ||
| 515 | }, { | ||
| 516 | value: 'REPLACE_IF_NOT_NULL' | ||
| 517 | }, { | ||
| 518 | value: 'HLL_UNION' | ||
| 519 | }, { | ||
| 520 | value: 'BITMAP_UNION' | ||
| 521 | }]; | ||
| 522 | |||
| 523 | /** 保存主题表设置,直接入库 */ | ||
| 524 | export const saveSubjectTable = (params) => request({ | ||
| 525 | url: `http://localhost:9000/delivery/ms-daop-data-plan-service/data-catalog-subject/add`, | ||
| 526 | method: 'post', | ||
| 527 | data: params | ||
| 528 | }) | ||
| 529 | |||
| 530 | /** 获取字典列表 */ | ||
| 531 | export const getDictionary = (params) => request({ | ||
| 532 | url: `${import.meta.env.VITE_APP_PLAN_BASEURL}/data-dictionary-general/list-all?state=1`, | ||
| 533 | method: 'post' | ||
| 534 | }) | ||
| 535 | |||
| 536 | /** 获取维度列表 */ | ||
| 537 | export const getDimList = () => request({ | ||
| 538 | url: `http://localhost:9000/delivery/ms-daop-data-plan-service/data-catalog-subject/get-dim-list`, | ||
| 539 | method: 'get' | ||
| 540 | }) | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | <div class="title">{{ detailInfoLabel }}</div> | 4 | <div class="title">{{ detailInfoLabel }}</div> |
| 5 | <div class="row" v-for="item in Object.keys(detailInfo)"> | 5 | <div class="row" v-for="item in Object.keys(detailInfo)"> |
| 6 | <span>{{ item + ':' }}</span> | 6 | <span>{{ item + ':' }}</span> |
| 7 | <span>{{ detailInfo[item] }}</span> | 7 | <span>{{ detailInfo[item] == null ? '-' : detailInfo[item] }}</span> |
| 8 | </div> | 8 | </div> |
| 9 | </div> | 9 | </div> |
| 10 | </div> | 10 | </div> |
| ... | @@ -37,6 +37,10 @@ const emits = defineEmits([ | ... | @@ -37,6 +37,10 @@ const emits = defineEmits([ |
| 37 | 37 | ||
| 38 | const { proxy } = getCurrentInstance() as any; | 38 | const { proxy } = getCurrentInstance() as any; |
| 39 | 39 | ||
| 40 | const maxChineseCount = ref(14); | ||
| 41 | |||
| 42 | const maxEnglishCount = ref(26); | ||
| 43 | |||
| 40 | const detailLoading = ref(false); | 44 | const detailLoading = ref(false); |
| 41 | 45 | ||
| 42 | const detailInfo: any = ref({}); | 46 | const detailInfo: any = ref({}); |
| ... | @@ -116,9 +120,9 @@ const detectLanguage = (text) => { | ... | @@ -116,9 +120,9 @@ const detectLanguage = (text) => { |
| 116 | 120 | ||
| 117 | const handleLabelLength = (label: string) => { | 121 | const handleLabelLength = (label: string) => { |
| 118 | if (detectLanguage(label) == 'English') { | 122 | if (detectLanguage(label) == 'English') { |
| 119 | return label?.length > 30 ? label.slice(0, 30) + '...' : label; | 123 | return label?.length > maxEnglishCount.value ? label.slice(0, maxEnglishCount.value) + '...' : label; |
| 120 | } | 124 | } |
| 121 | return label?.length > 16 ? label.slice(0, 16) + '...' : label; | 125 | return label?.length > maxChineseCount.value ? label.slice(0, maxChineseCount.value) + '...' : label; |
| 122 | }; | 126 | }; |
| 123 | 127 | ||
| 124 | insertCss(` | 128 | insertCss(` |
| ... | @@ -161,9 +165,9 @@ const initGraph = () => { | ... | @@ -161,9 +165,9 @@ const initGraph = () => { |
| 161 | const name = item._cfg.model?.label; | 165 | const name = item._cfg.model?.label; |
| 162 | if (currentAnchor == 'text-shape') { | 166 | if (currentAnchor == 'text-shape') { |
| 163 | if (detectLanguage(name) == 'English') { | 167 | if (detectLanguage(name) == 'English') { |
| 164 | return name?.length > 30; | 168 | return name?.length > maxEnglishCount.value; |
| 165 | } | 169 | } |
| 166 | return name?.length > 16; | 170 | return name?.length > maxChineseCount.value; |
| 167 | } | 171 | } |
| 168 | return false; | 172 | return false; |
| 169 | }, | 173 | }, |
| ... | @@ -237,7 +241,6 @@ const initGraph = () => { | ... | @@ -237,7 +241,6 @@ const initGraph = () => { |
| 237 | { | 241 | { |
| 238 | type: 'collapse-expand', | 242 | type: 'collapse-expand', |
| 239 | onChange: (item, collapsed) => { | 243 | onChange: (item, collapsed) => { |
| 240 | debugger | ||
| 241 | if (!item) { | 244 | if (!item) { |
| 242 | return; | 245 | return; |
| 243 | } | 246 | } |
| ... | @@ -246,7 +249,6 @@ const initGraph = () => { | ... | @@ -246,7 +249,6 @@ const initGraph = () => { |
| 246 | return true; | 249 | return true; |
| 247 | }, | 250 | }, |
| 248 | shouldBegin: (e) => { | 251 | shouldBegin: (e) => { |
| 249 | debugger | ||
| 250 | // 若当前操作的节点 id 为 'node1',则不发生 collapse-expand | 252 | // 若当前操作的节点 id 为 'node1',则不发生 collapse-expand |
| 251 | if (e.item && e.item.getModel().isLoading == true) return false; | 253 | if (e.item && e.item.getModel().isLoading == true) return false; |
| 252 | return true; | 254 | return true; |
| ... | @@ -300,8 +302,9 @@ const initGraph = () => { | ... | @@ -300,8 +302,9 @@ const initGraph = () => { |
| 300 | labelCfg: { | 302 | labelCfg: { |
| 301 | offset: 10, | 303 | offset: 10, |
| 302 | style: { | 304 | style: { |
| 303 | fontSize: 16, | 305 | fontSize: 13, |
| 304 | fill: '#212121', | 306 | fill: '#212121', |
| 307 | fontWeight: 500 | ||
| 305 | }, | 308 | }, |
| 306 | position: !node.isField ? 'left' : 'right', //只有字段是最后一层级,不需要展开 | 309 | position: !node.isField ? 'left' : 'right', //只有字段是最后一层级,不需要展开 |
| 307 | }, | 310 | }, | ... | ... |
| ... | @@ -221,6 +221,44 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -221,6 +221,44 @@ const routes: RouteRecordRaw[] = [ |
| 221 | } | 221 | } |
| 222 | }, | 222 | }, |
| 223 | { | 223 | { |
| 224 | path: 'table-create-manual', | ||
| 225 | name: 'tableCreateManual', | ||
| 226 | component: () => import('@/views/data_meta/tableCreateManual.vue'), | ||
| 227 | meta: { | ||
| 228 | title: '新建表', | ||
| 229 | sidebar: false, | ||
| 230 | breadcrumb: false, | ||
| 231 | cache: true, | ||
| 232 | reuse: true, | ||
| 233 | activeMenu: '/data-meta/metadata-standard/standard-query' | ||
| 234 | }, | ||
| 235 | beforeEnter: (to, from) => { | ||
| 236 | if (to.query.domainName) { | ||
| 237 | to.meta.title = `新建表(${to.query.domainName})-${to.query.standardName}`; | ||
| 238 | to.meta.editPage = true; | ||
| 239 | } | ||
| 240 | } | ||
| 241 | }, | ||
| 242 | { | ||
| 243 | path: 'dim-table-create-manual', | ||
| 244 | name: 'dimTableCreateManual', | ||
| 245 | component: () => import('@/views/data_meta/dimTableCreateManual.vue'), | ||
| 246 | meta: { | ||
| 247 | title: '新建表', | ||
| 248 | sidebar: false, | ||
| 249 | breadcrumb: false, | ||
| 250 | cache: true, | ||
| 251 | reuse: true, | ||
| 252 | activeMenu: '/data-meta/metadata-standard/standard-query' | ||
| 253 | }, | ||
| 254 | beforeEnter: (to, from) => { | ||
| 255 | if (to.query.domainName) { | ||
| 256 | to.meta.title = `新建表(${to.query.domainName})-${to.query.standardName}`; | ||
| 257 | to.meta.editPage = true; | ||
| 258 | } | ||
| 259 | } | ||
| 260 | }, | ||
| 261 | { | ||
| 224 | path: 'standard-codetable', | 262 | path: 'standard-codetable', |
| 225 | name: 'metadataStandardCodetable', | 263 | name: 'metadataStandardCodetable', |
| 226 | component: () => import('@/views/data_meta/standard-codetable.vue'), | 264 | component: () => import('@/views/data_meta/standard-codetable.vue'), | ... | ... |
| ... | @@ -233,23 +233,19 @@ const tableBtnClick = (scope, btn) => { | ... | @@ -233,23 +233,19 @@ const tableBtnClick = (scope, btn) => { |
| 233 | } else if (type == 'save') { | 233 | } else if (type == 'save') { |
| 234 | saveData(scope) | 234 | saveData(scope) |
| 235 | } else if (type == 'cancel') { | 235 | } else if (type == 'cancel') { |
| 236 | console.log('cancel') | ||
| 237 | if (row.guid != undefined) { | 236 | if (row.guid != undefined) { |
| 238 | // row = orginData.value[(page.value.curr - 1) * page.value.limit + scope.$index] | 237 | // row = orginData.value[(page.value.curr - 1) * page.value.limit + scope.$index] |
| 239 | row = JSON.parse(JSON.stringify(orginData.value[scope.$index])) | 238 | row = JSON.parse(JSON.stringify(orginData.value[scope.$index])) |
| 240 | row.STATE = '' | 239 | row.STATE = '' |
| 241 | row.STATUS = '' | 240 | row.STATUS = '' |
| 242 | tableData.value[scope.$index] = row | 241 | tableData.value[scope.$index] = row |
| 243 | console.log('1111') | ||
| 244 | } else { | 242 | } else { |
| 245 | tableData.value.splice(scope.$index, 1) | 243 | tableData.value.splice(scope.$index, 1) |
| 246 | orginData.value.splice(scope.$index, 1) | 244 | orginData.value.splice(scope.$index, 1) |
| 247 | console.log('2222') | ||
| 248 | } | 245 | } |
| 249 | tableInfo.value.page.rows = tableData.value.length | 246 | // tableInfo.value.page.rows = tableData.value.length |
| 250 | let haveState = tableData.value.some(item => item.STATE) | 247 | let haveState = tableData.value.some(item => item.STATE) |
| 251 | saveDisabled.value = !haveState | 248 | saveDisabled.value = !haveState |
| 252 | console.log('3333') | ||
| 253 | } else if (type == 'remove') { | 249 | } else if (type == 'remove') { |
| 254 | open("是否确定删除所选数据?", "warning"); | 250 | open("是否确定删除所选数据?", "warning"); |
| 255 | } | 251 | } | ... | ... |
This diff is collapsed.
Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | <el-dialog v-model="visible" :title="title" width="900" modal-class="standard-modal"> | 2 | <el-drawer |
| 3 | v-model="visible" | ||
| 4 | :title="title" | ||
| 5 | size="760px" | ||
| 6 | class="standard-modal" | ||
| 7 | :close-on-click-modal="false" | ||
| 8 | > | ||
| 3 | <el-form :rules="formRules" :model="form" ref="formEl" require-asterisk-position="right"> | 9 | <el-form :rules="formRules" :model="form" ref="formEl" require-asterisk-position="right"> |
| 4 | <el-row> | 10 | <el-row> |
| 5 | <el-col :span="12" style="padding-right:10px"> | 11 | <el-col :span="12" style="padding-right:10px"> |
| ... | @@ -75,17 +81,23 @@ | ... | @@ -75,17 +81,23 @@ |
| 75 | </el-select> | 81 | </el-select> |
| 76 | </div> | 82 | </div> |
| 77 | <div class="table-form-item"> | 83 | <div class="table-form-item"> |
| 78 | <el-select v-if="item.inputTypeCode == 2" v-model="item.dataTypeCode" style="width:220px" size="small" filterable clearable> | 84 | <el-select v-if="item.inputTypeCode == 2" v-model="item.dataTypeCode" style="width:160px" size="small" filterable clearable> |
| 79 | <el-option v-for="item in allDictOptions" :label="item.dictTypeName" :value="item.dictTypeName" :key="item.guid"></el-option> | 85 | <el-option v-for="item in allDictOptions" :label="item.dictTypeName" :value="item.dictTypeName" :key="item.guid"></el-option> |
| 80 | </el-select> | 86 | </el-select> |
| 81 | <el-input v-else-if="item.inputTypeCode == 3" v-model="item.validateExpression" placeholder="请输入"></el-input> | 87 | <el-input v-else-if="item.inputTypeCode == 3" v-model="item.validateExpression" placeholder="请输入"></el-input> |
| 82 | </div> | 88 | </div> |
| 83 | <div class="table-form-operation"> | 89 | <div class="table-form-operation"> |
| 90 | <!-- <el-icon color="#4fa1a4" @click="() => addTableItem(index)"> | ||
| 91 | <CirclePlus /> | ||
| 92 | </el-icon> --> | ||
| 93 | <el-icon color="#b2b2b2" @click="() => deleteTableItem(index)"><Delete /></el-icon> | ||
| 94 | </div> | ||
| 95 | </div> | ||
| 96 | <div class="table-form-add"> | ||
| 84 | <el-icon color="#4fa1a4" @click="() => addTableItem(index)"> | 97 | <el-icon color="#4fa1a4" @click="() => addTableItem(index)"> |
| 85 | <CirclePlus /> | 98 | <CirclePlus /> |
| 86 | </el-icon> | 99 | </el-icon> |
| 87 | <el-icon color="#F56C6C" @click="() => deleteTableItem(index)"><Delete /></el-icon> | 100 | <span @click="() => addTableItem(index)" style="cursor: pointer;">添加字段</span> |
| 88 | </div> | ||
| 89 | </div> | 101 | </div> |
| 90 | </div> | 102 | </div> |
| 91 | </el-form-item> | 103 | </el-form-item> |
| ... | @@ -93,10 +105,13 @@ | ... | @@ -93,10 +105,13 @@ |
| 93 | </el-row> | 105 | </el-row> |
| 94 | </el-form> | 106 | </el-form> |
| 95 | <template #footer> | 107 | <template #footer> |
| 108 | <div style="text-align:right"> | ||
| 96 | <el-button @click="visible = false" :disabled="confirmLoading">取消</el-button> | 109 | <el-button @click="visible = false" :disabled="confirmLoading">取消</el-button> |
| 97 | <el-button type="primary" @click="confirm" :loading="confirmLoading">确认</el-button> | 110 | <el-button type="primary" @click="confirm" :loading="confirmLoading">确认</el-button> |
| 111 | </div> | ||
| 98 | </template> | 112 | </template> |
| 99 | </el-dialog> | 113 | |
| 114 | </el-drawer> | ||
| 100 | </template> | 115 | </template> |
| 101 | 116 | ||
| 102 | <script setup lang="ts"> | 117 | <script setup lang="ts"> |
| ... | @@ -135,7 +150,7 @@ const visible = computed({ | ... | @@ -135,7 +150,7 @@ const visible = computed({ |
| 135 | } | 150 | } |
| 136 | }) | 151 | }) |
| 137 | const title = computed(() => { | 152 | const title = computed(() => { |
| 138 | return props.type === 'add' ? '新建元标准' : '编辑元标准' | 153 | return props.type === 'add' ? '新增元数据标准' : '编辑元数据标准' |
| 139 | }) | 154 | }) |
| 140 | 155 | ||
| 141 | /** | 156 | /** |
| ... | @@ -195,7 +210,8 @@ const tableFormTpl = { | ... | @@ -195,7 +210,8 @@ const tableFormTpl = { |
| 195 | } | 210 | } |
| 196 | function addTableItem (index) { | 211 | function addTableItem (index) { |
| 197 | const tableObj = { ...tableFormTpl } | 212 | const tableObj = { ...tableFormTpl } |
| 198 | form.value.fieldRQVOS.splice(index + 1, 0, tableObj) | 213 | // form.value.fieldRQVOS.splice(index + 1, 0, tableObj) |
| 214 | form.value.fieldRQVOS.push(tableObj) | ||
| 199 | } | 215 | } |
| 200 | function deleteTableItem (index) { | 216 | function deleteTableItem (index) { |
| 201 | form.value.fieldRQVOS.splice(index, 1) | 217 | form.value.fieldRQVOS.splice(index, 1) |
| ... | @@ -295,8 +311,9 @@ onBeforeMount(() => { | ... | @@ -295,8 +311,9 @@ onBeforeMount(() => { |
| 295 | justify-content: flex-start; | 311 | justify-content: flex-start; |
| 296 | } | 312 | } |
| 297 | } | 313 | } |
| 298 | .el-dialog__footer { | 314 | .el-drawer__footer { |
| 299 | padding: 10px; | 315 | padding: 10px; |
| 316 | justify-content: flex-end; | ||
| 300 | } | 317 | } |
| 301 | .el-dialog__body { | 318 | .el-dialog__body { |
| 302 | height: 500px; | 319 | height: 500px; |
| ... | @@ -309,9 +326,14 @@ onBeforeMount(() => { | ... | @@ -309,9 +326,14 @@ onBeforeMount(() => { |
| 309 | padding-right: 10px; | 326 | padding-right: 10px; |
| 310 | } | 327 | } |
| 311 | .table-form-operation { | 328 | .table-form-operation { |
| 312 | flex: 0 0 70px; | 329 | flex: 0 0 30px; |
| 313 | padding-left: 6px; | 330 | // padding-left: 6px; |
| 314 | } | 331 | } |
| 315 | } | 332 | } |
| 333 | .table-form-add { | ||
| 334 | display: flex; | ||
| 335 | align-items: center; | ||
| 336 | color: #4fa1a4; | ||
| 337 | } | ||
| 316 | } | 338 | } |
| 317 | </style> | 339 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <el-dialog | 2 | <el-drawer |
| 3 | v-model="visible" | 3 | v-model="visible" |
| 4 | :title="title" | 4 | :title="title" |
| 5 | width="600" | 5 | width="520" |
| 6 | modal-class="standard-modal" | 6 | class="standard-meta-modal" |
| 7 | :close-on-click-modal="false" | ||
| 7 | > | 8 | > |
| 8 | <el-form :model="form" :rules="formRules" ref="formEl" style="min-height: 200px;" require-asterisk-position="right"> | 9 | <el-form :model="form" :rules="formRules" ref="formEl" style="min-height: 200px;" require-asterisk-position="right"> |
| 9 | <el-row> | 10 | <el-row> |
| ... | @@ -36,10 +37,12 @@ | ... | @@ -36,10 +37,12 @@ |
| 36 | </el-row> | 37 | </el-row> |
| 37 | </el-form> | 38 | </el-form> |
| 38 | <template #footer> | 39 | <template #footer> |
| 40 | <div style="text-align:right"> | ||
| 39 | <el-button @click="visible = false" :disabled="confirmLoading">取消</el-button> | 41 | <el-button @click="visible = false" :disabled="confirmLoading">取消</el-button> |
| 40 | <el-button type="primary" @click="confirm" :loading="confirmLoading">确认</el-button> | 42 | <el-button type="primary" @click="confirm" :loading="confirmLoading">确认</el-button> |
| 43 | </div> | ||
| 41 | </template> | 44 | </template> |
| 42 | </el-dialog> | 45 | </el-drawer> |
| 43 | </template> | 46 | </template> |
| 44 | 47 | ||
| 45 | <script setup lang="ts"> | 48 | <script setup lang="ts"> |
| ... | @@ -197,15 +200,16 @@ onBeforeMount(() => { | ... | @@ -197,15 +200,16 @@ onBeforeMount(() => { |
| 197 | </script> | 200 | </script> |
| 198 | 201 | ||
| 199 | <style lang="scss"> | 202 | <style lang="scss"> |
| 200 | .standard-modal { | 203 | .standard-meta-modal { |
| 201 | .el-form-item { | 204 | .el-form-item { |
| 202 | flex-direction: column; | 205 | flex-direction: column; |
| 203 | .el-form-item__label { | 206 | .el-form-item__label { |
| 204 | justify-content: flex-start; | 207 | justify-content: flex-start; |
| 205 | } | 208 | } |
| 206 | } | 209 | } |
| 207 | .el-dialog__footer { | 210 | .el-drawer__footer { |
| 208 | padding: 10px; | 211 | padding: 10px; |
| 212 | justify-content: flex-end; | ||
| 209 | } | 213 | } |
| 210 | 214 | ||
| 211 | .table-form-wrapper { | 215 | .table-form-wrapper { | ... | ... |
| 1 | <template> | ||
| 2 | <el-select v-if="!readonly && isEdit && isSelectType(dbType, scope)" v-model="scope.row['defaultValue']" placeholder="请选择" collapse-tags-tooltip | ||
| 3 | filterable allow-create default-first-option :reserve-keyword="false"> | ||
| 4 | <el-option v-for="opt in optionsConfig[dataType]" :key="opt['value']" :label="opt['label']" :value="opt['value']" /> | ||
| 5 | </el-select> | ||
| 6 | <el-date-picker v-else-if="!readonly && isEdit && dataType === 'date'" v-model="scope.row['defaultValue']" type="date" | ||
| 7 | format="YYYY-MM-DD" value-format="YYYY-MM-DD" placeholder="请选择" /> | ||
| 8 | <el-date-picker v-else-if="!readonly && isEdit && dbType === 'mysql' && dataType === 'datetime'" | ||
| 9 | v-model="scope.row['defaultValue']" placeholder="请选择" type="datetime" format="YYYY-MM-DD HH:mm:ss" | ||
| 10 | value-format="YYYY-MM-DD HH:mm:ss" /> | ||
| 11 | <el-input v-else-if="!readonly && isEdit" v-model.trim="scope.row['defaultValue']" placeholder="请填写" | ||
| 12 | @input="(val) => inputChange(val, scope.row.dataType, scope)" /> | ||
| 13 | <span v-else>{{ scope.row["defaultValue"] == null ? '-' : (isSelectType(dbType, scope) ? | ||
| 14 | (optionsConfig[dataType].find(s => s.value == scope.row["defaultValue"])?.label ?? | ||
| 15 | scope.row["defaultValue"]) : scope.row["defaultValue"]) }}</span> | ||
| 16 | </template> | ||
| 17 | |||
| 18 | <script lang="ts" setup name="tableDefaultValue"> | ||
| 19 | import { ref } from "vue"; | ||
| 20 | import { useDefault } from "@/hooks/useDefault"; | ||
| 21 | const { optionsConfig, inputChange, isSelectType } = useDefault() | ||
| 22 | |||
| 23 | const props = defineProps({ | ||
| 24 | dbType: { | ||
| 25 | type: String, | ||
| 26 | default: '' | ||
| 27 | }, | ||
| 28 | scope: { | ||
| 29 | type: Object, | ||
| 30 | default: {} | ||
| 31 | }, | ||
| 32 | readonly: { | ||
| 33 | type: Boolean, | ||
| 34 | default: false | ||
| 35 | } | ||
| 36 | }) | ||
| 37 | |||
| 38 | const isEdit = computed(() => { | ||
| 39 | return props.scope.row['isEdit']; | ||
| 40 | }); | ||
| 41 | |||
| 42 | const dataType = computed(() => { | ||
| 43 | return props.scope.row['dataType']; | ||
| 44 | }); | ||
| 45 | |||
| 46 | </script> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/views/data_meta/dimTableCreateManual.vue
0 → 100644
This diff is collapsed.
Click to expand it.
| ... | @@ -228,14 +228,7 @@ onBeforeUnmount(() => { | ... | @@ -228,14 +228,7 @@ onBeforeUnmount(() => { |
| 228 | }) | 228 | }) |
| 229 | 229 | ||
| 230 | /** 数仓目录树形列表 */ | 230 | /** 数仓目录树形列表 */ |
| 231 | const dataCatalogList = ref([{ | 231 | const dataCatalogList = ref([]); |
| 232 | name: '测试', | ||
| 233 | guid: '1', | ||
| 234 | children: [{ | ||
| 235 | name: 'cesi', | ||
| 236 | guid: '1-1' | ||
| 237 | }] | ||
| 238 | }]); | ||
| 239 | 232 | ||
| 240 | const formItems = ref([{ | 233 | const formItems = ref([{ |
| 241 | label: "数仓目录", | 234 | label: "数仓目录", |
| ... | @@ -299,12 +292,37 @@ const dialogBtnClick = (btn, info) => { | ... | @@ -299,12 +292,37 @@ const dialogBtnClick = (btn, info) => { |
| 299 | if (btn.value == 'submit') { | 292 | if (btn.value == 'submit') { |
| 300 | dialogInfo.value.visible = false; | 293 | dialogInfo.value.visible = false; |
| 301 | if (selectDataCatalogNodeObj.value.parent.data.layereAttribute == 2) { //维度 | 294 | if (selectDataCatalogNodeObj.value.parent.data.layereAttribute == 2) { //维度 |
| 302 | window.open(`${import.meta.env.VITE_APP_DATA_DELIVERY}data-catalog/data-warehouse/dim-table-create-manual?domainGuid=${info.domainGuid}&domainName=${selectDataCatalogNodeObj.value.data.name}&metaStandard=${contextNodeData.value.guid}`); | 295 | router.push({ |
| 296 | name: 'dimTableCreateManual', | ||
| 297 | query: { | ||
| 298 | domainGuid: info.domainGuid, | ||
| 299 | domainName: selectDataCatalogNodeObj.value.data.name, | ||
| 300 | metaStandard: contextNodeData.value.guid, | ||
| 301 | standardName: contextNodeData.value.label | ||
| 302 | } | ||
| 303 | }); | ||
| 303 | } else { | 304 | } else { |
| 304 | if (selectDataCatalogNodeObj.value.parent.data.layereAttribute == 4) { | 305 | if (selectDataCatalogNodeObj.value.parent.data.layereAttribute == 4) { |
| 305 | window.open(`${import.meta.env.VITE_APP_DATA_DELIVERY}data-catalog/data-warehouse/table-create-manual?domainGuid=${info.domainGuid}&domainName=${selectDataCatalogNodeObj.value.data.name}&layereAttribute=${selectDataCatalogNodeObj.value.parent.data.layereAttribute}&metaStandard=${contextNodeData.value.guid}`); | 306 | router.push({ |
| 307 | name: 'tableCreateManual', | ||
| 308 | query: { | ||
| 309 | domainGuid: info.domainGuid, | ||
| 310 | domainName: selectDataCatalogNodeObj.value.data.name, | ||
| 311 | metaStandard: contextNodeData.value.guid, | ||
| 312 | layereAttribute: selectDataCatalogNodeObj.value.parent.data.layereAttribute, | ||
| 313 | standardName: contextNodeData.value.label | ||
| 314 | } | ||
| 315 | }); | ||
| 306 | } else { | 316 | } else { |
| 307 | window.open(`${import.meta.env.VITE_APP_DATA_DELIVERY}data-catalog/data-warehouse/table-create-manual?domainGuid=${info.domainGuid}&domainName=${selectDataCatalogNodeObj.value.data.name}&metaStandard=${contextNodeData.value.guid}`); | 317 | router.push({ |
| 318 | name: 'tableCreateManual', | ||
| 319 | query: { | ||
| 320 | domainGuid: info.domainGuid, | ||
| 321 | domainName: selectDataCatalogNodeObj.value.data.name, | ||
| 322 | metaStandard: contextNodeData.value.guid, | ||
| 323 | standardName: contextNodeData.value.label | ||
| 324 | } | ||
| 325 | }); | ||
| 308 | } | 326 | } |
| 309 | } | 327 | } |
| 310 | } else if (btn.value == 'cancel') { | 328 | } else if (btn.value == 'cancel') { | ... | ... |
src/views/data_meta/tableCreateManual.vue
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment