mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-04-17 02:58:03 +08:00
🐛fix: #ID31JE 代码生成器生成的模板,新增修改后直接调整为查询列表
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<div class="app-container flex-item flex-column">
|
||||
<div class="flex-item">
|
||||
<el-card shadow="nerver" class="demo-card fh">
|
||||
<auth-table style="height:calc(100% - 52px)" ref="mainTable" :select-type="'radio'" :table-fields="firstHeaderList" :data="mainList" :v-loading="listLoading" @row-click="rowClickFirstTable"></auth-table>
|
||||
<auth-table style="height:calc(100% - 52px)" ref="mainTable" :select-type="'radio'" :table-fields="firstHeaderList" :data="mainList" :loading="listLoading" @row-click="rowClickFirstTable"></auth-table>
|
||||
<pagination v-show="firstTotal > 0" :total="firstTotal" :page.sync="firstQuery.page" :limit.sync="firstQuery.limit" @pagination="handleCurrentChange" />
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -249,7 +249,7 @@ export default {
|
||||
tempData = this.setDetails(tempData)
|
||||
tempData.OrgId = this.defaultorgid
|
||||
{FirstTableName}s.add(tempData).then(() => {
|
||||
this.mainList.unshift(this.firstTemp)
|
||||
this.getList()
|
||||
this.editModel = false
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
@@ -289,13 +289,7 @@ export default {
|
||||
let tempData = Object.assign({}, this.firstTemp)
|
||||
tempData = this.setDetails(tempData)
|
||||
{FirstTableName}s.update(tempData).then(() => {
|
||||
for (const v of this.mainList) {
|
||||
if (v.id === this.firstTemp.id) {
|
||||
const index = this.mainList.indexOf(v)
|
||||
this.mainList.splice(index, 1, this.firstTemp)
|
||||
break
|
||||
}
|
||||
}
|
||||
this.getList()
|
||||
|
||||
this.editModel = false
|
||||
this.$notify({
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="flex-item flex flex-column main-context">
|
||||
<!-- 主表 -->
|
||||
<div class="flex-item flex flex-column b-w" v-show="showNotFullScreen && !showDetailInTable">
|
||||
<auth-table size="small" ref="mainTable" id="mainTable" :table-fields="firstHeaderList" :data="mainList" :v-loading="listLoading" @row-click="rowClickFirstTable"
|
||||
<auth-table size="small" ref="mainTable" id="mainTable" :table-fields="firstHeaderList" :data="mainList" :loading="listLoading" @row-click="rowClickFirstTable"
|
||||
@row-dblclick="rowDblClickFirstTable"></auth-table>
|
||||
<div class="flex flex-direction-r p-r-10 b-w p-b-5 p-t-5">
|
||||
<el-pagination size="small" background v-show="firstTotal > 0" v-model:currentPage="firstQuery.page"
|
||||
@@ -385,13 +385,7 @@ const updateData = () => {
|
||||
let tempData = Object.assign({}, firstTemp)
|
||||
tempData = setDetails(tempData)
|
||||
{FirstTableName}s.update(tempData).then(() => {
|
||||
for (const v of mainList.value) {
|
||||
if (v.id === firstTemp.id) {
|
||||
const index = mainList.value.indexOf(v)
|
||||
mainList.value.splice(index, 1, tempData)
|
||||
break
|
||||
}
|
||||
}
|
||||
getList()
|
||||
editModel.value = false
|
||||
showDetailInTable.value = false // 保存后返回列表视图
|
||||
ElNotification.success('更新成功')
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="flex-item flex flex-column main-context">
|
||||
<!-- 主表 -->
|
||||
<div class="flex-item flex flex-column b-w" v-show="showNotFullScreen && !showDetailInTable">
|
||||
<auth-table size="small" ref="mainTable" id="mainTable" :table-fields="firstHeaderList" :data="mainList" :v-loading="listLoading" @row-click="rowClickFirstTable"
|
||||
<auth-table size="small" ref="mainTable" id="mainTable" :table-fields="firstHeaderList" :data="mainList" :loading="listLoading" @row-click="rowClickFirstTable"
|
||||
@row-dblclick="rowDblClickFirstTable"></auth-table>
|
||||
<div class="flex flex-direction-r p-r-10 b-w p-b-5 p-t-5">
|
||||
<el-pagination size="small" background v-show="firstTotal > 0" v-model:currentPage="firstQuery.page"
|
||||
@@ -374,13 +374,7 @@ const updateData = () => {
|
||||
let tempData = Object.assign({}, firstTemp)
|
||||
tempData = setDetails(tempData)
|
||||
{FirstTableName}s.update(tempData).then(() => {
|
||||
for (const v of mainList.value) {
|
||||
if (v.id === firstTemp.id) {
|
||||
const index = mainList.value.indexOf(v)
|
||||
mainList.value.splice(index, 1, tempData)
|
||||
break
|
||||
}
|
||||
}
|
||||
getList()
|
||||
editModel.value = false
|
||||
showDetailInTable.value = false // 保存后返回列表视图
|
||||
ElNotification.success('更新成功')
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="app-container flex-item flex-column">
|
||||
<div class="flex-item">
|
||||
<el-card shadow="nerver" class="demo-card fh">
|
||||
<auth-table style="height:calc(100% - 52px)" ref="mainTable" :select-type="'radio'" :table-fields="firstHeaderList" :data="mainList" :v-loading="listLoading" @row-click="rowClickFirstTable"></auth-table>
|
||||
<auth-table style="height:calc(100% - 52px)" ref="mainTable" :select-type="'radio'" :table-fields="firstHeaderList" :data="mainList" :loading="listLoading" @row-click="rowClickFirstTable"></auth-table>
|
||||
<pagination v-show="firstTotal > 0" :total="firstTotal" :page.sync="firstQuery.page" :limit.sync="firstQuery.limit" @pagination="handleCurrentChange" />
|
||||
</el-card>
|
||||
</div>
|
||||
@@ -246,7 +246,7 @@ export default {
|
||||
tempData = this.setDetails(tempData)
|
||||
tempData.OrgId = this.defaultorgid
|
||||
{FirstTableName}s.add(tempData).then(() => {
|
||||
this.mainList.unshift(this.firstTemp)
|
||||
this.getList()
|
||||
this.editModel = false
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
@@ -286,14 +286,7 @@ export default {
|
||||
let tempData = Object.assign({}, this.firstTemp)
|
||||
tempData = this.setDetails(tempData)
|
||||
{FirstTableName}s.update(tempData).then(() => {
|
||||
for (const v of this.mainList) {
|
||||
if (v.id === this.firstTemp.id) {
|
||||
const index = this.mainList.indexOf(v)
|
||||
this.mainList.splice(index, 1, this.firstTemp)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
this.getList()
|
||||
this.editModel = false
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
|
||||
Reference in New Issue
Block a user