会员、体育活动
This commit is contained in:
+23
-4
@@ -40,7 +40,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程节点" prop="processInstanceNodeName"></el-table-column>
|
||||
<el-table-column label="操作" width="200px" fixed="right">
|
||||
<el-table-column label="操作" width="300px" fixed="right">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary"
|
||||
@click="onOpen(row.id)">
|
||||
@@ -50,6 +50,10 @@ layout("/layouts/platform.html"){
|
||||
type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button v-if="$auth.hasPermission('sys.branch.union.authorization.approval.delete')" size="mini"
|
||||
type="danger" @click="deleteDo(row)">
|
||||
删除
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"-->
|
||||
<!-- @click="openRevoke(row.processInstanceTaskId)"-->
|
||||
@@ -104,10 +108,25 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async deleteDo(row) {
|
||||
const confirm = await this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await this.$axios.post("/platform/branchUnionUser/authorization/approval/deleteDo", {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId
|
||||
})
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
onOpen(id) {
|
||||
this.dialogVisible = true
|
||||
this.showApprovalForm = false
|
||||
this.$nextTick(()=>{
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(id)
|
||||
})
|
||||
},
|
||||
@@ -116,7 +135,7 @@ layout("/layouts/platform.html"){
|
||||
this.showApprovalForm = true
|
||||
this.formData = row.approvalParam
|
||||
this.formData.approvalOpinion = '同意'
|
||||
this.$nextTick(()=>{
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
@@ -144,7 +163,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/branchUnionUser/authorization/approval/revoke", { taskId }).then((res) => {
|
||||
this.$axios.post("/platform/branchUnionUser/authorization/approval/revoke", {taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
|
||||
@@ -125,6 +125,7 @@ layout("/layouts/platform_h5.html"){
|
||||
return {
|
||||
list: [],
|
||||
id: GetQueryString("id"),
|
||||
H5JumpTo: GetQueryString("H5JumpTo"),
|
||||
subjects: [],
|
||||
activity: {},
|
||||
// remainingTime: 0,
|
||||
@@ -161,8 +162,23 @@ layout("/layouts/platform_h5.html"){
|
||||
this.activity = res.data.activity
|
||||
this.subjects = res.data.subjects
|
||||
this.answerRecordId = res.data.answerRecordId
|
||||
this.checkGroupPermission()
|
||||
this.getAnswerRecord()
|
||||
debugger
|
||||
if (!this.H5JumpTo && this.activity.repeatable && res.data.repeatTips){
|
||||
// 如果是可重复答题,第二次答题进来弹出提示
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您已完成本次答题,是否要重新答题?',
|
||||
confirmButtonText: '重新答题',
|
||||
cancelButtonText: '查看答题记录',
|
||||
}).then(() => {
|
||||
this.getAnswerRecord()
|
||||
}).catch(() => {
|
||||
pjaxReplace("/platform/h5/qsv/quiz/result?answerRecordId=" + this.answerRecordId)
|
||||
});
|
||||
} else {
|
||||
this.getAnswerRecord()
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -208,6 +208,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
|
||||
<div class="button-control">
|
||||
<van-button v-if="canAgainQuestion" type="primary" @click="againQuestion" block>重新答题</van-button>
|
||||
<van-button type="primary" @click="openHistory" block>查看全部答题记录</van-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -239,7 +240,9 @@ layout("/layouts/platform_h5.html"){
|
||||
activity: {},
|
||||
list: [],
|
||||
historyShow: false,
|
||||
historyList: []
|
||||
historyList: [],
|
||||
|
||||
canAgainQuestion: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -268,12 +271,26 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 重新答题
|
||||
*/
|
||||
againQuestion() {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确定要重新答题吗?',
|
||||
}).then(() => {
|
||||
pjaxReplace('/platform/h5/qsv/quiz?id=' + this.activity.id + "&H5JumpTo=true")
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
getAnswerResult() {
|
||||
this.$axios.post("/platform/h5/qsv/quiz/answerResult", { answerRecordId: this.answerRecordId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.subjects = res.data.subjects
|
||||
this.activity = res.data.activity
|
||||
this.getAnswerRecord()
|
||||
this.getHistoryQuestion()
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -317,6 +334,16 @@ layout("/layouts/platform_h5.html"){
|
||||
this.historyList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getHistoryQuestion() {
|
||||
$.post("/platform/h5/qsv/quiz/historyScore", { activityId: this.activity.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.historyList = res.data
|
||||
if (this.activity.maxAttempts > res.data.length) {
|
||||
this.canAgainQuestion = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
Reference in New Issue
Block a user