diff --git a/src/views/ballot/BallotPage.vue b/src/views/ballot/BallotPage.vue index 8edf879..8c4c55c 100644 --- a/src/views/ballot/BallotPage.vue +++ b/src/views/ballot/BallotPage.vue @@ -209,23 +209,24 @@ const answerTime = dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"); // 增加浏览量 watch(dataInfo, () => { - useRequest(EditVoteInvolvedAndBrowse, {operationType:'2', voteId:dataInfo.value.id }); - const noCommit = () => { - let noCommitParams = { - beginTime: answerTime, - chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, - result: JSON.stringify(dataInfo.value), - targetId: infoId, // 项目 路径图 id - taskId: id, - type: btype, // 1 项目 2 路径图 - voteId: dataInfo.value.id, - voteName: dataInfo.value.voteName, - studentId: userInfo.value.userId, - studentName: userInfo.value.realName, - } - useRequest(NO_COMMIT, noCommitParams); - } - noCommit() + useRequest(EditVoteInvolvedAndBrowse, {operationType:'2', voteId:dataInfo.value.id },(res)=>{ + const noCommit = () => { + let noCommitParams = { + beginTime: answerTime, + chapterOrStageId: chapterOrStageId ? chapterOrStageId : 0, + result: JSON.stringify(dataInfo.value), + targetId: infoId, // 项目 路径图 id + taskId: id, + type: btype, // 1 项目 2 路径图 + voteId: dataInfo.value.id, + voteName: dataInfo.value.voteName, + studentId: userInfo.value.userId, + studentName: userInfo.value.realName, + } + useRequest(NO_COMMIT, noCommitParams); + } + noCommit() + }); }) // 选择题目 diff --git a/src/views/survey/SurveyDetail.vue b/src/views/survey/SurveyDetail.vue index 0c38b2b..16e6a01 100644 --- a/src/views/survey/SurveyDetail.vue +++ b/src/views/survey/SurveyDetail.vue @@ -30,14 +30,14 @@ -