修改
This commit is contained in:
parent
ea31a1fb4d
commit
3eee8509b8
@ -43,16 +43,20 @@
|
|||||||
<el-table-column label="问卷模板ID" align="center" prop="questionnaireId" />
|
<el-table-column label="问卷模板ID" align="center" prop="questionnaireId" />
|
||||||
<el-table-column label="问卷状态" align="center" prop="questionnaireStatus">
|
<el-table-column label="问卷状态" align="center" prop="questionnaireStatus">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- active-text="已发布" inactive-text="未发布" -->
|
<el-tag type="success" v-if="scope.row.questionnaireStatus == 'PUBLISHED'">已发布</el-tag>
|
||||||
<el-switch v-model="scope.row.questionnaireStatus" active-color="#13ce66" inactive-color="#ff4949"
|
<el-tag type="warning" v-else>未发布</el-tag>
|
||||||
active-value="PUBLISHED" inactive-value="UNPUBLISHED" @change="switchstatus($event, scope.row)">
|
|
||||||
</el-switch>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" />
|
<el-table-column label="病种名称" align="center" prop="diseaseTypeName" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<!-- <el-switch v-model="scope.row.questionnaireStatus" active-color="#13ce66" inactive-color="#ff4949"
|
||||||
|
active-value="PUBLISHED" inactive-value="UNPUBLISHED" @change="switchstatus($event, scope.row)">
|
||||||
|
</el-switch> -->
|
||||||
|
<el-button size="mini" type="text" @click="switchstatus('PUBLISHED', scope.row)"
|
||||||
|
v-if="scope.row.questionnaireStatus == 'UNPUBLISHED'">发布</el-button>
|
||||||
|
<el-button size="mini" type="text" @click="switchstatus('UNPUBLISHED', scope.row)"
|
||||||
|
v-if="scope.row.questionnaireStatus == 'PUBLISHED'">取消发布</el-button>
|
||||||
<el-button size="mini" type="text" @click="handleClassification(scope.row)"
|
<el-button size="mini" type="text" @click="handleClassification(scope.row)"
|
||||||
v-hasPermi="['system:question:edit']">分类管理</el-button>
|
v-hasPermi="['system:question:edit']">分类管理</el-button>
|
||||||
<el-button size="mini" type="text" @click="handleUpdate(scope.row)"
|
<el-button size="mini" type="text" @click="handleUpdate(scope.row)"
|
||||||
@ -172,7 +176,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//分类管理
|
//分类管理
|
||||||
handleClassification(row) {
|
handleClassification(row) {
|
||||||
this.classificationform = row
|
this.classificationform = JSON.parse(JSON.stringify(row))
|
||||||
if (this.classificationform.departmentId) {
|
if (this.classificationform.departmentId) {
|
||||||
let query = {
|
let query = {
|
||||||
departmentId: this.classificationform.departmentId
|
departmentId: this.classificationform.departmentId
|
||||||
@ -199,6 +203,8 @@ export default {
|
|||||||
}
|
}
|
||||||
diseaseList(query).then(res => {
|
diseaseList(query).then(res => {
|
||||||
this.diseaselist = res.data
|
this.diseaselist = res.data
|
||||||
|
this.classificationform.diseaseTypeId = ''
|
||||||
|
this.classificationform.diseaseTypeName = ''
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changediseaseType(e) {
|
changediseaseType(e) {
|
||||||
@ -207,10 +213,19 @@ export default {
|
|||||||
//切换发布状态
|
//切换发布状态
|
||||||
switchstatus(e, item) {
|
switchstatus(e, item) {
|
||||||
if (!item.departmentId && !this.diseaseTypeId) {
|
if (!item.departmentId && !this.diseaseTypeId) {
|
||||||
this.$message.error('请选择问卷所属的科室以及科室病种后发布!');
|
this.$message.error('请选择问卷所属的科室以及科室病种后发布 / 取消发布!');
|
||||||
this.getList();
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
let text
|
||||||
|
if (e == 'PUBLISHED') {
|
||||||
|
text = '是否发布此问卷模板?'
|
||||||
|
} else {
|
||||||
|
text = '是否取消发布此问卷模板?'
|
||||||
|
}
|
||||||
|
this.$confirm(`${text}`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
}).then(() => {
|
||||||
let query = {
|
let query = {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
questionnaireStatus: e
|
questionnaireStatus: e
|
||||||
@ -221,8 +236,9 @@ export default {
|
|||||||
} else if (e == 'UNPUBLISHED') {
|
} else if (e == 'UNPUBLISHED') {
|
||||||
this.$modal.msgSuccess("修改为未发布");
|
this.$modal.msgSuccess("修改为未发布");
|
||||||
}
|
}
|
||||||
})
|
|
||||||
this.getList();
|
this.getList();
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 节点单击事件
|
// 节点单击事件
|
||||||
handleNodeClick(data) {
|
handleNodeClick(data) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user