Merge branch 'develop' of http://117.78.60.236:8000/csbr-daop/fe-data-asset-management into develop
Showing
5 changed files
with
80 additions
and
36 deletions
| ... | @@ -389,6 +389,11 @@ export const getMetaStandardField = (guid) => request({ | ... | @@ -389,6 +389,11 @@ export const getMetaStandardField = (guid) => request({ |
| 389 | url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/list-by-meta-standard-guid?metaStandardGuid=${guid}`, | 389 | url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/list-by-meta-standard-guid?metaStandardGuid=${guid}`, |
| 390 | method: 'get' | 390 | method: 'get' |
| 391 | }) | 391 | }) |
| 392 | /** 元数据标准字段详情 */ | ||
| 393 | export const getMetaStandardFieldsDetail = (guid) => request({ | ||
| 394 | url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/detail?guid=${guid}`, | ||
| 395 | method: 'get' | ||
| 396 | }) | ||
| 392 | 397 | ||
| 393 | /** 根据元数据标准展示字段去获取未展示的详情信息 */ | 398 | /** 根据元数据标准展示字段去获取未展示的详情信息 */ |
| 394 | export const getMetaStandardFieldDetail = (guid) => request({ | 399 | export const getMetaStandardFieldDetail = (guid) => request({ | ... | ... |
| ... | @@ -82,7 +82,7 @@ watch(() => props.treeData, (val) => { | ... | @@ -82,7 +82,7 @@ watch(() => props.treeData, (val) => { |
| 82 | 82 | ||
| 83 | const renderGraph = (graph: any, lineageData: any) => { | 83 | const renderGraph = (graph: any, lineageData: any) => { |
| 84 | if (!graph || !lineageData) return; | 84 | if (!graph || !lineageData) return; |
| 85 | graph.setMinZoom(0.7); | 85 | graph.setMinZoom(1); |
| 86 | graph.setMaxZoom(1); | 86 | graph.setMaxZoom(1); |
| 87 | graph.data(lineageData); | 87 | graph.data(lineageData); |
| 88 | graph.render(); | 88 | graph.render(); |
| ... | @@ -265,7 +265,7 @@ const initGraph = () => { | ... | @@ -265,7 +265,7 @@ const initGraph = () => { |
| 265 | ], | 265 | ], |
| 266 | }, | 266 | }, |
| 267 | defaultNode: { | 267 | defaultNode: { |
| 268 | size: 24, | 268 | size: 20, |
| 269 | anchorPoints: [ | 269 | anchorPoints: [ |
| 270 | [0, 0.5], | 270 | [0, 0.5], |
| 271 | [1, 0.5], | 271 | [1, 0.5], |
| ... | @@ -292,7 +292,7 @@ const initGraph = () => { | ... | @@ -292,7 +292,7 @@ const initGraph = () => { |
| 292 | return 16; | 292 | return 16; |
| 293 | }, | 293 | }, |
| 294 | getVGap: function getVGap() { | 294 | getVGap: function getVGap() { |
| 295 | return 25; | 295 | return 15; |
| 296 | }, | 296 | }, |
| 297 | getHGap: function getHGap() { | 297 | getHGap: function getHGap() { |
| 298 | return 120; | 298 | return 120; |
| ... | @@ -306,7 +306,7 @@ const initGraph = () => { | ... | @@ -306,7 +306,7 @@ const initGraph = () => { |
| 306 | label: handleLabelLength((node.isField ? node.metaStandardId : node.standardName) as string), | 306 | label: handleLabelLength((node.isField ? node.metaStandardId : node.standardName) as string), |
| 307 | collapsed: node.children?.length ? false : true, | 307 | collapsed: node.children?.length ? false : true, |
| 308 | labelCfg: { | 308 | labelCfg: { |
| 309 | offset: 10, | 309 | offset: 7, |
| 310 | style: { | 310 | style: { |
| 311 | fontSize: 13, | 311 | fontSize: 13, |
| 312 | fill: '#212121', | 312 | fill: '#212121', |
| ... | @@ -369,7 +369,7 @@ const observeResize = () => { | ... | @@ -369,7 +369,7 @@ const observeResize = () => { |
| 369 | return; | 369 | return; |
| 370 | } | 370 | } |
| 371 | graphRef.value.changeSize(width, height); | 371 | graphRef.value.changeSize(width, height); |
| 372 | graphRef.value.setMinZoom(0.7); | 372 | graphRef.value.setMinZoom(1); |
| 373 | graphRef.value.setMaxZoom(1); | 373 | graphRef.value.setMaxZoom(1); |
| 374 | graphRef.value.fitView(40, { direction: 'both' }); | 374 | graphRef.value.fitView(40, { direction: 'both' }); |
| 375 | graphRef.value.fitCenter(); | 375 | graphRef.value.fitCenter(); |
| ... | @@ -385,7 +385,7 @@ const observeResize = () => { | ... | @@ -385,7 +385,7 @@ const observeResize = () => { |
| 385 | return; | 385 | return; |
| 386 | } | 386 | } |
| 387 | graphRef.value.changeSize(width, height); | 387 | graphRef.value.changeSize(width, height); |
| 388 | graphRef.value.setMinZoom(0.7); | 388 | graphRef.value.setMinZoom(1); |
| 389 | graphRef.value.setMaxZoom(1); | 389 | graphRef.value.setMaxZoom(1); |
| 390 | graphRef.value.fitView(40, { direction: 'both' }); | 390 | graphRef.value.fitView(40, { direction: 'both' }); |
| 391 | graphRef.value.fitCenter(); | 391 | graphRef.value.fitCenter(); |
| ... | @@ -607,7 +607,7 @@ defineExpose({ | ... | @@ -607,7 +607,7 @@ defineExpose({ |
| 607 | overflow-y: auto; | 607 | overflow-y: auto; |
| 608 | 608 | ||
| 609 | .title { | 609 | .title { |
| 610 | font-size: 16px; | 610 | font-size: 14px; |
| 611 | color: #212121; | 611 | color: #212121; |
| 612 | line-height: 24px; | 612 | line-height: 24px; |
| 613 | font-weight: 600; | 613 | font-weight: 600; |
| ... | @@ -615,7 +615,7 @@ defineExpose({ | ... | @@ -615,7 +615,7 @@ defineExpose({ |
| 615 | 615 | ||
| 616 | .row { | 616 | .row { |
| 617 | margin-top: 8px; | 617 | margin-top: 8px; |
| 618 | font-size: 14px; | 618 | font-size: 12px; |
| 619 | color: #666666; | 619 | color: #666666; |
| 620 | word-break: break-all; | 620 | word-break: break-all; |
| 621 | line-height: 21px; | 621 | line-height: 21px; | ... | ... |
| ... | @@ -78,6 +78,7 @@ const sankeyInstance: any = ref(); | ... | @@ -78,6 +78,7 @@ const sankeyInstance: any = ref(); |
| 78 | const containerRef = ref(); | 78 | const containerRef = ref(); |
| 79 | 79 | ||
| 80 | const setChartsOption = () => { | 80 | const setChartsOption = () => { |
| 81 | |||
| 81 | let option = { | 82 | let option = { |
| 82 | tooltip: { | 83 | tooltip: { |
| 83 | trigger: 'item', | 84 | trigger: 'item', |
| ... | @@ -85,19 +86,33 @@ const setChartsOption = () => { | ... | @@ -85,19 +86,33 @@ const setChartsOption = () => { |
| 85 | if (params.data.name) { | 86 | if (params.data.name) { |
| 86 | return null; | 87 | return null; |
| 87 | } | 88 | } |
| 88 | return params.data.source + ' --> ' + params.data.target | 89 | return params.data.source + ' > ' + params.data.target |
| 89 | } | 90 | } |
| 90 | }, | 91 | }, |
| 91 | color: ["#3DBCBE", "#6b67d1", "#7BBCE0", "#2B8EF3", "#51dca2", "#E19D46"], | 92 | color: ["#3DBCBE", "#6b67d1", "#7BBCE0", "#2B8EF3", "#51dca2", "#E19D46"], |
| 92 | series: [ | 93 | series: [ |
| 93 | { | 94 | { |
| 94 | type: 'sankey', | 95 | type: 'sankey', |
| 95 | top: 80, | 96 | top: 60, |
| 96 | bottom: 40, | 97 | bottom: 20, |
| 97 | draggable: false, | 98 | draggable: false, |
| 98 | left: 40, | 99 | left: 50, |
| 99 | right: 80, | 100 | right: 100, |
| 100 | data: props.names, | 101 | label: { |
| 102 | fontSize: 10, | ||
| 103 | }, | ||
| 104 | data: props.names?.map(n => { | ||
| 105 | if (n.isLast) { | ||
| 106 | return { | ||
| 107 | ...n, | ||
| 108 | label: { | ||
| 109 | width: 97, | ||
| 110 | overflow: 'breakAll' | ||
| 111 | } | ||
| 112 | } | ||
| 113 | } | ||
| 114 | return n; | ||
| 115 | }), | ||
| 101 | links: props.treeData, | 116 | links: props.treeData, |
| 102 | lineStyle: { | 117 | lineStyle: { |
| 103 | color: 'source', | 118 | color: 'source', |
| ... | @@ -113,10 +128,9 @@ const setChartsOption = () => { | ... | @@ -113,10 +128,9 @@ const setChartsOption = () => { |
| 113 | const resizeObserver = ref(); | 128 | const resizeObserver = ref(); |
| 114 | 129 | ||
| 115 | const observeResize = () => { | 130 | const observeResize = () => { |
| 116 | resizeObserver.value = new ResizeObserver(() => { | 131 | window.addEventListener('resize', (e) => { |
| 117 | sankeyInstance.value?.resize(); | 132 | sankeyInstance.value?.resize(); |
| 118 | }); | 133 | }); |
| 119 | resizeObserver.value.observe(containerRef.value); | ||
| 120 | } | 134 | } |
| 121 | 135 | ||
| 122 | onMounted(() => { | 136 | onMounted(() => { | ... | ... |
| ... | @@ -2,13 +2,13 @@ | ... | @@ -2,13 +2,13 @@ |
| 2 | <el-drawer | 2 | <el-drawer |
| 3 | v-model="visible" | 3 | v-model="visible" |
| 4 | :title="title" | 4 | :title="title" |
| 5 | width="520" | 5 | size="520px" |
| 6 | class="standard-meta-modal" | 6 | class="standard-meta-modal" |
| 7 | :close-on-click-modal="false" | 7 | :close-on-click-modal="false" |
| 8 | > | 8 | > |
| 9 | <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"> |
| 10 | <el-row> | 10 | <el-row> |
| 11 | <el-col v-for="item,index in fields" :key="index" :span="12" style="padding-right:10px;margin-bottom:10px;"> | 11 | <el-col v-for="item,index in fields" :key="index" :span="12" style="padding-right:10px;"> |
| 12 | <el-form-item :label="item.fileNameCodeName" :prop="item.fileNameCode"> | 12 | <el-form-item :label="item.fileNameCodeName" :prop="item.fileNameCode"> |
| 13 | <el-input | 13 | <el-input |
| 14 | v-if="item.inputTypeCode == '1' || item.inputTypeCode == '3'" | 14 | v-if="item.inputTypeCode == '1' || item.inputTypeCode == '3'" |
| ... | @@ -21,7 +21,6 @@ | ... | @@ -21,7 +21,6 @@ |
| 21 | filterable | 21 | filterable |
| 22 | clearable | 22 | clearable |
| 23 | placeholder="请选择" | 23 | placeholder="请选择" |
| 24 | size="small" | ||
| 25 | > | 24 | > |
| 26 | <el-option v-for="op in formOptions[item.fileNameCode]" :label="op.label" :value="op.value" :key="op.value"></el-option> | 25 | <el-option v-for="op in formOptions[item.fileNameCode]" :label="op.label" :value="op.value" :key="op.value"></el-option> |
| 27 | </el-select> | 26 | </el-select> |
| ... | @@ -49,7 +48,7 @@ | ... | @@ -49,7 +48,7 @@ |
| 49 | import { watch } from 'vue' | 48 | import { watch } from 'vue' |
| 50 | import { ElMessage } from "element-plus"; | 49 | import { ElMessage } from "element-plus"; |
| 51 | import { getParamsList } from '@/api/modules/dataAsset' | 50 | import { getParamsList } from '@/api/modules/dataAsset' |
| 52 | import { saveMetaStandardDataFields, getMetaStandardFieldDetail, getStandardCodeTree } from '@/api/modules/dataMetaService' | 51 | import { saveMetaStandardDataFields, getMetaStandardFieldsDetail, getStandardCodeTree } from '@/api/modules/dataMetaService' |
| 53 | 52 | ||
| 54 | const { proxy } = getCurrentInstance() as any; | 53 | const { proxy } = getCurrentInstance() as any; |
| 55 | const props = defineProps({ | 54 | const props = defineProps({ |
| ... | @@ -130,7 +129,7 @@ function getOptions (dictType) { | ... | @@ -130,7 +129,7 @@ function getOptions (dictType) { |
| 130 | } | 129 | } |
| 131 | function getDetail () { | 130 | function getDetail () { |
| 132 | return new Promise((resolve) => { | 131 | return new Promise((resolve) => { |
| 133 | getMetaStandardFieldDetail(props.data.guid).then((res:any) => { | 132 | getMetaStandardFieldsDetail(props.data.guid).then((res:any) => { |
| 134 | if (res.code === proxy.$passCode) { | 133 | if (res.code === proxy.$passCode) { |
| 135 | resolve(res.data) | 134 | resolve(res.data) |
| 136 | } | 135 | } |
| ... | @@ -156,7 +155,8 @@ function confirm () { | ... | @@ -156,7 +155,8 @@ function confirm () { |
| 156 | ElMessage.success('操作成功') | 155 | ElMessage.success('操作成功') |
| 157 | emit('success') | 156 | emit('success') |
| 158 | visible.value = false | 157 | visible.value = false |
| 159 | return | 158 | } else { |
| 159 | ElMessage.error(res.msg) | ||
| 160 | } | 160 | } |
| 161 | }).finally(() => confirmLoading.value = false) | 161 | }).finally(() => confirmLoading.value = false) |
| 162 | }) | 162 | }) | ... | ... |
| ... | @@ -117,7 +117,7 @@ const selectRowData = ref([]) | ... | @@ -117,7 +117,7 @@ const selectRowData = ref([]) |
| 117 | const selectedRowData = ref([]) | 117 | const selectedRowData = ref([]) |
| 118 | const tableInfo: any = ref({ | 118 | const tableInfo: any = ref({ |
| 119 | id: 'data-source-table', | 119 | id: 'data-source-table', |
| 120 | multiple: false, | 120 | multiple: true, |
| 121 | fixedSelection: true, | 121 | fixedSelection: true, |
| 122 | fields: [ | 122 | fields: [ |
| 123 | { label: "序号", type: "index", width: 56, align: "center" }, | 123 | { label: "序号", type: "index", width: 56, align: "center" }, |
| ... | @@ -413,6 +413,32 @@ function exportData () { | ... | @@ -413,6 +413,32 @@ function exportData () { |
| 413 | }) | 413 | }) |
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | function tableSelectionChange (list) { | ||
| 417 | selectedRowData.value = list | ||
| 418 | } | ||
| 419 | function batchDelete () { | ||
| 420 | // console.log(selectedRowData.value) | ||
| 421 | let selectRowGuids = selectedRowData.value.map(v => v.guid) | ||
| 422 | if (selectRowGuids.length === 0) { | ||
| 423 | ElMessage.error('请选择需要删除的数据') | ||
| 424 | return | ||
| 425 | } | ||
| 426 | ElMessageBox.confirm('确定删除吗?', '提示', { | ||
| 427 | confirmButtonText: "确定", | ||
| 428 | cancelButtonText: "取消", | ||
| 429 | type: 'warning', | ||
| 430 | }).then(() => { | ||
| 431 | deleteMetaStandardDataFields(selectRowGuids).then((res:any) => { | ||
| 432 | if (res.code === proxy.$passCode) { | ||
| 433 | ElMessage.success('删除成功') | ||
| 434 | getFirstPageData() | ||
| 435 | } else { | ||
| 436 | ElMessage.error(res.msg) | ||
| 437 | } | ||
| 438 | }) | ||
| 439 | }) | ||
| 440 | } | ||
| 441 | |||
| 416 | onBeforeMount(() => { | 442 | onBeforeMount(() => { |
| 417 | getTree() | 443 | getTree() |
| 418 | }) | 444 | }) |
| ... | @@ -434,7 +460,7 @@ const viewGraph = () => { | ... | @@ -434,7 +460,7 @@ const viewGraph = () => { |
| 434 | <div class="aside_wrap"> | 460 | <div class="aside_wrap"> |
| 435 | <div class="aside_title"> | 461 | <div class="aside_title"> |
| 436 | 元数据标准列表 | 462 | 元数据标准列表 |
| 437 | <el-icon color="#4fa1a4" @click="openStandardDialog" style="width:2em;height:2em" class="add"> | 463 | <el-icon color="#4fa1a4" @click="openStandardDialog" :size="20" class="custom-icon"> |
| 438 | <CirclePlus /> | 464 | <CirclePlus /> |
| 439 | </el-icon> | 465 | </el-icon> |
| 440 | </div> | 466 | </div> |
| ... | @@ -451,12 +477,13 @@ const viewGraph = () => { | ... | @@ -451,12 +477,13 @@ const viewGraph = () => { |
| 451 | <el-button @click="importData" v-preReClick>导入</el-button> | 477 | <el-button @click="importData" v-preReClick>导入</el-button> |
| 452 | <el-button @click="exportData" v-preReClick>导出</el-button> | 478 | <el-button @click="exportData" v-preReClick>导出</el-button> |
| 453 | <el-button @click="viewGraph" v-preReClick>查看</el-button> | 479 | <el-button @click="viewGraph" v-preReClick>查看</el-button> |
| 480 | <el-button @click="batchDelete">批量删除</el-button> | ||
| 454 | </div> | 481 | </div> |
| 455 | <el-input class="table_search_input" v-model.trim="tableSearchInput" placeholder="请输入关键字搜索" | 482 | <el-input class="table_search_input" v-model.trim="tableSearchInput" placeholder="请输入关键字搜索" |
| 456 | :suffix-icon="Search" clearable @change="val => getFirstPageData()" /> | 483 | :suffix-icon="Search" clearable @change="val => getFirstPageData()" /> |
| 457 | </div> | 484 | </div> |
| 458 | <div class="table_panel_wrap full"> | 485 | <div class="table_panel_wrap full"> |
| 459 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" | 486 | <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tableSelectionChange="tableSelectionChange" |
| 460 | @tablePageChange="tablePageChange"/> | 487 | @tablePageChange="tablePageChange"/> |
| 461 | </div> | 488 | </div> |
| 462 | </div> | 489 | </div> |
| ... | @@ -479,17 +506,7 @@ const viewGraph = () => { | ... | @@ -479,17 +506,7 @@ const viewGraph = () => { |
| 479 | </template> | 506 | </template> |
| 480 | 507 | ||
| 481 | <style lang="scss"> | 508 | <style lang="scss"> |
| 482 | .standard { | 509 | |
| 483 | .el-icon { | ||
| 484 | cursor: pointer; | ||
| 485 | width: 1em; | ||
| 486 | height: 1em | ||
| 487 | } | ||
| 488 | .el-icon svg { | ||
| 489 | width: 20px; | ||
| 490 | height: 20px; | ||
| 491 | } | ||
| 492 | } | ||
| 493 | </style> | 510 | </style> |
| 494 | <style lang="scss" scoped> | 511 | <style lang="scss" scoped> |
| 495 | .container_wrap { | 512 | .container_wrap { |
| ... | @@ -516,6 +533,14 @@ const viewGraph = () => { | ... | @@ -516,6 +533,14 @@ const viewGraph = () => { |
| 516 | </style> | 533 | </style> |
| 517 | 534 | ||
| 518 | <style lang="scss"> | 535 | <style lang="scss"> |
| 536 | .standard { | ||
| 537 | .custom-icon { | ||
| 538 | svg { | ||
| 539 | width: auto; | ||
| 540 | height: auto; | ||
| 541 | } | ||
| 542 | } | ||
| 543 | } | ||
| 519 | .tree_panel .el-tree .el-tree-node__content { | 544 | .tree_panel .el-tree .el-tree-node__content { |
| 520 | position: relative; | 545 | position: relative; |
| 521 | .list-item-text { | 546 | .list-item-text { | ... | ... |
-
Please register or sign in to post a comment