xg
This commit is contained in:
parent
bac5bc4408
commit
9c86f86ed5
@ -47,7 +47,7 @@ export function delQuestion(id) {
|
||||
//科室接口
|
||||
export function getDepartmentList(query) {
|
||||
return request({
|
||||
url: '/system/department/getDepartmentList',
|
||||
url: '/system/question/departmentQuestionCount',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
|
||||
@ -2,28 +2,31 @@
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<el-input v-model="departmentName" placeholder="请输入科室名称" clearable size="small" prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px" />
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree :data="deptOptions" :props="defaultProps" :expand-on-click-node="false"
|
||||
:filter-node-method="filterNode" ref="tree" default-expand-all highlight-current
|
||||
@node-click="handleNodeClick" />
|
||||
<el-col :span="5" :xs="24">
|
||||
<div class="left" ref="box">
|
||||
<div class="name">科室名称</div>
|
||||
<div style="padding: 10px 0;">
|
||||
<el-input v-model="departmentName" placeholder="请输入科室名称" clearable @keyup.enter.native="getTreeselect" />
|
||||
</div>
|
||||
<div class="listitem" v-for="(item, index) in deptOptions" :key="index" @click="clickDepartmenitem(item)">
|
||||
<div :class="queryParams.departmentId == item.id ? 'allactive' : 'all'">
|
||||
{{ item.departmentName }}
|
||||
</div>
|
||||
<span class="count">{{ item.countNum }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</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-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-input v-model="queryParams.questionnaireName" placeholder="请输入问卷标题" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</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-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>
|
||||
@ -139,7 +142,7 @@ export default {
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
departmentName(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
// this.getTreeselect()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -147,6 +150,11 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
clickDepartmenitem(item) {
|
||||
this.loading = true;
|
||||
this.queryParams.departmentId = item.id;
|
||||
this.getList();
|
||||
},
|
||||
classificationupload() {
|
||||
let query = {
|
||||
id: this.classificationform.id,
|
||||
@ -228,10 +236,12 @@ export default {
|
||||
},
|
||||
/** 查询科室下拉树结构 */
|
||||
getTreeselect() {
|
||||
getDepartmentList({}).then(response => {
|
||||
response.data.forEach(e => {
|
||||
e.label = e.departmentName
|
||||
})
|
||||
getDepartmentList({
|
||||
departmentName: this.departmentName
|
||||
}).then(response => {
|
||||
// response.data.forEach(e => {
|
||||
// e.label = e.departmentName
|
||||
// })
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
selectUserDepartment().then(res => {
|
||||
@ -295,3 +305,45 @@ export default {
|
||||
}
|
||||
};
|
||||
</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>
|
||||
@ -387,13 +387,15 @@ export default {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
position: relative;
|
||||
|
||||
.count {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
position: absolute;
|
||||
left: 210px;
|
||||
color: #a4a6aa;
|
||||
top: -35px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user