|
@@ -95,7 +95,7 @@ export default defineComponent({
|
|
|
const result: any = []
|
|
|
|
|
|
list.forEach((item: any, index: number) => {
|
|
|
- // console.log(item, 'item')
|
|
|
+ console.log(item, 'item')
|
|
|
result.push({
|
|
|
answerId: item.answerId,
|
|
|
answer: item.answer,
|
|
@@ -133,14 +133,14 @@ export default defineComponent({
|
|
|
const answers = computed(() => {
|
|
|
const list: any = props.data.answers || []
|
|
|
const value: any = props.value || []
|
|
|
-
|
|
|
+ console.log(list, value, '1212')
|
|
|
list.forEach((item: any) => {
|
|
|
const tempIndex = value.findIndex(
|
|
|
(c: any) => c.answerId === item.examinationQuestionAnswerId
|
|
|
)
|
|
|
- if (tempIndex !== -1) {
|
|
|
- item.checked = tempIndex !== -1 ? true : false
|
|
|
- }
|
|
|
+ // if (tempIndex !== -1) {
|
|
|
+ item.checked = tempIndex !== -1 ? true : false
|
|
|
+ // }
|
|
|
})
|
|
|
return list
|
|
|
})
|
|
@@ -237,17 +237,8 @@ export default defineComponent({
|
|
|
round
|
|
|
disabled={props.readOnly}
|
|
|
onClick={() => {
|
|
|
- const ids: any = []
|
|
|
- const answers = state.options || []
|
|
|
- // console.log(answers, 'reset')
|
|
|
- answers.forEach((item: any) => {
|
|
|
- ids.push(item.itemIndex)
|
|
|
- })
|
|
|
- state.sortable.sort(
|
|
|
- ids.sort((a: any, b: any) => a - b),
|
|
|
- true
|
|
|
- )
|
|
|
-
|
|
|
+ state.options = []
|
|
|
+ state.list = []
|
|
|
onSelect()
|
|
|
}}
|
|
|
>
|