be2650a9 by fanguang

Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop

2 parents dad23f96 95557036
...@@ -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
......
...@@ -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 },
...@@ -300,8 +304,9 @@ const initGraph = () => { ...@@ -300,8 +304,9 @@ const initGraph = () => {
300 labelCfg: { 304 labelCfg: {
301 offset: 10, 305 offset: 10,
302 style: { 306 style: {
303 fontSize: 16, 307 fontSize: 13,
304 fill: '#212121', 308 fill: '#212121',
309 fontWeight: 500
305 }, 310 },
306 position: !node.isField ? 'left' : 'right', //只有字段是最后一层级,不需要展开 311 position: !node.isField ? 'left' : 'right', //只有字段是最后一层级,不需要展开
307 }, 312 },
......
...@@ -220,6 +220,44 @@ const routes: RouteRecordRaw[] = [ ...@@ -220,6 +220,44 @@ const routes: RouteRecordRaw[] = [
220 } 220 }
221 } 221 }
222 }, 222 },
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 },
223 { 261 {
224 path: 'standard-codetable', 262 path: 'standard-codetable',
225 name: 'metadataStandardCodetable', 263 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!