优化:1、meta 业务配置页面,其他界面改善
2、元数据记录到内存缺少id的处理
3、设置platid为不可修改字段
This commit is contained in:
@@ -22,87 +22,12 @@
|
||||
}*/
|
||||
</style>
|
||||
<row class="meta-service">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12 pull-left" style="margin-bottom: 5px">
|
||||
<h3>业务管理</h3>
|
||||
</div>
|
||||
|
||||
<div class="info" style="padding-left: 10px">
|
||||
<a @click="showInfo()" href="javascript:;"><i class="icon icon-info"></i></a>
|
||||
</div>
|
||||
<!-- info -->
|
||||
<div class="modal fade" id="f-info">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
|
||||
<h4 class="modal-title">功能介绍</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align: left">
|
||||
<div style="text-align: left">
|
||||
<p>
|
||||
<b>如何创建一个业务?</b><br><!-- <span style="color: #f1a325;font-size: 25px">so easy</span> -->
|
||||
1、选择业务主表、填写名称、标识码<br>
|
||||
2、保存<br>
|
||||
3、业务维护(常规业务维护:列表,查询配置,导出配置,修改基本信息, 以及未开发的:详情配置,表单配置)<br>
|
||||
</p>
|
||||
<p>
|
||||
<b>选择主表的意义,关联表信息业务中如何控制?</b><br>
|
||||
业务主表选择某个表,也即当前业务主要围绕这个实体表进行;<br>
|
||||
对于关联表,只需要在MetaLink中建立关联即可,此处选择了业务主表后会自动查询所有已经关联关联的业务表,<br>
|
||||
然后便可以轻松配置 列表要展示,导出哪些字段,查询过滤条件用哪些表的哪些字段,等等。。
|
||||
</p>
|
||||
<b>MetaService概念模型</b>
|
||||
<img src="../res/img/MetaService.png">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!--<p>数据存贮结构如下:</p>
|
||||
<img src="../res/img/meta_service.png">-->
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
<div class="input-group pull-right">
|
||||
<div class="pull-left">
|
||||
<button @click="createService({})" class="btn btn-primary" type="button"> 新建业务</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-3">
|
||||
<button @click="createService({})" class="btn btn-primary" type="button"> 新建业务</button>
|
||||
<hr>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>业务KEY</th>
|
||||
<th>业务名称</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
<tr v-for="item in services" @click="service=item.name;serviceLabel=item.comment;">
|
||||
<td>{{item.name}}</td>
|
||||
<td>{{item.comment}}</td>
|
||||
<td>
|
||||
<a @click="createService(item)" href="javascript:">编辑</a>
|
||||
<!--<a href="javascript:">删除</a>-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- 实体字段信息 -->
|
||||
<!--<div class="col-xs-4" style="padding-left: 0px;">
|
||||
|
||||
</div>-->
|
||||
|
||||
<div class="col-xs-9" style="padding-left: 0px;padding-right: 0px;">
|
||||
<div class="input-group list-head pull-right">
|
||||
|
||||
<div class="pull-left"></div>
|
||||
|
||||
<!--<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button">选择业务类型</button>
|
||||
</span>
|
||||
@@ -156,8 +81,115 @@
|
||||
<button @click="save()" :class="['btn',{'btn-primary':status!=0},{'disabled':status==0}]" type="button"> 保存</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<hr>
|
||||
|
||||
<!--<div class="pull-leftx">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="icon icon-filter"></i> 过滤 <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-table">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>
|
||||
<a href="javascript:;">
|
||||
<input type="checkbox" checked>
|
||||
<label>业务名称</label>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="javascript:;">
|
||||
<input type="checkbox" checked>
|
||||
<label>标识码</label>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="javascript:;">
|
||||
<input type="checkbox" checked>
|
||||
<label>状态</label>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ul>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
|
||||
<div class="info" style="padding-left: 10px">
|
||||
<a @click="showInfo()" href="javascript:;"><i class="icon icon-info"></i></a>
|
||||
</div>
|
||||
<!-- info -->
|
||||
<div class="modal fade" id="f-info">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
|
||||
<h4 class="modal-title">功能介绍</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="text-align: left">
|
||||
<div style="text-align: left">
|
||||
<p>
|
||||
<b>如何创建一个业务?</b><br><!-- <span style="color: #f1a325;font-size: 25px">so easy</span> -->
|
||||
1、选择业务主表、填写名称、标识码<br>
|
||||
2、保存<br>
|
||||
3、业务维护(常规业务维护:列表,查询配置,导出配置,修改基本信息, 以及未开发的:详情配置,表单配置)<br>
|
||||
</p>
|
||||
<p>
|
||||
<b>选择主表的意义,关联表信息业务中如何控制?</b><br>
|
||||
业务主表选择某个表,也即当前业务主要围绕这个实体表进行;<br>
|
||||
对于关联表,只需要在MetaLink中建立关联即可,此处选择了业务主表后会自动查询所有已经关联关联的业务表,<br>
|
||||
然后便可以轻松配置 列表要展示,导出哪些字段,查询过滤条件用哪些表的哪些字段,等等。。
|
||||
</p>
|
||||
<b>MetaService概念模型</b>
|
||||
<img src="../res/img/MetaService.png">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!--<p>数据存贮结构如下:</p>
|
||||
<img src="../res/img/meta_service.png">-->
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-3">
|
||||
<div class="base-info"> 业务列表</div>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>业务KEY</th>
|
||||
<th>业务名称</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
<tr v-for="item in services" @click="service=item.name;serviceLabel=item.comment;">
|
||||
<td>
|
||||
<i class="icon icon-ok" v-if="item.name==service" style="color: #7f74c4"></i>
|
||||
{{item.name}}
|
||||
</td>
|
||||
<td>{{item.comment}}</td>
|
||||
<td>
|
||||
<a @click="createService(item)" href="javascript:">编辑</a>
|
||||
<!--<a href="javascript:">删除</a>-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- 实体字段信息 -->
|
||||
<!--<div class="col-xs-4" style="padding-left: 0px;">
|
||||
|
||||
</div>-->
|
||||
|
||||
<div class="col-xs-9" style="padding-left: 0px;padding-right: 0px;">
|
||||
<div class="col-xs-4">
|
||||
<div class="base-info"> 业务相关表</div>
|
||||
<!--<ul class="nav nav-tabs nav-stacked tlist">
|
||||
@@ -166,11 +198,15 @@
|
||||
</li>
|
||||
</ul>-->
|
||||
|
||||
<div class="btn-group" style="margin: 5px 0">
|
||||
<!--<div class="btn-group" style="margin: 5px 0">
|
||||
<a class="btn btn-default" @click="sheet=item" v-for="item in sheetArr" v-text="dealTableName(item)"> </a>
|
||||
</div>-->
|
||||
<!-- 业务相关表使用 radios 做选择 -->
|
||||
<div v-for="item in sheetArr" @click="sheet=item" style="cursor:pointer; padding: 0 3px">
|
||||
<input type="radio" :name="item" :value="item" v-model="sheet">
|
||||
<a v-text="dealTableName(item)" style="text-decoration: none"></a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="base-info">字段信息</div>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
@@ -216,26 +252,25 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item, index) in serviceInfo.shows">
|
||||
<td class="icon icon-move">
|
||||
<td :class="['icon','icon-move',{'color-x': colorX(item)}]">
|
||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||
</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;">
|
||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||
<td v-text="dealCol(item.col)"></td>
|
||||
<td><input v-model="item.label" class="form-control" ></td>
|
||||
<td>
|
||||
<select v-model="item.inType" class="form-control" >
|
||||
<option v-for="x in inTypes" :value="x">{{x}}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td style="padding: 1px;" title="格式化类型为:funs或qtask的时候需要填写附加参数">
|
||||
<input v-show="item.inType == 'FUNC' || item.inType == 'QTASK' || item.inType == 'INPUT_FUNC'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||
<input disabled v-show="item.inType != 'FUNC' && item.inType != 'INPUT_FUNC' && item.inType != 'QTASK' && item.inType != 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||
<select v-show="item.inType == 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px">
|
||||
<option></option>
|
||||
<td title="格式化类型为:funs或qtask的时候需要填写附加参数">
|
||||
<input v-show="item.inType == 'FUNC' || item.inType == 'QTASK' || item.inType == 'INPUT_FUNC'" v-model="item.inExt" class="form-control">
|
||||
<input disabled v-show="item.inType != 'FUNC' && item.inType != 'INPUT_FUNC' && item.inType != 'QTASK' && item.inType != 'DICT'" v-model="item.inExt" class="form-control">
|
||||
<select v-show="item.inType == 'DICT'" v-model="item.inExt" class="form-control">
|
||||
<option v-for="x in dictType" :value="x.value">{{x.label}}</option>
|
||||
</select>
|
||||
</td>
|
||||
<!--
|
||||
<td style="padding: 1px;"><input v-model="item.fmt" class="form-control" style="width: 130px;padding: 0px"></td>
|
||||
<td><input v-model="item.fmt" class="form-control" style="width: 130px;padding: 0px"></td>
|
||||
-->
|
||||
</tr>
|
||||
</table>
|
||||
@@ -255,17 +290,17 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="item in serviceInfo.exports">
|
||||
<td class="icon icon-move">
|
||||
<td :class="['icon','icon-move',{'color-x': colorX(item)}]">
|
||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||
</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;">
|
||||
<td><input v-model="item.label" class="form-control" style="padding: 0px"></td>
|
||||
<td>
|
||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||
<option v-for="x in exportFmtTypes" :value="x">{{x}}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td style="padding: 1px;" title="格式化类型为:funs或qtask的时候需要填写附加参数">
|
||||
<td title="格式化类型为:funs或qtask的时候需要填写附加参数">
|
||||
<input v-show="item.inType == 'FUNC' || item.inType == 'QTASK' || item.inType == 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||
<input disabled v-show="item.inType != 'FUNC' && item.inType != 'QTASK' && item.inType != 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||
</td>
|
||||
@@ -310,31 +345,29 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="width: 30px">数据字段</th>
|
||||
<th style="width: 30px">展示名称</th>
|
||||
<th>展示名称</th>
|
||||
<th style="width: 30px">默认</th>
|
||||
<th>组件配置</th>
|
||||
<th>附加参数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="item in serviceInfo.filters">
|
||||
<td class="icon icon-move">
|
||||
<td :class="['icon','icon-move',{'color-x': colorX(item)}]">
|
||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||
</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;text-align: center;">
|
||||
<label>
|
||||
<input type="checkbox" v-model="item.checked" value="1">
|
||||
</label>
|
||||
<td v-text="dealCol(item.name)"></td>
|
||||
<td><input v-model="item.label" class="form-control"></td>
|
||||
<td style="text-align: center">
|
||||
<input type="checkbox" v-model="item.checked" value="1">
|
||||
</td>
|
||||
<td style="padding: 1px;overflow: inherit;">
|
||||
<td style="overflow: inherit;">
|
||||
<select v-model="item.inType" class="form-control">
|
||||
<option v-for="x in findTypes" :value="x">{{x}}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td style="padding: 1px;">
|
||||
<input v-show="item.inType == 'DICT' || item.inType == 'CHECKBOX' || item.inType == 'REDIO'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||
<input disabled v-show="!(item.inType == 'DICT' || item.inType == 'CHECKBOX' || item.inType == 'REDIO')" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||
<td>
|
||||
<input v-show="item.inType == 'DICT' || item.inType == 'CHECKBOX' || item.inType == 'REDIO'" v-model="item.inExt" class="form-control">
|
||||
<input disabled v-show="!(item.inType == 'DICT' || item.inType == 'CHECKBOX' || item.inType == 'REDIO')" v-model="item.inExt" class="form-control">
|
||||
</td>
|
||||
<!--
|
||||
<td style="padding: 1px;overflow: inherit;">
|
||||
@@ -381,19 +414,19 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in serviceInfo.details">
|
||||
<td class="icon icon-move">
|
||||
<td :class="['icon','icon-move',{'color-x': colorX(item)}]">
|
||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||
</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;">
|
||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||
<td v-text="dealCol(item.col)"></td>
|
||||
<td><input v-model="item.label" class="form-control"></td>
|
||||
<td>
|
||||
<select v-model="item.inType" class="form-control">
|
||||
<option v-for="x in inTypes" :value="x">{{x}}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td style="padding: 1px;" title="格式化类型为:funs或qtask的时候需要填写附加参数">
|
||||
<input v-show="item.inType == 'FUNC' || item.inType == 'QTASK' || item.inType == 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||
<input disabled v-show="item.inType != 'FUNC' && item.inType != 'QTASK' && item.inType != 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||
<td title="格式化类型为:funs或qtask的时候需要填写附加参数">
|
||||
<input v-show="item.inType == 'FUNC' || item.inType == 'QTASK' || item.inType == 'DICT'" v-model="item.inExt" class="form-control">
|
||||
<input disabled v-show="item.inType != 'FUNC' && item.inType != 'QTASK' && item.inType != 'DICT'" v-model="item.inExt" class="form-control">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -416,19 +449,19 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in serviceInfo.edits">
|
||||
<td class="icon icon-move">
|
||||
<td :class="['icon','icon-move',{'color-x': colorX(item)}]">
|
||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||
</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;">
|
||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||
<td v-text="dealCol(item.col)"></td>
|
||||
<td><input v-model="item.label" class="form-control"></td>
|
||||
<td>
|
||||
<select v-model="item.inType" class="form-control">
|
||||
<option v-for="x in inTypes" :value="x">{{x}}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td style="padding: 1px;" title="格式化类型为:funs或qtask的时候需要填写附加参数">
|
||||
<input v-show="item.inType == 'FUNC' || item.inType == 'QTASK' || item.inType == 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||
<input disabled v-show="item.inType != 'FUNC' && item.inType != 'QTASK' && item.inType != 'DICT'" v-model="item.inExt" class="form-control" style="width: 130px;padding: 0px">
|
||||
<td title="格式化类型为:funs或qtask的时候需要填写附加参数">
|
||||
<input v-show="item.inType == 'FUNC' || item.inType == 'QTASK' || item.inType == 'DICT'" v-model="item.inExt" class="form-control">
|
||||
<input disabled v-show="item.inType != 'FUNC' && item.inType != 'QTASK' && item.inType != 'DICT'" v-model="item.inExt" class="form-control">
|
||||
</td>
|
||||
<td style="padding: 1px;overflow: inherit;">
|
||||
<div class="dropdown dropdown-hover">
|
||||
@@ -1134,6 +1167,20 @@
|
||||
dealTableName(item) {
|
||||
let table = this.serviceDetail['tables'][item]
|
||||
return `[${table.alias}] ${table.tablename} (${table.comment})`
|
||||
},
|
||||
colorX(item) {
|
||||
// {col :"rl$transaction_price"}, 截取出 rl
|
||||
if (item.col) {
|
||||
let col = item.col.split("$")[0]
|
||||
return col === this.sheet
|
||||
}
|
||||
|
||||
if (item.name) {
|
||||
let col = item.name.split("$")[0]
|
||||
return col === this.sheet
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user