| | |
| | | }}</span> |
| | | </div> |
| | | <div class="dev-xx"> |
| | | <el-radio-group |
| | | v-model="item.scriptResult" |
| | | @change=" |
| | | handleOptionChange( |
| | | $event, |
| | | index, |
| | | item.svyTaskTemplateTargetoptions, |
| | | item |
| | | ) |
| | | " |
| | | > |
| | | <el-radio-group v-model="item.scriptResult"> |
| | | <el-radio |
| | | v-for="( |
| | | items, indexs |
| | |
| | | :key="indexs" |
| | | :label="items.optioncontent" |
| | | @click.native.prevent=" |
| | | handleRadioToggle(item, items.optioncontent) |
| | | handleRadioToggle( |
| | | item, |
| | | index, |
| | | item.svyTaskTemplateTargetoptions, |
| | | items.optioncontent |
| | | ) |
| | | " |
| | | >{{ items.optioncontent }}</el-radio |
| | | > |
| | |
| | | :key="index" |
| | | :label="items" |
| | | :class="items.isabnormal ? 'red-star' : ''" |
| | | @click.native.prevent=" |
| | | handleRadioToggles(item, items) |
| | | " |
| | | >{{ items }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | |
| | | :visible.sync="CaldialogVisible" |
| | | width="60%" |
| | | > |
| | | <CallCenterLs |
| | | ref="CallCenterLs" |
| | | :initial-phone="currentPhoneNumber" |
| | | /> |
| | | <CallCenterLs ref="CallCenterLs" :initial-phone="currentPhoneNumber" /> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | |
| | | patid: null, |
| | | }; |
| | | }, |
| | | |
| | | |
| | | computed: { |
| | | callStatusText() { |
| | |
| | | } |
| | | this.$forceUpdate(); |
| | | }, |
| | | // 新增的切换选中/取消选中方法 |
| | | handleRadioToggle(questionItem, optionValue) { |
| | | console.log(questionItem, optionValue, 999); |
| | | |
| | | // 如果点击的是当前已选中的选项,则取消选中 |
| | | if (questionItem.scriptResult === optionValue) { |
| | | questionItem.scriptResult = ""; // 清空选中值 |
| | | // 同时重置与选项相关的状态 |
| | | questionItem.isabnormal = false; |
| | | questionItem.showAppendInput = false; |
| | | // 注意:取消选中时,我们通常不希望触发题目跳转逻辑,所以直接返回 |
| | | // 如果需要,可以在这里添加取消选中后的特定逻辑,例如重置题目序列 |
| | | } else { |
| | | // 如果点击的是未选中的选项,则通过更改绑定值来触发原始的 handleOptionChange 方法 |
| | | // 这里只需要改变 v-model 绑定的值,change事件会自动触发 |
| | | questionItem.scriptResult = optionValue; |
| | | // 后续的跳转等复杂逻辑会在 handleOptionChange 中正常执行 |
| | | } |
| | | }, |
| | | handleRadioToggles(questionItem, optionValue) { |
| | | if (!questionItem.matchedtext) { |
| | | questionItem.matchedtext == ""; |
| | |
| | | this.$set(questionItem, "matchedtext", optionValue); // 后续的跳转等复杂逻辑会在 handleOptionChange 中正常执行 |
| | | } |
| | | }, |
| | | // 新增的切换选中/取消选中方法 |
| | | handleRadioToggle(questionItem, index, options, optionValue) { |
| | | console.log(questionItem, optionValue, 999); |
| | | |
| | | // 如果点击的是当前已选中的选项,则取消选中 |
| | | if (questionItem.scriptResult === optionValue) { |
| | | questionItem.scriptResult = ""; // 清空选中值 |
| | | // 同时重置与选项相关的状态 |
| | | questionItem.isabnormal = false; |
| | | questionItem.showAppendInput = false; |
| | | // 注意:取消选中时,我们通常不希望触发题目跳转逻辑,所以直接返回 |
| | | // 如果需要,可以在这里添加取消选中后的特定逻辑,例如重置题目序列 |
| | | } else { |
| | | // 如果点击的是未选中的选项,则通过更改绑定值来触发原始的 handleOptionChange 方法 |
| | | // 这里只需要改变 v-model 绑定的值,change事件会自动触发 |
| | | questionItem.scriptResult = optionValue; |
| | | this.handleOptionChange(optionValue, index, options, questionItem); |
| | | // 后续的跳转等复杂逻辑会在 handleOptionChange 中正常执行 |
| | | } |
| | | }, |
| | | |
| | | // 在methods部分,修改handleOptionChange方法: |
| | | handleOptionChange(selectedOption, questionIndex, options, a) { |
| | | console.log(selectedOption, questionIndex, options, a, "888"); |