WXL (wul)
2 天以前 23f74bc3f782d183f66a08bd8ce4790cc61f4e61
src/views/sfstatistics/percentage/index.vue
@@ -27,35 +27,34 @@
                  </el-option>
                </el-select>
                <el-select
                  style="margin-left: 10px"
                  v-if="queryParams.statisticaltype == 1"
                  v-model="queryParams.leavehospitaldistrictcodes"
                  v-model="queryParams.leavehospitaldistrictcode"
                  size="medium"
                  multiple
                  filterable
                  placeholder="请选择病区"
                >
                  <el-option
                    v-for="item in flatArrayhospit"
                    :key="item.value"
                    v-for="item in flatArray"
                    :key="item.deptCode"
                    :label="item.label"
                    :value="item.value"
                    :value="item.deptCode"
                  >
                  </el-option>
                </el-select>
                <el-select
                  v-else-if="queryParams.statisticaltype == 2"
                  v-model="queryParams.deptcodes"
                  v-model="queryParams.deptCode"
                  size="medium"
                  multiple
                  filterable
                  placeholder="请选择科室"
                >
                  <el-option
                    v-for="item in flatArraydept"
                    :key="item.value"
                    v-for="item in flatArray"
                    :key="item.deptCode"
                    :label="item.label"
                    :value="item.value"
                    :value="item.deptCode"
                  >
                  </el-option>
                </el-select>
@@ -83,7 +82,6 @@
              >
                <el-date-picker
                  v-model="queryParams.dateRange"
                  value-format="yyyy-MM-dd"
                  type="daterange"
                  range-separator="至"
                  start-placeholder="开始日期"
@@ -107,14 +105,18 @@
                  >重置</el-button
                >
              </el-form-item>
              <el-col :span="19">
            </el-form>
            <el-row :gutter="10" class="mb8">
              <el-col :span="1.5">
                <el-button
                  type="warning"
                  type="primary"
                  plain
                  icon="el-icon-download"
                  icon="el-icon-plus"
                  size="medium"
                  @click="handleExport"
                  >导出</el-button
                  @click="addladeltag"
                  v-hasPermi="['system:user:add']"
                  >新增</el-button
                >
                <el-button
                  type="primary"
@@ -125,7 +127,8 @@
                  >统计趋势图</el-button
                >
              </el-col>
            </el-form>
            </el-row>
            <el-table
              v-loading="loading"
              :data="userList"
@@ -343,17 +346,8 @@
              <el-table-column
                label="出院病区"
                align="center"
                sortable
                key="leavehospitaldistrictname"
                prop="leavehospitaldistrictname"
                width="150"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="科室"
                align="center"
                key="deptname"
                prop="deptname"
                :show-overflow-tooltip="true"
              />
              <el-table-column
@@ -423,24 +417,6 @@
                      }}%</span
                    >
                  </template> -->
                </el-table-column>
                <el-table-column
                  label="及时率"
                  align="center"
                  width="120"
                  key="rate"
                  prop="rate"
                >
                  <template slot-scope="scope">
                    <el-button
                      size="medium"
                      type="text"
                      @click="Seedetails(scope.row)"
                      ><span class="button-zx"
                        >{{ (Number(scope.row.rate) * 100).toFixed(2) }}%</span
                      ></el-button
                    >
                  </template>
                </el-table-column>
                <el-table-column
                  label="人工"
@@ -798,11 +774,16 @@
import {
  toamendtag,
  addapitag,
  detailstag,
  deletetag,
  changetagcategory,
  toamendtagcategory,
  addtagcategory,
  deletetagcategory,
  listtag,
  tagclassifylist,
} from "@/api/system/label";
import store from "@/store";
import { getSfStatistics, selectTimelyRate } from "@/api/system/user";
import { getSfStatistics, deptTreeSelect } from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -831,7 +812,7 @@
  },
];
export default {
  name: "Percentage",
  name: "questionnaire",
  dicts: ["sys_normal_disable", "sys_user_sex"],
  components: { Treeselect },
  data() {
@@ -856,10 +837,9 @@
      idds: "", //分类id
      // 总条数
      total: 0,
      flatArrayhospit: [],
      flatArraydept: [],
      patienttotal: 0,
      logsheetlist: [],
      flatArray: [],
      deptflatArray: [],
      Statisticallist: [
        {
          label: "病区统计",
@@ -870,10 +850,6 @@
          value: 2,
        },
      ],
      patientqueryParams: {
        pn: 1,
        ps: 10,
      },
      amendtag: false, //是否修改类别
      lstamendtag: false, //是否修改标签
      scavisible: false, //删除弹框
@@ -901,10 +877,6 @@
      postOptions: [],
      // 角色选项
      roleOptions: [],
      // 存储所有科室代码
      allDeptCodes: [],
      // 存储所有病区代码
      allWardCodes: [],
      // 表单参数
      form: {},
      forms: {
@@ -916,7 +888,7 @@
      goQRCodeVisible: false, //二维码弹框
      sidecolumnval: "", //类别搜索
      propss: { multiple: true },
      SeedetailsVisible: false,
      options: [
        {
          value: 1,
@@ -998,30 +970,14 @@
  },
  watch: {},
  created() {
    this.getDeptTree();
    this.getList();
    this.getDeptTree();
  },
  methods: {
    /** 查询标签列表 */
    getList() {
      // 处理查询参数
      const params = {
        ...this.queryParams,
        // 如果选择了"全部",则传所有病区/科室代码
        leavehospitaldistrictcodes:
          this.queryParams.leavehospitaldistrictcodes.includes("all")
            ? this.allWardCodes
            : this.queryParams.leavehospitaldistrictcodes,
        deptcodes: this.queryParams.deptcodes.includes("all")
          ? this.allDeptCodes
          : this.queryParams.deptcodes,
      };
      // 移除可能存在的"all"值
      delete params.leavehospitaldistrictcodes.all;
      delete params.deptcodes.all;
      getSfStatistics(params).then((response) => {
      getSfStatistics(this.queryParams).then((response) => {
        console.log(response);
        // this.total = response.total;
        this.userList = response.data;
@@ -1077,11 +1033,12 @@
    // 获取科室树
    getDeptTree() {
      // 科室列表
      this.flatArraydept = store.getters.belongDepts.map((dept) => {
        return {
          label: dept.deptName,
          value: dept.deptCode,
        };
      deptTreeSelect().then((response) => {
        this.deptOptions = response.data;
        console.log(this.deptOptions, " this.deptOptions");
        this.flatArray = this.flattenArray(response.data);
        console.log(this.flatArray, "this.flatArray");
      });
      // 存储所有科室代码
      this.allDeptCodes = store.getters.belongDepts.map(
@@ -1132,41 +1089,6 @@
        tagdescription: "",
        tagid: "",
      };
    },
    Seedetails(row) {
      this.SeedetailsVisible = true;
      this.Seedloading = true;
      this.patientqueryParams.starttime = this.parseTime(
        this.queryParams.dateRange[0]
      );
      this.patientqueryParams.endtime = this.parseTime(
        this.queryParams.dateRange[1]
      );
      this.patientqueryParams.deptcode = row.deptcode;
      selectTimelyRate(this.patientqueryParams).then((response) => {
        this.logsheetlist = response.data.detail;
        this.patienttotal = response.data.total;
        this.Seedloading = false;
      });
    },
    SeedetailsgGo(row) {
      this.SeedetailsVisible = false;
      let type = "";
      if (row.preachformson && row.preachformson.includes("3")) {
        type = 1;
      }
      setTimeout(() => {
        this.$router.push({
          path: "/followvisit/record/detailpage/",
          query: {
            taskid: row.taskid,
            patid: row.patid,
            id: row.id,
            Voicetype: type,
            // visitCount: this.topqueryParams.visitCount,
          },
        });
      }, 300);
    },
    // 添加/修改标签
    Maintenancetag() {
@@ -1237,14 +1159,7 @@
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      if (!this.queryParams.dateRange) this.queryParams.dateRange = [];
      if (this.queryParams.statisticaltype == 1) {
        this.queryParams.deptcodes = [];
      } else if (this.queryParams.statisticaltype == 2) {
        this.queryParams.leavehospitaldistrictcodes = [];
      }
      console.log(this.queryParams.dateRange);
      console.log();
      this.queryParams.startTime = this.parseTime(
        this.queryParams.dateRange[0]
      );