基础管理分页处理

This commit is contained in:
jjLv 2024-10-29 09:11:04 +08:00
parent c99da5778a
commit 9d83fb64b8
4 changed files with 33 additions and 13 deletions

View File

@ -139,6 +139,14 @@
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog
:title="title"
@ -287,7 +295,7 @@ export default {
this.loading = true
propInfoList(this.queryParams).then((response) => {
this.propInfoList = response.data.rows
this.total = response.total
this.total = response.data.total
this.loading = false
})
},

View File

@ -82,8 +82,9 @@
>
<el-table-column
label="序号"
prop="unitId"
prop="id"
width="100"
type="index"
align="center"
/>
<el-table-column

View File

@ -349,7 +349,7 @@ export default {
this.loading = true
unitTypeList(this.queryParams).then((response) => {
this.roleList = response.rows
// this.total = response.data.total
this.total = response.total
this.loading = false
})
},

View File

@ -325,7 +325,7 @@
},
methods: {
//fileList raw
getFileData() {
async getFileData() {
const fileTwo = []
this.businessLicenseListTemp.forEach(item => {
if (item?.hasOwnProperty('raw')) {
@ -489,7 +489,7 @@
},
//** */
submitForm() {
async submitForm() {
this.$refs["form"].validate(async valid => {
if (valid) {
if (this.form.supplierId != undefined) {
@ -504,9 +504,7 @@
});
} else {
await this.getImaUpload(),
console.log('businessLicenseFileList',this.businessLicenseFileList)
this.form.businessLicenseFileList=this.businessLicenseFileList
await this.addFacturerTemp();
await this.addFacturerTemp(this.form);
}
}
});
@ -514,15 +512,28 @@
async getImaUpload(){
const reqData = new FormData()
const {fileTwo} = this.getFileData()
fileTwo.forEach( item=>{
const {fileTwo} = await this.getFileData()
for (const item of fileTwo){
let obj={file: item};
this.imgUpLoadTwoAll(obj,name,name);
try {
const res = await imgUpLoadTwo(obj);
if (res.code === 200) {
let objTwo = { 'name': res.data.name, 'url': res.data.url };
console.log('obj', objTwo);
this.businessLicenseFileList.push(objTwo);
} else {
this.$modal.msgError(res.msg);
}
} catch (error) {
this.$modal.msgError(error);
}
}
})
},
async addFacturerTemp(form){
addFacturer(this.form).then(response => {
console.log('businessLicenseFileList',this.businessLicenseFileList)
this.form.businessLicenseFileList=this.businessLicenseFileList
addFacturer(form).then(response => {
this.$modal.msgSuccess("新增成功");
this.showHouse = false;
this.getList();