基础管理分页处理
This commit is contained in:
		
							parent
							
								
									c99da5778a
								
							
						
					
					
						commit
						9d83fb64b8
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
          })
 | 
			
		||||
      },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -82,8 +82,9 @@
 | 
			
		|||
        >
 | 
			
		||||
            <el-table-column
 | 
			
		||||
                label="序号"
 | 
			
		||||
                prop="unitId"
 | 
			
		||||
                prop="id"
 | 
			
		||||
                width="100"
 | 
			
		||||
                type="index"
 | 
			
		||||
                align="center"
 | 
			
		||||
            />
 | 
			
		||||
            <el-table-column
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue