修改
This commit is contained in:
parent
b721229862
commit
136400f95b
@ -73,7 +73,7 @@ export default {
|
||||
name: "DepartmentList",
|
||||
data() {
|
||||
return {
|
||||
vmodal: false,
|
||||
vmodal: true,
|
||||
roleKey: localStorage.getItem('roleKey'),
|
||||
open: false,
|
||||
switchvalue: true,
|
||||
@ -106,6 +106,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
|
||||
this.vmodal = this.modal
|
||||
this.Departmentlist();
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<el-dialog title="专病管理路径选择" :visible.sync="classificationOpen" width="70%" :before-close="classificationOpenfalse">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" :xs="24">
|
||||
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment"
|
||||
<DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
|
||||
:servicePackageId="servicePackageId" :methods="'selectDiseaseCounttwo'">
|
||||
</DepartmentList>
|
||||
</el-col>
|
||||
|
||||
@ -44,14 +44,30 @@
|
||||
<div class="questionnairedetails">
|
||||
<div>
|
||||
<div class="questionnaire-title">
|
||||
科室名称:
|
||||
</div>
|
||||
<el-select v-model="list.departmentId" placeholder=" " clearable class="title-input"
|
||||
style="padding:0" @clear="cleardepartment" @change="changedepartment">
|
||||
<el-option v-for="item in departmentlist" :key="item.id" :label="item.departmentName"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
<div class="questionnaire-title" style="margin-top:30px">
|
||||
病种名称:
|
||||
</div>
|
||||
<el-select v-model="list.diseaseTypeId" placeholder=" " clearable class="title-input"
|
||||
style="padding:0" @change="changediseaseType">
|
||||
<el-option v-for="item in diseaselist" :key="item.id" :label="item.diseaseTypeName"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
<div class="questionnaire-title" style="margin-top:30px">
|
||||
问卷标题:
|
||||
</div>
|
||||
<input type="text" class="title-input" v-model="list.questionnaireName">
|
||||
<div class="questionnaire-title" style="margin-top:30px">
|
||||
问卷说明:
|
||||
</div>
|
||||
<el-input type="textarea" class="editor" :rows="6" placeholder="请输入内容"
|
||||
:autosize="{ minRows: 6, maxRows: 10 }" v-model="list.questionnaireDescription">
|
||||
<el-input type="textarea" class="editor" :rows="6" :autosize="{ minRows: 6, maxRows: 10 }"
|
||||
v-model="list.questionnaireDescription">
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="addArea" v-if="questionlist.length == 0">
|
||||
@ -454,7 +470,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getQuestion, addQuestion, updateQuestion } from "@/api/system/question";
|
||||
import { getQuestion, addQuestion, updateQuestion, selectUserDepartment, diseaseList } from "@/api/system/question";
|
||||
import draggable from 'vuedraggable'
|
||||
export default {
|
||||
name: "addQuestionnaire",
|
||||
@ -528,6 +544,10 @@ export default {
|
||||
questionnaireTotalScore: 0, //总分
|
||||
questionSubjectList: [],
|
||||
questionType: undefined,
|
||||
diseaseTypeId: undefined,
|
||||
diseaseTypeName: undefined,
|
||||
departmentId: undefined,
|
||||
departmentName: undefined,
|
||||
},
|
||||
//题目arr
|
||||
questionlist: [],
|
||||
@ -552,6 +572,10 @@ export default {
|
||||
disabled: true,
|
||||
index: -1,
|
||||
},
|
||||
//科室
|
||||
departmentlist: [],
|
||||
//病种
|
||||
diseaselist: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -560,6 +584,15 @@ export default {
|
||||
if (this.$route.query.id) {
|
||||
this.info();
|
||||
}
|
||||
let queryparam = {
|
||||
hospitalAgencyId: this.$route.query.hospitalAgencyId
|
||||
}
|
||||
selectUserDepartment(queryparam).then(res => {
|
||||
this.departmentlist = res.data
|
||||
})
|
||||
if (this.$route.query.departmentId) {
|
||||
this.changedepartment(this.$route.query.departmentId)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
questionnaireTotalScore: function () {
|
||||
@ -610,6 +643,26 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
changediseaseType(e) {
|
||||
this.list.diseaseTypeName = this.diseaselist?.find(el => el.id == e)?.diseaseTypeName
|
||||
},
|
||||
cleardepartment() {
|
||||
this.list.diseaseTypeId = ''
|
||||
this.list.diseaseTypeName = ''
|
||||
this.list.departmentId = ''
|
||||
this.list.departmentName = ''
|
||||
},
|
||||
changedepartment(e) {
|
||||
this.list.departmentName = this.departmentlist?.find(el => el.id == e)?.departmentName
|
||||
let query = {
|
||||
departmentId: e
|
||||
}
|
||||
diseaseList(query).then(res => {
|
||||
this.diseaselist = res.data
|
||||
this.list.diseaseTypeId = ''
|
||||
this.list.diseaseTypeName = ''
|
||||
})
|
||||
},
|
||||
addquestion(item) {
|
||||
this.id++
|
||||
if (this.questionlist.length > 0) {
|
||||
@ -1022,10 +1075,28 @@ export default {
|
||||
},
|
||||
//保存
|
||||
upload() {
|
||||
this.$confirm('保存此问卷, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
}).then(() => {
|
||||
if (!this.list.questionType) {
|
||||
this.$message.error('请选择问卷类型!');
|
||||
return
|
||||
}
|
||||
if (!this.list.departmentId) {
|
||||
this.$message.error('请选择科室!');
|
||||
return
|
||||
}
|
||||
if (!this.list.diseaseTypeId) {
|
||||
this.$message.error('请选择病种!');
|
||||
return
|
||||
}
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '保存中,请稍等',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(255, 255, 255, 0.7)'
|
||||
});
|
||||
this.list.questionSubjectList = []
|
||||
this.questionlist.forEach((e, eindex) => {
|
||||
e.questionNumber = eindex + 1
|
||||
@ -1062,6 +1133,7 @@ export default {
|
||||
this.list.questionCount = this.questionlist.length
|
||||
if (this.$route.query.id) {
|
||||
updateQuestion(this.list).then(res => {
|
||||
loading.close();
|
||||
this.$confirm('编辑保存成功, 是否返回上一页?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -1075,9 +1147,12 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$modal.msgSuccess("编辑保存成功");
|
||||
});
|
||||
}).catch(() => {
|
||||
loading.close();
|
||||
})
|
||||
} else {
|
||||
addQuestion(this.list).then(res => {
|
||||
loading.close();
|
||||
this.$confirm('新增保存成功, 是否返回上一页?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -1091,12 +1166,21 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$modal.msgSuccess("新增保存成功");
|
||||
});
|
||||
}).catch(() => {
|
||||
loading.close();
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
//保存并发布
|
||||
releaseupload() { },
|
||||
info() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '加载中,请稍等',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(255, 255, 255, 0.7)'
|
||||
});
|
||||
getQuestion(this.$route.query.id).then(res => {
|
||||
this.list = res.data
|
||||
res.data.questionSubjectList.forEach(e => {
|
||||
@ -1145,6 +1229,9 @@ export default {
|
||||
}
|
||||
}
|
||||
this.questionlist = [...this.questionlist, ...echararr]
|
||||
loading.close();
|
||||
}).catch(() => {
|
||||
loading.close();
|
||||
})
|
||||
},
|
||||
goback() {
|
||||
@ -1159,10 +1246,24 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
background: #C0C0C0;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
padding: 14px 0 0;
|
||||
padding: 10px 0 0;
|
||||
background-color: #F2F3F5 !important;
|
||||
width: 100%;
|
||||
height: calc(100vh - 84px);
|
||||
|
||||
.header {
|
||||
background-color: #fff;
|
||||
@ -1173,8 +1274,8 @@ export default {
|
||||
.bottomheader {
|
||||
width: 98%;
|
||||
background-color: #F2F3F5 !important;
|
||||
margin: 14px auto;
|
||||
padding: 30px 0;
|
||||
margin: 10px auto;
|
||||
padding: 20px 0;
|
||||
display: flex;
|
||||
|
||||
.questionlist {
|
||||
@ -1279,7 +1380,7 @@ export default {
|
||||
.totalScore {
|
||||
width: 20%;
|
||||
margin-left: 20px;
|
||||
height: 790px;
|
||||
height: calc(100vh - 214px);
|
||||
background: #FFFFFF;
|
||||
overflow: scroll;
|
||||
overflow-x: hidden !important;
|
||||
@ -1340,7 +1441,7 @@ export default {
|
||||
width: calc(60% - 30px);
|
||||
overflow: scroll;
|
||||
overflow-x: hidden !important;
|
||||
height: 790px;
|
||||
height: calc(100vh - 214px);
|
||||
|
||||
.editor {
|
||||
background-color: #fff;
|
||||
@ -1372,6 +1473,12 @@ export default {
|
||||
border: none;
|
||||
box-shadow: 0px 2px 4px 0px rgba(162, 162, 162, 0.5);
|
||||
border-radius: 4px;
|
||||
|
||||
::v-deep .el-input__inner {
|
||||
border: none !important;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.questionnaire-title {
|
||||
@ -1384,8 +1491,9 @@ export default {
|
||||
.questiontypes {
|
||||
width: calc(20% - 30px);
|
||||
margin: 0 0 0 30px;
|
||||
height: 790px;
|
||||
height: calc(100vh - 214px);
|
||||
background: #FFFFFF;
|
||||
overflow-y: auto;
|
||||
|
||||
.texts:hover {
|
||||
box-shadow: 2px 3px 3px 2px rgba(162, 162, 162, 0.5);
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="6" :xs="24">
|
||||
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment"
|
||||
<DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
|
||||
:methods="'listMessageNumtwo'">
|
||||
</DepartmentList>
|
||||
</el-col>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="6" :xs="24">
|
||||
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment"
|
||||
<DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
|
||||
:methods="'listWechatTemplateNumthree'">
|
||||
</DepartmentList>
|
||||
</el-col>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="6" :xs="24">
|
||||
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment"
|
||||
<DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
|
||||
:methods="'listWechatTemplateNumtwo'">
|
||||
</DepartmentList>
|
||||
</el-col>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="6" :xs="24">
|
||||
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment"
|
||||
<DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
|
||||
:methods="'selectNumByDepttwo'">
|
||||
</DepartmentList>
|
||||
</el-col>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="6" :xs="24">
|
||||
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment"
|
||||
<DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
|
||||
:methods="'getDepartmentListtwo'">
|
||||
</DepartmentList>
|
||||
</el-col>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="6" :xs="24">
|
||||
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment"
|
||||
<DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
|
||||
:methods="'listScriptNumtwo'">
|
||||
</DepartmentList>
|
||||
</el-col>
|
||||
|
||||
@ -278,7 +278,7 @@ export default {
|
||||
resetQuery() {
|
||||
this.$refs.DepartmentList.resetQuery()
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
// this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@ -287,6 +287,7 @@ export default {
|
||||
path: "/knowledge/addQuestionnaire",
|
||||
query: {
|
||||
path: "/knowledge/question",
|
||||
hospitalAgencyId: this.queryParams.hospitalAgencyId,
|
||||
},
|
||||
});
|
||||
// })
|
||||
@ -299,6 +300,8 @@ export default {
|
||||
query: {
|
||||
path: "/knowledge/question",
|
||||
id: row.id,
|
||||
hospitalAgencyId: this.queryParams.hospitalAgencyId,
|
||||
departmentId: row.departmentId,
|
||||
},
|
||||
});
|
||||
// })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user