| | |
| | | <el-table v-if="refreshTable" v-loading="loading" :data="projectList" ref="tableRef" border row-key="proId" |
| | | :expand-row-keys="ListId" :row-class-name="selectSingleRow" |
| | | :tree-props="{ children: 'tjProjectList', hasChildren: 'tjProjectList.length>0', }"> |
| | | <el-table-column label="项目名称" align="center" prop="proName" /> |
| | | <el-table-column label="已检人数" align="center" prop="a" /> |
| | | <el-table-column label="未检人数" align="center" prop="b" /> |
| | | <el-table-column label="延期人数" align="center" prop="c" /> |
| | | <el-table-column label="弃检人数" align="center" prop="d" /> |
| | | <el-table-column label="项目名称" align="center" prop="deptName" /> |
| | | <el-table-column label="已检人数" align="center" prop="yijianNum" /> |
| | | <el-table-column label="未检人数" align="center" prop="weijianNum" /> |
| | | <el-table-column label="延期人数" align="center" prop="yanqiNum" /> |
| | | <el-table-column label="弃检人数" align="center" prop="qijianNum" /> |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | |
| | | <script> |
| | | import { |
| | | getProject, |
| | | delProject, |
| | | addProject, |
| | | updateProject, |
| | | ProjectTree, |
| | | deptTree, |
| | | getChartByDeptId |
| | | } from "@/api/hosp/project"; |
| | | import { listDept } from "@/api/system/dept"; |
| | | import Treeselect from "@riophae/vue-treeselect"; |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | | import IconSelect from "@/components/IconSelect"; |
| | | import { listConsumables } from "@/api/hosp/consumables"; |
| | | import { Message } from "element-ui"; |
| | | import { |
| | | listSfxm, |
| | | getSfxm, |
| | | delSfxm, |
| | | addSfxm, |
| | | updateSfxm, |
| | | gettreeList, |
| | | getListByXmId |
| | | } from "@/api/system/sfxm"; |
| | | |
| | | export default { |
| | | name: "Project", |
| | |
| | | tjStandardList: [], |
| | | // 表格树数据 |
| | | deptList: [], |
| | | parentNameList: [], |
| | | sfxmId:null, |
| | | // 体检项目表格数据 |
| | | projectList: [], |
| | |
| | | }, |
| | | |
| | | created() { |
| | | this.getDeptList(); |
| | | this.getDeptTree(); |
| | | }, |
| | | methods: { |
| | | |
| | | //是否显示选中的值 |
| | | display(value) { }, |
| | | /** 查询体检项目列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | let data = { |
| | | proName: this.queryParams.proName, |
| | | checkType: this.queryParams.checkType, |
| | | deptId: this.queryParams.deptId, |
| | | }; |
| | | ProjectTree(data).then((response) => { |
| | | this.projectList = this.handleTree(response.data.list, "proId"); |
| | | this.projectList.forEach(element => { |
| | | element.a="0" |
| | | element.b=0 |
| | | element.c="0" |
| | | element.d="0" |
| | | element.tjProjectList.forEach(item => { |
| | | item.a="0" |
| | | item.b=0 |
| | | item.c="0" |
| | | item.d="0" |
| | | }) |
| | | }); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | |
| | | // // 查询体检项目列表(树形结构) |
| | | getData() { |
| | | /** 查询部门下拉树结构 */ |
| | | ProjectTree().then((response) => { |
| | | this.projectOptions = []; |
| | | const project = { proId: 0, proName: "主类目", children: [] }; |
| | | project.children = this.handleTree(response.data.list, "proId"); |
| | | this.key = response.data.key |
| | | // if (this.key == "Y") { |
| | | // this.key = response.data.key |
| | | // } else if (response.data.key == "N") { |
| | | // this.key = response.data.key |
| | | // } |
| | | this.projectOptions.push(project); |
| | | }); |
| | | }, |
| | | /** 查询部门列表 */ |
| | | getDeptList() { |
| | | listDept(this.queryParams).then((response) => { |
| | | console.log(response) |
| | | this.parentNameList = response.data; |
| | | this.deptList = this.handleTree(response.data, "proId"); |
| | | }); |
| | | }, |
| | | /** 查询部门下拉树结构 */ |
| | | getDeptTree() { |
| | | deptTree().then((response) => { |
| | | console.log(response,11111) |
| | | this.deptOptions = response.data; |
| | | this.treeId.push(this.deptOptions[0].id) |
| | | let data = { |
| | | deptId : this.deptOptions[0].id |
| | | } |
| | | |
| | | getChartByDeptId(data).then(res => { |
| | | this.projectList = res.data |
| | | }) |
| | | }); |
| | | |
| | | }, |
| | | |
| | | // 筛选节点 |
| | | filterNode2(value, data) { |
| | | if (!value) return true; |
| | | return data.xmmc.indexOf(value) !== -1; |
| | | }, |
| | | // 筛选节点 |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | |
| | | let data = { |
| | | deptId: this.queryParams.deptId, |
| | | }; |
| | | ProjectTree(data).then((response) => { |
| | | this.projectList = this.handleTree(response.data.list, "proId"); |
| | | this.projectList.forEach(element => { |
| | | element.a="0" |
| | | element.b=0 |
| | | element.c="0" |
| | | element.d="0" |
| | | element.tjProjectList.forEach(item => { |
| | | item.a="0" |
| | | item.b=0 |
| | | item.c="0" |
| | | item.d="0" |
| | | }) |
| | | }); |
| | | |
| | | this.ListId.push(this.projectList[0].proId) |
| | | this.key = response.data.key |
| | | // if (this.key == "Y") { |
| | | // this.key = response.data.key |
| | | // } else if (response.data.key == "N") { |
| | | // this.key = response.data.key |
| | | // } |
| | | getChartByDeptId(data).then((response) => { |
| | | this.projectList = response.data; |
| | | this.loading = false; |
| | | }); |
| | | }, |