| | |
| | | <span class="question-text">{{ item.scriptContent }}</span> |
| | | <span class="question-type-tag"> |
| | | {{ |
| | | item.scriptType === 1 |
| | | item.scriptType == 1 |
| | | ? "[单选]" |
| | | : item.scriptType === 2 |
| | | : item.scriptType == 2 |
| | | ? "[多选]" |
| | | : "[问答]" |
| | | }} |
| | |
| | | <el-radio |
| | | v-for="( |
| | | option, optionIndex |
| | | ) in item.svyTaskTemplateTargetoptions" |
| | | ) in item.svyLibTemplateTargetoptions" |
| | | :key="optionIndex" |
| | | :label="option.optioncontent" |
| | | :class="{ |
| | |
| | | handleRadioToggle( |
| | | item, |
| | | index, |
| | | item.svyTaskTemplateTargetoptions, |
| | | item.svyLibTemplateTargetoptions, |
| | | option.optioncontent |
| | | ) |
| | | " |
| | |
| | | <el-checkbox |
| | | v-for="( |
| | | option, optionIndex |
| | | ) in item.svyTaskTemplateTargetoptions" |
| | | ) in item.svyLibTemplateTargetoptions" |
| | | :key="optionIndex" |
| | | :label="option.optioncontent" |
| | | :class="{ |
| | |
| | | item.scriptResult = []; |
| | | } |
| | | }); |
| | | console.log(this.questionList,'this.questionList'); |
| | | |
| | | } |
| | | } |
| | | ); |
| | |
| | | let form = { |
| | | param1: this.taskid, |
| | | param2: this.patid, |
| | | svyTaskTemplateScriptVOS: [], |
| | | svyLibTemplateScriptVOS: [], |
| | | }; |
| | | const arr = structuredClone(this.questionList); |
| | | arr.forEach((item) => { |
| | |
| | | }); |
| | | arr.forEach((item, index) => { |
| | | if (item.scriptType == 1 && item.scriptResult) { |
| | | var obj = item.svyTaskTemplateTargetoptions.find( |
| | | var obj = item.svyLibTemplateTargetoptions.find( |
| | | (items) => items.optioncontent == item.scriptResult |
| | | ); |
| | | console.log(item); |
| | |
| | | item.scriptResult = JSON.stringify(item.scriptResult); |
| | | } |
| | | }); |
| | | form.svyTaskTemplateScriptVOS = arr; |
| | | form.svyLibTemplateScriptVOS = arr; |
| | | form.type = 2; |
| | | Cachequestionnaire(form).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | // 处理单选选项 |
| | | // handleOptionChange(selectedvalue, index, arr) { |
| | | // // 查找选中的选项对象 |
| | | // const selectedOption = arr.svyTaskTemplateTargetoptions.find( |
| | | // const selectedOption = arr.svyLibTemplateTargetoptions.find( |
| | | // (option) => option.optioncontent == selectedvalue |
| | | // ); |
| | | // if (selectedOption) { |
| | |
| | | // // ��加分数 |
| | | // let score = 0; |
| | | // selectedvalues.forEach((value) => { |
| | | // const selectedOption = arr.svyTaskTemplateTargetoptions.find( |
| | | // const selectedOption = arr.svyLibTemplateTargetoptions.find( |
| | | // (option) => option.optioncontent == value |
| | | // ); |
| | | // if (selectedOption) { |