WXL
2024-10-12 2fe94c2414aa1b8840e4dbf9a8e19121a8a867b6
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" />
@@ -956,6 +957,7 @@
        pageNum: 1,
        allhosp: "1",
        pageSize: 10,
        searchscope:2,
        idcardno: undefined,
        name: undefined,
        status: undefined,
@@ -1016,6 +1018,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 +1096,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();
    },