@polyv/questionnaire-ui-launch 2.4.0-rc-20260514.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.es.d.ts ADDED
@@ -0,0 +1,1977 @@
1
+ import { ComponentOptionsMixin } from 'vue';
2
+ import { ComputedRef } from 'vue';
3
+ import { DefineComponent } from 'vue';
4
+ import { ExtractPropTypes } from 'vue';
5
+ import { I18nLangs } from '@polyv/vue-components';
6
+ import { NestedKeys } from '@polyv/vue-components/vue/src/lang/types';
7
+ import { PlatformQuestionnaireItemData } from '@polyv/ui-shared';
8
+ import { PlatformQuestionnairePageContentData } from '@polyv/ui-shared';
9
+ import { PlatformQuestionnairePreviewQuestionData } from '@polyv/ui-shared';
10
+ import { Questionnaire } from '@polyv/questionnaire-sdk';
11
+ import { QuestionStatisticsQuestionData } from '@polyv/question-bank';
12
+ import { QuestionStatisticsSourceQuestion } from '@polyv/question-bank';
13
+ import { Ref } from 'vue';
14
+ import { UniversalParams } from '@polyv/vue-components';
15
+ import { ValidatorFunction } from 'vue-types/dist/types';
16
+ import { VueTypeDef } from 'vue-types';
17
+ import { VueTypeValidableDef } from 'vue-types';
18
+ import { YN } from '@polyv/interaction-core';
19
+
20
+ declare type ControllerOptions = {
21
+ t: I18nTranslate;
22
+ };
23
+
24
+ declare type ControllerSource = {
25
+ services: QuestionnaireLaunchServices;
26
+ questionnaireTarget: Questionnaire;
27
+ questionnaireId?: string;
28
+ questionnaireType?: string;
29
+ sceneMode?: QuestionnaireLaunchSceneMode;
30
+ initialQuestionnaire?: QuestionnaireLaunchData;
31
+ checkDefaultBadwordEnabled?: boolean;
32
+ autoPublishScheduleEnabled?: boolean;
33
+ };
34
+
35
+ export declare const createQuestionnaireLaunchServices: (questionnaireTarget: Questionnaire) => QuestionnaireLaunchServices;
36
+
37
+ declare interface FillPartData {
38
+ isBlank: boolean;
39
+ blankIndex: number;
40
+ text: string;
41
+ }
42
+
43
+ declare interface FillQuestionData {
44
+ blankCount: number;
45
+ partList: FillPartData[];
46
+ }
47
+
48
+ declare type I18nTranslate = ReturnType<typeof useI18n>['$t'];
49
+
50
+ declare type LegacyQuestionnaireLaunchSceneConfigOptions = {
51
+ sceneConfig?: QuestionnaireLaunchSceneConfig;
52
+ entryType?: QuestionnaireType.Survey | QuestionnaireType.Exam;
53
+ scene?: QuestionnaireLaunchLegacyScene;
54
+ showQuestionnaireListBack?: boolean;
55
+ currentTemplateId?: string;
56
+ };
57
+
58
+ export declare const mapLegacyQuestionnaireScene: (scene?: QuestionnaireLaunchLegacyScene) => QuestionnaireLaunchSceneMode | undefined;
59
+
60
+ export declare const normalizePlatformQuestionnaireItems: (list: Array<Omit<PlatformQuestionnaireItemData, "questions"> & {
61
+ questions?: PlatformQuestionnairePreviewQuestionData[];
62
+ }>) => PlatformQuestionnaireItemData[];
63
+
64
+ export declare const normalizeQuestionnaireLaunchFeatureConfig: (config?: QuestionnaireLaunchFeatureConfig) => QuestionnaireLaunchFeatureConfig;
65
+
66
+ export declare const normalizeQuestionnaireLaunchSceneConfig: (config?: QuestionnaireLaunchSceneConfig) => QuestionnaireLaunchSceneConfig;
67
+
68
+ declare type QuestionAnswerType = string | number | string[];
69
+
70
+ declare interface QuestionItem<T extends QuestionItemTypeValue = QuestionItemTypeValue> {
71
+ questionId: string;
72
+ type: T;
73
+ title: string;
74
+ desc?: string;
75
+ required?: boolean;
76
+ scoreEnabled?: boolean;
77
+ score?: number;
78
+ options: QuestionOption[];
79
+ maxChooseOptions?: T extends 'C' ? number : never;
80
+ minChooseOptions?: T extends 'C' ? number : never;
81
+ fillQuestionData?: FillQuestionData;
82
+ rightAnswer?: QuestionAnswerType;
83
+ answerCount?: number;
84
+ }
85
+
86
+ declare type QuestionItemTypeValue = 'C' | 'R' | 'Q' | 'X' | 'S' | 'J' | 'T' | 'V';
87
+
88
+ export declare const QuestionnaireExamLaunchPopup: DefineComponent< {
89
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
90
+ required: true;
91
+ };
92
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
93
+ default: boolean;
94
+ } & {
95
+ default: boolean;
96
+ };
97
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
98
+ default: boolean;
99
+ } & {
100
+ default: boolean;
101
+ };
102
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
103
+ default: () => QuestionItemTypeValue[];
104
+ };
105
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
106
+ default: boolean;
107
+ } & {
108
+ default: boolean;
109
+ };
110
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
111
+ default: boolean;
112
+ } & {
113
+ default: boolean;
114
+ };
115
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
116
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
117
+ value: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
118
+ modelValue: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
119
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
120
+ input: (arg: boolean) => void;
121
+ "update:modelValue": (arg: boolean) => void;
122
+ }, string, Readonly<ExtractPropTypes< {
123
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
124
+ required: true;
125
+ };
126
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
127
+ default: boolean;
128
+ } & {
129
+ default: boolean;
130
+ };
131
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
132
+ default: boolean;
133
+ } & {
134
+ default: boolean;
135
+ };
136
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
137
+ default: () => QuestionItemTypeValue[];
138
+ };
139
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
140
+ default: boolean;
141
+ } & {
142
+ default: boolean;
143
+ };
144
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
145
+ default: boolean;
146
+ } & {
147
+ default: boolean;
148
+ };
149
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
150
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
151
+ value: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
152
+ modelValue: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
153
+ }>>, {
154
+ checkDefaultBadwordEnabled: boolean;
155
+ autoPublishScheduleEnabled: boolean;
156
+ visibleQuestionTypes: QuestionItemTypeValue[];
157
+ allowTypeSwitch: boolean;
158
+ allowQuestionValidation: boolean;
159
+ }>;
160
+
161
+ declare interface QuestionnaireLaunchData {
162
+ questionnaireId: string;
163
+ name: string;
164
+ desc: string;
165
+ questionnaireType: QuestionnaireTypeValue;
166
+ questions: QuestionnaireLaunchQuestion[];
167
+ timeLimit: number | '';
168
+ privacy: QuestionnaireLaunchPrivacy;
169
+ ossEnabled: YN;
170
+ ossUrl?: string;
171
+ createdTime?: number;
172
+ status?: QuestionnaireLaunchStatusValue;
173
+ publishType?: QuestionnairePublishTypeValue;
174
+ autoPublishTime?: string;
175
+ autoEndTime?: string;
176
+ countDownPublishTime?: number;
177
+ scoreLabelEnabled?: YN;
178
+ questionnaireScoreLabels?: QuestionnaireLaunchScoreLabel[];
179
+ statistics?: QuestionnaireLaunchStatistics_2;
180
+ }
181
+
182
+ export declare const QuestionnaireLaunchEditor: DefineComponent< {
183
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
184
+ required: true;
185
+ };
186
+ questionnaireId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
187
+ default: string;
188
+ };
189
+ questionnaireType: VueTypeDef<QuestionnaireTypeValue>;
190
+ initialQuestionnaire: VueTypeValidableDef<QuestionnaireLaunchData, ValidatorFunction<QuestionnaireLaunchData>>;
191
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
192
+ default: boolean;
193
+ } & {
194
+ default: boolean;
195
+ };
196
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
197
+ default: boolean;
198
+ } & {
199
+ default: boolean;
200
+ };
201
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
202
+ default: () => QuestionItemTypeValue[];
203
+ };
204
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
205
+ default: boolean;
206
+ } & {
207
+ default: boolean;
208
+ };
209
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
210
+ default: boolean;
211
+ } & {
212
+ default: boolean;
213
+ };
214
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
215
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
216
+ showRequired: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
217
+ default: boolean;
218
+ } & {
219
+ default: boolean;
220
+ };
221
+ showMaxChoose: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
222
+ default: boolean;
223
+ } & {
224
+ default: boolean;
225
+ };
226
+ showScore: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
227
+ default: boolean;
228
+ } & {
229
+ default: boolean;
230
+ };
231
+ showPublishConfig: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
232
+ default: boolean;
233
+ } & {
234
+ default: boolean;
235
+ };
236
+ showCommonSection: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
237
+ default: boolean;
238
+ } & {
239
+ default: boolean;
240
+ };
241
+ }, {
242
+ mode: ComputedRef<"create" | "edit">;
243
+ loading: Ref<boolean>;
244
+ saving: Ref<boolean>;
245
+ editingQuestionnaire: Ref< {
246
+ questionnaireId: string;
247
+ name: string;
248
+ desc: string;
249
+ questionnaireType: QuestionnaireTypeValue;
250
+ questions: {
251
+ score: number | "";
252
+ answer: QuestionAnswerType | undefined;
253
+ fillQuestionData?: {
254
+ blankCount: number;
255
+ partList: {
256
+ isBlank: boolean;
257
+ blankIndex: number;
258
+ text: string;
259
+ }[];
260
+ } | undefined;
261
+ scoreExt?: (Record<string, number> | null) | undefined;
262
+ type: QuestionItemTypeValue;
263
+ title: string;
264
+ required?: boolean | undefined;
265
+ questionId: string;
266
+ desc?: string | undefined;
267
+ scoreEnabled?: boolean | undefined;
268
+ options: {
269
+ id: string;
270
+ content: string;
271
+ tips?: string | undefined;
272
+ isRight?: boolean | undefined;
273
+ image?: string | undefined;
274
+ answerCount?: number | undefined;
275
+ answerPercent?: number | undefined;
276
+ }[];
277
+ maxChooseOptions?: number | undefined;
278
+ minChooseOptions?: number | undefined;
279
+ answerCount?: number | undefined;
280
+ }[];
281
+ timeLimit: number | "";
282
+ privacy: {
283
+ content: string;
284
+ required: YN;
285
+ };
286
+ ossEnabled: YN;
287
+ ossUrl?: string | undefined;
288
+ createdTime?: number | undefined;
289
+ status?: QuestionnaireLaunchStatusValue | undefined;
290
+ publishType?: QuestionnairePublishTypeValue | undefined;
291
+ autoPublishTime?: string | undefined;
292
+ autoEndTime?: string | undefined;
293
+ countDownPublishTime?: number | undefined;
294
+ scoreLabelEnabled?: YN | undefined;
295
+ questionnaireScoreLabels?: {
296
+ questionnaireId?: string | undefined;
297
+ scoreLabel: string;
298
+ labelRemark: string;
299
+ leftScore: number;
300
+ rightScore: number;
301
+ }[] | undefined;
302
+ statistics?: {
303
+ total: number;
304
+ questions: {
305
+ questionId: string;
306
+ questionName: string;
307
+ desc?: string | undefined;
308
+ options: number[];
309
+ answerList?: {
310
+ userId: string;
311
+ nick: string;
312
+ avatar?: string | undefined;
313
+ answer: string;
314
+ score?: number | undefined;
315
+ }[] | undefined;
316
+ total: number;
317
+ correctCount?: number | undefined;
318
+ score?: number | null | undefined;
319
+ totalScore?: number | undefined;
320
+ }[];
321
+ } | undefined;
322
+ }>;
323
+ questionValidationVersion: Ref<number>;
324
+ hasUnsavedChanges: ComputedRef<boolean>;
325
+ loadQuestionnaire: (questionnaireId?: string) => Promise<void>;
326
+ saveQuestionnaire: () => Promise<{
327
+ questionnaireId: string;
328
+ } | undefined>;
329
+ validateDraft: () => boolean;
330
+ validateDraftBeforeSubmit: () => Promise<boolean>;
331
+ getEditingQuestionnaire: () => QuestionnaireLaunchData;
332
+ markQuestionnaireSaved: (value?: {
333
+ questionnaireId: string;
334
+ name: string;
335
+ desc: string;
336
+ questionnaireType: QuestionnaireTypeValue;
337
+ questions: {
338
+ score: number | "";
339
+ answer: QuestionAnswerType | undefined;
340
+ fillQuestionData?: {
341
+ blankCount: number;
342
+ partList: {
343
+ isBlank: boolean;
344
+ blankIndex: number;
345
+ text: string;
346
+ }[];
347
+ } | undefined;
348
+ scoreExt?: (Record<string, number> | null) | undefined;
349
+ type: QuestionItemTypeValue;
350
+ title: string;
351
+ required?: boolean | undefined;
352
+ questionId: string;
353
+ desc?: string | undefined;
354
+ scoreEnabled?: boolean | undefined;
355
+ options: {
356
+ id: string;
357
+ content: string;
358
+ tips?: string | undefined;
359
+ isRight?: boolean | undefined;
360
+ image?: string | undefined;
361
+ answerCount?: number | undefined;
362
+ answerPercent?: number | undefined;
363
+ }[];
364
+ maxChooseOptions?: number | undefined;
365
+ minChooseOptions?: number | undefined;
366
+ answerCount?: number | undefined;
367
+ }[];
368
+ timeLimit: number | "";
369
+ privacy: {
370
+ content: string;
371
+ required: YN;
372
+ };
373
+ ossEnabled: YN;
374
+ ossUrl?: string | undefined;
375
+ createdTime?: number | undefined;
376
+ status?: QuestionnaireLaunchStatusValue | undefined;
377
+ publishType?: QuestionnairePublishTypeValue | undefined;
378
+ autoPublishTime?: string | undefined;
379
+ autoEndTime?: string | undefined;
380
+ countDownPublishTime?: number | undefined;
381
+ scoreLabelEnabled?: YN | undefined;
382
+ questionnaireScoreLabels?: {
383
+ questionnaireId?: string | undefined;
384
+ scoreLabel: string;
385
+ labelRemark: string;
386
+ leftScore: number;
387
+ rightScore: number;
388
+ }[] | undefined;
389
+ statistics?: {
390
+ total: number;
391
+ questions: {
392
+ questionId: string;
393
+ questionName: string;
394
+ desc?: string | undefined;
395
+ options: number[];
396
+ answerList?: {
397
+ userId: string;
398
+ nick: string;
399
+ avatar?: string | undefined;
400
+ answer: string;
401
+ score?: number | undefined;
402
+ }[] | undefined;
403
+ total: number;
404
+ correctCount?: number | undefined;
405
+ score?: number | null | undefined;
406
+ totalScore?: number | undefined;
407
+ }[];
408
+ } | undefined;
409
+ }) => void;
410
+ clearValidationMessage: () => void;
411
+ dispose: () => Promise<void>;
412
+ requestBack: (action?: () => void) => boolean;
413
+ saveOnly: () => Promise<void>;
414
+ saveAndStart: () => Promise<void>;
415
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
416
+ saved: (arg: string) => void;
417
+ preview: (arg: string) => void;
418
+ back: (arg?: void | undefined) => void;
419
+ }, string, Readonly<ExtractPropTypes< {
420
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
421
+ required: true;
422
+ };
423
+ questionnaireId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
424
+ default: string;
425
+ };
426
+ questionnaireType: VueTypeDef<QuestionnaireTypeValue>;
427
+ initialQuestionnaire: VueTypeValidableDef<QuestionnaireLaunchData, ValidatorFunction<QuestionnaireLaunchData>>;
428
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
429
+ default: boolean;
430
+ } & {
431
+ default: boolean;
432
+ };
433
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
434
+ default: boolean;
435
+ } & {
436
+ default: boolean;
437
+ };
438
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
439
+ default: () => QuestionItemTypeValue[];
440
+ };
441
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
442
+ default: boolean;
443
+ } & {
444
+ default: boolean;
445
+ };
446
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
447
+ default: boolean;
448
+ } & {
449
+ default: boolean;
450
+ };
451
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
452
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
453
+ showRequired: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
454
+ default: boolean;
455
+ } & {
456
+ default: boolean;
457
+ };
458
+ showMaxChoose: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
459
+ default: boolean;
460
+ } & {
461
+ default: boolean;
462
+ };
463
+ showScore: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
464
+ default: boolean;
465
+ } & {
466
+ default: boolean;
467
+ };
468
+ showPublishConfig: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
469
+ default: boolean;
470
+ } & {
471
+ default: boolean;
472
+ };
473
+ showCommonSection: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
474
+ default: boolean;
475
+ } & {
476
+ default: boolean;
477
+ };
478
+ }>>, {
479
+ questionnaireId: string;
480
+ checkDefaultBadwordEnabled: boolean;
481
+ autoPublishScheduleEnabled: boolean;
482
+ visibleQuestionTypes: QuestionItemTypeValue[];
483
+ allowTypeSwitch: boolean;
484
+ allowQuestionValidation: boolean;
485
+ showRequired: boolean;
486
+ showMaxChoose: boolean;
487
+ showScore: boolean;
488
+ showPublishConfig: boolean;
489
+ showCommonSection: boolean;
490
+ }>;
491
+
492
+ export declare const QuestionnaireLaunchEntry: DefineComponent< {
493
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
494
+ required: true;
495
+ };
496
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
497
+ default: boolean;
498
+ } & {
499
+ default: boolean;
500
+ };
501
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
502
+ default: boolean;
503
+ } & {
504
+ default: boolean;
505
+ };
506
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
507
+ default: () => QuestionItemTypeValue[];
508
+ };
509
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
510
+ default: boolean;
511
+ } & {
512
+ default: boolean;
513
+ };
514
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
515
+ default: boolean;
516
+ } & {
517
+ default: boolean;
518
+ };
519
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
520
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
521
+ /** 入口固定问卷类型;传入后列表不展示类型切换。 */
522
+ entryType: VueTypeDef<QuestionnaireType.Survey | QuestionnaireType.Exam>;
523
+ /** 旧版场景参数,兼容模板问卷场景接入。 */
524
+ scene: VueTypeDef<QuestionnaireLaunchLegacyScene>;
525
+ /** 旧版返回列表按钮开关。 */
526
+ showQuestionnaireListBack: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
527
+ default: boolean;
528
+ } & {
529
+ default: boolean;
530
+ };
531
+ /** 旧版当前模板 ID。 */
532
+ currentTemplateId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
533
+ default: string;
534
+ };
535
+ }, {
536
+ currentStep: Ref<QuestionnaireLaunchStep>;
537
+ currentQuestionnaireId: Ref<string>;
538
+ openCreate: (questionnaireType: QuestionnaireTypeValue) => void;
539
+ openEdit: (questionnaireId: string, questionnaireType: QuestionnaireTypeValue) => void;
540
+ openPreview: (questionnaireId: string) => Promise<void>;
541
+ openStatistics: (questionnaireId: string, questionnaireType?: QuestionnaireTypeValue) => void;
542
+ openList: () => void;
543
+ backToList: () => boolean | void;
544
+ requestClose: (close?: () => void) => boolean;
545
+ saveEditor: () => Promise<void>;
546
+ previewEditor: () => void;
547
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
548
+ close: (arg?: void | undefined) => void;
549
+ select: (arg: string) => void;
550
+ "back-list": (arg?: void | undefined) => void;
551
+ "step-change": (arg: QuestionnaireLaunchStep) => void;
552
+ }, string, Readonly<ExtractPropTypes< {
553
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
554
+ required: true;
555
+ };
556
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
557
+ default: boolean;
558
+ } & {
559
+ default: boolean;
560
+ };
561
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
562
+ default: boolean;
563
+ } & {
564
+ default: boolean;
565
+ };
566
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
567
+ default: () => QuestionItemTypeValue[];
568
+ };
569
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
570
+ default: boolean;
571
+ } & {
572
+ default: boolean;
573
+ };
574
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
575
+ default: boolean;
576
+ } & {
577
+ default: boolean;
578
+ };
579
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
580
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
581
+ /** 入口固定问卷类型;传入后列表不展示类型切换。 */
582
+ entryType: VueTypeDef<QuestionnaireType.Survey | QuestionnaireType.Exam>;
583
+ /** 旧版场景参数,兼容模板问卷场景接入。 */
584
+ scene: VueTypeDef<QuestionnaireLaunchLegacyScene>;
585
+ /** 旧版返回列表按钮开关。 */
586
+ showQuestionnaireListBack: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
587
+ default: boolean;
588
+ } & {
589
+ default: boolean;
590
+ };
591
+ /** 旧版当前模板 ID。 */
592
+ currentTemplateId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
593
+ default: string;
594
+ };
595
+ }>>, {
596
+ checkDefaultBadwordEnabled: boolean;
597
+ autoPublishScheduleEnabled: boolean;
598
+ visibleQuestionTypes: QuestionItemTypeValue[];
599
+ allowTypeSwitch: boolean;
600
+ allowQuestionValidation: boolean;
601
+ currentTemplateId: string;
602
+ showQuestionnaireListBack: boolean;
603
+ }>;
604
+
605
+ export declare const QuestionnaireLaunchEntryPopup: DefineComponent< {
606
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
607
+ required: true;
608
+ };
609
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
610
+ default: boolean;
611
+ } & {
612
+ default: boolean;
613
+ };
614
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
615
+ default: boolean;
616
+ } & {
617
+ default: boolean;
618
+ };
619
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
620
+ default: () => QuestionItemTypeValue[];
621
+ };
622
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
623
+ default: boolean;
624
+ } & {
625
+ default: boolean;
626
+ };
627
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
628
+ default: boolean;
629
+ } & {
630
+ default: boolean;
631
+ };
632
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
633
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
634
+ value: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
635
+ modelValue: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
636
+ entryType: VueTypeDef<QuestionnaireType.Survey | QuestionnaireType.Exam>;
637
+ scene: VueTypeDef<QuestionnaireLaunchLegacyScene>;
638
+ showQuestionnaireListBack: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
639
+ default: boolean;
640
+ } & {
641
+ default: boolean;
642
+ };
643
+ currentTemplateId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
644
+ default: string;
645
+ };
646
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
647
+ input: (arg: boolean) => void;
648
+ select: (arg: string) => void;
649
+ "back-list": (arg?: void | undefined) => void;
650
+ "update:modelValue": (arg: boolean) => void;
651
+ }, string, Readonly<ExtractPropTypes< {
652
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
653
+ required: true;
654
+ };
655
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
656
+ default: boolean;
657
+ } & {
658
+ default: boolean;
659
+ };
660
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
661
+ default: boolean;
662
+ } & {
663
+ default: boolean;
664
+ };
665
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
666
+ default: () => QuestionItemTypeValue[];
667
+ };
668
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
669
+ default: boolean;
670
+ } & {
671
+ default: boolean;
672
+ };
673
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
674
+ default: boolean;
675
+ } & {
676
+ default: boolean;
677
+ };
678
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
679
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
680
+ value: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
681
+ modelValue: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
682
+ entryType: VueTypeDef<QuestionnaireType.Survey | QuestionnaireType.Exam>;
683
+ scene: VueTypeDef<QuestionnaireLaunchLegacyScene>;
684
+ showQuestionnaireListBack: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
685
+ default: boolean;
686
+ } & {
687
+ default: boolean;
688
+ };
689
+ currentTemplateId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
690
+ default: string;
691
+ };
692
+ }>>, {
693
+ checkDefaultBadwordEnabled: boolean;
694
+ autoPublishScheduleEnabled: boolean;
695
+ visibleQuestionTypes: QuestionItemTypeValue[];
696
+ allowTypeSwitch: boolean;
697
+ allowQuestionValidation: boolean;
698
+ currentTemplateId: string;
699
+ showQuestionnaireListBack: boolean;
700
+ }>;
701
+
702
+ export declare type QuestionnaireLaunchFeatureConfig = {
703
+ toolbarSearchEnabled?: boolean;
704
+ toolbarSortEnabled?: boolean;
705
+ toolbarStatusFilterEnabled?: boolean;
706
+ showImport?: boolean;
707
+ showPublishConfig?: boolean;
708
+ showCommonSection?: boolean;
709
+ showPrivacy?: boolean;
710
+ showRequired?: boolean;
711
+ showScore?: boolean;
712
+ showMaxChoose?: boolean;
713
+ };
714
+
715
+ export declare type QuestionnaireLaunchLegacyScene = 'LOTTERY_QUESTIONNAIRE_NEW' | 'REDPACKET_QUESTIONNAIRE' | 'TASK_QUESTIONNAIRE';
716
+
717
+ declare interface QuestionnaireLaunchListItem {
718
+ questionnaireId: string;
719
+ name: string;
720
+ status: QuestionnaireLaunchStatusValue;
721
+ questionnaireType: QuestionnaireTypeValue;
722
+ publishType?: QuestionnairePublishTypeValue;
723
+ createdTime: number;
724
+ lastModified?: number;
725
+ countDownEndTime?: number;
726
+ countDownPublishTime?: number;
727
+ questionCount?: number;
728
+ creatorId?: string;
729
+ creatorName?: string | null;
730
+ total?: number;
731
+ privacy: QuestionnaireLaunchPrivacy;
732
+ }
733
+
734
+ declare type QuestionnaireLaunchPageContent<T = unknown> = {
735
+ pageNumber: number;
736
+ pageSize: number;
737
+ totalItems: number;
738
+ totalPages: number;
739
+ contents: T[];
740
+ };
741
+
742
+ export declare const QuestionnaireLaunchPreview: DefineComponent< {
743
+ questionnaire: VueTypeValidableDef<QuestionnaireLaunchData, ValidatorFunction<QuestionnaireLaunchData>>;
744
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
745
+ questionnaire: VueTypeValidableDef<QuestionnaireLaunchData, ValidatorFunction<QuestionnaireLaunchData>>;
746
+ }>>, {}>;
747
+
748
+ declare interface QuestionnaireLaunchPrivacy {
749
+ content: string;
750
+ required: YN;
751
+ }
752
+
753
+ declare interface QuestionnaireLaunchQuestion<T extends QuestionItemTypeValue = QuestionItemTypeValue> extends Omit<QuestionItem<T>, 'score' | 'rightAnswer' | 'fillQuestionData'> {
754
+ score: number | '';
755
+ answer: QuestionAnswerType | undefined;
756
+ fillQuestionData?: FillQuestionData;
757
+ scoreExt?: Record<string, number> | null;
758
+ }
759
+
760
+ declare interface QuestionnaireLaunchRankItem {
761
+ rank: number;
762
+ viewerId: string;
763
+ nickname: string;
764
+ avatar?: string;
765
+ score: number;
766
+ costTime: number;
767
+ }
768
+
769
+ export declare type QuestionnaireLaunchSceneConfig = {
770
+ mode?: QuestionnaireLaunchSceneMode;
771
+ showBackButton?: boolean;
772
+ currentTemplateId?: string;
773
+ };
774
+
775
+ export declare type QuestionnaireLaunchSceneMode = 'survey' | 'exam' | 'lotteryQuestionnaireNew' | 'redpacketQuestionnaire';
776
+
777
+ declare interface QuestionnaireLaunchScoreLabel {
778
+ questionnaireId?: string;
779
+ scoreLabel: string;
780
+ labelRemark: string;
781
+ leftScore: number;
782
+ rightScore: number;
783
+ }
784
+
785
+ export declare type QuestionnaireLaunchServices = {
786
+ getPushNum: (questionnaireId: string) => Promise<number>;
787
+ getQuestionnairePageList: (params: {
788
+ pageNumber: number;
789
+ pageSize: number;
790
+ type: string;
791
+ }) => Promise<QuestionnaireLaunchPageContent<QuestionnaireLaunchListItem>>;
792
+ getQuestionnaireDetail: (questionnaireId: string) => Promise<QuestionnaireLaunchData>;
793
+ saveQuestionnaire: (data: QuestionnaireLaunchData) => Promise<{
794
+ questionnaireId: string;
795
+ }>;
796
+ startQuestionnaire: (data: QuestionnaireLaunchData) => Promise<unknown>;
797
+ stopQuestionnaire: (questionnaireId: string) => Promise<unknown>;
798
+ deleteQuestionnaire: (questionnaireId: string) => Promise<unknown>;
799
+ checkSensitiveWords?: (content: string) => Promise<{
800
+ success: boolean;
801
+ sensitive?: boolean;
802
+ words?: string[];
803
+ failMessage?: string;
804
+ }>;
805
+ uploadImage?: (file: File) => Promise<{
806
+ url: string;
807
+ } | string>;
808
+ uploadTemplate?: (file: File, type: string) => Promise<unknown>;
809
+ downloadTemplate?: (options?: {
810
+ lang?: string;
811
+ type?: string;
812
+ }) => Promise<unknown>;
813
+ downloadStatistics: (questionnaireId: string) => Promise<unknown>;
814
+ getRankPageList?: (questionnaireId: string) => Promise<QuestionnaireLaunchRankItem[]>;
815
+ sendResult: (questionnaireId: string) => Promise<unknown>;
816
+ sendRank: (questionnaireId: string) => Promise<unknown>;
817
+ getPlatformQuestionnaireList?: (params: {
818
+ pageNumber: number;
819
+ pageSize: number;
820
+ keyword?: string;
821
+ }) => Promise<PlatformQuestionnairePageContentData>;
822
+ getPlatformQuestionnairePreviewQuestions?: (params: {
823
+ questionnaireId: string;
824
+ userId: string;
825
+ }) => Promise<PlatformQuestionnairePreviewQuestionData[]>;
826
+ copyFromUserQuestionnaire?: (questionnaireId: string, options: {
827
+ userId: string;
828
+ type: string;
829
+ }) => Promise<unknown>;
830
+ cancelAuto?: (questionnaireId: string) => Promise<unknown>;
831
+ recoverAuto?: (questionnaireId: string) => Promise<unknown>;
832
+ };
833
+
834
+ export declare const QuestionnaireLaunchStatistics: DefineComponent< {
835
+ /** 外层复用的统计阶段状态;不传则组件内部自行创建。 */
836
+ stage: VueTypeValidableDef< {
837
+ loading: Ref<boolean>;
838
+ rankLoading: Ref<boolean>;
839
+ questionnaire: Ref<QuestionnaireLaunchData | undefined>;
840
+ rankList: Ref< {
841
+ rank: number;
842
+ viewerId: string;
843
+ nickname: string;
844
+ avatar?: string | undefined;
845
+ score: number;
846
+ costTime: number;
847
+ }[]>;
848
+ isExam: ComputedRef<boolean>;
849
+ currentTab: Ref<"rank" | "result">;
850
+ StatisticsTab: {
851
+ readonly Result: "result";
852
+ readonly Rank: "rank";
853
+ };
854
+ statisticsQuestions: ComputedRef<QuestionStatisticsSourceQuestion[]>;
855
+ statisticsQuestionResults: ComputedRef<QuestionStatisticsQuestionData[]>;
856
+ createdAtText: ComputedRef<string>;
857
+ submittedSummaryParts: ComputedRef< {
858
+ prefix: string;
859
+ count: string;
860
+ suffix: string;
861
+ }>;
862
+ sendResult: () => Promise<void>;
863
+ sendRank: () => Promise<void>;
864
+ showRank: (nextRankList: QuestionnaireLaunchRankItem[]) => void;
865
+ downloadStatistics: () => Promise<void>;
866
+ loadRankList: () => Promise<void>;
867
+ switchTab: (value: "rank" | "result") => Promise<void>;
868
+ }, ValidatorFunction< {
869
+ loading: Ref<boolean>;
870
+ rankLoading: Ref<boolean>;
871
+ questionnaire: Ref<QuestionnaireLaunchData | undefined>;
872
+ rankList: Ref< {
873
+ rank: number;
874
+ viewerId: string;
875
+ nickname: string;
876
+ avatar?: string | undefined;
877
+ score: number;
878
+ costTime: number;
879
+ }[]>;
880
+ isExam: ComputedRef<boolean>;
881
+ currentTab: Ref<"rank" | "result">;
882
+ StatisticsTab: {
883
+ readonly Result: "result";
884
+ readonly Rank: "rank";
885
+ };
886
+ statisticsQuestions: ComputedRef<QuestionStatisticsSourceQuestion[]>;
887
+ statisticsQuestionResults: ComputedRef<QuestionStatisticsQuestionData[]>;
888
+ createdAtText: ComputedRef<string>;
889
+ submittedSummaryParts: ComputedRef< {
890
+ prefix: string;
891
+ count: string;
892
+ suffix: string;
893
+ }>;
894
+ sendResult: () => Promise<void>;
895
+ sendRank: () => Promise<void>;
896
+ showRank: (nextRankList: QuestionnaireLaunchRankItem[]) => void;
897
+ downloadStatistics: () => Promise<void>;
898
+ loadRankList: () => Promise<void>;
899
+ switchTab: (value: "rank" | "result") => Promise<void>;
900
+ }>>;
901
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
902
+ required: true;
903
+ };
904
+ questionnaireId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
905
+ default: string;
906
+ };
907
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
908
+ /** 外层复用的统计阶段状态;不传则组件内部自行创建。 */
909
+ stage: VueTypeValidableDef< {
910
+ loading: Ref<boolean>;
911
+ rankLoading: Ref<boolean>;
912
+ questionnaire: Ref<QuestionnaireLaunchData | undefined>;
913
+ rankList: Ref< {
914
+ rank: number;
915
+ viewerId: string;
916
+ nickname: string;
917
+ avatar?: string | undefined;
918
+ score: number;
919
+ costTime: number;
920
+ }[]>;
921
+ isExam: ComputedRef<boolean>;
922
+ currentTab: Ref<"rank" | "result">;
923
+ StatisticsTab: {
924
+ readonly Result: "result";
925
+ readonly Rank: "rank";
926
+ };
927
+ statisticsQuestions: ComputedRef<QuestionStatisticsSourceQuestion[]>;
928
+ statisticsQuestionResults: ComputedRef<QuestionStatisticsQuestionData[]>;
929
+ createdAtText: ComputedRef<string>;
930
+ submittedSummaryParts: ComputedRef< {
931
+ prefix: string;
932
+ count: string;
933
+ suffix: string;
934
+ }>;
935
+ sendResult: () => Promise<void>;
936
+ sendRank: () => Promise<void>;
937
+ showRank: (nextRankList: QuestionnaireLaunchRankItem[]) => void;
938
+ downloadStatistics: () => Promise<void>;
939
+ loadRankList: () => Promise<void>;
940
+ switchTab: (value: "rank" | "result") => Promise<void>;
941
+ }, ValidatorFunction< {
942
+ loading: Ref<boolean>;
943
+ rankLoading: Ref<boolean>;
944
+ questionnaire: Ref<QuestionnaireLaunchData | undefined>;
945
+ rankList: Ref< {
946
+ rank: number;
947
+ viewerId: string;
948
+ nickname: string;
949
+ avatar?: string | undefined;
950
+ score: number;
951
+ costTime: number;
952
+ }[]>;
953
+ isExam: ComputedRef<boolean>;
954
+ currentTab: Ref<"rank" | "result">;
955
+ StatisticsTab: {
956
+ readonly Result: "result";
957
+ readonly Rank: "rank";
958
+ };
959
+ statisticsQuestions: ComputedRef<QuestionStatisticsSourceQuestion[]>;
960
+ statisticsQuestionResults: ComputedRef<QuestionStatisticsQuestionData[]>;
961
+ createdAtText: ComputedRef<string>;
962
+ submittedSummaryParts: ComputedRef< {
963
+ prefix: string;
964
+ count: string;
965
+ suffix: string;
966
+ }>;
967
+ sendResult: () => Promise<void>;
968
+ sendRank: () => Promise<void>;
969
+ showRank: (nextRankList: QuestionnaireLaunchRankItem[]) => void;
970
+ downloadStatistics: () => Promise<void>;
971
+ loadRankList: () => Promise<void>;
972
+ switchTab: (value: "rank" | "result") => Promise<void>;
973
+ }>>;
974
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
975
+ required: true;
976
+ };
977
+ questionnaireId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
978
+ default: string;
979
+ };
980
+ }>>, {
981
+ questionnaireId: string;
982
+ }>;
983
+
984
+ declare interface QuestionnaireLaunchStatistics_2 {
985
+ total: number;
986
+ questions: QuestionnaireLaunchStatisticsQuestion[];
987
+ }
988
+
989
+ declare interface QuestionnaireLaunchStatisticsQuestion {
990
+ questionId: string;
991
+ questionName: string;
992
+ desc?: string;
993
+ options: number[];
994
+ answerList?: Array<{
995
+ userId: string;
996
+ nick: string;
997
+ avatar?: string;
998
+ answer: string;
999
+ score?: number;
1000
+ }>;
1001
+ total: number;
1002
+ correctCount?: number;
1003
+ score?: number | null;
1004
+ totalScore?: number;
1005
+ }
1006
+
1007
+ declare type QuestionnaireLaunchStatusValue = 'saved' | 'published' | 'forbidden';
1008
+
1009
+ export declare enum QuestionnaireLaunchStep {
1010
+ List = "list",
1011
+ Editor = "editor",
1012
+ Preview = "preview",
1013
+ Statistics = "statistics"
1014
+ }
1015
+
1016
+ export declare const QuestionnaireLotteryQuestionnaireLaunchPopup: DefineComponent< {
1017
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
1018
+ required: true;
1019
+ };
1020
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1021
+ default: boolean;
1022
+ } & {
1023
+ default: boolean;
1024
+ };
1025
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1026
+ default: boolean;
1027
+ } & {
1028
+ default: boolean;
1029
+ };
1030
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
1031
+ default: () => QuestionItemTypeValue[];
1032
+ };
1033
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1034
+ default: boolean;
1035
+ } & {
1036
+ default: boolean;
1037
+ };
1038
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1039
+ default: boolean;
1040
+ } & {
1041
+ default: boolean;
1042
+ };
1043
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
1044
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
1045
+ value: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1046
+ modelValue: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1047
+ currentTemplateId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
1048
+ default: string;
1049
+ };
1050
+ showQuestionnaireListBack: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1051
+ default: boolean;
1052
+ } & {
1053
+ default: boolean;
1054
+ };
1055
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
1056
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
1057
+ required: true;
1058
+ };
1059
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1060
+ default: boolean;
1061
+ } & {
1062
+ default: boolean;
1063
+ };
1064
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1065
+ default: boolean;
1066
+ } & {
1067
+ default: boolean;
1068
+ };
1069
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
1070
+ default: () => QuestionItemTypeValue[];
1071
+ };
1072
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1073
+ default: boolean;
1074
+ } & {
1075
+ default: boolean;
1076
+ };
1077
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1078
+ default: boolean;
1079
+ } & {
1080
+ default: boolean;
1081
+ };
1082
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
1083
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
1084
+ value: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1085
+ modelValue: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1086
+ currentTemplateId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
1087
+ default: string;
1088
+ };
1089
+ showQuestionnaireListBack: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1090
+ default: boolean;
1091
+ } & {
1092
+ default: boolean;
1093
+ };
1094
+ }>>, {
1095
+ checkDefaultBadwordEnabled: boolean;
1096
+ autoPublishScheduleEnabled: boolean;
1097
+ visibleQuestionTypes: QuestionItemTypeValue[];
1098
+ allowTypeSwitch: boolean;
1099
+ allowQuestionValidation: boolean;
1100
+ currentTemplateId: string;
1101
+ showQuestionnaireListBack: boolean;
1102
+ }>;
1103
+
1104
+ declare type QuestionnairePublishTypeValue = 'manual' | 'auto';
1105
+
1106
+ export declare const QuestionnaireRedpacketLaunchPopup: DefineComponent< {
1107
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
1108
+ required: true;
1109
+ };
1110
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1111
+ default: boolean;
1112
+ } & {
1113
+ default: boolean;
1114
+ };
1115
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1116
+ default: boolean;
1117
+ } & {
1118
+ default: boolean;
1119
+ };
1120
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
1121
+ default: () => QuestionItemTypeValue[];
1122
+ };
1123
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1124
+ default: boolean;
1125
+ } & {
1126
+ default: boolean;
1127
+ };
1128
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1129
+ default: boolean;
1130
+ } & {
1131
+ default: boolean;
1132
+ };
1133
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
1134
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
1135
+ value: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1136
+ modelValue: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1137
+ currentTemplateId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
1138
+ default: string;
1139
+ };
1140
+ showQuestionnaireListBack: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1141
+ default: boolean;
1142
+ } & {
1143
+ default: boolean;
1144
+ };
1145
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, Readonly<ExtractPropTypes< {
1146
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
1147
+ required: true;
1148
+ };
1149
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1150
+ default: boolean;
1151
+ } & {
1152
+ default: boolean;
1153
+ };
1154
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1155
+ default: boolean;
1156
+ } & {
1157
+ default: boolean;
1158
+ };
1159
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
1160
+ default: () => QuestionItemTypeValue[];
1161
+ };
1162
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1163
+ default: boolean;
1164
+ } & {
1165
+ default: boolean;
1166
+ };
1167
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1168
+ default: boolean;
1169
+ } & {
1170
+ default: boolean;
1171
+ };
1172
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
1173
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
1174
+ value: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1175
+ modelValue: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1176
+ currentTemplateId: VueTypeValidableDef<string, ValidatorFunction<string>> & {
1177
+ default: string;
1178
+ };
1179
+ showQuestionnaireListBack: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1180
+ default: boolean;
1181
+ } & {
1182
+ default: boolean;
1183
+ };
1184
+ }>>, {
1185
+ checkDefaultBadwordEnabled: boolean;
1186
+ autoPublishScheduleEnabled: boolean;
1187
+ visibleQuestionTypes: QuestionItemTypeValue[];
1188
+ allowTypeSwitch: boolean;
1189
+ allowQuestionValidation: boolean;
1190
+ currentTemplateId: string;
1191
+ showQuestionnaireListBack: boolean;
1192
+ }>;
1193
+
1194
+ export declare const QuestionnaireSurveyLaunchPopup: DefineComponent< {
1195
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
1196
+ required: true;
1197
+ };
1198
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1199
+ default: boolean;
1200
+ } & {
1201
+ default: boolean;
1202
+ };
1203
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1204
+ default: boolean;
1205
+ } & {
1206
+ default: boolean;
1207
+ };
1208
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
1209
+ default: () => QuestionItemTypeValue[];
1210
+ };
1211
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1212
+ default: boolean;
1213
+ } & {
1214
+ default: boolean;
1215
+ };
1216
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1217
+ default: boolean;
1218
+ } & {
1219
+ default: boolean;
1220
+ };
1221
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
1222
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
1223
+ value: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1224
+ modelValue: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1225
+ }, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
1226
+ input: (arg: boolean) => void;
1227
+ "update:modelValue": (arg: boolean) => void;
1228
+ }, string, Readonly<ExtractPropTypes< {
1229
+ questionnaireTarget: VueTypeValidableDef<Questionnaire, ValidatorFunction<Questionnaire>> & {
1230
+ required: true;
1231
+ };
1232
+ checkDefaultBadwordEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1233
+ default: boolean;
1234
+ } & {
1235
+ default: boolean;
1236
+ };
1237
+ autoPublishScheduleEnabled: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1238
+ default: boolean;
1239
+ } & {
1240
+ default: boolean;
1241
+ };
1242
+ visibleQuestionTypes: VueTypeValidableDef<QuestionItemTypeValue[], ValidatorFunction<QuestionItemTypeValue[]>> & {
1243
+ default: () => QuestionItemTypeValue[];
1244
+ };
1245
+ allowTypeSwitch: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1246
+ default: boolean;
1247
+ } & {
1248
+ default: boolean;
1249
+ };
1250
+ allowQuestionValidation: VueTypeValidableDef<boolean, ValidatorFunction<boolean>> & {
1251
+ default: boolean;
1252
+ } & {
1253
+ default: boolean;
1254
+ };
1255
+ sceneConfig: VueTypeValidableDef<QuestionnaireLaunchSceneConfig, ValidatorFunction<QuestionnaireLaunchSceneConfig>>;
1256
+ featureConfig: VueTypeValidableDef<QuestionnaireLaunchFeatureConfig, ValidatorFunction<QuestionnaireLaunchFeatureConfig>>;
1257
+ value: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1258
+ modelValue: VueTypeValidableDef<boolean | undefined, ValidatorFunction<boolean | undefined>>;
1259
+ }>>, {
1260
+ checkDefaultBadwordEnabled: boolean;
1261
+ autoPublishScheduleEnabled: boolean;
1262
+ visibleQuestionTypes: QuestionItemTypeValue[];
1263
+ allowTypeSwitch: boolean;
1264
+ allowQuestionValidation: boolean;
1265
+ }>;
1266
+
1267
+ declare enum QuestionnaireType {
1268
+ Survey = "survey",
1269
+ Exam = "exam",
1270
+ Lottery = "lottery"
1271
+ }
1272
+
1273
+ declare type QuestionnaireTypeValue = 'survey' | 'exam' | 'lottery';
1274
+
1275
+ declare interface QuestionOption {
1276
+ id: string;
1277
+ content: string;
1278
+ tips?: string;
1279
+ isRight?: boolean;
1280
+ image?: string;
1281
+ answerCount?: number;
1282
+ answerPercent?: number;
1283
+ }
1284
+
1285
+ export declare const resolveLegacyQuestionnaireLaunchSceneConfig: (options: LegacyQuestionnaireLaunchSceneConfigOptions) => QuestionnaireLaunchSceneConfig;
1286
+
1287
+ export declare const shouldUseInitialQuestionnaireDraft: (questionnaireId: string | undefined, initialQuestionnaire: QuestionnaireLaunchData | undefined) => boolean;
1288
+
1289
+ declare const useI18n: () => {
1290
+ $t: (key: NestedKeys< {
1291
+ questionnaireLaunch: {
1292
+ panel: {
1293
+ title: string;
1294
+ backToList: string;
1295
+ };
1296
+ entry: {
1297
+ eyebrow: string;
1298
+ title: string;
1299
+ popupTitle: string;
1300
+ surveyPopupTitle: string;
1301
+ examPopupTitle: string;
1302
+ lotteryQuestionnairePopupTitle: string;
1303
+ redpacketQuestionnairePopupTitle: string;
1304
+ desc: string;
1305
+ surveyTab: string;
1306
+ examTab: string;
1307
+ import: string;
1308
+ add: string;
1309
+ more: string;
1310
+ statusSaved: string;
1311
+ statusPublished: string;
1312
+ statusFinished: string;
1313
+ submittedLabel: string;
1314
+ fillCount: string;
1315
+ fillUnit: string;
1316
+ publishModeManualShort: string;
1317
+ publishModeAutoShort: string;
1318
+ downloadTemplate: string;
1319
+ createQuestionnaire: string;
1320
+ addExamPaper: string;
1321
+ platformQuestionnaire: string;
1322
+ importQuestionnaire: string;
1323
+ importExamPaper: string;
1324
+ platformQuestionnaireTitle: string;
1325
+ platformQuestionnaireSearch: string;
1326
+ platformQuestionnaireRefresh: string;
1327
+ platformQuestionnaireNameColumn: string;
1328
+ platformQuestionnaireQuestionCountColumn: string;
1329
+ platformQuestionnaireCreatedAtColumn: string;
1330
+ platformQuestionnaireCreatorColumn: string;
1331
+ platformQuestionnaireConfirm: string;
1332
+ platformQuestionnairePreview: string;
1333
+ platformQuestionnairePreviewTitle: string;
1334
+ platformQuestionnairePreviewEmpty: string;
1335
+ platformQuestionnaireQuestionCount: string;
1336
+ platformQuestionnairePreviewQuestionMeta: string;
1337
+ platformQuestionnaireFetchFailed: string;
1338
+ platformQuestionnaireAddSuccess: string;
1339
+ platformQuestionnaireAddFailed: string;
1340
+ unknownQuestionType: string;
1341
+ importTemplateSupport: string;
1342
+ importTemplateNoticeTitle: string;
1343
+ importTemplateNoticeDownload: string;
1344
+ importTemplateNoticeUpload: string;
1345
+ createSurvey: string;
1346
+ createExam: string;
1347
+ createExamPaper: string;
1348
+ createLotteryQuestionnaire: string;
1349
+ createRedpacketQuestionnaire: string;
1350
+ emptySurveyTitle: string;
1351
+ emptyExamTitle: string;
1352
+ emptyExamSceneTitle: string;
1353
+ emptyExamSceneDesc: string;
1354
+ emptySurveyDesc: string;
1355
+ emptyDesc: string;
1356
+ };
1357
+ list: {
1358
+ title: string;
1359
+ subtitle: string;
1360
+ empty: string;
1361
+ emptyDesc: string;
1362
+ loading: string;
1363
+ refresh: string;
1364
+ create: string;
1365
+ createSurvey: string;
1366
+ createExam: string;
1367
+ surveyTab: string;
1368
+ examTab: string;
1369
+ edit: string;
1370
+ editDisabledTip: string;
1371
+ preview: string;
1372
+ previewExamPaper: string;
1373
+ statistics: string;
1374
+ start: string;
1375
+ republish: string;
1376
+ stop: string;
1377
+ delete: string;
1378
+ sendResult: string;
1379
+ sendRank: string;
1380
+ download: string;
1381
+ submitted: string;
1382
+ questionCount: string;
1383
+ questionnaireName: string;
1384
+ questionCountShort: string;
1385
+ publishModeShort: string;
1386
+ submittedShort: string;
1387
+ createdAt: string;
1388
+ creator: string;
1389
+ operation: string;
1390
+ statusTitle: string;
1391
+ updatedAt: string;
1392
+ copy: string;
1393
+ questionnaireInfo: string;
1394
+ schedule: string;
1395
+ manualPublishInfo: string;
1396
+ autoPublishInfo: string;
1397
+ autoPublishCountdown: string;
1398
+ autoEndCountdown: string;
1399
+ select: string;
1400
+ selected: string;
1401
+ backList: string;
1402
+ filterAll: string;
1403
+ searchPlaceholder: string;
1404
+ sortPlaceholder: string;
1405
+ sortByCreatedAt: string;
1406
+ autoStartConfirmTitle: string;
1407
+ autoStartConfirmDesc: string;
1408
+ autoEditConfirmTitle: string;
1409
+ autoEditConfirmDesc: string;
1410
+ deleteConfirmTitle: string;
1411
+ deleteConfirmDesc: string;
1412
+ };
1413
+ editor: {
1414
+ createTitle: string;
1415
+ editTitle: string;
1416
+ name: string;
1417
+ desc: string;
1418
+ timeLimit: string;
1419
+ privacyRequired: string;
1420
+ privacyContent: string;
1421
+ save: string;
1422
+ saveAndStart: string;
1423
+ cancel: string;
1424
+ questions: string;
1425
+ addQuestion: string;
1426
+ validationName: string;
1427
+ validationQuestions: string;
1428
+ validationQuestion: string;
1429
+ publishMode: string;
1430
+ publishModeManual: string;
1431
+ publishModeAuto: string;
1432
+ autoPublishTime: string;
1433
+ autoEndTime: string;
1434
+ countdownDay: string;
1435
+ countdownHour: string;
1436
+ countdownMinute: string;
1437
+ countdownSecond: string;
1438
+ scoreLabelsEnabled: string;
1439
+ scoreLabelsTitle: string;
1440
+ addScoreLabel: string;
1441
+ scoreLabelLeft: string;
1442
+ scoreLabelRight: string;
1443
+ scoreLabelName: string;
1444
+ scoreLabelRemark: string;
1445
+ validationAutoPublishTime: string;
1446
+ validationAutoEndTime: string;
1447
+ validationAutoPublishTimeMin: string;
1448
+ validationAutoTimeRange: string;
1449
+ publishModeAutoHint: string;
1450
+ validationScoreLabels: string;
1451
+ validationScoreLabelName: string;
1452
+ validationScoreLabelRange: string;
1453
+ validationScoreLabelOverlap: string;
1454
+ validationNameLength: string;
1455
+ validationDescLength: string;
1456
+ namePlaceholder: string;
1457
+ examNamePlaceholder: string;
1458
+ descPlaceholder: string;
1459
+ datePickerPlaceholder: string;
1460
+ publishModeTitle: string;
1461
+ publishModeHint: string;
1462
+ commonTitle: string;
1463
+ commonPrivacy: string;
1464
+ commonPrivacyEnabled: string;
1465
+ commonPrivacyDefault: string;
1466
+ commonName: string;
1467
+ commonTutorComment: string;
1468
+ commonOtherSuggestion: string;
1469
+ questionTypeTitle: string;
1470
+ privacyPlaceholder: string;
1471
+ privacyDialogTitle: string;
1472
+ privacyDialogTip: string;
1473
+ validationPrivacyContent: string;
1474
+ leaveConfirmTitle: string;
1475
+ leaveConfirmDesc: string;
1476
+ leaveConfirmStay: string;
1477
+ leaveConfirmSubmit: string;
1478
+ questionField: string;
1479
+ validationSensitiveWords: string;
1480
+ validationSensitiveCheckFailed: string;
1481
+ confirm: string;
1482
+ };
1483
+ question: {
1484
+ title: string;
1485
+ desc: string;
1486
+ required: string;
1487
+ scoreEnabled: string;
1488
+ score: string;
1489
+ type: string;
1490
+ answer: string;
1491
+ options: string;
1492
+ addOption: string;
1493
+ removeQuestion: string;
1494
+ minChoose: string;
1495
+ maxChoose: string;
1496
+ maxOptionsReached: string;
1497
+ selectOption: string;
1498
+ selectPlaceholder: string;
1499
+ blankAnswer: string;
1500
+ correct: string;
1501
+ incorrect: string;
1502
+ defaultFillTitle: string;
1503
+ types: {
1504
+ R: string;
1505
+ C: string;
1506
+ Q: string;
1507
+ J: string;
1508
+ X: string;
1509
+ S: string;
1510
+ T: string;
1511
+ V: string;
1512
+ };
1513
+ titlePlaceholder: string;
1514
+ descPlaceholder: string;
1515
+ optionPlaceholder: string;
1516
+ scorePlaceholder: string;
1517
+ scoreUnit: string;
1518
+ tips: {
1519
+ missingTitle: string;
1520
+ missingOptions: string;
1521
+ missingTitleAndOptions: string;
1522
+ titleTooLong: string;
1523
+ descTooLong: string;
1524
+ optionTooLong: string;
1525
+ missingBlank: string;
1526
+ missingAnswer: string;
1527
+ missingScore: string;
1528
+ };
1529
+ addBlank: string;
1530
+ answerPlaceholder: string;
1531
+ moveUp: string;
1532
+ moveDown: string;
1533
+ };
1534
+ preview: {
1535
+ title: string;
1536
+ empty: string;
1537
+ questionCount: string;
1538
+ totalScore: string;
1539
+ back: string;
1540
+ confirm: string;
1541
+ };
1542
+ statistics: {
1543
+ title: string;
1544
+ resultTab: string;
1545
+ rankTab: string;
1546
+ total: string;
1547
+ correctCount: string;
1548
+ totalScore: string;
1549
+ back: string;
1550
+ answered: string;
1551
+ copies: string;
1552
+ option: string;
1553
+ optionCount: string;
1554
+ optionPercent: string;
1555
+ correct: string;
1556
+ noAnswer: string;
1557
+ questionResultTip: string;
1558
+ createdAtText: string;
1559
+ totalSubmittedSummary: string;
1560
+ sendResultEmpty: string;
1561
+ sendResultRepeated: string;
1562
+ sendResultSuccess: string;
1563
+ sendRank: string;
1564
+ sendRankSuccess: string;
1565
+ sendRankPending: string;
1566
+ rankEmpty: string;
1567
+ rank: string;
1568
+ nickname: string;
1569
+ score: string;
1570
+ costTime: string;
1571
+ downloadData: string;
1572
+ empty: string;
1573
+ emptyTitle: string;
1574
+ };
1575
+ status: {
1576
+ saved: string;
1577
+ published: string;
1578
+ forbidden: string;
1579
+ };
1580
+ };
1581
+ } & {
1582
+ common: {
1583
+ "confirm": "\u786E\u8BA4";
1584
+ "cancel": "\u53D6\u6D88";
1585
+ "close": "\u5173\u95ED";
1586
+ "submit": "\u63D0\u4EA4";
1587
+ "delete": "\u5220\u9664";
1588
+ "clear": "\u6E05\u7A7A";
1589
+ "submitSuccess": "\u63D0\u4EA4\u6210\u529F";
1590
+ "known": "\u6211\u77E5\u9053\u4E86";
1591
+ "copySuccess": "\u590D\u5236\u6210\u529F";
1592
+ "copyLinkSuccess": "\u94FE\u63A5\u590D\u5236\u6210\u529F\uFF0C\u53EF\u53BB\u6D4F\u89C8\u5668\u7C98\u8D34\u4E0B\u8F7D";
1593
+ "tips": "\u63D0\u793A";
1594
+ "success": "\u6210\u529F";
1595
+ "empty": "\u6682\u65E0\u5185\u5BB9";
1596
+ "comma": "\uFF0C";
1597
+ };
1598
+ }>, options?: UniversalParams<string | number>) => string;
1599
+ currentLang: ComputedRef<I18nLangs>;
1600
+ isZhCN: ComputedRef<boolean>;
1601
+ };
1602
+
1603
+ export declare const useQuestionnaireLaunch: () => {
1604
+ currentStep: Ref<QuestionnaireLaunchStep>;
1605
+ currentQuestionnaireId: Ref<string>;
1606
+ currentQuestionnaireType: Ref<QuestionnaireTypeValue>;
1607
+ previewQuestionnaire: Ref<QuestionnaireLaunchData | undefined>;
1608
+ openList: () => void;
1609
+ openCreate: (questionnaireType: QuestionnaireTypeValue) => void;
1610
+ openEdit: (questionnaireId: string, questionnaireType?: QuestionnaireTypeValue) => void;
1611
+ openPreview: (questionnaire: QuestionnaireLaunchData) => void;
1612
+ openStatistics: (questionnaireId: string, questionnaireType?: QuestionnaireTypeValue) => void;
1613
+ };
1614
+
1615
+ export declare const useQuestionnaireLaunchEditor: (questionnaireTarget: Questionnaire | (() => Questionnaire)) => {
1616
+ loading: Ref<boolean>;
1617
+ saving: Ref<boolean>;
1618
+ editingQuestionnaire: Ref< {
1619
+ questionnaireId: string;
1620
+ name: string;
1621
+ desc: string;
1622
+ questionnaireType: QuestionnaireTypeValue;
1623
+ questions: {
1624
+ score: number | "";
1625
+ answer: QuestionAnswerType | undefined;
1626
+ fillQuestionData?: {
1627
+ blankCount: number;
1628
+ partList: {
1629
+ isBlank: boolean;
1630
+ blankIndex: number;
1631
+ text: string;
1632
+ }[];
1633
+ } | undefined;
1634
+ scoreExt?: (Record<string, number> | null) | undefined;
1635
+ type: QuestionItemTypeValue;
1636
+ title: string;
1637
+ required?: boolean | undefined;
1638
+ questionId: string;
1639
+ desc?: string | undefined;
1640
+ scoreEnabled?: boolean | undefined;
1641
+ options: {
1642
+ id: string;
1643
+ content: string;
1644
+ tips?: string | undefined;
1645
+ isRight?: boolean | undefined;
1646
+ image?: string | undefined;
1647
+ answerCount?: number | undefined;
1648
+ answerPercent?: number | undefined;
1649
+ }[];
1650
+ maxChooseOptions?: number | undefined;
1651
+ minChooseOptions?: number | undefined;
1652
+ answerCount?: number | undefined;
1653
+ }[];
1654
+ timeLimit: number | "";
1655
+ privacy: {
1656
+ content: string;
1657
+ required: YN;
1658
+ };
1659
+ ossEnabled: YN;
1660
+ ossUrl?: string | undefined;
1661
+ createdTime?: number | undefined;
1662
+ status?: QuestionnaireLaunchStatusValue | undefined;
1663
+ publishType?: QuestionnairePublishTypeValue | undefined;
1664
+ autoPublishTime?: string | undefined;
1665
+ autoEndTime?: string | undefined;
1666
+ countDownPublishTime?: number | undefined;
1667
+ scoreLabelEnabled?: YN | undefined;
1668
+ questionnaireScoreLabels?: {
1669
+ questionnaireId?: string | undefined;
1670
+ scoreLabel: string;
1671
+ labelRemark: string;
1672
+ leftScore: number;
1673
+ rightScore: number;
1674
+ }[] | undefined;
1675
+ statistics?: {
1676
+ total: number;
1677
+ questions: {
1678
+ questionId: string;
1679
+ questionName: string;
1680
+ desc?: string | undefined;
1681
+ options: number[];
1682
+ answerList?: {
1683
+ userId: string;
1684
+ nick: string;
1685
+ avatar?: string | undefined;
1686
+ answer: string;
1687
+ score?: number | undefined;
1688
+ }[] | undefined;
1689
+ total: number;
1690
+ correctCount?: number | undefined;
1691
+ score?: number | null | undefined;
1692
+ totalScore?: number | undefined;
1693
+ }[];
1694
+ } | undefined;
1695
+ }>;
1696
+ loadQuestionnaire: (questionnaireId?: string) => Promise<void>;
1697
+ saveQuestionnaire: (nextQuestionnaire?: QuestionnaireLaunchData) => Promise<{
1698
+ questionnaireId: string;
1699
+ }>;
1700
+ };
1701
+
1702
+ /**
1703
+ * 负责编辑中的问卷加载、保存、敏感词校验与发布配置收敛。
1704
+ */
1705
+ export declare const useQuestionnaireLaunchEditorController: (source: () => ControllerSource, options: ControllerOptions) => {
1706
+ mode: ComputedRef<"create" | "edit">;
1707
+ loading: Ref<boolean>;
1708
+ saving: Ref<boolean>;
1709
+ editingQuestionnaire: Ref< {
1710
+ questionnaireId: string;
1711
+ name: string;
1712
+ desc: string;
1713
+ questionnaireType: QuestionnaireTypeValue;
1714
+ questions: {
1715
+ score: number | "";
1716
+ answer: QuestionAnswerType | undefined;
1717
+ fillQuestionData?: {
1718
+ blankCount: number;
1719
+ partList: {
1720
+ isBlank: boolean;
1721
+ blankIndex: number;
1722
+ text: string;
1723
+ }[];
1724
+ } | undefined;
1725
+ scoreExt?: (Record<string, number> | null) | undefined;
1726
+ type: QuestionItemTypeValue;
1727
+ title: string;
1728
+ required?: boolean | undefined;
1729
+ questionId: string;
1730
+ desc?: string | undefined;
1731
+ scoreEnabled?: boolean | undefined;
1732
+ options: {
1733
+ id: string;
1734
+ content: string;
1735
+ tips?: string | undefined;
1736
+ isRight?: boolean | undefined;
1737
+ image?: string | undefined;
1738
+ answerCount?: number | undefined;
1739
+ answerPercent?: number | undefined;
1740
+ }[];
1741
+ maxChooseOptions?: number | undefined;
1742
+ minChooseOptions?: number | undefined;
1743
+ answerCount?: number | undefined;
1744
+ }[];
1745
+ timeLimit: number | "";
1746
+ privacy: {
1747
+ content: string;
1748
+ required: YN;
1749
+ };
1750
+ ossEnabled: YN;
1751
+ ossUrl?: string | undefined;
1752
+ createdTime?: number | undefined;
1753
+ status?: QuestionnaireLaunchStatusValue | undefined;
1754
+ publishType?: QuestionnairePublishTypeValue | undefined;
1755
+ autoPublishTime?: string | undefined;
1756
+ autoEndTime?: string | undefined;
1757
+ countDownPublishTime?: number | undefined;
1758
+ scoreLabelEnabled?: YN | undefined;
1759
+ questionnaireScoreLabels?: {
1760
+ questionnaireId?: string | undefined;
1761
+ scoreLabel: string;
1762
+ labelRemark: string;
1763
+ leftScore: number;
1764
+ rightScore: number;
1765
+ }[] | undefined;
1766
+ statistics?: {
1767
+ total: number;
1768
+ questions: {
1769
+ questionId: string;
1770
+ questionName: string;
1771
+ desc?: string | undefined;
1772
+ options: number[];
1773
+ answerList?: {
1774
+ userId: string;
1775
+ nick: string;
1776
+ avatar?: string | undefined;
1777
+ answer: string;
1778
+ score?: number | undefined;
1779
+ }[] | undefined;
1780
+ total: number;
1781
+ correctCount?: number | undefined;
1782
+ score?: number | null | undefined;
1783
+ totalScore?: number | undefined;
1784
+ }[];
1785
+ } | undefined;
1786
+ }>;
1787
+ validationMessage: Ref<string>;
1788
+ questionValidationVersion: Ref<number>;
1789
+ hasUnsavedChanges: ComputedRef<boolean>;
1790
+ topSensitiveTips: Ref< {
1791
+ title: string;
1792
+ description: string;
1793
+ privacy: string;
1794
+ }>;
1795
+ questionSensitiveTips: Ref<Record<string, {
1796
+ title?: string;
1797
+ desc?: string;
1798
+ options?: Record<string, string>;
1799
+ }>>;
1800
+ loadQuestionnaire: (questionnaireId?: string) => Promise<void>;
1801
+ saveQuestionnaire: () => Promise<{
1802
+ questionnaireId: string;
1803
+ } | undefined>;
1804
+ validateDraft: () => boolean;
1805
+ validateDraftBeforeSubmit: () => Promise<boolean>;
1806
+ handleTopFieldBlur: (field: "title" | "description", value: string) => Promise<boolean>;
1807
+ handleQuestionFieldBlur: (payload: {
1808
+ questionId: string;
1809
+ field: "title" | "desc" | "option";
1810
+ value: string;
1811
+ optionId?: string;
1812
+ optionIndex?: number;
1813
+ }) => Promise<boolean>;
1814
+ appendCommonQuestion: (key: "name" | "tutor-comment" | "other-suggestion") => {
1815
+ readonly type: import("../../constants/questionnaire").QuestionItemType.Question;
1816
+ readonly title: string;
1817
+ } | {
1818
+ readonly type: import("../../constants/questionnaire").QuestionItemType.Star;
1819
+ readonly title: string;
1820
+ } | {
1821
+ readonly type: import("../../constants/questionnaire").QuestionItemType.Question;
1822
+ readonly title: string;
1823
+ };
1824
+ getEditingQuestionnaire: () => QuestionnaireLaunchData;
1825
+ markQuestionnaireSaved: (value?: {
1826
+ questionnaireId: string;
1827
+ name: string;
1828
+ desc: string;
1829
+ questionnaireType: QuestionnaireTypeValue;
1830
+ questions: {
1831
+ score: number | "";
1832
+ answer: QuestionAnswerType | undefined;
1833
+ fillQuestionData?: {
1834
+ blankCount: number;
1835
+ partList: {
1836
+ isBlank: boolean;
1837
+ blankIndex: number;
1838
+ text: string;
1839
+ }[];
1840
+ } | undefined;
1841
+ scoreExt?: (Record<string, number> | null) | undefined;
1842
+ type: QuestionItemTypeValue;
1843
+ title: string;
1844
+ required?: boolean | undefined;
1845
+ questionId: string;
1846
+ desc?: string | undefined;
1847
+ scoreEnabled?: boolean | undefined;
1848
+ options: {
1849
+ id: string;
1850
+ content: string;
1851
+ tips?: string | undefined;
1852
+ isRight?: boolean | undefined;
1853
+ image?: string | undefined;
1854
+ answerCount?: number | undefined;
1855
+ answerPercent?: number | undefined;
1856
+ }[];
1857
+ maxChooseOptions?: number | undefined;
1858
+ minChooseOptions?: number | undefined;
1859
+ answerCount?: number | undefined;
1860
+ }[];
1861
+ timeLimit: number | "";
1862
+ privacy: {
1863
+ content: string;
1864
+ required: YN;
1865
+ };
1866
+ ossEnabled: YN;
1867
+ ossUrl?: string | undefined;
1868
+ createdTime?: number | undefined;
1869
+ status?: QuestionnaireLaunchStatusValue | undefined;
1870
+ publishType?: QuestionnairePublishTypeValue | undefined;
1871
+ autoPublishTime?: string | undefined;
1872
+ autoEndTime?: string | undefined;
1873
+ countDownPublishTime?: number | undefined;
1874
+ scoreLabelEnabled?: YN | undefined;
1875
+ questionnaireScoreLabels?: {
1876
+ questionnaireId?: string | undefined;
1877
+ scoreLabel: string;
1878
+ labelRemark: string;
1879
+ leftScore: number;
1880
+ rightScore: number;
1881
+ }[] | undefined;
1882
+ statistics?: {
1883
+ total: number;
1884
+ questions: {
1885
+ questionId: string;
1886
+ questionName: string;
1887
+ desc?: string | undefined;
1888
+ options: number[];
1889
+ answerList?: {
1890
+ userId: string;
1891
+ nick: string;
1892
+ avatar?: string | undefined;
1893
+ answer: string;
1894
+ score?: number | undefined;
1895
+ }[] | undefined;
1896
+ total: number;
1897
+ correctCount?: number | undefined;
1898
+ score?: number | null | undefined;
1899
+ totalScore?: number | undefined;
1900
+ }[];
1901
+ } | undefined;
1902
+ }) => void;
1903
+ clearValidationMessage: () => void;
1904
+ dispose: () => Promise<void>;
1905
+ };
1906
+
1907
+ /**
1908
+ * 管理问卷发起列表的当前标签、列表数据和刷新逻辑。
1909
+ */
1910
+ export declare const useQuestionnaireLaunchList: (services: QuestionnaireLaunchServices, initialType?: QuestionnaireTypeValue) => {
1911
+ loading: Ref<boolean>;
1912
+ loadingMore: Ref<boolean>;
1913
+ questionnaireList: Ref< {
1914
+ questionnaireId: string;
1915
+ name: string;
1916
+ status: QuestionnaireLaunchStatusValue;
1917
+ questionnaireType: QuestionnaireTypeValue;
1918
+ publishType?: QuestionnairePublishTypeValue | undefined;
1919
+ createdTime: number;
1920
+ lastModified?: number | undefined;
1921
+ countDownEndTime?: number | undefined;
1922
+ countDownPublishTime?: number | undefined;
1923
+ questionCount?: number | undefined;
1924
+ creatorId?: string | undefined;
1925
+ creatorName?: string | null | undefined;
1926
+ total?: number | undefined;
1927
+ privacy: {
1928
+ content: string;
1929
+ required: YN;
1930
+ };
1931
+ }[]>;
1932
+ currentType: Ref<QuestionnaireTypeValue>;
1933
+ initListType: () => Promise<void>;
1934
+ refreshList: () => Promise<{
1935
+ questionnaireId: string;
1936
+ name: string;
1937
+ status: QuestionnaireLaunchStatusValue;
1938
+ questionnaireType: QuestionnaireTypeValue;
1939
+ publishType?: QuestionnairePublishTypeValue | undefined;
1940
+ createdTime: number;
1941
+ lastModified?: number | undefined;
1942
+ countDownEndTime?: number | undefined;
1943
+ countDownPublishTime?: number | undefined;
1944
+ questionCount?: number | undefined;
1945
+ creatorId?: string | undefined;
1946
+ creatorName?: string | null | undefined;
1947
+ total?: number | undefined;
1948
+ privacy: {
1949
+ content: string;
1950
+ required: YN;
1951
+ };
1952
+ }[]>;
1953
+ loadMore: () => Promise<{
1954
+ questionnaireId: string;
1955
+ name: string;
1956
+ status: QuestionnaireLaunchStatusValue;
1957
+ questionnaireType: QuestionnaireTypeValue;
1958
+ publishType?: QuestionnairePublishTypeValue | undefined;
1959
+ createdTime: number;
1960
+ lastModified?: number | undefined;
1961
+ countDownEndTime?: number | undefined;
1962
+ countDownPublishTime?: number | undefined;
1963
+ questionCount?: number | undefined;
1964
+ creatorId?: string | undefined;
1965
+ creatorName?: string | null | undefined;
1966
+ total?: number | undefined;
1967
+ privacy: {
1968
+ content: string;
1969
+ required: YN;
1970
+ };
1971
+ }[]>;
1972
+ hideQuestionnaire: (questionnaireId: string) => void;
1973
+ incrementQuestionnaireTotal: (questionnaireId: string) => void;
1974
+ hasMore: () => boolean;
1975
+ };
1976
+
1977
+ export { }