From 3eee8509b803126ea729a642cc905213573bf5bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com>
Date: Thu, 11 Apr 2024 17:11:25 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/question/index.vue | 50 +++++++++++++++++++----------
1 file changed, 33 insertions(+), 17 deletions(-)
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) {