bufix 0705 zentao
This commit is contained in:
@@ -12,8 +12,7 @@
|
||||
@operate-event="handleOperate"
|
||||
:current-page="page"
|
||||
:current-size="size"
|
||||
:refresh-layout-key="refreshLayoutKey"
|
||||
/>
|
||||
:refresh-layout-key="refreshLayoutKey" />
|
||||
|
||||
<el-pagination
|
||||
class="mt-5 flex justify-end"
|
||||
@@ -23,8 +22,7 @@
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="size"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
|
||||
<DialogJustForm
|
||||
ref="edit-dialog"
|
||||
@@ -32,16 +30,14 @@
|
||||
v-if="!!dialogConfigs"
|
||||
:dialog-visible.sync="dialogVisible"
|
||||
:configs="dialogConfigs"
|
||||
@refreshDataList="getList"
|
||||
/>
|
||||
@refreshDataList="getList" />
|
||||
<DialogJustForm
|
||||
ref="car-payload-add-dialog"
|
||||
key="car-payload-add-dialog"
|
||||
v-if="!!carPayloadAddConfigs"
|
||||
:dialog-visible.sync="carPayloadAddVisible"
|
||||
:configs="carPayloadAddConfigs"
|
||||
@refreshDataList="updateCarPayloadKey = Math.random()"
|
||||
/>
|
||||
@refreshDataList="updateCarPayloadKey = Math.random()" />
|
||||
<DialogCarPayload
|
||||
ref="car-payload-dialog"
|
||||
key="car-payload-dialog"
|
||||
@@ -50,8 +46,7 @@
|
||||
:configs="carPayloadDialogConfigs"
|
||||
@refreshDataList="getList"
|
||||
:update-key="updateCarPayloadKey"
|
||||
@add-record="openCarPayloadAddDialog($event)"
|
||||
/>
|
||||
@add-record="openCarPayloadAddDialog($event)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -146,7 +141,7 @@ export default {
|
||||
tableLoading: false,
|
||||
refreshLayoutKey: null,
|
||||
updateCarPayloadKey: 1,
|
||||
cachedSearchCondition: {}
|
||||
cachedSearchCondition: {},
|
||||
};
|
||||
},
|
||||
inject: ["urls"],
|
||||
@@ -237,6 +232,8 @@ export default {
|
||||
if (deleteConfig && "promptField" in deleteConfig) {
|
||||
promptName = data[deleteConfig.promptField];
|
||||
}
|
||||
|
||||
let currenPageListLength = this.dataList.length;
|
||||
// 确认是否删除
|
||||
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
|
||||
confirmButtonText: "确认",
|
||||
@@ -250,13 +247,14 @@ export default {
|
||||
method: "DELETE",
|
||||
data: data.id,
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("删除成功!");
|
||||
this.page = 1;
|
||||
this.size = 10;
|
||||
// this.page = 1;
|
||||
// this.size = 10;
|
||||
if (currenPageListLength == 1) this.page = this.page > 1 ? this.page - 1 : 1;
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message({
|
||||
|
||||
Reference in New Issue
Block a user