修改
54
src/api/system/question.js
Normal file
@ -0,0 +1,54 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询问卷基本信息列表
|
||||
export function listQuestion(query) {
|
||||
return request({
|
||||
url: '/system/question/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询问卷基本信息详细
|
||||
export function getQuestion(id) {
|
||||
return request({
|
||||
url: '/system/question/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增问卷基本信息
|
||||
export function addQuestion(data) {
|
||||
return request({
|
||||
url: '/system/question',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改问卷基本信息
|
||||
export function updateQuestion(data) {
|
||||
return request({
|
||||
url: '/system/question',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除问卷基本信息
|
||||
export function delQuestion(id) {
|
||||
return request({
|
||||
url: '/system/question/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//科室接口
|
||||
export function getDepartmentList(query) {
|
||||
return request({
|
||||
url: 'system/department/getDepartmentList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
BIN
src/assets/system/dafen.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/assets/system/dafens.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/assets/system/danxuan.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/assets/system/danxuans.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/assets/system/duoxuan.png
Normal file
|
After Width: | Height: | Size: 681 B |
BIN
src/assets/system/duoxuans.png
Normal file
|
After Width: | Height: | Size: 754 B |
BIN
src/assets/system/gb.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/assets/system/riqi.png
Normal file
|
After Width: | Height: | Size: 583 B |
BIN
src/assets/system/shijian.png
Normal file
|
After Width: | Height: | Size: 984 B |
BIN
src/assets/system/tiankong.png
Normal file
|
After Width: | Height: | Size: 938 B |
BIN
src/assets/system/tiankongs.png
Normal file
|
After Width: | Height: | Size: 878 B |
BIN
src/assets/system/yidong.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
@ -45,7 +45,7 @@ import {
|
||||
getList
|
||||
} from '@/api/manage/healthEducation'
|
||||
export default {
|
||||
name: "visitRecords",
|
||||
name: "healthEducation",
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
name: "visitRecords",
|
||||
name: "indicatorMonitoring",
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "visitRecords",
|
||||
name: "signingRecords",
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
|
||||
@ -345,7 +345,7 @@ import { listPatientInfo, getPatientInfo, delPatientInfo, addPatientInfo, update
|
||||
import { getAge } from "@/utils/age";
|
||||
|
||||
export default {
|
||||
name: "PatientInfo",
|
||||
name: "preHospitalized",
|
||||
dicts: ['patient_type', 'visit_method', 'sign_status', 'patient_source'],
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -348,7 +348,7 @@ import { listPatientInfo, getPatientInfo, delPatientInfo, addPatientInfo, update
|
||||
import { getAge } from "@/utils/age";
|
||||
|
||||
export default {
|
||||
name: "PatientInfo",
|
||||
name: "visitin",
|
||||
dicts: ['patient_type', 'visit_method', 'sign_status', 'patient_source'],
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -355,7 +355,7 @@ import { listPatientInfo, getPatientInfo, delPatientInfo, addPatientInfo, update
|
||||
import { getAge } from "@/utils/age";
|
||||
|
||||
export default {
|
||||
name: "PatientInfo",
|
||||
name: "visitout",
|
||||
dicts: ['patient_type', 'visit_method', 'sign_status', 'patient_source'],
|
||||
data() {
|
||||
return {
|
||||
|
||||
524
src/views/system/addQuestionnaire/index.vue
Normal file
@ -0,0 +1,524 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="header">
|
||||
<div class="topheader">
|
||||
<el-button size="medium">返回</el-button>
|
||||
<el-button size="medium" type="primary" plain>预览问卷</el-button>
|
||||
<el-button size="medium" type="primary">保存</el-button>
|
||||
<el-button size="medium" type="primary">保存并发布</el-button>
|
||||
</div>
|
||||
<div class="bottomheader">
|
||||
<div class="questiontypes">
|
||||
<div class="typetitle">
|
||||
基本题型
|
||||
</div>
|
||||
<div class="texts" v-for="item in basicQuestiontypes" :key="item.id" @click="addquestion(item)">
|
||||
<img :src="item.src" alt="">
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="typetitle">
|
||||
组合题型
|
||||
</div>
|
||||
<div class="texts" v-for="item in combinationQuestiontypes" :key="item.id" @click="addquestion(item)">
|
||||
<img :src="item.src" alt="">
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="typetitle">
|
||||
其他题型
|
||||
</div>
|
||||
<div class="texts" v-for="item in otherQuestiontypes" :key="item.id" @click="addquestion(item)">
|
||||
<img :src="item.src" alt="">
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="questionnairedetails">
|
||||
<div>
|
||||
<div class="questionnaire-title">
|
||||
问卷标题:
|
||||
</div>
|
||||
<input type="text" class="title-input">
|
||||
<div class="questionnaire-title" style="margin-top:30px">
|
||||
问卷说明:
|
||||
</div>
|
||||
<editor :min-height="160" class="editor" />
|
||||
</div>
|
||||
<div class="addArea" v-if="questionlist.length == 0">
|
||||
<div class="addtext">
|
||||
点击左侧题型添加题目
|
||||
</div>
|
||||
</div>
|
||||
<div class="questionlist" v-else>
|
||||
<draggable v-model="questionlist">
|
||||
<transition-group>
|
||||
<div class="questionitem" v-for="(item, index) in questionlist" :key="item.id">
|
||||
<div v-if="item.questionname == '单选题'" class="item">
|
||||
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||
@click="delquestion(item, index)">
|
||||
<div class="questionname">
|
||||
{{ index + 1 }}. {{ item.questionname }}
|
||||
</div>
|
||||
<div class="title">
|
||||
<span>题目: </span>
|
||||
<el-input placeholder="请输入内容" v-model="item.title" clearable>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="options">
|
||||
<span>选项: </span>
|
||||
<div>
|
||||
<div v-for="(uitem, uindex) in item.options" :key="uindex"
|
||||
style="display:flex">
|
||||
<el-input placeholder="请输入内容" v-model="uitem.optionname" clearable>
|
||||
</el-input>
|
||||
<el-button icon="el-icon-close" type="text"
|
||||
style="color:red;margin-left:10px"
|
||||
@click="deloption(item, uitem, index, uindex)"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="more">
|
||||
<el-button size="medium" icon="el-icon-plus" type="text"
|
||||
@click="addoption(item)">添加选项</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.questionname == '多选题'" class="item">
|
||||
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||
@click="delquestion(item, index)">
|
||||
<div class="questionname">
|
||||
{{ index + 1 }}. {{ item.questionname }}
|
||||
</div>
|
||||
<div class="title">
|
||||
<span>题目: </span>
|
||||
<el-input placeholder="请输入内容" v-model="item.title" clearable>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="options">
|
||||
<span>选项: </span>
|
||||
<div>
|
||||
<div v-for="(uitem, uindex) in item.options" :key="uindex"
|
||||
style="display:flex">
|
||||
<el-input placeholder="请输入内容" v-model="uitem.optionname" clearable>
|
||||
</el-input>
|
||||
<el-button icon="el-icon-close" type="text"
|
||||
style="color:red;margin-left:10px"
|
||||
@click="deloption(item, uitem, index, uindex)"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="more">
|
||||
<el-button size="medium" icon="el-icon-plus" type="text"
|
||||
@click="addoption(item)">添加选项</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.questionname == '填空题'" class="item">
|
||||
<img src="@/assets/system/yidong.png" alt="" class="delicon yidong">
|
||||
<img src="@/assets/system/gb.png" alt="" class="delicon"
|
||||
@click="delquestion(item, index)">
|
||||
<div class="questionname">
|
||||
{{ index + 1 }}. {{ item.questionname }}
|
||||
</div>
|
||||
<div class="title">
|
||||
<span>题目: </span>
|
||||
<el-input placeholder="请输入内容" v-model="item.title" clearable>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="options" style="align-items:center">
|
||||
<span>回答: </span>
|
||||
<el-input style="margin:0;width:300px" v-model="item.option" disabled
|
||||
placeholder="填写问卷时,用户需要在此输入答案" />
|
||||
</div>
|
||||
<div class="more">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</div>
|
||||
</div>
|
||||
<div class="totalScore">
|
||||
<div class="totalscore-title">
|
||||
总分:0分
|
||||
</div>
|
||||
<div class="text">计分方式</div>
|
||||
<div class="introduce">根据多少道题平均分数</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import draggable from 'vuedraggable'
|
||||
export default {
|
||||
name: "addQuestionnaire",
|
||||
components: {
|
||||
draggable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
otherQuestiontypes: [
|
||||
{
|
||||
id: 'riqi',
|
||||
name: '日期填空题',
|
||||
src: require('@/assets/system/riqi.png')
|
||||
},
|
||||
{
|
||||
id: 'shijian',
|
||||
name: '时间填空题',
|
||||
src: require('@/assets/system/shijian.png')
|
||||
},
|
||||
],
|
||||
combinationQuestiontypes: [
|
||||
{
|
||||
id: 'danxuans',
|
||||
name: '组合单选题',
|
||||
src: require('@/assets/system/danxuans.png')
|
||||
},
|
||||
{
|
||||
id: 'duoxuans',
|
||||
name: '组合多选题',
|
||||
src: require('@/assets/system/duoxuans.png')
|
||||
},
|
||||
{
|
||||
id: 'tiankongs',
|
||||
name: '组合填空题',
|
||||
src: require('@/assets/system/tiankongs.png')
|
||||
},
|
||||
{
|
||||
id: 'dafens',
|
||||
name: '组合打分题',
|
||||
src: require('@/assets/system/dafens.png')
|
||||
},
|
||||
],
|
||||
basicQuestiontypes: [
|
||||
{
|
||||
id: 'danxuan',
|
||||
name: '单选题',
|
||||
src: require('@/assets/system/danxuan.png')
|
||||
},
|
||||
{
|
||||
id: 'duoxuan',
|
||||
name: '多选题',
|
||||
src: require('@/assets/system/duoxuan.png')
|
||||
},
|
||||
{
|
||||
id: 'tiankong',
|
||||
name: '填空题',
|
||||
src: require('@/assets/system/tiankong.png')
|
||||
},
|
||||
{
|
||||
id: 'dafen',
|
||||
name: '打分题',
|
||||
src: require('@/assets/system/dafen.png')
|
||||
},
|
||||
],
|
||||
questionlist: [],
|
||||
id: 99999999999,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
addquestion(item) {
|
||||
if (this.questionlist.length > 0) {
|
||||
if (this.questionlist[this.questionlist.length - 1].title == '') {
|
||||
return this.$message.error('请填写完在继续添加');
|
||||
}
|
||||
}
|
||||
this.id++
|
||||
if (item.id == 'danxuan') {
|
||||
this.questionlist.push({
|
||||
type: 'danxuan',
|
||||
id: this.id,
|
||||
questionname: '单选题',
|
||||
title: '',
|
||||
options: [{
|
||||
optionname: '',
|
||||
}, {
|
||||
optionname: '',
|
||||
}]
|
||||
})
|
||||
} else if (item.id == 'duoxuan') {
|
||||
this.questionlist.push({
|
||||
type: 'duoxuan',
|
||||
id: this.id,
|
||||
questionname: '多选题',
|
||||
title: '',
|
||||
options: [{
|
||||
optionname: '',
|
||||
}, {
|
||||
optionname: '',
|
||||
}]
|
||||
})
|
||||
} else if (item.id == 'tiankong') {
|
||||
this.questionlist.push({
|
||||
type: 'tiankong',
|
||||
id: this.id,
|
||||
questionname: '填空题',
|
||||
title: '',
|
||||
option: '',
|
||||
})
|
||||
}
|
||||
},
|
||||
addoption(item) {
|
||||
item.options.push({
|
||||
optionname: '',
|
||||
})
|
||||
},
|
||||
delquestion(item, index) {
|
||||
this.questionlist.splice(index, 1)
|
||||
},
|
||||
deloption(item, uitem, index, uindex) {
|
||||
if (item.options.length > 2) {
|
||||
item.options.splice(uindex, 1)
|
||||
} else {
|
||||
this.$message.error('最少保留两条选项!');
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
padding: 14px 0 0;
|
||||
background-color: #F2F3F5 !important;
|
||||
width: 100%;
|
||||
|
||||
.header {
|
||||
background-color: #fff;
|
||||
width: 98%;
|
||||
margin: 0 auto;
|
||||
border-radius: 8px;
|
||||
|
||||
.bottomheader {
|
||||
width: 98%;
|
||||
background-color: #F2F3F5 !important;
|
||||
margin: 14px auto;
|
||||
padding: 30px 0;
|
||||
display: flex;
|
||||
|
||||
.questionlist {
|
||||
margin-top: 40px;
|
||||
|
||||
.item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.delicon {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
right: 10px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.yidong {
|
||||
right: 50px;
|
||||
}
|
||||
|
||||
.questionitem {
|
||||
border-radius: 5px;
|
||||
margin: 40px auto;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 2px 4px 0px rgba(162, 162, 162, 0.5);
|
||||
width: 100%;
|
||||
margin: 20px auto;
|
||||
|
||||
.more {
|
||||
display: flex;
|
||||
border-radius: 5px;
|
||||
margin: 0 auto;
|
||||
background-color: #fff;
|
||||
width: 60%;
|
||||
padding: 30px 0;
|
||||
}
|
||||
|
||||
.options {
|
||||
display: flex;
|
||||
border-radius: 5px;
|
||||
margin: 40px auto;
|
||||
background-color: #fff;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.el-input {
|
||||
padding-left: 10px;
|
||||
display: block;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
width: 400px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
width: 80%;
|
||||
margin: 20px auto 30px;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.el-input {
|
||||
border: none;
|
||||
padding-left: 10px;
|
||||
border-radius: 5px;
|
||||
width: 400px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.questionname {
|
||||
padding: 20px 0 0 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.totalScore {
|
||||
width: calc(20% - 30px);
|
||||
margin-left: 30px;
|
||||
height: 790px;
|
||||
background: #FFFFFF;
|
||||
|
||||
.text {
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
line-height: 30px;
|
||||
width: calc(100% - 60px);
|
||||
margin: 20px auto 0;
|
||||
}
|
||||
|
||||
.introduce {
|
||||
width: calc(100% - 60px);
|
||||
margin: 0 auto;
|
||||
font-size: 14px;
|
||||
color: #999999;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #E2E2E2;
|
||||
}
|
||||
|
||||
.totalscore-title {
|
||||
padding: 20px 0 0 20px;
|
||||
font-weight: 600;
|
||||
font-size: 26px;
|
||||
color: #333333;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.questionnairedetails {
|
||||
padding-left: 60px;
|
||||
width: calc(60% - 30px);
|
||||
overflow: scroll;
|
||||
overflow-x: hidden !important;
|
||||
height: 790px;
|
||||
|
||||
.editor {
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 2px 4px 0px rgba(162, 162, 162, 0.5);
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.addArea {
|
||||
margin: 40px 0;
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
border: 1px dashed #999999;
|
||||
}
|
||||
|
||||
.addtext {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
line-height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title-input {
|
||||
width: 700px;
|
||||
height: 40px;
|
||||
padding-left: 20px;
|
||||
background: #FFFFFF;
|
||||
border: none;
|
||||
box-shadow: 0px 2px 4px 0px rgba(162, 162, 162, 0.5);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.questionnaire-title {
|
||||
font-size: 22px;
|
||||
margin-bottom: 15px;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.questiontypes {
|
||||
width: calc(20% - 30px);
|
||||
margin: 0 0 0 30px;
|
||||
height: 790px;
|
||||
background: #FFFFFF;
|
||||
|
||||
.texts:hover {
|
||||
box-shadow: 2px 3px 3px 2px rgba(162, 162, 162, 0.5);
|
||||
}
|
||||
|
||||
.texts:active {
|
||||
background-color: #E8F4FF;
|
||||
}
|
||||
|
||||
.texts {
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 50px;
|
||||
padding: 0 0 0 30px;
|
||||
|
||||
div {
|
||||
margin-left: 10px;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.typetitle {
|
||||
padding: 20px 0 10px 20px;
|
||||
font-weight: 600;
|
||||
font-size: 22px;
|
||||
color: #666666;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.topheader {
|
||||
padding-right: 30px;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
text-align: right;
|
||||
border-bottom: 1px solid #D9D9D9;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
178
src/views/system/question/index.vue
Normal file
@ -0,0 +1,178 @@
|
||||
<template>
|
||||
<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" />
|
||||
</div>
|
||||
</el-col>
|
||||
<!--用户数据-->
|
||||
<el-col :span="20" :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>
|
||||
<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-item style="float:right">
|
||||
<el-button type="primary" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['system:question:add']">新增问卷模板</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="questionList">
|
||||
<el-table-column label="序号" type="index" width="55" align="center" />
|
||||
<el-table-column label="问卷模板名称" align="center" prop="questionnaireName" />
|
||||
<el-table-column label="问题个数" align="center" prop="questionCount" />
|
||||
<el-table-column label="问卷模板ID" align="center" prop="questionnaireId" />
|
||||
<el-table-column label="问卷状态" align="center" prop="questionnaireStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" v-if="scope.row.questionnaireStatus == 'PUBLISHED'">已发布</el-button>
|
||||
<el-button size="mini" type="info" v-if="scope.row.questionnaireStatus == 'UNPUBLISHED'">未发布</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" />
|
||||
<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="['system:question:edit']">编辑</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:question:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listQuestion, getQuestion, delQuestion, addQuestion, updateQuestion, getDepartmentList } from "@/api/system/question";
|
||||
|
||||
export default {
|
||||
name: "Question",
|
||||
data() {
|
||||
return {
|
||||
//科室名称
|
||||
departmentName: '',
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
// 部门树选项
|
||||
deptOptions: undefined,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 问卷基本信息表格数据
|
||||
questionList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
departmentId: null,
|
||||
departmentName: null,
|
||||
diseaseTypeId: null,
|
||||
diseaseTypeName: null,
|
||||
questionnaireName: null,
|
||||
questionnaireDescription: null,
|
||||
answeringMethod: null,
|
||||
questionnaireId: null,
|
||||
questionCount: null,
|
||||
questionnaireTotalScore: null,
|
||||
questionnaireStatus: null,
|
||||
questionnaireSort: null,
|
||||
questionnaireRemark: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
departmentName(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTreeselect();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
this.queryParams.departmentId = data.id;
|
||||
this.handleQuery();
|
||||
},
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
/** 查询科室下拉树结构 */
|
||||
getTreeselect() {
|
||||
getDepartmentList({}).then(response => {
|
||||
response.data.forEach(e => {
|
||||
e.label = e.departmentName
|
||||
})
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
},
|
||||
/** 查询问卷基本信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listQuestion(this.queryParams).then(response => {
|
||||
this.questionList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除问卷?').then(function () {
|
||||
return delQuestion(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/question/export', {
|
||||
...this.queryParams
|
||||
}, `question_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||