This commit is contained in:
2024-07-10 17:47:18 +08:00
parent b721229862
commit 136400f95b
10 changed files with 195 additions and 83 deletions

View File

@ -73,7 +73,7 @@ export default {
name: "DepartmentList", name: "DepartmentList",
data() { data() {
return { return {
vmodal: false, vmodal: true,
roleKey: localStorage.getItem('roleKey'), roleKey: localStorage.getItem('roleKey'),
open: false, open: false,
switchvalue: true, switchvalue: true,
@ -106,6 +106,7 @@ export default {
}, },
created() { created() {
this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
this.vmodal = this.modal
this.Departmentlist(); this.Departmentlist();
}, },
methods: { methods: {

View File

@ -6,7 +6,7 @@
<el-dialog title="专病管理路径选择" :visible.sync="classificationOpen" width="70%" :before-close="classificationOpenfalse"> <el-dialog title="专病管理路径选择" :visible.sync="classificationOpen" width="70%" :before-close="classificationOpenfalse">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment" <DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
:servicePackageId="servicePackageId" :methods="'selectDiseaseCounttwo'"> :servicePackageId="servicePackageId" :methods="'selectDiseaseCounttwo'">
</DepartmentList> </DepartmentList>
</el-col> </el-col>

View File

@ -44,14 +44,30 @@
<div class="questionnairedetails"> <div class="questionnairedetails">
<div> <div>
<div class="questionnaire-title"> <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> </div>
<input type="text" class="title-input" v-model="list.questionnaireName"> <input type="text" class="title-input" v-model="list.questionnaireName">
<div class="questionnaire-title" style="margin-top:30px"> <div class="questionnaire-title" style="margin-top:30px">
问卷说明: 问卷说明:
</div> </div>
<el-input type="textarea" class="editor" :rows="6" placeholder="请输入内容" <el-input type="textarea" class="editor" :rows="6" :autosize="{ minRows: 6, maxRows: 10 }"
:autosize="{ minRows: 6, maxRows: 10 }" v-model="list.questionnaireDescription"> v-model="list.questionnaireDescription">
</el-input> </el-input>
</div> </div>
<div class="addArea" v-if="questionlist.length == 0"> <div class="addArea" v-if="questionlist.length == 0">
@ -454,7 +470,7 @@
</template> </template>
<script> <script>
import { getQuestion, addQuestion, updateQuestion } from "@/api/system/question"; import { getQuestion, addQuestion, updateQuestion, selectUserDepartment, diseaseList } from "@/api/system/question";
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
export default { export default {
name: "addQuestionnaire", name: "addQuestionnaire",
@ -528,6 +544,10 @@ export default {
questionnaireTotalScore: 0, // questionnaireTotalScore: 0, //
questionSubjectList: [], questionSubjectList: [],
questionType: undefined, questionType: undefined,
diseaseTypeId: undefined,
diseaseTypeName: undefined,
departmentId: undefined,
departmentName: undefined,
}, },
//arr //arr
questionlist: [], questionlist: [],
@ -552,6 +572,10 @@ export default {
disabled: true, disabled: true,
index: -1, index: -1,
}, },
//
departmentlist: [],
//
diseaselist: [],
}; };
}, },
watch: { watch: {
@ -560,6 +584,15 @@ export default {
if (this.$route.query.id) { if (this.$route.query.id) {
this.info(); 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: { computed: {
questionnaireTotalScore: function () { questionnaireTotalScore: function () {
@ -610,6 +643,26 @@ export default {
}, },
}, },
methods: { 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) { addquestion(item) {
this.id++ this.id++
if (this.questionlist.length > 0) { if (this.questionlist.length > 0) {
@ -1022,10 +1075,28 @@ export default {
}, },
// //
upload() { upload() {
this.$confirm('保存此问卷, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(() => {
if (!this.list.questionType) { if (!this.list.questionType) {
this.$message.error('请选择问卷类型!'); this.$message.error('请选择问卷类型!');
return 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.list.questionSubjectList = []
this.questionlist.forEach((e, eindex) => { this.questionlist.forEach((e, eindex) => {
e.questionNumber = eindex + 1 e.questionNumber = eindex + 1
@ -1062,6 +1133,7 @@ export default {
this.list.questionCount = this.questionlist.length this.list.questionCount = this.questionlist.length
if (this.$route.query.id) { if (this.$route.query.id) {
updateQuestion(this.list).then(res => { updateQuestion(this.list).then(res => {
loading.close();
this.$confirm('编辑保存成功, 是否返回上一页?', '提示', { this.$confirm('编辑保存成功, 是否返回上一页?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -1075,9 +1147,12 @@ export default {
}).catch(() => { }).catch(() => {
this.$modal.msgSuccess("编辑保存成功"); this.$modal.msgSuccess("编辑保存成功");
}); });
}).catch(() => {
loading.close();
}) })
} else { } else {
addQuestion(this.list).then(res => { addQuestion(this.list).then(res => {
loading.close();
this.$confirm('新增保存成功, 是否返回上一页?', '提示', { this.$confirm('新增保存成功, 是否返回上一页?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -1091,12 +1166,21 @@ export default {
}).catch(() => { }).catch(() => {
this.$modal.msgSuccess("新增保存成功"); this.$modal.msgSuccess("新增保存成功");
}); });
}).catch(() => {
loading.close();
}) })
} }
})
}, },
// //
releaseupload() { }, releaseupload() { },
info() { 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 => { getQuestion(this.$route.query.id).then(res => {
this.list = res.data this.list = res.data
res.data.questionSubjectList.forEach(e => { res.data.questionSubjectList.forEach(e => {
@ -1145,6 +1229,9 @@ export default {
} }
} }
this.questionlist = [...this.questionlist, ...echararr] this.questionlist = [...this.questionlist, ...echararr]
loading.close();
}).catch(() => {
loading.close();
}) })
}, },
goback() { goback() {
@ -1159,10 +1246,24 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::-webkit-scrollbar {
width: 5px;
}
::-webkit-scrollbar-thumb {
border-radius: 5px;
background: #C0C0C0;
}
::-webkit-scrollbar-track {
width: 5px;
}
.app-container { .app-container {
padding: 14px 0 0; padding: 10px 0 0;
background-color: #F2F3F5 !important; background-color: #F2F3F5 !important;
width: 100%; width: 100%;
height: calc(100vh - 84px);
.header { .header {
background-color: #fff; background-color: #fff;
@ -1173,8 +1274,8 @@ export default {
.bottomheader { .bottomheader {
width: 98%; width: 98%;
background-color: #F2F3F5 !important; background-color: #F2F3F5 !important;
margin: 14px auto; margin: 10px auto;
padding: 30px 0; padding: 20px 0;
display: flex; display: flex;
.questionlist { .questionlist {
@ -1279,7 +1380,7 @@ export default {
.totalScore { .totalScore {
width: 20%; width: 20%;
margin-left: 20px; margin-left: 20px;
height: 790px; height: calc(100vh - 214px);
background: #FFFFFF; background: #FFFFFF;
overflow: scroll; overflow: scroll;
overflow-x: hidden !important; overflow-x: hidden !important;
@ -1340,7 +1441,7 @@ export default {
width: calc(60% - 30px); width: calc(60% - 30px);
overflow: scroll; overflow: scroll;
overflow-x: hidden !important; overflow-x: hidden !important;
height: 790px; height: calc(100vh - 214px);
.editor { .editor {
background-color: #fff; background-color: #fff;
@ -1372,6 +1473,12 @@ export default {
border: none; border: none;
box-shadow: 0px 2px 4px 0px rgba(162, 162, 162, 0.5); box-shadow: 0px 2px 4px 0px rgba(162, 162, 162, 0.5);
border-radius: 4px; border-radius: 4px;
::v-deep .el-input__inner {
border: none !important;
height: 40px;
line-height: 40px;
}
} }
.questionnaire-title { .questionnaire-title {
@ -1384,8 +1491,9 @@ export default {
.questiontypes { .questiontypes {
width: calc(20% - 30px); width: calc(20% - 30px);
margin: 0 0 0 30px; margin: 0 0 0 30px;
height: 790px; height: calc(100vh - 214px);
background: #FFFFFF; background: #FFFFFF;
overflow-y: auto;
.texts:hover { .texts:hover {
box-shadow: 2px 3px 3px 2px rgba(162, 162, 162, 0.5); box-shadow: 2px 3px 3px 2px rgba(162, 162, 162, 0.5);

View File

@ -13,7 +13,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment" <DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
:methods="'listMessageNumtwo'"> :methods="'listMessageNumtwo'">
</DepartmentList> </DepartmentList>
</el-col> </el-col>

View File

@ -13,7 +13,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment" <DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
:methods="'listWechatTemplateNumthree'"> :methods="'listWechatTemplateNumthree'">
</DepartmentList> </DepartmentList>
</el-col> </el-col>

View File

@ -9,7 +9,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment" <DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
:methods="'listWechatTemplateNumtwo'"> :methods="'listWechatTemplateNumtwo'">
</DepartmentList> </DepartmentList>
</el-col> </el-col>

View File

@ -13,7 +13,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment" <DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
:methods="'selectNumByDepttwo'"> :methods="'selectNumByDepttwo'">
</DepartmentList> </DepartmentList>
</el-col> </el-col>

View File

@ -14,7 +14,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment" <DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
:methods="'getDepartmentListtwo'"> :methods="'getDepartmentListtwo'">
</DepartmentList> </DepartmentList>
</el-col> </el-col>

View File

@ -13,7 +13,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<DepartmentList ref="DepartmentList" :modal="true" @clickdepartment="clickdepartment" <DepartmentList ref="DepartmentList" :modal="false" @clickdepartment="clickdepartment"
:methods="'listScriptNumtwo'"> :methods="'listScriptNumtwo'">
</DepartmentList> </DepartmentList>
</el-col> </el-col>

View File

@ -278,7 +278,7 @@ export default {
resetQuery() { resetQuery() {
this.$refs.DepartmentList.resetQuery() this.$refs.DepartmentList.resetQuery()
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); // this.handleQuery();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
@ -287,6 +287,7 @@ export default {
path: "/knowledge/addQuestionnaire", path: "/knowledge/addQuestionnaire",
query: { query: {
path: "/knowledge/question", path: "/knowledge/question",
hospitalAgencyId: this.queryParams.hospitalAgencyId,
}, },
}); });
// }) // })
@ -299,6 +300,8 @@ export default {
query: { query: {
path: "/knowledge/question", path: "/knowledge/question",
id: row.id, id: row.id,
hospitalAgencyId: this.queryParams.hospitalAgencyId,
departmentId: row.departmentId,
}, },
}); });
// }) // })