Merge remote-tracking branch 'origin/dev' into dev
60
src/api/manage/template.js
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询微信模板信息列表
|
||||||
|
export function listTemplate(query) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/template/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询微信模板信息详细
|
||||||
|
export function getTemplate(id) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/template/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增微信模板信息
|
||||||
|
export function addTemplate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/template/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改微信模板信息
|
||||||
|
export function updateTemplate(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/template/edit',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除微信模板信息
|
||||||
|
export function delTemplate(id) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/template/remove/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 左侧微信列表
|
||||||
|
export function listWechatTemplateNum(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/department/listWechatTemplateNum',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 适用任务类型
|
||||||
|
|
||||||
|
export function typelist(dictType) {
|
||||||
|
return request({
|
||||||
|
url: '/system/dict/data/type/'+dictType,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -12,7 +12,7 @@ export function listOperationInfo(query) {
|
|||||||
// 查询手术信息详细
|
// 查询手术信息详细
|
||||||
export function getOperationInfo(id) {
|
export function getOperationInfo(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/operationInfo/operationInfo/' + id,
|
url: '/manage/operationInfo/' + id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -20,7 +20,7 @@ export function getOperationInfo(id) {
|
|||||||
// 新增手术信息
|
// 新增手术信息
|
||||||
export function addOperationInfo(data) {
|
export function addOperationInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/operationInfo/operationInfo/add',
|
url: '/manage/operationInfo/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -29,7 +29,7 @@ export function addOperationInfo(data) {
|
|||||||
// 修改手术信息
|
// 修改手术信息
|
||||||
export function updateOperationInfo(data) {
|
export function updateOperationInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/operationInfo/operationInfo/edit',
|
url: '/manage/operationInfo/edit',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
@ -38,7 +38,7 @@ export function updateOperationInfo(data) {
|
|||||||
// 删除手术信息
|
// 删除手术信息
|
||||||
export function delOperationInfo(id) {
|
export function delOperationInfo(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/operationInfo/operationInfo/remove/' + id,
|
url: '/manage/operationInfo/remove/' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
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
|
getList
|
||||||
} from '@/api/manage/healthEducation'
|
} from '@/api/manage/healthEducation'
|
||||||
export default {
|
export default {
|
||||||
name: "visitRecords",
|
name: "healthEducation",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "visitRecords",
|
name: "indicatorMonitoring",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "visitRecords",
|
name: "signingRecords",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
|
|||||||
@ -345,7 +345,7 @@ import { listPatientInfo, getPatientInfo, delPatientInfo, addPatientInfo, update
|
|||||||
import { getAge } from "@/utils/age";
|
import { getAge } from "@/utils/age";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PatientInfo",
|
name: "preHospitalized",
|
||||||
dicts: ['patient_type', 'visit_method', 'sign_status', 'patient_source'],
|
dicts: ['patient_type', 'visit_method', 'sign_status', 'patient_source'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -83,18 +83,7 @@
|
|||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['manage:script:remove']"
|
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@ -839,11 +828,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
console.log(this.departmentName, '00000')
|
console.log(this.departmentName, '00000')
|
||||||
this.diseaseshowst = true;
|
this.diseaseshowst = true;
|
||||||
// if(this.itemname){
|
|
||||||
// this.querydisease.departmentId=this.itemname
|
|
||||||
// }else{
|
|
||||||
this.querydisease.departmentId = this.form.departmentId
|
this.querydisease.departmentId = this.form.departmentId
|
||||||
// }
|
|
||||||
this.infodisease()
|
this.infodisease()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1018,13 +1003,10 @@ export default {
|
|||||||
getScript(id).then(response => {
|
getScript(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.diseaseTypeName = response.data.diseaseTypeName
|
this.diseaseTypeName = response.data.diseaseTypeName
|
||||||
// this.form.diseaseTypeId=response.data.diseaseTypeId
|
|
||||||
// this.form.departmentId = response.data.departmentId
|
|
||||||
this.departmentName = response.data.departmentName
|
this.departmentName = response.data.departmentName
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改话术信息";
|
this.title = "修改话术信息";
|
||||||
});
|
});
|
||||||
console.log(this.form,'00000')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
@ -1036,9 +1018,6 @@ export default {
|
|||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
this.form.departmentName = this.departmentName
|
this.form.departmentName = this.departmentName
|
||||||
this.form.diseaseTypeName = this.diseaseTypeName
|
this.form.diseaseTypeName = this.diseaseTypeName
|
||||||
|
|
||||||
console.log(this.form)
|
|
||||||
|
|
||||||
updateScript(this.form).then(response => {
|
updateScript(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -1052,16 +1031,13 @@ export default {
|
|||||||
this.form.diseaseTypeName = this.diseaseTypeName
|
this.form.diseaseTypeName = this.diseaseTypeName
|
||||||
}
|
}
|
||||||
if(this.itemname){
|
if(this.itemname){
|
||||||
console.log('000000000000')
|
|
||||||
this.form.departmentName = this.departmentName
|
this.form.departmentName = this.departmentName
|
||||||
this.form.departmentId=this.itemname
|
this.form.departmentId=this.itemname
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
console.log('222222222')
|
|
||||||
|
|
||||||
this.form.departmentName = this.departmentName
|
this.form.departmentName = this.departmentName
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
addScript(this.form).then(response => {
|
addScript(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
@ -1070,8 +1046,6 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -1098,6 +1072,16 @@ export default {
|
|||||||
return delScript(ids);
|
return delScript(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
||||||
|
var quer={
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
}
|
||||||
|
listScript(quer).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
|
||||||
|
});
|
||||||
|
this.Departmentlist();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
|
|||||||
876
src/views/manage/template/index.vue
Normal file
@ -0,0 +1,876 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
label="微信模版名称"
|
||||||
|
prop="wechatTemplateName"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.wechatTemplateName"
|
||||||
|
placeholder="请输入微信模版名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="模板ID" prop="templateId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.templateId"
|
||||||
|
placeholder="请输入模板ID"
|
||||||
|
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>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['manage:template:add']"
|
||||||
|
>新增微信模版</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="5">
|
||||||
|
<div class="left" ref="box">
|
||||||
|
<div class="name">科室名称</div>
|
||||||
|
<div>
|
||||||
|
<el-input
|
||||||
|
v-model="name"
|
||||||
|
placeholder="请输入科室名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="listitem">
|
||||||
|
<div
|
||||||
|
:class="itemname == null ? 'allactive' : 'all'"
|
||||||
|
@click="itemdata()"
|
||||||
|
>
|
||||||
|
全部
|
||||||
|
</div>
|
||||||
|
<span class="count">{{ count }}</span>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="listitem"
|
||||||
|
v-for="(item, index) in DepartmentoList"
|
||||||
|
:key="index"
|
||||||
|
@click="itemdata(item)"
|
||||||
|
>
|
||||||
|
<div :class="itemname == item.id ? 'allactive' : 'all'">
|
||||||
|
{{ item.departmentName }}
|
||||||
|
</div>
|
||||||
|
<span class="count">{{ item.countNum }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="19">
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="templateList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="55" align="center" label="序号"/>
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="微信模版名称"
|
||||||
|
align="center"
|
||||||
|
prop="wechatTemplateName"
|
||||||
|
/>
|
||||||
|
<el-table-column label="模板ID" align="center" prop="templateId" />
|
||||||
|
<el-table-column
|
||||||
|
label="模板来源"
|
||||||
|
align="center"
|
||||||
|
prop="templateSource"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
scope.row.templateSource == "WE_CHAT_APPLET"
|
||||||
|
? "小程序"
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
scope.row.templateSource == "WE_CHAT_OFFICIAL_ACCOUNT"
|
||||||
|
? "公众号"
|
||||||
|
: ""
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="适用任务类型"
|
||||||
|
align="center"
|
||||||
|
prop="suitTaskTypeName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="病种名称"
|
||||||
|
align="center"
|
||||||
|
prop="templateSort"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<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="['manage:template:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['manage:template: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>
|
||||||
|
|
||||||
|
<!-- 添加或修改微信模板信息对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
|
||||||
|
<el-form-item label="微信模板名称" prop="wechatTemplateName">
|
||||||
|
<el-input v-model="form.wechatTemplateName" placeholder="请输入微信模板名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="模板ID" prop="templateId">
|
||||||
|
<el-input v-model="form.templateId" placeholder="请输入模板ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="模板内容" prop="templateContent">
|
||||||
|
<el-input v-model="form.templateContent" placeholder="请输入模板内容" type="textarea" />
|
||||||
|
|
||||||
|
<!-- <editor v-model="form.templateContent" :min-height="192"/> -->
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="模板来源" prop="templateSource">
|
||||||
|
<el-select v-model="form.templateSource" placeholder="请选择" style="width:380px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="适用数据类型" prop="suitTaskTypeId">
|
||||||
|
<el-select v-model="form.suitTaskTypeId " placeholder="请选择" style="width:380px" @change="change">
|
||||||
|
<el-option
|
||||||
|
v-for="item in type"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.dictLabel"
|
||||||
|
:value="item.dictCode"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="科室名称" prop="departmentId">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
v-if="departmentName == '请选择科室'"
|
||||||
|
@click="clickinnerVisible()"
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ departmentName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickinnerVisible()"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ departmentName }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="病种名称" prop="diseaseTypeName">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
v-if="diseaseTypeName == '请选择病种'"
|
||||||
|
@click="clickdisease()"
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ diseaseTypeName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickdisease()"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 379px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ diseaseTypeName }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 科室弹框 -->
|
||||||
|
<el-dialog
|
||||||
|
title=""
|
||||||
|
:visible.sync="innerVisibleshow"
|
||||||
|
width="1000px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="innerVisiblecancel"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="queryForm"
|
||||||
|
:model="informationqueryParams"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item label="科室名称" prop="departmentName" label-width="120">
|
||||||
|
<el-input
|
||||||
|
v-model="informationqueryParams.departmentName"
|
||||||
|
placeholder="请输入科室名称"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="informationInfoinfo"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="mini"
|
||||||
|
@click="addresetQuerylist"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="infolist"
|
||||||
|
@cell-dblclick="nurseclick"
|
||||||
|
v-loading="loading"
|
||||||
|
>
|
||||||
|
<el-table-column label="请选择" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
v-if="form.departmentId == scope.row.departmentCode"
|
||||||
|
circle
|
||||||
|
@click="nurseclick(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
circle
|
||||||
|
@click="nurseclick(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="departmentName"
|
||||||
|
label="科室名称"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="totaldepartment > 0"
|
||||||
|
:total="totaldepartment"
|
||||||
|
:page.sync="informationqueryParams.pageNum"
|
||||||
|
:limit.sync="informationqueryParams.pageSize"
|
||||||
|
@pagination="informationInfoinfo"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 病种弹框 -->
|
||||||
|
<el-dialog
|
||||||
|
title=""
|
||||||
|
:visible.sync="diseaseshowst"
|
||||||
|
width="1000px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="canceldiseases"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="queryForm"
|
||||||
|
:model="querydisease"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="80px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
|
<el-form-item label="病种名称" prop="departmentName" label-width="120">
|
||||||
|
<el-input
|
||||||
|
v-model="querydisease.departmentName"
|
||||||
|
placeholder="请输入病种名称"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="infodisease"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetdisease"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="listdisease"
|
||||||
|
@cell-dblclick="nurseclickdisease"
|
||||||
|
v-loading="loading"
|
||||||
|
>
|
||||||
|
<el-table-column label="请选择" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
v-if="form.diseaseTypeId == scope.row.diseaseTypeCode"
|
||||||
|
circle
|
||||||
|
@click="nurseclickdisease(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
circle
|
||||||
|
@click="nurseclickdisease(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
property="diseaseTypeName"
|
||||||
|
label="病种名称"
|
||||||
|
align="center"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="diseasetotal > 0"
|
||||||
|
:total="diseasetotal"
|
||||||
|
:page.sync="querydisease.pageNum"
|
||||||
|
:limit.sync="querydisease.pageSize"
|
||||||
|
@pagination="infodisease"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listTemplate, getTemplate, delTemplate, addTemplate, updateTemplate, listWechatTemplateNum ,typelist} from "@/api/manage/template";
|
||||||
|
import {department, listDisease } from "@/api/manage/script";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Template",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
itemname: null,
|
||||||
|
departmentName: null,
|
||||||
|
diseaseTypeName: null,
|
||||||
|
name: '',
|
||||||
|
departmentId: null,
|
||||||
|
count:'',//全部
|
||||||
|
DepartmentoList: [],//左侧数组
|
||||||
|
// 左侧传值
|
||||||
|
querydepartmen: {
|
||||||
|
departmentName: "",
|
||||||
|
// pageNum: 1,
|
||||||
|
// pageSize: 10,
|
||||||
|
|
||||||
|
},
|
||||||
|
options: [{
|
||||||
|
value: 'WE_CHAT_APPLET',
|
||||||
|
label: '小程序'
|
||||||
|
}, {
|
||||||
|
value: 'WE_CHAT_OFFICIAL_ACCOUNT',
|
||||||
|
label: '公众号'
|
||||||
|
},],
|
||||||
|
type:[],//类型
|
||||||
|
|
||||||
|
|
||||||
|
innerVisibleshow: false, //科室弹框
|
||||||
|
// 科室
|
||||||
|
informationqueryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
departmentName: null,
|
||||||
|
},
|
||||||
|
infolist: [],
|
||||||
|
totaldepartment: 0,
|
||||||
|
|
||||||
|
diseaseshowst: false,//病种弹框
|
||||||
|
querydisease: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
listdisease: [],
|
||||||
|
diseasetotal: 0,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
optionsDisease: [],
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 微信模板信息表格数据
|
||||||
|
templateList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
wechatTemplateName:null,
|
||||||
|
departmentId: null,
|
||||||
|
departmentName: null,
|
||||||
|
diseaseTypeId: null,
|
||||||
|
diseaseTypeName: null,
|
||||||
|
templateId: null,
|
||||||
|
templateContent: null,
|
||||||
|
templateSource: null,
|
||||||
|
templateSort: null,
|
||||||
|
templateRemark: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
wechatTemplateName: [
|
||||||
|
{ required: true, message: "微信模板名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
templateId: [
|
||||||
|
{ required: true, message: "模板ID不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
templateSource: [
|
||||||
|
{ required: true, message: "模板来源不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
dictCode: [
|
||||||
|
{ required: true, message: "适用数据类型不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
departmentId: [
|
||||||
|
{ required: true, message: "所属科室名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
name(val) {
|
||||||
|
this.querydepartmen.departmentName = val
|
||||||
|
this.Departmentlist();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.Departmentlist();
|
||||||
|
this.typelistdata();
|
||||||
|
listTemplate(this.queryParams).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询微信模板信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listTemplate(this.queryParams).then(response => {
|
||||||
|
this.templateList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 适用任务类型
|
||||||
|
typelistdata(){
|
||||||
|
var dictType="suit_task_type"
|
||||||
|
typelist(dictType).then(response=>{
|
||||||
|
this.type=response.data
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 类型点击事件
|
||||||
|
change(e){
|
||||||
|
this.form.suitTaskTypeName=this.type.find(f=> f.dictCode==e).dictLabel
|
||||||
|
},
|
||||||
|
|
||||||
|
// 左侧科室列表
|
||||||
|
Departmentlist() {
|
||||||
|
this.loading = true;
|
||||||
|
listWechatTemplateNum(this.querydepartmen).then(response => {
|
||||||
|
this.DepartmentoList = response.data;
|
||||||
|
// this.count=this.DepartmentoList.length
|
||||||
|
|
||||||
|
|
||||||
|
// this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
// 左侧科室
|
||||||
|
itemdata(item) {
|
||||||
|
if (item) {
|
||||||
|
|
||||||
|
this.itemname = item.id
|
||||||
|
this.departmentName = item.departmentName
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.departmentId = item.id
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.queryParams.departmentId = ''
|
||||||
|
this.itemname = null
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 点击科室
|
||||||
|
clickinnerVisible() {
|
||||||
|
this.innerVisibleshow = true;
|
||||||
|
if (this.itemname) {
|
||||||
|
this.informationqueryParams.departmentId = this.itemname
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.informationqueryParams.departmentId = null
|
||||||
|
}
|
||||||
|
this.informationInfoinfo();
|
||||||
|
},
|
||||||
|
// 科室列表
|
||||||
|
informationInfoinfo() {
|
||||||
|
department(this.informationqueryParams).then((response) => {
|
||||||
|
this.infolist = response.rows;
|
||||||
|
this.totaldepartment = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
// this.informationqueryParams.page = 1;
|
||||||
|
},
|
||||||
|
// 科室名称重置
|
||||||
|
addresetQuerylist() {
|
||||||
|
this.informationqueryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
|
this.informationInfoinfo();
|
||||||
|
},
|
||||||
|
innerVisiblecancel() {
|
||||||
|
this.innerVisibleshow = false;
|
||||||
|
},
|
||||||
|
// 科室名称圆点按钮
|
||||||
|
nurseclick(row) {
|
||||||
|
this.form.departmentId = row.departmentCode;
|
||||||
|
this.departmentName = row.departmentName;
|
||||||
|
this.innerVisibleshow = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 病种列表
|
||||||
|
infodisease() {
|
||||||
|
listDisease(this.querydisease).then((response) => {
|
||||||
|
this.listdisease = response.rows;
|
||||||
|
this.diseasetotal = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 点击病种
|
||||||
|
clickdisease() {
|
||||||
|
if (this.departmentName == '请选择科室') {
|
||||||
|
this.$modal.msgError("请先选择科室");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.diseaseshowst = true;
|
||||||
|
this.querydisease.departmentId = this.form.departmentId
|
||||||
|
this.infodisease()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 病种名称圆点按钮
|
||||||
|
nurseclickdisease(row) {
|
||||||
|
this.form.diseaseTypeId = row.diseaseTypeCode;
|
||||||
|
this.diseaseTypeName = row.diseaseTypeName;
|
||||||
|
this.diseaseshowst = false;
|
||||||
|
|
||||||
|
},
|
||||||
|
// 重置
|
||||||
|
resetdisease() {
|
||||||
|
querydisease = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
};
|
||||||
|
this.infodisease()
|
||||||
|
},
|
||||||
|
|
||||||
|
canceldiseases() {
|
||||||
|
this.diseaseshowst = false;
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
departmentId: null,
|
||||||
|
dictCode:null,
|
||||||
|
departmentName: null,
|
||||||
|
diseaseTypeId: null,
|
||||||
|
diseaseTypeName: null,
|
||||||
|
templateId: null,
|
||||||
|
templateContent: null,
|
||||||
|
templateSource: null,
|
||||||
|
templateSort: null,
|
||||||
|
templateRemark: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.queryParams.departmentId = null;
|
||||||
|
this.itemname = null;
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
if (this.itemname) {
|
||||||
|
this.form.departmentName = this.departmentName
|
||||||
|
this.form.departmentId=this.itemname
|
||||||
|
} else if(this.itemname == null){
|
||||||
|
this.departmentName = "请选择科室"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.departmentName = "请选择科室"
|
||||||
|
}
|
||||||
|
this.diseaseTypeName = "请选择病种"
|
||||||
|
|
||||||
|
this.open = true;
|
||||||
|
this.title = "新增微信模板";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
if (!this.itemname) {
|
||||||
|
this.$modal.msgError("请先选择科室");
|
||||||
|
} else {
|
||||||
|
// this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
// this.getDisease();
|
||||||
|
getTemplate(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.diseaseTypeName = response.data.diseaseTypeName
|
||||||
|
this.departmentName = response.data.departmentName
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改话术信息";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
this.form.departmentName = this.departmentName
|
||||||
|
this.form.diseaseTypeName = this.diseaseTypeName
|
||||||
|
updateTemplate(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if(this.diseaseTypeName == "请选择病种"){
|
||||||
|
this.form.diseaseTypeName==null
|
||||||
|
}else{
|
||||||
|
this.form.diseaseTypeName = this.diseaseTypeName
|
||||||
|
}
|
||||||
|
if(this.itemname){
|
||||||
|
|
||||||
|
this.form.departmentName = this.departmentName
|
||||||
|
this.form.departmentId=this.itemname
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.form.departmentName = this.departmentName
|
||||||
|
|
||||||
|
}
|
||||||
|
addTemplate(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除微信模板信息?').then(function () {
|
||||||
|
return delTemplate(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
var quer={
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
|
||||||
|
}
|
||||||
|
listTemplate(quer).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
});
|
||||||
|
this.Departmentlist();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => { });
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('manage/template/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `template_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.left {
|
||||||
|
height: 530px;
|
||||||
|
overflow: auto;
|
||||||
|
.name {
|
||||||
|
font-weight: 700;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.listitem {
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
.count {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
// right: -172px;
|
||||||
|
left: 210px;
|
||||||
|
color: #a4a6aa;
|
||||||
|
top: -35px;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
left: 20px;
|
||||||
|
top: -11px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -348,7 +348,7 @@ import { listPatientInfo, getPatientInfo, delPatientInfo, addPatientInfo, update
|
|||||||
import { getAge } from "@/utils/age";
|
import { getAge } from "@/utils/age";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PatientInfo",
|
name: "visitin",
|
||||||
dicts: ['patient_type', 'visit_method', 'sign_status', 'patient_source'],
|
dicts: ['patient_type', 'visit_method', 'sign_status', 'patient_source'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -355,7 +355,7 @@ import { listPatientInfo, getPatientInfo, delPatientInfo, addPatientInfo, update
|
|||||||
import { getAge } from "@/utils/age";
|
import { getAge } from "@/utils/age";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PatientInfo",
|
name: "visitout",
|
||||||
dicts: ['patient_type', 'visit_method', 'sign_status', 'patient_source'],
|
dicts: ['patient_type', 'visit_method', 'sign_status', 'patient_source'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -186,43 +186,7 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 用户导入对话框 -->
|
|
||||||
<el-dialog
|
|
||||||
:title="upload.title"
|
|
||||||
:visible.sync="upload.open"
|
|
||||||
width="400px"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<el-upload
|
|
||||||
ref="upload"
|
|
||||||
:limit="1"
|
|
||||||
accept=".xlsx, .xls"
|
|
||||||
:headers="upload.headers"
|
|
||||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
|
||||||
:disabled="upload.isUploading"
|
|
||||||
:on-progress="handleFileUploadProgress"
|
|
||||||
:on-success="handleFileSuccess"
|
|
||||||
:auto-upload="false"
|
|
||||||
drag
|
|
||||||
>
|
|
||||||
<i class="el-icon-upload"></i>
|
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
||||||
<div class="el-upload__tip text-center" slot="tip">
|
|
||||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
|
||||||
<el-link
|
|
||||||
type="primary"
|
|
||||||
:underline="false"
|
|
||||||
style="font-size: 12px; vertical-align: baseline"
|
|
||||||
@click="importTemplate"
|
|
||||||
>下载模板</el-link
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</el-upload>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|
||||||
<el-button @click="upload.open = false">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -341,7 +305,6 @@ export default {
|
|||||||
// 左侧科室
|
// 左侧科室
|
||||||
itemdata(item) {
|
itemdata(item) {
|
||||||
if (item) {
|
if (item) {
|
||||||
console.log(item, '9999')
|
|
||||||
this.itemname = item.id
|
this.itemname = item.id
|
||||||
this.form.departmentId = this.itemname
|
this.form.departmentId = this.itemname
|
||||||
this.form.departmentName = item.departmentName
|
this.form.departmentName = item.departmentName
|
||||||
@ -355,41 +318,6 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 导入按钮操作 */
|
|
||||||
handleImport() {
|
|
||||||
this.upload.title = "导入手术名称";
|
|
||||||
this.upload.open = true;
|
|
||||||
},
|
|
||||||
/** 下载模板操作 */
|
|
||||||
importTemplate() {
|
|
||||||
this.download(
|
|
||||||
"system/user/importTemplate",
|
|
||||||
{},
|
|
||||||
`user_template_${new Date().getTime()}.xlsx`
|
|
||||||
);
|
|
||||||
},
|
|
||||||
// 文件上传中处理
|
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
|
||||||
this.upload.isUploading = true;
|
|
||||||
},
|
|
||||||
// 文件上传成功处理
|
|
||||||
handleFileSuccess(response, file, fileList) {
|
|
||||||
this.upload.open = false;
|
|
||||||
this.upload.isUploading = false;
|
|
||||||
this.$refs.upload.clearFiles();
|
|
||||||
this.$alert(
|
|
||||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|
||||||
response.msg +
|
|
||||||
"</div>",
|
|
||||||
"导入结果",
|
|
||||||
{ dangerouslyUseHTMLString: true }
|
|
||||||
);
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
// 提交上传文件
|
|
||||||
submitFileForm() {
|
|
||||||
this.$refs.upload.submit();
|
|
||||||
},
|
|
||||||
// 左侧科室
|
// 左侧科室
|
||||||
Departmentlist() {
|
Departmentlist() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -533,6 +461,15 @@ export default {
|
|||||||
return delOperationInfo(ids);
|
return delOperationInfo(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
var quer={
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
}
|
||||||
|
listOperationInfo(quer).then(response => {
|
||||||
|
this.count = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
this.Departmentlist();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
|
|||||||
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>
|
||||||