.
This commit is contained in:
@@ -48,8 +48,8 @@ const meta = {
|
||||
callback(json)
|
||||
})
|
||||
},
|
||||
linkList() {
|
||||
return red.postX('/meta/link_list')
|
||||
tableLinkList() {
|
||||
return red.postX('/meta/table_link_list')
|
||||
},
|
||||
linkSave({link}) {
|
||||
return red.postX('/meta/link_save', {link: JSON.stringify(link)})
|
||||
|
||||
@@ -1,3 +1,33 @@
|
||||
<style>
|
||||
.meta-link {
|
||||
padding-top: 5px;
|
||||
}
|
||||
.checkbox-inline:first-child{
|
||||
left: 10px;
|
||||
margin-right: 10px!important;
|
||||
}
|
||||
.checkbox input[type=checkbox], .checkbox-inline input[type=checkbox], .radio input[type=radio], .radio-inline input[type=radio] {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.hv {
|
||||
color: #ea644a!important;
|
||||
}
|
||||
.hv:focus,.hv:hover {
|
||||
color: #8b8a15!important;
|
||||
}
|
||||
.active>.hv{
|
||||
color: #8b8a15!important;
|
||||
}
|
||||
.tlist{
|
||||
height:100%; overflow: auto;
|
||||
}
|
||||
.tlist>li.active>a,
|
||||
.tlist>li.active>a:focus,
|
||||
.tlist>li.active>a:hover,
|
||||
.tlist>li>a:hover {
|
||||
background-color: #92b0cb;
|
||||
}
|
||||
</style>
|
||||
<row class="meta-link">
|
||||
<div class="info">
|
||||
<a @click="showInfo()" href="javascript:;"><i class="icon icon-info"></i></a>
|
||||
@@ -22,31 +52,61 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix" style="padding-top: 5px"></div>
|
||||
<div class="col-xs-2 sheet-cell">
|
||||
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> DB-Table</div>
|
||||
<ul class="nav nav-tabs nav-stacked tlist" style="height: 100%">
|
||||
<li class="clearfix" v-for="item in tables" >
|
||||
<a href="javascript:;" @click="tableAlias=item.alias" data-target="#tab3Content1" data-toggle="tab" v-text="tableItem(item)"></a>
|
||||
</li>
|
||||
</ul>
|
||||
<!--<p v-show="ckTable && ckTable.length">已选择 <code v-text="ckTable.length||0"></code> 个实体待导入</p>-->
|
||||
</div>
|
||||
|
||||
<div class="col-xs-8">
|
||||
{{ tableAlias }}
|
||||
</div>
|
||||
</row>
|
||||
|
||||
<script>
|
||||
let {tableLinkList, linkSave} = meta
|
||||
var vm = new Vue({
|
||||
el: ".meta-link",
|
||||
data: {
|
||||
tables: [],
|
||||
tableName: '',
|
||||
tableAlias: '',
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
loadLinkList() {
|
||||
tableLinkList().then(res => {
|
||||
this.tables = res
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
tableItem(table) {
|
||||
return `${table.name} [${table.comment}] (${table.linkCount})`
|
||||
},
|
||||
showInfo() {
|
||||
$('#f-info').modal({moveable: true})
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.loadLinkList()
|
||||
|
||||
/*
|
||||
|
||||
var m = {"a.field": "lxyer", "a.`age`": 11}
|
||||
|
||||
console.log(m["a.field"])
|
||||
|
||||
console.log("---------")
|
||||
for (var k in m) {
|
||||
console.log(k)
|
||||
}
|
||||
}*/
|
||||
}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user