|
@@ -330,7 +330,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="字段:" prop="relationChildId">
|
|
<el-form-item label="字段:" prop="relationChildId">
|
|
<el-select style="width: 100%;" v-model="form.relationChildId" placeholder="请选择字段" v-loadmore="loadMore">
|
|
<el-select style="width: 100%;" v-model="form.relationChildId" placeholder="请选择字段" v-loadmore="loadMore">
|
|
- <el-option v-for="item in genList" :key="item.columnId" :label="item.columnName" :value="item.columnId">
|
|
|
|
|
|
+ <el-option v-for="item in genList" v-if="item.foreignKey" :key="item.columnId" :label="item.columnName" :value="item.columnId">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -761,9 +761,12 @@
|
|
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;
|
|
|
|
- this.ForeName = data.fkInfo.value
|
|
|
|
- this.openZd = true;
|
|
|
|
|
|
+ this.formZd = data;
|
|
|
|
+ console.log(data,8890)
|
|
|
|
+ if(data.fkInfo){
|
|
|
|
+ this.ForeName = data.fkInfo.value
|
|
|
|
+ }
|
|
|
|
+ this.openZd = true;
|
|
this.title = "修改字段信息";
|
|
this.title = "修改字段信息";
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -773,10 +776,11 @@
|
|
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
|
|
|
|
+
|
|
getGenTable(data.relationParentId).then(res => {
|
|
getGenTable(data.relationParentId).then(res => {
|
|
this.genList = res.data.rows;
|
|
this.genList = res.data.rows;
|
|
- this.form = response.data;
|
|
|
|
|
|
+ this.form = data;
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "修改关联表";
|
|
this.title = "修改关联表";
|
|
});
|
|
});
|
|
@@ -784,15 +788,17 @@
|
|
},
|
|
},
|
|
addGlfn() {
|
|
addGlfn() {
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
- if (valid) {
|
|
|
|
- if (this.form.id != undefined) {
|
|
|
|
- setGenTable(this.form).then(response => {
|
|
|
|
|
|
+ if (valid) {
|
|
|
|
+ let datas = JSON.parse(JSON.stringify(this.form))
|
|
|
|
+ datas.relationParentId = this.info.tableId
|
|
|
|
+ if (this.form.id != undefined) {
|
|
|
|
+ setGenTable(datas).then(response => {
|
|
this.msgSuccess("修改成功");
|
|
this.msgSuccess("修改成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.tabList();
|
|
this.tabList();
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- addGenTable(this.form).then(response => {
|
|
|
|
|
|
+ addGenTable(datas).then(response => {
|
|
this.msgSuccess("新增成功");
|
|
this.msgSuccess("新增成功");
|
|
this.open = false;
|
|
this.open = false;
|
|
this.tabList();
|
|
this.tabList();
|
|
@@ -840,7 +846,9 @@
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd_gl() {
|
|
handleAdd_gl() {
|
|
this.reset();
|
|
this.reset();
|
|
- this.open = true;
|
|
|
|
|
|
+ this.open = true;
|
|
|
|
+ console.log(this.form)
|
|
|
|
+
|
|
this.title = "新增关联表";
|
|
this.title = "新增关联表";
|
|
},
|
|
},
|
|
handleDel_gl(row) {
|
|
handleDel_gl(row) {
|
|
@@ -860,7 +868,7 @@
|
|
// 表单重置
|
|
// 表单重置
|
|
reset() {
|
|
reset() {
|
|
this.form = {
|
|
this.form = {
|
|
-
|
|
|
|
|
|
+ isDel: 'N'
|
|
};
|
|
};
|
|
this.resetForm("form");
|
|
this.resetForm("form");
|
|
},
|
|
},
|