Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@ public class ZYJXJHBServiceImpl implements ZYJXJHBService {
|
|||||||
if (ty != null) {
|
if (ty != null) {
|
||||||
wrapper.eq(ZYJXJHB::getTy, ty);
|
wrapper.eq(ZYJXJHB::getTy, ty);
|
||||||
}
|
}
|
||||||
wrapper.orderByAsc(ZYJXJHB::getZydh);
|
wrapper.orderByDesc(ZYJXJHB::getQysj).orderByAsc(ZYJXJHB::getZydh);
|
||||||
Page<ZYJXJHB> result = zyjxjhbMapper.selectPage(page, wrapper);
|
Page<ZYJXJHB> result = zyjxjhbMapper.selectPage(page, wrapper);
|
||||||
return new PageResult<>(result.getRecords(), result.getTotal(),
|
return new PageResult<>(result.getRecords(), result.getTotal(),
|
||||||
query.getPageNum(), query.getPageSize());
|
query.getPageNum(), query.getPageSize());
|
||||||
|
|||||||
@@ -406,11 +406,19 @@ export default {
|
|||||||
/* ---------- 列表加载 ---------- */
|
/* ---------- 列表加载 ---------- */
|
||||||
fetchList() {
|
fetchList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
listByZydhAndTy({ zydh: this.searchForm.zydh, ty: this.searchForm.ty }).then(response => {
|
this.localPaging = false
|
||||||
const data = response.data || []
|
const query = {
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
ty: this.searchForm.ty
|
||||||
|
}
|
||||||
|
if (this.searchForm.zydh) {
|
||||||
|
query.zydh = this.searchForm.zydh
|
||||||
|
}
|
||||||
|
listByZydhAndTy(query).then(response => {
|
||||||
|
const data = response.data || {}
|
||||||
this.tableData = Array.isArray(data) ? data : (data.records || [])
|
this.tableData = Array.isArray(data) ? data : (data.records || [])
|
||||||
this.total = this.tableData.length
|
this.total = Array.isArray(data) ? data.length : Number(data.total || 0)
|
||||||
this.localPaging = true
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.tableData = []
|
this.tableData = []
|
||||||
this.total = 0
|
this.total = 0
|
||||||
@@ -458,6 +466,9 @@ export default {
|
|||||||
req.then(() => {
|
req.then(() => {
|
||||||
this.$message.success(isEdit ? '修改成功' : '新增成功')
|
this.$message.success(isEdit ? '修改成功' : '新增成功')
|
||||||
this.dialog.visible = false
|
this.dialog.visible = false
|
||||||
|
if (!isEdit) {
|
||||||
|
this.pageNum = 1
|
||||||
|
}
|
||||||
this.fetchList()
|
this.fetchList()
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.dialog.submitting = false
|
this.dialog.submitting = false
|
||||||
@@ -517,15 +528,11 @@ export default {
|
|||||||
handleSizeChange(size) {
|
handleSizeChange(size) {
|
||||||
this.pageSize = size
|
this.pageSize = size
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
if (!this.localPaging) {
|
|
||||||
this.fetchList()
|
this.fetchList()
|
||||||
}
|
|
||||||
},
|
},
|
||||||
handlePageChange(page) {
|
handlePageChange(page) {
|
||||||
this.pageNum = page
|
this.pageNum = page
|
||||||
if (!this.localPaging) {
|
|
||||||
this.fetchList()
|
this.fetchList()
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/* ---------- 工具 ---------- */
|
/* ---------- 工具 ---------- */
|
||||||
|
|||||||
Reference in New Issue
Block a user