su
su1124
2024-01-25 3435a2b1b3e237ee53c98ae7c044d0e84cfa521c
su
6个文件已修改
1个文件已添加
1621 ■■■■■ 已修改文件
src/api/team/reportresults.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/check/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hosp/harmType/index.vue 679 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reservation/resercopy/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/comp/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/dept/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/team/reportresults/index.vue 913 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/team/reportresults.js
New file
@@ -0,0 +1,10 @@
import request from '@/utils/request'
// 团检病种页面查询人员列表接口
export function getPeopleList(query) {
    return request({
      url: '/group/inspection/getPeopleList',
      method: 'get',
      params: query
    })
  }
src/views/doctor/check/index.vue
@@ -223,7 +223,7 @@
              <el-select
                v-model="form.hzDeptId"
                multiple
                filterable
                filterable569-0=
                style="width: 100%"
              >
                <el-option
@@ -1315,9 +1315,9 @@
        }
      });
    },
    hb(){
    hb() {
      console.log(this.queryParams.tjNumber);
       if (this.queryParams.tjNumber != "") {
      if (this.queryParams.tjNumber != "") {
        this.submitForm();
      }
    },
src/views/hosp/harmType/index.vue
@@ -1,331 +1,406 @@
<template>
    <div class="app-container">
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      v-show="showSearch"
      label-width="68px"
    >
      <el-form-item label="编码" prop="harmCode">
        <el-input
          v-model="queryParams.harmCode"
          placeholder="请输入编码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="名称" prop="harmType">
        <el-input
          v-model="queryParams.harmType"
          placeholder="请输入职业病拼音码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="拼音码" prop="harmPinYin">
        <el-input
          v-model="queryParams.harmPinYin"
          placeholder="请输入职业病拼音码"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
            <el-form-item label="编码" prop="harmCode">
                <el-input v-model="queryParams.harmCode" placeholder="请输入编码" clearable @keyup.enter.native="handleQuery" />
            </el-form-item>
            <el-form-item label="名称" prop="harmType">
                <el-input v-model="queryParams.harmType" placeholder="请输入职业病拼音码" clearable
                    @keyup.enter.native="handleQuery" />
            </el-form-item>
            <el-form-item label="拼音码" prop="harmPinYin">
                <el-input v-model="queryParams.harmPinYin" placeholder="请输入职业病拼音码" clearable
                    @keyup.enter.native="handleQuery" />
            </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item>
    </el-form>
            <el-form-item>
                <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
                <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
            </el-form-item>
        </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['hosp:harmType:add']"
          >新增
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['hosp:harmType:edit']"
          >修改
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['hosp:harmType:remove']"
          >删除
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['hosp:harmType:export']"
          >导出
        </el-button>
      </el-col>
      <right-toolbar
        :showSearch.sync="showSearch"
        @queryTable="getList"
      ></right-toolbar>
    </el-row>
        <el-row :gutter="10" class="mb8">
            <el-col :span="1.5">
                <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
                    v-hasPermi="['hosp:harmType:add']">新增
                </el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
                    v-hasPermi="['hosp:harmType:edit']">修改
                </el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
                    v-hasPermi="['hosp:harmType:remove']">删除
                </el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
                    v-hasPermi="['hosp:harmType:export']">导出
                </el-button>
            </el-col>
            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
    <el-table
      v-loading="loading"
      :data="harmTypeList"
      @selection-change="handleSelectionChange"
      border
    >
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="排序" align="center" prop="newID" />
      <el-table-column label="职业病编码" align="center" prop="harmCode" />
      <el-table-column label="职业病名称" align="center" prop="harmType" />
      <el-table-column label="职业病拼音码" align="center" prop="harmPinYin" />
      <el-table-column label="描述" align="center" prop="harmInfo" />
      <el-table-column label="防护措施" align="center" prop="protection" />
      <el-table-column
        label="操作"
        align="center"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['hosp:harmType:edit']"
            title="修改"
            >
          </el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['hosp:harmType:remove']"
            title="删除"
            >
          </el-button>
        </template>
      </el-table-column>
    </el-table>
        <el-table v-loading="loading" :data="harmTypeList" @selection-change="handleSelectionChange" border>
            <el-table-column type="selection" width="55" align="center" />
            <el-table-column label="排序" align="center" prop="sort" />
            <el-table-column label="职业病编码" align="center" prop="harmCode" />
            <el-table-column label="职业病名称" align="center" prop="harmType" />
            <el-table-column label="职业病拼音码" align="center" prop="harmPinYin" />
            <el-table-column label="描述" align="center" prop="harmInfo" />
            <el-table-column label="防护措施" align="center" prop="protection" />
            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                <template slot-scope="scope">
                    <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
                        v-hasPermi="['hosp:harmType:edit']">修改
                    </el-button>
                    <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
                        v-hasPermi="['hosp:harmType:remove']">删除
                    </el-button>
                </template>
            </el-table-column>
        </el-table>
        <div class="pag">
            <div class="pag1">
                <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
                    :limit.sync="queryParams.pageSize" @pagination="getList" />
            </div>
        </div>
        <!-- 添加或修改职业病对话框 -->
        <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
            <el-form ref="form" :model="form" :rules="rules" label-width="80px">
                <el-form-item label="排序" prop="sort">
                    <el-input v-model="form.sort" placeholder="请输入排序" />
                </el-form-item>
                <el-form-item label="编码" prop="harmCode">
                    <el-input v-model="form.harmCode" placeholder="请输入编码" />
                </el-form-item>
                <el-form-item label="拼音码" prop="harmPinYin">
                    <el-input v-model="form.harmPinYin" placeholder="请输入拼音码" />
                </el-form-item>
                <el-form-item label="名称" prop="harmType">
                    <el-input v-model="form.harmType" placeholder="请输入名称" />
                </el-form-item>
                <el-form-item label="描述" prop="harmInfo">
                    <el-input v-model="form.harmInfo" type="textarea" placeholder="请输入描述" />
                </el-form-item>
                <el-form-item label="防护措施" prop="protection">
                    <el-input v-model="form.protection" placeholder="请输入防护措施" />
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="submitForm">确 定</el-button>
                <el-button @click="cancel">取 消</el-button>
            </div>
        </el-dialog>
    <div class="pag">
      <div class="pag1">
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        />
      </div>
    </div>
    <!-- 添加或修改职业病对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="数字" prop="sort">
          <el-input v-model="form.sort" placeholder="请输入排序" />
        </el-form-item>
        <el-form-item label="编码" prop="harmCode">
          <el-input v-model="form.harmCode" placeholder="请输入编码" />
        </el-form-item>
        <el-form-item label="拼音码" prop="harmPinYin">
          <el-input v-model="form.harmPinYin" placeholder="请输入拼音码" />
        </el-form-item>
        <el-form-item label="名称" prop="harmType">
          <el-input v-model="form.harmType" placeholder="请输入名称" />
        </el-form-item>
        <el-form-item label="描述" prop="harmInfo">
          <el-input
            v-model="form.harmInfo"
            type="textarea"
            placeholder="请输入描述"
          />
        </el-form-item>
        <el-form-item label="防护措施" prop="protection">
          <el-input v-model="form.protection" placeholder="请输入防护措施" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
    listHarmType,
    getHarmType,
    delHarmType,
    addHarmType,
    updateHarmType
  listHarmType,
  getHarmType,
  delHarmType,
  addHarmType,
  updateHarmType,
} from "@/api/hosp/harmType";
export default {
    name: "HarmType",
    data() {
        let checkPhoneNum = (rule, value, callback) => {
            console.log(value)
            let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
            if (value == "" && value == undefined && !value) {
                return callback('');
            } else if (value != undefined && value != "") {
                return callback();
            } else if (!patter.test(value)) {
                return callback('');
            }
        };
        return {
            // 遮罩层
            loading: true,
            // 选中数组
            ids: [],
            // 非单个禁用
            single: true,
            // 非多个禁用
            multiple: true,
            // 显示搜索条件
            showSearch: true,
            // 总条数
            total: 0,
            // 职业病表格数据
            harmTypeList: [],
            // 弹出层标题
            title: "",
            // 是否显示弹出层
            open: false,
            // 查询参数
            queryParams: {
                pageNum: 1,
                pageSize: 10,
                harmpinyin: null,
                harmtype: null,
                sort: null,
                harminfo: null,
                externalcode: null,
                harmcode: null,
                type: null,
                protection: null
            },
            // 表单参数
            form: {},
            // 表单校验
            rules: {
                sort: [
                    { required: true, validator: checkPhoneNum, trigger: "blur" }
                ],
                harmCode: [
                    { required: true, validator: checkPhoneNum, trigger: "blur" }
                ],
                harmPinYin: [
                    { required: true, validator: checkPhoneNum, trigger: "blur" }
                ],
                harmType: [
                    { required: true, validator: checkPhoneNum, trigger: "blur" }
                ],
                harmInfo: [
                    { required: true, validator: checkPhoneNum, trigger: "blur" }
                ],
                protection: [
                    { required: true, validator: checkPhoneNum, trigger: "blur" }
                ],
  name: "HarmType",
  data() {
    let checkPhoneNum = (rule, value, callback) => {
      console.log(value);
      let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
      if (value == "" && value == undefined && !value) {
        return callback("");
      } else if (value != undefined && value != "") {
        return callback();
      } else if (!patter.test(value)) {
        return callback("");
      }
    };
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 职业病表格数据
      harmTypeList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        harmpinyin: null,
        harmtype: null,
        sort: null,
        harminfo: null,
        externalcode: null,
        harmcode: null,
        type: null,
        protection: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        // sort: [{ required: true, validator: checkPhoneNum, trigger: "blur" }],
        // harmCode: [
        //   { required: true, validator: checkPhoneNum, trigger: "blur" },
        // ],
            }
        };
        harmPinYin: [
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
        harmType: [
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
        // harmInfo: [
        //   { required: true, validator: checkPhoneNum, trigger: "blur" },
        // ],
        protection: [
          { required: true, validator: checkPhoneNum, trigger: "blur" },
        ],
      },
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询职业病列表 */
    getList() {
      this.loading = true;
      listHarmType(this.queryParams).then((response) => {
         response.rows.forEach((item, index) => {
          item.newID = (this.queryParams.pageNum - 1) * this.queryParams.pageSize + index + 1;
        });
        this.harmTypeList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    created() {
        this.getList();
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    methods: {
        /** 查询职业病列表 */
        getList() {
            this.loading = true;
            listHarmType(this.queryParams).then(response => {
                this.harmTypeList = response.rows;
                this.total = response.total;
                this.loading = false;
    // 表单重置
    reset() {
      this.form = {
        aid: null,
        harmpinyin: null,
        harmtype: null,
        sort: null,
        harminfo: null,
        externalcode: null,
        harmcode: null,
        type: null,
        protection: null,
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = [];
      this.ids = selection.map((item) => item.aid);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加职业病";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const aid = row.aid || this.ids;
      getHarmType(aid).then((response) => {
        this.form = response.data;
        this.open = true;
        this.title = "有害因素";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.aid != null) {
            updateHarmType(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
        },
        // 取消按钮
        cancel() {
            this.open = false;
            this.reset();
        },
        // 表单重置
        reset() {
            this.form = {
                aid: null,
                harmpinyin: null,
                harmtype: null,
                sort: null,
                harminfo: null,
                externalcode: null,
                harmcode: null,
                type: null,
                protection: null
            };
            this.resetForm("form");
        },
        /** 搜索按钮操作 */
        handleQuery() {
            this.queryParams.pageNum = 1;
            this.getList();
        },
        /** 重置按钮操作 */
        resetQuery() {
            this.resetForm("queryForm");
            this.handleQuery();
        },
        // 多选框选中数据
        handleSelectionChange(selection) {
            this.ids = []
            this.ids = selection.map(item => item.aid)
            this.single = selection.length !== 1
            this.multiple = !selection.length
        },
        /** 新增按钮操作 */
        handleAdd() {
            this.reset();
            this.open = true;
            this.title = "添加职业病";
        },
        /** 修改按钮操作 */
        handleUpdate(row) {
            this.reset();
            const aid = row.aid || this.ids
            getHarmType(aid).then(response => {
                this.form = response.data;
                this.open = true;
                this.title = "有害因素";
            });
        },
        /** 提交按钮 */
        submitForm() {
            this.$refs["form"].validate((valid) => {
                if (valid) {
                    if (this.form.aid != null) {
                        updateHarmType(this.form).then((response) => {
                            this.$modal.msgSuccess("修改成功");
                            this.open = false;
                            this.getList();
                        });
                    } else {
                        if(this.form.harmPinYin && this.form.harmType && this.form.harmCode){
                            addHarmType(this.form).then((response) => {
                            this.$modal.msgSuccess("新增成功");
                            this.open = false;
                            this.getList();
                        });
                        }else{
                            this.$modal.msgError("请填写必填项信息");
                        }
                    }
                }
            });
        },
        /** 删除按钮操作 */
        handleDelete(row) {
            if (row) {
                this.ids = []
                this.ids.push(row.aid)
          } else {
            if (
              this.form.harmPinYin &&
              this.form.harmType &&
              this.form.harmCode
            ) {
              addHarmType(this.form).then((response) => {
                this.$modal.msgSuccess("新增成功");
                this.open = false;
                this.getList();
              });
            } else {
              this.$modal.msgError("请填写必填项信息");
            }
            const ids = this.ids;
            this.$modal
                .confirm('是否确认删除advice编号为"' + ids + '"的数据项?')
                .then(function () {
                    return delHarmType(ids);
                })
                .then(() => {
                    this.getList();
                    this.$modal.msgSuccess("删除成功");
                })
                .catch(() => { });
        },
        SelectionChange(selection) { },
        /** 导出按钮操作 */
        handleExport() {
          }
        }
    }
}
    ;
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      if (row) {
        this.ids = [];
        this.ids.push(row.aid);
      }
      const ids = this.ids;
      this.$modal
        .confirm('是否确认删除advice编号为"' + ids + '"的数据项?')
        .then(function () {
          return delHarmType(ids);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
    },
    SelectionChange(selection) {},
    /** 导出按钮操作 */
    handleExport() {},
  },
};
</script>
<style>
.pag {
    width: 100%;
    display: flex;
    justify-content: center;
  width: 100%;
  display: flex;
  justify-content: center;
}
.pag1 {
    width: 30%;
  width: 30%;
}
</style>
src/views/reservation/resercopy/index.vue
@@ -964,6 +964,7 @@
        newConfirm(data).then((res) => {
          this.$modal.msgSuccess("提交成功");
          this.confirm = true;
           this.userList = [];
        });
      } else {
        this.$modal.msgError("请填写带星号内容");
src/views/system/comp/index.vue
@@ -1022,6 +1022,12 @@
        dwgrouping(data).then(res => {
          if (res.code == 200) {
            this.beCurrent()
            this.forms.groupingName = "";
            this.forms.sex = "";
            this.forms.pacName = "";
            this.forms.price = "";
            this.forms.ysPrice = "";
            this.forms.payType = "";
          }
        })
      }
src/views/system/dept/index.vue
@@ -267,7 +267,7 @@
              v-for="dict in hospList"
              :key="dict.hospAreaName"
              :label="dict.hospAreaName"
              :value="dict.hospAreaName"
              :value="dict.hospAreaId"
            />
          </el-select>
        </el-form-item>
@@ -421,7 +421,6 @@
  components: { Treeselect },
  data() {
    let checkPhoneNum = (rule, value, callback) => {
      console.log(value);
      let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
      if (value == "" && value == undefined && !value) {
        return callback("");
@@ -527,6 +526,7 @@
    getlistHosp() {
      listHosp(this.queryParams).then((response) => {
        this.hospList = response.rows;
        console.log(this.hospList);
      });
    },
    /** 转换部门数据结构 */
@@ -659,11 +659,9 @@
      // console.log(11111)
      // this.reset();
      this.form = row;
      console.log(this.form )
      // this.form.parentId = this.form.parentId.toString()
      if(this.form.parentId == 0){
        this.deptOption.push({ "id": 0, "label": "主类目", });
        console.log(this.deptOption);
      }
      this.open = true;
      this.title = "科室信息维护  ";
src/views/team/reportresults/index.vue
@@ -1,372 +1,583 @@
<template>
    <div class="app-container">
        <el-row :gutter="10" class="mb8">
            <el-col :span="1.5">
                <el-form :model="objs" :rules="rules" ref="form" size="small" :inline="true" label-width="80px">
                    <el-form-item label="单位名称" prop="drugManufacturerId">
                        <el-select :remote-method="getRemoteData" v-model="objs.drugManufacturerId" remote filterable
                            style="width: 200px" placeholder="请选择单位名称" clearable @change="idFn">
                            <el-option v-for="dict in CompanyList" :key="dict.cnName" :label="dict.cnName"
                                :value="dict.drugManufacturerId" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="部门" prop="dwDeptName">
                        <el-select v-model="objs.dwDeptName" placeholder="请选择部门" style="width: 200px" clearable
                            @change="idBm">
                            <el-option v-for="dict in deptList" :key="dict.id" :label="dict.dwDeptName" :value="dict.id" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="分组" prop="payType">
                        <el-select v-model="objs.payType" placeholder="请选择结算方式" style="width: 200px" clearable>
                            <el-option v-for="dict in groupingList" :key="dict.id" :label="dict.groupingName"
                                :value="dict.id" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="登记时间" prop="createTimeList">
                        <el-date-picker v-model="createTimeList" type="datetimerange" align="right"
                            :picker-options="pickerOptions" style="width: 260px" start-placeholder="开始日期"
                            end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
                            @change="dateChangebirthday1">
                        </el-date-picker>
                    </el-form-item>
                </el-form>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      label-width="68px"
    >
      <el-form-item label="时间" prop="applicationTime">
        <el-date-picker
          clearable
          v-model="createTimeList"
          @change="dateChangebirthday1"
          style="width: 240px"
          value-format="yyyy-MM-dd"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          :picker-options="pickerOptions"
        ></el-date-picker>
      </el-form-item>
      <el-form-item label="单位" prop="compId">
        <el-select
          v-model="queryParams.compId"
          placeholder="请选择单位"
          clearable
          style="width: 200px"
          @change="cmp"
        >
          <el-option
            v-for="dict in compList"
            :key="dict.drugManufacturerId"
            :label="dict.cnName"
            :value="dict.drugManufacturerId"
          />
        </el-select>
        <!-- <el-input v-model="queryParams.compId" placeholder="请输入单位" clearable @keyup.enter.native="handleQuery" style="width: 170px"/> -->
      </el-form-item>
      <el-form-item label="部门" prop="deptName">
        <el-input
          v-model="queryParams.deptName"
          placeholder="请输入部门"
          clearable
          @keyup.enter.native="handleQuery"
          style="width: 200px"
        />
      </el-form-item>
      <el-form-item label="单位部门" prop="dwDeptId">
        <el-select
          v-model="queryParams.dwDeptId"
          placeholder="请选择单位部门"
          clearable
          style="width: 200px"
          @change="dw"
        >
          <el-option
            v-for="dict in dwList"
            :key="dict.id"
            :label="dict.dwDeptName"
            :value="dict.id"
          />
        </el-select>
        <!-- <el-input v-model="queryParams.dwDeptId" placeholder="请输入单位部门" clearable @keyup.enter.native="handleQuery" style="width: 110px"/> -->
      </el-form-item>
      <el-form-item label="分组" prop="groupingId">
        <el-select
          v-model="queryParams.groupingId"
          placeholder="请选择分组"
          clearable
          style="width: 200px"
          @change="dw"
        >
          <el-option
            v-for="dict in gropList"
            :key="dict.id"
            :label="dict.groupingName"
            :value="dict.id"
          />
        </el-select>
        <!-- <el-input v-model="queryParams.groupingId" placeholder="请输入分组" clearable @keyup.enter.native="handleQuery" style="width: 110px"/> -->
      </el-form-item>
      <!-- <el-form-item label="病种名称" prop="name">
        <el-input
          v-model="queryParam.name"
          placeholder="请输入部门"
          clearable
          @keyup.enter.native="handleQuery"
          style="width: 200px"
        />
      </el-form-item> -->
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >查询</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item>
    </el-form>
            </el-col>
            <el-col :span="1.5">
                <el-button type="primary" size="mini" @click="handlequery"
                    v-hasPermi="['system:user:import']">查询</el-button>
            </el-col>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" size="mini" @click="tongji"
          >统计结果</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button type="primary" size="mini" @click="clear"
          >清空已选输出列</el-button
        >
      </el-col>
    </el-row>
        </el-row>
        <div style="margin: 5px 20px;width: 94%">
            <el-row :gutter="10" class="mb8">
                <el-col :span="1.5">
                    <el-button type="primary" size="mini" :disabled="single" @click="handlesetup">添加全部基础项目</el-button>
                </el-col>
                <el-col :span="1.5">
                    <el-button type="primary" size="mini" :disabled="single" @click="handleAll">统计结果</el-button>
                </el-col>
            </el-row>
            <el-row :gutter="20">
                <!--部门数据-->
                <el-col :span="7" :xs="24">
                    <el-table v-loading="loading" ref="tree" :data="userList" border height="500"
                        @selection-change="handleSelectionChange">
                        <el-table-column type="selection" width="55">
                        </el-table-column>
                        <el-table-column label="体检号" align="center" prop="name"  />
                        <el-table-column label="姓名" align="center" prop="name" width="75" />
                        <el-table-column label="性别" align="center" prop="sex" width="75">
                            <template slot-scope="scope">
                                <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
                            </template>
                        </el-table-column>
                        <el-table-column label="年龄" align="center" prop="age" width="120" />
                    </el-table>
                </el-col>
                <el-col :span="8" :xs="24">
                    <el-table v-loading="loading" ref="tree" :data="userList" border height="500"
                        @selection-change="handleSelectionChange">
                        <el-table-column label="收费项目名称" align="center" prop="name" />
                    </el-table>
                </el-col>
                <el-col :span="8" :xs="24">
                    <el-table v-loading="loading" ref="tree" :data="userList" border height="500"
                        @selection-change="handleSelectionChange">
                        <el-table-column label="已选项目名称" align="center" prop="name"  />
                    </el-table>
                </el-col>
            </el-row>
        </div>
        <!-- 设置对话框 -->
        <div class="dia">
            <el-dialog :title="title1" :visible.sync="open1" width="960px" append-to-body>
                <div style="text-align: center;">
                    <el-transfer style="text-align: left; display: inline-block;" v-model="value" filterable
                        :left-default-checked="[2, 3]" :right-default-checked="[1]" :render-content="renderFunc"
                        :titles="['显示病种', '隐藏病种']" :button-texts="['显示', '隐藏']" :format="{
                            noChecked: '${total}',
                            hasChecked: '${checked}/${total}'
                        }" @change="handleChange1" :data="datalist">
                    </el-transfer>
                </div>
                <div slot="footer" class="dialog-footer2">
                    <el-button type="primary" @click="submitFormS">保存设置</el-button>
                </div>
            </el-dialog>
        </div>
    <div style="width: 100%; margin-left: 10px; display: flex">
      <div style="width: 40%; margin-right: 30px">
        <el-table
          border
          :data="tableData"
          style="width: 100%"
          @selection-change="handleSelectionChanges"
        >
          <el-table-column type="selection" width="40" align="center" />
          <el-table-column
            prop="tjNumber"
            label="体检号"
            width="160"
            align="center"
          >
          </el-table-column>
          <el-table-column
            prop="name"
            label="姓名"
            align="center"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            prop="sex"
            label="性别"
            align="center"
            width="70px"
            :show-overflow-tooltip="true"
          >
            <template slot-scope="scope">{{
              scope.row.sex === 0 ? "男" : "女"
            }}</template>
          </el-table-column>
          <el-table-column
            prop="age"
            label="年龄"
            align="center"
            width="70"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            prop="company"
            label="单位"
            align="center"
            :show-overflow-tooltip="true"
          >
          </el-table-column>
          <el-table-column
            prop="department"
            label="部门"
            align="center"
            :show-overflow-tooltip="true"
          >
          </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%"
      >
        <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> -->
          </div>
        </el-tab-pane>
      </el-tabs>
      </div>
    </div>
    <div style="margin-right: 64%">
      <pagination
        v-show="total > 0"
        :total="total"
        :page.sync="queryParams.page"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </div>
    <!-- <div style="width: 100%; display: flex">
      <el-pagination
        v-show="totals > 0"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage4"
        :page-sizes="[10, 20, 30, 40]"
        :page-size="10"
        layout="total, sizes, prev, pager, next, jumper"
        :total="totals"
      >
      </el-pagination>
    </div> -->
    <!-- 查看统计图 -->
    <div class="dia">
      <el-dialog
        :title="title2"
        :visible.sync="open"
        width="1300px"
        append-to-body
      >
        <div style="height: 620px; margin-top: 10px">
          <div id="main" style="width: 95%; height: 400px"></div>
        </div>
      </el-dialog>
    </div>
  </div>
</template>
<script>
import { Deptlist, getDwAndDwDept } from "@/api/system/comp";
import { getCompany, queryCompany } from "@/api/team/tuanti";
const echarts = require("echarts/lib/echarts");
require("echarts/lib/component/title");
require("echarts/lib/component/tooltip");
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 {
  getPeopleList,
  getDeptAndDwDeptByComp,
  getDwGroupingByDwDeptId,
  getTjRules,
  getStatist,
} from "@/api/team/disease";
import { listComp } from "@/api/system/comp";
export default {
    name: "Tijian",
    data() {
        let checkPhoneNum = (rule, value, callback) => {
         console.log( value)
      let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/);
      if (value == "" && value == undefined && !value) {
        return callback('');
      }  else if(value != undefined && value != ""){
        return callback();
      }else if (!patter.test(value)) {
        return callback('');
      }
  components: {
    VTreeTransfer,
  },
  data() {
    return {
      datekey: Date.now(),
      defaultKeys: [],
      defaultProps: {
        children: "tjProjectList",
        label: "proName",
      },
      tjProjectList: [],
      treedataList: [],
      rongjiList: [],
      aids: [],
      tjNums: [],
      title2: "",
      open: false,
      currentPage4: 1,
      gropList: [],
      dwList: [],
      compList: [],
      total: 0,
      totals: 0,
      tableData: [],
      tableData2: [],
      createTimeList: [],
      queryParam: {
        name: null,
        page: 1,
        pageSize: 10,
        groupingId: null,
      },
      queryParams: {
        page: 1,
        pageSize: 10,
        compId: null,
        deptName: null,
        groupingId: null,
        beginTime: null,
        endTime: null,
        dwDeptId: null,
      },
      pickerOptions: {
        shortcuts: [
          {
            text: "最近一周",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近一个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近三个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
    };
        const generateData = _ => {
            const data = [];
            for (let i = 1; i <= 15; i++) {
                data.push({
                    key: i,
                    label: `备选项 ${i}`,
                    disabled: i % 4 === 0
                });
            }
            return data;
        };
        return {
            datalist: generateData(),
            value: [1],
            value4: [1],
            renderFunc(h, option) {
                return <span>{option.key} - {option.label}</span>;
            },
            objs: {
                drugManufacturerId: "",
                dwDeptName: "",
                reservationTime: "",
            },
            data: {
                dwId: "",
                deptId: "",
            },
            // 弹出层标题
            title1: "",
            deptList: [],
            CompanyList: [],
            groupingList: [],
            userList: [],
            menuIds: [],
            proIds: [],
            open1: false,
            // 非单个禁用
            single: false,
            // 表单参数
            form: {},
            pickerOptions: {
                shortcuts: [
                    {
                        text: "最近一周",
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date(new Date().setHours(0, 0, 0, 0));
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
                            picker.$emit("pick", [start, end]);
                        },
                    },
                    {
                        text: "最近一个月",
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date(new Date().setHours(0, 0, 0, 0));
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
                            picker.$emit("pick", [start, end]);
                        },
                    },
                    {
                        text: "最近三个月",
                        onClick(picker) {
                            const end = new Date();
                            const start = new Date(new Date().setHours(0, 0, 0, 0));
                            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
                            picker.$emit("pick", [start, end]);
                        },
                    },
                ],
            },
            // 表单校验
            rules: {
                drugManufacturerId: [
                    { required: true, validator: checkPhoneNum,  trigger: "change" },
                ],
                reservationTime: [
                    { required: true, validator: checkPhoneNum,  trigger: "blur" },
                ],
                dwDeptName: [
                    { required: true, validator: checkPhoneNum,  trigger: "change" },
                ],
            },
        };
  },
  created() {
    this.getNowTime();
    this.getList();
    this.getcomp();
    this.getData();
    this.datekey = Date.now();
  },
  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 = [];
      // }
    },
    created() {
        this.getNowTime()
        this.getList();
    getData() {
      /** 查询部门下拉树结构 */
      this.loading = true;
      projectGetList().then((response) => {
        this.treedataList = response.data.list;
        console.log(this.treedataList);
        this.dXData = response.data.list;
        this.loading = false;
        return;
      });
    },
    methods: {
        getList() {
            this.loading = true;
            getCompany(this.queryParam).then((response) => {
                this.CompanyList = response.data;
                this.total = response.total;
                this.loading = false;
            });
        },
        handlequery() {
    // / 处理默认选中当前日期
    getNowTime() {
      var curDate = new Date().getTime();
      var dayNum = 7 * 24 * 3600 * 1000;
      var threeDays = curDate - dayNum;
      var sDay = this.getLocalTime(threeDays);
      var end = this.getLocalTime(curDate);
      this.createTimeList = [sDay, end];
    },
    add0(m) {
      return m < 10 ? "0" + m : m;
    },
    getLocalTime(nS) {
      var time = new Date(nS);
      var y = time.getFullYear();
      var m = time.getMonth() + 1;
      var d = time.getDate();
      return y + "-" + this.add0(m) + "-" + this.add0(d);
    },
    // 团检病种页面查询人员列表
    getList() {
      this.queryParams.beginTime = this.createTimeList[0];
      this.queryParams.endTime = this.createTimeList[1];
      getPeopleList(this.queryParams).then((res) => {
        this.tableData = res.data.voList;
        this.total = res.data.total;
      });
    },
        },
        handleQuery() {
            console.log(1111)
        },
        // 多选框选中数据
        handleSelectionChange(selection) {
            // this.ids = selection.map((item) => item.id);
            this.single = selection.length !== 1;
        },
        // 表单重置
        reset() {
            this.form = {
                company: null,
                payType: null,
                name: null,
                phoe: null,
                signingPic: null,
                pacStatus: "启用"
    handleSizeChange(val) {
      this.queryParam.pageSize = val;
      this.geticd();
    },
    handleCurrentChange(val) {
      this.queryParam.page = val;
      this.geticd();
    },
    /** 查询体检单位信息维护列表 */
    getcomp() {
      listComp().then((response) => {
        this.compList = response.rows;
      });
    },
    // 根据单位查询部门和单位部门信息
    cmp(val) {
      let compId = val;
      getDeptAndDwDeptByComp(compId).then((res) => {
        this.dwList = res.data;
      });
    },
    // 根据单位部门查询单位分组信息信息
    dw(vals) {
      let dwDeptId = vals;
      getDwGroupingByDwDeptId(dwDeptId).then((res) => {
        this.gropList = res.data;
      });
    },
    handleSelectionChanges(selection) {
      this.tjNums = selection.map((item) => item.tjNumber);
    },
    handleSelectionChange(selection) {
      this.tableData2 = selection;
      this.aids = selection.map((item) => item.aid);
    },
    clear() {
      this.tableData2 = [];
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.page = 1;
      this.getList();
      this.queryParam.page = 1;
      this.geticd();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
      this.loading = true;
    },
    dateChangebirthday1(val) {
      this.createTimeList = val;
    },
    tongji() {
      this.title2 = "统计图表";
      let tjRulesStatisticsDto = {
        aids: this.aids,
        tjNums: this.tjNums,
      };
      console.log(tjRulesStatisticsDto);
      if (
        tjRulesStatisticsDto.aids.length === 0 ||
        tjRulesStatisticsDto.tjNums.length === 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)",
                    },
                  },
                },
              ],
            };
            this.resetForm("form");
        },
        idFn(value) {
            this.data.dwId = value
            Deptlist(value).then((response) => {
                this.deptList = response.data;
            });
        },
        idBm(value) {
            this.data.deptId = value
            console.log(this.data)
            getDwAndDwDept(this.data).then((response) => {
                this.groupingList = response.data;
            });
        },
        // 搜索
        getRemoteData(query) {
            if (query) {
                let compName = query;
                queryCompany(compName).then((response) => {
                    this.CompanyList = response.data;
                    this.CompanyList.forEach((item) => {
                        this.objs = item;
                    });
                });
            }
        },
        // / 处理默认选中当前日期
        getNowTime() {
            var curDate = new Date().getTime();
            var dayNum = 7 * 24 * 3600 * 1000;
            var threeDays = curDate - dayNum;
            var sDay = this.getLocalTime(threeDays);
            var end = this.getLocalTime(curDate);
            this.createTimeList = [sDay, end];
        },
        add0(m) {
            return m < 10 ? "0" + m : m;
        },
        getLocalTime(nS) {
            var time = new Date(nS);
            var y = time.getFullYear();
            var m = time.getMonth() + 1;
            var d = time.getDate();
            // var h = time.getHours();
            // var mm = time.getMinutes();
            return (
                y +
                "-" +
                this.add0(m) +
                "-" +
                this.add0(d)
            );
        },
        //获取时间
        dateChangebirthday1(val) {
            if (val == null) {
                this.createTimeList = []
            } else {
                this.createTimeList = val;
            }
        },
        // 取消按钮
        cancel() {
            this.open = false;
            this.reset();
        },
        /** 查看详细信息按钮操作 */
        handleAll() {
            this.open = true;
            this.title = "团检检出率";
        },
        handleChange(selection) {
            // this.ids = selection.map((item) => item.id);
            this.single = selection.length !== 1;
        },
        handlecan() {
            option && myChart.setOption(option);
            let sizeFun = function () {
              myChart.resize();
            };
            window.addEventListener("resize", sizeFun);
          });
          // 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: {},
        },
        handlesetup() {
            this.open1 = true;
            this.title1 = "统计图设置";
        },
        handleChange1(value, direction, movedKeys) {
            console.log(value, direction, movedKeys);
        },
        submitFormS() {
        }
          //   tooltip: {},
          //   xAxis: {
          //     type: "category",
          //     name: "病种名称",
          //     data: this.dateAll,
          //   },
          //   yAxis: {
          //     type:'value'
          //   },
          //   series: [
          //     {
          //       name: "人数",
          //       type: "bar",
          //       data: dataValue1,
          //     },
          //   ],
          // });
        });
      }
    },
  },
};
</script>
<style>
.el-transfer-panel {
    width: 360px;
    height: 480px;
<style lang="scss" scoped>
.el-pagination {
  margin-left: 47%;
}
.el-transfer-panel__body {
    /* border: 1px solid red; */
    height: 480px;
}
.el-transfer-panel__list.is-filterable {
    height: 352px;
}
.el-button--primary.el-transfer__button {
    display: flex;
    justify-content: center;
    align-items: center;
}
.el-transfer__button:first-child {
    width: 82px;
    margin-bottom: 10px;
}
.el-button+.el-button {
    margin-left: 0px;
.tab3 {
  width: 100%;
  display: flex;
}
</style>