.
This commit is contained in:
@@ -88,13 +88,13 @@
|
||||
sysPlats: red.getData('sysPlats'),
|
||||
pages: [
|
||||
/*{name: "DDL", url: "/qtask/ddl.html"},*/
|
||||
{name: "MetaData", url: "/meta", nodes: [
|
||||
{name: "元服务", url: "/meta", nodes: [
|
||||
/*{url:"/metadata/metatable/list.html", name:"TableList"},*/
|
||||
{url:"/metadata/metatable/metaTable.html", name:"MetaTable", icon: "icon-table"},
|
||||
{url:"/metadata/metatable/import.html", name:"导入实体"},
|
||||
{url:"/metadata/metaLink.html", name:"MetaLink"},
|
||||
{url:"/metadata/metaService.html", name:"MetaService", icon:"icon-usecase"},
|
||||
{url:"/metadata/dataList.html", name:"数据查询", icon:"icon-bug"},
|
||||
{url:"/metadata/metatable/metaTable.html", name:"实体管理", icon: "icon-table"},
|
||||
/*{url:"/metadata/metatable/import.html", name:"导入实体"},*/
|
||||
{url:"/metadata/metaLink.html", name:"实体关系"},
|
||||
{url:"/metadata/metaService.html", name:"业务管理", icon:"icon-usecase"},
|
||||
{url:"/metadata/dataList.html", name:"业务预览", icon:"icon-bug"},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,42 +1,36 @@
|
||||
<style>
|
||||
/* todo 提取样式 */
|
||||
.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-list">
|
||||
<div class="col-md-12" style="padding-top: 10px;">
|
||||
<div class="input-group list-head">
|
||||
<div class="pull-left">
|
||||
<span class="input-group-btn">
|
||||
<button @click="loadImportPage()" :class="['btn']" type="button"> 导入实体</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">选择Table{{status}}</button>
|
||||
</span>
|
||||
<select class="form-control" v-model="metaTable" style="width: 180px;">
|
||||
<option v-for="item in tables" :value="item"> {{item.name}} [{{item.comment}}]</option>
|
||||
</select>
|
||||
|
||||
<span class="input-group-btn pull-left" style="padding-left: 20px">
|
||||
<button @click="loadImportPage()" :class="['btn']" type="button"> 导入实体</button>
|
||||
<span class="input-group-btn" style="padding-left: 5px">
|
||||
<button @click="status=8" :class="['btn',{'btn-primary':status==8}]" type="button"> 实体关系(MetaLink)</button>
|
||||
</span>
|
||||
|
||||
<span class="input-group-btn">
|
||||
<span class="input-group-btn" style="padding-left: 5px">
|
||||
<button @click="status=2" :class="['btn',{'btn-primary':status==2}]" type="button"> 字段编辑</button>
|
||||
</span>
|
||||
<span class="input-group-btn">
|
||||
<button @click="status=1" :class="['btn',{'btn-primary':status==1}]" type="button"> 排序</button>
|
||||
</span>
|
||||
|
||||
<!--<span class="input-group-btn" style="padding-left: 20px">
|
||||
<button @click="status=5" :class="['btn',{'btn-primary':status==5}]" type="button"> 列表配置</button>
|
||||
</span>
|
||||
<span class="input-group-btn">
|
||||
<button @click="status=6" :class="['btn',{'btn-primary':status==6}]" type="button"> 查询配置</button>
|
||||
</span>
|
||||
|
||||
<span class="input-group-btn" style="padding-left: 20px">
|
||||
<button @click="status=3" :class="['btn',{'btn-primary':status==3}]" type="button"> 导出配置</button>
|
||||
</span>
|
||||
<span class="input-group-btn">
|
||||
<button @click="status=4" :class="['btn',{'btn-primary':status==4}]" type="button"> 导入配置</button>
|
||||
</span>-->
|
||||
|
||||
<span class="input-group-btn" style="padding-left: 20px">
|
||||
<button @click="status=7;" :class="['btn',{'btn-primary':status==7}]" type="button"> 基本属性</button>
|
||||
</span>
|
||||
@@ -48,7 +42,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7">
|
||||
<!-- 实体列表 -->
|
||||
<div class="col-md-2">
|
||||
<ul class="nav nav-tabs nav-stacked tlist" style="height: 100%">
|
||||
<li :class="['clearfix',{'active':alias==item.alias}]" v-for="item in tables" >
|
||||
<a @click="alias=item.alias" :title="dealTableLabel(item)" v-text="dealTableLabel(item)" href="javascript:;"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 实体表信息 -->
|
||||
<div class="col-md-5">
|
||||
<table :class="[{'table':status!=2},'table-bordered']" style="width: 100%">
|
||||
<tr style="background-color: #f1f1f1">
|
||||
<td v-show="status==3 || status==4 || status==5 || status==6"><input type="checkbox"></td>
|
||||
@@ -61,10 +65,6 @@
|
||||
<th>备注</th>
|
||||
</tr>
|
||||
<tr v-for="(item, index) in meta.items" class="item">
|
||||
<td v-show="status==3"><input type="checkbox" v-model="meta.exports" :value="item.name" class="form-control"></td>
|
||||
<td v-show="status==4"><input type="checkbox" v-model="meta.imports" :value="item.name" class="form-control"></td>
|
||||
<td v-show="status==5"><input type="checkbox" v-model="meta.shows" :value="item.name" class="form-control"></td>
|
||||
<td v-show="status==6"><input type="checkbox" v-model="filterArr" :value="item.name" class="form-control"></td>
|
||||
<td v-show="status==1" class="icon icon-move"></td>
|
||||
<td v-show="status!=2" v-text="item.name" style="background-color: rgb(235, 235, 228);"></td>
|
||||
<td v-show="status!=2" v-text="item.label"></td>
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
<td v-show="status==2">
|
||||
<input v-model="item" type="hidden">
|
||||
<input :value="item.name" disabled class="form-control">
|
||||
<input :value="item.name" class="form-control">
|
||||
<input v-model="item.name" type="hidden">
|
||||
<input name="name" type="hidden" :value="item.name">
|
||||
</td>
|
||||
@@ -93,156 +93,10 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5" v-show="false">
|
||||
<table class="table-bordered table-auto">
|
||||
<thead>
|
||||
<tr style="background-color: #f1f1f1">
|
||||
<th></th>
|
||||
<th>字段名</th>
|
||||
<th>中文名</th>
|
||||
<th>展示名</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in meta.items">
|
||||
<td v-show="status!=2" class="icon icon-move"></td>
|
||||
<td v-show="status!=2" v-text="item.name" style="background-color: rgb(235, 235, 228);"></td>
|
||||
<td v-show="status!=2" v-text="item.label"></td>
|
||||
<td v-show="status!=2"><input v-model="item.label" style="width: 100px;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-md-5" v-show="status==5">
|
||||
<div class="panel">
|
||||
<div class="panel-heading">列表展示的属性</div>
|
||||
<div id="show" class="panel-body">
|
||||
<table class="table-bordered table-auto" style="width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f1f1f1">
|
||||
<th></th>
|
||||
<th>字段名</th>
|
||||
<th>中文名</th>
|
||||
<!--<th>支持排序</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in meta.shows">
|
||||
<td class="icon icon-move">
|
||||
<input name="name" :value="item" type="hidden">
|
||||
</td>
|
||||
<td v-text="item" style="background-color: rgb(235, 235, 228);"></td>
|
||||
<td v-text="">{{getFieldLabel(item)}}</td>
|
||||
<td v-show="false"><input v-model="item.label" style="width: 100px;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
|
||||
<!-- exports -->
|
||||
<div class="col-md-5" v-show="status==3">
|
||||
<div class="panel">
|
||||
<div class="panel-heading">导出的属性配置</div>
|
||||
<div id="export" class="panel-body">
|
||||
<table class="table-bordered table-auto" style="width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f1f1f1">
|
||||
<th></th>
|
||||
<th>字段名</th>
|
||||
<th>中文名</th>
|
||||
<!--<th>展示名</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in meta.exports">
|
||||
<td class="icon icon-move">
|
||||
<input name="name" :value="item" type="hidden">
|
||||
</td>
|
||||
<td v-text="item" style="background-color: rgb(235, 235, 228);"></td>
|
||||
<td v-text="">{{getFieldLabel(item)}}</td>
|
||||
<td v-show="false"><input v-model="item.label" style="width: 100px;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- imports -->
|
||||
<div class="col-md-5" v-show="status==4">
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
导入的属性配置
|
||||
</div>
|
||||
<div id="import" class="panel-body" style="/*padding-top: 10px;*/overflow:auto;">
|
||||
<table class="table-bordered table-auto" style="width: 100%;height: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f1f1f1">
|
||||
<th></th>
|
||||
<th>字段名</th>
|
||||
<th>中文名</th>
|
||||
<!--<th>展示名</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in meta.imports">
|
||||
<td class="icon icon-move">
|
||||
<input name="name" :value="item" type="hidden">
|
||||
</td>
|
||||
<td v-text="item" style="background-color: rgb(235, 235, 228);"></td>
|
||||
<td v-text="">{{getFieldLabel(item)}}</td>
|
||||
<td v-show="false"><input v-model="item.label" style="width: 100px;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- filters -->
|
||||
<div class="col-md-5" v-show="status==6">
|
||||
<div class="panel">
|
||||
<div class="panel-heading">查询配置</div>
|
||||
<div id="filter" class="panel-body" style="overflow:auto;">
|
||||
<table class="table-bordered table-auto" style="width: 100%">
|
||||
<thead>
|
||||
<tr style="background-color: #f1f1f1">
|
||||
<th></th>
|
||||
<th style="width: 30px">字段名</th>
|
||||
<th style="width: 30px">中文名</th>
|
||||
<th style="width: 30px">默认展示</th>
|
||||
<th>支持查询类型</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in filters">
|
||||
<td class="icon icon-move">
|
||||
<input name="name" :value="item.name" type="hidden">
|
||||
</td>
|
||||
<td v-text="item.name" style="background-color: rgb(235, 235, 228);"></td>
|
||||
<td v-text="">{{getFieldLabel(item.name)}}</td>
|
||||
<td>
|
||||
<label>
|
||||
<input type="checkbox" v-model="item.checked" value="1"> 展示
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<label class="checkbox-inline" v-for="c in filterCate">
|
||||
<input type="checkbox" v-model="item.filterType" :value="c"> {{c}}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- dbPlat -->
|
||||
<div class="col-lg-5" v-show="status==7">
|
||||
<div class="panel">
|
||||
<!-- baseInfo -->
|
||||
<div class="panel" v-show="status==7">
|
||||
<div class="panel-heading">基本属性配置</div>
|
||||
<div class="panel-body" style="overflow:auto;">
|
||||
<form class="form-horizontal">
|
||||
@@ -299,10 +153,6 @@
|
||||
tables: [],//所有的业务类型,【测试用】
|
||||
meta: {
|
||||
items: [],
|
||||
shows: [],
|
||||
exports: [],
|
||||
imports: [],
|
||||
filters: [{name:"", filterType:[""]}]
|
||||
},//完整的元数据数据,
|
||||
move: false,
|
||||
status: 7, //页面默认状态
|
||||
@@ -318,9 +168,6 @@
|
||||
dbPlats:[],
|
||||
row: {key: "", platId: "", dbPlatId:"", catalog: "", name:"", comment:"", alias: ""},
|
||||
filter: {db: "", catalog: "", name: ""},//tableList 过滤条件
|
||||
|
||||
filters:[],//查询配置
|
||||
filterArr:[]
|
||||
},
|
||||
watch: {
|
||||
metaTable(v) {
|
||||
@@ -554,6 +401,9 @@
|
||||
red.showMsg();
|
||||
}
|
||||
},
|
||||
dealTableLabel(table) {
|
||||
return `${table.name} [${table.comment}] (${table.linkCount})`
|
||||
},
|
||||
getFieldLabel: function (col) {
|
||||
if (!col) {
|
||||
return "";
|
||||
|
||||
@@ -109,10 +109,6 @@ body {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.meta-list .col-md-5 .panel-body {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
table td,th{
|
||||
white-space:nowrap;
|
||||
overflow:hidden;
|
||||
|
||||
Reference in New Issue
Block a user