|
@@ -65,7 +65,7 @@
|
|
<el-table-column label="缺省值" min-width="10%" align="center" prop="defaultValue" />
|
|
<el-table-column label="缺省值" min-width="10%" align="center" prop="defaultValue" />
|
|
<el-table-column label="外键" min-width="10%" align="center" prop="foreignKey">
|
|
<el-table-column label="外键" min-width="10%" align="center" prop="foreignKey">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <div>
|
|
|
|
|
|
+ <div>
|
|
{{scope.row.foreignKeyName}}
|
|
{{scope.row.foreignKeyName}}
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -87,6 +87,7 @@
|
|
<el-option label="图片上传" value="imageUpload" />
|
|
<el-option label="图片上传" value="imageUpload" />
|
|
<el-option label="文件上传" value="fileUpload" />
|
|
<el-option label="文件上传" value="fileUpload" />
|
|
<el-option label="富文本控件" value="editor" />
|
|
<el-option label="富文本控件" value="editor" />
|
|
|
|
+ <el-option label="年月日时分秒控件" value="fulltime" />
|
|
<el-option label="hr" value="hr" />
|
|
<el-option label="hr" value="hr" />
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
@@ -132,24 +133,24 @@
|
|
<el-form-item label="排序:" prop="sort">
|
|
<el-form-item label="排序:" prop="sort">
|
|
<el-input-number style="width: 100%;" v-model="formZd.sort" placeholder="请输入排序" />
|
|
<el-input-number style="width: 100%;" v-model="formZd.sort" placeholder="请输入排序" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="正则表达式:" prop="regular">
|
|
|
|
- <el-input v-model="formZd.regular" placeholder="请输入正则表达式" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="正则表达式:" prop="regular">
|
|
|
|
+ <el-input v-model="formZd.regular" placeholder="请输入正则表达式" />
|
|
|
|
+ </el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="外键(FK):" prop="foreignKey">
|
|
|
|
- <!-- <el-select style="width: 100%;" filterable v-model="formZd.foreignKey" placeholder="请选择外键(FK)" clearable size="small">
|
|
|
|
- <el-option v-for="dict in columList" :key="dict.columnId" :label="dict.columnName" :value="dict.columnId" />
|
|
|
|
- </el-select> -->
|
|
|
|
- <div style="cursor: pointer;" @click="fkzdFn">
|
|
|
|
- <el-input readonly style="width: 100%;" clearable v-model="ForeName" placeholder="请选择外键(FK)" />
|
|
|
|
- </div>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="外键(FK):" prop="foreignKey">
|
|
|
|
+ <!-- <el-select style="width: 100%;" filterable v-model="formZd.foreignKey" placeholder="请选择外键(FK)" clearable size="small">
|
|
|
|
+ <el-option v-for="dict in columList" :key="dict.columnId" :label="dict.columnName" :value="dict.columnId" />
|
|
|
|
+ </el-select> -->
|
|
|
|
+ <div style="cursor: pointer;" @click="fkzdFn">
|
|
|
|
+ <el-input readonly style="width: 100%;" clearable v-model="ForeName" placeholder="请选择外键(FK)" />
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="关联HR字段:" prop="hrParentId">
|
|
<el-form-item label="关联HR字段:" prop="hrParentId">
|
|
@@ -164,11 +165,11 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="行数:" prop="numRows">
|
|
|
|
- <el-input-number style="width: 100%;" v-model="formZd.numRows" placeholder="请输入行数" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="行数:" prop="numRows">
|
|
|
|
+ <el-input-number style="width: 100%;" v-model="formZd.numRows" placeholder="请输入行数" />
|
|
|
|
+ </el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="列数:" prop="numColumns">
|
|
<el-form-item label="列数:" prop="numColumns">
|
|
@@ -181,11 +182,11 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="扩展属性:" prop="extendedAttributes">
|
|
|
|
- <el-input v-model="formZd.extendedAttributes" placeholder="请输入扩展属性" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="扩展属性:" prop="extendedAttributes">
|
|
|
|
+ <el-input v-model="formZd.extendedAttributes" placeholder="请输入扩展属性" />
|
|
|
|
+ </el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="查询方式:" prop="queryType">
|
|
<el-form-item label="查询方式:" prop="queryType">
|
|
@@ -218,23 +219,23 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="字典类型:" prop="dictType">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <el-select style="width: 100%;" v-model="formZd.dictType" clearable filterable placeholder="请选择">
|
|
|
|
- <el-option v-for="dict in dictOptions" :key="dict.dictType" :label="dict.dictName" :value="dict.dictType">
|
|
|
|
- <span style="float: left">{{ dict.dictName }}</span>
|
|
|
|
- <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictType }}</span>
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </template>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="单据编号规则:" prop="seqName">
|
|
|
|
- <el-input v-model="formZd.seqName" placeholder="请输入单据编号规则" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="字典类型:" prop="dictType">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-select style="width: 100%;" v-model="formZd.dictType" clearable filterable placeholder="请选择">
|
|
|
|
+ <el-option v-for="dict in dictOptions" :key="dict.dictType" :label="dict.dictName" :value="dict.dictType">
|
|
|
|
+ <span style="float: left">{{ dict.dictName }}</span>
|
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictType }}</span>
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </template>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="单据编号规则:" prop="seqName">
|
|
|
|
+ <el-input v-model="formZd.seqName" placeholder="请输入单据编号规则" />
|
|
|
|
+ </el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="显示字段" prop="isOut">
|
|
<el-form-item label="显示字段" prop="isOut">
|
|
@@ -242,16 +243,16 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="输入字段" prop="isIn">
|
|
|
|
- <el-checkbox true-label="Y" false-label="N" v-model="formZd.isIn"></el-checkbox>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="查询条件" prop="isQuery">
|
|
|
|
- <el-checkbox true-label="1" false-label="0" v-model="formZd.isQuery"></el-checkbox>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="输入字段" prop="isIn">
|
|
|
|
+ <el-checkbox true-label="Y" false-label="N" v-model="formZd.isIn"></el-checkbox>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="查询条件" prop="isQuery">
|
|
|
|
+ <el-checkbox true-label="1" false-label="0" v-model="formZd.isQuery"></el-checkbox>
|
|
|
|
+ </el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="必填" prop="isRequired">
|
|
<el-form-item label="必填" prop="isRequired">
|
|
@@ -473,7 +474,7 @@
|
|
required: true,
|
|
required: true,
|
|
message: "请输入字段描述",
|
|
message: "请输入字段描述",
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
- }],
|
|
|
|
|
|
+ }],
|
|
columnType: [{
|
|
columnType: [{
|
|
required: true,
|
|
required: true,
|
|
message: "请输入物理类型",
|
|
message: "请输入物理类型",
|
|
@@ -594,7 +595,7 @@
|
|
// 获取表详细信息
|
|
// 获取表详细信息
|
|
getGenTable(tableId).then(res => {
|
|
getGenTable(tableId).then(res => {
|
|
this.cloumns = res.data.rows;
|
|
this.cloumns = res.data.rows;
|
|
- this.info = res.data.info;
|
|
|
|
|
|
+ this.info = res.data.info;
|
|
console.log(this.info,33456)
|
|
console.log(this.info,33456)
|
|
this.tables = res.data.tables;
|
|
this.tables = res.data.tables;
|
|
});
|
|
});
|
|
@@ -618,11 +619,11 @@
|
|
// 关联字段
|
|
// 关联字段
|
|
listAllColumnsByTableId({
|
|
listAllColumnsByTableId({
|
|
id:tableId
|
|
id:tableId
|
|
- }).then(response => {
|
|
|
|
|
|
+ }).then(response => {
|
|
this.columList = response.data;
|
|
this.columList = response.data;
|
|
});
|
|
});
|
|
// 关联表数据
|
|
// 关联表数据
|
|
- listTable(this.glbParams).then(response => {
|
|
|
|
|
|
+ listTable(this.glbParams).then(response => {
|
|
this.tableList = response;
|
|
this.tableList = response;
|
|
});
|
|
});
|
|
/** 查询菜单下拉列表 */
|
|
/** 查询菜单下拉列表 */
|
|
@@ -645,7 +646,7 @@
|
|
tableBtn(row){
|
|
tableBtn(row){
|
|
this.openquery = false
|
|
this.openquery = false
|
|
this.ForeName = row.column_name
|
|
this.ForeName = row.column_name
|
|
- this.formZd.foreignKey = row.id
|
|
|
|
|
|
+ this.formZd.foreignKey = row.id
|
|
},
|
|
},
|
|
fkzdFn() {
|
|
fkzdFn() {
|
|
this.queryedit()
|
|
this.queryedit()
|
|
@@ -689,7 +690,7 @@
|
|
if(route.table_id){
|
|
if(route.table_id){
|
|
route.table_id = route.table_id.name
|
|
route.table_id = route.table_id.name
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ })
|
|
this.totalquery = response.data.total;
|
|
this.totalquery = response.data.total;
|
|
}
|
|
}
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -768,11 +769,11 @@
|
|
getByIdWithForeignKey(id).then(response => {
|
|
getByIdWithForeignKey(id).then(response => {
|
|
let data = response.data
|
|
let data = response.data
|
|
data.foreignKey = data.foreignKey ? data.foreignKey - 0 : ''
|
|
data.foreignKey = data.foreignKey ? data.foreignKey - 0 : ''
|
|
- this.formZd = data;
|
|
|
|
- if(data.fkInfo){
|
|
|
|
- this.ForeName = data.fkInfo.value
|
|
|
|
|
|
+ this.formZd = data;
|
|
|
|
+ if(data.fkInfo){
|
|
|
|
+ this.ForeName = data.fkInfo.value
|
|
}
|
|
}
|
|
- this.openZd = true;
|
|
|
|
|
|
+ this.openZd = true;
|
|
this.title = "修改字段信息";
|
|
this.title = "修改字段信息";
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -782,7 +783,7 @@
|
|
qurGenTable(id).then(response => {
|
|
qurGenTable(id).then(response => {
|
|
let data = response.data
|
|
let data = response.data
|
|
data.relationType = data.relationType + ""
|
|
data.relationType = data.relationType + ""
|
|
- data.embedEdit = data.embedEdit?(data.embedEdit + ""): data.embedEdit
|
|
|
|
|
|
+ data.embedEdit = data.embedEdit?(data.embedEdit + ""): data.embedEdit
|
|
getGenTable(data.relationParentId).then(res => {
|
|
getGenTable(data.relationParentId).then(res => {
|
|
this.genList = res.data.rows;
|
|
this.genList = res.data.rows;
|
|
this.form = data;
|
|
this.form = data;
|
|
@@ -793,11 +794,11 @@
|
|
},
|
|
},
|
|
addGlfn() {
|
|
addGlfn() {
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
- if (valid) {
|
|
|
|
- let datas = JSON.parse(JSON.stringify(this.form))
|
|
|
|
- datas.relationParentId = this.info.id
|
|
|
|
|
|
+ if (valid) {
|
|
|
|
+ let datas = JSON.parse(JSON.stringify(this.form))
|
|
|
|
+ datas.relationParentId = this.info.id
|
|
console.log(datas,this.info.id,9998)
|
|
console.log(datas,this.info.id,9998)
|
|
- if (this.form.id != undefined) {
|
|
|
|
|
|
+ if (this.form.id != undefined) {
|
|
setGenTable(datas).then(response => {
|
|
setGenTable(datas).then(response => {
|
|
this.msgSuccess("修改成功");
|
|
this.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
@@ -837,7 +838,7 @@
|
|
cancel() {
|
|
cancel() {
|
|
this.open = false;
|
|
this.open = false;
|
|
this.reset();
|
|
this.reset();
|
|
- this.openZd = false;
|
|
|
|
|
|
+ this.openZd = false;
|
|
this.resetZd();
|
|
this.resetZd();
|
|
},
|
|
},
|
|
// 关联表数据
|
|
// 关联表数据
|
|
@@ -852,8 +853,8 @@
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd_gl() {
|
|
handleAdd_gl() {
|
|
this.reset();
|
|
this.reset();
|
|
- this.open = true;
|
|
|
|
- console.log(this.form)
|
|
|
|
|
|
+ this.open = true;
|
|
|
|
+ console.log(this.form)
|
|
this.title = "新增关联表";
|
|
this.title = "新增关联表";
|
|
},
|
|
},
|
|
handleDel_gl(row) {
|
|
handleDel_gl(row) {
|
|
@@ -884,8 +885,8 @@
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
submitForm() {
|
|
let isInFlag = 0
|
|
let isInFlag = 0
|
|
- let isOutFlag = 0
|
|
|
|
-
|
|
|
|
|
|
+ let isOutFlag = 0
|
|
|
|
+
|
|
for(let item of this.cloumns){
|
|
for(let item of this.cloumns){
|
|
if(item.isIn=='Y'){
|
|
if(item.isIn=='Y'){
|
|
isInFlag++
|
|
isInFlag++
|
|
@@ -902,18 +903,18 @@
|
|
this.msgError('"显示字段"最多只能选择一个!')
|
|
this.msgError('"显示字段"最多只能选择一个!')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;
|
|
|
|
- const tabnum = Object.assign({}, basicForm.model)
|
|
|
|
- console.log(tabnum.tableColumn,234)
|
|
|
|
- if(tabnum.tableColumn >4 ){
|
|
|
|
- this.msgError('列数最大只能输入4')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if( tabnum.tableColumn <1){
|
|
|
|
- this.msgError('最小只能输入1')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ const basicForm = this.$refs.basicInfo.$refs.basicInfoForm;
|
|
|
|
+ const tabnum = Object.assign({}, basicForm.model)
|
|
|
|
+ console.log(tabnum.tableColumn,234)
|
|
|
|
+ if(tabnum.tableColumn >4 ){
|
|
|
|
+ this.msgError('列数最大只能输入4')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if( tabnum.tableColumn <1){
|
|
|
|
+ this.msgError('最小只能输入1')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
// const genForm = this.$refs.genInfo.$refs.genInfoForm;
|
|
// const genForm = this.$refs.genInfo.$refs.genInfoForm;
|
|
Promise.all([basicForm].map(this.getFormPromise)).then(res => {
|
|
Promise.all([basicForm].map(this.getFormPromise)).then(res => {
|
|
@@ -926,13 +927,13 @@
|
|
// treeName: genTable.treeName,
|
|
// treeName: genTable.treeName,
|
|
// treeParentCode: genTable.treeParentCode,
|
|
// treeParentCode: genTable.treeParentCode,
|
|
// parentMenuId: genTable.parentMenuId
|
|
// parentMenuId: genTable.parentMenuId
|
|
- // };
|
|
|
|
- console.log(genTable)
|
|
|
|
- if(this.activeName=='basic'){
|
|
|
|
- genTable.updateType ='1'
|
|
|
|
- }
|
|
|
|
- if(this.activeName=='cloum'){
|
|
|
|
- genTable.updateType ='2'
|
|
|
|
|
|
+ // };
|
|
|
|
+ console.log(genTable)
|
|
|
|
+ if(this.activeName=='basic'){
|
|
|
|
+ genTable.updateType ='1'
|
|
|
|
+ }
|
|
|
|
+ if(this.activeName=='cloum'){
|
|
|
|
+ genTable.updateType ='2'
|
|
}
|
|
}
|
|
updateGenTable(genTable).then(res => {
|
|
updateGenTable(genTable).then(res => {
|
|
this.msgSuccess(res.msg);
|
|
this.msgSuccess(res.msg);
|
|
@@ -995,7 +996,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleAdd() {
|
|
handleAdd() {
|
|
- this.resetZd();
|
|
|
|
|
|
+ this.resetZd();
|
|
this.openZd = true;
|
|
this.openZd = true;
|
|
this.title = "新增字段信息";
|
|
this.title = "新增字段信息";
|
|
}
|
|
}
|