cthep-ui-vue3
Version:
Vue 3 试题组件库
1,240 lines (1,239 loc) • 476 kB
JavaScript
import { reactive as Ht, onMounted as bs, resolveComponent as Ot, createElementBlock as H, openBlock as V, createElementVNode as n, createCommentVNode as Ze, toDisplayString as ze, createVNode as ht, withCtx as Mt, Fragment as ft, renderList as pt, createBlock as Ct, normalizeClass as Kt, createTextVNode as Ge, normalizeStyle as Yt, ref as Ce, getCurrentInstance as _n, toRefs as fn, watch as os, unref as Zt, withDirectives as Ls, withModifiers as pn, vShow as Is, withKeys as hn, createStaticVNode as mn, resolveDirective as gn } from "vue";
import { Base64 as $s } from "js-base64";
import { fabric as vn } from "fabric";
import { VueDraggable as bn } from "vue-draggable-plus";
import { ElMessage as js } from "element-plus";
import { uuid as Os } from "vue-uuid";
import Ys from "fast-xml-parser";
import Us from "crypto-js";
function wn(k) {
for (var a = k.length, r, F; a > 0; )
r = Math.floor(Math.random() * a), F = k[a - 1], k[a - 1] = k[r], k[r] = F, a--;
return k;
}
function Rs(k) {
let a = JSON.parse(JSON.stringify(k)), r = a.indexOf("<img");
for (; r !== -1; ) {
let F = a.substring(r, a.indexOf(">", r + 1) + 1);
if (F.indexOf("mathTypeImage") !== -1) {
let A = F.indexOf('attribute="') + 11;
a = a.replace(
//将img替换成Base64转换后的值
F,
$s.decode(
F.substring(
A,
F.indexOf('"', A + 1)
)
)
);
}
r = a.indexOf("<img", r + 1);
}
return a = a.replace(/mml:/g, ""), a;
}
function Qs(k) {
return k.subjectEditorValue && (k.subjectEditorValue = Rs(k.subjectEditorValue)), k.explainEditorValue && (k.explainEditorValue = Rs(k.explainEditorValue)), k.answerEditorValue && (k.answerEditorValue = Rs(k.answerEditorValue)), ["dan_xuan", "duo_xuan", "pan_duan", "any_xuan", "tian_kong"].includes(k.questionTypeBase) && k.options.forEach((a) => {
a.optionTextValue && (a.optionTextValue = Rs(a.optionTextValue)), a.optionTipEditorValue && (a.optionTipEditorValue = Rs(a.optionTipEditorValue));
}), ["zong_he"].includes(k.questionTypeBase) && k.subQuestionList.forEach((a) => {
a = Qs(a);
}), k;
}
const Jt = (k, a) => {
const r = k.__vccOpts || k;
for (const [F, A] of a)
r[F] = A;
return r;
}, yn = { class: "singChoice" }, xn = { class: "tiBox" }, Sn = { class: "tiNumber" }, kn = { class: "tiContent" }, Tn = ["innerHTML"], Vn = ["innerHTML"], Mn = { key: 0 }, An = { class: "answerTips" }, Rn = {
key: 0,
class: "reAnswered",
"aria-hidden": "true"
}, Bn = {
key: 1,
class: "reTrue",
"aria-hidden": "true"
}, En = {
key: 2,
class: "reFalse",
"aria-hidden": "true"
}, Ln = { class: "reckT" }, $n = { class: "solution analysis" }, In = { class: "solution-item" }, Cn = { class: "solution-content" }, Pn = ["innerHTML"], Hn = { class: "solution-item" }, On = { class: "solution-content" }, Nn = { class: "score-value" }, jn = { class: "solution-item" }, Un = { class: "solution-content" }, Fn = { class: "score-value" }, qn = {
__name: "SingChoice",
props: {
modelValue: {
type: Object,
default: () => ({})
},
keys: {
type: Number,
default: 0
},
restore: {
type: Boolean,
default: !1
},
background: {
type: String,
default: "#fffad6"
},
isPreview: {
type: Boolean,
default: !0
}
},
emits: ["SingChoiceEmit"],
setup(k, { emit: a }) {
const r = k, F = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], A = Ht({
optionIndex: null,
isRight: null,
answer: null,
qAnswer: null
}), b = (L) => {
r.modelValue.options.forEach((x, ie) => {
(x.optionIndex == L || !x.optionIndex && ie == L - 1) && (A.isRight = x.isAnswer), x.isAnswer && (A.qAnswer = x.optionIndex);
}), r.modelValue.answers = Object.assign(r.modelValue.answers, {
id: r.modelValue.id,
questionUuid: r.modelValue.questionUuid,
getScore: A.isRight ? r.modelValue.answers.score - 0 : 0,
type: r.modelValue.questionTypeBase,
answer: F[L - 1],
isRight: A.isRight,
isAnswered: A.isRight != null ? "true" : "false"
});
};
return bs(() => {
}), (L, x) => {
const ie = Ot("el-radio"), ae = Ot("el-radio-group");
return V(), H("div", yn, [
n("section", xn, [
n("span", Sn, ze(r.modelValue.id) + ".", 1),
n("div", kn, [
n("div", {
class: "opImg tiganContent",
innerHTML: r.modelValue.subjectEditorValue
}, null, 8, Tn),
ht(ae, {
modelValue: r.modelValue.answers.optionIndex,
"onUpdate:modelValue": x[0] || (x[0] = (pe) => r.modelValue.answers.optionIndex = pe),
onChange: b,
class: "tiOption"
}, {
default: Mt(() => [
(V(!0), H(ft, null, pt(r.modelValue.options, (pe, we) => (V(), Ct(ie, {
key: we,
disabled: r.restore || r.isPreview,
value: pe.optionIndex ? pe.optionIndex : we + 1
}, {
default: Mt(() => [
n("span", {
style: { display: "flex", "align-items": "center" },
class: Kt(r.restore ? "isColor" : "")
}, [
Ge(ze(F[we]) + ". ", 1),
n("span", {
innerHTML: pe.optionTextValue
}, null, 8, Vn)
], 2)
]),
_: 2
}, 1032, ["disabled", "value"]))), 128))
]),
_: 1
}, 8, ["modelValue"])
]),
r.restore ? (V(), H("div", Mn, [
n("div", An, [
r.modelValue.answers.isAnswered ? r.modelValue.answers.isRight ? (V(), H("span", Bn, [...x[2] || (x[2] = [
n("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
width: "20",
height: "20"
}, [
n("path", {
fill: "none",
d: "M0 0h24v24H0z"
}),
n("path", {
d: "M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z",
fill: "rgba(0,182,0,1)"
})
], -1),
Ge("回答正确 ", -1)
])])) : r.modelValue.answers.isRight ? Ze("", !0) : (V(), H("span", En, [...x[3] || (x[3] = [
n("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
width: "20",
height: "20"
}, [
n("path", {
fill: "none",
d: "M0 0h24v24H0z"
}),
n("path", {
d: "M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z",
fill: "rgba(221,61,61,1)"
})
], -1),
Ge("回答错误 ", -1)
])])) : (V(), H("span", Rn, [...x[1] || (x[1] = [
n("b", { style: { color: "#ffffff", "padding-top": "5px", display: "inline-block" } }, "?", -1),
Ge("本题未答 ", -1)
])]))
]),
n("section", {
class: "reck",
style: Yt({ background: k.background })
}, [
n("span", null, [
x[4] || (x[4] = Ge(" 参考答案:", -1)),
n("span", Ln, ze(Array.isArray(r.modelValue.answers.qAnswer) ? r.modelValue.answers.qAnswer[0] : r.modelValue.answers.qAnswer), 1)
]),
n("span", null, [
x[5] || (x[5] = Ge("我的答案:", -1)),
n("span", {
class: Kt(["reckT", r.modelValue.answers.isRight == !0 ? "standardTrue" : r.modelValue.answers.isRight == !1 ? "standardFalse" : "standardHalfTrue"])
}, ze(r.modelValue.answers.answer[0]), 3)
])
], 4),
n("section", $n, [
n("div", In, [
x[6] || (x[6] = n("div", { class: "solution-label" }, "参考解析:", -1)),
n("div", Cn, [
n("div", {
class: "explanation-text",
innerHTML: r.modelValue.explainEditorValue
}, null, 8, Pn)
])
]),
n("div", Hn, [
x[7] || (x[7] = n("div", { class: "solution-label" }, "本题得分:", -1)),
n("div", On, [
n("span", Nn, ze(r.modelValue.answers.getScore) + "分", 1)
])
]),
n("div", jn, [
x[8] || (x[8] = n("div", { class: "solution-label" }, "本题满分:", -1)),
n("div", Un, [
n("span", Fn, ze(r.modelValue.answers.score) + "分", 1)
])
])
])
])) : Ze("", !0)
])
]);
};
}
}, Ks = /* @__PURE__ */ Jt(qn, [["__scopeId", "data-v-96a63b82"]]), Dn = { class: "multipleChoice" }, zn = { class: "tiBox" }, Xn = { class: "tiNumber" }, Yn = { class: "tiContent" }, Qn = ["innerHTML"], Kn = { style: { display: "flex", "align-items": "flex-start", "vertical-align": "top" } }, Zn = { class: "tiContentSpan" }, Gn = ["innerHTML"], Wn = { key: 0 }, Jn = { class: "answerTips" }, ea = {
key: 0,
class: "reAnswered",
"aria-hidden": "true"
}, ta = {
key: 1,
class: "reTrue",
"aria-hidden": "true"
}, sa = {
key: 2,
class: "reFalse",
"aria-hidden": "true"
}, na = {
key: 3,
class: "reHalfTrue",
"aria-hidden": "true"
}, aa = {
key: 0,
class: "reckT"
}, ia = {
key: 1,
class: "reckT"
}, oa = { key: 0 }, la = { key: 1 }, ra = { class: "solution analysis" }, ua = { class: "solution-item" }, da = { class: "solution-content" }, ca = ["innerHTML"], _a = { class: "solution-item" }, fa = { class: "solution-content" }, pa = { class: "score-value" }, ha = { class: "solution-item" }, ma = { class: "solution-content" }, ga = { class: "score-value" }, va = {
__name: "MultipleChoice",
props: {
modelValue: {
type: Object,
default: () => ({})
},
keys: {
type: Number,
default: 0
},
restore: {
type: Boolean,
default: !1
},
background: {
type: String,
default: "#fffad6"
},
isPreview: {
type: Boolean,
default: !0
}
},
setup(k) {
const a = k, r = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], F = Ht({
optionIndex: null,
isRight: null,
answer: null,
qAnswer: null,
getScoreLs: 0
}), A = Ce(!1), b = () => {
let L = [];
F.qAnswer = [], A.value = !0, F.getScoreLs = 0, a.modelValue.options.forEach((ie) => {
ie.isAnswer && L.push(r[ie.optionIndex - 1]);
});
const x = ((a.modelValue.answers.score - 0) / L.length).toFixed(2) - 0;
a.modelValue.options.forEach((ie) => {
a.modelValue.answers.answerObj.forEach((ae) => {
ie.isAnswer ? ae === r[ie.optionIndex - 1] && (F.getScoreLs += x - 0) : ae === r[ie.optionIndex - 1] && (A.value = !1);
});
}), a.modelValue.answers.answerObj.sort().toString() === L.sort().toString() ? (F.isRight = !0, F.getScoreLs = a.modelValue.answers.score - 0) : A.value ? F.isRight = "trueFalse" : (F.isRight = !1, F.getScoreLs = 0), a.modelValue.answers = Object.assign(a.modelValue.answers, {
id: a.modelValue.id,
questionUuid: a.modelValue.questionUuid,
getScore: F.getScoreLs,
type: a.modelValue.questionTypeBase,
answer: a.modelValue.answers.answerObj,
answerObj: a.modelValue.answers.answerObj,
isAnswered: F.isRight != null ? "true" : "false",
isRight: F.isRight
});
};
return (L, x) => {
const ie = Ot("el-checkbox"), ae = Ot("el-checkbox-group");
return V(), H("div", Dn, [
n("section", zn, [
n("span", Xn, ze(a.modelValue.id) + ".", 1),
n("div", Yn, [
n("div", {
class: "opImg tiganContent",
style: { display: "flex", "align-items": "center", "flex-wrap": "wrap" },
innerHTML: a.modelValue.subjectEditorValue
}, null, 8, Qn),
ht(ae, {
modelValue: a.modelValue.answers.answerObj,
"onUpdate:modelValue": x[0] || (x[0] = (pe) => a.modelValue.answers.answerObj = pe),
onChange: b,
class: "tiOption",
disabled: a.restore || a.isPreview
}, {
default: Mt(() => [
(V(!0), H(ft, null, pt(a.modelValue.options, (pe, we) => (V(), Ct(ie, {
key: we,
value: pe.optionIndex ? r[pe.optionIndex - 1] : r[we]
}, {
default: Mt(() => [
n("span", Kn, [
n("span", Zn, ze(r[we]) + ". ", 1),
n("span", {
innerHTML: pe.optionTextValue,
class: "tiContentSpan",
style: { display: "flex", "align-items": "center" }
}, null, 8, Gn)
])
]),
_: 2
}, 1032, ["value"]))), 128))
]),
_: 1
}, 8, ["modelValue", "disabled"])
]),
a.restore ? (V(), H("div", Wn, [
n("div", Jn, [
a.modelValue.answers.isAnswered ? a.modelValue.answers.isRight == !0 ? (V(), H("span", ta, [...x[2] || (x[2] = [
n("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
width: "20",
height: "20"
}, [
n("path", {
fill: "none",
d: "M0 0h24v24H0z"
}),
n("path", {
d: "M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z",
fill: "rgba(0,182,0,1)"
})
], -1),
Ge("回答正确 ", -1)
])])) : a.modelValue.answers.isRight == !1 ? (V(), H("span", sa, [...x[3] || (x[3] = [
n("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
width: "20",
height: "20"
}, [
n("path", {
fill: "none",
d: "M0 0h24v24H0z"
}),
n("path", {
d: "M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z",
fill: "rgba(221,61,61,1)"
})
], -1),
Ge("回答错误 ", -1)
])])) : a.modelValue.answers.isRight == "trueFalse" ? (V(), H("span", na, [...x[4] || (x[4] = [
n("svg", {
t: "1668049716312",
class: "icon",
viewBox: "0 0 1024 1024",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
"p-id": "7502",
width: "20",
height: "20"
}, [
n("path", {
d: "M863.3 296c-12.8-15.2-35.5-17.2-50.7-4.4L624.1 449.7l-64.7-77.1c-12.8-15.2-35.5-17.2-50.7-4.4-15.2 12.8-17.2 35.5-4.4 50.7L569 496 379 655.4 215.9 461.1c-12.8-15.2-35.5-17.2-50.7-4.4-15.2 12.8-17.2 35.5-4.4 50.7L345.9 728c7.4 8.8 18.1 13.2 28.8 12.8 8.6 0.3 17.4-2.4 24.6-8.4l216-181.3 74.1 88.3c12.8 15.2 35.5 17.2 50.7 4.4 15.2-12.8 17.2-35.5 4.4-50.7l-74.1-88.3 188.4-158.1C874 334 876 311.3 863.3 296z",
"p-id": "7503",
fill: "#FF8F49"
})
], -1),
Ge("不完全正确 ", -1)
])])) : Ze("", !0) : (V(), H("span", ea, [...x[1] || (x[1] = [
n("b", { style: { color: "#ffffff", "padding-top": "5px", display: "inline-block" } }, "?", -1),
Ge("本题未答 ", -1)
])]))
]),
n("section", {
class: "reck",
style: Yt({ background: k.background })
}, [
n("span", null, [
n("span", null, [
x[5] || (x[5] = Ge(" 参考答案:", -1)),
Array.isArray(a.modelValue.answers.qAnswer) ? (V(), H("span", aa, [
(V(!0), H(ft, null, pt(a.modelValue.answers.qAnswer, (pe, we) => (V(), H("i", { key: we }, ze(pe), 1))), 128))
])) : (V(), H("span", ia, [
n("i", null, ze(a.modelValue.answers.qAnswer), 1)
]))
])
]),
n("span", null, [
x[6] || (x[6] = Ge("我的答案:", -1)),
n("span", {
class: Kt(["reckT", a.modelValue.answers.isRight == !0 ? "standardTrue" : a.modelValue.answers.isRight == !1 ? "standardFalse" : "standardHalfTrue"])
}, [
(V(!0), H(ft, null, pt(a.modelValue.answers.answerObj, (pe, we) => (V(), H("i", { key: we }, [
Array.isArray(pe) ? (V(), H("span", oa, [
(V(!0), H(ft, null, pt(pe, (Z, de) => (V(), H("span", { key: de }, ze(Z), 1))), 128))
])) : (V(), H("span", la, ze(pe), 1))
]))), 128))
], 2)
])
], 4),
n("section", ra, [
n("div", ua, [
x[7] || (x[7] = n("div", { class: "solution-label" }, "参考解析:", -1)),
n("div", da, [
n("div", {
class: "explanation-text",
innerHTML: a.modelValue.explainEditorValue
}, null, 8, ca)
])
]),
n("div", _a, [
x[8] || (x[8] = n("div", { class: "solution-label" }, "本题得分:", -1)),
n("div", fa, [
n("span", pa, ze(a.modelValue.answers.getScore) + "分", 1)
])
]),
n("div", ha, [
x[9] || (x[9] = n("div", { class: "solution-label" }, "本题满分:", -1)),
n("div", ma, [
n("span", ga, ze(a.modelValue.answers.score) + "分", 1)
])
])
])
])) : Ze("", !0)
])
]);
};
}
}, Zs = /* @__PURE__ */ Jt(va, [["__scopeId", "data-v-eb5e10cf"]]), ba = { class: "multipleChoice" }, wa = { class: "tiBox" }, ya = { class: "tiNumber" }, xa = { class: "tiContent" }, Sa = ["innerHTML"], ka = { style: { display: "flex", "align-items": "flex-start", "vertical-align": "top" } }, Ta = { class: "tiContentSpan" }, Va = ["innerHTML"], Ma = { key: 0 }, Aa = { class: "answerTips" }, Ra = {
key: 0,
class: "reAnswered",
"aria-hidden": "true"
}, Ba = {
key: 1,
class: "reTrue",
"aria-hidden": "true"
}, Ea = {
key: 2,
class: "reFalse",
"aria-hidden": "true"
}, La = {
key: 3,
class: "reHalfTrue",
"aria-hidden": "true"
}, $a = {
key: 0,
class: "reckT"
}, Ia = {
key: 1,
class: "reckT"
}, Ca = { key: 0 }, Pa = { key: 1 }, Ha = { class: "solution analysis" }, Oa = { class: "solution-item" }, Na = { class: "solution-content" }, ja = ["innerHTML"], Ua = { class: "solution-item" }, Fa = { class: "solution-content" }, qa = { class: "score-value" }, Da = { class: "solution-item" }, za = { class: "solution-content" }, Xa = { class: "score-value" }, Ya = {
__name: "Nondirectional",
props: {
modelValue: {
type: Object,
default: () => ({})
},
keys: {
type: Number,
default: 0
},
restore: {
type: Boolean,
default: !1
},
background: {
type: String,
default: "#fffad6"
},
isPreview: {
type: Boolean,
default: !0
}
},
setup(k) {
const a = k, r = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], F = Ht({
optionIndex: null,
isRight: null,
answer: null,
qAnswer: null,
getScoreLs: 0
}), A = Ce(!1), b = () => {
let L = [];
F.qAnswer = [], A.value = !0, F.getScoreLs = 0, a.modelValue.options.forEach((ie) => {
ie.isAnswer && L.push(r[ie.optionIndex - 1]);
});
const x = ((a.modelValue.answers.score - 0) / L.length).toFixed(2) - 0;
a.modelValue.options.forEach((ie) => {
a.modelValue.answers.answerObj.forEach((ae) => {
ie.isAnswer ? ae === r[ie.optionIndex - 1] && (F.getScoreLs += x - 0) : ae === r[ie.optionIndex - 1] && (A.value = !1);
});
}), a.modelValue.answers.answerObj.sort().toString() === L.sort().toString() ? (F.isRight = !0, F.getScoreLs = a.modelValue.answers.score - 0) : A.value ? F.isRight = "trueFalse" : (F.isRight = !1, F.getScoreLs = 0), a.modelValue.answers = Object.assign(a.modelValue.answers, {
id: a.modelValue.id,
questionUuid: a.modelValue.questionUuid,
getScore: F.getScoreLs,
type: a.modelValue.questionTypeBase,
answer: a.modelValue.answers.answerObj,
answerObj: a.modelValue.answers.answerObj,
isAnswered: F.isRight != null ? "true" : "false",
isRight: F.isRight
});
};
return (L, x) => {
const ie = Ot("el-checkbox"), ae = Ot("el-checkbox-group");
return V(), H("div", ba, [
n("section", wa, [
n("span", ya, ze(a.modelValue.id) + ".", 1),
n("div", xa, [
n("div", {
class: "opImg tiganContent",
style: { display: "flex", "align-items": "center", "flex-wrap": "wrap" },
innerHTML: a.modelValue.subjectEditorValue
}, null, 8, Sa),
ht(ae, {
modelValue: a.modelValue.answers.answerObj,
"onUpdate:modelValue": x[0] || (x[0] = (pe) => a.modelValue.answers.answerObj = pe),
onChange: b,
class: "tiOption",
disabled: a.restore || a.isPreview
}, {
default: Mt(() => [
(V(!0), H(ft, null, pt(a.modelValue.options, (pe, we) => (V(), Ct(ie, {
key: we,
value: pe.optionIndex ? r[pe.optionIndex - 1] : r[we]
}, {
default: Mt(() => [
n("span", ka, [
n("span", Ta, ze(r[we]) + ". ", 1),
n("span", {
innerHTML: pe.optionTextValue,
class: "tiContentSpan",
style: { display: "flex", "align-items": "center" }
}, null, 8, Va)
])
]),
_: 2
}, 1032, ["value"]))), 128))
]),
_: 1
}, 8, ["modelValue", "disabled"])
]),
a.restore ? (V(), H("div", Ma, [
n("div", Aa, [
a.modelValue.answers.isAnswered ? a.modelValue.answers.isRight == !0 ? (V(), H("span", Ba, [...x[2] || (x[2] = [
n("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
width: "20",
height: "20"
}, [
n("path", {
fill: "none",
d: "M0 0h24v24H0z"
}),
n("path", {
d: "M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z",
fill: "rgba(0,182,0,1)"
})
], -1),
Ge("回答正确 ", -1)
])])) : a.modelValue.answers.isRight == !1 ? (V(), H("span", Ea, [...x[3] || (x[3] = [
n("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
width: "20",
height: "20"
}, [
n("path", {
fill: "none",
d: "M0 0h24v24H0z"
}),
n("path", {
d: "M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z",
fill: "rgba(221,61,61,1)"
})
], -1),
Ge("回答错误 ", -1)
])])) : a.modelValue.answers.isRight == "trueFalse" ? (V(), H("span", La, [...x[4] || (x[4] = [
n("svg", {
t: "1668049716312",
class: "icon",
viewBox: "0 0 1024 1024",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
"p-id": "7502",
width: "20",
height: "20"
}, [
n("path", {
d: "M863.3 296c-12.8-15.2-35.5-17.2-50.7-4.4L624.1 449.7l-64.7-77.1c-12.8-15.2-35.5-17.2-50.7-4.4-15.2 12.8-17.2 35.5-4.4 50.7L569 496 379 655.4 215.9 461.1c-12.8-15.2-35.5-17.2-50.7-4.4-15.2 12.8-17.2 35.5-4.4 50.7L345.9 728c7.4 8.8 18.1 13.2 28.8 12.8 8.6 0.3 17.4-2.4 24.6-8.4l216-181.3 74.1 88.3c12.8 15.2 35.5 17.2 50.7 4.4 15.2-12.8 17.2-35.5 4.4-50.7l-74.1-88.3 188.4-158.1C874 334 876 311.3 863.3 296z",
"p-id": "7503",
fill: "#FF8F49"
})
], -1),
Ge("不完全正确 ", -1)
])])) : Ze("", !0) : (V(), H("span", Ra, [...x[1] || (x[1] = [
n("b", { style: { color: "#ffffff", "padding-top": "5px", display: "inline-block" } }, "?", -1),
Ge("本题未答 ", -1)
])]))
]),
n("section", {
class: "reck",
style: Yt({ background: k.background })
}, [
n("span", null, [
n("span", null, [
x[5] || (x[5] = Ge(" 参考答案:", -1)),
Array.isArray(a.modelValue.answers.qAnswer) ? (V(), H("span", $a, [
(V(!0), H(ft, null, pt(a.modelValue.answers.qAnswer, (pe, we) => (V(), H("i", { key: we }, ze(pe), 1))), 128))
])) : (V(), H("span", Ia, [
n("i", null, ze(a.modelValue.answers.qAnswer), 1)
]))
])
]),
n("span", null, [
x[6] || (x[6] = Ge("我的答案:", -1)),
n("span", {
class: Kt(["reckT", a.modelValue.answers.isRight == !0 ? "standardTrue" : a.modelValue.answers.isRight == !1 ? "standardFalse" : "standardHalfTrue"])
}, [
(V(!0), H(ft, null, pt(a.modelValue.answers.answerObj, (pe, we) => (V(), H("i", { key: we }, [
Array.isArray(pe) ? (V(), H("span", Ca, [
(V(!0), H(ft, null, pt(pe, (Z, de) => (V(), H("span", { key: de }, ze(Z), 1))), 128))
])) : (V(), H("span", Pa, ze(pe), 1))
]))), 128))
], 2)
])
], 4),
n("section", Ha, [
n("div", Oa, [
x[7] || (x[7] = n("div", { class: "solution-label" }, "参考解析:", -1)),
n("div", Na, [
n("div", {
class: "explanation-text",
innerHTML: a.modelValue.explainEditorValue
}, null, 8, ja)
])
]),
n("div", Ua, [
x[8] || (x[8] = n("div", { class: "solution-label" }, "本题得分:", -1)),
n("div", Fa, [
n("span", qa, ze(a.modelValue.answers.getScore) + "分", 1)
])
]),
n("div", Da, [
x[9] || (x[9] = n("div", { class: "solution-label" }, "本题满分:", -1)),
n("div", za, [
n("span", Xa, ze(a.modelValue.answers.score) + "分", 1)
])
])
])
])) : Ze("", !0)
])
]);
};
}
}, Gs = /* @__PURE__ */ Jt(Ya, [["__scopeId", "data-v-3a8c0ce4"]]), Qa = { class: "JudgmentalQuestion" }, Ka = { class: "tiBox" }, Za = { class: "tiNumber" }, Ga = { class: "tiContent" }, Wa = ["innerHTML"], Ja = { class: "tiContentSpan" }, ei = ["innerHTML"], ti = { key: 0 }, si = { class: "answerTips" }, ni = {
key: 0,
class: "reAnswered",
"aria-hidden": "true"
}, ai = {
key: 1,
class: "reTrue",
"aria-hidden": "true"
}, ii = {
key: 2,
class: "reFalse",
"aria-hidden": "true"
}, oi = {
key: 3,
class: "reHalfTrue",
"aria-hidden": "true"
}, li = { class: "reckT" }, ri = { class: "solution analysis" }, ui = { class: "solution-item" }, di = { class: "solution-content" }, ci = ["innerHTML"], _i = { class: "solution-item" }, fi = { class: "solution-content" }, pi = { class: "score-value" }, hi = { class: "solution-item" }, mi = { class: "solution-content" }, gi = { class: "score-value" }, Ws = {
__name: "JudgmentalQuestion",
props: {
modelValue: {
type: Object,
default: () => ({})
},
keys: {
type: Number,
default: 0
},
restore: {
type: Boolean,
default: !1
},
background: {
type: String,
default: "#fffad6"
},
isPreview: {
type: Boolean,
default: !0
}
},
setup(k) {
const a = k, r = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], F = Ht({
optionIndex: null,
isRight: null,
answer: null,
qAnswer: null
}), A = (b) => {
a.modelValue.options.forEach((L, x) => {
x === b && (F.isRight = L.isAnswer), L.isAnswer && (F.qAnswer = L.optionIndex);
}), a.modelValue.answers = Object.assign(a.modelValue.answers, {
id: a.modelValue.id,
questionUuid: a.modelValue.questionUuid,
getScore: F.isRight ? a.modelValue.answers.score - 0 : 0,
type: a.modelValue.questionTypeBase,
answer: r[b],
isRight: F.isRight,
isAnswered: F.isRight != null ? "true" : "false"
});
};
return (b, L) => {
const x = Ot("el-radio"), ie = Ot("el-radio-group");
return V(), H("div", Qa, [
n("section", Ka, [
n("span", Za, ze(a.modelValue.id) + ".", 1),
n("div", Ga, [
n("div", {
style: { display: "flex", "align-items": "center", "flex-wrap": "wrap" },
innerHTML: a.modelValue.subjectEditorValue,
class: "tiganContent"
}, null, 8, Wa),
ht(ie, {
modelValue: a.modelValue.answers.optionIndex,
"onUpdate:modelValue": L[0] || (L[0] = (ae) => a.modelValue.answers.optionIndex = ae),
onChange: A,
disabled: a.restore || a.isPreview,
class: "panduan tiOption"
}, {
default: Mt(() => [
(V(!0), H(ft, null, pt(a.modelValue.options, (ae, pe) => (V(), Ct(x, {
key: pe,
value: pe
}, {
default: Mt(() => [
n("span", Ja, ze(r[pe]) + ".", 1),
n("span", {
class: "tiContentSpan",
innerHTML: ae.optionTextValue
}, null, 8, ei)
]),
_: 2
}, 1032, ["value"]))), 128))
]),
_: 1
}, 8, ["modelValue", "disabled"])
]),
a.restore ? (V(), H("div", ti, [
n("div", si, [
a.modelValue.answers.isAnswered ? a.modelValue.answers.isRight == !0 ? (V(), H("span", ai, [...L[2] || (L[2] = [
n("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
width: "20",
height: "20"
}, [
n("path", {
fill: "none",
d: "M0 0h24v24H0z"
}),
n("path", {
d: "M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z",
fill: "rgba(0,182,0,1)"
})
], -1),
Ge("回答正确 ", -1)
])])) : a.modelValue.answers.isRight == !1 ? (V(), H("span", ii, [...L[3] || (L[3] = [
n("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
width: "20",
height: "20"
}, [
n("path", {
fill: "none",
d: "M0 0h24v24H0z"
}),
n("path", {
d: "M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z",
fill: "rgba(221,61,61,1)"
})
], -1),
Ge("回答错误 ", -1)
])])) : a.modelValue.answers.isRight == "trueFalse" ? (V(), H("span", oi, [...L[4] || (L[4] = [
n("svg", {
t: "1668049716312",
class: "icon",
viewBox: "0 0 1024 1024",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
"p-id": "7502",
width: "20",
height: "20"
}, [
n("path", {
d: "M863.3 296c-12.8-15.2-35.5-17.2-50.7-4.4L624.1 449.7l-64.7-77.1c-12.8-15.2-35.5-17.2-50.7-4.4-15.2 12.8-17.2 35.5-4.4 50.7L569 496 379 655.4 215.9 461.1c-12.8-15.2-35.5-17.2-50.7-4.4-15.2 12.8-17.2 35.5-4.4 50.7L345.9 728c7.4 8.8 18.1 13.2 28.8 12.8 8.6 0.3 17.4-2.4 24.6-8.4l216-181.3 74.1 88.3c12.8 15.2 35.5 17.2 50.7 4.4 15.2-12.8 17.2-35.5 4.4-50.7l-74.1-88.3 188.4-158.1C874 334 876 311.3 863.3 296z",
"p-id": "7503",
fill: "#FF8F49"
})
], -1),
Ge("不完全正确 ", -1)
])])) : Ze("", !0) : (V(), H("span", ni, [...L[1] || (L[1] = [
n("b", { style: { color: "#ffffff", "padding-top": "5px", display: "inline-block" } }, "?", -1),
Ge("本题未答 ", -1)
])]))
]),
n("section", {
class: "reck",
style: Yt({ background: k.background })
}, [
n("span", null, [
L[5] || (L[5] = Ge("参考答案:", -1)),
n("span", li, ze(Array.isArray(a.modelValue.answers.qAnswer) ? a.modelValue.answers.qAnswer[0] : a.modelValue.answers.qAnswer), 1)
]),
n("span", null, [
L[6] || (L[6] = Ge("我的答案:", -1)),
n("span", {
class: Kt(["reckT", a.modelValue.answers.isRight == !0 ? "standardTrue" : a.modelValue.answers.isRight == !1 ? "standardFalse" : "standardHalfTrue"])
}, ze(a.modelValue.answers.answer[0]), 3)
])
], 4),
n("section", ri, [
n("div", ui, [
L[7] || (L[7] = n("div", { class: "solution-label" }, "参考解析:", -1)),
n("div", di, [
n("div", {
class: "explanation-text",
innerHTML: a.modelValue.explainEditorValue
}, null, 8, ci)
])
]),
n("div", _i, [
L[8] || (L[8] = n("div", { class: "solution-label" }, "本题得分:", -1)),
n("div", fi, [
n("span", pi, ze(a.modelValue.answers.getScore) + "分", 1)
])
]),
n("div", hi, [
L[9] || (L[9] = n("div", { class: "solution-label" }, "本题满分:", -1)),
n("div", mi, [
n("span", gi, ze(a.modelValue.answers.score) + "分", 1)
])
])
])
])) : Ze("", !0)
])
]);
};
}
}, vi = { class: "bodyStyle" }, bi = { class: "tigan" }, wi = ["innerHTML"], yi = ["id"], xi = {
__name: "index",
props: {
modelValue: {
questionJsonContent: [String, Object, Array],
type: null
}
},
emits: ["update:modelValue"],
setup(k, { emit: a }) {
const r = k, F = Ht({ arrayList: [] }), A = () => {
if (r.modelValue.attachObject) {
let G = Object.keys(r.modelValue.attachObject);
F.arrayList = G.reduce((ke, Re) => r.modelValue.attachObject[Re] && Object.prototype.toString.call(r.modelValue.attachObject[Re]) == "[object Array]" ? (r.modelValue.attachObject[Re].forEach((Xe) => {
ke.push(Xe);
}), ke) : r.modelValue.attachObject[Re] && Object.prototype.toString.call(r.modelValue.attachObject[Re]) == "[object Object]" ? (ke.push(r.modelValue.attachObject[Re]), ke) : void 0, []);
}
};
Ce(0), Ce(!1), Ce(0), Ce(0), Ce(1), Ce(0), Ce(0), Ce("rgba(255, 255, 255, 1)"), Ce("rgba(59, 203, 133, 0.57)");
const { proxy: b } = _n();
Ce(b.apiPath + "/api/oss/aliyun/upload"), Ce(new Image()), Ce(0), Ce(!0), Ce(0), Ce(!1), Ht({
optionTextValue: "",
fontSize: ""
});
let L = Ce(null), x = Ce(null);
window.addEventListener("scroll", function() {
L.value !== null && x.value !== null && window.scrollTo(L.value, x.value);
});
const { canvas: ie, ctx: ae, canvasPic: pe, canvasHistory: we, fileList: Z } = fn(Ht({
canvas: null,
// canvas dom对象
ctx: null,
// canvas 2d对象
canvasPic: null,
//画布照片实例
canvasHistory: [],
// allAngList: [],
fileList: []
})), de = a;
os(
() => r.modelValue,
(G, ke) => {
de("update:modelValue", G);
},
{ deep: !0 }
), Ce(!1), Ce(20), Ce(null), Ce(null);
const Ee = Ce(null);
Ce(0), Ce(0), Ce(0), Ce(0), Ce(0), Ce(0), Ht({
imgScale: 1,
// 标注的时候放大缩小倍数
isClick: !1,
// 区域是否被点击了
x1: void 0,
y1: void 0,
x2: void 0,
y2: void 0,
// 拖拽需要用的标志位
moveX1: void 0,
moveY1: void 0,
moveX2: void 0,
moveY2: void 0,
//--------------------------
left: void 0,
// x轴侧偏移量,相对于canvas上的值
top: void 0,
// y轴偏移量,相对于canvas上的值
imgScale: 1,
// 标注的时候放大缩小倍数
isClick: !1,
// 区域是否被点击了
// 原始图片上的位置
originX1: void 0,
originX2: void 0,
originY1: void 0,
originY2: void 0,
color: void 0
// 上颜色用的的
}), Ce(!1), Ce([]), Ce(!1), Ce(void 0), Ce(void 0), Ce(!0);
let Q = null;
const h = Ht({
width: 500,
height: 500
});
Ht({
width: null,
height: null
});
function $() {
if (Q = new vn.Canvas(`labelCanvas${r.modelValue.questionIndex}`, {
width: h.width,
// canvas 宽
height: h.height,
backgroundColor: "#ffffff",
transparentCorners: !0,
fireRightClick: !0,
// 启用右键,button的数字为3
stopContextMenu: !0
// 禁止默认右键菜单
}), Q.skipTargetFind = !0, Q.on("mouse:wheel", (G) => {
let ke = G.e.deltaY, Re = Q.getZoom();
Re *= 0.999 ** ke, Re > 20 && (Re = 20), Re < 0.01 && (Re = 0.01), Q.zoomToPoint(
{
// 关键点
x: G.e.offsetX,
y: G.e.offsetY
},
Re
), G.e.preventDefault(), G.e.stopPropagation();
}), r.modelValue.maodianObject.str && r.modelValue.maodianObject.imgUrl) {
const G = JSON.parse(r.modelValue.maodianObject.str);
G.objects.forEach((ke, Re) => {
ke.objects[1].text = String(Re + 1);
}), Q.loadFromJSON(
G,
Q.renderAll.bind(Q),
function(ke, Re) {
}
);
}
}
return bs(() => {
$(), A();
}), (G, ke) => (V(), H("div", vi, [
n("div", bi, [
n("span", {
class: "contentStyle",
innerHTML: r.modelValue.subjectEditorValue
}, null, 8, wi),
n("div", {
ref_key: "imgContainer",
ref: Ee,
class: "imgContainer"
}, [
n("canvas", {
ref_key: "canvas",
ref: ie,
id: "labelCanvas" + r.modelValue.questionIndex,
width: "500",
height: "500"
}, null, 8, yi)
], 512)
])
]));
}
}, Si = /* @__PURE__ */ Jt(xi, [["__scopeId", "data-v-135d5ee5"]]), ki = { class: "tiBox tiBox3" }, Ti = { class: "tiNumber" }, Vi = { class: "tiContent maodianCentent" }, Mi = ["for"], Ai = { key: 0 }, Ri = { class: "solution" }, Bi = { class: "solution-item" }, Ei = { class: "solution-content" }, Li = { class: "blank-label" }, $i = { class: "answer-text correct" }, Ii = {
key: 0,
class: "equal-answers"
}, Ci = { class: "solution-item" }, Pi = { class: "solution-content" }, Hi = { class: "blank-label" }, Oi = { class: "answer-text" }, Ni = { class: "solution-item" }, ji = { class: "solution-content" }, Ui = ["innerHTML"], Fi = { class: "solution-item" }, qi = { class: "solution-content" }, Di = { class: "score-value" }, zi = { class: "solution-item" }, Xi = { class: "solution-content" }, Yi = { class: "score-value" }, Qi = {
__name: "canvasMaoDian",
props: {
modelValue: {
type: Object,
default: () => ({})
},
keys: {
type: Number,
default: 0
},
restore: {
type: Boolean,
default: !1
},
isPreview: {
type: Boolean,
default: !0
}
},
setup(k) {
const a = k, r = Ht({
optionIndex: null,
isRight: null,
answer: null,
qAnswer: null,
answerObj: []
}), F = Ht({
getScore: 0,
isRight: !0,
isAnswered: !1
}), A = (L = "") => {
const x = /<br>$/i, ie = L.replace(/^(\s* \s*)+|(\s* \s*)+$/g, "").trim();
return x.test(ie) ? ie.replace(x, "") : ie;
}, b = (L) => {
F.getScore = 0;
let x = (a.modelValue.answers.score - 0) / a.modelValue.options.length;
r.answerObj = a.modelValue.options.reduce((pe, we) => {
we.answer == we.optionTextValue ? we.isRight = !0 : we.equalAnswers.length ? we.isRight = we.equalAnswers.some(
(de) => A(de.equalAnswerEditorValue) == A(we.answer)
) : we.isRight = !1, we.getScore = we.isRight ? (x.toFixed(2) - 0).toFixed(2) : 0, we.score = x.toFixed(2) - 0, we.isAnswered = we.answer != null, we.qAnswer = [], we.qAnswer.push(we.optionTextValue);
let Z = {
isRight: we.isRight,
getScore: we.getScore,
score: we.score,
isAnswered: we.isAnswered,
answer: we.answer,
qAnswer: we.qAnswer
};
return pe.push(Z), pe;
}, []);
let ie = a.modelValue.options.every((pe) => pe.isAnswered && pe.isRight), ae = 0;
ie ? F.getScore = a.modelValue.answers.score : r.answerObj.forEach((pe) => {
F.getScore += pe.getScore - 0, pe.isRight && (ae += 1), pe.isAnswered && (F.isAnswered = !0);
}), F.isRight = ae == 0 ? !1 : ae == a.modelValue.options.length ? !0 : "trueFalse", a.modelValue.answers = Object.assign(a.modelValue.answers, {
id: a.modelValue.id,
questionUuid: a.modelValue.questionUuid,
getScore: F.getScore - 0,
type: a.modelValue.questionTypeBase,
isRight: F.isRight,
answerObj: r.answerObj,
isAnswered: F.isAnswered
});
};
return (L, x) => {
const ie = Ot("el-input");
return V(), H("article", null, [
n("section", ki, [
n("span", Ti, ze(a.modelValue.id) + ".", 1),
n("div", Vi, [
(V(), Ct(Si, {
modelValue: a.modelValue,
props: a.restore,
key: a.modelValue.id + a.restore
}, null, 8, ["modelValue", "props"])),
n("div", null, [
(V(!0), H(ft, null, pt(a.modelValue.options, (ae, pe) => (V(), H("div", {
key: pe,
style: { "margin-right": "30px" }
}, [
n("div", null, [
ht(ie, {
modelValue: ae.answer,
"onUpdate:modelValue": (we) => ae.answer = we,
id: ae.optionUuid,
onBlur: (we) => b(),
disabled: a.restore || a.isPreview
}, {
prepend: Mt(() => [
n("label", {
for: ae.optionUuid
}, "空" + ze(pe + 1), 9, Mi)
]),
_: 2
}, 1032, ["modelValue", "onUpdate:modelValue", "id", "onBlur", "disabled"])
])
]))), 128))
])
])
]),
a.restore ? (V(), H("div", Ai, [
n("section", Ri, [
n("div", Bi, [
x[2] || (x[2] = n("div", { class: "solution-label" }, "参考答案:", -1)),
n("div", Ei, [
(V(!0), H(ft, null, pt(a.modelValue.options, (ae, pe) => (V(), H("div", {
key: pe,
class: "answer-item"
}, [
n("span", Li, "区域" + ze(pe + 1) + ":", 1),
n("span", $i, ze(ae.optionTextValue), 1),
ae.equalAnswers ? (V(), H("span", Ii, [
x[0] || (x[0] = Ge(" ( ", -1)),
(V(!0), H(ft, null, pt(ae.equalAnswers, (we) => (V(), H("span", { key: we }, ze(we.equalAnswerEditorValue) + "、 ", 1))), 128)),
x[1] || (x[1] = Ge(" ) ", -1))
])) : Ze("", !0)
]))), 128))
])
]),
n("div", Ci, [
x[3] || (x[3] = n("div", { class: "solution-label" }, "我的答案:", -1)),
n("div", Pi, [
(V(!0), H(ft, null, pt(a.modelValue.answers.answerObj, (ae, pe) => (V(), H("div", {
key: pe,
class: Kt(["answer-item", {
"is-correct": a.modelValue.answers.isRight === !0,
"is-incorrect": a.modelValue.answers.isRight === !1,
"is-partial": a.modelValue.answers.isRight !== !0 && a.modelValue.answers.isRight !== !1
}])
}, [
n("span", Hi, "区域" + ze(pe + 1) + ":", 1),
n("span", Oi, ze(ae.answer), 1)
], 2))), 128))
])
]),
n("div", Ni, [
x[4] || (x[4] = n("div", { class: "solution-label" }, "参考解析:", -1)),
n("div", ji, [
n("div", {
innerHTML: a.modelValue.explainEditorValue,
class: "explanation-text"
}, null, 8, Ui)
])
]),
n("div", Fi, [
x[5] || (x[5] = n("div", { class: "solution-label" }, "本题得分:", -1)),
n("div", qi, [
n("span", Di, ze(a.modelValue.answers.getScore) + "分", 1)
])
]),
n("div", zi, [
x[6] || (x[6] = n("div", { class: "solution-label" }, "本题满分:", -1)),
n("div", Xi, [
n("span", Yi, ze(a.modelValue.answers.score) + "分", 1)
])
])
])
])) : Ze("", !0)
]);
};
}
}, Js = /* @__PURE__ */ Jt(Qi, [["__scopeId", "data-v-f5f5ce1e"]]), Ki = { class: "tiBox tiBox3" }, Zi = { class: "tiNumber" }, Gi = { class: "tiContent" }, Wi = ["innerHTML"], Ji = { key: 0 }, eo = { class: "answerTips" }, to = {
key: 0,
class: "reAnswered",
"aria-hidden": "true"
}, so = {
key: 1,
class: "reTrue",
"aria-hidden": "true"
}, no = {
key: 2,
class: "reFalse",
"aria-hidden": "true"
}, ao = {
key: 3,
class: "reHalfTrue",
"aria-hidden": "true"
}, io = { class: "solution" }, oo = { class: "solution-item" }, lo = { class: "solution-content" }, ro = { class: "answer-item" }, uo = { class: "solution-item" }, co = { class: "solution-content" }, _o = { class: "solution-item" }, fo = { class: "solution-content" }, po = ["innerHTML"], ho = { class: "solution-item" }, mo = { class: "solution-content" }, go = { class: "score-value" }, vo = { class: "solution-item" }, bo = { class: "solution-content" }, wo = { class: "score-value" }, yo = {
__name: "rankingQuestion",
props: {
modelValue: {
type: Object,
default: () => ({})
},
keys: {
type: Number,
default: 0
},
restore: {
type: Boolean,
default: !1
},
background: {
type: String,
default: "#fffad6"
},
isPreview: {
type: Boolean,
default: !0
}
},
emits: ["rankingQuestionEmit"],
setup(k, { emit: a }) {
const r = k, F = Ce(!1), A = () => {
F.value = !0;
let b = !0, L = [];
r.modelValue.options.map((x, ie) => {
L.push(x.optionTextValue), x.optionPaiXuValue - 0 != ie + 1 && (b = !1);
}), r.modelValue.answers = Object.assign(r.modelValue.answers, {
id: r.modelValue.id,
answer: L.join(","),
answerObj: L,
questionUuid: r.modelValue.questionUuid,
getScore: b ? r.modelValue.answers.score - 0 : 0,
type: r.modelValue.questionTypeBase,