Procházet zdrojové kódy

-区域环境本底值导入

jiangbiao před 2 roky
rodič
revize
0ef8da147f

+ 95 - 0
master/src/main/java/com/ruoyi/project/base/controller/TBaseRegionController.java

@@ -1,18 +1,32 @@
 package com.ruoyi.project.base.controller;
 
+import com.alibaba.fastjson2.JSON;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.project.base.domain.TBaseDevice;
+import com.ruoyi.project.base.domain.TBasePlant;
 import com.ruoyi.project.base.domain.TBaseRegion;
+import com.ruoyi.project.base.service.ITBasePlantService;
 import com.ruoyi.project.base.service.ITBaseRegionService;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -28,6 +42,9 @@ public class TBaseRegionController extends BaseController {
     @Autowired
     private ITBaseRegionService tBaseRegionService;
 
+    @Autowired
+    private ITBasePlantService tBasePlantService;
+
     /**
      * 查询区域列表
      */
@@ -109,4 +126,82 @@ public class TBaseRegionController extends BaseController {
     public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tBaseRegionService.deleteTBaseRegionByIds(ids));
     }
+
+    @Log(title = "受控区域台账导入", businessType = BusinessType.INSERT)
+    @PostMapping("/importData")
+    public AjaxResult importData(@RequestParam("file") MultipartFile file) {
+        //获取操作人员ID
+        Long userId = getUserId();
+        //报错行数统计
+        List<Integer> failRow = new ArrayList<>();
+        Workbook workbook = ExcelUtils.getWorkBook(file);
+        Sheet sheet = workbook.getSheetAt(0);
+        List<TBaseRegion> list = new ArrayList<>();
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        int failNumber = 0;
+        for (int i = 1; i < rowNum; i++) {
+            try {
+                logger.info("读取行数:" + i);
+                Row row = sheet.getRow(i);
+                int cellNum = row.getLastCellNum();
+                TBaseRegion entity = new TBaseRegion();
+                Long plantId = 0L;
+                for (int j = 0; j < cellNum; j++) {
+                    Cell cell = row.getCell(j);
+                    if (cell == null) {
+                        continue;
+                    }
+                    String cellValue = ExcelUtils.getCellValue(cell);
+                    logger.info("cellValue:" + cellValue);
+                    if (j == 0) {
+                        //装置名称
+                        TBasePlant tBasePlant = tBasePlantService.selectTBasePlantByName(cellValue);
+                        if (tBasePlant == null|| StringUtils.isEmpty(cellValue)) {
+                            failNumber++;
+                            logger.info("未找到装置");
+                            failRow.add(i + 1);
+                            continue;
+                        }
+                        plantId = tBasePlant.getPlantId();
+                        entity.setPlantId(plantId);
+                    } else if (j == 1) {
+                        //  区域名称
+                        entity.setRegionCode(cellValue);
+                    } else if (j == 2) {
+                        // 设备描述
+                        entity.setRegionName(cellValue);
+                    } else if (j == 3) {
+                        //设备编号
+                        entity.setRemarks(cellValue);
+                    }
+                }
+                entity.setCreaterCode(userId);
+                entity.setApproveStatus(0L);
+                logger.info("entity:" + entity);
+                list.add(entity);
+            } catch (Exception e) {
+                failNumber++;
+                logger.info("e:" + JSON.toJSONString(e));
+                failRow.add(i + 1);
+            }
+        }
+        int successNumber = 0;
+        int failNum = 0;
+        for (TBaseRegion t : list) {
+            failNum++;
+            try {
+                add(t);
+                successNumber++;
+            } catch (Exception e) {
+                failNumber++;
+                logger.info("e:" + e);
+                failRow.add(failNum + 1);
+            }
+        }
+        logger.info("list:" + JSON.toJSONString(list));
+        logger.info("successNumber:" + successNumber);
+        logger.info("failNumber:" + failNumber);
+        logger.info("failRow:" + failRow);
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
+    }
 }

+ 164 - 19
master/src/main/java/com/ruoyi/project/check/controller/TCheckEnvironmentController.java

@@ -1,20 +1,37 @@
 package com.ruoyi.project.check.controller;
 
+import com.alibaba.fastjson2.JSON;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.project.base.domain.TBasePlant;
+import com.ruoyi.project.base.domain.TBaseRegion;
+import com.ruoyi.project.base.service.ITBasePlantService;
 import com.ruoyi.project.check.domain.TCheckCalibration;
 import com.ruoyi.project.check.domain.TCheckEnvironment;
+import com.ruoyi.project.check.domain.TCheckInstrument;
 import com.ruoyi.project.check.service.ITCheckCalibrationService;
 import com.ruoyi.project.check.service.ITCheckEnvironmentService;
+import com.ruoyi.project.check.service.ITCheckInstrumentService;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.ss.usermodel.Sheet;
+import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 /**
@@ -25,21 +42,25 @@ import java.util.*;
  */
 @RestController
 @RequestMapping("/check/environment")
-public class TCheckEnvironmentController extends BaseController
-{
+public class TCheckEnvironmentController extends BaseController {
     @Autowired
     private ITCheckEnvironmentService tCheckEnvironmentService;
 
     @Autowired
     private ITCheckCalibrationService tCheckCalibrationService;
 
+    @Autowired
+    private ITCheckInstrumentService tCheckInstrumentService;
+
+    @Autowired
+    private ITBasePlantService tBasePlantService;
+
     /**
      * 查询环境本底值记录列表
      */
     @PreAuthorize("@ss.hasPermi('check:environment:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TCheckEnvironment tCheckEnvironment)
-    {
+    public TableDataInfo list(TCheckEnvironment tCheckEnvironment) {
         startPage();
         List<TCheckEnvironment> list = tCheckEnvironmentService.selectTCheckEnvironmentList(tCheckEnvironment);
         return getDataTable(list);
@@ -51,8 +72,7 @@ public class TCheckEnvironmentController extends BaseController
     @PreAuthorize("@ss.hasPermi('check:environment:export')")
     @Log(title = "环境本底值记录", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, TCheckEnvironment tCheckEnvironment)
-    {
+    public void export(HttpServletResponse response, TCheckEnvironment tCheckEnvironment) {
         List<TCheckEnvironment> list = tCheckEnvironmentService.selectTCheckEnvironmentList(tCheckEnvironment);
         ExcelUtil<TCheckEnvironment> util = new ExcelUtil<TCheckEnvironment>(TCheckEnvironment.class);
         util.exportExcel(response, list, "环境本底值记录数据");
@@ -63,8 +83,7 @@ public class TCheckEnvironmentController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('check:environment:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tCheckEnvironmentService.selectTCheckEnvironmentById(id));
     }
 
@@ -74,11 +93,14 @@ public class TCheckEnvironmentController extends BaseController
     @PreAuthorize("@ss.hasPermi('check:environment:add')")
     @Log(title = "环境本底值记录", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TCheckEnvironment tCheckEnvironment)
-    {
+    public AjaxResult add(@RequestBody TCheckEnvironment tCheckEnvironment) {
         TCheckCalibration calibration = new TCheckCalibration();
         calibration.setInstrumentId(tCheckEnvironment.getInstrumentId());
         calibration.setCalibrationTime(tCheckEnvironment.getTestTime());
+        List<TCheckCalibration> tCheckCalibrations = tCheckCalibrationService.selectTCheckCalibrationList(calibration);
+        if (CollectionUtils.isEmpty(tCheckCalibrations)){
+            return AjaxResult.error("根据仪器和检测时间未查询到对应仪器校准记录");
+        }
         tCheckEnvironment.setUpdatedate(new Date());
         tCheckEnvironment.setUpdaterCode(getUserId());
         tCheckEnvironment.setCreaterCode(getUserId());
@@ -91,8 +113,7 @@ public class TCheckEnvironmentController extends BaseController
     @PreAuthorize("@ss.hasPermi('check:environment:edit')")
     @Log(title = "环境本底值记录", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TCheckEnvironment tCheckEnvironment)
-    {
+    public AjaxResult edit(@RequestBody TCheckEnvironment tCheckEnvironment) {
         tCheckEnvironment.setUpdatedate(new Date());
         tCheckEnvironment.setUpdaterCode(getUserId());
         return toAjax(tCheckEnvironmentService.updateTCheckEnvironment(tCheckEnvironment));
@@ -103,15 +124,139 @@ public class TCheckEnvironmentController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('check:environment:remove')")
     @Log(title = "环境本底值记录", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tCheckEnvironmentService.deleteTCheckEnvironmentByIds(ids));
     }
 
-    public static void main(String[] args) {
-        int piles[]={1,2,3,4};
-        int max = Arrays.stream(piles).max().getAsInt();
-        System.out.println(max);
+
+    @Log(title = "环境本底值导入", businessType = BusinessType.INSERT)
+    @PostMapping("/importData")
+    public AjaxResult importData(@RequestParam("file") MultipartFile file) {
+        //获取操作人员ID
+        Long userId = getUserId();
+        //报错行数统计
+        List<Integer> failRow = new ArrayList<>();
+        Workbook workbook = ExcelUtils.getWorkBook(file);
+        Sheet sheet = workbook.getSheetAt(0);
+        List<TCheckEnvironment> list = new ArrayList<>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        int rowNum = sheet.getPhysicalNumberOfRows();
+        int failNumber = 0;
+        for (int i = 1; i < rowNum; i++) {
+            BigDecimal bv = new BigDecimal("0");
+            try {
+                logger.info("读取行数:" + i);
+                Row row = sheet.getRow(i);
+                int cellNum = row.getLastCellNum();
+                TCheckEnvironment entity = new TCheckEnvironment();
+                Long plantId = 0L;
+                for (int j = 0; j < cellNum; j++) {
+                    Cell cell = row.getCell(j);
+                    if (cell == null) {
+                        continue;
+                    }
+                    String cellValue = ExcelUtils.getCellValue(cell);
+                    logger.info("cellValue:" + cellValue);
+                    if (j == 0) {
+                        //装置名称
+                        TBasePlant tBasePlant = tBasePlantService.selectTBasePlantByName(cellValue);
+                        if (tBasePlant == null || StringUtils.isEmpty(cellValue)) {
+                            failNumber++;
+                            logger.info("未找到装置");
+                            failRow.add(i + 1);
+                            continue;
+                        }
+                        plantId = tBasePlant.getPlantId();
+                        entity.setPlantId(plantId);
+                    } else if (j == 1) {
+                        //  组件编码
+                        entity.setAssemblyCode(cellValue);
+                    } else if (j == 2) {
+                        // 仪器id
+                        TCheckInstrument tCheckInstrument = new TCheckInstrument();
+                        tCheckInstrument.setCode(cellValue);
+                        List<TCheckInstrument> tCheckInstruments = tCheckInstrumentService.selectTCheckInstrumentList(tCheckInstrument);
+                        if (CollectionUtils.isEmpty(tCheckInstruments)) {
+                            failNumber++;
+                            logger.info("未找到仪器");
+                            failRow.add(i + 1);
+                            continue;
+                        }
+                        entity.setInstrumentId(tCheckInstruments.get(0).getId());
+                    } else if (j == 4) {
+                        // 大气压
+                        entity.setAtmos(cellValue);
+                    } else if (j == 5) {
+                        // 环境温度
+                        entity.setAmbientTemp(cellValue);
+                    } else if (j == 6) {
+                        // 环境湿度
+                        entity.setAmbientHumidity(cellValue);
+                    } else if (j == 7) {
+                        // 凤向
+                        entity.setWindDirection(cellValue);
+                    } else if (j == 8) {
+                        // 凤速
+                        entity.setWindDirection(cellValue);
+                    } else if (j == 9) {
+                        // 检测人员
+                        entity.setTester(cellValue);
+                    } else if (j == 10) {
+                        // 检测日期
+                        entity.setTestTime(sdf.parse(cellValue));
+                    } else if (j == 11) {
+                        bv = bv.add(new BigDecimal(StringUtils.isEmpty(cellValue) ? "0" : cellValue));
+                        // 检测位置1
+                        entity.setPosition1(cellValue);
+                    } else if (j == 12) {
+                        bv = bv.add(new BigDecimal(StringUtils.isEmpty(cellValue) ? "0" : cellValue));
+                        // 检测位置1
+                        entity.setPosition2(cellValue);
+                    } else if (j == 13) {
+                        bv = bv.add(new BigDecimal(StringUtils.isEmpty(cellValue) ? "0" : cellValue));
+                        // 检测位置1
+                        entity.setPosition3(cellValue);
+                    } else if (j == 14) {
+                        bv = bv.add(new BigDecimal(StringUtils.isEmpty(cellValue) ? "0" : cellValue));
+                        // 检测位置1
+                        entity.setPosition4(cellValue);
+                    } else if (j == 15) {
+                        bv = bv.add(new BigDecimal(StringUtils.isEmpty(cellValue) ? "0" : cellValue));
+                        // 检测位置1
+                        entity.setPosition5(cellValue);
+                    } else if (j == 16) {
+                        // 检测位置1
+                        entity.setRemarks(cellValue);
+                    }
+                }
+                entity.setBackgroundValue(bv.divide(new BigDecimal(5), 1, RoundingMode.HALF_UP).toString());
+                logger.info("entity:" + entity);
+                list.add(entity);
+            } catch (Exception e) {
+                failNumber++;
+                logger.info("e:" + JSON.toJSONString(e));
+                failRow.add(i + 1);
+            }
+        }
+        int successNumber = 0;
+        int failNum = 0;
+        for (TCheckEnvironment t : list) {
+            failNum++;
+            try {
+                add(t);
+                successNumber++;
+            } catch (Exception e) {
+                failNumber++;
+                logger.info("e:" + e);
+                failRow.add(failNum + 1);
+            }
+        }
+        logger.info("list:" + JSON.toJSONString(list));
+        logger.info("successNumber:" + successNumber);
+        logger.info("failNumber:" + failNumber);
+        logger.info("failRow:" + failRow);
+        return AjaxResult.success(String.valueOf(successNumber), failRow);
     }
+
 }

+ 2 - 2
master/src/main/java/com/ruoyi/project/statistics/controller/StatisticsController.java

@@ -184,7 +184,7 @@ public class StatisticsController extends BaseController {
                 if (i == 0 || !Objects.equals(countPfl.get(i - 1).getPointId(), point.getPointId())) {//如果是第一条||前一条和当前这条不是是同一个点
                     sjpfl += getETOC(netTestValue, point.getPointType()) * DateUtils.differentDaysByMillisecond(nc.getTime(), point.getCheckDate()) * 24;
                 } else if (Objects.equals(countPfl.get(i - 1).getPointId(), point.getPointId())) {//如果前一条和当前这条是同一个点
-                    if (new BigDecimal(countPfl.get(i - 1).getNetTestValue()).compareTo(new BigDecimal("50")) < 0) { // 如果前一条检测值小于泄漏标准
+                    if (new BigDecimal(countPfl.get(i - 1).getNetTestValue()).compareTo(new BigDecimal(Integer.parseInt(testValues.get(point.getPointType())))) < 0) { // 如果前一条检测值小于泄漏标准
                         sjpfl += getETOC(netTestValue, point.getPointType()) * DateUtils.differentDaysByMillisecond(point.getCheckDate(), countPfl.get(i - 1).getCheckDate()) * 24;
                     }
                 }
@@ -311,7 +311,7 @@ public class StatisticsController extends BaseController {
                     if (i == 0 || !Objects.equals(countPfl.get(i - 1).getPointId(), item.getPointId())) {//如果是第一条||前一条和当前这条不是是同一个点
                         sjpfl += getETOC(netTestValue, item.getPointType()) * DateUtils.differentDaysByMillisecond(nc.getTime(), item.getCheckDate()) * 24;
                     } else if (Objects.equals(countPfl.get(i - 1).getPointId(), item.getPointId())) {//如果前一条和当前这条是同一个点
-                        if (new BigDecimal(countPfl.get(i - 1).getNetTestValue()).compareTo(new BigDecimal("50")) < 0) { // 如果前一条检测值小于泄漏标准
+                        if (new BigDecimal(countPfl.get(i - 1).getNetTestValue()).compareTo(new BigDecimal(Integer.parseInt(testValues.get(item.getPointType())))) < 0) { // 如果前一条检测值小于泄漏标准
                             sjpfl += getETOC(netTestValue, item.getPointType()) * DateUtils.differentDaysByMillisecond(item.getCheckDate(), countPfl.get(i - 1).getCheckDate()) * 24;
                         }
                     }

+ 6 - 0
master/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -55,9 +55,15 @@ public class CommonController
         }else if ( type.equals("basePoint") ) {
             downloadname = "密封点导入模板.xlsx";
             url = "static/template/base/basePoint.xlsx";
+        }else if ( type.equals("baseRegion") ) {
+            downloadname = "受控区域导入模板.xlsx";
+            url = "static/template/base/baseRegion.xlsx";
         }else if ( type.equals("calibration") ) {
             downloadname = "LDAR仪器校准信息.xlsx";
             url = "static/template/base/calibration.xlsx";
+        }else if ( type.equals("environment") ) {
+            downloadname = "LDAR环境本底值信息.xlsx";
+            url = "static/template/base/environment.xlsx";
         }else if ( type.equals("checkPoint") ) {
             downloadname = "LDAR检测复测信息.xlsx";
             url = "static/template/check/checkPoints.xlsx";

binární
master/src/main/resources/static/template/base/baseRegion.xlsx


binární
master/src/main/resources/static/template/base/environment.xlsx


+ 103 - 0
ui/src/views/base/region/index.vue

@@ -67,6 +67,17 @@
           v-hasPermi="['base:region:remove']"
         >删除</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['base:region:add']"
+        >导入
+        </el-button>
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="warning"
@@ -172,6 +183,45 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
+
+
+
+    <!-- 用户导入对话框 -->
+    <el-dialog v-dialogDrag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
+          <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
+        </div>
+        <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+          <input name="type" :value="upload.type" hidden/>
+        </form>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm" v-loading.fullscreen.lock="fullscreenLoading">{{
+            $t('确 定')
+          }}
+        </el-button>
+        <el-button @click="upload.open = false">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -179,11 +229,30 @@
 import { listRegion, getRegion, delRegion, addRegion, updateRegion, handleApprove } from "@/api/base/region";
 import {getAllPlantName} from "@/api/base/plant";
 import {MessageBox} from "element-ui";
+import {getToken} from "@/utils/auth";
 
 export default {
   name: "Region",
   data() {
     return {
+      // 用户导入参数
+      upload: {
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        //下载模板类型
+        type: "baseRegion",
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/base/region/importData"
+      },
       clientHeight:300,
       plantOperation:[],
       approveStatusOperation:[],
@@ -252,6 +321,40 @@ export default {
     });
   },
   methods: {
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+      this.fullscreenLoading = true;
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = this.$t('用户导入');
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.$refs['downloadFileForm'].submit()
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.fullscreenLoading = false;
+      console.log(response)
+      if (response.data === 0) {
+        this.$alert(this.$t('导入失败!') + response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      } else if (response.data[0] != null) {
+        this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败') + "。", this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      } else {
+        this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      }
+      this.getList();
+    },
     tableCellStyle({row, column, rowIndex, columnIndex}) {
       if (columnIndex === 1 && row.approveStatus == 2) {
         return "color:#13C2C2;";