问题增加sort

This commit is contained in:
jiangzhe 2024-04-12 14:24:20 +08:00
parent e64bd73bba
commit 42eec6046c
3 changed files with 5 additions and 3 deletions

View File

@ -80,6 +80,7 @@ export interface ScaleAnswer {
answerOption: string;
score: number;
type: number;
sort: number;
}
export interface SysScaleQuestionQuery extends PageQuery {

View File

@ -306,10 +306,11 @@ const submitForm = () => {
SysScaleQuestionFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
form.value.scaleAnswerList.forEach(item => {
form.value.scaleAnswerList.forEach((item, index) => {
if (item.answerId.length == 21) {
item.answerId = '';
}
item.sort = index + 1
})
if (form.value.questionId) {