| | |
| | | <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"> |
| | | <!-- 问卷标题区域 --> |
| | |
| | | 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 |
| | |
| | | |
| | | <!-- 提交按钮 --> |
| | | <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> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | loading: true, |
| | | taskid: 355, |
| | | patid: 265823, |
| | | kcb: "", |
| | |
| | | res.data.param5 |
| | | ); |
| | | this.param6 = res.data.param6; |
| | | |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.taskid = decodeURIComponent(param1); |
| | | this.patid = decodeURIComponent(param2); |
| | | this.taskname = decodeURIComponent(param3); |
| | | this.loading = true; |
| | | |
| | | // let taskid = |
| | | // "OFp7tn/B6x7IzKJetvGWHdSWBj7msRlnlj6am9dyuHTH6sEt4uBbVCUXs5kcF/e4O2W6vqHf2Bz9K3/evbYDmw=="; |
| | | // let patid = |
| | |
| | | // 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; |
| | |
| | | item.scriptResult = item.scriptResult.split("&"); |
| | | } |
| | | }); |
| | | this.loading = false; |
| | | |
| | | return; |
| | | } else { |
| | | this.getExternalfollowup(); |
| | |
| | | } 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; |
| | |
| | | item.scriptResult = []; |
| | | } |
| | | }); |
| | | this.loading = false; |
| | | } |
| | | } |
| | | ); |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 加密函数 |
| | | encrypt(txt) { |
| | |
| | | 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> |