1、实体导入,已存在表支持重复导入,重复导入将更新原来的表结构
2、加入表单验证配置
This commit is contained in:
@@ -1,3 +1,26 @@
|
||||
<style>
|
||||
/* 自定义下拉菜单外观 */
|
||||
.dropdown-menu-table {
|
||||
padding: 0;
|
||||
border: none;
|
||||
}
|
||||
.dropdown-menu-table .table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.dropdown-menu-table .table td {
|
||||
padding: 0;
|
||||
}
|
||||
.dropdown-menu-table .table a {
|
||||
padding: 8px;
|
||||
display: block;
|
||||
}
|
||||
/*.dropdown-menu-table .table a:hover,
|
||||
.dropdown-menu-table .table a:active,
|
||||
.dropdown-menu-table .table a:focus {
|
||||
background-color: #e5e5e5;
|
||||
text-decoration: none;
|
||||
}*/
|
||||
</style>
|
||||
<row class="meta-service">
|
||||
<div class="col-md-12">
|
||||
<div class="info" style="padding-left: 10px">
|
||||
@@ -287,6 +310,7 @@
|
||||
<th>展示名称</th>
|
||||
<th>表单组件</th>
|
||||
<th>数据格式化</th>
|
||||
<th>表单校验</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -295,7 +319,7 @@
|
||||
<input type="hidden" name="item" :value="JSON.stringify(item)">
|
||||
</td>
|
||||
<td v-text="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: 100px;padding: 0px"></td>
|
||||
<td style="padding: 1px;">
|
||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||
<option></option>
|
||||
@@ -305,6 +329,27 @@
|
||||
<td style="padding: 1px;">
|
||||
<input v-model="item.fmt" class="form-control" style="width: 130px;padding: 0px">
|
||||
</td>
|
||||
<td style="padding: 1px;overflow: inherit;">
|
||||
<div class="dropdown dropdown-hover">
|
||||
<button class="btn" type="button" data-toggle="dropdown">选择校验规则 <span class="caret"></span></button>
|
||||
<div class="dropdown-menu dropdown-menu-table">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>规则</th>
|
||||
<th>选择</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="c in ckTypes">
|
||||
<td v-text="c.label"></td>
|
||||
<td><input type="checkbox" v-model="item.cks" :value="c.name"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -324,7 +369,7 @@
|
||||
<input type="radio" v-model="serviceInfo.dels.cate" value="SQL"> 策略一(执行完整SQL)
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input disabled type="radio" v-model="serviceInfo.dels.cate" value="QTASK"> 策略二(执行QTask)
|
||||
<input disabled type="radio" v-model="serviceInfo.dels.cate" value="QTASK"> 策略二(执行QTask:开发中)
|
||||
</label>
|
||||
<br>
|
||||
<br>
|
||||
@@ -410,6 +455,7 @@
|
||||
sheet: "a",//别名
|
||||
|
||||
inTypes: ["INPUT", "DICT", "INPUT_DAY", "INPUT_TIME", "FUNC", "QTASK", "HIDDEN"],
|
||||
ckTypes: [{label:"必填", name: "NOTNULL"},{label:"IP", name: "IP"},{label:"IPv4", name: "IPv4"},{label:"电话号码", name: "phone"}],
|
||||
dataTypes: ["bigint(20)", "varchar(255)", "varchar(64)", "varchar(32)", "varchar(16)", "int(11)", "int(3)", "int(2)", "datetime"],
|
||||
filterCate: ["EQUAL", "NOTEQUAL", "LIKE", "IN"],
|
||||
serviceInfo: {
|
||||
@@ -710,7 +756,7 @@
|
||||
// 新的
|
||||
let label = this.getFieldLabel(v[i])
|
||||
let fmt = this.getFiledInExt(v[i]) || ""
|
||||
edits.push({col: v[i], label: label, fmt: fmt})
|
||||
edits.push({col: v[i], label: label, fmt: fmt, cks:[]})
|
||||
}
|
||||
|
||||
//去除删除的
|
||||
@@ -731,6 +777,14 @@
|
||||
loadInfo(name) {
|
||||
getServiceInfo({name}, (json) => {
|
||||
json.dels = json.dels || {cate:"", sql1:"", sql:"", qtask:""}
|
||||
json.edits = json.edits || []
|
||||
|
||||
for (let i in json.edits) {
|
||||
if (!json.edits[i].cks) {
|
||||
json.edits[i].cks = []
|
||||
}
|
||||
}
|
||||
|
||||
this.serviceInfo = json;
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user