This commit is contained in:
2024-03-29 16:17:23 +08:00
parent bac5bc4408
commit 9c86f86ed5
3 changed files with 76 additions and 22 deletions

View File

@ -47,7 +47,7 @@ export function delQuestion(id) {
//科室接口 //科室接口
export function getDepartmentList(query) { export function getDepartmentList(query) {
return request({ return request({
url: '/system/department/getDepartmentList', url: '/system/question/departmentQuestionCount',
method: 'get', method: 'get',
params: query params: query
}) })

View File

@ -2,28 +2,31 @@
<div class="app-container"> <div class="app-container">
<el-row :gutter="20"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="4" :xs="24"> <el-col :span="5" :xs="24">
<div class="head-container"> <div class="left" ref="box">
<el-input v-model="departmentName" placeholder="请输入科室名称" clearable size="small" prefix-icon="el-icon-search" <div class="name">科室名称</div>
style="margin-bottom: 20px" /> <div style="padding: 10px 0;">
</div> <el-input v-model="departmentName" placeholder="请输入科室名称" clearable @keyup.enter.native="getTreeselect" />
<div class="head-container"> </div>
<el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false" <div class="listitem" v-for="(item, index) in deptOptions" :key="index" @click="clickDepartmenitem(item)">
:filter-node-method="filterNode" ref="tree" default-expand-all highlight-current <div :class="queryParams.departmentId == item.id ? 'allactive' : 'all'">
@node-click="handleNodeClick" /> {{ item.departmentName }}
</div>
<span class="count">{{ item.countNum }}</span>
</div>
</div> </div>
</el-col> </el-col>
<!--用户数据--> <!--用户数据-->
<el-col :span="20" :xs="24"> <el-col :span="19" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="70px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="70px">
<el-form-item label="病种名称" prop="diseaseTypeName">
<el-input v-model="queryParams.diseaseTypeName" placeholder="请输入病种名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="问卷标题" prop="questionnaireName"> <el-form-item label="问卷标题" prop="questionnaireName">
<el-input v-model="queryParams.questionnaireName" placeholder="请输入问卷标题" clearable <el-input v-model="queryParams.questionnaireName" placeholder="请输入问卷标题" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item label="病种名称" prop="diseaseTypeName">
<el-input v-model="queryParams.diseaseTypeName" placeholder="请输入病种名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -139,7 +142,7 @@ export default {
watch: { watch: {
// //
departmentName(val) { departmentName(val) {
this.$refs.tree.filter(val); // this.getTreeselect()
} }
}, },
created() { created() {
@ -147,6 +150,11 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
clickDepartmenitem(item) {
this.loading = true;
this.queryParams.departmentId = item.id;
this.getList();
},
classificationupload() { classificationupload() {
let query = { let query = {
id: this.classificationform.id, id: this.classificationform.id,
@ -228,10 +236,12 @@ export default {
}, },
/** 查询科室下拉树结构 */ /** 查询科室下拉树结构 */
getTreeselect() { getTreeselect() {
getDepartmentList({}).then(response => { getDepartmentList({
response.data.forEach(e => { departmentName: this.departmentName
e.label = e.departmentName }).then(response => {
}) // response.data.forEach(e => {
// e.label = e.departmentName
// })
this.deptOptions = response.data; this.deptOptions = response.data;
}); });
selectUserDepartment().then(res => { selectUserDepartment().then(res => {
@ -295,3 +305,45 @@ export default {
} }
}; };
</script> </script>
<style scoped lang="scss">
.left {
height: 500px;
overflow: auto;
.name {
font-weight: 700;
margin-bottom: 10px;
}
.listitem {
width: 100%;
height: 50px;
border-bottom: 1px solid #dcdfe6;
position: relative;
.count {
display: inline-block;
position: absolute;
left: 210px;
color: #a4a6aa;
top: 50%;
transform: translateY(-50%);
font-size: 13px;
}
.all {
height: 50px;
line-height: 50px;
padding-left: 13px;
}
.allactive {
background: #e8f4ff;
height: 50px;
line-height: 50px;
padding-left: 13px;
border-left: 3px solid #4d9de7;
}
}
}
</style>

View File

@ -387,13 +387,15 @@ export default {
width: 100%; width: 100%;
height: 50px; height: 50px;
border-bottom: 1px solid #dcdfe6; border-bottom: 1px solid #dcdfe6;
position: relative;
.count { .count {
display: inline-block; display: inline-block;
position: relative; position: absolute;
left: 210px; left: 210px;
color: #a4a6aa; color: #a4a6aa;
top: -35px; top: 50%;
transform: translateY(-50%);
font-size: 13px; font-size: 13px;
} }