2ae6fed9 by lihua

支持根据标准新建数据集

1 parent be01a38f
...@@ -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
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'
410 }) 540 })
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -277,6 +277,44 @@ const routes: RouteRecordRaw[] = [ ...@@ -277,6 +277,44 @@ const routes: RouteRecordRaw[] = [
277 } 277 }
278 } 278 }
279 }, 279 },
280 {
281 path: 'table-create-manual',
282 name: 'tableCreateManual',
283 component: () => import('@/views/data_meta/tableCreateManual.vue'),
284 meta: {
285 title: '新建表',
286 sidebar: false,
287 breadcrumb: false,
288 cache: true,
289 reuse: true,
290 activeMenu: '/data-meta/metadata-standard/standard-query'
291 },
292 beforeEnter: (to, from) => {
293 if (to.query.domainName) {
294 to.meta.title = `新建表(${to.query.domainName})-${to.query.standardName}`;
295 to.meta.editPage = true;
296 }
297 }
298 },
299 {
300 path: 'dim-table-create-manual',
301 name: 'dimTableCreateManual',
302 component: () => import('@/views/data_meta/dimTableCreateManual.vue'),
303 meta: {
304 title: '新建表',
305 sidebar: false,
306 breadcrumb: false,
307 cache: true,
308 reuse: true,
309 activeMenu: '/data-meta/metadata-standard/standard-query'
310 },
311 beforeEnter: (to, from) => {
312 if (to.query.domainName) {
313 to.meta.title = `新建表(${to.query.domainName})-${to.query.standardName}`;
314 to.meta.editPage = true;
315 }
316 }
317 },
280 { 318 {
281 path: 'standard-codetable', 319 path: 'standard-codetable',
282 name: 'metadataStandardCodetable', 320 name: 'metadataStandardCodetable',
......
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
...@@ -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') {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!