|
|
@@ -766,618 +766,6 @@ async function goToNextQuestion() {
|
|
766
|
766
|
|
|
767
|
767
|
// 初始化当前题目显示状态
|
|
768
|
768
|
updateCurrentAnswerDisplay()
|
|
769
|
|
-
|
|
770
|
|
-// #################
|
|
771
|
|
-
|
|
772
|
|
-// const message = useMessage()
|
|
773
|
|
-// const show = ref(false)
|
|
774
|
|
-// function handleClose() {
|
|
775
|
|
-// console.log('关闭弹窗')
|
|
776
|
|
-// // show.value = false
|
|
777
|
|
-// }
|
|
778
|
|
-
|
|
779
|
|
-// // 30分钟定时器
|
|
780
|
|
-// const remainingTime = ref(30 * 60)
|
|
781
|
|
-// const timer = ref(null)
|
|
782
|
|
-
|
|
783
|
|
-// // 格式化时间为 HH:MM:SS 格式
|
|
784
|
|
-// function formatTime(seconds) {
|
|
785
|
|
-// const hours = Math.floor(seconds / 3600)
|
|
786
|
|
-// const minutes = Math.floor((seconds % 3600) / 60)
|
|
787
|
|
-// const secs = seconds % 60
|
|
788
|
|
-// return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`
|
|
789
|
|
-// }
|
|
790
|
|
-
|
|
791
|
|
-// // 开始定时器
|
|
792
|
|
-// function startTimer() {
|
|
793
|
|
-// if (timer.value)
|
|
794
|
|
-// return
|
|
795
|
|
-
|
|
796
|
|
-// timer.value = setInterval(() => {
|
|
797
|
|
-// if (remainingTime.value > 0) {
|
|
798
|
|
-// remainingTime.value--
|
|
799
|
|
-// }
|
|
800
|
|
-// else {
|
|
801
|
|
-// clearInterval(timer.value)
|
|
802
|
|
-// timer.value = null
|
|
803
|
|
-// handleSubmit()
|
|
804
|
|
-// }
|
|
805
|
|
-// }, 1000)
|
|
806
|
|
-// }
|
|
807
|
|
-
|
|
808
|
|
-// // 停止定时器
|
|
809
|
|
-// function stopTimer() {
|
|
810
|
|
-// if (timer.value) {
|
|
811
|
|
-// clearInterval(timer.value)
|
|
812
|
|
-// timer.value = null
|
|
813
|
|
-// }
|
|
814
|
|
-// }
|
|
815
|
|
-
|
|
816
|
|
-// // 组件挂载时启动定时器
|
|
817
|
|
-// onMounted(() => {
|
|
818
|
|
-// startTimer()
|
|
819
|
|
-// })
|
|
820
|
|
-
|
|
821
|
|
-// // 组件卸载时清除定时器
|
|
822
|
|
-// onUnmounted(() => {
|
|
823
|
|
-// stopTimer()
|
|
824
|
|
-// })
|
|
825
|
|
-
|
|
826
|
|
-// const list = ref([
|
|
827
|
|
-// {
|
|
828
|
|
-// type: '第一题 单选题',
|
|
829
|
|
-// titlelist: [
|
|
830
|
|
-// {
|
|
831
|
|
-// title: '1.单选题第一题',
|
|
832
|
|
-// score: 1,
|
|
833
|
|
-// isimgs: oipimg,
|
|
834
|
|
-// options: [
|
|
835
|
|
-// {
|
|
836
|
|
-// label: 'A.答案1',
|
|
837
|
|
-// value: 'A',
|
|
838
|
|
-// },
|
|
839
|
|
-// {
|
|
840
|
|
-// label: 'B.答案2',
|
|
841
|
|
-// value: 'B',
|
|
842
|
|
-// },
|
|
843
|
|
-// {
|
|
844
|
|
-// label: 'C.答案3',
|
|
845
|
|
-// value: 'C',
|
|
846
|
|
-// },
|
|
847
|
|
-// {
|
|
848
|
|
-// label: 'D.答案4',
|
|
849
|
|
-// value: 'D',
|
|
850
|
|
-// },
|
|
851
|
|
-// ],
|
|
852
|
|
-// },
|
|
853
|
|
-// {
|
|
854
|
|
-// title: '2.单选题第二题',
|
|
855
|
|
-// score: 1,
|
|
856
|
|
-// isimgs: '',
|
|
857
|
|
-// options: [
|
|
858
|
|
-// {
|
|
859
|
|
-// label: 'A.答案1',
|
|
860
|
|
-// value: 'A',
|
|
861
|
|
-// },
|
|
862
|
|
-// {
|
|
863
|
|
-// label: 'B.答案2',
|
|
864
|
|
-// value: 'B',
|
|
865
|
|
-// },
|
|
866
|
|
-// {
|
|
867
|
|
-// label: 'C.答案3',
|
|
868
|
|
-// value: 'C',
|
|
869
|
|
-// },
|
|
870
|
|
-// {
|
|
871
|
|
-// label: 'D.答案4',
|
|
872
|
|
-// value: 'D',
|
|
873
|
|
-// },
|
|
874
|
|
-// ],
|
|
875
|
|
-// },
|
|
876
|
|
-// {
|
|
877
|
|
-// title: '3.单选题第三题',
|
|
878
|
|
-// score: 1,
|
|
879
|
|
-// isimgs: '',
|
|
880
|
|
-// options: [
|
|
881
|
|
-// {
|
|
882
|
|
-// label: 'A.答案1',
|
|
883
|
|
-// value: 'A',
|
|
884
|
|
-// },
|
|
885
|
|
-// {
|
|
886
|
|
-// label: 'B.答案2',
|
|
887
|
|
-// value: 'B',
|
|
888
|
|
-// },
|
|
889
|
|
-// {
|
|
890
|
|
-// label: 'C.答案3',
|
|
891
|
|
-// value: 'C',
|
|
892
|
|
-// },
|
|
893
|
|
-// {
|
|
894
|
|
-// label: 'D.答案4',
|
|
895
|
|
-// value: 'D',
|
|
896
|
|
-// },
|
|
897
|
|
-// ],
|
|
898
|
|
-// },
|
|
899
|
|
-// {
|
|
900
|
|
-// title: '4.单选题第四题',
|
|
901
|
|
-// score: 1,
|
|
902
|
|
-// isimgs: '',
|
|
903
|
|
-// options: [
|
|
904
|
|
-// {
|
|
905
|
|
-// label: 'A.答案1',
|
|
906
|
|
-// value: 'A',
|
|
907
|
|
-// },
|
|
908
|
|
-// {
|
|
909
|
|
-// label: 'B.答案2',
|
|
910
|
|
-// value: 'B',
|
|
911
|
|
-// },
|
|
912
|
|
-// {
|
|
913
|
|
-// label: 'C.答案3',
|
|
914
|
|
-// value: 'C',
|
|
915
|
|
-// },
|
|
916
|
|
-// {
|
|
917
|
|
-// label: 'D.答案4',
|
|
918
|
|
-// value: 'D',
|
|
919
|
|
-// },
|
|
920
|
|
-// ],
|
|
921
|
|
-// },
|
|
922
|
|
-// {
|
|
923
|
|
-// title: '5.单选题第五题',
|
|
924
|
|
-// score: 1,
|
|
925
|
|
-// isimgs: '',
|
|
926
|
|
-// options: [
|
|
927
|
|
-// {
|
|
928
|
|
-// label: 'A.答案1',
|
|
929
|
|
-// value: 'A',
|
|
930
|
|
-// },
|
|
931
|
|
-// {
|
|
932
|
|
-// label: 'B.答案2',
|
|
933
|
|
-// value: 'B',
|
|
934
|
|
-// },
|
|
935
|
|
-// {
|
|
936
|
|
-// label: 'C.答案3',
|
|
937
|
|
-// value: 'C',
|
|
938
|
|
-// },
|
|
939
|
|
-// {
|
|
940
|
|
-// label: 'D.答案4',
|
|
941
|
|
-// value: 'D',
|
|
942
|
|
-// },
|
|
943
|
|
-// ],
|
|
944
|
|
-// },
|
|
945
|
|
-// {
|
|
946
|
|
-// title: '6.单选题第六题',
|
|
947
|
|
-// score: 1,
|
|
948
|
|
-// isimgs: '',
|
|
949
|
|
-// options: [
|
|
950
|
|
-// {
|
|
951
|
|
-// label: 'A.答案1',
|
|
952
|
|
-// value: 'A',
|
|
953
|
|
-// },
|
|
954
|
|
-// {
|
|
955
|
|
-// label: 'B.答案2',
|
|
956
|
|
-// value: 'B',
|
|
957
|
|
-// },
|
|
958
|
|
-// {
|
|
959
|
|
-// label: 'C.答案3',
|
|
960
|
|
-// value: 'C',
|
|
961
|
|
-// },
|
|
962
|
|
-// {
|
|
963
|
|
-// label: 'D.答案4',
|
|
964
|
|
-// value: 'D',
|
|
965
|
|
-// },
|
|
966
|
|
-// ],
|
|
967
|
|
-// },
|
|
968
|
|
-// {
|
|
969
|
|
-// title: '7.单选题第七题',
|
|
970
|
|
-// score: 1,
|
|
971
|
|
-// isimgs: '',
|
|
972
|
|
-// options: [
|
|
973
|
|
-// {
|
|
974
|
|
-// label: 'A.答案1',
|
|
975
|
|
-// value: 'A',
|
|
976
|
|
-// },
|
|
977
|
|
-// {
|
|
978
|
|
-// label: 'B.答案2',
|
|
979
|
|
-// value: 'B',
|
|
980
|
|
-// },
|
|
981
|
|
-// {
|
|
982
|
|
-// label: 'C.答案3',
|
|
983
|
|
-// value: 'C',
|
|
984
|
|
-// },
|
|
985
|
|
-// {
|
|
986
|
|
-// label: 'D.答案4',
|
|
987
|
|
-// value: 'D',
|
|
988
|
|
-// },
|
|
989
|
|
-// ],
|
|
990
|
|
-// },
|
|
991
|
|
-// {
|
|
992
|
|
-// title: '8.单选题第八题',
|
|
993
|
|
-// score: 1,
|
|
994
|
|
-// isimgs: '',
|
|
995
|
|
-// options: [
|
|
996
|
|
-// {
|
|
997
|
|
-// label: 'A.答案1',
|
|
998
|
|
-// value: 'A',
|
|
999
|
|
-// },
|
|
1000
|
|
-// {
|
|
1001
|
|
-// label: 'B.答案2',
|
|
1002
|
|
-// value: 'B',
|
|
1003
|
|
-// },
|
|
1004
|
|
-// {
|
|
1005
|
|
-// label: 'C.答案3',
|
|
1006
|
|
-// value: 'C',
|
|
1007
|
|
-// },
|
|
1008
|
|
-// {
|
|
1009
|
|
-// label: 'D.答案4',
|
|
1010
|
|
-// value: 'D',
|
|
1011
|
|
-// },
|
|
1012
|
|
-// ],
|
|
1013
|
|
-// },
|
|
1014
|
|
-// {
|
|
1015
|
|
-// title: '9.单选题第九题',
|
|
1016
|
|
-// score: 1,
|
|
1017
|
|
-// isimgs: '',
|
|
1018
|
|
-// options: [
|
|
1019
|
|
-// {
|
|
1020
|
|
-// label: 'A.答案1',
|
|
1021
|
|
-// value: 'A',
|
|
1022
|
|
-// },
|
|
1023
|
|
-// {
|
|
1024
|
|
-// label: 'B.答案2',
|
|
1025
|
|
-// value: 'B',
|
|
1026
|
|
-// },
|
|
1027
|
|
-// {
|
|
1028
|
|
-// label: 'C.答案3',
|
|
1029
|
|
-// value: 'C',
|
|
1030
|
|
-// },
|
|
1031
|
|
-// {
|
|
1032
|
|
-// label: 'D.答案4',
|
|
1033
|
|
-// value: 'D',
|
|
1034
|
|
-// },
|
|
1035
|
|
-// ],
|
|
1036
|
|
-// },
|
|
1037
|
|
-// {
|
|
1038
|
|
-// title: '10.单选题第十题',
|
|
1039
|
|
-// score: 1,
|
|
1040
|
|
-// isimgs: '',
|
|
1041
|
|
-// options: [
|
|
1042
|
|
-// {
|
|
1043
|
|
-// label: 'A.答案1',
|
|
1044
|
|
-// value: 'A',
|
|
1045
|
|
-// },
|
|
1046
|
|
-// {
|
|
1047
|
|
-// label: 'B.答案2',
|
|
1048
|
|
-// value: 'B',
|
|
1049
|
|
-// },
|
|
1050
|
|
-// {
|
|
1051
|
|
-// label: 'C.答案3',
|
|
1052
|
|
-// value: 'C',
|
|
1053
|
|
-// },
|
|
1054
|
|
-// {
|
|
1055
|
|
-// label: 'D.答案4',
|
|
1056
|
|
-// value: 'D',
|
|
1057
|
|
-// },
|
|
1058
|
|
-// ],
|
|
1059
|
|
-// },
|
|
1060
|
|
-// ],
|
|
1061
|
|
-// },
|
|
1062
|
|
-// {
|
|
1063
|
|
-// type: '第二题 多选题',
|
|
1064
|
|
-// titlelist: [
|
|
1065
|
|
-// {
|
|
1066
|
|
-// title: '1.多选题第一题',
|
|
1067
|
|
-// score: 2,
|
|
1068
|
|
-// isimgs: '',
|
|
1069
|
|
-// options: [
|
|
1070
|
|
-// {
|
|
1071
|
|
-// label: 'A.答案1',
|
|
1072
|
|
-// value: 'A',
|
|
1073
|
|
-// },
|
|
1074
|
|
-// {
|
|
1075
|
|
-// label: 'B.答案2',
|
|
1076
|
|
-// value: 'B',
|
|
1077
|
|
-// },
|
|
1078
|
|
-// {
|
|
1079
|
|
-// label: 'C.答案3',
|
|
1080
|
|
-// value: 'C',
|
|
1081
|
|
-// },
|
|
1082
|
|
-// {
|
|
1083
|
|
-// label: 'D.答案4',
|
|
1084
|
|
-// value: 'D',
|
|
1085
|
|
-// },
|
|
1086
|
|
-// ],
|
|
1087
|
|
-// },
|
|
1088
|
|
-// {
|
|
1089
|
|
-// title: '2.多选题第二题',
|
|
1090
|
|
-// score: 2,
|
|
1091
|
|
-// isimgs: '',
|
|
1092
|
|
-// options: [
|
|
1093
|
|
-// {
|
|
1094
|
|
-// label: 'A.答案1',
|
|
1095
|
|
-// value: 'A',
|
|
1096
|
|
-// },
|
|
1097
|
|
-// {
|
|
1098
|
|
-// label: 'B.答案2',
|
|
1099
|
|
-// value: 'B',
|
|
1100
|
|
-// },
|
|
1101
|
|
-// {
|
|
1102
|
|
-// label: 'C.答案3',
|
|
1103
|
|
-// value: 'C',
|
|
1104
|
|
-// },
|
|
1105
|
|
-// {
|
|
1106
|
|
-// label: 'D.答案4',
|
|
1107
|
|
-// value: 'D',
|
|
1108
|
|
-// },
|
|
1109
|
|
-// ],
|
|
1110
|
|
-// },
|
|
1111
|
|
-// {
|
|
1112
|
|
-// title: '3.多选题第三题',
|
|
1113
|
|
-// score: 2,
|
|
1114
|
|
-// isimgs: 'https://img.yzcdn.cn/vant/exam.png',
|
|
1115
|
|
-// options: [
|
|
1116
|
|
-// {
|
|
1117
|
|
-// label: 'A.答案1',
|
|
1118
|
|
-// value: 'A',
|
|
1119
|
|
-// },
|
|
1120
|
|
-// {
|
|
1121
|
|
-// label: 'B.答案2',
|
|
1122
|
|
-// value: 'B',
|
|
1123
|
|
-// },
|
|
1124
|
|
-// {
|
|
1125
|
|
-// label: 'C.答案3',
|
|
1126
|
|
-// value: 'C',
|
|
1127
|
|
-// },
|
|
1128
|
|
-// ],
|
|
1129
|
|
-// },
|
|
1130
|
|
-// {
|
|
1131
|
|
-// title: '4.多选题第四题',
|
|
1132
|
|
-// score: 2,
|
|
1133
|
|
-// isimgs: '',
|
|
1134
|
|
-// options: [
|
|
1135
|
|
-// {
|
|
1136
|
|
-// label: 'A.答案1',
|
|
1137
|
|
-// value: 'A',
|
|
1138
|
|
-// },
|
|
1139
|
|
-// {
|
|
1140
|
|
-// label: 'B.答案2',
|
|
1141
|
|
-// value: 'B',
|
|
1142
|
|
-// },
|
|
1143
|
|
-// {
|
|
1144
|
|
-// label: 'C.答案3',
|
|
1145
|
|
-// value: 'C',
|
|
1146
|
|
-// },
|
|
1147
|
|
-// {
|
|
1148
|
|
-// label: 'D.答案4',
|
|
1149
|
|
-// value: 'D',
|
|
1150
|
|
-// },
|
|
1151
|
|
-// ],
|
|
1152
|
|
-// },
|
|
1153
|
|
-// {
|
|
1154
|
|
-// title: '5.多选题第五题',
|
|
1155
|
|
-// score: 2,
|
|
1156
|
|
-// isimgs: '',
|
|
1157
|
|
-// options: [
|
|
1158
|
|
-// {
|
|
1159
|
|
-// label: 'A.答案1',
|
|
1160
|
|
-// value: 'A',
|
|
1161
|
|
-// },
|
|
1162
|
|
-// {
|
|
1163
|
|
-// label: 'B.答案2',
|
|
1164
|
|
-// value: 'B',
|
|
1165
|
|
-// },
|
|
1166
|
|
-// {
|
|
1167
|
|
-// label: 'C.答案3',
|
|
1168
|
|
-// value: 'C',
|
|
1169
|
|
-// },
|
|
1170
|
|
-// {
|
|
1171
|
|
-// label: 'D.答案4',
|
|
1172
|
|
-// value: 'D',
|
|
1173
|
|
-// },
|
|
1174
|
|
-// ],
|
|
1175
|
|
-// },
|
|
1176
|
|
-// ],
|
|
1177
|
|
-// },
|
|
1178
|
|
-// {
|
|
1179
|
|
-// type: '第三题 判断题',
|
|
1180
|
|
-// titlelist: [
|
|
1181
|
|
-// {
|
|
1182
|
|
-// title: '1.判断题第一题',
|
|
1183
|
|
-// score: 1,
|
|
1184
|
|
-// isimgs: '',
|
|
1185
|
|
-// options: [
|
|
1186
|
|
-// {
|
|
1187
|
|
-// label: '正确',
|
|
1188
|
|
-// value: 'true',
|
|
1189
|
|
-// },
|
|
1190
|
|
-// {
|
|
1191
|
|
-// label: '错误',
|
|
1192
|
|
-// value: 'false',
|
|
1193
|
|
-// },
|
|
1194
|
|
-// ],
|
|
1195
|
|
-// },
|
|
1196
|
|
-// {
|
|
1197
|
|
-// title: '2.判断题第二题',
|
|
1198
|
|
-// score: 1,
|
|
1199
|
|
-// isimgs: '',
|
|
1200
|
|
-// options: [
|
|
1201
|
|
-// {
|
|
1202
|
|
-// label: '正确',
|
|
1203
|
|
-// value: 'true',
|
|
1204
|
|
-// },
|
|
1205
|
|
-// {
|
|
1206
|
|
-// label: '错误',
|
|
1207
|
|
-// value: 'false',
|
|
1208
|
|
-// },
|
|
1209
|
|
-// ],
|
|
1210
|
|
-// },
|
|
1211
|
|
-// {
|
|
1212
|
|
-// title: '3.判断题第三题',
|
|
1213
|
|
-// score: 1,
|
|
1214
|
|
-// isimgs: '',
|
|
1215
|
|
-// options: [
|
|
1216
|
|
-// {
|
|
1217
|
|
-// label: '正确',
|
|
1218
|
|
-// value: 'true',
|
|
1219
|
|
-// },
|
|
1220
|
|
-// {
|
|
1221
|
|
-// label: '错误',
|
|
1222
|
|
-// value: 'false',
|
|
1223
|
|
-// },
|
|
1224
|
|
-// ],
|
|
1225
|
|
-// },
|
|
1226
|
|
-// ],
|
|
1227
|
|
-// },
|
|
1228
|
|
-// {
|
|
1229
|
|
-// type: '第四题 填空题',
|
|
1230
|
|
-// titlelist: [
|
|
1231
|
|
-// {
|
|
1232
|
|
-// title: '1.填空题第一题',
|
|
1233
|
|
-// score: 2,
|
|
1234
|
|
-// isimgs: '',
|
|
1235
|
|
-// blanks: [
|
|
1236
|
|
-// {
|
|
1237
|
|
-// placeholder: '请输入答案',
|
|
1238
|
|
-// value: '',
|
|
1239
|
|
-// },
|
|
1240
|
|
-// ],
|
|
1241
|
|
-// },
|
|
1242
|
|
-// {
|
|
1243
|
|
-// title: '2.填空题第二题',
|
|
1244
|
|
-// score: 2,
|
|
1245
|
|
-// isimgs: '',
|
|
1246
|
|
-// blanks: [
|
|
1247
|
|
-// {
|
|
1248
|
|
-// placeholder: '请输入答案1',
|
|
1249
|
|
-// value: '',
|
|
1250
|
|
-// },
|
|
1251
|
|
-// {
|
|
1252
|
|
-// placeholder: '请输入答案2',
|
|
1253
|
|
-// value: '',
|
|
1254
|
|
-// },
|
|
1255
|
|
-// ],
|
|
1256
|
|
-// },
|
|
1257
|
|
-// ],
|
|
1258
|
|
-// },
|
|
1259
|
|
-// {
|
|
1260
|
|
-// type: '第五题 简答题',
|
|
1261
|
|
-// titlelist: [
|
|
1262
|
|
-// {
|
|
1263
|
|
-// title: '1.简答题第一题',
|
|
1264
|
|
-// score: 5,
|
|
1265
|
|
-// isimgs: '',
|
|
1266
|
|
-// answer: '',
|
|
1267
|
|
-// },
|
|
1268
|
|
-// {
|
|
1269
|
|
-// title: '2.简答题第二题',
|
|
1270
|
|
-// score: 5,
|
|
1271
|
|
-// isimgs: 'https://img.yzcdn.cn/vant/exam.png',
|
|
1272
|
|
-// answer: '',
|
|
1273
|
|
-// },
|
|
1274
|
|
-// ],
|
|
1275
|
|
-// },
|
|
1276
|
|
-// ])
|
|
1277
|
|
-// const activeIndex = ref(`${list.value[0].type}-0`)
|
|
1278
|
|
-// const currentTitle = computed(() => {
|
|
1279
|
|
-// const currentType = activeIndex.value.split('-')[0]
|
|
1280
|
|
-// const currentIndex = activeIndex.value.split('-')[1]
|
|
1281
|
|
-// const currentItem = list.value.find(item => item.type === currentType)
|
|
1282
|
|
-// return {
|
|
1283
|
|
-// MainTitle: currentItem.type,
|
|
1284
|
|
-// SubTitle: currentItem.titlelist[currentIndex],
|
|
1285
|
|
-// }
|
|
1286
|
|
-// })
|
|
1287
|
|
-// function handleActive(value, index) {
|
|
1288
|
|
-// activeIndex.value = `${value.type}-${index}`
|
|
1289
|
|
-// }
|
|
1290
|
|
-
|
|
1291
|
|
-// function isDone(item: any) {
|
|
1292
|
|
-// if (!item)
|
|
1293
|
|
-// return false
|
|
1294
|
|
-// // single choice / 判断题 may write selected value to `item.value`
|
|
1295
|
|
-// if (item.value !== undefined && item.value !== null && item.value !== '')
|
|
1296
|
|
-// return true
|
|
1297
|
|
-// // 简答题
|
|
1298
|
|
-// if (item.answer && item.answer !== '')
|
|
1299
|
|
-// return true
|
|
1300
|
|
-// // fallback for other naming
|
|
1301
|
|
-// if (item.userAnswer && item.userAnswer !== '')
|
|
1302
|
|
-// return true
|
|
1303
|
|
-// // 填空题 blanks
|
|
1304
|
|
-// if (item.blanks && Array.isArray(item.blanks)) {
|
|
1305
|
|
-// if (
|
|
1306
|
|
-// item.blanks.some((b: any) => b && b.value !== undefined && b.value !== '')
|
|
1307
|
|
-// )
|
|
1308
|
|
-// return true
|
|
1309
|
|
-// }
|
|
1310
|
|
-// // 多选题 / options may toggle option.value to boolean when bound incorrectly
|
|
1311
|
|
-// if (item.options && Array.isArray(item.options)) {
|
|
1312
|
|
-// if (
|
|
1313
|
|
-// item.options.some(
|
|
1314
|
|
-// (o: any) =>
|
|
1315
|
|
-// o
|
|
1316
|
|
-// && (o.checked === true
|
|
1317
|
|
-// || o.selected === true
|
|
1318
|
|
-// || (typeof o.value === 'boolean' && o.value === true)),
|
|
1319
|
|
-// )
|
|
1320
|
|
-// ) {
|
|
1321
|
|
-// return true
|
|
1322
|
|
-// }
|
|
1323
|
|
-// }
|
|
1324
|
|
-// return false
|
|
1325
|
|
-// }
|
|
1326
|
|
-
|
|
1327
|
|
-// const isFirstQuestion = computed(() => {
|
|
1328
|
|
-// const currentIndex = activeIndex.value.split('-')[1]
|
|
1329
|
|
-// return Number(currentIndex) === 0
|
|
1330
|
|
-// })
|
|
1331
|
|
-
|
|
1332
|
|
-// const isLastQuestion = computed(() => {
|
|
1333
|
|
-// const currentType = activeIndex.value.split('-')[0]
|
|
1334
|
|
-// const currentIndex = activeIndex.value.split('-')[1]
|
|
1335
|
|
-// const currentItem = list.value.find(item => item.type === currentType)
|
|
1336
|
|
-// return Number(currentIndex) === currentItem.titlelist.length - 1
|
|
1337
|
|
-// })
|
|
1338
|
|
-
|
|
1339
|
|
-// function handlePrev() {
|
|
1340
|
|
-// const currentType = activeIndex.value.split('-')[0]
|
|
1341
|
|
-// const currentIndex = activeIndex.value.split('-')[1]
|
|
1342
|
|
-// if (Number(currentIndex) > 0) {
|
|
1343
|
|
-// activeIndex.value = `${currentType}-${Number(currentIndex) - 1}`
|
|
1344
|
|
-// }
|
|
1345
|
|
-// }
|
|
1346
|
|
-
|
|
1347
|
|
-// function handleNext() {
|
|
1348
|
|
-// const currentType = activeIndex.value.split('-')[0]
|
|
1349
|
|
-// const currentIndex = activeIndex.value.split('-')[1]
|
|
1350
|
|
-// const currentItem = list.value.find(item => item.type === currentType)
|
|
1351
|
|
-// if (Number(currentIndex) < currentItem.titlelist.length - 1) {
|
|
1352
|
|
-// activeIndex.value = `${currentType}-${Number(currentIndex) + 1}`
|
|
1353
|
|
-// }
|
|
1354
|
|
-// }
|
|
1355
|
|
-// function handleSubmit() {
|
|
1356
|
|
-// message
|
|
1357
|
|
-// .confirm({
|
|
1358
|
|
-// msg: '交卷后将无法撤回操作,确认交卷?',
|
|
1359
|
|
-// title: '提示',
|
|
1360
|
|
-// cancelButtonProps: {
|
|
1361
|
|
-// type: 'default',
|
|
1362
|
|
-// customClass: 'cancel-button',
|
|
1363
|
|
-// },
|
|
1364
|
|
-// confirmButtonProps: {
|
|
1365
|
|
-// type: 'success',
|
|
1366
|
|
-// customClass: 'custom-shadow',
|
|
1367
|
|
-// },
|
|
1368
|
|
-// })
|
|
1369
|
|
-// .then(() => {
|
|
1370
|
|
-// uni.navigateTo({
|
|
1371
|
|
-// url: '/pages/knowledge/exam/examcontent/components/submit',
|
|
1372
|
|
-// })
|
|
1373
|
|
-// })
|
|
1374
|
|
-// .catch((error) => {
|
|
1375
|
|
-// console.log('点击了取消')
|
|
1376
|
|
-// })
|
|
1377
|
|
-// }
|
|
1378
|
|
-// function clickclose() {
|
|
1379
|
|
-// show.value = false
|
|
1380
|
|
-// }
|
|
1381
|
769
|
</script>
|
|
1382
|
770
|
|
|
1383
|
771
|
<template>
|