问卷整改

This commit is contained in:
2026-08-28 17:00:42 +08:00
parent c8f80c8d5a
commit 37f874f31d
5 changed files with 74 additions and 6 deletions
@@ -308,7 +308,7 @@ const act = {
height: 100% !important;
max-width: 100% !important;
max-height: 128px !important;
object-fit: cover !important;
object-fit: fill !important;
transition: transform 0.3s ease;
}
@@ -545,6 +545,7 @@ layout("/layouts/platform.html"){
:class="['qsv-online-vote-option', isOptionSelected(currentVoteSubject, option.id) ? 'active' : '']"
@click="toggleVoteOption(option)">
<el-checkbox
v-if="isOptionSelected(currentVoteSubject, option.id)"
class="qsv-online-vote-option-check"
:value="isOptionSelected(currentVoteSubject, option.id)"
:disabled="answerDialog.readonly || isVoteEnd"
@@ -827,6 +828,34 @@ layout("/layouts/platform.html"){
}
return ""
},
// 首页链接通过 id 指定活动;先查询当前用户对应的真实答题状态,再复用现有答题入口。
openAnswerFromUrl() {
const activityId = new URLSearchParams(window.location.search).get("id")
if (!activityId) {
return
}
this.answerDialog.loading = true
this.$axios.post("/platform/qsv/online/pageData", {
pageNumber: 1,
pageSize: 1,
activityId: activityId
}).then((res) => {
if (res.code !== 0) {
this.$message.error(res.msg)
return
}
const rows = res.data && res.data.list ? res.data.list : []
if (rows.length === 0) {
this.$message.warning("未找到可参与的答题活动")
return
}
this.openAnswer(rows[0])
}).finally(() => {
if (!this.answerDialog.visible) {
this.answerDialog.loading = false
}
})
},
openAnswer(row) {
const unavailableMessage = this.getActivityUnavailableMessage(row)
if (unavailableMessage) {
@@ -1205,6 +1234,7 @@ layout("/layouts/platform.html"){
},
created() {
this.pageData()
this.openAnswerFromUrl()
},
beforeDestroy() {
this.stopVoteCountdown()