diff --git a/src/api/system/question.js b/src/api/system/question.js index 0a89ce7..4725e58 100644 --- a/src/api/system/question.js +++ b/src/api/system/question.js @@ -47,8 +47,35 @@ export function delQuestion(id) { //科室接口 export function getDepartmentList(query) { return request({ - url: 'system/department/getDepartmentList', + url: '/system/department/getDepartmentList', method: 'get', params: query }) } + +//科室 +export function selectUserDepartment() { + return request({ + url: '/system/department/selectUserDepartment', + method: 'get', + }) +} + +//病种 +export function diseaseList(query) { + return request({ + url: '/system/departmentDisease/diseaseList', + method: 'get', + params: query + }) +} + + +//分类管理确定 +export function updateclassification(data) { + return request({ + url: '/system/question/updateQuestion', + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/views/system/addQuestionnaire/index.vue b/src/views/system/addQuestionnaire/index.vue index 8c5fe06..1427579 100644 --- a/src/views/system/addQuestionnaire/index.vue +++ b/src/views/system/addQuestionnaire/index.vue @@ -2,10 +2,10 @@
- 返回 - 预览问卷 + 返回 + 保存 - 保存并发布 +
@@ -1028,12 +1028,33 @@ export default { this.list.questionCount = this.questionlist.length if (this.$route.query.id) { updateQuestion(this.list).then(res => { - + this.$confirm('编辑保存成功, 是否返回上一页?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'success' + }).then(() => { + this.$router.go(-1); + }).catch(() => { + this.$modal.msgSuccess("编辑保存成功"); + }); }) } else { addQuestion(this.list).then(res => { + this.$confirm('新增保存成功, 是否返回上一页?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'success' + }).then(() => { + this.$router.go(-1); + }).catch(() => { + this.$modal.msgSuccess("新增保存成功"); + }); }) } + }, + //保存并发布 + releaseupload() { + }, info() { getQuestion(this.$route.query.id).then(res => { @@ -1067,7 +1088,7 @@ export default { e.title = '打分题' } }) - var data = res.data.questionSubjectList + var data = res.data.questionSubjectList.filter(e => e.questionType == 'COMBINATION_RADIO_SUBJECT' || e.questionType == 'COMBINATION_MULTIPLE_SUBJECT' || e.questionType == 'COMBINATION_BLANKS_SUBJECT' || e.questionType == 'COMBINATION_BLANKS_SUBJECT') var echararr = []; for (var i = 0; i < data.length; i++) { var arrindex = echararr.findIndex((item, index, arr) => { return item.questionDescription === data[i].questionDescription })//获取下标 @@ -1086,6 +1107,9 @@ export default { this.questionlist = [...this.questionlist, ...echararr] }) }, + goback() { + this.$router.go(-1); + }, } }; @@ -1185,6 +1209,7 @@ export default { .title { width: 80%; margin: 20px auto 30px; + text-align: left; span { display: inline-block; diff --git a/src/views/system/question/index.vue b/src/views/system/question/index.vue index 27b8142..c8f9751 100644 --- a/src/views/system/question/index.vue +++ b/src/views/system/question/index.vue @@ -40,17 +40,21 @@ @@ -59,16 +63,38 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> + + + + + + + + + + + + + + +