WXL
2025-01-10 3dcfdb6a9a1035cc3c4ff34d29f7af0ee2534068
src/views/outsideChainwt.vue
@@ -8,7 +8,7 @@
            {{
              kcb
                ? kcb
                : "亲爱的患者-家属,您好!我们是浙中医大二院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访问卷。"
                : "亲爱的患者-家属,您好!我们是景宁人民医院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访问卷。"
            }}
            <!-- 亲爱的患者/家属您好,为了更好的了解您出院后的康复情况,给您适当及时的健康指导,请您抽一点宝贵时间,完成这份出院随访问卷调查。 -->
          </div>
@@ -36,7 +36,11 @@
                <el-radio
                  border
                  v-for="(items, index) in item.svyLibTemplateTargetoptions"
                  :class="items.isabnormal ? 'red-star' : ''"
                  :class="
                    items.isabnormal && item.scriptResult == items.optioncontent
                      ? 'red-star'
                      : ''
                  "
                  :key="index"
                  :label="items.optioncontent"
                  >{{ items.optioncontent }}</el-radio
@@ -65,7 +69,6 @@
                  border
                  @change="$forceUpdate()"
                  v-for="(items, indexs) in item.svyLibTemplateTargetoptions"
                  :class="items.isabnormal ? 'red-star' : ''"
                  :key="indexs"
                  :label="items.optioncontent"
                >
@@ -73,6 +76,7 @@
                </el-checkbox>
              </el-checkbox-group>
            </div>
            <!-- :class="items.isabnormal ? 'red-star' : ''" -->
            <div v-show="item.prompt && item.scriptResult[0]">
              <el-alert :title="item.prompt" type="warning"> </el-alert>
            </div>
@@ -155,92 +159,93 @@
      taskid: 355,
      patid: 265823,
      kcb: "",
      excep:'',
      questionList: [
        {
          scriptType: 1,
          scriptContent: "您的年龄范围是?",
          scriptResult: null,
          svyLibTemplateTargetoptions: [
            { optioncontent: "18-25", value: "18-25", isabnormal: true },
            { optioncontent: "26-35", value: "26-35" },
            { optioncontent: "36-45", value: "36-45" },
            { optioncontent: "46-55", value: "46-55" },
            { optioncontent: "56+", value: "56+" },
          ],
          required: true,
        },
        {
          scriptType: 1,
          scriptContent: "您的职业是什么?",
          scriptResult: null,
          svyLibTemplateTargetoptions: [
            { optioncontent: "学生", value: "student" },
            { optioncontent: "教师", value: "teacher" },
            { optioncontent: "工程师", value: "engineer" },
            { optioncontent: "医生", value: "doctor" },
            { optioncontent: "其他", value: "other" },
          ],
          required: false,
        },
        {
          scriptType: 2,
          scriptContent: "您感兴趣的活动有哪些?",
          scriptResult: [],
          svyLibTemplateTargetoptions: [
            { optioncontent: "旅游", value: "travel", isabnormal: true },
            { optioncontent: "阅读", value: "reading", isabnormal: true },
            { optioncontent: "运动", value: "sports", isabnormal: true },
            { optioncontent: "音乐", value: "music" },
            { optioncontent: "电影", value: "movies" },
          ],
          required: false,
        },
        {
          scriptType: 1,
          scriptContent: "您的职业是什么?",
          scriptResult: null,
          svyLibTemplateTargetoptions: [
            { optioncontent: "学生", value: "student" },
            { optioncontent: "教师", value: "teacher" },
            { optioncontent: "工程师", value: "engineer" },
            { optioncontent: "医生", value: "doctor" },
            { optioncontent: "其他", value: "other" },
          ],
          required: false,
        },
        {
          scriptType: 1,
          scriptContent: "您的职业是什么?",
          scriptResult: null,
          svyLibTemplateTargetoptions: [
            { optioncontent: "学生", value: "student" },
            { optioncontent: "教师", value: "teacher" },
            { optioncontent: "工程师", value: "engineer", isabnormal: true },
            { optioncontent: "医生", value: "doctor" },
            { optioncontent: "其他", value: "other" },
          ],
          required: false,
        },
        {
          scriptType: 1,
          scriptContent: "您的职业是什么?",
          scriptResult: null,
          svyLibTemplateTargetoptions: [
            { optioncontent: "学生", value: "student" },
            { optioncontent: "教师", value: "teacher" },
            { optioncontent: "工程师", value: "engineer" },
            { optioncontent: "医生", value: "doctor" },
            { optioncontent: "其他", value: "other" },
          ],
          required: false,
        },
        {
          scriptType: 4,
          scriptContent: "您的姓名是什么?",
          scriptResult: "name",
          required: true,
          scriptResult: null,
        },
        // {
        //   scriptType: 1,
        //   scriptContent: "您的年龄范围是?",
        //   scriptResult: null,
        //   svyLibTemplateTargetoptions: [
        //     { optioncontent: "18-25", value: "18-25", isabnormal: true },
        //     { optioncontent: "26-35", value: "26-35" },
        //     { optioncontent: "36-45", value: "36-45" },
        //     { optioncontent: "46-55", value: "46-55" },
        //     { optioncontent: "56+", value: "56+" },
        //   ],
        //   required: true,
        // },
        // {
        //   scriptType: 1,
        //   scriptContent: "您的职业是什么?",
        //   scriptResult: null,
        //   svyLibTemplateTargetoptions: [
        //     { optioncontent: "学生", value: "student" },
        //     { optioncontent: "教师", value: "teacher" },
        //     { optioncontent: "工程师", value: "engineer" },
        //     { optioncontent: "医生", value: "doctor" },
        //     { optioncontent: "其他", value: "other" },
        //   ],
        //   required: false,
        // },
        // {
        //   scriptType: 2,
        //   scriptContent: "您感兴趣的活动有哪些?",
        //   scriptResult: [],
        //   svyLibTemplateTargetoptions: [
        //     { optioncontent: "旅游", value: "travel", isabnormal: true },
        //     { optioncontent: "阅读", value: "reading", isabnormal: true },
        //     { optioncontent: "运动", value: "sports", isabnormal: true },
        //     { optioncontent: "音乐", value: "music" },
        //     { optioncontent: "电影", value: "movies" },
        //   ],
        //   required: false,
        // },
        // {
        //   scriptType: 1,
        //   scriptContent: "您的职业是什么?",
        //   scriptResult: null,
        //   svyLibTemplateTargetoptions: [
        //     { optioncontent: "学生", value: "student" },
        //     { optioncontent: "教师", value: "teacher" },
        //     { optioncontent: "工程师", value: "engineer" },
        //     { optioncontent: "医生", value: "doctor" },
        //     { optioncontent: "其他", value: "other" },
        //   ],
        //   required: false,
        // },
        // {
        //   scriptType: 1,
        //   scriptContent: "您的职业是什么?",
        //   scriptResult: null,
        //   svyLibTemplateTargetoptions: [
        //     { optioncontent: "学生", value: "student" },
        //     { optioncontent: "教师", value: "teacher" },
        //     { optioncontent: "工程师", value: "engineer", isabnormal: true },
        //     { optioncontent: "医生", value: "doctor" },
        //     { optioncontent: "其他", value: "other" },
        //   ],
        //   required: false,
        // },
        // {
        //   scriptType: 1,
        //   scriptContent: "您的职业是什么?",
        //   scriptResult: null,
        //   svyLibTemplateTargetoptions: [
        //     { optioncontent: "学生", value: "student" },
        //     { optioncontent: "教师", value: "teacher" },
        //     { optioncontent: "工程师", value: "engineer" },
        //     { optioncontent: "医生", value: "doctor" },
        //     { optioncontent: "其他", value: "other" },
        //   ],
        //   required: false,
        // },
        // {
        //   scriptType: 4,
        //   scriptContent: "您的姓名是什么?",
        //   scriptResult: "name",
        //   required: true,
        //   scriptResult: null,
        // },
      ],
      jsy: null,
      dialogVisible: false,
@@ -343,6 +348,7 @@
      let form = {
        param1: this.taskid,
        param2: this.patid,
        excep:this.excep,
        serviceSubtaskDetailList: [],
      };
      const arr = structuredClone(this.questionList);
@@ -372,6 +378,18 @@
        svyLibTemplateScriptVOS: [],
      };
      const arr = structuredClone(this.questionList);
      console.log(arr,'srr')
      arr.forEach((item, index) => {
        var obj = item.svyLibTemplateTargetoptions.find(
          (items) => items.optioncontent == item.scriptResult
        );
        if (obj.isabnormal) {
          console.log(obj.isabnormal);
          form.excep = 1;
          this.excep=1;
        }
      });
      arr.forEach((item) => {
        if (item.scriptType == 2 && item.scriptResult[0]) {
          item.scriptResult = item.scriptResult.join("&");
@@ -478,10 +496,7 @@
    }
  }
}
.red-star {
  position: relative;
  padding-right: 15px;
}
.red-star {
  ::v-deep.el-radio__label {
    position: relative;