|
@@ -16,6 +16,7 @@
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button size="mini" @click="formCancel">取 消</el-button>
|
|
|
<el-button v-if="!formData.id" size="mini" type="primary" @click="formConfirm">确 定</el-button>
|
|
|
+ <el-button v-if="formData.id && !!~[2,3].indexOf(formData.status)" size="mini" type="primary" @click="zhongzhi">终 止</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -27,7 +28,7 @@
|
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
-import {promotionQuestionnaireList,promotionQuestionnaireExport,promotionQuestionnaireAdd,promotionQuestionnaireDetail} from "@/api/setActivity.js"
|
|
|
+import {promotionQuestionnaireList,promotionQuestionnaireExport,promotionQuestionnaireAdd,promotionQuestionnaireStop,promotionQuestionnaireDetail} from "@/api/setActivity.js"
|
|
|
import answer from "./answer.vue"
|
|
|
import ImageUpload from '@/components/file-upload'
|
|
|
import quillEditor from '@/components/v-quill-editor'
|
|
@@ -521,7 +522,7 @@ export default {
|
|
|
promotionQuestionnaireAdd(data).then(res=>{
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
- message: `添加成功成功!`,
|
|
|
+ message: `添加成功!`,
|
|
|
})
|
|
|
this.$refs.pageRef.refreshList()
|
|
|
this.formCancel()
|
|
@@ -529,6 +530,19 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 终止
|
|
|
+ zhongzhi(){
|
|
|
+ promotionQuestionnaireStop({
|
|
|
+ id:this.formData.id
|
|
|
+ }).then(res=>{
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: `终止成功!`,
|
|
|
+ })
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ this.formCancel()
|
|
|
+ })
|
|
|
+ },
|
|
|
// 关闭题目编辑
|
|
|
questionClose(){
|
|
|
this.showQuestion = false
|