From e58be832149484293a4c7be1a6b73f4790495250 Mon Sep 17 00:00:00 2001 From: sudoooooo Date: Sun, 4 Aug 2024 12:21:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AD=97=E6=AE=B5difT?= =?UTF-8?q?ime->diffTime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/models/surveyResponse.entity.ts | 2 +- .../survey/services/dataStatistic.service.ts | 2 +- server/src/modules/survey/utils/index.ts | 2 +- .../controllers/surveyResponse.controller.ts | 6 +- .../services/surveyResponse.service.ts | 4 +- server/src/utils/messagePushing.spec.ts | 2 +- web/src/render/pages/RenderPage.vue | 139 +++++++++--------- 7 files changed, 81 insertions(+), 76 deletions(-) diff --git a/server/src/models/surveyResponse.entity.ts b/server/src/models/surveyResponse.entity.ts index adce23d3..fce0bfd1 100644 --- a/server/src/models/surveyResponse.entity.ts +++ b/server/src/models/surveyResponse.entity.ts @@ -14,7 +14,7 @@ export class SurveyResponse extends BaseEntity { data: Record; @Column() - difTime: number; + diffTime: number; @Column() clientTime: number; diff --git a/server/src/modules/survey/services/dataStatistic.service.ts b/server/src/modules/survey/services/dataStatistic.service.ts index 6ccfb5db..0551b432 100644 --- a/server/src/modules/survey/services/dataStatistic.service.ts +++ b/server/src/modules/survey/services/dataStatistic.service.ts @@ -90,7 +90,7 @@ export class DataStatisticService { } return { ...data, - difTime: (submitedData.difTime / 1000).toFixed(2), + diffTime: (submitedData.diffTime / 1000).toFixed(2), createDate: moment(submitedData.createDate).format( 'YYYY-MM-DD HH:mm:ss', ), diff --git a/server/src/modules/survey/utils/index.ts b/server/src/modules/survey/utils/index.ts index 4f9a17bc..a6a64ccd 100644 --- a/server/src/modules/survey/utils/index.ts +++ b/server/src/modules/survey/utils/index.ts @@ -58,7 +58,7 @@ export function getListHeadByDataList(dataList) { }; }); listHead.push({ - field: 'difTime', + field: 'diffTime', title: '答题耗时(秒)', type: QUESTION_TYPE.TEXT, }); diff --git a/server/src/modules/surveyResponse/controllers/surveyResponse.controller.ts b/server/src/modules/surveyResponse/controllers/surveyResponse.controller.ts index bdf493f3..af8193f3 100644 --- a/server/src/modules/surveyResponse/controllers/surveyResponse.controller.ts +++ b/server/src/modules/surveyResponse/controllers/surveyResponse.controller.ts @@ -47,7 +47,7 @@ export class SurveyResponseController { encryptType: Joi.string(), sessionId: Joi.string(), clientTime: Joi.number().required(), - difTime: Joi.number(), + diffTime: Joi.number(), password: Joi.string().allow(null, ''), whitelist: Joi.string().allow(null, ''), }).validate(reqBody, { allowUnknown: true }); @@ -65,7 +65,7 @@ export class SurveyResponseController { data, sessionId, clientTime, - difTime, + diffTime, password, whitelist: whitelistValue, } = value; @@ -254,7 +254,7 @@ export class SurveyResponseController { surveyPath: value.surveyPath, data: decryptedData, clientTime, - difTime, + diffTime, surveyId: responseSchema.pageId, optionTextAndId, }); diff --git a/server/src/modules/surveyResponse/services/surveyResponse.service.ts b/server/src/modules/surveyResponse/services/surveyResponse.service.ts index b9438a81..59fa3543 100644 --- a/server/src/modules/surveyResponse/services/surveyResponse.service.ts +++ b/server/src/modules/surveyResponse/services/surveyResponse.service.ts @@ -12,7 +12,7 @@ export class SurveyResponseService { async createSurveyResponse({ data, clientTime, - difTime, + diffTime, surveyId, surveyPath, optionTextAndId, @@ -22,7 +22,7 @@ export class SurveyResponseService { data, secretKeys: [], clientTime, - difTime, + diffTime, pageId: surveyId, optionTextAndId, }); diff --git a/server/src/utils/messagePushing.spec.ts b/server/src/utils/messagePushing.spec.ts index 010706ad..9788c814 100644 --- a/server/src/utils/messagePushing.spec.ts +++ b/server/src/utils/messagePushing.spec.ts @@ -12,7 +12,7 @@ describe('getPushingData', () => { status: RECORD_STATUS.NEW, date: 1711025113146, }, - difTime: 30518, + diffTime: 30518, data: { data458: '15000000000', data515: '115019', diff --git a/web/src/render/pages/RenderPage.vue b/web/src/render/pages/RenderPage.vue index 6cf290e1..f6c411b4 100644 --- a/web/src/render/pages/RenderPage.vue +++ b/web/src/render/pages/RenderPage.vue @@ -19,128 +19,133 @@