基础管理分页处理
This commit is contained in:
parent
c99da5778a
commit
9d83fb64b8
|
|
@ -139,6 +139,14 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title"
|
:title="title"
|
||||||
|
|
@ -287,7 +295,7 @@ export default {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
propInfoList(this.queryParams).then((response) => {
|
propInfoList(this.queryParams).then((response) => {
|
||||||
this.propInfoList = response.data.rows
|
this.propInfoList = response.data.rows
|
||||||
this.total = response.total
|
this.total = response.data.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,9 @@
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="序号"
|
label="序号"
|
||||||
prop="unitId"
|
prop="id"
|
||||||
width="100"
|
width="100"
|
||||||
|
type="index"
|
||||||
align="center"
|
align="center"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
|
||||||
|
|
@ -349,7 +349,7 @@ export default {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
unitTypeList(this.queryParams).then((response) => {
|
unitTypeList(this.queryParams).then((response) => {
|
||||||
this.roleList = response.rows
|
this.roleList = response.rows
|
||||||
// this.total = response.data.total
|
this.total = response.total
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//提交时循环fileList 获取raw文件
|
//提交时循环fileList 获取raw文件
|
||||||
getFileData() {
|
async getFileData() {
|
||||||
const fileTwo = []
|
const fileTwo = []
|
||||||
this.businessLicenseListTemp.forEach(item => {
|
this.businessLicenseListTemp.forEach(item => {
|
||||||
if (item?.hasOwnProperty('raw')) {
|
if (item?.hasOwnProperty('raw')) {
|
||||||
|
|
@ -489,7 +489,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
//** 提交按钮 */
|
//** 提交按钮 */
|
||||||
submitForm() {
|
async submitForm() {
|
||||||
this.$refs["form"].validate(async valid => {
|
this.$refs["form"].validate(async valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.supplierId != undefined) {
|
if (this.form.supplierId != undefined) {
|
||||||
|
|
@ -504,9 +504,7 @@
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await this.getImaUpload(),
|
await this.getImaUpload(),
|
||||||
console.log('businessLicenseFileList',this.businessLicenseFileList)
|
await this.addFacturerTemp(this.form);
|
||||||
this.form.businessLicenseFileList=this.businessLicenseFileList
|
|
||||||
await this.addFacturerTemp();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -514,15 +512,28 @@
|
||||||
|
|
||||||
async getImaUpload(){
|
async getImaUpload(){
|
||||||
const reqData = new FormData()
|
const reqData = new FormData()
|
||||||
const {fileTwo} = this.getFileData()
|
const {fileTwo} = await this.getFileData()
|
||||||
fileTwo.forEach( item=>{
|
for (const item of fileTwo){
|
||||||
let obj={file: item};
|
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){
|
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.$modal.msgSuccess("新增成功");
|
||||||
this.showHouse = false;
|
this.showHouse = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue