修改:界面样式
This commit is contained in:
@@ -25,6 +25,8 @@ redkale.server[0].request.remoteaddr = request.headers.X-Real-IP
|
|||||||
redkale.server[0].rest.autoload = true
|
redkale.server[0].rest.autoload = true
|
||||||
redkale.server[0].rest.base = net.tccn.base.BaseServlet
|
redkale.server[0].rest.base = net.tccn.base.BaseServlet
|
||||||
|
|
||||||
|
# --- render ---
|
||||||
|
redkale.server[0].render.value = net.tccn.base.MetaRender
|
||||||
# --- response ---
|
# --- response ---
|
||||||
redkale.server[0].response.addheader[0].name = X-Node
|
redkale.server[0].response.addheader[0].name = X-Node
|
||||||
redkale.server[0].response.addheader[0].value = system.property.APP_NODE
|
redkale.server[0].response.addheader[0].value = system.property.APP_NODE
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ const meta = {
|
|||||||
//client
|
//client
|
||||||
exportData({fbean, cate}) {
|
exportData({fbean, cate}) {
|
||||||
if (cate == 'excel') {
|
if (cate == 'excel') {
|
||||||
location.href = "/data/export?fBean=" + JSON.stringify(fbean) + "&platToken=" + red.getPlatToken() + "&cate=csv";
|
location.href = "/data/export?fBean=" + JSON.stringify(fbean) + "&platToken=" + red.getPlatToken() + "&cate=excel";
|
||||||
} else if (cate == 'cvs') {
|
} else if (cate == 'cvs') {
|
||||||
|
|
||||||
} else if (cate == 'json') {
|
} else if (cate == 'json') {
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ const plat = {
|
|||||||
},
|
},
|
||||||
dbSave({plat}) {
|
dbSave({plat}) {
|
||||||
// todo:解决重复点击保存出现的异常
|
// todo:解决重复点击保存出现的异常
|
||||||
plat["url"] = escape(plat["url"])
|
let _plat = JSON.parse(JSON.stringify(plat));
|
||||||
return red.postX('/plat/db_save', {plat: JSON.stringify(plat)})
|
_plat["url"] = encodeURIComponent(_plat["url"])
|
||||||
|
return red.postX('/plat/db_save', {plat: JSON.stringify(_plat)})
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,6 @@
|
|||||||
{url:"/metadata/metaService.html", name:"业务管理", icon: "icon-sliders"},
|
{url:"/metadata/metaService.html", name:"业务管理", icon: "icon-sliders"},
|
||||||
{url:"/metadata/dataList.html", name:"业务预览", icon:"icon-window-alt"},
|
{url:"/metadata/dataList.html", name:"业务预览", icon:"icon-window-alt"},
|
||||||
/*{url:"/metadata/dict.html", name:"字典管理", icon:"icon-usecase"},*/
|
/*{url:"/metadata/dict.html", name:"字典管理", icon:"icon-usecase"},*/
|
||||||
{url:"/content/create.html", name:"内容管理", icon:"icon-edit-sign"},
|
|
||||||
/*{url:"/content/list.html", name:"游戏查询", icon:"icon-usecase"},
|
/*{url:"/content/list.html", name:"游戏查询", icon:"icon-usecase"},
|
||||||
{url:"/content/funs.html", name:"平台功能", icon:"icon-usecase"},*/
|
{url:"/content/funs.html", name:"平台功能", icon:"icon-usecase"},*/
|
||||||
]
|
]
|
||||||
@@ -119,20 +118,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "其他服务", url: "/plat/db.html", nodes: [
|
name: "平台管理", url: "/plat/db.html", nodes: [
|
||||||
{url:"/oth/index.html", name:"业务平台管理", icon: "icon-database"},
|
|
||||||
{url:"/oth/file.html", name:"文件服务", icon: "icon-database"},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "业务平台", url: "/qtask", nodes: [
|
|
||||||
{url:"/plat/index.html", name:"业务平台", icon:"icon-server"},
|
|
||||||
{url:"/plat/dev.html", name:"dev", icon:"icon-beaker"},
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "数据平台", url: "/plat/db.html", nodes: [
|
|
||||||
{url:"/plat/db.html", name:"数据中心", icon: "icon-database"},
|
{url:"/plat/db.html", name:"数据中心", icon: "icon-database"},
|
||||||
|
{url:"/plat/index.html", name:"业务平台", icon:"icon-server"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{name: "关于", url: "/single", nodes: [
|
{name: "关于", url: "/single", nodes: [
|
||||||
@@ -142,6 +130,14 @@
|
|||||||
{url:"/single/metaFlow.html", name:"MetaKit使用", icon:"icon-server"},
|
{url:"/single/metaFlow.html", name:"MetaKit使用", icon:"icon-server"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "其他服务", url: "/plat/db.html", nodes: [
|
||||||
|
{url:"/oth/index.html", name:"业务平台管理", icon: "icon-database"},
|
||||||
|
{url:"/oth/file.html", name:"文件服务", icon: "icon-database"},
|
||||||
|
{url:"/content/create.html", name:"内容管理", icon:"icon-edit-sign"},
|
||||||
|
{url:"/plat/dev.html", name:"dev", icon:"icon-beaker"},
|
||||||
|
]
|
||||||
|
},
|
||||||
{name: "Zhub", url: "/zhub", nodes: [
|
{name: "Zhub", url: "/zhub", nodes: [
|
||||||
{url:"/zhub/monitor.html", name:"Monitor", icon:"icon-server"},
|
{url:"/zhub/monitor.html", name:"Monitor", icon:"icon-server"},
|
||||||
{url:"/zhub/topic.html", name:"Topics", icon:"icon-server"},
|
{url:"/zhub/topic.html", name:"Topics", icon:"icon-server"},
|
||||||
@@ -155,8 +151,7 @@
|
|||||||
{url:"/weixin/templateMessage.html", name:"模板消息", icon:"icon-server"},
|
{url:"/weixin/templateMessage.html", name:"模板消息", icon:"icon-server"},
|
||||||
{url:"/weixin/timer.html", name:"Timer", icon:"icon-server"},
|
{url:"/weixin/timer.html", name:"Timer", icon:"icon-server"},
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
menus: {},
|
menus: {},
|
||||||
page: {},
|
page: {},
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
<!-- 业务列表 -->
|
<!-- 业务列表 -->
|
||||||
<div class="col-xs-2">
|
<div class="col-xs-2">
|
||||||
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 业务列表(Meta-Service)</div>
|
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 业务列表(Meta-Service)</div>
|
||||||
<ul class="nav nav-tabs nav-stacked tlist" style="height: 100%">
|
<ul class="nav nav-tabs nav-stacked dlist" style="height: 100%">
|
||||||
<li :class="['clearfix',{'active':service==item.alias}]" v-for="item in services" >
|
<li :class="['clearfix',{'active':service==item.alias}]" v-for="item in services" >
|
||||||
<a @click="service=item.name" :title="`${item.name}`" v-text="`【${item.comment}】`" href="javascript:;"></a>
|
<a @click="service=item.name" :title="`${item.name}`" v-text="`${item.comment}`" href="javascript:;"></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,17 +23,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 col-xs-4 sheet-cell">
|
<div class="col-xs-4 sheet-cell">
|
||||||
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 实体表(Meta-Table)</div>
|
<div style="padding-left: 10px;background-color: #ccc;width: 100%;height: 32px;">
|
||||||
|
实体表(Meta-Table) <input v-model="filter" placeholder="筛选实体" style="margin-top: 5px;">
|
||||||
|
</div>
|
||||||
<ul class="nav nav-tabs nav-stacked tlist" style="height: 100%">
|
<ul class="nav nav-tabs nav-stacked tlist" style="height: 100%">
|
||||||
<li :class="[{'active': aliasA == item.alias}]" v-for="item in tables" >
|
<li :class="[{'active': aliasA == item.alias}]" v-for="item in tables" v-if="dealFilter(item)">
|
||||||
<a href="javascript:;" @click="aliasA=item.alias" data-target="#tab3Content1" data-toggle="tab" v-text="dealTableLabel(item)"></a>
|
<a href="javascript:;" @click="aliasA=item.alias" data-target="#tab3Content1" data-toggle="tab" v-text="dealTableLabel(item)"></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!--<p v-show="ckTable && ckTable.length">已选择 <code v-text="ckTable.length||0"></code> 个实体待导入</p>-->
|
<!--<p v-show="ckTable && ckTable.length">已选择 <code v-text="ckTable.length||0"></code> 个实体待导入</p>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9 col-xs-8">
|
<div class="col-xs-8">
|
||||||
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 已关联的表 </div>
|
<div style="padding-left: 10px;background-color: #ccc;width: 100%;height: 32px;"> 已关联的表 </div>
|
||||||
<!-- 关联表列表 -->
|
<!-- 关联表列表 -->
|
||||||
<button v-for="link in linkInfos" @click="aliasB=link.alias" :class="['btn', {'btn-primary' :aliasB==link.alias}]" style="margin: 5px">
|
<button v-for="link in linkInfos" @click="aliasB=link.alias" :class="['btn', {'btn-primary' :aliasB==link.alias}]" style="margin: 5px">
|
||||||
<i class="icon icon-table"></i>
|
<i class="icon icon-table"></i>
|
||||||
@@ -141,6 +143,8 @@
|
|||||||
|
|
||||||
tableInfoA: {items:[]},
|
tableInfoA: {items:[]},
|
||||||
tableInfoB: {items:[]},
|
tableInfoB: {items:[]},
|
||||||
|
|
||||||
|
filter: '',
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
aliasA(v) {
|
aliasA(v) {
|
||||||
@@ -213,7 +217,15 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
dealTableLabel(table) {
|
dealTableLabel(table) {
|
||||||
return `${table.name} [${table.comment}] (${table.linkCount})`
|
return `${table.name} (${table.comment||'-'}) [${table.linkCount}]`
|
||||||
|
},
|
||||||
|
dealFilter(table) {
|
||||||
|
// table.name 中是否包含 thiss.filter 的值
|
||||||
|
if (table.name.indexOf(this.filter) > -1 || table.comment.indexOf(this.filter) > -1) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
addLinkDia() {
|
addLinkDia() {
|
||||||
this.newLinkTable = ""
|
this.newLinkTable = ""
|
||||||
|
|||||||
@@ -123,24 +123,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-2">
|
<div class="col-xs-6">
|
||||||
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 业务相关表</div>
|
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 业务相关表</div>
|
||||||
<ul class="nav nav-tabs nav-stacked tlist">
|
<!--<ul class="nav nav-tabs nav-stacked tlist">
|
||||||
<li @click="sheet=item" :class="[{active: sheet==item }]" v-for="item in sheetArr">
|
<li @click="sheet=item" :class="[{active: sheet==item }]" v-for="item in sheetArr">
|
||||||
<a href="javascript:;" data-target="#tab3Content1" data-toggle="tab" v-text="serviceDetail['tables'][item]['name']"></a>
|
<a href="javascript:;" data-target="#tab3Content1" data-toggle="tab" v-text="serviceDetail['tables'][item]['name']"></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>-->
|
||||||
|
|
||||||
|
<div class="btn-group" style="margin: 5px 0">
|
||||||
|
<a class="btn" @click="sheet=item" v-for="item in sheetArr" v-text="dealTableName(item)"> </a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 实体字段信息 -->
|
|
||||||
<div class="col-xs-4" style="padding-left: 0px;">
|
|
||||||
<div style="padding-left: 10px;background-color: #ccc;">字段信息</div>
|
<div style="padding-left: 10px;background-color: #ccc;">字段信息</div>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<td v-show="status==3 || status==4 || status==5 || status==6"><input type="checkbox"></td>
|
<td v-show="status==3 || status==4 || status==5 || status==6"><input type="checkbox"></td>
|
||||||
<th v-show="status==1"></th>
|
<th v-show="status==1"></th>
|
||||||
<th>字段名</th>
|
<th>数据字段</th>
|
||||||
<th>中文名</th>
|
<th>注释</th>
|
||||||
<!--<th>数据类型</th>
|
<!--<th>数据类型</th>
|
||||||
<th>输入类型</th>
|
<th>输入类型</th>
|
||||||
<th>附加属性</th>
|
<th>附加属性</th>
|
||||||
@@ -164,6 +166,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 实体字段信息 -->
|
||||||
|
<div class="col-xs-6" style="padding-left: 0px;">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-xs-6" style="padding-left: 0px;padding-right: 0px;">
|
<div class="col-xs-6" style="padding-left: 0px;padding-right: 0px;">
|
||||||
<!-- shows -->
|
<!-- shows -->
|
||||||
<div id="show" v-show="status==5">
|
<div id="show" v-show="status==5">
|
||||||
@@ -182,7 +189,7 @@
|
|||||||
<td class="icon icon-move">
|
<td class="icon icon-move">
|
||||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||||
</td>
|
</td>
|
||||||
<td v-text="item.col" style="background-color: rgb(235, 235, 228);"></td>
|
<td v-text="dealCol(item.col)" style="background-color: rgb(235, 235, 228);"></td>
|
||||||
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 130px;padding: 0px"></td>
|
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 130px;padding: 0px"></td>
|
||||||
<td style="padding: 1px;">
|
<td style="padding: 1px;">
|
||||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||||
@@ -211,8 +218,8 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>字段名</th>
|
<th>数据字段</th>
|
||||||
<th>中文名</th>
|
<th>展示名称</th>
|
||||||
<th>格式化类型</th>
|
<th>格式化类型</th>
|
||||||
<th>附加参数</th>
|
<th>附加参数</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -221,7 +228,7 @@
|
|||||||
<td class="icon icon-move">
|
<td class="icon icon-move">
|
||||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||||
</td>
|
</td>
|
||||||
<td v-text="item.col" style="background-color: rgb(235, 235, 228);"></td>
|
<td v-text="dealCol(item.col)" style="background-color: rgb(235, 235, 228);"></td>
|
||||||
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="padding: 0px"></td>
|
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="padding: 0px"></td>
|
||||||
<td style="padding: 1px;">
|
<td style="padding: 1px;">
|
||||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||||
@@ -246,8 +253,8 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr style="background-color: #f1f1f1">
|
<tr style="background-color: #f1f1f1">
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>字段名</th>
|
<th>数据字段</th>
|
||||||
<th>中文名</th>
|
<th>展示名称</th>
|
||||||
<!--<th>展示名</th>-->
|
<!--<th>展示名</th>-->
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -272,8 +279,8 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th style="width: 30px">字段名</th>
|
<th style="width: 30px">数据字段</th>
|
||||||
<th style="width: 30px">中文名</th>
|
<th style="width: 30px">展示名称</th>
|
||||||
<th style="width: 30px">默认</th>
|
<th style="width: 30px">默认</th>
|
||||||
<th>组件配置</th>
|
<th>组件配置</th>
|
||||||
<th>附加参数</th>
|
<th>附加参数</th>
|
||||||
@@ -283,7 +290,7 @@
|
|||||||
<td class="icon icon-move">
|
<td class="icon icon-move">
|
||||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||||
</td>
|
</td>
|
||||||
<td v-text="item.name" style="background-color: rgb(235, 235, 228);"></td>
|
<td v-text="dealCol(item.name)" style="background-color: rgb(235, 235, 228);"></td>
|
||||||
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 130px;padding: 0px"></td>
|
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 130px;padding: 0px"></td>
|
||||||
<td style="padding: 1px;text-align: center;">
|
<td style="padding: 1px;text-align: center;">
|
||||||
<label>
|
<label>
|
||||||
@@ -347,7 +354,7 @@
|
|||||||
<td class="icon icon-move">
|
<td class="icon icon-move">
|
||||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||||
</td>
|
</td>
|
||||||
<td v-text="item.col" style="background-color: rgb(235, 235, 228);"></td>
|
<td v-text="dealCol(item.col)" style="background-color: rgb(235, 235, 228);"></td>
|
||||||
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 130px;padding: 0px"></td>
|
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 130px;padding: 0px"></td>
|
||||||
<td style="padding: 1px;">
|
<td style="padding: 1px;">
|
||||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||||
@@ -382,7 +389,7 @@
|
|||||||
<td class="icon icon-move">
|
<td class="icon icon-move">
|
||||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||||
</td>
|
</td>
|
||||||
<td v-text="item.col" style="background-color: rgb(235, 235, 228);"></td>
|
<td v-text="dealCol(item.col)" style="background-color: rgb(235, 235, 228);"></td>
|
||||||
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 100px;padding: 0px"></td>
|
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 100px;padding: 0px"></td>
|
||||||
<td style="padding: 1px;">
|
<td style="padding: 1px;">
|
||||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||||
@@ -439,8 +446,8 @@
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div v-show="serviceInfo.dels.cate == 'UP_FIELD'" class="form-group">
|
<div v-show="serviceInfo.dels.cate == 'UP_FIELD'" class="form-group">
|
||||||
<label class="col-md-2">SQL</label>
|
<label class="col-xs-2">SQL</label>
|
||||||
<div class="col-md-8">
|
<div class="col-xs-8">
|
||||||
<textarea v-model="serviceInfo.dels.sql1" disabled style="width: 100%;" rows="5"></textarea>
|
<textarea v-model="serviceInfo.dels.sql1" disabled style="width: 100%;" rows="5"></textarea>
|
||||||
<!--
|
<!--
|
||||||
<input v-model="serviceInfo.dels.name" class="form-control" id="name" placeholder="请输入Table名称">
|
<input v-model="serviceInfo.dels.name" class="form-control" id="name" placeholder="请输入Table名称">
|
||||||
@@ -449,8 +456,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-show="serviceInfo.dels.cate == 'SQL'" class="form-group">
|
<div v-show="serviceInfo.dels.cate == 'SQL'" class="form-group">
|
||||||
<label class="col-md-2">SQL</label>
|
<label class="col-xs-2">SQL</label>
|
||||||
<div class="col-md-8">
|
<div class="col-xs-8">
|
||||||
<textarea v-model="serviceInfo.dels.sql" style="width: 100%;" rows="5"></textarea>
|
<textarea v-model="serviceInfo.dels.sql" style="width: 100%;" rows="5"></textarea>
|
||||||
<!--
|
<!--
|
||||||
<input v-model="serviceInfo.dels.name" class="form-control" id="name" placeholder="请输入Table名称">
|
<input v-model="serviceInfo.dels.name" class="form-control" id="name" placeholder="请输入Table名称">
|
||||||
@@ -559,7 +566,7 @@
|
|||||||
|
|
||||||
filters: [],//查询配置
|
filters: [],//查询配置
|
||||||
|
|
||||||
status: 0, //页面默认状态 0:默认 3:导出 4:导入 5:列表配置 6:查询配置 detail:详情配置 edit:表单配置 del:删除策略配置
|
status: 5, //页面默认状态 0:默认 3:导出 4:导入 5:列表配置 6:查询配置 detail:详情配置 edit:表单配置 del:删除策略配置
|
||||||
services: [],//业务列表
|
services: [],//业务列表
|
||||||
service: "", //页面选择的业务类型
|
service: "", //页面选择的业务类型
|
||||||
serviceLabel: "",
|
serviceLabel: "",
|
||||||
@@ -709,7 +716,7 @@
|
|||||||
b:for (let j in shows) {
|
b:for (let j in shows) {
|
||||||
if (v[i] == shows[j]['col']) {
|
if (v[i] == shows[j]['col']) {
|
||||||
if (!shows[j]['label']) {
|
if (!shows[j]['label']) {
|
||||||
shows[j]['label'] = this.getFieldLabel(v[i])
|
shows[j]['label'] = this.getFieldLabel(v[i]) || (shows[j]['col']).replace(/\$/g, ".")
|
||||||
}
|
}
|
||||||
if (!shows[j]['inType']) {
|
if (!shows[j]['inType']) {
|
||||||
shows[j]['inType'] = "INPUT"
|
shows[j]['inType'] = "INPUT"
|
||||||
@@ -1089,6 +1096,13 @@
|
|||||||
},
|
},
|
||||||
showInfo() {
|
showInfo() {
|
||||||
$('#f-info').modal({moveable: true})
|
$('#f-info').modal({moveable: true})
|
||||||
|
},
|
||||||
|
dealCol(col) {
|
||||||
|
return col.replace(/\$/g, ".")
|
||||||
|
},
|
||||||
|
dealTableName(item) {
|
||||||
|
let table = this.serviceDetail['tables'][item]
|
||||||
|
return `[${table.alias}] ${table.name} (${table.comment})`
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -132,8 +132,8 @@
|
|||||||
</caption>
|
</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="background-color: #f1f1f1" v-show="sheet && sheet!='表说明' && sheet!='表名称'">
|
<tr style="background-color: #f1f1f1" v-show="sheet && sheet!='表说明' && sheet!='表名称'">
|
||||||
<th>字段名</th>
|
<th>列名</th>
|
||||||
<th>中文名</th>
|
<th>注释</th>
|
||||||
<th>数据类型</th>
|
<th>数据类型</th>
|
||||||
<th>输入类型</th>
|
<th>输入类型</th>
|
||||||
<th>附加属性</th>
|
<th>附加属性</th>
|
||||||
@@ -219,8 +219,8 @@
|
|||||||
</caption>
|
</caption>
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="background-color: #f1f1f1">
|
<tr style="background-color: #f1f1f1">
|
||||||
<th>字段名</th>
|
<th>列名</th>
|
||||||
<th>中文名</th>
|
<th>注释</th>
|
||||||
<th>数据类型</th>
|
<th>数据类型</th>
|
||||||
<!--<th>输入类型</th>
|
<!--<th>输入类型</th>
|
||||||
<th>附加属性</th>
|
<th>附加属性</th>
|
||||||
|
|||||||
@@ -51,25 +51,45 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 实体列表 -->
|
<!-- 实体列表 -->
|
||||||
<div class="col-md-3 col-xs-4">
|
<div class="col-md-4 col-xs-4">
|
||||||
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 实体表(Meta-Table)</div>
|
<div style="padding-left: 10px;background-color: #ccc;width: 100%">
|
||||||
|
实体表(Meta-Table) <input v-model="filter" placeholder="筛选实体" style="margin-top: 5px;">
|
||||||
|
</div>
|
||||||
<ul class="nav nav-tabs nav-stacked tlist" style="height: 100%">
|
<ul class="nav nav-tabs nav-stacked tlist" style="height: 100%">
|
||||||
<li :class="['clearfix',{'active':alias==item.alias}]" v-for="item in tables" >
|
<li :class="['clearfix',{'active':alias==item.alias}]" v-for="item in tables" v-if="dealFilter(item)">
|
||||||
<a @click="alias=item.alias" :title="dealTableLabel(item)" v-text="dealTableLabel(item)" href="javascript:;"></a>
|
<a @click="alias=item.alias" :title="dealTableLabel(item)" data-toggle="tooltip" v-text="dealTableLabel(item)" href="javascript:;"></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-9 col-xs-8">
|
<div class="col-md-8 col-xs-8">
|
||||||
<!-- 实体属性列表 -->
|
<!-- 实体属性列表 -->
|
||||||
<div class="panel" v-show="status!=7 && status!=8">
|
<div class="panel" v-show="status!=7 && status!=8">
|
||||||
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 实体字段信息</div>
|
|
||||||
|
<!-- baseInfo -->
|
||||||
|
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 基本属性</div>
|
||||||
|
<!--<div class="panel-heading">基本属性配置</div>-->
|
||||||
|
<table :class="['table','table-bordered']" style="width: 100%">
|
||||||
|
<tr>
|
||||||
|
<th style="width: 100px">表名</th>
|
||||||
|
<td><span class="label label-outline" title="表别名alias">{{row.alias}}</span> {{row.name}}</td>
|
||||||
|
<th>数据平台</th>
|
||||||
|
<td>{{dealDbPlatName(row)}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>描述</th>
|
||||||
|
<td>{{row.comment}}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div style="padding-left: 10px;background-color: #ccc;width: 100%"> 字段信息</div>
|
||||||
<table :class="[{'table':status!=2},'table-bordered']" style="width: 100%">
|
<table :class="[{'table':status!=2},'table-bordered']" style="width: 100%">
|
||||||
<tr style="background-color: #f1f1f1">
|
<tr style="background-color: #f1f1f1">
|
||||||
<td v-show="status==3 || status==4 || status==5 || status==6"><input type="checkbox"></td>
|
<td v-show="status==3 || status==4 || status==5 || status==6"><input type="checkbox"></td>
|
||||||
<th v-show="status==1"></th>
|
<th v-show="status==1"></th>
|
||||||
<th>字段名</th>
|
<th>列名</th>
|
||||||
<th>中文名</th>
|
<th>注释</th>
|
||||||
<th>数据类型</th>
|
<th>数据类型</th>
|
||||||
<!--
|
<!--
|
||||||
<th>输入类型</th>
|
<th>输入类型</th>
|
||||||
@@ -134,17 +154,19 @@
|
|||||||
<form class="form-horizontal">
|
<form class="form-horizontal">
|
||||||
<input type="hidden" v-model="row.key">
|
<input type="hidden" v-model="row.key">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="name" class="col-md-2">Table名称</label>
|
|
||||||
<div class="col-md-4 col-sm-8">
|
|
||||||
<input v-model="row.name" class="form-control" id="name" placeholder="请输入Table名称">
|
|
||||||
</div>
|
|
||||||
<label for="name" class="col-md-2">表别名</label>
|
<label for="name" class="col-md-2">表别名</label>
|
||||||
<div class="col-md-3 col-sm-2">
|
<div class="col-sm-4">
|
||||||
<input v-model="row.alias" class="form-control" readonly>
|
<input v-model="row.alias" class="form-control" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="comment" class="col-md-2">Table标题</label>
|
<label for="name" class="col-md-2">表名</label>
|
||||||
|
<div class="col-md-4 col-sm-8">
|
||||||
|
<input v-model="row.name" class="form-control" id="name" placeholder="请输入Table名称">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="comment" class="col-md-2">描述</label>
|
||||||
<div class="col-md-4 col-sm-8">
|
<div class="col-md-4 col-sm-8">
|
||||||
<input v-model="row.comment" class="form-control" id="comment" placeholder="请输入 Table标题">
|
<input v-model="row.comment" class="form-control" id="comment" placeholder="请输入 Table标题">
|
||||||
</div>
|
</div>
|
||||||
@@ -152,13 +174,13 @@
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2">数据平台</label>
|
<label class="col-md-2">数据平台</label>
|
||||||
<div class="col-md-4 col-sm-8">
|
<div class="col-sm-2">
|
||||||
<select v-model="row.dbPlatId" class="form-control">
|
<select v-model="row.dbPlatId" class="form-control">
|
||||||
<option></option>
|
<option></option>
|
||||||
<option v-for="item in dbPlats" :value="item.key" v-text="item.name"></option>
|
<option v-for="item in dbPlats" :value="item.key" v-text="item.name"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-sm-2">
|
||||||
<select v-model="row.catalog" class="form-control">
|
<select v-model="row.catalog" class="form-control">
|
||||||
<option></option>
|
<option></option>
|
||||||
<option v-for="item in catalogs()" :value="item" v-text="item"></option>
|
<option v-for="item in catalogs()" :value="item" v-text="item"></option>
|
||||||
@@ -175,7 +197,7 @@
|
|||||||
<p style="padding: 5px">整理中,【实体关系】放到此处维护</p>
|
<p style="padding: 5px">整理中,【实体关系】放到此处维护</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<textarea class="form-control layui-code" v-model="upsql" rows="10" id="content" placeholder="/* 没有提交要执行的查询 */" />
|
<textarea class="form-control layui-code" v-if="upsql" v-model="upsql" rows="10" id="content" placeholder="/* 没有提交要执行的查询 */" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
@@ -215,6 +237,8 @@
|
|||||||
filter: {db: "", catalog: "", name: ""},//tableList 过滤条件
|
filter: {db: "", catalog: "", name: ""},//tableList 过滤条件
|
||||||
|
|
||||||
upsql: "", // 需要执行的 sql语句
|
upsql: "", // 需要执行的 sql语句
|
||||||
|
|
||||||
|
filter: "",
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
metaTable(v) {
|
metaTable(v) {
|
||||||
@@ -266,10 +290,10 @@
|
|||||||
handler: function (row) {
|
handler: function (row) {
|
||||||
//console.log(vm.metaTable.name, " -> ",v.name)
|
//console.log(vm.metaTable.name, " -> ",v.name)
|
||||||
vm.upsql = ''
|
vm.upsql = ''
|
||||||
if (vm.metaTable.name != row.name) {
|
if (vm.metaTable.name !== row.name) {
|
||||||
vm.upsql += 'RENAME TABLE `{0}`.`{1}` TO `{2}`.`{3}`;\n'.format(vm.metaTable.catalog, vm.metaTable.name, vm.metaTable.catalog, row.name)
|
vm.upsql += 'RENAME TABLE `{0}`.`{1}` TO `{2}`.`{3}`;\n'.format(vm.metaTable.catalog, vm.metaTable.name, vm.metaTable.catalog, row.name)
|
||||||
}
|
}
|
||||||
if (vm.metaTable.comment != row.comment) {
|
if (vm.metaTable.comment !== row.comment) {
|
||||||
vm.upsql += 'ALTER TABLE `{0}`.`{1}` COMMENT=\'{2}\';\n'.format(vm.metaTable.catalog, vm.metaTable.name, row.comment)
|
vm.upsql += 'ALTER TABLE `{0}`.`{1}` COMMENT=\'{2}\';\n'.format(vm.metaTable.catalog, vm.metaTable.name, row.comment)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -452,6 +476,14 @@
|
|||||||
// (${table.linkCount})
|
// (${table.linkCount})
|
||||||
return `${table.name} [${table.comment}]`
|
return `${table.name} [${table.comment}]`
|
||||||
},
|
},
|
||||||
|
dealFilter(table) {
|
||||||
|
// table.name 中是否包含 thiss.filter 的值
|
||||||
|
if (table.name.indexOf(this.filter) > -1 || table.comment.indexOf(this.filter) > -1) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
getFieldLabel (col) {
|
getFieldLabel (col) {
|
||||||
if (!col) {
|
if (!col) {
|
||||||
return "";
|
return "";
|
||||||
@@ -470,6 +502,16 @@
|
|||||||
},
|
},
|
||||||
buildSql() {
|
buildSql() {
|
||||||
|
|
||||||
|
},
|
||||||
|
dealDbPlatName(row) {
|
||||||
|
let name = ""
|
||||||
|
this.dbPlats.forEach(function (item) {
|
||||||
|
if (item.key == row.dbPlatId) {
|
||||||
|
name = item.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
name += "." + row.catalog
|
||||||
|
return name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function (){
|
mounted: function (){
|
||||||
@@ -478,11 +520,13 @@
|
|||||||
})
|
})
|
||||||
this.tableList();
|
this.tableList();
|
||||||
|
|
||||||
/*setTimeout(function () {
|
setTimeout(function () {
|
||||||
layui.use('code', function(){ //加载code模块
|
/*layui.use('code', function(){ //加载code模块
|
||||||
layui.code({title:"",about: false, height: "500"}); //引用code方法
|
layui.code({title:"",about: false, height: "500"}); //引用code方法
|
||||||
});
|
});*/
|
||||||
}, 300)*/
|
// 手动初始化工具提示
|
||||||
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
}, 300)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -167,6 +167,11 @@ th{
|
|||||||
}
|
}
|
||||||
.tlist>li{
|
.tlist>li{
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
/*设置不换行*/
|
||||||
|
white-space: nowrap;
|
||||||
|
/*设置高度*/
|
||||||
|
/*height: 30px;
|
||||||
|
padding: 0;*/
|
||||||
}
|
}
|
||||||
.tlist>li.active>a,
|
.tlist>li.active>a,
|
||||||
.tlist>li.active>a:focus,
|
.tlist>li.active>a:focus,
|
||||||
@@ -174,6 +179,7 @@ th{
|
|||||||
.tlist>li>a:hover {
|
.tlist>li>a:hover {
|
||||||
background-color: #e2effc;
|
background-color: #e2effc;
|
||||||
border-radius: 2px 0 0 2px;
|
border-radius: 2px 0 0 2px;
|
||||||
|
border-left: 5px solid #a5cff8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 为可拖动的条目应用可移动光标类型 */
|
/* 为可拖动的条目应用可移动光标类型 */
|
||||||
|
|||||||
Reference in New Issue
Block a user