From be330a8520fce4f9010295a8d727461962e76969 Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期四, 30 十一月 2023 17:57:45 +0800 Subject: [PATCH] qxtj --- src/views/standard/tijianxinxi/index.vue | 122 ++++++---------------------------------- 1 files changed, 18 insertions(+), 104 deletions(-) diff --git a/src/views/standard/tijianxinxi/index.vue b/src/views/standard/tijianxinxi/index.vue index 3606ea8..7b948e7 100644 --- a/src/views/standard/tijianxinxi/index.vue +++ b/src/views/standard/tijianxinxi/index.vue @@ -29,11 +29,11 @@ <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> @@ -42,28 +42,14 @@ <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", @@ -107,7 +93,6 @@ tjStandardList: [], // 琛ㄦ牸鏍戞暟鎹� deptList: [], - parentNameList: [], sfxmId:null, // 浣撴椤圭洰琛ㄦ牸鏁版嵁 projectList: [], @@ -207,77 +192,26 @@ }, 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; @@ -290,28 +224,8 @@ 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; }); }, -- Gitblit v1.8.0