Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 断点续答验收问题优化 #427

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ node_modules
dist

package-lock.json
yarn.lock

# local env files
.env.local
Expand Down
5 changes: 2 additions & 3 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@nestjs/swagger": "^7.3.0",
"@nestjs/typeorm": "^10.0.1",
"ali-oss": "^6.20.0",
"cheerio": "1.0.0-rc.12",
"cheerio": "^1.0.0-rc.12",
"crypto-js": "^4.2.0",
"dotenv": "^16.3.2",
"fs-extra": "^11.2.0",
Expand All @@ -48,8 +48,7 @@
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.1",
"svg-captcha": "^1.4.0",
"typeorm": "^0.3.19",
"xss": "^1.0.15"
"typeorm": "^0.3.19"
},
"devDependencies": {
"@nestjs/cli": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion server/src/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export enum RECORD_STATUS {
PUBLISHED = 'published', // 发布
REMOVED = 'removed', // 删除
FORCE_REMOVED = 'forceRemoved', // 从回收站删除
COMOPUTETING = 'computing', // 计算中
COMPUTING = 'computing', // 计算中
FINISHED = 'finished', // 已完成
ERROR = 'error', // 错误
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/modules/survey/services/downloadTask.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class DownloadTaskService {
{
$set: {
curStatus: {
status: RECORD_STATUS.COMOPUTETING,
status: RECORD_STATUS.COMPUTING,
date: Date.now(),
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"options": [
{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
Expand All @@ -52,7 +51,6 @@
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
{
"text": "课程1",
"hash": "115019",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
Expand All @@ -56,7 +55,6 @@
{
"text": "课程2",
"hash": "115020",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
Expand All @@ -65,7 +63,6 @@
{
"text": "课程3",
"hash": "115021",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
Expand All @@ -74,7 +71,6 @@
{
"text": "课程4",
"hash": "115022",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"options": [
{
"text": "选项1",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
Expand All @@ -55,7 +54,6 @@
},
{
"text": "选项2",
"imageUrl": "",
"others": false,
"mustOthers": false,
"othersKey": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
},
"pageConf": [],
"logicConf": {
"showLogicConf": []
"showLogicConf": [],
"jumpLogicConf": []
}
}
53 changes: 0 additions & 53 deletions server/src/utils/xss.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,13 @@ export default {
this.initCurOption()
},
addOption(text = '选项', others = false, index = -1, fieldId) {
let addOne
if (this.curOptions[0]) {
addOne = _cloneDeep(this.curOptions[0])
} else {
addOne = {
text: '',
hash: '',
others: false,
mustOthers: false,
othersKey: '',
placeholderDesc: '',
score: 0,
limit: ''
}
let addOne = {
text: '',
hash: '',
others: false,
mustOthers: false,
othersKey: '',
placeholderDesc: ''
}
for (const i in addOne) {
if (i === 'others') {
Expand Down
2 changes: 1 addition & 1 deletion web/src/management/pages/edit/setterConfig/baseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default [
{
title: '提交限制',
key: 'limitConfig',
formList: ['limit_tLimit', 'limit_breakAnswer', 'limit_backAnswer']
formList: ['limit_tLimit', 'limit_breakpointAnswer', 'limit_fillsubmitAnswer']
},
{
title: '作答限制',
Expand Down
8 changes: 4 additions & 4 deletions web/src/management/pages/edit/setterConfig/baseFormConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ export default {
type: 'QuestionTimeHour',
placement: 'top'
},
limit_breakAnswer: {
key: 'breakAnswer',
limit_breakpointAnswer: {
key: 'breakpointAnswer',
label: '允许断点续答',
tip: '回填前一次作答中的内容(注:更换设备/浏览器/清除缓存/更改内容重新发布则此功能失效)',
placement: 'top',
type: 'CustomedSwitch',
value: false,
},
limit_backAnswer: {
key: 'backAnswer',
limit_fillsubmitAnswer: {
key: 'fillsubmitAnswer',
label: '自动填充上次提交内容',
tip: '回填前一次提交的内容(注:更换设备/浏览器/清除缓存/更改内容重新发布则此功能失效)',
placement: 'top',
Expand Down
1 change: 0 additions & 1 deletion web/src/management/stores/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ function useInitializeSchema(surveyId: Ref<string>, initializeSchemaCallBack: ()
begTime: '',
endTime: '',
language: 'chinese',
showVoteProcess: 'allow',
tLimit: 0,
answerBegTime: '',
answerEndTime: '',
Expand Down
1 change: 0 additions & 1 deletion web/src/materials/questions/common/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export function getRandom(len) {

const optionListItem = [
'text',
'imageUrl',
'others',
'mustOthers',
'limit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const meta = {
defaultValue: [
{
text: '对',
imageUrl: '',
others: false,
mustOthers: false,
othersKey: '',
Expand All @@ -63,7 +62,6 @@ const meta = {
},
{
text: '错',
imageUrl: '',
others: false,
mustOthers: false,
othersKey: '',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { computed, defineComponent, shallowRef, defineAsyncComponent, watch } from 'vue'
import { computed, defineComponent, shallowRef, defineAsyncComponent } from 'vue'
import { includes } from 'lodash-es'

import BaseChoice from '../BaseChoice'
Expand Down
2 changes: 0 additions & 2 deletions web/src/materials/questions/widgets/CheckboxModule/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const meta = {
defaultValue: [
{
text: '选项1',
imageUrl: '',
others: false,
mustOthers: false,
othersKey: '',
Expand All @@ -62,7 +61,6 @@ const meta = {
},
{
text: '选项2',
imageUrl: '',
others: false,
mustOthers: false,
othersKey: '',
Expand Down
2 changes: 1 addition & 1 deletion web/src/materials/questions/widgets/RadioModule/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineComponent, shallowRef, watch, defineAsyncComponent } from 'vue'
import { defineComponent, shallowRef, defineAsyncComponent } from 'vue'
import BaseChoice from '../BaseChoice'

/**
Expand Down
16 changes: 7 additions & 9 deletions web/src/materials/questions/widgets/RadioModule/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,19 @@ const meta = {
defaultValue: [
{
text: '选项1',
imageUrl: '',
others: false,
mustOthers: false,
othersKey: '',
placeholderDesc: '',
hash: '115019'
othersKey: "",
placeholderDesc: "",
hash: "115019"
},
{
text: '选项2',
imageUrl: '',
text: "选项2",
others: false,
mustOthers: false,
othersKey: '',
placeholderDesc: '',
hash: '115020'
othersKey: "",
placeholderDesc: "",
hash: "115020"
}
]
},
Expand Down
2 changes: 0 additions & 2 deletions web/src/materials/questions/widgets/VoteModule/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const meta = {
defaultValue: [
{
text: '选项1',
imageUrl: '',
others: false,
mustOthers: false,
othersKey: '',
Expand All @@ -63,7 +62,6 @@ const meta = {
},
{
text: '选项2',
imageUrl: '',
others: false,
mustOthers: false,
othersKey: '',
Expand Down
Loading
Loading