feat(数据集): 关联数据集
This commit is contained in:
parent
3c78b3bec2
commit
4848185ba5
@ -1,11 +1,24 @@
|
||||
<template>
|
||||
<div v-if="unionParam.type" style="height:400px;">
|
||||
<p>{{ unionParam.node.currentDs.name }}</p>
|
||||
<p>{{ unionParam.parent.currentDs.name }}</p>
|
||||
<div class="field-style">
|
||||
<div class="fields">
|
||||
<p>{{ unionParam.parent.currentDs.name }}</p>
|
||||
<div style="height: 150px;width: 100%;overflow-y: auto">
|
||||
<p v-for="item in parentField" :key="item.id">
|
||||
{{ item.name }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fields">
|
||||
<p>{{ unionParam.node.currentDs.name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { post } from '@/api/dataset/dataset'
|
||||
|
||||
export default {
|
||||
name: 'UnionEdit',
|
||||
props: {
|
||||
@ -16,17 +29,47 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
parentField: [],
|
||||
nodeField: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'unionParam': function() {
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getParentFieldList()
|
||||
this.getNodeFieldList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
getParentFieldList() {
|
||||
post('/dataset/field/list/' + this.unionParam.parent.currentDs.id, null, true).then(response => {
|
||||
this.parentField = JSON.parse(JSON.stringify(response.data)).filter(ele => ele.extField === 0)
|
||||
})
|
||||
},
|
||||
getNodeFieldList() {
|
||||
post('/dataset/field/list/' + this.unionParam.node.currentDs.id, null, true).then(response => {
|
||||
this.nodeField = JSON.parse(JSON.stringify(response.data)).filter(ele => ele.extField === 0)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.field-style{
|
||||
height: 180px;
|
||||
}
|
||||
.fields{
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box; /* Firefox */
|
||||
-webkit-box-sizing: border-box; /* Safari */
|
||||
width: 50%;
|
||||
float: left;
|
||||
padding: 0 4px;
|
||||
}
|
||||
p{
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -126,6 +126,7 @@
|
||||
<svg-icon v-if="data.type === 'sql'" icon-class="ds-sql" class="ds-icon-sql" />
|
||||
<svg-icon v-if="data.type === 'excel'" icon-class="ds-excel" class="ds-icon-excel" />
|
||||
<svg-icon v-if="data.type === 'custom'" icon-class="ds-custom" class="ds-icon-custom" />
|
||||
<svg-icon v-if="data.type === 'union'" icon-class="ds-union" class="ds-icon-union" />
|
||||
</span>
|
||||
<span v-if="data.type === 'db' || data.type === 'sql'">
|
||||
<span v-if="data.mode === 0" style="margin-left: 6px"><i class="el-icon-s-operation" /></span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user