mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-04-07 17:41:28 +08:00
🐛fix: #ID31JE 代码生成器生成的模板,新增修改后直接调整为查询列表
This commit is contained in:
@@ -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>
|
||||
@@ -180,7 +180,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: '成功',
|
||||
@@ -205,13 +205,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: '成功',
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<permission-btn v-on:btn-event="onBtnClicked"></permission-btn>
|
||||
</sticky>
|
||||
<auth-table ref="mainTableRef" :select-type="'checkbox'" :table-fields="headerList" :data="list"
|
||||
:v-loading="listLoading" @row-click="rowClick" @selection-change="handleSelectionChange"></auth-table>
|
||||
:loading="listLoading" @row-click="rowClick" @selection-change="handleSelectionChange"></auth-table>
|
||||
<el-pagination v-show="total > 0" :total="total" v-model:currentPage="listQuery.page"
|
||||
v-model:page-size="listQuery.limit" @current-change="handleCurrentChange" />
|
||||
</div>
|
||||
@@ -171,7 +171,7 @@ const handleCreate = async function () {
|
||||
const createData = function () {
|
||||
dataFormRef.value.validate(() => {
|
||||
{TableName}s.add(temp).then(() => {
|
||||
list.value.unshift(temp)
|
||||
getList()
|
||||
dialogFormVisible.value = false
|
||||
ElNotification.success('创建成功')
|
||||
})
|
||||
@@ -188,13 +188,7 @@ const updateData = function () {
|
||||
dataFormRef.value.validate(() => {
|
||||
const tempData = Object.assign({}, temp)
|
||||
{TableName}s.update(tempData).then(() => {
|
||||
for (const v of list.value) {
|
||||
if (v.id === temp.id) {
|
||||
const index = list.value.indexOf(v)
|
||||
list.value.splice(index, 1, temp)
|
||||
break
|
||||
}
|
||||
}
|
||||
getList()
|
||||
dialogFormVisible.value = false
|
||||
ElNotification.success('更新成功')
|
||||
})
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<permission-btn v-on:btn-event="onBtnClicked"></permission-btn>
|
||||
</sticky>
|
||||
<auth-table ref="mainTableRef" :select-type="'checkbox'" :table-fields="headerList" :data="list"
|
||||
:v-loading="listLoading" @row-click="rowClick" @selection-change="handleSelectionChange"></auth-table>
|
||||
:loading="listLoading" @row-click="rowClick" @selection-change="handleSelectionChange"></auth-table>
|
||||
<el-pagination v-show="total > 0" :total="total" v-model:currentPage="listQuery.page"
|
||||
v-model:page-size="listQuery.limit" @current-change="handleCurrentChange" />
|
||||
</div>
|
||||
@@ -172,7 +172,7 @@ const handleCreate = async function () {
|
||||
const createData = function () {
|
||||
dataFormRef.value.validate(() => {
|
||||
{TableName}s.add(temp).then(() => {
|
||||
list.value.unshift(temp)
|
||||
getList()
|
||||
dialogFormVisible.value = false
|
||||
ElNotification.success('创建成功')
|
||||
})
|
||||
@@ -189,13 +189,7 @@ const updateData = function () {
|
||||
dataFormRef.value.validate(() => {
|
||||
const tempData = Object.assign({}, temp)
|
||||
{TableName}s.update(tempData).then(() => {
|
||||
for (const v of list.value) {
|
||||
if (v.id === temp.id) {
|
||||
const index = list.value.indexOf(v)
|
||||
list.value.splice(index, 1, temp)
|
||||
break
|
||||
}
|
||||
}
|
||||
getList()
|
||||
dialogFormVisible.value = false
|
||||
ElNotification.success('更新成功')
|
||||
})
|
||||
|
||||
@@ -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: '成功',
|
||||
|
||||
Reference in New Issue
Block a user