Commit dc41b1a8 by yuwei

2.0.0项目初始化

parent 206774fe
......@@ -139,6 +139,16 @@
</el-table-column>
<el-table-column prop="colComment" label="列注释" align="center" show-overflow-tooltip >
</el-table-column>
<el-table-column prop="reqable" label="是否作为请求参数" align="center" width="50" >
<template slot-scope="scope">
<el-checkbox v-model="scope.row.reqable"></el-checkbox>
</template>
</el-table-column>
<el-table-column prop="resable" label="是否作为返回参数" align="center" width="50" >
<template slot-scope="scope">
<el-checkbox v-model="scope.row.resable"></el-checkbox>
</template>
</el-table-column>
</el-table>
</el-form-item>
<el-row v-if="form2.configType === '2'">
......@@ -328,6 +338,28 @@ export default {
} else if (this.active === 2) {
this.$refs['form2'].validate(valid => {
if (valid) {
if (this.form2.configType && this.form2.configType === '1') {
this.form3.reqParams = this.fieldParamList.filter(item => item.reqable).map(function (item) {
let json = {}
json.paramName = item.colName
json.nullable = false
json.remark = item.colComment
json.paramType = undefined
json.whereType = undefined
json.exampleValue = undefined
json.defaultValue = undefined
return json
})
this.form3.resParams = this.fieldParamList.filter(item => item.resable).map(function (item) {
let json = {}
json.fieldName = item.colName
json.remark = item.colComment
json.dataType = item.dataType
json.exampleValue = undefined
return json
})
console.log(this.form3)
}
this.active++
}
})
......@@ -341,7 +373,7 @@ export default {
this.form2.sqlText = val
},
configTypeSelectChanged (val) {
if (this.form2.configType === '1' && this.form2.sourceId && this.dbTableOptions.length <= 0) {
if (this.form2.configType === '1' && this.form2.sourceId && this.tableNameOptions.length <= 0) {
getDbTables(this.form2.sourceId).then(response => {
if (response.success) {
this.tableNameOptions = response.data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment