| | |
| | | > |
| | | <!-- 单选 --> |
| | | <div |
| | | :class=" |
| | | item.isabnormal |
| | | ? 'scriptTopic-isabnormal' |
| | | : 'scriptTopic-dev' |
| | | " |
| | | :class="getTopicClass(item)" |
| | | :key="index" |
| | | v-if="item.scriptType == 1 && !item.astrict" |
| | | > |
| | |
| | | v-for="( |
| | | items, indexs |
| | | ) in item.svyTaskTemplateTargetoptions" |
| | | :class="items.isabnormal ? 'red-star' : ''" |
| | | :class="getOptionClass(items)" |
| | | :key="indexs" |
| | | :label="items.optioncontent" |
| | | @click.native.prevent=" |
| | |
| | | selectedTag: "", |
| | | tagOptions: [ |
| | | { |
| | | value: '0', |
| | | value: "0", |
| | | label: "正常", |
| | | type: "normal", |
| | | color: "#7ff5e1", |
| | | description: "患者情况正常,无需特别关注", |
| | | }, |
| | | { |
| | | value: '1', |
| | | value: "1", |
| | | label: "异常", |
| | | type: "abnormal", |
| | | color: "#f75c5c", |
| | | description: "患者存在异常情况,需要重点关注", |
| | | }, |
| | | { |
| | | value: '2', |
| | | value: "2", |
| | | label: "警告", |
| | | type: "warning", |
| | | color: "#fbfb4a", |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | // 获取主题样式类 |
| | | getTopicClass(item) { |
| | | console.log(item.isabnormal,'111'); |
| | | |
| | | // 根据状态值返回对应的样式类 |
| | | if (item.isabnormal == 1) { |
| | | return "scriptTopic-isabnormal"; // 异常 - 红色 |
| | | } else if (item.isabnormal == 2) { |
| | | return "scriptTopic-warning"; // 警告 - 黄色 |
| | | } else { |
| | | return "scriptTopic-dev"; // 正常 - 默认样式 |
| | | } |
| | | }, |
| | | |
| | | // 获取选项样式类 |
| | | getOptionClass(items) { |
| | | if (items.isabnormal == 1) { |
| | | return "red-star"; // 异常 - 红色星号 |
| | | } else if (items.isabnormal == 2) { |
| | | return "yellow-star"; // 警告 - 黄色星号 |
| | | } |
| | | return ""; // 正常 - 无特殊样式 |
| | | }, |
| | | // 获取问卷数据 |
| | | getsearchrResults(id) { |
| | | getsearchrResults({ |
| | |
| | | var objs = item.svyTaskTemplateTargetoptions.find( |
| | | (items) => items.optioncontent == item.scriptResult |
| | | ); |
| | | if (obj) { |
| | | if (objs.isabnormal) { |
| | | |
| | | if (objs) { |
| | | if (excep != 1 && objs.isabnormal) { |
| | | excep = objs.isabnormal; |
| | | this.selectedTag = objs.isabnormal; |
| | | } |
| | | } |
| | | console.log(excep, "excep"); |
| | | |
| | | let obj = { |
| | | asrtext: null, |
| | | patid: this.patid, |
| | |
| | | }, |
| | | yuyingetdetail() { |
| | | const dataToSubmit = JSON.parse(JSON.stringify(this.tableDatatop)); |
| | | |
| | | console.log(dataToSubmit, "dataToSubmit"); |
| | | // return; |
| | | dataToSubmit.forEach((item, index) => { |
| | | // 对拷贝的数据进行操作,不影响原始的 scriptResult 数组 |
| | | item.scriptResult = item.scriptResult.join("&"); |
| | |
| | | if (questionItem.matchedtext == optionValue) { |
| | | this.$set(questionItem, "matchedtext", ""); |
| | | // 同时重置与选项相关的状态 |
| | | questionItem.isabnormal = false; |
| | | // questionItem.isabnormal = false; |
| | | questionItem.showAppendInput = false; |
| | | // 注意:取消选中时,我们通常不希望触发题目跳转逻辑,所以直接返回 |
| | | // 如果需要,可以在这里添加取消选中后的特定逻辑,例如重置题目序列 |
| | |
| | | }, |
| | | // 新增的切换选中/取消选中方法 |
| | | handleRadioToggle(questionItem, index, options, optionValue) { |
| | | console.log(questionItem, optionValue, 999); |
| | | |
| | | // 如果点击的是当前已选中的选项,则取消选中 |
| | | if (questionItem.scriptResult === optionValue) { |
| | | questionItem.scriptResult = ""; // 清空选中值 |
| | | // 同时重置与选项相关的状态 |
| | | questionItem.isabnormal = false; |
| | | // questionItem.isabnormal = false; |
| | | questionItem.showAppendInput = false; |
| | | // 注意:取消选中时,我们通常不希望触发题目跳转逻辑,所以直接返回 |
| | | // 如果需要,可以在这里添加取消选中后的特定逻辑,例如重置题目序列 |
| | |
| | | |
| | | // 处理异常状态高亮 |
| | | this.tableDatatop[questionIndex].isabnormal = |
| | | !!selectedOptionObj.isabnormal; |
| | | selectedOptionObj.isabnormal; |
| | | // 处理附加输入框显示 |
| | | |
| | | this.tableDatatop[questionIndex].showAppendInput = |
| | |
| | | astrict: index === questionIndex + 1 ? 0 : item.astrict, |
| | | hiddenByEnd: index === questionIndex + 1 ? false : item.hiddenByEnd, |
| | | })); |
| | | } |
| | | }2 |
| | | |
| | | this.$forceUpdate(); |
| | | }, |
| | |
| | | ); |
| | | if (obj) { |
| | | if (obj.isabnormal) { |
| | | this.tableDatatop[index].isabnormal = true; |
| | | } else { |
| | | this.tableDatatop[index].isabnormal = false; |
| | | this.tableDatatop[index].isabnormal = obj.isabnormal; |
| | | } |
| | | this.$forceUpdate(); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /* 异常状态样式 - 红色 (保持不变) */ |
| | | .scriptTopic-isabnormal { |
| | | color: red; |
| | | } |
| | | |
| | | /* 新增:警告状态样式 - 黄色 */ |
| | | .scriptTopic-warning { |
| | | color: #d4be00; /* 您指定的黄色 */ |
| | | |
| | | } |
| | | |
| | | /* 异常选项样式 - 红色星号 (保持不变) */ |
| | | .red-star { |
| | | ::v-deep.el-radio__label { |
| | | position: relative; |
| | |
| | | right: -5px; |
| | | top: 0; |
| | | } |
| | | } |
| | | |
| | | ::v-deep.el-input-group__textarea { |
| | | white-space: pre-wrap; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | ::v-deep.el-checkbox__label { |
| | | /* 新增:警告选项样式 - 黄色星号 */ |
| | | .yellow-star { |
| | | ::v-deep.el-radio__label { |
| | | position: relative; |
| | | padding-right: 10px; |
| | | } |
| | | |
| | | ::v-deep.el-checkbox__label::after { |
| | | ::v-deep.el-radio__label::after { |
| | | content: "*"; |
| | | color: red; |
| | | color: #ffe202; /* 黄色星号 */ |
| | | position: absolute; |
| | | right: -5px; |
| | | top: 0; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | /* 共用样式保持不变 */ |
| | | ::v-deep.el-input-group__textarea { |
| | | white-space: pre-wrap; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | ::v-deep.el-checkbox__label { |
| | | position: relative; |
| | | padding-right: 10px; |
| | | } |
| | | |
| | | ::v-deep.el-checkbox__label::after { |
| | | content: "*"; |
| | | color: red; |
| | | position: absolute; |
| | | right: -5px; |
| | | top: 0; |
| | | } |
| | | .tag-selector-container { |
| | | display: flex; |
| | |
| | | margin: 0 10px 20px 10px; |
| | | |
| | | /* 当缩放比例大于100%或屏幕宽度较小时改为上下排列 */ |
| | | @media screen and (min-resolution: 1.5dppx) { |
| | | @media screen and (min-resolution: 1.5dppx) { |
| | | flex-direction: column; |
| | | |
| | | .call-action, |