🐛fix: #ID31JE 代码生成器生成的模板,新增修改后直接调整为查询列表

This commit is contained in:
yubaolee
2025-10-23 00:31:31 +08:00
parent 35300b9c43
commit 4bf28c77a1
17 changed files with 31 additions and 80 deletions

View File

@@ -20,7 +20,7 @@
:select-type="'checkbox'"
:table-fields="headerList"
:data="list"
:v-loading="listLoading"
:loading="listLoading"
@row-click="rowClick"
@selection-change="handleSelectionChange"
></auth-table>
@@ -181,7 +181,7 @@ export default {
// 保存提交
this.$refs['dataForm'].validate(() => {
{TableName}s.add(this.temp).then(() => {
this.list.unshift(this.temp)
this.getList()
this.dialogFormVisible = false
this.$notify({
title: '成功',
@@ -206,13 +206,7 @@ export default {
this.$refs['dataForm'].validate(() => {
const tempData = Object.assign({}, this.temp)
{TableName}s.update(tempData).then(() => {
for (const v of this.list) {
if (v.id === this.temp.id) {
const index = this.list.indexOf(v)
this.list.splice(index, 1, this.temp)
break
}
}
this.getList()
this.dialogFormVisible = false
this.$notify({
title: '成功',