1
lkk
2025-04-11 4155e844855e22f52e82f657eab6d3c1e616706e
src/views/reservation/resercopy/index.vue
@@ -194,6 +194,7 @@
        <!-- <el-table-column label="联系邮箱" align="center" prop="email" /> -->
        <!-- <el-table-column label="体检类别" align="center" prop="tjCategory" /> -->
        <el-table-column label="分组" align="center" prop="groupingName" />
        <el-table-column label="所在地" align="center" prop="szd" />
        <el-table-column label="项目收费" align="center" prop="ysPrice" />
      </el-table>
    </div>
@@ -208,6 +209,7 @@
      <el-upload
        ref="upload"
        :limit="1"
        :key="uploadKey"
        accept=".xlsx, .xls"
        :headers="upload.headers"
        :data="data"
@@ -636,6 +638,7 @@
        ],
      },
      ListObj: {},
      uploadKey:0,
      // 遮罩层
      loading: true,
      pacStatus: "启用",
@@ -696,7 +699,7 @@
      });
    },
    idFn(value) {
      console.log(value);
      this.userList = []
      if (value) {
        this.data.dwId = value;
        Deptlist(value).then((response) => {
@@ -872,6 +875,8 @@
    /** 导入按钮操作 */
    handleImport() {
      if (this.objs.drugManufacturerId && this.objs.reservationTime) {
        this.$refs.upload?.clearFiles();
        this.uploadKey = Date.now(); // 改变 key 强制重新渲染组件
        this.upload.title = "用户导入";
        this.upload.open = true;
      } else {
@@ -892,13 +897,13 @@
    },
    // 文件上传成功处理
    handleFileSuccess(response, file, fileList) {
      console.log(response, 666666);
      if (response.code == 500) {
        console.log(22222222222);
        this.isdisabled = true;
        // Message.warning(response.msg);
        // this.$modal.msgError(response.msg);
        // this.$modal.msgError("人员"+ response.data.list + "信息错误");
        const errorList = response.data.list.join(", ");
        this.$confirm(`${errorList}`, `${response.msg}`, {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
@@ -906,10 +911,11 @@
          center: true,
          dangerouslyUseHTMLString: true,
        });
      }
      this.ListObj = response.data;
      }else{
        this.isdisabled = false;
        this.ListObj = response.data;
      this.userList = response.data.list;
      this.userList.forEach((item) => {
        this.CompanyList.forEach((item1) => {
          if (item1.drugManufacturerId == this.objs.drugManufacturerId) {
@@ -917,11 +923,12 @@
          }
        });
      });
      }
      this.upload.open = false;
      this.upload.isUploading = false;
      this.$refs.upload.clearFiles();
      this.leftList = response.msg;
      console.log(response.code);
      if (this.leftList == "操作失败") {
        this.isdisabled = true;
@@ -935,15 +942,17 @@
          "导入结果",
          { dangerouslyUseHTMLString: true }
        );
      } else {
        this.isdisabled = false;
        this.$alert(
          "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
            response.msg,
          { dangerouslyUseHTMLString: true }
        );
        this.rightList = response;
      }
      }
      // else {
      //   console.log(11111)
      //   this.isdisabled = false;
      //   this.$alert(
      //     "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
      //       response.msg,
      //     { dangerouslyUseHTMLString: true }
      //   );
      //   this.rightList = response;
      // }
      for (let i = 0; i < fileList.length; i++) {
        if (file.name != fileList[i].name) {
          this.fileList.push({