WXL (wul)
2026-05-08 f9902f7a3b79d22bde9f199263ac36de26816470
src/views/outsideChainwtnew.vue
@@ -1,5 +1,14 @@
<template>
  <div class="questionnaire-optimized">
    <div v-if="loading" class="loading-container">
      <div class="loading-content">
        <i class="el-icon-loading loading-icon"></i>
        <div class="loading-text">问卷加载中,请稍候...</div>
      </div>
    </div>
    <!-- 正常内容 -->
    <div v-else>
    <div class="content-wrapper" v-if="!accomplish">
      <div class="questionnaire-container">
        <!-- 问卷标题区域 -->
@@ -53,7 +62,10 @@
              class="question-options"
              v-if="item.scriptType == 1 && !item.ishide"
            >
              <el-radio-group class="options-group" v-model="item.scriptResult">
                <el-radio-group
                  class="options-group"
                  v-model="item.scriptResult"
                >
                <el-radio
                  v-for="(
                    option, optionIndex
@@ -136,7 +148,11 @@
        <!-- 提交按钮 -->
        <div class="submit-section">
          <el-button type="primary" @click="cache(true)" class="submit-button">
            <el-button
              type="primary"
              @click="cache(true)"
              class="submit-button"
            >
            提交问卷
          </el-button>
        </div>
@@ -158,6 +174,7 @@
      </div>
    </div>
  </div>
  </div>
</template>
<script>
@@ -172,6 +189,7 @@
export default {
  data() {
    return {
      loading: true,
      taskid: 355,
      patid: 265823,
      kcb: "",
@@ -233,7 +251,6 @@
            res.data.param5
          );
          this.param6 = res.data.param6;
        }
      });
    },
@@ -253,6 +270,8 @@
      this.taskid = decodeURIComponent(param1);
      this.patid = decodeURIComponent(param2);
      this.taskname = decodeURIComponent(param3);
      this.loading = true;
      // let taskid =
      //   "OFp7tn/B6x7IzKJetvGWHdSWBj7msRlnlj6am9dyuHTH6sEt4uBbVCUXs5kcF/e4O2W6vqHf2Bz9K3/evbYDmw==";
      // let patid =
@@ -262,8 +281,8 @@
      // let taskids = this.encrypt(this.taskid);
      // let patids = this.encrypt(this.patid);
      // 先取缓存
      getCachequestionnaire({ param1: this.taskid, param2: this.patid }).then(
        (res) => {
      getCachequestionnaire({ param1: this.taskid, param2: this.patid })
        .then((res) => {
          if (res.code == 200) {
            this.questionList = res.data.result;
            this.accomplish = res.data.submit;
@@ -275,6 +294,8 @@
                  item.scriptResult = item.scriptResult.split("&");
                }
              });
              this.loading = false;
              return;
            } else {
              this.getExternalfollowup();
@@ -282,13 +303,13 @@
          } else {
            this.getExternalfollowup();
          }
        }
      );
        })
        .finally(() => {});
    },
    // 获取数据
    getExternalfollowup() {
      getExternalfollowup({ param1: this.taskid, param2: this.patid }).then(
        (res) => {
      getExternalfollowup({ param1: this.taskid, param2: this.patid })
        .then((res) => {
          if (res.code == 200) {
            this.questionList = res.data.script;
            this.jsy = res.data.jsy;
@@ -300,9 +321,12 @@
                item.scriptResult = [];
              }
            });
            this.loading = false;
          }
        }
      );
        })
        .finally(() => {
          this.loading = false;
        });
    },
    // 加密函数
    encrypt(txt) {
@@ -851,4 +875,39 @@
    font-size: 60px;
  }
}
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
}
.loading-content {
  text-align: center;
  padding: 40px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.loading-icon {
  font-size: 40px;
  color: #409eff;
  margin-bottom: 15px;
  animation: rotating 2s linear infinite;
}
.loading-text {
  font-size: 16px;
  color: #606266;
}
@keyframes rotating {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
</style>