问卷未到开始填写时间,暂时无法进行填写
@@ -32,7 +35,7 @@ export default { }) return } else if (now > new Date(endTime).getTime()) { - commit('setRouter', 'errorPage') + router.push({ name: 'errorPage' }) commit('setErrorInfo', { errorType: 'overTime', errorMsg: msgContent.msg_9001 || '您来晚了,感谢支持问卷~' @@ -44,7 +47,7 @@ export default { const momentStartTime = moment(`${todayStr} ${answerBegTime}`) const momentEndTime = moment(`${todayStr} ${answerEndTime}`) if (momentNow.isBefore(momentStartTime) || momentNow.isAfter(momentEndTime)) { - commit('setRouter', 'errorPage') + router.push({ name: 'errorPage' }) commit('setErrorInfo', { errorType: 'overTime', errorMsg: `不在答题时间范围内,暂时无法进行填写
@@ -53,7 +56,6 @@ export default { return } } - commit('setRouter', 'indexPage') // 根据初始的schema生成questionData, questionSeq, rules, formValues, 这四个字段 const { questionData, questionSeq, rules, formValues } = adapter.generateData({ diff --git a/web/src/render/store/getters.js b/web/src/render/store/getters.js index 0dd0a32f..79d8a23f 100644 --- a/web/src/render/store/getters.js +++ b/web/src/render/store/getters.js @@ -10,7 +10,6 @@ export default { const questionArr = [] item.forEach((questionKey) => { - console.log('题目重新计算') const question = { ...questionData[questionKey] } // 开启显示序号 if (question.showIndex) { diff --git a/web/src/render/store/mutations.js b/web/src/render/store/mutations.js index 33bc69f0..4ada3d86 100644 --- a/web/src/render/store/mutations.js +++ b/web/src/render/store/mutations.js @@ -9,9 +9,6 @@ export default { setQuestionData(state, data) { state.questionData = data }, - setRouter(state, data) { - state.router = data - }, setErrorInfo(state, { errorType, errorMsg }) { state.errorInfo = { errorType, diff --git a/web/src/render/store/state.js b/web/src/render/store/state.js index 233de0d3..2a63c735 100644 --- a/web/src/render/store/state.js +++ b/web/src/render/store/state.js @@ -3,7 +3,6 @@ import { isMobile } from '../utils/index' export default { surveyPath: '', questionData: null, - router: '', isMobile: isMobile(), errorInfo: { errorType: '', diff --git a/web/vite.config.ts b/web/vite.config.ts index d7e5a8d8..1d36bdcf 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -34,6 +34,10 @@ const mpaPlugin = createMpaPlugin({ from: /render/, to: () => normalizePath('/src/render/index.html') }, + { + from: /management\/preview/, + to: () => normalizePath('/src/render/index.html') + }, { from: /\/|\/management\/.?/, to: () => normalizePath('/src/management/index.html')