diff --git a/src/views/system/question/index.vue b/src/views/system/question/index.vue
index 0c0ec5a..8bd98e0 100644
--- a/src/views/system/question/index.vue
+++ b/src/views/system/question/index.vue
@@ -43,16 +43,20 @@
-
-
-
+ 已发布
+ 未发布
-
+
+ 发布
+ 取消发布
分类管理
{
this.diseaselist = res.data
+ this.classificationform.diseaseTypeId = ''
+ this.classificationform.diseaseTypeName = ''
})
},
changediseaseType(e) {
@@ -207,22 +213,32 @@ export default {
//切换发布状态
switchstatus(e, item) {
if (!item.departmentId && !this.diseaseTypeId) {
- this.$message.error('请选择问卷所属的科室以及科室病种后发布!');
- this.getList();
+ this.$message.error('请选择问卷所属的科室以及科室病种后发布 / 取消发布!');
return
}
- let query = {
- id: item.id,
- questionnaireStatus: e
+ let text
+ if (e == 'PUBLISHED') {
+ text = '是否发布此问卷模板?'
+ } else {
+ text = '是否取消发布此问卷模板?'
}
- updateclassification(query).then(res => {
- if (e == 'PUBLISHED') {
- this.$modal.msgSuccess("修改为已发布");
- } else if (e == 'UNPUBLISHED') {
- this.$modal.msgSuccess("修改为未发布");
+ this.$confirm(`${text}`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ }).then(() => {
+ let query = {
+ id: item.id,
+ questionnaireStatus: e
}
+ updateclassification(query).then(res => {
+ if (e == 'PUBLISHED') {
+ this.$modal.msgSuccess("修改为已发布");
+ } else if (e == 'UNPUBLISHED') {
+ this.$modal.msgSuccess("修改为未发布");
+ }
+ this.getList();
+ })
})
- this.getList();
},
// 节点单击事件
handleNodeClick(data) {