WXL
2024-10-22 b10795e18a07b9beb72f25406f26f42491828be5
src/views/patient/patient/index.vue
@@ -22,7 +22,7 @@
    <!-- 右侧数据 -->
    <div class="leftvlue">
      <div>
      <!-- <div>
        <el-row :gutter="10">
          <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
            <el-card
@@ -45,7 +45,7 @@
            </el-card>
          </el-col>
        </el-row>
      </div>
      </div> -->
      <div class="leftvlue-bg">
        <el-row :gutter="20">
          <!--用户数据-->
@@ -109,10 +109,10 @@
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="患者来源" prop="tagId">
              <el-form-item label="患者范围" prop="tagId">
            <el-select
                v-model="queryParams.searchscope"
                placeholder="请选择患者来源"
                placeholder="请选择患者范围"
              >
                <el-option
                  v-for="item in source"
@@ -215,6 +215,7 @@
            <el-table
              v-loading="loading"
              :data="userList"
               height="660"
              @selection-change="handleSelectionChange"
            >
              <el-table-column type="selection" width="50" align="center" />
@@ -648,20 +649,19 @@
          :limit="1"
          accept=".xlsx, .xls"
          :headers="upload.headers"
          :action="upload.url + '?updateSupport=' + upload.updateSupport"
          :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">将文件拖到此处,或<em>点击上传</em></div>
          <div class="el-upload__tip text-center" slot="tip">
            <div class="el-upload__tip" slot="tip">
            <!-- <div class="el-upload__tip" slot="tip">
              <el-checkbox v-model="upload.updateSupport" />
              是否更新已经存在的用户数据
            </div>
            </div> -->
            <span>仅允许导入xls、xlsx格式文件。</span>
            <el-link
              type="primary"
@@ -670,7 +670,7 @@
              @click="importTemplate"
              >下载模板
            </el-link>
            <el-link
            <!-- <el-link
              type="success"
              :underline="false"
              style="font-size: 24px; vertical-align: baseline"
@@ -678,7 +678,7 @@
              target="_blank"
            >
              查看模板</el-link
            >
            > -->
          </div>
        </el-upload>
      </div>
@@ -949,13 +949,14 @@
        // 设置上传的请求头部
        headers: { Authorization: "Bearer " + getToken() },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/system/user/importData",
        url: process.env.VUE_APP_BASE_API + "/smartor/import/importPatInfo",
      },
      // 查询参数
      queryParams: {
        pageNum: 1,
        allhosp: "1",
        pageSize: 10,
        searchscope:2,
        idcardno: undefined,
        name: undefined,
        status: undefined,
@@ -1016,6 +1017,22 @@
  methods: {
    /** 查询患者列表 */
    getList() {
      if (this.queryParams.searchscope == 1) {
        this.queryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.queryParams.leavehospitaldistrictcodes=null;
      } else if (this.queryParams.searchscope == 2) {
        this.queryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
          this.queryParams.leaveldeptcodes=null;
      } else {
        this.queryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.queryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      this.loading = true;
      messagelistpatient(this.queryParams).then((response) => {
        this.userList = response.rows;
@@ -1078,22 +1095,7 @@
    },
    /** 搜索按钮操作 */
    handleQuery() {
      if (this.queryParams.searchscope == 1) {
        this.queryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.queryParams.leavehospitaldistrictcodes=null;
      } else if (this.queryParams.searchscope == 2) {
        this.queryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
          this.queryParams.leaveldeptcodes=null;
      } else {
        this.queryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.queryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      this.queryParams.pageNum = 1;
      this.getList();
    },
@@ -1224,7 +1226,7 @@
    /** 下载模板操作 */
    importTemplate() {
      this.download(
        "system/user/importTemplate",
        "smartor/import/getImportPatTemplate",
        {},
        `user_template_${new Date().getTime()}.xlsx`
      );