|  |  | 
 |  |  | // 新增用户 | 
 |  |  | export function addUser(data) { | 
 |  |  |   return request({ | 
 |  |  |     url: '/system/user', | 
 |  |  |     url: '/system/user/add', | 
 |  |  |     method: 'post', | 
 |  |  |     data: data | 
 |  |  |   }) | 
 
 |  |  | 
 |  |  |               > | 
 |  |  |               </el-input> </el-form-item | 
 |  |  |           ></el-col> | 
 |  |  |           <el-col :span="12" | 
 |  |  |           <el-col :span="12" v-show="branchFlag" | 
 |  |  |             ><el-form-item label="选中跳转"> | 
 |  |  |               <el-input | 
 |  |  |                 type="text" | 
 |  |  |                 @blur="$emit('branchFlagfn', item.nextQuestion)" | 
 |  |  |                 placeholder="请输入题目节点" | 
 |  |  |                 v-model="item.nextQuestion" | 
 |  |  |                 show-word-limit | 
 |  |  | 
 |  |  |       type: Boolean, | 
 |  |  |       default: true, | 
 |  |  |     }, | 
 |  |  |     branchFlag: { | 
 |  |  |       type: Boolean, | 
 |  |  |       default: false, | 
 |  |  |     }, | 
 |  |  |   }, | 
 |  |  |  | 
 |  |  |   created() { | 
 
 |  |  | 
 |  |  |                 @change="handleInputConfirm" | 
 |  |  |                 filterable | 
 |  |  |                 remote | 
 |  |  |                 allow-create | 
 |  |  |                 reserve-keyword | 
 |  |  |                 default-first-option | 
 |  |  |                 :remote-method="remoteMethodtag" | 
 
 |  |  | 
 |  |  |                 ></el-col> | 
 |  |  |                 <el-col :span="8" | 
 |  |  |                   ><el-form-item label="是否可用"> | 
 |  |  |                     <el-radio-group v-model="topicobj.isAvailable"> | 
 |  |  |                     <el-radio-group v-model="topicobj.isavailable"> | 
 |  |  |                       <el-radio | 
 |  |  |                         v-for="(item, index) in usable" | 
 |  |  |                         :label="item.value" | 
 |  |  | 
 |  |  |                   topicobj.targetname ? "修改指标" : "+选择指标" | 
 |  |  |                 }}</el-button></span | 
 |  |  |               > | 
 |  |  |               <span style="margin-left: 30px" | 
 |  |  |                 ><el-button type="primary" @click="Saveproblem" | 
 |  |  |                   >保 存</el-button | 
 |  |  |                 > | 
 |  |  |               </span> | 
 |  |  |             </div> | 
 |  |  |             <el-divider></el-divider> | 
 |  |  |             <el-form ref="form"> | 
 |  |  | 
 |  |  |                 </el-col> | 
 |  |  |               </el-row> | 
 |  |  |             </el-form> | 
 |  |  |             <div> | 
 |  |  |               <el-divider></el-divider> | 
 |  |  |             <div v-if="topicobj.scriptType != 4"> | 
 |  |  |               <div class="headline"> | 
 |  |  |                 选项设置<span style="margin-left: 30px" | 
 |  |  | 
 |  |  |                   ></span | 
 |  |  |                 > | 
 |  |  |               </div> | 
 |  |  |               <el-divider></el-divider> | 
 |  |  |  | 
 |  |  |               <div | 
 |  |  |                 class="topicxq" | 
 |  |  |                 v-for="item in topicobj.svyLibScriptOptions" | 
 |  |  | 
 |  |  |                     </el-form-item> | 
 |  |  |                   </el-col> | 
 |  |  |  | 
 |  |  |                   <el-col :span="2" :offsset="topicobj.scoretype == 4 ? 11 : 0"> | 
 |  |  |                     <el-col | 
 |  |  |                       :span="2" | 
 |  |  |                       :offsset="topicobj.scoretype == 4 ? 11 : 0" | 
 |  |  |                     > | 
 |  |  |                     <el-button | 
 |  |  |                       type="danger" | 
 |  |  |                       icon="el-icon-delete" | 
 |  |  | 
 |  |  |                     </div> | 
 |  |  |                   </div> | 
 |  |  |                 </el-form-item> | 
 |  |  |                 </div> | 
 |  |  |               </div> | 
 |  |  |               <div v-else class="topicxq"> | 
 |  |  |                 <el-input | 
 |  |  | 
 |  |  |           <el-table-column | 
 |  |  |             label="是否可用" | 
 |  |  |             align="center" | 
 |  |  |             key="isAvailable" | 
 |  |  |             prop="isAvailable" | 
 |  |  |             key="isavailable" | 
 |  |  |             prop="isavailable" | 
 |  |  |           > | 
 |  |  |             <template slot-scope="scope"> | 
 |  |  |               <dict-tag :options="usable" :value="scope.row.isAvailable" /> | 
 |  |  |               <dict-tag :options="usable" :value="scope.row.isavailable" /> | 
 |  |  |             </template> | 
 |  |  |           </el-table-column> | 
 |  |  |           <el-table-column | 
 |  |  | 
 |  |  |         { value: "scriptTopic", table: "scriptTopic" }, | 
 |  |  |       ], | 
 |  |  |       inputValueillness: "", | 
 |  |  |       testgovalue: "", | 
 |  |  |       required: [], | 
 |  |  |       themelist: [], | 
 |  |  |       languagelist: [], | 
 |  |  | 
 |  |  |     // 获取数据 | 
 |  |  |     getissueinfo() { | 
 |  |  |       this.id = this.$route.query.id; | 
 |  |  |       if (this.$route.query.categoryid) { | 
 |  |  |       this.topicobj.categoryid = Number(this.$route.query.categoryid); | 
 |  |  |       console.log(this.topicobj.categoryid); | 
 |  |  |  | 
 |  |  |       } | 
 |  |  |       this.topicobj.isavailable = "1"; | 
 |  |  |       this.topicobj.language = "普通话"; | 
 |  |  |       // 分类 | 
 |  |  | 
 |  |  |     // 判断分值 | 
 |  |  |     Scorejudgment() { | 
 |  |  |       let scorearr = this.topicobj.svyLibScriptOptions; | 
 |  |  |       let isValid = scorearr.every((score) => { | 
 |  |  |       let isValid = scorearr.every((score, index) => { | 
 |  |  |         if (this.topicobj.scriptType == 1) { | 
 |  |  |         if (score.score) { | 
 |  |  |           console.log(Number(score.score), this.topicobj.score, "分值"); | 
 |  |  |           if ( | 
 |  |  |             Number(score.score) < 0 || | 
 |  |  |             Number(score.score) > Number(this.topicobj.score) | 
 |  |  | 
 |  |  |             return false; | 
 |  |  |           } | 
 |  |  |           return true; | 
 |  |  |         } else if (this.topicobj.scriptType == 3) { | 
 |  |  |           return true; | 
 |  |  |         } else { | 
 |  |  |           this.$message({ | 
 |  |  |             message: "选项分值未设置", | 
 |  |  | 
 |  |  |           }); | 
 |  |  |           return false; | 
 |  |  |         } | 
 |  |  |         } else if (this.topicobj.scriptType == 2) { | 
 |  |  |           // 累加分值 | 
 |  |  |           const totalScore = scorearr.reduce((acc, score) => { | 
 |  |  |             if (score.score) { | 
 |  |  |               return acc + Number(score.score); | 
 |  |  |             } | 
 |  |  |             return acc; // 如果 score.score 不存在,不累加 | 
 |  |  |           }, 0); | 
 |  |  |  | 
 |  |  |           // 检查累加的分值是否等于 this.topicobj.score | 
 |  |  |           if (totalScore !== Number(this.topicobj.score)) { | 
 |  |  |             this.$message({ | 
 |  |  |               message: | 
 |  |  |                 "多选题选项分值总和必须等于 " + this.topicobj.score + " 分", | 
 |  |  |               type: "warning", | 
 |  |  |             }); | 
 |  |  |             return false; | 
 |  |  |           } | 
 |  |  |           return true; // 如果总分正确,返回 true | 
 |  |  |         } else if (this.topicobj.scriptType == 4) { | 
 |  |  |           return true; | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |  | 
 |  |  |       if (isValid) { | 
 |  |  |         this.compileissue(); | 
 |  |  |         // console.log("到保存了"); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     Saveproblem() { | 
 |  |  | 
 |  |  |     // 判断指标 | 
 |  |  |     changefn(item) { | 
 |  |  |       console.log(item); | 
 |  |  |  | 
 |  |  |       if (this.topicobj.targetname || this.topicobj.svyLibScriptOptions[0]) { | 
 |  |  |         this.$modal | 
 |  |  |           .confirm("更改类型后选项将清空是否继续?") | 
 |  |  |           .then(() => { | 
 |  |  |             this.scriptTypels = this.topicobj.scriptType; | 
 |  |  |             this.topicobj.svyLibScriptOptions = []; | 
 |  |  |             this.topicobj.svyLibScriptOptions.forEach((item) => { | 
 |  |  |               item.isoperation = 3; | 
 |  |  |             }); | 
 |  |  |           }) | 
 |  |  |           .catch(() => { | 
 |  |  |             this.topicobj.scriptType = this.scriptTypels; | 
 |  |  | 
 |  |  |       console.log(this.topicobj.svyLibScriptOptions); | 
 |  |  |  | 
 |  |  |       if (this.topicobj.svyLibScriptOptions[index].id) { | 
 |  |  |         console.log(2); | 
 |  |  |  | 
 |  |  |         this.topicobj.svyLibScriptOptions[index].isoperation = 3; | 
 |  |  |       } else { | 
 |  |  |         this.topicobj.svyLibScriptOptions.splice(index, 1); | 
 |  |  | 
 |  |  |         tagcategoryid: "0", | 
 |  |  |       }; | 
 |  |  |       listtag(tagqueryParams).then((response) => { | 
 |  |  |         console.log(response, "待选标签"); | 
 |  |  |         this.optionstag = response.rows; | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  |     handleClosetag(tag) { | 
 |  |  |       console.log(tag); | 
 |  |  |       console.log(this.dynamicTags.indexOf(tag)); | 
 |  |  |       const lindex = this.dynamicTags.indexOf(tag); | 
 |  |  |       this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1); | 
 |  |  | 
 |  |  |     border-radius: 4px; | 
 |  |  |     margin-top: 15px; | 
 |  |  |     margin-left: 10%; | 
 |  |  |     padding-left: 20px; | 
 |  |  |     padding-top: 15px; | 
 |  |  |     padding: 20px; | 
 |  |  |     border: 1px solid #dcdfe6; | 
 |  |  |     -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), | 
 |  |  |       0 0 6px 0 rgba(0, 0, 0, 0.04); | 
 
 |  |  | 
 |  |  |       </div> | 
 |  |  |       <!-- 问卷设置 --> | 
 |  |  |       <div v-if="Editprogress == 2"> | 
 |  |  |         <div class="leftvlue-jbxx">问卷题目设置</div> | 
 |  |  |         <div class="leftvlue-jbxx"> | 
 |  |  |           问卷题目设置 | 
 |  |  |           <span style="" | 
 |  |  |             ><el-button | 
 |  |  |               type="warning" | 
 |  |  |               icon="el-icon-finished" | 
 |  |  |               round | 
 |  |  |               @click="test" | 
 |  |  |               >题目规则效验</el-button | 
 |  |  |             ></span | 
 |  |  |           > | 
 |  |  |         </div> | 
 |  |  |         <el-divider></el-divider> | 
 |  |  |         <div style="display: flex; justify-content: space-between"> | 
 |  |  |           <div> | 
 |  |  | 
 |  |  |                   key="nextScriptno" | 
 |  |  |                   prop="nextScriptno" | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 /> | 
 |  |  |                 > | 
 |  |  |                   <template slot-scope="scope"> | 
 |  |  |                     <span>{{ | 
 |  |  |                       scope.row.nextScriptno == 0 | 
 |  |  |                         ? "已是最后一题" | 
 |  |  |                         : scope.row.nextScriptno | 
 |  |  |                     }}</span> | 
 |  |  |                   </template> | 
 |  |  |                 </el-table-column> | 
 |  |  |  | 
 |  |  |                 <el-table-column | 
 |  |  |                   v-if="Operateit" | 
 |  |  | 
 |  |  |                       ></el-input> </el-form-item | 
 |  |  |                   ></el-col> | 
 |  |  |                   <el-col :span="12"> | 
 |  |  |                     <el-form-item label="下题跳转" v-if="!topicobj.branchFlag"> | 
 |  |  |                     <el-form-item label="下题跳转"> | 
 |  |  |                       <el-input | 
 |  |  |                         v-model="topicobj.nextScriptno" | 
 |  |  |                         placeholder="请输入题号" | 
 |  |  | 
 |  |  |                         </el-option> </el-select></el-form-item | 
 |  |  |                   ></el-col> | 
 |  |  |                   <el-col :span="12"> | 
 |  |  |                     <el-form-item label="题目分数"> | 
 |  |  |                     <el-form-item | 
 |  |  |                       label="题目分值" | 
 |  |  |                       v-if="topicobj.scoretype == 1" | 
 |  |  |                     > | 
 |  |  |                       <el-input | 
 |  |  |                         v-model="topicobj.scriptTopic" | 
 |  |  |                         placeholder="请输入标题" | 
 |  |  |                       ></el-input> </el-form-item | 
 |  |  |                   ></el-col> | 
 |  |  |                         v-model="topicobj.score" | 
 |  |  |                         placeholder="请输入题号" | 
 |  |  |                       ></el-input> | 
 |  |  |                     </el-form-item> | 
 |  |  |                   </el-col> | 
 |  |  |                 </el-row> | 
 |  |  |  | 
 |  |  |                 <el-row :gutter="10"> | 
 |  |  | 
 |  |  |                     </el-form-item></el-col | 
 |  |  |                   > | 
 |  |  |                 </el-row> | 
 |  |  |                 <el-row> | 
 |  |  |                   <el-col :span="12"> | 
 |  |  |                     <el-form-item | 
 |  |  |                       label="题目分值" | 
 |  |  |                       v-if="topicobj.scoretype == 1" | 
 |  |  |                   label="是否由选项配置跳转" | 
 |  |  |                   v-if="topicobj.scriptType == 1" | 
 |  |  |                     > | 
 |  |  |                       <el-input | 
 |  |  |                         v-model="topicobj.score" | 
 |  |  |                         placeholder="请输入题号" | 
 |  |  |                       ></el-input> | 
 |  |  |                     </el-form-item> | 
 |  |  |                   </el-col> | 
 |  |  |                 </el-row> | 
 |  |  |                 <el-form-item label="是否由选项配置跳转"> | 
 |  |  |                   <el-radio-group v-model="topicobj.branchFlag"> | 
 |  |  |                     <el-radio :label="1">是</el-radio> | 
 |  |  |                     <el-radio :label="0">否</el-radio> | 
 |  |  | 
 |  |  |                       <el-col :span="8"> | 
 |  |  |                         <el-form-item | 
 |  |  |                           v-if="topicobj.scoretype == 1" | 
 |  |  |                           label="分值" | 
 |  |  |                           label="选项分值" | 
 |  |  |                         > | 
 |  |  |                           <el-input | 
 |  |  |                             class="custom-width" | 
 |  |  | 
 |  |  |                         </el-form-item> | 
 |  |  |                       </el-col> | 
 |  |  |                     </el-row> | 
 |  |  |                     <el-row :gutter="10"> | 
 |  |  |                     <el-row :gutter="10" v-if="topicobj.branchFlag == 1"> | 
 |  |  |                       <el-col :span="20" | 
 |  |  |                         ><el-form-item label="下题跳转(序号)"> | 
 |  |  |                           <el-input | 
 |  |  |                             type="text" | 
 |  |  |                             @blur="branchFlagfn" | 
 |  |  |                             placeholder="请输入题号" | 
 |  |  |                             v-model="item.nextQuestion" | 
 |  |  |                             show-word-limit | 
 |  |  | 
 |  |  |         <div class="leftvlue-jbxx">问卷预览</div> | 
 |  |  |         <el-divider></el-divider> | 
 |  |  |         <div class="preview-left"> | 
 |  |  |           <div v-for="item in ruleForm.svyTemplateLibScripts"> | 
 |  |  |           <!-- 单选 --> | 
 |  |  |           <div | 
 |  |  |             class="scriptTopic-dev" | 
 |  |  |             v-for="item in ruleForm.svyTemplateLibScripts" | 
 |  |  |             :key="item.sort" | 
 |  |  |             v-if="item.scriptType == 1" | 
 |  |  |           > | 
 |  |  | 
 |  |  |           <!-- 多选 --> | 
 |  |  |           <div | 
 |  |  |             class="scriptTopic-dev" | 
 |  |  |             v-for="item in ruleForm.svyTemplateLibScripts" | 
 |  |  |             :key="item.sort" | 
 |  |  |             v-if="item.scriptType == 2" | 
 |  |  |           > | 
 |  |  | 
 |  |  |           <!-- 填空 --> | 
 |  |  |           <div | 
 |  |  |             class="scriptTopic-dev" | 
 |  |  |             v-for="item in ruleForm.svyTemplateLibScripts" | 
 |  |  |             :key="item.sort" | 
 |  |  |             v-if="item.scriptType == 3" | 
 |  |  |           > | 
 |  |  | 
 |  |  |             <div class="dev-xx"> | 
 |  |  |               <el-input placeholder="请输入答案" v-model="radioas" clearable> | 
 |  |  |               </el-input> | 
 |  |  |               </div> | 
 |  |  |             </div> | 
 |  |  |           </div> | 
 |  |  |         </div> | 
 |  |  | 
 |  |  |       this.sortFn(); | 
 |  |  |     }, | 
 |  |  |     sortFn() { | 
 |  |  |       console.log(this.ruleForm.svyTemplateLibScripts, "序前值"); | 
 |  |  |       this.ruleForm.svyTemplateLibScripts.forEach((item, index) => { | 
 |  |  |         item.sort = Number(index) + 1; | 
 |  |  |         console.log(this.ruleForm.svyTemplateLibScripts.length, "length"); | 
 |  |  |  | 
 |  |  |         if (item.sort == this.ruleForm.svyTemplateLibScripts.length) { | 
 |  |  |           item.nextScriptno = "已是最后一题"; | 
 |  |  |           item.nextScriptno = 0; | 
 |  |  |         } else { | 
 |  |  |           item.nextScriptno = item.sort + 1; | 
 |  |  |         } | 
 |  |  | 
 |  |  |       this.illnessVisible = false; | 
 |  |  |       this.$modal.msgSuccess("编辑成功"); | 
 |  |  |     }, | 
 |  |  |     // -------------------------- | 
 |  |  |     resetQuery() { | 
 |  |  |       this.queryParams = { pageNum: 1, pageSize: 10 }; | 
 |  |  |       this.getaddtopiclist(); | 
 |  |  |     }, | 
 |  |  |     resetForm(formName) { | 
 |  |  |       this.$refs[formName].resetFields(); | 
 |  |  |     }, | 
 |  |  |  | 
 |  |  |     // -------------------------- | 
 |  |  |     // 问卷分数限制算法 | 
 |  |  |     // 混合路线 | 
 |  |  |     generateCombinations(arrays, currentIndex = 0, currentCombination = []) { | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     // 执行 | 
 |  |  |     test() { | 
 |  |  |       const arrays = [ | 
 |  |  |         ["2", "3", "4", "5"], | 
 |  |  |         ["1", "2", "5", "6"], | 
 |  |  |         ["3", "4", "5", "3"], | 
 |  |  |         ["3", "2", "5", "7"], | 
 |  |  |       ]; | 
 |  |  |       console.log(this.ruleForm.svyTemplateLibScripts); | 
 |  |  |  | 
 |  |  |       const arraysa = [ | 
 |  |  |         { | 
 |  |  |           id: 1, | 
 |  |  |           grade: "5", | 
 |  |  |           Topicjump: "2", | 
 |  |  |           branchFlag: "0", | 
 |  |  |           arr: [ | 
 |  |  |             { name: "不错", skip: 2 }, | 
 |  |  |             { name: "一般", skip: 2 }, | 
 |  |  | 
 |  |  |  | 
 |  |  |         { | 
 |  |  |           id: 2, | 
 |  |  |           grade: "5", | 
 |  |  |           Topicjump: "4", | 
 |  |  |           branchFlag: "1", | 
 |  |  |           arr: [ | 
 |  |  |             { name: "优秀", skip: 3 }, | 
 |  |  |             { name: "优秀", skip: 4 }, | 
 |  |  |             { name: "良好", skip: 3 }, | 
 |  |  |             { name: "一般", skip: 3 }, | 
 |  |  |             { name: "较差", skip: 4 }, | 
 |  |  |             { name: "较差", skip: 3 }, | 
 |  |  |           ], | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           id: 3, | 
 |  |  |           grade: "5", | 
 |  |  |           Topicjump: "4", | 
 |  |  |           branchFlag: "1", | 
 |  |  |           arr: [ | 
 |  |  |             { name: "是的", skip: 4 }, | 
 |  |  |             { name: "不清楚", skip: 4 }, | 
 |  |  |             { name: "不清楚", skip: 5 }, | 
 |  |  |             { name: "还可", skip: 4 }, | 
 |  |  |             { name: "一般", skip: 4 }, | 
 |  |  |           ], | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           id: 4, | 
 |  |  |           grade: "5", | 
 |  |  |           Topicjump: "5", | 
 |  |  |           branchFlag: "0", | 
 |  |  |           bac: null, | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           id: 5, | 
 |  |  |           Topicjump: "0", | 
 |  |  |           branchFlag: "0", | 
 |  |  |           arr: [ | 
 |  |  |             { name: "真不错", skip: null }, | 
 |  |  |             { name: "还可以", skip: null }, | 
 |  |  |             { name: "一般般", skip: null }, | 
 |  |  |             { name: "不清楚", skip: null }, | 
 |  |  |             { name: "真不错", skip: 0 }, | 
 |  |  |             { name: "还可以", skip: 0 }, | 
 |  |  |             { name: "一般般", skip: 0 }, | 
 |  |  |             { name: "不清楚", skip: 0 }, | 
 |  |  |           ], | 
 |  |  |         }, | 
 |  |  |       ]; | 
 |  |  |  | 
 |  |  |       // const newMixArray = this.generateCombinations(arrays); | 
 |  |  |       const newMixArray = this.getExecutionOrders(arraysa); | 
 |  |  |  | 
 |  |  |       const csnewMixArray = this.csgetExecutionOrders(arraysa); | 
 |  |  |       console.log(csnewMixArray, "测试全部路线"); | 
 |  |  |       const newMixArray = this.getExecutionOrders( | 
 |  |  |         this.ruleForm.svyTemplateLibScripts | 
 |  |  |       ); | 
 |  |  |       console.log(newMixArray, "全部路线"); | 
 |  |  |       this.screen(newMixArray); | 
 |  |  |       this.sumArray(newMixArray); | 
 |  |  |     }, | 
 |  |  |     getExecutionOrders(data) { | 
 |  |  |       let orders = []; | 
 |  |  |     // 遍历方法 | 
 |  |  |     csgetExecutionOrders(arrays) { | 
 |  |  |       const allPaths = []; | 
 |  |  |       const findPath = (currentId, path) => { | 
 |  |  |         const current = arrays.find((item) => item.id.toString() === currentId); | 
 |  |  |         if (!current) return; | 
 |  |  |         path.push(current); | 
 |  |  |  | 
 |  |  |       const explore = (currentOrder, id) => { | 
 |  |  |         console.log(currentOrder, "currentOrder", id); | 
 |  |  |         const currentQuestion = data[currentOrder[currentOrder.length - 1]]; | 
 |  |  |         if ( | 
 |  |  |           currentQuestion.arr.some( | 
 |  |  |             (option) => | 
 |  |  |               option.skip !== null && !currentOrder.includes(option.skip) | 
 |  |  |           ) | 
 |  |  |         ) { | 
 |  |  |           currentQuestion.arr.forEach((option) => { | 
 |  |  |             if (option.skip !== null && !currentOrder.includes(option.skip)) { | 
 |  |  |               explore([...currentOrder, option.skip]); | 
 |  |  |             } | 
 |  |  |         if (current.branchFlag === "1") { | 
 |  |  |           current.arr.forEach((option) => { | 
 |  |  |             findPath(option.skip.toString(), path.slice()); | 
 |  |  |           }); | 
 |  |  |         } else { | 
 |  |  |           orders.push( | 
 |  |  |             currentOrder.map((id) => ({ | 
 |  |  |               id: data[id].id, | 
 |  |  |               grade: data[id].grade, | 
 |  |  |             })) | 
 |  |  |           ); | 
 |  |  |           const nextId = parseInt(current.Topicjump); | 
 |  |  |           if (nextId !== 0) { | 
 |  |  |             findPath(nextId.toString(), path.slice()); | 
 |  |  |           } else { | 
 |  |  |             allPaths.push(path.slice()); | 
 |  |  |           } | 
 |  |  |         } | 
 |  |  |       }; | 
 |  |  |       console.log(data, "data"); | 
 |  |  |       data.forEach((entry) => { | 
 |  |  |         explore([entry.id], entry.id); | 
 |  |  |       }); | 
 |  |  |  | 
 |  |  |       return orders; | 
 |  |  |       findPath("1", []); | 
 |  |  |       return allPaths; | 
 |  |  |     }, | 
 |  |  |     // 遍历方法 | 
 |  |  |     getExecutionOrders(arrays) { | 
 |  |  |       const allPaths = []; | 
 |  |  |       const findPath = (currentId, path) => { | 
 |  |  |         const current = arrays.find( | 
 |  |  |           (item) => item.sort.toString() === currentId | 
 |  |  |         ); | 
 |  |  |         if (!current) return; | 
 |  |  |         path.push(current); | 
 |  |  |  | 
 |  |  |         if (current.branchFlag == "1") { | 
 |  |  |           current.svyLibTemplateTargetoptions.forEach((option) => { | 
 |  |  |             findPath(option.nextQuestion.toString(), path.slice()); | 
 |  |  |           }); | 
 |  |  |         } else { | 
 |  |  |           const nextId = parseInt(current.nextScriptno); | 
 |  |  |           if (nextId !== 0) { | 
 |  |  |             findPath(nextId.toString(), path.slice()); | 
 |  |  |           } else { | 
 |  |  |             allPaths.push(path.slice()); | 
 |  |  |           } | 
 |  |  |         } | 
 |  |  |       }; | 
 |  |  |  | 
 |  |  |       findPath("1", []); | 
 |  |  |       return allPaths; | 
 |  |  |     }, | 
 |  |  |  | 
 |  |  |     // 数组求和 | 
 |  |  |     sumArray(arr) { | 
 |  |  |       return arr.reduce((acc, curr) => acc + parseInt(curr), 0); | 
 |  |  |     }, | 
 |  |  |     // 筛选错误路线 | 
 |  |  |     screen(data) { | 
 |  |  |       const arraysGreaterThan10 = data.filter((arr) => this.sumArray(arr) > 21); | 
 |  |  |       // const arrsum = arr; | 
 |  |  |       // arrsum.forEach((item) => { | 
 |  |  |       //   // 判断题目和模版层级 | 
 |  |  |       //   console.log(item, "一条链路"); | 
 |  |  |  | 
 |  |  |       console.log(arraysGreaterThan10, "筛选错误路线大于13分"); | 
 |  |  |       //   const totalScore = item.reduce((accumulator, current) => { | 
 |  |  |       //     return accumulator + Number(current.score); | 
 |  |  |       //   }, 0); | 
 |  |  |       //   console.log(totalScore); | 
 |  |  |       //   console.log(this.ruleForm.scriptScore); | 
 |  |  |  | 
 |  |  |       //   if (totalScore == this.ruleForm.scriptScore) { | 
 |  |  |       //     this.ClaimNofn(arr); | 
 |  |  |       //     this.$modal.msgSuccess("分数核验成功"); | 
 |  |  |       //   } | 
 |  |  |       // }); | 
 |  |  |  | 
 |  |  |       const allGreaterThanTen = arr.every((array) => { | 
 |  |  |         const totalScore = array.reduce((accumulator, current) => { | 
 |  |  |           return accumulator + current.score; | 
 |  |  |         }, 0); | 
 |  |  |         return totalScore == this.ruleForm.scriptScore; | 
 |  |  |       }); | 
 |  |  |       if (allGreaterThanTen) { | 
 |  |  |         this.$modal.msgSuccess("题目分值累加和模版总分相符"); | 
 |  |  |       } else { | 
 |  |  |         this.$modal.msgError("题目分值累加和模版分值不符"); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |  | 
 |  |  |     // 遍历是否重复是否都用上 | 
 |  |  |     ClaimNofn(arr) { | 
 |  |  |       arr.forEach((item) => { | 
 |  |  |         const Aarr = item; | 
 |  |  |         const Barr = this.ruleForm.svyTemplateLibScripts; | 
 |  |  |         const notInB = A.filter( | 
 |  |  |           (itemA) => !B.some((itemB) => itemB.id === itemA.id) | 
 |  |  |         ); | 
 |  |  |  | 
 |  |  |         if (notInB.length) { | 
 |  |  |           this.$modal.msgError("题目未全部使用"); | 
 |  |  |         } else { | 
 |  |  |           this.$modal.msgSuccess("题目全部使用"); | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |       arr.forEach((item) => { | 
 |  |  |         const idCount = arr.reduce((acc, item) => { | 
 |  |  |           acc[item.id] = (acc[item.id] || 0) + 1; | 
 |  |  |           return acc; | 
 |  |  |         }, {}); | 
 |  |  |         const whether = item.values(idCount).some((count) => count > 1); // 如果有任何 id 的计数大于 1 就返回 true | 
 |  |  |         if (!whether) this.$modal.msgError("配置项有题目重复"); | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  |     // 题目和选项间的分值判断 | 
 |  |  |     Scorejudgment() { | 
 |  |  |       let scorearr = this.topicobj.svyLibScriptOptions; | 
 |  |  |       let isValid = scorearr.every((score, index) => { | 
 |  |  |         if (this.topicobj.scriptType == 1) { | 
 |  |  |           if (score.score) { | 
 |  |  |             if ( | 
 |  |  |               Number(score.score) < 0 || | 
 |  |  |               Number(score.score) > Number(this.topicobj.score) | 
 |  |  |             ) { | 
 |  |  |               console.log(score, "错误分值"); | 
 |  |  |               this.$message({ | 
 |  |  |                 message: "选项分值必须在0到" + this.topicobj.score + "分之间", | 
 |  |  |                 type: "warning", | 
 |  |  |               }); | 
 |  |  |               return false; | 
 |  |  |             } | 
 |  |  |             return true; | 
 |  |  |           } else { | 
 |  |  |             this.$message({ | 
 |  |  |               message: "选项分值未设置", | 
 |  |  |               type: "warning", | 
 |  |  |             }); | 
 |  |  |             return false; | 
 |  |  |           } | 
 |  |  |         } else if (this.topicobj.scriptType == 2) { | 
 |  |  |           // 累加分值 | 
 |  |  |           const totalScore = scorearr.reduce((acc, score) => { | 
 |  |  |             if (score.score) { | 
 |  |  |               return acc + Number(score.score); | 
 |  |  |             } | 
 |  |  |             return acc; // 如果 score.score 不存在,不累加 | 
 |  |  |           }, 0); | 
 |  |  |  | 
 |  |  |           // 检查累加的分值是否等于 this.topicobj.score | 
 |  |  |           if (totalScore !== Number(this.topicobj.score)) { | 
 |  |  |             this.$message({ | 
 |  |  |               message: | 
 |  |  |                 "多选题选项分值总和必须等于 " + this.topicobj.score + " 分", | 
 |  |  |               type: "warning", | 
 |  |  |             }); | 
 |  |  |             return false; | 
 |  |  |           } | 
 |  |  |           return true; // 如果总分正确,返回 true | 
 |  |  |         } else if (this.topicobj.scriptType == 4) { | 
 |  |  |           return true; | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |  | 
 |  |  |       if (isValid) { | 
 |  |  |         this.compileissue(); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |  | 
 |  |  |     // --------------------------------------------------------- | 
 |  |  |     // 新问题新增 | 
 |  |  |     addoption() { | 
 |  |  |       if (!this.indexform.svyLibTemplateTargetoptions) { | 
 |  |  | 
 |  |  |         this.$forceUpdate(); | 
 |  |  |       } else { | 
 |  |  |         this.$message.error("图片插入失败"); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     branchFlagfn(row) { | 
 |  |  |       console.log(row); | 
 |  |  |       if (this.topicobj.branchFlag == 1 && this.topicobj.nextScriptno != 0) { | 
 |  |  |         this.topicobj.nextScriptno = | 
 |  |  |           this.topicobj.svyLibTemplateTargetoptions[0].nextQuestion; | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |   }, | 
 |  |  | 
 |  |  |     font-size: 20px; | 
 |  |  |   } | 
 |  |  |   .leftvlue-jbxx { | 
 |  |  |     display: flex; /* 使用 Flexbox 布局 */ | 
 |  |  |     justify-content: space-between; | 
 |  |  |     font-size: 24px; | 
 |  |  |     border-left: 5px solid #41a1be; | 
 |  |  |     padding-left: 5px; | 
 
 |  |  | 
 |  |  |     <el-dialog title="随访题目预览" :visible.sync="topicVisible" width="50%"> | 
 |  |  |       <div class="preview-left"> | 
 |  |  |         <!-- 单选 --> | 
 |  |  |         <div v-for="item in topicform.svyTemplateLibScripts"> | 
 |  |  |         <div | 
 |  |  |           class="scriptTopic-dev" | 
 |  |  |           v-for="item in topicform.svyTemplateLibScripts" | 
 |  |  |           :key="item.sort" | 
 |  |  |           v-if="item.scriptType == 1" | 
 |  |  |         > | 
 |  |  | 
 |  |  |         <!-- 多选 --> | 
 |  |  |         <div | 
 |  |  |           class="scriptTopic-dev" | 
 |  |  |           v-for="item in topicform.svyTemplateLibScripts" | 
 |  |  |           :key="item.sort" | 
 |  |  |           v-if="item.scriptType == 2" | 
 |  |  |         > | 
 |  |  | 
 |  |  |         <!-- 填空 --> | 
 |  |  |         <div | 
 |  |  |           class="scriptTopic-dev" | 
 |  |  |           v-for="item in topicform.svyTemplateLibScripts" | 
 |  |  |           :key="item.sort" | 
 |  |  |           v-if="item.scriptType == 4" | 
 |  |  |         > | 
 |  |  | 
 |  |  |           </div> | 
 |  |  |         </div> | 
 |  |  |       </div> | 
 |  |  |       </div> | 
 |  |  |     </el-dialog> | 
 |  |  |   </div> | 
 |  |  | </template> | 
 
 |  |  | 
 |  |  |     getQuestionnaire() { | 
 |  |  |       let taskid = this.$route.query.param1; | 
 |  |  |       let patid = this.$route.query.param2; | 
 |  |  |       let taskname = this.$route.query.param3; | 
 |  |  |       let routertf = this.$route.query.param5; | 
 |  |  |  | 
 |  |  |       console.log(taskid, "taskid"); | 
 |  |  |       console.log(patid, "patid"); | 
 |  |  |       console.log(taskname, "patid"); | 
 |  |  |       console.log(routertf, "routertf"); | 
 |  |  |       // let taskid = | 
 |  |  |       //   "OFp7tn/B6x7IzKJetvGWHdSWBj7msRlnlj6am9dyuHTH6sEt4uBbVCUXs5kcF/e4O2W6vqHf2Bz9K3/evbYDmw=="; | 
 |  |  |       // let patid = | 
 |  |  |       //   "CVk0j8O86AeCqhV5WPsBBYDg9fec0wDoDlP9imYK4wDBNIkxywZzMJEGlPagOxnq6qr2WYZo0U8MUGWRGnq8ZA=="; | 
 |  |  |       // this.taskid = this.decrypt(taskid); | 
 |  |  |       this.taskid = this.decrypt(taskid); | 
 |  |  |       this.patid = this.decrypt(patid); | 
 |  |  |  | 
 |  |  |       this.taskid = taskid; | 
 |  |  | 
 |  |  |       console.log(this.taskid, "this.taskid"); | 
 |  |  |       console.log(this.patid, "this.patid"); | 
 |  |  |  | 
 |  |  |       // this.$modal.msgSuccess("用户id为" + this.patid); | 
 |  |  |       // this.$modal.msgSuccess("任务id为" + this.taskid); | 
 |  |  |       this.$modal.msgSuccess("用户id为" + this.patid); | 
 |  |  |       this.$modal.msgSuccess("任务id为" + this.taskid); | 
 |  |  |       let taskids = this.encrypt(this.taskid); | 
 |  |  |       let patids = this.encrypt(this.patid); | 
 |  |  |       getExternalfollowup({ param1: taskids, param2: patids }).then((res) => { | 
 
 |  |  | 
 |  |  |             <el-row v-if="!measurement"> | 
 |  |  |               <el-col :span="24"> | 
 |  |  |                 <el-form-item label="适用场景" prop="suitWayList"> | 
 |  |  |                   <!-- <el-select | 
 |  |  |                     class="el-select1" | 
 |  |  |                     v-model="indexform.suitWayList" | 
 |  |  |                     multiple | 
 |  |  |                     @change="changeselect" | 
 |  |  |                     placeholder="请选择" | 
 |  |  |                   > | 
 |  |  |                     <el-option | 
 |  |  |                       v-for="item in mode" | 
 |  |  |                       :key="item.value" | 
 |  |  |                       :label="item.label" | 
 |  |  |                       :value="item.value" | 
 |  |  |                     ></el-option> | 
 |  |  |                   </el-select> --> | 
 |  |  |                   <el-checkbox-group v-model="indexform.suitWayList"> | 
 |  |  |                     <el-checkbox v-for="item in mode" :label="item.value">{{ | 
 |  |  |                       item.label | 
 |  |  | 
 |  |  |       this.indexform = { | 
 |  |  |         ivrLibaTargetTagList: [], | 
 |  |  |         targetoptionList: [], | 
 |  |  |         suitWayList: [], | 
 |  |  |       }; | 
 |  |  |       this.dynamicTags = []; | 
 |  |  |       this.testuserList = [ | 
 
 |  |  | 
 |  |  |             @click="getaddtopiclist" | 
 |  |  |             >添加题目</el-button | 
 |  |  |           > | 
 |  |  |           <el-button | 
 |  |  |             type="success" | 
 |  |  |             icon="el-icon-edit-outline" | 
 |  |  |             round | 
 |  |  |             @click="Operateit = !Operateit" | 
 |  |  |             >{{ !Operateit ? "编辑题目" : "完整信息展示" }}</el-button | 
 |  |  |           > | 
 |  |  |         </div> | 
 |  |  |         <div class="presentation"> | 
 |  |  |           <div class="presentation-left"> | 
 |  |  |           <div :class="Operateit ? 'presentation-left' : 'spresentation-left'"> | 
 |  |  |             <el-card class="box-card" style="min-height: 688px"> | 
 |  |  |               <el-table | 
 |  |  |                 v-loading="loading" | 
 |  |  | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 /> | 
 |  |  |                 <el-table-column | 
 |  |  |                   v-if="!Operateit" | 
 |  |  |                   label="问题话术" | 
 |  |  |                   align="center" | 
 |  |  |                   key="scriptContent" | 
 |  |  |                   prop="scriptContent" | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 /> | 
 |  |  |                 <el-table-column | 
 |  |  |                   v-if="!Operateit" | 
 |  |  |                   label="问题话术" | 
 |  |  |                   align="center" | 
 |  |  |                   key="scriptContent" | 
 |  |  |                   prop="scriptContent" | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 /> | 
 |  |  |                 <el-table-column | 
 |  |  |                   label="下题跳转" | 
 |  |  |                   align="center" | 
 |  |  |                   key="nextScriptno" | 
 |  |  |                   prop="nextScriptno" | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 > | 
 |  |  |                   <template slot-scope="scope"> | 
 |  |  |                     <span>{{ | 
 |  |  |                       scope.row.nextScriptno == 0 | 
 |  |  |                         ? "已是最后一题" | 
 |  |  |                         : scope.row.nextScriptno | 
 |  |  |                     }}</span> | 
 |  |  |                   </template> | 
 |  |  |                 </el-table-column> | 
 |  |  |  | 
 |  |  |                 <el-table-column | 
 |  |  |                   label="操作" | 
 |  |  |                   v-if="Operateit" | 
 |  |  |                   align="center" | 
 |  |  |                   width="250" | 
 |  |  |                   class-name="small-padding fixed-width" | 
 |  |  | 
 |  |  |               </el-table> | 
 |  |  |             </el-card> | 
 |  |  |           </div> | 
 |  |  |           <div class="presentation-right"> | 
 |  |  |           <div class="presentation-right" v-if="Operateit"> | 
 |  |  |             <el-card class="box-card"> | 
 |  |  |               <el-form | 
 |  |  |                 :model="topicobj" | 
 |  |  | 
 |  |  |               > | 
 |  |  |                 <div class="headline">题目设置详情</div> | 
 |  |  |                 <el-row> | 
 |  |  |                   <el-col :span="20" | 
 |  |  |                   <el-col :span="12" | 
 |  |  |                     ><el-form-item label="题目标题"> | 
 |  |  |                       <el-input | 
 |  |  |                         v-model="topicobj.scriptTopic" | 
 |  |  |                         placeholder="请从左侧列表选择" | 
 |  |  |                       ></el-input> </el-form-item | 
 |  |  |                   ></el-col> | 
 |  |  |                   <el-col :span="12"> | 
 |  |  |                     <el-form-item label="下题跳转"> | 
 |  |  |                       <el-input | 
 |  |  |                         v-model="topicobj.nextScriptno" | 
 |  |  |                         placeholder="请输入题号" | 
 |  |  |                       ></el-input> | 
 |  |  |                     </el-form-item> | 
 |  |  |                   </el-col> | 
 |  |  |                 </el-row> | 
 |  |  |                 <el-row> | 
 |  |  |                   <el-col :span="20" | 
 |  |  | 
 |  |  |                       </el-select> </el-form-item | 
 |  |  |                   ></el-col> | 
 |  |  |                   <el-col :span="12" | 
 |  |  |                     ><el-form-item label="取值类型"> | 
 |  |  |                     ><el-form-item label="题目类型"> | 
 |  |  |                       <el-select | 
 |  |  |                         v-model="topicobj.valueType" | 
 |  |  |                         v-model="topicobj.scriptType" | 
 |  |  |                         placeholder="请选择" | 
 |  |  |                         :disabled="true" | 
 |  |  |                       > | 
 |  |  |                         <el-option | 
 |  |  |                           v-for="item in valuetype" | 
 |  |  |                           v-for="item in askvaluetype" | 
 |  |  |                           :key="item.value" | 
 |  |  |                           :label="item.label" | 
 |  |  |                           :value="item.value" | 
 |  |  | 
 |  |  |                       </el-select> </el-form-item | 
 |  |  |                   ></el-col> | 
 |  |  |                 </el-row> | 
 |  |  |                 <el-form-item | 
 |  |  |                   label="是否由选项配置跳转" | 
 |  |  |                   v-if="topicobj.scriptType == 1" | 
 |  |  |                 > | 
 |  |  |                   <el-radio-group v-model="topicobj.branchFlag"> | 
 |  |  |                     <el-radio :label="1">是</el-radio> | 
 |  |  |                     <el-radio :label="0">否</el-radio> | 
 |  |  |                   </el-radio-group> | 
 |  |  |                 </el-form-item> | 
 |  |  |                 <el-row> | 
 |  |  |                   <el-col :span="6"> | 
 |  |  |                     <el-form-item label="问题语音" prop="verbaltrickyy"> | 
 |  |  | 
 |  |  |                   <Regular | 
 |  |  |                     :TargetoptionList="topicobj.ivrLibaScriptTargetoptionList" | 
 |  |  |                     @deloption="deloption" | 
 |  |  |                     @branchFlagfn="branchFlagfn" | 
 |  |  |                     :branchFlag="topicobj.branchFlag ? true : false" | 
 |  |  |                     :controlsc="false" | 
 |  |  |                   /> | 
 |  |  |                   <!-- 无匹配类型 --> | 
 |  |  | 
 |  |  |         <el-divider></el-divider> | 
 |  |  |  | 
 |  |  |         <div class="preview-left"> | 
 |  |  |           <div v-for="item in valssu"> | 
 |  |  |           <!-- 单选 --> | 
 |  |  |           <div | 
 |  |  |             class="scriptTopic-dev" | 
 |  |  |             v-for="item in valssu" | 
 |  |  |  | 
 |  |  |             :key="item.sort" | 
 |  |  |             v-if="item.valueType == 1" | 
 |  |  |           > | 
 |  |  | 
 |  |  |           <!-- 多选 --> | 
 |  |  |           <div | 
 |  |  |             class="scriptTopic-dev" | 
 |  |  |             v-for="item in valssu" | 
 |  |  |  | 
 |  |  |             :key="item.sort" | 
 |  |  |             v-if="item.valueType == 2" | 
 |  |  |           > | 
 |  |  | 
 |  |  |           <!-- 填空 --> | 
 |  |  |           <div | 
 |  |  |             class="scriptTopic-dev" | 
 |  |  |             v-for="item in valssu" | 
 |  |  |  | 
 |  |  |             :key="item.sort" | 
 |  |  |             v-if="item.valueType == 3" | 
 |  |  |           > | 
 |  |  | 
 |  |  |             <div class="dev-xx"> | 
 |  |  |               <el-input placeholder="请输入答案" v-model="radioas" clearable> | 
 |  |  |               </el-input> | 
 |  |  |               </div> | 
 |  |  |             </div> | 
 |  |  |           </div> | 
 |  |  |         </div> | 
 |  |  | 
 |  |  |       radioas: "", //填空题答案 | 
 |  |  |       task: null, //是否来自任务 | 
 |  |  |       taskform: null, //任务信息 | 
 |  |  |       Operateit: true, | 
 |  |  |       indexform: { | 
 |  |  |         ivrLibaScriptTargetoptionList: [], | 
 |  |  |       }, | 
 |  |  | 
 |  |  |       usable: [], | 
 |  |  |       required: [], | 
 |  |  |       valuetype: [], | 
 |  |  |       askvaluetype: [], | 
 |  |  |       mode: [], | 
 |  |  |       inputVisible: false, | 
 |  |  |       inputVisibleillness: false, | 
 |  |  | 
 |  |  |     this.usable = store.getters.usable; | 
 |  |  |     this.required = store.getters.required; | 
 |  |  |     this.valuetype = store.getters.valuetype; | 
 |  |  |     this.askvaluetype = store.getters.askvaluetype; | 
 |  |  |     this.languagelist = store.getters.languagelist; | 
 |  |  |     this.courtyardlist = store.getters.courtyardlist; | 
 |  |  |     this.precedencetype = store.getters.precedencetype; | 
 |  |  | 
 |  |  |       }); | 
 |  |  |       // 疾病列 | 
 |  |  |     }, | 
 |  |  |     // | 
 |  |  |     // 选项配置跳转触发 | 
 |  |  |     branchFlagfn(row) { | 
 |  |  |       if (this.topicobj.branchFlag == 1 && this.topicobj.nextScriptno != 0) { | 
 |  |  |         this.topicobj.nextScriptno = | 
 |  |  |           this.topicobj.ivrLibaScriptTargetoptionList[0].nextQuestion; | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     //保存 | 
 |  |  |     submitForm(formName) { | 
 |  |  |       if (this.ruleForm.id) { | 
 |  |  |         this.ruleForm.isoperation = 2; | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     // 问题排序 | 
 |  |  |     sortFn() { | 
 |  |  |       this.ruleForm.ivrLibaTemplateScriptVOList = | 
 |  |  |         this.ruleForm.ivrLibaTemplateScriptVOList.map((item, index) => { | 
 |  |  |           return Object.assign({}, item, { sort: (index + 1).toString() }); | 
 |  |  |       this.ruleForm.ivrLibaTemplateScriptVOList.forEach((item, index) => { | 
 |  |  |         item.sort = Number(index) + 1; | 
 |  |  |         console.log(1); | 
 |  |  |  | 
 |  |  |         if (item.sort == this.ruleForm.ivrLibaTemplateScriptVOList.length) { | 
 |  |  |           item.nextScriptno = 0; | 
 |  |  |         } else { | 
 |  |  |           item.nextScriptno = item.sort + 1; | 
 |  |  |         } | 
 |  |  |         if (item.ivrLibaScriptTargetoptionList) { | 
 |  |  |           item.ivrLibaScriptTargetoptionList.forEach((items) => { | 
 |  |  |             items.nextQuestion = Number(item.sort) + 1; | 
 |  |  |         }); | 
 |  |  |       this.ruleForm.ivrLibaTemplateScriptVOList.forEach((question, index) => { | 
 |  |  |         question.ivrLibaScriptTargetoptionList = | 
 |  |  |           question.ivrLibaScriptTargetoptionList.map((option) => { | 
 |  |  |             option.nextQuestion = Number(question.sort) + 1; | 
 |  |  |             return option; | 
 |  |  |           }); | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |       console.log(this.ruleForm.ivrLibaTemplateScriptVOList); | 
 |  |  |     }, | 
 |  |  | 
 |  |  |       color: #f52727; | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  |   .spresentation-left { | 
 |  |  |     width: 100%; | 
 |  |  |     // height: 500px; | 
 |  |  |     .button-textxg { | 
 |  |  |       color: #024df0; | 
 |  |  |     } | 
 |  |  |     .button-textsc { | 
 |  |  |       color: #f52727; | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  |   .presentation-right { | 
 |  |  |     width: 55%; | 
 |  |  |     max-height: 688px; | 
 
 |  |  | 
 |  |  |     <!-- 随访题目预览 --> | 
 |  |  |     <el-dialog title="随访题目预览" :visible.sync="topicVisible" width="50%"> | 
 |  |  |       <div class="preview-left"> | 
 |  |  |         <div v-for="item in topicform.ivrLibaTemplateScriptVOList"> | 
 |  |  |         <!-- 单选 --> | 
 |  |  |         <div | 
 |  |  |           class="scriptTopic-dev" | 
 |  |  |           v-for="item in topicform.ivrLibaTemplateScriptVOList" | 
 |  |  |           :key="item.targetid" | 
 |  |  |           v-if="item.valueType == 1" | 
 |  |  |         > | 
 |  |  | 
 |  |  |         <!-- 多选 --> | 
 |  |  |         <div | 
 |  |  |           class="scriptTopic-dev" | 
 |  |  |           v-for="item in topicform.ivrLibaTemplateScriptVOList" | 
 |  |  |           :key="item.targetid" | 
 |  |  |           v-if="item.valueType == 2" | 
 |  |  |         > | 
 |  |  | 
 |  |  |         <!-- 填空 --> | 
 |  |  |         <div | 
 |  |  |           class="scriptTopic-dev" | 
 |  |  |           v-for="item in topicform.ivrLibaTemplateScriptVOList" | 
 |  |  |           :key="item.targetid" | 
 |  |  |           v-if="item.valueType == 3" | 
 |  |  |         > | 
 |  |  | 
 |  |  |           </div> | 
 |  |  |         </div> | 
 |  |  |       </div> | 
 |  |  |       </div> | 
 |  |  |     </el-dialog> | 
 |  |  |   </div> | 
 |  |  | </template> | 
 
 |  |  | 
 |  |  |  | 
 |  |  | const name = process.env.VUE_APP_TITLE || '患者智慧服务系统' // 网页标题 | 
 |  |  |  | 
 |  |  | const port = process.env.port || process.env.npm_config_port || 8096 // 端口 | 
 |  |  | const port = process.env.port || process.env.npm_config_port || 8095 // 端口 | 
 |  |  |  | 
 |  |  | // vue.config.js 配置说明 | 
 |  |  | //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions |