数据资产(完善)

master
yaoxin 2024-04-21 11:51:18 +08:00
parent 9e1df6e75a
commit 157c051a5e
1 changed files with 19 additions and 1 deletions

View File

@ -21,7 +21,9 @@
<span>查询语句</span>
</div>
<el-input type="textarea" v-model="source.sql" style="width: 1080px;" :rows="6"></el-input>
<el-button style="float: right;margin-top: 20px" @click="dialogTableVisible = true">数据结构</el-button>
<el-button style="float: right;margin-top: 20px" @click="sql()"></el-button>
</el-card>
<br>
<el-card>
@ -40,6 +42,20 @@
</el-main>
</el-container>
</el-container>
<el-dialog title="数据结构" :visible.sync="dialogTableVisible">
<el-table :data="tableAssets">
<el-table-column property="field" label="字段名" width="150"></el-table-column>
<el-table-column property="type" label="类型" width="150"></el-table-column>
<el-table-column property="null" label="是否为空" width="150"></el-table-column>
<el-table-column property="key" label="键" width="150"></el-table-column>
<el-table-column property="default" label="默认值" width="150"></el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogTableVisible = false"> </el-button>
<el-button type="primary" @click="dialogTableVisible = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -54,6 +70,7 @@ export default {
props: {},
data() {
return {
dialogTableVisible: false,
queryParams: {
pageNum: 1,
pageSize: 10,
@ -66,6 +83,7 @@ export default {
sourceList: [],
assetsList:[],
structureList:[],
tableAssets:[],
source: {
sql: ''
}
@ -79,7 +97,6 @@ export default {
methods: {
sql(){
structureList(this.source).then(res => {
console.log(res)
this.structureList = res.data.kvtList
})
},
@ -92,6 +109,7 @@ export default {
assetsList(source).then(res => {
console.log(res)
this.assetsList = res.data.structure
this.tableAssets = res.data.tableAssets
})
},
getList() {