9255bfce by lxs

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

2 parents 9bf89eb9 d3bd009b
......@@ -389,6 +389,11 @@ export const getMetaStandardField = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/list-by-meta-standard-guid?metaStandardGuid=${guid}`,
method: 'get'
})
/** 元数据标准字段详情 */
export const getMetaStandardFieldsDetail = (guid) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/meta-standard/data/detail?guid=${guid}`,
method: 'get'
})
/** 根据元数据标准展示字段去获取未展示的详情信息 */
export const getMetaStandardFieldDetail = (guid) => request({
......
......@@ -82,7 +82,7 @@ watch(() => props.treeData, (val) => {
const renderGraph = (graph: any, lineageData: any) => {
if (!graph || !lineageData) return;
graph.setMinZoom(0.7);
graph.setMinZoom(1);
graph.setMaxZoom(1);
graph.data(lineageData);
graph.render();
......@@ -265,7 +265,7 @@ const initGraph = () => {
],
},
defaultNode: {
size: 24,
size: 20,
anchorPoints: [
[0, 0.5],
[1, 0.5],
......@@ -292,7 +292,7 @@ const initGraph = () => {
return 16;
},
getVGap: function getVGap() {
return 25;
return 15;
},
getHGap: function getHGap() {
return 120;
......@@ -306,7 +306,7 @@ const initGraph = () => {
label: handleLabelLength((node.isField ? node.metaStandardId : node.standardName) as string),
collapsed: node.children?.length ? false : true,
labelCfg: {
offset: 10,
offset: 7,
style: {
fontSize: 13,
fill: '#212121',
......@@ -369,7 +369,7 @@ const observeResize = () => {
return;
}
graphRef.value.changeSize(width, height);
graphRef.value.setMinZoom(0.7);
graphRef.value.setMinZoom(1);
graphRef.value.setMaxZoom(1);
graphRef.value.fitView(40, { direction: 'both' });
graphRef.value.fitCenter();
......@@ -385,7 +385,7 @@ const observeResize = () => {
return;
}
graphRef.value.changeSize(width, height);
graphRef.value.setMinZoom(0.7);
graphRef.value.setMinZoom(1);
graphRef.value.setMaxZoom(1);
graphRef.value.fitView(40, { direction: 'both' });
graphRef.value.fitCenter();
......@@ -607,7 +607,7 @@ defineExpose({
overflow-y: auto;
.title {
font-size: 16px;
font-size: 14px;
color: #212121;
line-height: 24px;
font-weight: 600;
......@@ -615,7 +615,7 @@ defineExpose({
.row {
margin-top: 8px;
font-size: 14px;
font-size: 12px;
color: #666666;
word-break: break-all;
line-height: 21px;
......
......@@ -78,6 +78,7 @@ const sankeyInstance: any = ref();
const containerRef = ref();
const setChartsOption = () => {
let option = {
tooltip: {
trigger: 'item',
......@@ -85,19 +86,33 @@ const setChartsOption = () => {
if (params.data.name) {
return null;
}
return params.data.source + ' --> ' + params.data.target
return params.data.source + ' > ' + params.data.target
}
},
color: ["#3DBCBE", "#6b67d1", "#7BBCE0", "#2B8EF3", "#51dca2", "#E19D46"],
series: [
{
type: 'sankey',
top: 80,
bottom: 40,
top: 60,
bottom: 20,
draggable: false,
left: 40,
right: 80,
data: props.names,
left: 50,
right: 100,
label: {
fontSize: 10,
},
data: props.names?.map(n => {
if (n.isLast) {
return {
...n,
label: {
width: 97,
overflow: 'breakAll'
}
}
}
return n;
}),
links: props.treeData,
lineStyle: {
color: 'source',
......@@ -113,10 +128,9 @@ const setChartsOption = () => {
const resizeObserver = ref();
const observeResize = () => {
resizeObserver.value = new ResizeObserver(() => {
window.addEventListener('resize', (e) => {
sankeyInstance.value?.resize();
});
resizeObserver.value.observe(containerRef.value);
}
onMounted(() => {
......
......@@ -2,13 +2,13 @@
<el-drawer
v-model="visible"
:title="title"
width="520"
size="520px"
class="standard-meta-modal"
:close-on-click-modal="false"
>
<el-form :model="form" :rules="formRules" ref="formEl" style="min-height: 200px;" require-asterisk-position="right">
<el-row>
<el-col v-for="item,index in fields" :key="index" :span="12" style="padding-right:10px;margin-bottom:10px;">
<el-col v-for="item,index in fields" :key="index" :span="12" style="padding-right:10px;">
<el-form-item :label="item.fileNameCodeName" :prop="item.fileNameCode">
<el-input
v-if="item.inputTypeCode == '1' || item.inputTypeCode == '3'"
......@@ -21,7 +21,6 @@
filterable
clearable
placeholder="请选择"
size="small"
>
<el-option v-for="op in formOptions[item.fileNameCode]" :label="op.label" :value="op.value" :key="op.value"></el-option>
</el-select>
......@@ -49,7 +48,7 @@
import { watch } from 'vue'
import { ElMessage } from "element-plus";
import { getParamsList } from '@/api/modules/dataAsset'
import { saveMetaStandardDataFields, getMetaStandardFieldDetail, getStandardCodeTree } from '@/api/modules/dataMetaService'
import { saveMetaStandardDataFields, getMetaStandardFieldsDetail, getStandardCodeTree } from '@/api/modules/dataMetaService'
const { proxy } = getCurrentInstance() as any;
const props = defineProps({
......@@ -130,7 +129,7 @@ function getOptions (dictType) {
}
function getDetail () {
return new Promise((resolve) => {
getMetaStandardFieldDetail(props.data.guid).then((res:any) => {
getMetaStandardFieldsDetail(props.data.guid).then((res:any) => {
if (res.code === proxy.$passCode) {
resolve(res.data)
}
......@@ -156,7 +155,8 @@ function confirm () {
ElMessage.success('操作成功')
emit('success')
visible.value = false
return
} else {
ElMessage.error(res.msg)
}
}).finally(() => confirmLoading.value = false)
})
......
......@@ -117,7 +117,7 @@ const selectRowData = ref([])
const selectedRowData = ref([])
const tableInfo: any = ref({
id: 'data-source-table',
multiple: false,
multiple: true,
fixedSelection: true,
fields: [
{ label: "序号", type: "index", width: 56, align: "center" },
......@@ -413,6 +413,32 @@ function exportData () {
})
}
function tableSelectionChange (list) {
selectedRowData.value = list
}
function batchDelete () {
// console.log(selectedRowData.value)
let selectRowGuids = selectedRowData.value.map(v => v.guid)
if (selectRowGuids.length === 0) {
ElMessage.error('请选择需要删除的数据')
return
}
ElMessageBox.confirm('确定删除吗?', '提示', {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: 'warning',
}).then(() => {
deleteMetaStandardDataFields(selectRowGuids).then((res:any) => {
if (res.code === proxy.$passCode) {
ElMessage.success('删除成功')
getFirstPageData()
} else {
ElMessage.error(res.msg)
}
})
})
}
onBeforeMount(() => {
getTree()
})
......@@ -434,7 +460,7 @@ const viewGraph = () => {
<div class="aside_wrap">
<div class="aside_title">
元数据标准列表
<el-icon color="#4fa1a4" @click="openStandardDialog" style="width:2em;height:2em" class="add">
<el-icon color="#4fa1a4" @click="openStandardDialog" :size="20" class="custom-icon">
<CirclePlus />
</el-icon>
</div>
......@@ -451,12 +477,13 @@ const viewGraph = () => {
<el-button @click="importData" v-preReClick>导入</el-button>
<el-button @click="exportData" v-preReClick>导出</el-button>
<el-button @click="viewGraph" v-preReClick>查看</el-button>
<el-button @click="batchDelete">批量删除</el-button>
</div>
<el-input class="table_search_input" v-model.trim="tableSearchInput" placeholder="请输入关键字搜索"
:suffix-icon="Search" clearable @change="val => getFirstPageData()" />
</div>
<div class="table_panel_wrap full">
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick"
<Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" @tableSelectionChange="tableSelectionChange"
@tablePageChange="tablePageChange"/>
</div>
</div>
......@@ -479,17 +506,7 @@ const viewGraph = () => {
</template>
<style lang="scss">
.standard {
.el-icon {
cursor: pointer;
width: 1em;
height: 1em
}
.el-icon svg {
width: 20px;
height: 20px;
}
}
</style>
<style lang="scss" scoped>
.container_wrap {
......@@ -516,6 +533,14 @@ const viewGraph = () => {
</style>
<style lang="scss">
.standard {
.custom-icon {
svg {
width: auto;
height: auto;
}
}
}
.tree_panel .el-tree .el-tree-node__content {
position: relative;
.list-item-text {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!