su
su1124
2024-01-26 5771eee59795899b8adc1fe5cc51cb47bf8c7f0b
su
3个文件已修改
844 ■■■■■ 已修改文件
src/api/team/reportresults.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/examcharge/index.vue 495 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/team/reportresults/index.vue 340 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/team/reportresults.js
@@ -8,3 +8,12 @@
      params: query
    })
  }
// 生成结果分析统计图
export function getJieGuoFenXi(dto) {
  return request({
    url: '/group/inspection/getJieGuoFenXi',
    method: 'post',
    data: dto
  })
}
src/views/system/examcharge/index.vue
@@ -83,158 +83,292 @@
        <el-row :gutter="20">
            <!--部门数据-->
            <el-col :span="8" :xs="24">
                <el-form :inline="true" ref="form" :model="form" class="demo-form-inline" label-width="86px" :rules="rules">
                    <el-form-item label="姓名" prop="name" style="display: flex;">
        <el-form
          :inline="true"
          ref="form"
          :model="form"
          class="demo-form-inline"
          label-width="86px"
          :rules="rules"
        >
          <el-form-item label="姓名" prop="name" style="display: flex">
                        <el-input v-model="form.name" placeholder="请输入姓名" />
                    </el-form-item>
                    <el-form-item label="联系电话" prop="phone" style="display: flex;">
          <el-form-item label="联系电话" prop="phone" style="display: flex">
                        <el-input v-model="form.phone" placeholder="请输入联系电话" />
                    </el-form-item>
                    <!-- @focus="hadeltjpro" -->
                    <el-form-item label="体检项目" prop="tjProName" style="display: flex;">
                        <el-input ref="inputName" v-model="form.tjProName" placeholder="请输入体检项目" />
          <el-form-item label="体检项目" prop="tjProName" style="display: flex">
            <el-input
              ref="inputName"
              v-model="form.tjProName"
              placeholder="请输入体检项目"
            />
                    </el-form-item>
                    <el-form-item label="数量" prop="number" style="display: flex;">
                        <el-input ref="inputName" v-model="form.number" placeholder="请输入数量" />
          <el-form-item label="数量" prop="number" style="display: flex">
            <el-input
              ref="inputName"
              v-model="form.number"
              placeholder="请输入数量"
            />
                    </el-form-item>
                    <el-form-item label="应收金额" prop="ys" style="display: flex;">
          <el-form-item label="应收金额" prop="ys" style="display: flex">
                        <el-input v-model="form.ys" placeholder="金额"></el-input>
                    </el-form-item>
                    <el-form-item label="优惠" prop="zk" style="display: flex;" label-width="103px
                    ">
                        <el-input-number v-model="form.zk" style="width:98%" :precision="2" :step="0.1" :max="10" :min="1"
                            disabled></el-input-number>
          <el-form-item
            label="优惠"
            prop="zk"
            style="display: flex"
            label-width="103px
                    "
          >
            <el-input-number
              v-model="form.zk"
              style="width: 98%"
              :precision="2"
              :step="0.1"
              :max="10"
              :min="1"
              disabled
            ></el-input-number>
                    </el-form-item>
                    <el-form-item label="实收金额" prop="ss" style="display: flex;">
                        <el-input v-model="form.ss" placeholder="实付" @input="numberChange">
          <el-form-item label="实收金额" prop="ss" style="display: flex">
            <el-input
              v-model="form.ss"
              placeholder="实付"
              @input="numberChange"
            >
                        </el-input>
                    </el-form-item>
                    <el-form-item label="付款类型" prop="type" style="display: flex;" label-width="102px">
          <el-form-item
            label="付款类型"
            prop="type"
            style="display: flex"
            label-width="102px"
          >
                        <el-select v-model="form.type" placeholder="请选择付款类型">
                            <el-option v-for="dict in dict.type.dict_pay_type" :key="dict.value" :label="dict.label"
                                :value="dict.value"></el-option>
              <el-option
                v-for="dict in dict.type.dict_pay_type"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              ></el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item>
                        <el-button style="margin-left: 15px" type="primary" size="mini"
                            :disabled="disabled == 1 ? true : false" @click="SubmitEvent">收费</el-button>
                        <el-button style="margin-left: 10px" type="primary" size="mini" @click="resetQuery">重置</el-button>
            <el-button
              style="margin-left: 15px"
              type="primary"
              size="mini"
              :disabled="disabled == 1 ? true : false"
              @click="SubmitEvent"
              >收费</el-button
            >
            <el-button
              style="margin-left: 10px"
              type="primary"
              size="mini"
              @click="resetQuery"
              >重置</el-button
            >
                    </el-form-item>
                </el-form>
            </el-col>
            <!--用户数据-->
            <el-col :span="15" :xs="24">
                <el-form :inline="true" ref="form" :model="queryParams" class="demo-form-inline" label-width="90px">
        <el-form
          :inline="true"
          ref="form"
          :model="queryParams"
          class="demo-form-inline"
          label-width="90px"
        >
                    <el-row>
                        <el-col :span="7">
                            <el-form-item label="姓名" prop="name" style="display: flex;">
              <el-form-item label="姓名" prop="name" style="display: flex">
                                <el-input v-model="queryParams.name" placeholder="请输入姓名" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="联系电话" prop="phone" style="display: flex;">
                                <el-input v-model="queryParams.phone" placeholder="请输入联系电话" />
              <el-form-item label="联系电话" prop="phone" style="display: flex">
                <el-input
                  v-model="queryParams.phone"
                  placeholder="请输入联系电话"
                />
                            </el-form-item>
                        </el-col>
                        <el-col :span="3">
                            <el-form-item>
                                <el-button type="primary" icon="el-icon-search" size="mini"
                                    @click="handleUpdate">查询</el-button>
                <el-button
                  type="primary"
                  icon="el-icon-search"
                  size="mini"
                  @click="handleUpdate"
                  >查询</el-button
                >
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-form>
                <div style="margin-bottom: 10px;">
                    <el-radio-group v-model="queryParams.type" @input="handleUpdate" style="margin-left: 30px">
        <div style="margin-bottom: 10px">
          <el-radio-group
            v-model="queryParams.type"
            @input="handleUpdate"
            style="margin-left: 30px"
          >
                        <el-radio-button label="1">收费记录</el-radio-button>
                        <!-- <el-radio-button label="2">退费记录</el-radio-button> -->
                    </el-radio-group>
                </div>
                <el-table v-loading="loading" :data="tableList" @selection-change="handleSelect" border max-height="720px"
                    :row-style="changRed" style="margin-left: 30px;">
        <el-table
          v-loading="loading"
          :data="tableList"
          @selection-change="handleSelect"
          border
          max-height="720px"
          :row-style="changRed"
          style="margin-left: 30px"
        >
                    <el-table-column type="selection" width="55" align="center" />
                    <el-table-column label="姓名" align="center" prop="customer.cusName" width="90px" />
                    <el-table-column label="手机号" align="center" prop="customer.cusPhone" width="110px"></el-table-column>
                    <el-table-column label="订单流水号" align="center" prop="waterId" width="194px" />
                    <el-table-column label="体检项目" align="center" prop="tjProName" width="120px"
                        :show-overflow-tooltip="true" />
                    <el-table-column label="应收金额" align="center" prop="copeWith" width="90px" />
                    <el-table-column label="实收金额" align="center" prop="paidIn" width="80px" />
                    <el-table-column label="付款类型" align="center" prop="payType" width="80px">
          <el-table-column
            label="姓名"
            align="center"
            prop="customer.cusName"
            width="90px"
          />
          <el-table-column
            label="手机号"
            align="center"
            prop="customer.cusPhone"
            width="110px"
          ></el-table-column>
          <el-table-column
            label="订单流水号"
            align="center"
            prop="waterId"
            width="194px"
          />
          <el-table-column
            label="体检项目"
            align="center"
            prop="tjProName"
            width="120px"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="应收金额"
            align="center"
            prop="copeWith"
            width="90px"
          />
          <el-table-column
            label="实收金额"
            align="center"
            prop="paidIn"
            width="80px"
          />
          <el-table-column
            label="付款类型"
            align="center"
            prop="payType"
            width="80px"
          >
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.dict_pay_type" :value="scope.row.payType" />
              <dict-tag
                :options="dict.type.dict_pay_type"
                :value="scope.row.payType"
              />
                        </template>
                    </el-table-column>
                    <el-table-column label="收费员" align="center" prop="updateBy" width="100px" />
                    <el-table-column label="收退时间" align="center" prop="updateTime" width="160px" />
                    <el-table-column fixed="right" label="操作" align="center" class-name="small-padding " width="80px"
                        v-if="queryParams.type == '1'">
          <el-table-column
            label="收费员"
            align="center"
            prop="updateBy"
            width="100px"
          />
          <el-table-column
            label="收退时间"
            align="center"
            prop="updateTime"
            width="160px"
          />
          <el-table-column
            fixed="right"
            label="操作"
            align="center"
            class-name="small-padding "
            width="80px"
            v-if="queryParams.type == '1'"
          >
                        <template slot-scope="scope">
                            <!-- <el-button size="mini" type="text" @click="handlerefund(scope.row)"
                                v-if="scope.row.remarks != '已退费'">退费</el-button> -->
                            <el-button size="mini" type="text" v-if="scope.row.remarks == '已退费'">{{ scope.row.remarks
                            }}</el-button>
                            <el-button size="mini" type="text" v-if="scope.row.remarks != '已退费'"
                                @click="receipt(scope.row)">补打</el-button>
              <el-button
                size="mini"
                type="text"
                v-if="scope.row.remarks == '已退费'"
                >{{ scope.row.remarks }}</el-button
              >
              <el-button
                size="mini"
                type="text"
                v-if="scope.row.remarks != '已退费'"
                @click="receipt(scope.row)"
                >补打</el-button
              >
                        </template>
                    </el-table-column>
                </el-table>
            </el-col>
        </el-row>
        <!-- 添加补录项目 -->
        <el-dialog :title="title" :visible.sync="Projectopen1" width="980px" style="height: 860px" append-to-body>
    <el-dialog
      :title="title"
      :visible.sync="Projectopen1"
      width="980px"
      style="height: 860px"
      append-to-body
    >
            <el-row type="flex" class="row-bg" justify="space-around">
                <el-col :span="6">
                    <div class="tab3">
                        <div class="outside1">
                            <el-tree ref="tree" :data="Treedata" show-checkbox node-key="proId" check-strictly
                                :props="defaultProps" @check-change="handleCurrentChecked">
              <el-tree
                ref="tree"
                :data="Treedata"
                show-checkbox
                node-key="proId"
                check-strictly
                :props="defaultProps"
                @check-change="handleCurrentChecked"
              >
                            </el-tree>
                        </div>
                    </div>
                </el-col>
            </el-row>
        </el-dialog>
        <div style="
              position: absolute;
              bottom: 100px;
              width: 360px;
              display: none;
            ">
            <div id="printBill" style="width: 280px;font-size: 1px;" ref="printContent">
                <div style="font-size: 1px;">
                    <div style="text-align: center;">
    <div style="position: absolute; bottom: 100px; width: 360px; display: none">
      <div
        id="printBill"
        style="width: 280px; font-size: 1px"
        ref="printContent"
      >
        <div style="font-size: 1px">
          <div style="text-align: center">
                        <h3>{{ hospName }}小票</h3>
                    </div>
                    <div style="margin-top: 4px;">
                        <div>
                            姓名:{{ formIn.name }}
                        </div>
                        <div>
                            电话:{{ formIn.phone }}
                        </div>
                        <div>
                            体检项目:{{ formIn.tjPro }}
                        </div>
                        <div>
                            折扣:{{ formIn.zk + "%" }}
                        </div>
                        <div>
                            实收金额:{{ formIn.ss }}元
                        </div>
                        <div>
                            收费时间:{{ currentDate + " " + currentTime }}
                        </div>
          <div style="margin-top: 4px">
            <div>姓名:{{ formIn.name }}</div>
            <div>电话:{{ formIn.phone }}</div>
            <div>体检项目:{{ formIn.tjPro }}</div>
            <div>折扣:{{ formIn.zk + "%" }}</div>
            <div>实收金额:{{ formIn.ss }}元</div>
            <div>收费时间:{{ currentDate + " " + currentTime }}</div>
                    </div>
                </div>
            </div>
@@ -243,7 +377,13 @@
</template>
    
<script>
import { getTjPrice, addOrderAndDetail, tjRefund, getFlowingWaterList, getPrintSetUp } from "@/api/system/examcharge";
import {
  getTjPrice,
  addOrderAndDetail,
  tjRefund,
  getFlowingWaterList,
  getPrintSetUp,
} from "@/api/system/examcharge";
import { getInfo } from "@/api/login";
import { projectGetList } from "@/api/system/tijian";
import printJS from "print-js";
@@ -253,14 +393,14 @@
    data() {
        let checkPhoneNum = (rule, value, callback) => {
         console.log( value)
      console.log(value);
      let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
      if (value == "" && value == undefined && !value) {
        return callback('');
        return callback("");
      }  else if(value != undefined && value != ""){
        return callback();
      }else if (!patter.test(value)) {
        return callback('');
        return callback("");
      }
    };
        return {
@@ -281,14 +421,11 @@
                label: "proName",
                disabled: function (data, node) {
                    if (data.tjProjectList && data.tjProjectList.length > 0) {
                        return false
            return false;
          } else {
            return true;
                    }
                    else {
                        return true
                    }
                }
        },
            },
            // 选中数组
            ids: [],
@@ -298,7 +435,7 @@
            queryParams: {
                name: null,
                phone: null,
                type: "1"
        type: "1",
            },
            formIn: {
                name: null,
@@ -309,7 +446,6 @@
                ss: "0",
                type: "0",
                zk: 10,
            },
            hospName: "",
            currentDate: "",
@@ -325,7 +461,6 @@
                ss: 0,
                type: "0",
                zk: 10,
            },
            // 表单校验
            rules: {
@@ -333,96 +468,85 @@
                tjPro: [
                    { required: true, validator: checkPhoneNum, trigger: "change" },
                ],
                type: [
                    { required: true, validator: checkPhoneNum, trigger: "blur" },
                ],
        type: [{ required: true, validator: checkPhoneNum, trigger: "blur" }],
            },
        };
    },
    created() {
        this.getList();
        this.handleUpdate();
        this.getCurrentDateTime()
    this.getCurrentDateTime();
        this.startTimer()
    this.startTimer();
    },
    methods: {
        getCurrentDateTime() {
            const currentDate = new Date()
      const currentDate = new Date();
            // 格式化日期:YYYY-MM-DD
            const year = currentDate.getFullYear()
      const year = currentDate.getFullYear();
            const month = String(currentDate.getMonth() + 1).padStart(2, '0')
      const month = String(currentDate.getMonth() + 1).padStart(2, "0");
            const day = String(currentDate.getDate()).padStart(2, '0')
      const day = String(currentDate.getDate()).padStart(2, "0");
            this.currentDate = `${year}-${month}-${day}`
      this.currentDate = `${year}-${month}-${day}`;
            // 格式化时间:HH:mm:ss
            const hours = String(currentDate.getHours()).padStart(2, '0')
      const hours = String(currentDate.getHours()).padStart(2, "0");
            const minutes = String(currentDate.getMinutes()).padStart(2, '0')
      const minutes = String(currentDate.getMinutes()).padStart(2, "0");
            const seconds = String(currentDate.getSeconds()).padStart(2, '0')
      const seconds = String(currentDate.getSeconds()).padStart(2, "0");
            this.currentTime = `${hours}:${minutes}:${seconds}`
      this.currentTime = `${hours}:${minutes}:${seconds}`;
        },
        startTimer() {
            this.timer = setInterval(() => {
                this.getCurrentDateTime()
            }, 1000) //每秒钟更新一次
        this.getCurrentDateTime();
      }, 1000); //每秒钟更新一次
        },
        beforeDestroy() {
            clearInterval(this.timer)
      clearInterval(this.timer);
        },//清除定时器,以避免内存泄露。
        getList() {
            getTjPrice().then(res => {
      getTjPrice().then((res) => {
                if (res.data) {
                    const r = /^\+?[0-9][0-9]*$/; //正整数(可以0打头)
                    if (r.test(res.data)) {
                        this.form.ys = res.data + ".00";
                    } else {
                        this.form.ys = res.data
            this.form.ys = res.data;
                    }
                    this.form.ss = this.form.ys
          this.form.ss = this.form.ys;
                }
            })
      });
            getInfo(this.queryParams).then((response) => {
                this.hospName = response.hospName;
            });
        },
        changRed({ row }) {
            if (row.remarks == '已退费') { // 变颜色的条件
      if (row.remarks == "已退费") {
        // 变颜色的条件
                return {
                    backgroundColor: "#9cdcfe"  // 这个return的就是样式 可以是color 也可以是backgroundColor
                }
          backgroundColor: "#9cdcfe", // 这个return的就是样式 可以是color 也可以是backgroundColor
        };
            }
        },
        handleToggleSearch() {
            if (this.toggleSearchStatus == "0") {
                this.toggleSearchStatus = "1"
                this.iconData = "el-icon-arrow-up"
        this.toggleSearchStatus = "1";
        this.iconData = "el-icon-arrow-up";
            } else {
                this.toggleSearchStatus = "0"
                this.iconData = "el-icon-arrow-down"
        this.toggleSearchStatus = "0";
        this.iconData = "el-icon-arrow-down";
            }
        },
        //重置按钮
        resetQuery() {
@@ -432,8 +556,8 @@
                phone: null,
                tjProName: "体检费",
                number: 1,
                ys: 0.00,
                ss: 0.00,
        ys: 0.0,
        ss: 0.0,
                type: "0",
                zk: 10,
            };
@@ -445,40 +569,37 @@
            this.DataList = this.$refs.multipleTable.selection;
        },
        handleUpdate() {
            getFlowingWaterList(this.queryParams).then(res => {
                this.tableList = res.data
            })
      getFlowingWaterList(this.queryParams).then((res) => {
        this.tableList = res.data;
      });
        },
        hadeltjpro() {
            /** 查询部门下拉树结构 */
            projectGetList().then((response) => {
                this.Treedata = response.data.list;
            });
            this.Projectopen1 = true;
            this.title = "项目列表";
        },
        // 点击获取每个树节点
        handleCurrentChecked(data, checked, checkedNodes) {
            console.log(data, checked)
      console.log(data, checked);
            // this.form.tjPro = "",
            //     this.form.ys = 0
            if (checked) {
                // this.menuOptions.id = data.id
                this.$refs.tree.setCheckedKeys([data.proId], true)
        this.$refs.tree.setCheckedKeys([data.proId], true);
            } else {
                // this.menuOptions.id = null
            }
            if (checked == true) {
                this.form.tjPro = data.proId
                this.form.tjProName = data.proName
        this.form.tjPro = data.proId;
        this.form.tjProName = data.proName;
                const r = /^\+?[0-9][0-9]*$/; //正整数(可以0打头)
                if (r.test(data.proPrice)) {
                    this.form.ys = data.proPrice + ".00";
                } else {
                    this.form.ys = data.proPrice
          this.form.ys = data.proPrice;
                }
            }
@@ -487,11 +608,11 @@
        // 折扣
        numberChange() {
            let price = (this.form.ss / this.form.ys) * 10
            this.form.zk = price.toFixed(2)
      let price = (this.form.ss / this.form.ys) * 10;
      this.form.zk = price.toFixed(2);
        },
        receipt(row) {
            getPrintSetUp().then(res => {
      getPrintSetUp().then((res) => {
                if (res.msg == "0") {
                    this.formIn = {
                        name: row.customer.cusName,
@@ -500,14 +621,13 @@
                        ys: row.copeWith,
                        ss: row.paidIn,
                        zk: row.discount,
                    }
          };
                    this.$nextTick(() => {
                        const style =
                            "@media print { @page{margin:0 10mm,size:4mm 6mm;}};"; //打印时去掉眉页眉尾
            const style = "@media print { @page{margin:0 10mm,size:4mm 6mm;}};"; //打印时去掉眉页眉尾
                        printJS({
                            printable: "printBill", // 标签元素id
                            noPrint: ".noPrint",
                            type: 'html',
              type: "html",
                            header: "",
                            targetStyles: ["*"],
                            maxWidth: "800",
@@ -521,22 +641,21 @@
                    const params = { viewNum, tjnumber };
                    this.$tab.openPage("个人发票", "/report/charge", params);
                }
                this.resetQuery()
                this.handleUpdate()
                this.getList()
            })
        this.resetQuery();
        this.handleUpdate();
        this.getList();
      });
        },
        // 收费
        SubmitEvent() {
            if (this.form.name) {
                this.formIn = this.form
                addOrderAndDetail(this.form).then(res => {
        this.formIn = this.form;
        addOrderAndDetail(this.form).then((res) => {
                    if (res.code == 200) {
                        this.tjNumbers = res.msg
            this.tjNumbers = res.msg;
                        this.$modal.msgSuccess("收费成功");
                        getPrintSetUp().then(res => {
            getPrintSetUp().then((res) => {
                            if (res.msg == "0") {
                                this.$nextTick(() => {
                                    const style =
@@ -544,7 +663,7 @@
                                    printJS({
                                        printable: "printBill", // 标签元素id
                                        noPrint: ".noPrint",
                                        type: 'html',
                    type: "html",
                                        header: "",
                                        targetStyles: ["*"],
                                        maxWidth: "800",
@@ -552,50 +671,46 @@
                                        style,
                                    });
                                });
                            } else {
                                const tjnumber = this.tjNumbers;
                                const viewNum = "809623418249637888";
                                const params = { viewNum, tjnumber };
                                this.$tab.openPage("个人发票", "/report/charge", params);
                            }
                            this.resetQuery()
                            this.handleUpdate()
                            this.getList()
                        })
              this.resetQuery();
              this.handleUpdate();
              this.getList();
            });
                    }
                })
        });
            } else {
                this.$modal.msgError("请填写姓名");
            }
        },
        handlerefund(row) {
            this.$confirm('您确定要退费吗?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
      this.$confirm("您确定要退费吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
                let data = {
                    waterId: row.waterId
                }
                tjRefund(data).then(res => {
            waterId: row.waterId,
          };
          tjRefund(data).then((res) => {
                    if (res.code == 200) {
                        this.$modal.msgSuccess("退费成功");
                        this.handleUpdate()
              this.handleUpdate();
                    }
          });
                })
            }).catch(() => {
        .catch(() => {
                this.$message({
                    type: 'info',
                    message: '已取消退费'
            type: "info",
            message: "已取消退费",
                });
            });
        }
    },
    },
};
</script>
src/views/team/reportresults/index.vue
@@ -110,11 +110,11 @@
          >统计结果</el-button
        >
      </el-col>
      <el-col :span="1.5">
      <!-- <el-col :span="1.5">
        <el-button type="primary" size="mini" @click="clear"
          >清空已选输出列</el-button
        >
      </el-col>
      </el-col> -->
    </el-row>
    <div style="width: 100%; margin-left: 10px; display: flex">
@@ -163,6 +163,7 @@
            prop="company"
            label="单位"
            align="center"
            width="170px"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
@@ -175,41 +176,33 @@
          </el-table-column>
        </el-table>
      </div>
      <div style="width: 50%; display: flex">
        <el-tabs
        type="border-card"
        style="height: 560px; margin: 0 10px; width: 100%"
      <div style="width: 60%; display: flex">
        <div class="outside1">
          <el-input placeholder="输入关键字进行过滤" v-model="filterText">
          </el-input>
          <el-tree
            ref="tree"
            v-loading="loading"
            :data="Treedata"
            show-checkbox
            node-key="proId"
            :props="defaultProps"
            @check-change="handleCurrentChecked"
            :filter-node-method="filterNode"
      >
        <el-tab-pane label="单项">
          <div class="tab3">
            <!-- <div class="tab2"> -->
            <v-tree-transfer
              :treeData="treedataList"
              :defaultProps="{ children: 'tjProjectList', label: 'proName' }"
              :defaultKeys="defaultKeys"
              @changeKeys="changeCategoryKeys"
              :key="datekey"
            ></v-tree-transfer>
            <!-- <el-tree ref="tree" :data="treedataList" show-checkbox node-key="proId" :props="defaultProps"
                :default-expanded-keys="treeId" :default-checked-keys="treeList" @check-change="handleCurrentChecked">
              </el-tree> -->
            <!-- </div> -->
            <!-- <el-button
                style="
                  width: 20px;
                  height: 100px;
                  margin-left: 10px;
                  margin-top: 20%;
                  font-size: 10px;
                "
                type="primary"
                size="mini"
                @click="submit"
                ><i style="font-size: 18px" class="el-icon-d-arrow-right"></i
              ></el-button> -->
          </el-tree>
          </div>
        </el-tab-pane>
      </el-tabs>
        <div>
          <el-table
            :data="DataList"
            style="width: 400px; margin-left: 40px"
            border
          >
            <el-table-column prop="proName" label="已选项目列表" align="center">
            </el-table-column>
          </el-table>
        </div>
      </div>
    </div>
    <div style="margin-right: 64%">
@@ -240,12 +233,69 @@
      <el-dialog
        :title="title2"
        :visible.sync="open"
        width="1300px"
        width="1000px"
        append-to-body
      >
        <div style="height: 620px; margin-top: 10px">
        <!-- <div style="height: 620px; margin-top: 10px">
          <div id="main" style="width: 95%; height: 400px"></div>
        </div> -->
        <!-- <el-card
          class="box-card"
          v-for="(item, index) in rongjiList"
          :key="index"
        >
          <div slot="header" class="clearfix">
            <span>{{ item.project.proName }}</span>
        </div>
          <div>
            <el-table :data="item.zhengchang" style="width: 100%">
               <el-table-column prop="orderDetailId" label="体检号" width="180">
              </el-table-column>
              <el-table-column prop="createBy" label="姓名" width="180">
              </el-table-column>
            </el-table>
             <el-table :data="item.yichang" style="width: 100%">
              <el-table-column prop="orderDetailId" label="体检号" width="180">
              </el-table-column>
              <el-table-column prop="createBy" label="姓名" width="180">
              </el-table-column>
            </el-table>
          </div>
        </el-card> -->
        <el-collapse v-model="activeNames">
          <el-collapse-item v-for="(item, index) in rongjiList" :key="index">
            <template slot="title">
              {{ item.project.proName }}
            </template>
            <div style="display: flex">
              <div style="display: flex;flex-direction: column;width:50%" >
                <span>正常</span>
                <el-table border :data="item.zhengchang" style="width: 100%">
                  <el-table-column
                    prop="tjNumber"
                    label="体检号"
                  >
                  </el-table-column>
                  <el-table-column prop="cusName" label="姓名" >
                  </el-table-column>
                </el-table>
              </div>
              <div style="display: flex;flex-direction: column;width:50%">
                <span>异常</span>
                <el-table border :data="item.yichang" style="width: 100%">
                <el-table-column
                  prop="tjNumber"
                  label="体检号"
                >
                </el-table-column>
                <el-table-column prop="cusName" label="姓名" >
                </el-table-column>
              </el-table>
              </div><br>
            </div>
          </el-collapse-item>
        </el-collapse>
      </el-dialog>
    </div>
  </div>
@@ -258,20 +308,7 @@
require("echarts/lib/component/legend");
require("echarts/lib/chart/pie");
import VTreeTransfer from "../../system/tijian/TreeTransfer.vue";
import {
  deptTreeSelect,
  projectGetList,
  getOrder,
  getCusIdcard,
  getPackageListName,
  getaddtTransition,
  getTransitionList,
  getByTeamNo,
  getLoadFile,
  getIsRequired,
  getconfigKey,
  getHistryTjOrderProByCusIdCard,
} from "@/api/system/tijian";
import { projectGetList } from "@/api/system/tijian";
import {
  getPeopleList,
  getDeptAndDwDeptByComp,
@@ -280,20 +317,23 @@
  getStatist,
} from "@/api/team/disease";
import { listComp } from "@/api/system/comp";
import { getJieGuoFenXi } from "@/api/team/reportresults";
export default {
  components: {
    VTreeTransfer,
  },
  data() {
    return {
      datekey: Date.now(),
      defaultKeys: [],
      activeNames: ["1"],
      proIds: [],
      filterText: "",
      DataList: [],
      loading: false,
      defaultProps: {
        children: "tjProjectList",
        label: "proName",
      },
      tjProjectList: [],
      treedataList: [],
      Treedata: [],
      rongjiList: [],
      aids: [],
      tjNums: [],
@@ -364,31 +404,51 @@
    this.getData();
    this.datekey = Date.now();
  },
  watch: {
    filterText(val) {
      this.$refs.tree.filter(val);
    },
  },
  methods: {
    changeCategoryKeys(val) {
        console.log(val);
      this.proIds = [];
      this.proIds = val;
      // if (this.DataList.length != 0) {
      //   this.DataList.forEach((item) => {
      //     this.proIds.push(item.proId);
      //   });
      // } else {
      //   this.proIds = [];
      // }
    filterNode(value, data) {
      if (!value) return true;
      return data.proName.indexOf(value) !== -1;
    },
    getData() {
      /** 查询部门下拉树结构 */
      this.loading = true;
      /** 查询部门下拉树结构 */
      projectGetList().then((response) => {
        this.treedataList = response.data.list;
        console.log(this.treedataList);
        this.dXData = response.data.list;
        this.Treedata = response.data.list;
        this.loading = false;
        return;
      });
    },
    // 点击获取每个树节点
    handleCurrentChecked(data, checked, checkedNodes) {
      // if (!data.tjProjectList) {
      //   return;
      // }
      if (data.proParentId != "0") {
        if (checked === true) {
          this.DataList.push(data);
        } else {
          this.DataList.pop(data);
          this.list1 = true;
        }
      }
      // this.TotalPrice1 = 0;
      // this.proIds = [];
      // if (this.DataList.length != 0) {
      //   this.list1 = false;
      //   this.DataList.forEach((item) => {
      //     this.TotalPrice1 = item.proPrice + this.TotalPrice1;
      //     item.tjProjectList.forEach((item1) => {
      //       this.proIds.push(item1.proId);
      //     });
      //   });
      // }
    },
    // / 处理默认选中当前日期
    getNowTime() {
      var curDate = new Date().getTime();
@@ -474,96 +534,66 @@
    },
    tongji() {
      this.title2 = "统计图表";
      let tjRulesStatisticsDto = {
        aids: this.aids,
        tjNums: this.tjNums,
      };
      console.log(tjRulesStatisticsDto);
      if (
        tjRulesStatisticsDto.aids.length === 0 ||
        tjRulesStatisticsDto.tjNums.length === 0
      ) {
      if (this.tjNums.length === 0 || this.DataList === 0) {
        this.$message.warning("请选择人员和病种!");
      } else {
        this.open = true;
        getStatist(tjRulesStatisticsDto).then((res) => {
          this.rongjiList = res.data;
          this.$nextTick(() => {
            var chartDom = document.getElementById("main");
            var myChart = echarts.init(chartDom);
            var option;
            option = {
              title: {
                text: "病种统计",
                left: "center",
              },
              tooltip: {
                trigger: "item",
                formatter: "{a} <br/>{b} : {c} ({d}%)",
              },
              legend: {
                // type: 'scroll',
                orient: "vertical",
                right: 10,
                top: 80,
                bottom: 20,
                data: this.rongjiList,
              },
              series: [
                {
                  name: "病种名称",
                  type: "pie",
                  radius: "55%",
                  center: ["25%", "60%"],
                  data: this.rongjiList,
                  emphasis: {
                    itemStyle: {
                      shadowBlur: 10,
                      shadowOffsetX: 0,
                      shadowColor: "rgba(0, 0, 0, 0.5)",
                    },
                  },
                },
              ],
            };
            option && myChart.setOption(option);
            let sizeFun = function () {
              myChart.resize();
            };
            window.addEventListener("resize", sizeFun);
        this.DataList.forEach((item) => {
          this.proIds.push(item.proId);
          });
          // let dataValue1 = [];
          // this.dateAll = [];
          // this.rongjiList.forEach((item) => {
          //   console.log(item);
          //   this.dateAll.push(item.bingzhong);
          //   dataValue1.push(item.num);
          // });
          // let myChart = this.$echarts.init(document.getElementById("main"));
          // myChart.setOption({
          //   legend: {},
        let dto = {
          proIds: this.proIds,
          tjNums: this.tjNums,
        };
          //   tooltip: {},
          //   xAxis: {
          //     type: "category",
          //     name: "病种名称",
          //     data: this.dateAll,
        this.open = true;
        getJieGuoFenXi(dto).then((res) => {
          this.rongjiList = res.data;
          // this.$nextTick(() => {
          //   var chartDom = document.getElementById("main");
          //   var myChart = echarts.init(chartDom);
          //   var option;
          //   option = {
          //     title: {
          //       text: "病种统计",
          //       left: "center",
          //   },
          //   yAxis: {
          //     type:'value'
          //     tooltip: {
          //       trigger: "item",
          //       formatter: "{a} <br/>{b} : {c} ({d}%)",
          //     },
          //     legend: {
          //       // type: 'scroll',
          //       orient: "vertical",
          //       right: 10,
          //       top: 80,
          //       bottom: 20,
          //       data: this.rongjiList,
          //   },
          //   series: [
          //     {
          //       name: "人数",
          //       type: "bar",
          //       data: dataValue1,
          //         name: "病种名称",
          //         type: "pie",
          //         radius: "55%",
          //         center: ["25%", "60%"],
          //         data: this.rongjiList,
          //         emphasis: {
          //           itemStyle: {
          //             shadowBlur: 10,
          //             shadowOffsetX: 0,
          //             shadowColor: "rgba(0, 0, 0, 0.5)",
          //           },
          //         },
          //     },
          //   ],
          //   };
          //   option && myChart.setOption(option);
          //   let sizeFun = function () {
          //     myChart.resize();
          //   };
          //   window.addEventListener("resize", sizeFun);
          // });
        });
      }
@@ -576,8 +606,14 @@
.el-pagination {
  margin-left: 47%;
}
.tab3 {
  width: 100%;
// .tab3 {
//   width: 100%;
//   display: flex;
// }
.outside1 {
  width: 500px;
  display: flex;
  margin-top: 8px;
  flex-direction: column;
}
</style>