|  |  | 
 |  |  |           <el-step> | 
 |  |  |             <template slot="title"> | 
 |  |  |               <span style="cursor: pointer" @click="Editprogress = 2" | 
 |  |  |                 >问卷题目</span | 
 |  |  |                 >问卷问题</span | 
 |  |  |               > | 
 |  |  |             </template> | 
 |  |  |           </el-step> | 
 |  |  | 
 |  |  |           :model="ruleForm" | 
 |  |  |           :rules="rules" | 
 |  |  |           ref="ruleForm" | 
 |  |  |           label-width="100px" | 
 |  |  |           label-width="180px" | 
 |  |  |           class="demo-ruleForm" | 
 |  |  |         > | 
 |  |  |           <el-row :gutter="10"> | 
 |  |  |           <el-form-item label="问卷名称" prop="svyname"> | 
 |  |  |             <div style="width: 55vw"> | 
 |  |  |               <el-input v-model="ruleForm.svyname"></el-input> | 
 |  |  |             </div> | 
 |  |  |           </el-form-item> | 
 |  |  |           <el-form-item label="问卷描述" prop="description"> | 
 |  |  |             <el-input | 
 |  |  |               style="width: 55vw" | 
 |  |  |               type="textarea" | 
 |  |  |               :rows="2" | 
 |  |  |               placeholder="请输入内容" | 
 |  |  |               v-model="ruleForm.description" | 
 |  |  |             > | 
 |  |  |             </el-input | 
 |  |  |           ></el-form-item> | 
 |  |  |           <el-row :gutter="20"> | 
 |  |  |             <el-col :span="10"> | 
 |  |  |               <el-form-item label="问卷分类" prop="region"> | 
 |  |  |               <el-form-item label="问卷分类" prop="categoryid"> | 
 |  |  |                 <el-select | 
 |  |  |                   v-model="ruleForm.categoryid" | 
 |  |  |                   size="medium" | 
 |  |  | 
 |  |  |                 </el-select> | 
 |  |  |               </el-form-item> | 
 |  |  |             </el-col> | 
 |  |  |             <el-col :span="10"> | 
 |  |  |               <el-form-item label="评价类型"> | 
 |  |  |             <el-col :span="8"> | 
 |  |  |               <el-form-item label="评价类型" prop="scoreType"> | 
 |  |  |                 <el-select | 
 |  |  |                   v-model="ruleForm.scoreType" | 
 |  |  |                   placeholder="请选择分类" | 
 |  |  | 
 |  |  |               </el-form-item> | 
 |  |  |             </el-col> | 
 |  |  |           </el-row> | 
 |  |  |           <el-form-item label="问卷标题" prop="name"> | 
 |  |  |             <div style="width: 30%"> | 
 |  |  |               <el-input v-model="ruleForm.svyname"></el-input> | 
 |  |  |             </div> | 
 |  |  |           </el-form-item> | 
 |  |  |           <el-form-item label="问卷描述"> | 
 |  |  |             <el-input | 
 |  |  |               style="width: 40vw" | 
 |  |  |               type="textarea" | 
 |  |  |               autosize | 
 |  |  |               placeholder="请输入内容" | 
 |  |  |               v-model="ruleForm.description" | 
 |  |  |             > | 
 |  |  |             </el-input | 
 |  |  |           ></el-form-item> | 
 |  |  |           <el-row :gutter="20"> | 
 |  |  |             <el-col :span="10"> | 
 |  |  |               <el-form-item label="可用状态" prop="isenable"> | 
 |  |  |                 <el-radio-group v-model="ruleForm.isenable"> | 
 |  |  |                   <el-radio | 
 |  |  |                     v-for="(item, index) in usable" | 
 |  |  |                     :label="item.value" | 
 |  |  |                     >{{ item.label }}</el-radio | 
 |  |  |                   > | 
 |  |  |                 </el-radio-group> | 
 |  |  |               </el-form-item> | 
 |  |  |             </el-col> | 
 |  |  |             <el-col :span="8"> | 
 |  |  |               <el-form-item label="版本号" prop="name"> | 
 |  |  |                 <el-input | 
 |  |  |                   v-model="ruleForm.version" | 
 |  |  |                   placeholder="默认1.0" | 
 |  |  |                 ></el-input> | 
 |  |  |               </el-form-item> | 
 |  |  |             </el-col> | 
 |  |  |           </el-row> | 
 |  |  |           <!-- <el-row :gutter="20"> | 
 |  |  |             <el-col :span="10"> | 
 |  |  |               <el-form-item label="长期任务" prop="longTemp"> | 
 |  |  |                 <el-radio-group v-model="ruleForm.longTemp"> | 
 |  |  |                   <el-radio | 
 |  |  |                     v-for="(item, index) in longtype" | 
 |  |  |                     :label="item.value" | 
 |  |  |                     >{{ item.label }}</el-radio | 
 |  |  |                   > | 
 |  |  |                 </el-radio-group> | 
 |  |  |               </el-form-item> | 
 |  |  |             </el-col> | 
 |  |  |             <el-col :span="8" v-if="ruleForm.longTemp"> | 
 |  |  |               <el-form-item label="任务周期(几天后)" prop="name"> | 
 |  |  |                 <el-input | 
 |  |  |                   v-model="ruleForm.sendDay" | 
 |  |  |                   placeholder="默认5天后" | 
 |  |  |                 ></el-input> | 
 |  |  |               </el-form-item> | 
 |  |  |             </el-col> | 
 |  |  |           </el-row> --> | 
 |  |  |  | 
 |  |  |           <el-row> | 
 |  |  |             <el-form-item label="标签" prop="desc"> | 
 |  |  |             <el-form-item prop="dynamicTags"> | 
 |  |  |               <template #label> | 
 |  |  |                 标签 | 
 |  |  |                 <el-tooltip | 
 |  |  |                   class="item" | 
 |  |  |                   effect="light" | 
 |  |  |                   content="准确、扼要、多重的标签,可以让您在系统使用中方便的查找到该模版。" | 
 |  |  |                   placement="top-start" | 
 |  |  |                 > | 
 |  |  |                   <i class="el-icon-warning-outline"></i> | 
 |  |  |                 </el-tooltip> | 
 |  |  |                 <!-- 在标签后插入红色星号 --> | 
 |  |  |               </template> | 
 |  |  |               <div class="xinz-inf"> | 
 |  |  |                 <el-tag | 
 |  |  |                   :key="tag.tagname" | 
 |  |  | 
 |  |  |               </div> | 
 |  |  |             </el-form-item> | 
 |  |  |           </el-row> | 
 |  |  |           <el-row> | 
 |  |  |             <el-form-item label="适用疾病" prop="region"> | 
 |  |  |               <div class="xinz-inf"> | 
 |  |  |                 <el-tag | 
 |  |  |                   :key="item.icd10name" | 
 |  |  |                   type="warning" | 
 |  |  |                   v-for="item in illnesslist" | 
 |  |  |                   closable | 
 |  |  |                   :disable-transitions="false" | 
 |  |  |                   @close="handleCloseillness(item)" | 
 |  |  |           <div class="xinz-infs"> | 
 |  |  |             <el-form-item> | 
 |  |  |               <template #label> | 
 |  |  |                 适用疾病 | 
 |  |  |                 <el-tooltip | 
 |  |  |                   class="item" | 
 |  |  |                   effect="light" | 
 |  |  |                   content="选择好适用疾病后,可以方便您通过疾病诊断查找到对应的病人!" | 
 |  |  |                   placement="top-start" | 
 |  |  |                 > | 
 |  |  |                   {{ item.icd10name }} | 
 |  |  |                 </el-tag> | 
 |  |  |                 <el-select | 
 |  |  |                   v-model="inputValueillness" | 
 |  |  |                   v-if="inputVisibleillness" | 
 |  |  |                   @change="illnessConfirm" | 
 |  |  |                   :remote-method="remoteMethod" | 
 |  |  |                   filterable | 
 |  |  |                   remote | 
 |  |  |                   allow-create | 
 |  |  |                   default-first-option | 
 |  |  |                   placeholder="请选择/查询" | 
 |  |  |                   :loading="loading" | 
 |  |  |                 > | 
 |  |  |                   <el-option | 
 |  |  |                     v-for="item in optionsillness" | 
 |  |  |                     :key="item.icdid" | 
 |  |  |                     :label="item.icdname" | 
 |  |  |                     :value="item.icdid" | 
 |  |  |                   > | 
 |  |  |                   </el-option> | 
 |  |  |                 </el-select> | 
 |  |  |                   <i class="el-icon-warning-outline"></i> | 
 |  |  |                 </el-tooltip> | 
 |  |  |               </template> | 
 |  |  |               <div style="margin-bottom: 10px"> | 
 |  |  |                 <el-button | 
 |  |  |                   v-else | 
 |  |  |                   class="button-new-tag" | 
 |  |  |                   size="small" | 
 |  |  |                   @click="inputVisibleillness = true" | 
 |  |  |                   >+ 新增疾病</el-button | 
 |  |  |                   type="warning" | 
 |  |  |                   @click="$refs.child.handleAddpatient()" | 
 |  |  |                   >添加疾病诊断</el-button | 
 |  |  |                 > | 
 |  |  |               </div> | 
 |  |  |               <el-tag | 
 |  |  |                 v-for="tag in displayedTags" | 
 |  |  |                 :key="tag.icdid" | 
 |  |  |                 type="warning" | 
 |  |  |                 :disable-transitions="false" | 
 |  |  |               > | 
 |  |  |                 {{ tag.icdname }} | 
 |  |  |               </el-tag> | 
 |  |  |               <el-tag v-if="hasMore" type="info">+{{ remaining }} more</el-tag> | 
 |  |  |             </el-form-item> | 
 |  |  |           </el-row> | 
 |  |  |           <el-row :gutter="20"> | 
 |  |  |             <el-col :span="6"> | 
 |  |  |               <el-form-item label="版本号" prop="name"> | 
 |  |  |                 <el-input v-model="ruleForm.version"></el-input> </el-form-item | 
 |  |  |             ></el-col> | 
 |  |  |             <el-col :span="9"> | 
 |  |  |               <el-form-item label="可用状态" prop="region"> | 
 |  |  |                 <el-select | 
 |  |  |                   v-model="ruleForm.isenable" | 
 |  |  |                   size="medium" | 
 |  |  |                   filterable | 
 |  |  |                   placeholder="请选择分类" | 
 |  |  |                 > | 
 |  |  |                   <el-option | 
 |  |  |                     class="ruleFormaa" | 
 |  |  |                     v-for="item in usable" | 
 |  |  |                     :key="item.value" | 
 |  |  |                     :label="item.label" | 
 |  |  |                     :value="item.value" | 
 |  |  |                   > | 
 |  |  |                   </el-option> | 
 |  |  |                 </el-select> </el-form-item | 
 |  |  |             ></el-col> | 
 |  |  |           </el-row> | 
 |  |  |           <el-form-item label="问卷方式" prop="region"> | 
 |  |  |           </div> | 
 |  |  |  | 
 |  |  |           <el-form-item label="问卷方式" prop="suitway"> | 
 |  |  |             <el-select | 
 |  |  |               v-model="ruleForm.suitway" | 
 |  |  |               style="width: 55vw" | 
 |  |  |               size="medium" | 
 |  |  |               multiple | 
 |  |  |               filterable | 
 |  |  | 
 |  |  |             </el-select> | 
 |  |  |           </el-form-item> | 
 |  |  |  | 
 |  |  |           <el-form-item label="适用院区" prop="region"> | 
 |  |  |             <el-select | 
 |  |  |               v-model="ruleForm.campus" | 
 |  |  |               size="medium" | 
 |  |  |               filterable | 
 |  |  |               placeholder="请选择分类" | 
 |  |  |           <el-row> | 
 |  |  |             <el-col :span="20" | 
 |  |  |               ><el-form-item label="适用科室" prop="region"> | 
 |  |  |                 <el-select | 
 |  |  |                   v-model="tempDetpRelevanceslist" | 
 |  |  |                   @remove-tag="removetag" | 
 |  |  |                   style="width: 55vw" | 
 |  |  |                   size="medium" | 
 |  |  |                   multiple | 
 |  |  |                   filterable | 
 |  |  |                   placeholder="请选择科室" | 
 |  |  |                 > | 
 |  |  |                   <el-option | 
 |  |  |                     class="ruleFormaa" | 
 |  |  |                     v-for="item in flatArray" | 
 |  |  |                     :key="item.id" | 
 |  |  |                     :label="item.label" | 
 |  |  |                     :value="item.deptCode" | 
 |  |  |                   > | 
 |  |  |                   </el-option> | 
 |  |  |                 </el-select> </el-form-item | 
 |  |  |             ></el-col> | 
 |  |  |           </el-row> | 
 |  |  |           <el-row> | 
 |  |  |             <el-col :span="20" | 
 |  |  |               ><el-form-item label="适用病区" prop="region"> | 
 |  |  |                 <el-select | 
 |  |  |                   v-model="tempbelongWards" | 
 |  |  |                   @remove-tag="removehpsp" | 
 |  |  |                   style="width: 55vw" | 
 |  |  |                   size="medium" | 
 |  |  |                   multiple | 
 |  |  |                   filterable | 
 |  |  |                   placeholder="请选择病区" | 
 |  |  |                 > | 
 |  |  |                   <el-option | 
 |  |  |                     class="ruleFormaa" | 
 |  |  |                     v-for="item in flatArray" | 
 |  |  |                     :key="item.id" | 
 |  |  |                     :label="item.label" | 
 |  |  |                     :value="item.deptCode" | 
 |  |  |                   > | 
 |  |  |                   </el-option> | 
 |  |  |                 </el-select> </el-form-item | 
 |  |  |             ></el-col> | 
 |  |  |           </el-row> | 
 |  |  |           <el-form-item label="结束语" prop="conclusion"> | 
 |  |  |             <el-input | 
 |  |  |               style="width: 55vw; line-height: 80px" | 
 |  |  |               type="textarea" | 
 |  |  |               :rows="5" | 
 |  |  |               autosize | 
 |  |  |               placeholder="请输入内容" | 
 |  |  |               v-model="ruleForm.conclusion" | 
 |  |  |             > | 
 |  |  |               <el-option | 
 |  |  |                 class="ruleFormaa" | 
 |  |  |                 v-for="item in courtyardlist" | 
 |  |  |                 :key="item.label" | 
 |  |  |                 :label="item.label" | 
 |  |  |                 :value="item.label" | 
 |  |  |               > | 
 |  |  |               </el-option> | 
 |  |  |             </el-select> | 
 |  |  |           </el-form-item> | 
 |  |  |           <el-form-item label="适用科室" prop="region"> | 
 |  |  |             <el-cascader | 
 |  |  |               v-model="tempDetpRelevanceslist" | 
 |  |  |               :options="deptList" | 
 |  |  |               :props="props" | 
 |  |  |               :show-all-levels="false" | 
 |  |  |               clearable | 
 |  |  |             > | 
 |  |  |               <template slot-scope="{ node, data }"> | 
 |  |  |                 <span>{{ data.deptName }}</span> | 
 |  |  |                 <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span> | 
 |  |  |               </template> | 
 |  |  |             </el-cascader> | 
 |  |  |           </el-form-item> | 
 |  |  |             </el-input | 
 |  |  |           ></el-form-item> | 
 |  |  |  | 
 |  |  |           <el-form-item> | 
 |  |  |             <el-button type="success" @click="nextstep('ruleForm')" | 
 |  |  |               >下一步</el-button | 
 |  |  |             > | 
 |  |  |             <el-button type="info" @click="closeFm('ruleForm')">关闭</el-button> | 
 |  |  |             <el-button @click="Departmenttreatment('ruleForm')" | 
 |  |  |             <el-button @click="toExamine('ruleForm')" | 
 |  |  |               >保存问卷基础信息</el-button | 
 |  |  |             > | 
 |  |  |           </el-form-item> | 
 |  |  | 
 |  |  |       </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> | 
 |  |  | 
 |  |  |               icon="el-icon-plus" | 
 |  |  |               round | 
 |  |  |               @click="getaddtopiclist" | 
 |  |  |               >添加题目</el-button | 
 |  |  |               >添加问题</el-button | 
 |  |  |             > | 
 |  |  |             <el-button | 
 |  |  |               type="success" | 
 |  |  |               icon="el-icon-edit-outline" | 
 |  |  |               round | 
 |  |  |               @click="Operateit = !Operateit" | 
 |  |  |               >{{ !Operateit ? "编辑问题" : "完整信息展示" }}</el-button | 
 |  |  |             > | 
 |  |  |           </div> | 
 |  |  |           <div style="display: flex"> | 
 |  |  |           <div style="display: flex" v-if="ruleForm.scoreType == 1"> | 
 |  |  |             <span | 
 |  |  |               style=" | 
 |  |  |                 width: 180px; | 
 |  |  | 
 |  |  |           </div> | 
 |  |  |         </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" | 
 |  |  | 
 |  |  |                   align="center" | 
 |  |  |                   key="sort" | 
 |  |  |                   prop="sort" | 
 |  |  |                   width="50" | 
 |  |  |                 /> | 
 |  |  |                 <el-table-column | 
 |  |  |                   label="题目标题" | 
 |  |  |                   label="问题主题" | 
 |  |  |                   align="center" | 
 |  |  |                   key="scriptTopic" | 
 |  |  |                   prop="scriptTopic" | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 /> | 
 |  |  |                 <el-table-column | 
 |  |  |                   label="题目内容" | 
 |  |  |                   label="题型" | 
 |  |  |                   align="center" | 
 |  |  |                   key="scriptType" | 
 |  |  |                   prop="scriptType" | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 > | 
 |  |  |                   <template slot-scope="scope"> | 
 |  |  |                     <dict-tag | 
 |  |  |                       :options="askvaluetype" | 
 |  |  |                       :value="scope.row.scriptType" | 
 |  |  |                     /> | 
 |  |  |                   </template> | 
 |  |  |                 </el-table-column> | 
 |  |  |                 <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="targetname" | 
 |  |  |                   prop="targetname" | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 /> | 
 |  |  |                 <el-table-column | 
 |  |  |                   v-if="!Operateit" | 
 |  |  |                   label="是否必填" | 
 |  |  |                   align="center" | 
 |  |  |                   key="ismandatory" | 
 |  |  |                   prop="ismandatory" | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 > | 
 |  |  |                   <template slot-scope="scope"> | 
 |  |  |                     <dict-tag | 
 |  |  |                       :options="required" | 
 |  |  |                       :value="scope.row.ismandatory" | 
 |  |  |                     /> | 
 |  |  |                   </template> | 
 |  |  |                 </el-table-column> | 
 |  |  |                 <el-table-column | 
 |  |  |                   label="下题跳转" | 
 |  |  |                   align="center" | 
 |  |  |                   key="nextScriptno" | 
 |  |  |                   prop="nextScriptno" | 
 |  |  |                 > | 
 |  |  |                   <template slot-scope="scope"> | 
 |  |  |                     <span>{{ | 
 |  |  |                       scope.row.nextScriptno == 0 | 
 |  |  |                         ? "已是最后一题" | 
 |  |  |                         : scope.row.nextScriptno | 
 |  |  |                     }}</span> | 
 |  |  |                   </template> | 
 |  |  |                 </el-table-column> | 
 |  |  |  | 
 |  |  |                 <el-table-column | 
 |  |  |                   v-if="Operateit" | 
 |  |  |                   label="操作" | 
 |  |  |                   align="center" | 
 |  |  |                   width="250" | 
 |  |  | 
 |  |  |               </el-table> | 
 |  |  |             </el-card> | 
 |  |  |           </div> | 
 |  |  |           <div class="presentation-right"> | 
 |  |  |           <div class="presentation-right" v-if="Operateit"> | 
 |  |  |             <el-card class="box-card"> | 
 |  |  |               <el-form | 
 |  |  |                 :inline="true" | 
 |  |  |                 :model="topicobj" | 
 |  |  |                 class="demo-form-inline" | 
 |  |  |               > | 
 |  |  |                 <div class="headline"> | 
 |  |  |                   题目设置详情 | 
 |  |  |                   <span style="margin-left: 30px" | 
 |  |  |                     ><el-button type="primary" @click="Submittopicobj" | 
 |  |  |                       >保存</el-button | 
 |  |  |                     ></span | 
 |  |  |                   > | 
 |  |  |                 </div> | 
 |  |  |                 <el-form-item label="题目标题"> | 
 |  |  |                   <el-input | 
 |  |  |                     v-model="topicobj.scriptTopic" | 
 |  |  |                     placeholder="请输入标题" | 
 |  |  |                   ></el-input> | 
 |  |  |                 </el-form-item> | 
 |  |  |                 <div class="headline">问题设置详情</div> | 
 |  |  |                 <el-row :gutter="10"> | 
 |  |  |                   <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 :gutter="10"> | 
 |  |  |                   <el-form-item label="问题内容"> | 
 |  |  |                     <el-input | 
 |  |  |                       style="width: 600px" | 
 |  |  |                       type="textarea" | 
 |  |  |                       :rows="2" | 
 |  |  |                       autosize | 
 |  |  |                       placeholder="请输入问题内容" | 
 |  |  |                       v-model="topicobj.scriptContent" | 
 |  |  |                     > | 
 |  |  |                     </el-input | 
 |  |  |                   ></el-form-item> | 
 |  |  |                 </el-row> | 
 |  |  |                 <el-row :gutter="10"> | 
 |  |  |                   <el-col :span="12" | 
 |  |  |                     ><el-form-item label="问题类型"> | 
 |  |  |                       <el-select | 
 |  |  |                         v-model="topicobj.scriptType" | 
 |  |  |                         disabled | 
 |  |  |                         size="medium" | 
 |  |  |                         filterable | 
 |  |  |                         placeholder="请选择分类" | 
 |  |  |                       > | 
 |  |  |                         <el-option | 
 |  |  |                           class="topicobjaa" | 
 |  |  |                           v-for="item in askvaluetype" | 
 |  |  |                           :key="item.value" | 
 |  |  |                           :label="item.label" | 
 |  |  |                           :value="item.value" | 
 |  |  |                         > | 
 |  |  |                         </el-option> </el-select></el-form-item | 
 |  |  |                   ></el-col> | 
 |  |  |                   <el-col :span="12"> | 
 |  |  |                     <el-form-item | 
 |  |  |                       label="问题分值" | 
 |  |  |                       v-if="ruleForm.scoreType == 1" | 
 |  |  |                     > | 
 |  |  |                       <el-input | 
 |  |  |                         v-model="topicobj.score" | 
 |  |  |                         placeholder="请输入题号" | 
 |  |  |                       ></el-input> | 
 |  |  |                     </el-form-item> | 
 |  |  |  | 
 |  |  |                     <el-form-item prop="valueType"> | 
 |  |  |                       <template #label> | 
 |  |  |                         结果类型 | 
 |  |  |                         <el-tooltip | 
 |  |  |                           class="item" | 
 |  |  |                           effect="light" | 
 |  |  |                           content="本类型为结果收集类型;选项用于指向性题目如是否等;文本适用复杂情况;数值用于收集数值型数据" | 
 |  |  |                           placement="top-start" | 
 |  |  |                         > | 
 |  |  |                           <i class="el-icon-warning-outline"></i> | 
 |  |  |                         </el-tooltip> | 
 |  |  |                         <!-- 在标签后插入红色星号 --> | 
 |  |  |                       </template> | 
 |  |  |                       <el-radio-group v-model="topicobj.valueType"> | 
 |  |  |                         <el-radio :label="1">选项</el-radio> | 
 |  |  |                         <el-radio :label="2">文本</el-radio> | 
 |  |  |                         <el-radio :label="3">数值</el-radio> | 
 |  |  |                       </el-radio-group> | 
 |  |  |                     </el-form-item> | 
 |  |  |                   </el-col> | 
 |  |  |                 </el-row> | 
 |  |  |  | 
 |  |  |                 <el-row :gutter="10"> | 
 |  |  |                   <el-col :span="12" | 
 |  |  |                     ><el-form-item label="是否必填"> | 
 |  |  |                       <el-select | 
 |  |  |                         v-model="topicobj.ismandatory" | 
 |  |  |                         placeholder="请选择" | 
 |  |  |                       > | 
 |  |  |                         <el-option | 
 |  |  |                           v-for="item in required" | 
 |  |  |                           :key="item.value" | 
 |  |  |                           :label="item.label" | 
 |  |  |                           :value="item.value" | 
 |  |  |                       <el-radio-group v-model="topicobj.ismandatory"> | 
 |  |  |                         <el-radio | 
 |  |  |                           v-for="(item, index) in required" | 
 |  |  |                           :label="item.value" | 
 |  |  |                           >{{ item.label }}</el-radio | 
 |  |  |                         > | 
 |  |  |                         </el-option> | 
 |  |  |                       </el-select> </el-form-item | 
 |  |  |                   ></el-col> | 
 |  |  |                       </el-radio-group> | 
 |  |  |                     </el-form-item></el-col | 
 |  |  |                   > | 
 |  |  |                   <el-col :span="12" | 
 |  |  |                     ><el-form-item label="是否可用"> | 
 |  |  |                       <el-select | 
 |  |  |                         v-model="topicobj.isavailable" | 
 |  |  |                         placeholder="请选择" | 
 |  |  |                       > | 
 |  |  |                         <el-option | 
 |  |  |                           v-for="item in usable" | 
 |  |  |                           :key="item.value" | 
 |  |  |                           :label="item.label" | 
 |  |  |                           :value="item.value" | 
 |  |  |                     ><el-form-item label="是否隐藏"> | 
 |  |  |                       <el-radio-group v-model="topicobj.ishide"> | 
 |  |  |                         <el-radio | 
 |  |  |                           v-for="(item, index) in hides" | 
 |  |  |                           :label="item.value" | 
 |  |  |                           >{{ item.label }}</el-radio | 
 |  |  |                         > | 
 |  |  |                         </el-option> | 
 |  |  |                       </el-select> </el-form-item | 
 |  |  |                   ></el-col> | 
 |  |  |                       </el-radio-group> | 
 |  |  |                     </el-form-item></el-col | 
 |  |  |                   > | 
 |  |  |                 </el-row> | 
 |  |  |                 <div v-if="topicobj.scriptType != 3"> | 
 |  |  |                 <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-form-item label="选中提示" v-if="topicobj.scriptType != 1"> | 
 |  |  |                   <el-input | 
 |  |  |                     style="width: 24vw" | 
 |  |  |                     type="textarea" | 
 |  |  |                     autosize | 
 |  |  |                     placeholder="请输入内容" | 
 |  |  |                     v-model="topicobj.prompt" | 
 |  |  |                   > | 
 |  |  |                   </el-input | 
 |  |  |                 ></el-form-item> | 
 |  |  |                 <div | 
 |  |  |                   v-if="topicobj.scriptType == 1 || topicobj.scriptType == 2" | 
 |  |  |                 > | 
 |  |  |                   <div class="headline">选项设置</div> | 
 |  |  |                   <div | 
 |  |  |                     class="topicxq" | 
 |  |  |                     v-for="item in topicobj.svyLibTemplateTargetoptions" | 
 |  |  |                   > | 
 |  |  |                     <el-row :gutter="5"> | 
 |  |  |                       <el-col :span="16" | 
 |  |  |                         ><el-form-item label="选项"> | 
 |  |  |                       <el-col :span="12" | 
 |  |  |                         ><el-form-item label="选项名称"> | 
 |  |  |                           <el-input | 
 |  |  |                             type="text" | 
 |  |  |                             placeholder="请输入选项" | 
 |  |  | 
 |  |  |                           > | 
 |  |  |                           </el-input> </el-form-item | 
 |  |  |                       ></el-col> | 
 |  |  |                       <el-col :span="8"> | 
 |  |  |                       <el-col :span="12"> | 
 |  |  |                         <el-form-item | 
 |  |  |                           v-if="topicobj.scoretype == 1" | 
 |  |  |                           label="分值" | 
 |  |  |                           v-if="ruleForm.scoreType == 1" | 
 |  |  |                           label="选项分值" | 
 |  |  |                         > | 
 |  |  |                           <el-input | 
 |  |  |                             class="custom-width" | 
 |  |  | 
 |  |  |                           </el-input> | 
 |  |  |                         </el-form-item> | 
 |  |  |                         <el-form-item | 
 |  |  |                           v-else-if="topicobj.scoretype == 2" | 
 |  |  |                           v-else-if="ruleForm.scoreType == 2" | 
 |  |  |                           label="ABC等级" | 
 |  |  |                         > | 
 |  |  |                           <el-radio-group v-model="item.score"> | 
 |  |  |                             <el-radio label="A">A</el-radio> | 
 |  |  |                             <el-radio label="B">B</el-radio> | 
 |  |  |                             <el-radio label="C">C</el-radio> | 
 |  |  |                             <el-radio :label="1">A</el-radio> | 
 |  |  |                             <el-radio :label="2">B</el-radio> | 
 |  |  |                             <el-radio :label="3">C</el-radio> | 
 |  |  |                           </el-radio-group> | 
 |  |  |                         </el-form-item> | 
 |  |  |                         <el-form-item | 
 |  |  |                           v-else-if="topicobj.scoretype == 3" | 
 |  |  |                           v-else-if="ruleForm.scoreType == 3" | 
 |  |  |                           label="优良等级" | 
 |  |  |                         > | 
 |  |  |                           <el-radio-group v-model="item.score"> | 
 |  |  | 
 |  |  |                       </el-col> | 
 |  |  |                     </el-row> | 
 |  |  |                     <el-row :gutter="10"> | 
 |  |  |                       <el-form-item label="异常提醒"> | 
 |  |  |                         <el-radio-group v-model="item.isabnormal"> | 
 |  |  |                           <el-radio :label="1">是</el-radio> | 
 |  |  |                           <el-radio :label="0">否</el-radio> | 
 |  |  |                         </el-radio-group> | 
 |  |  |                       </el-form-item> | 
 |  |  |                       <el-form-item label="是否选中收集附加信息"> | 
 |  |  |                         <el-radio-group v-model="item.appendflag"> | 
 |  |  |                           <el-radio label="1">是</el-radio> | 
 |  |  |                           <el-radio label="0">否</el-radio> | 
 |  |  |                         </el-radio-group> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-row> | 
 |  |  |                     <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 | 
 |  |  | 
 |  |  |                           </el-input> </el-form-item | 
 |  |  |                       ></el-col> | 
 |  |  |                     </el-row> | 
 |  |  |                     <el-row :gutter="10"> | 
 |  |  |                     <el-row :gutter="10" v-if="topicobj.scriptType == 1"> | 
 |  |  |                       <el-form-item label="选中提示"> | 
 |  |  |                         <el-input | 
 |  |  |                           style="width: 20vw" | 
 |  |  |                           style="width: 24vw" | 
 |  |  |                           type="textarea" | 
 |  |  |                           autosize | 
 |  |  |                           placeholder="请输入内容" | 
 |  |  | 
 |  |  |                             <el-image | 
 |  |  |                               style="width: 100px; height: 100px" | 
 |  |  |                               :src="item.picturePath" | 
 |  |  |                               :preview-src-list="[...item.picturePath]" | 
 |  |  |                               :preview-src-list=" | 
 |  |  |                                 item.picturePath ? [item.picturePath] : [] | 
 |  |  |                               " | 
 |  |  |                             > | 
 |  |  |                             </el-image> | 
 |  |  |                           </div> | 
 |  |  | 
 |  |  |                         <el-input | 
 |  |  |                           style="width: 20vw" | 
 |  |  |                           type="textarea" | 
 |  |  |                           autosize | 
 |  |  |                           :rows="2" | 
 |  |  |                           placeholder="此处放置患者回答" | 
 |  |  |                           v-model="topicobj.reply" | 
 |  |  |                         > | 
 |  |  | 
 |  |  |                       ></el-form-item> | 
 |  |  |                     </el-row> | 
 |  |  |                     <el-form-item label="分值"> | 
 |  |  |                       <template #label> | 
 |  |  |                         分值 | 
 |  |  |                         <el-tooltip | 
 |  |  |                           class="item" | 
 |  |  |                           effect="light" | 
 |  |  |                           content="填空题分数值由负责人员在问卷手机后手动评价。" | 
 |  |  |                           placement="top-start" | 
 |  |  |                         > | 
 |  |  |                           <i class="el-icon-warning-outline"></i> | 
 |  |  |                         </el-tooltip> | 
 |  |  |                         <!-- 在标签后插入红色星号 --> | 
 |  |  |                       </template> | 
 |  |  |                       <el-input | 
 |  |  |                         type="text" | 
 |  |  |                         placeholder="请输入选项分值" | 
 |  |  | 
 |  |  |         > | 
 |  |  |         <el-button type="primary" @click="laststep()">上一步</el-button> | 
 |  |  |         <el-button type="info" @click="closeFm('ruleForm')">关闭</el-button> | 
 |  |  |         <el-button @click="Departmenttreatment('ruleForm')" | 
 |  |  |           >保存题目数据</el-button | 
 |  |  |         > | 
 |  |  |         <el-button @click="toExamine('ruleForm')">保存问题数据</el-button> | 
 |  |  |       </div> | 
 |  |  |       <!-- 问卷预览 --> | 
 |  |  |       <div v-if="Editprogress == 3"> | 
 |  |  |         <div class="leftvlue-jbxx">问卷预览</div> | 
 |  |  |         <el-divider></el-divider> | 
 |  |  |         <div class="preview-left"> | 
 |  |  |           <!-- 单选 --> | 
 |  |  |           <div | 
 |  |  |             class="scriptTopic-dev" | 
 |  |  |             v-for="item in ruleForm.svyTemplateLibScripts" | 
 |  |  |             :key="item.sort" | 
 |  |  |             v-if="item.scriptType == 1" | 
 |  |  |           > | 
 |  |  |             <div class="dev-text"> | 
 |  |  |               {{ item.sort }}、[单选]<span>{{ item.scriptContent }}</span> | 
 |  |  |           <div v-for="item in ruleForm.svyTemplateLibScripts"> | 
 |  |  |             <!-- 单选 --> | 
 |  |  |             <div | 
 |  |  |               class="scriptTopic-dev" | 
 |  |  |               :key="item.sort" | 
 |  |  |               v-if="item.scriptType == 1" | 
 |  |  |             > | 
 |  |  |               <div class="dev-text"> | 
 |  |  |                 {{ item.sort }}、[单选]<span>{{ item.scriptContent }}</span> | 
 |  |  |               </div> | 
 |  |  |               <div class="dev-xx"> | 
 |  |  |                 <el-radio-group v-model="item.remark"> | 
 |  |  |                   <el-radio | 
 |  |  |                     v-for="(items, index) in item.svyLibTemplateTargetoptions" | 
 |  |  |                     :key="index" | 
 |  |  |                     :label="index" | 
 |  |  |                     >{{ items.optioncontent }}</el-radio | 
 |  |  |                   > | 
 |  |  |                 </el-radio-group> | 
 |  |  |               </div> | 
 |  |  |             </div> | 
 |  |  |             <div class="dev-xx"> | 
 |  |  |               <el-radio-group v-model="item.remark"> | 
 |  |  |                 <el-radio | 
 |  |  |                   v-for="(items, index) in item.svyLibTemplateTargetoptions" | 
 |  |  |                   :key="index" | 
 |  |  |                   :label="index" | 
 |  |  |                   >{{ items.optioncontent }}</el-radio | 
 |  |  |                 > | 
 |  |  |               </el-radio-group> | 
 |  |  |             <!-- 多选 --> | 
 |  |  |             <div | 
 |  |  |               class="scriptTopic-dev" | 
 |  |  |               :key="item.sort" | 
 |  |  |               v-if="item.scriptType == 2" | 
 |  |  |             > | 
 |  |  |               <div class="dev-text"> | 
 |  |  |                 {{ item.sort }}、[多选]<span>{{ item.scriptContent }}</span> | 
 |  |  |               </div> | 
 |  |  |               <div class="dev-xx"> | 
 |  |  |                 <el-checkbox-group v-model="qremark"> | 
 |  |  |                   <el-checkbox | 
 |  |  |                     v-for="(items, index) in item.svyLibTemplateTargetoptions" | 
 |  |  |                     :key="index" | 
 |  |  |                     :label="index" | 
 |  |  |                   > | 
 |  |  |                     {{ items.optioncontent }} | 
 |  |  |                   </el-checkbox> | 
 |  |  |                 </el-checkbox-group> | 
 |  |  |               </div> | 
 |  |  |             </div> | 
 |  |  |           </div> | 
 |  |  |           <!-- 多选 --> | 
 |  |  |           <div | 
 |  |  |             class="scriptTopic-dev" | 
 |  |  |             v-for="item in ruleForm.svyTemplateLibScripts" | 
 |  |  |             :key="item.sort" | 
 |  |  |             v-if="item.scriptType == 2" | 
 |  |  |           > | 
 |  |  |             <div class="dev-text"> | 
 |  |  |               {{ item.sort }}、[多选]<span>{{ item.scriptContent }}</span> | 
 |  |  |             </div> | 
 |  |  |             <div class="dev-xx"> | 
 |  |  |               <el-checkbox-group v-model="qremark"> | 
 |  |  |                 <el-checkbox | 
 |  |  |                   v-for="(items, index) in item.svyLibTemplateTargetoptions" | 
 |  |  |                   :key="index" | 
 |  |  |                   :label="index" | 
 |  |  |                 > | 
 |  |  |                   {{ items.optioncontent }} | 
 |  |  |                 </el-checkbox> | 
 |  |  |               </el-checkbox-group> | 
 |  |  |             </div> | 
 |  |  |           </div> | 
 |  |  |           <!-- 填空 --> | 
 |  |  |           <div | 
 |  |  |             class="scriptTopic-dev" | 
 |  |  |             v-for="item in ruleForm.svyTemplateLibScripts" | 
 |  |  |             :key="item.sort" | 
 |  |  |             v-if="item.scriptType == 3" | 
 |  |  |           > | 
 |  |  |             <div class="dev-text"> | 
 |  |  |               {{ item.sort }}、[填空]<span>{{ item.scriptContent }}</span> | 
 |  |  |             </div> | 
 |  |  |             <div class="dev-xx"> | 
 |  |  |               <el-input placeholder="请输入答案" v-model="radioas" clearable> | 
 |  |  |               </el-input> | 
 |  |  |             <!-- 填空 --> | 
 |  |  |             <div | 
 |  |  |               class="scriptTopic-dev" | 
 |  |  |               :key="item.sort" | 
 |  |  |               v-if="item.scriptType == 4" | 
 |  |  |             > | 
 |  |  |               <div class="dev-text"> | 
 |  |  |                 {{ item.sort }}、[填空]<span>{{ item.scriptContent }}</span> | 
 |  |  |               </div> | 
 |  |  |               <div class="dev-xx"> | 
 |  |  |                 <el-input placeholder="请输入答案" v-model="radioas" clearable> | 
 |  |  |                 </el-input> | 
 |  |  |               </div> | 
 |  |  |             </div> | 
 |  |  |           </div> | 
 |  |  |         </div> | 
 |  |  | 
 |  |  |         <el-button type="primary" @click="laststep()">上一步</el-button> | 
 |  |  |       </div> | 
 |  |  |     </div> | 
 |  |  |     <!-- 预览模版弹窗 --> | 
 |  |  |     <!-- 添加问题弹窗 --> | 
 |  |  |     <el-drawer | 
 |  |  |       title="添加题目" | 
 |  |  |       title="添加问题" | 
 |  |  |       :visible.sync="drawer" | 
 |  |  |       custom-class="demo-drawer" | 
 |  |  |       size="50%" | 
 |  |  |     > | 
 |  |  |       <div class="preview-left"> | 
 |  |  |         <el-form | 
 |  |  |           :model="queryParams" | 
 |  |  |           ref="queryForm" | 
 |  |  |           size="small" | 
 |  |  |           :inline="true" | 
 |  |  |           label-width="98px" | 
 |  |  |         > | 
 |  |  |           <el-form-item label="问题标题" prop="scriptTopic"> | 
 |  |  |             <el-input | 
 |  |  |               v-model="queryParams.scriptTopic" | 
 |  |  |               placeholder="请输入" | 
 |  |  |               clearable | 
 |  |  |               style="width: 200px" | 
 |  |  |               @keyup.enter.native="getaddtopiclist" | 
 |  |  |             /> | 
 |  |  |           </el-form-item> | 
 |  |  |  | 
 |  |  |           <el-form-item> | 
 |  |  |             <el-button | 
 |  |  |               type="primary" | 
 |  |  |               icon="el-icon-search" | 
 |  |  |               size="medium" | 
 |  |  |               @click="getaddtopiclist" | 
 |  |  |               >搜索</el-button | 
 |  |  |             > | 
 |  |  |             <el-button icon="el-icon-refresh" size="medium" @click="resetQuery" | 
 |  |  |               >重置</el-button | 
 |  |  |             > | 
 |  |  |           </el-form-item> | 
 |  |  |         </el-form> | 
 |  |  |         <el-table v-loading="loading" :data="userList"> | 
 |  |  |           <el-table-column | 
 |  |  |             label="标题" | 
 |  |  |             align="center" | 
 |  |  |             key="scriptTopic" | 
 |  |  |             prop="scriptTopic" | 
 |  |  |             width="100" | 
 |  |  |           /> | 
 |  |  |           <el-table-column | 
 |  |  |             label="问题内容" | 
 |  |  |             align="center" | 
 |  |  |             key="scriptContent" | 
 |  |  |             prop="scriptContent" | 
 |  |  |             width="200" | 
 |  |  |             :show-overflow-tooltip="true" | 
 |  |  |           /> | 
 |  |  |  | 
 |  |  |           <el-table-column | 
 |  |  |             label="操作" | 
 |  |  |             align="center" | 
 |  |  |             class-name="small-padding fixed-width" | 
 |  |  |           > | 
 |  |  |             <template slot-scope="scope"> | 
 |  |  |               <el-button size="medium" type="text" @click="addtopic(scope.row)" | 
 |  |  |                 ><span class="button-textxg" | 
 |  |  |                   ><i class="el-icon-circle-plus-outline"></i>添加</span | 
 |  |  |                 ></el-button | 
 |  |  |       <div style="margin: 0 25px"> | 
 |  |  |         <el-tabs v-model="activeName"> | 
 |  |  |           <el-tab-pane label="题库选取" name="first"> | 
 |  |  |             <div class="preview-left"> | 
 |  |  |               <el-form | 
 |  |  |                 :model="queryParams" | 
 |  |  |                 ref="queryForm" | 
 |  |  |                 size="small" | 
 |  |  |                 :inline="true" | 
 |  |  |                 label-width="98px" | 
 |  |  |               > | 
 |  |  |             </template> | 
 |  |  |           </el-table-column> | 
 |  |  |         </el-table> | 
 |  |  |         <pagination | 
 |  |  |           v-show="total > 0" | 
 |  |  |           :total="total" | 
 |  |  |           :page.sync="queryParams.pageNum" | 
 |  |  |           :limit.sync="queryParams.pageSize" | 
 |  |  |           @pagination="getaddtopiclist" | 
 |  |  |         /> | 
 |  |  |                 <el-form-item label="问题标题" prop="scriptTopic"> | 
 |  |  |                   <el-input | 
 |  |  |                     v-model="queryParams.scriptTopic" | 
 |  |  |                     placeholder="请输入" | 
 |  |  |                     clearable | 
 |  |  |                     style="width: 200px" | 
 |  |  |                     @keyup.enter.native="getaddtopiclist" | 
 |  |  |                   /> | 
 |  |  |                 </el-form-item> | 
 |  |  |                 <el-form-item label="问题类型" prop="scriptTopic"> | 
 |  |  |                   <el-select | 
 |  |  |                     v-model="queryParams.scriptType" | 
 |  |  |                     size="medium" | 
 |  |  |                     filterable | 
 |  |  |                     placeholder="请选择分类" | 
 |  |  |                   > | 
 |  |  |                     <el-option | 
 |  |  |                       class="topicobjaa" | 
 |  |  |                       v-for="item in askvaluetype" | 
 |  |  |                       :key="item.value" | 
 |  |  |                       :label="item.label" | 
 |  |  |                       :value="item.value" | 
 |  |  |                     > | 
 |  |  |                     </el-option> | 
 |  |  |                   </el-select> | 
 |  |  |                 </el-form-item> | 
 |  |  |  | 
 |  |  |                 <el-form-item> | 
 |  |  |                   <el-button | 
 |  |  |                     type="primary" | 
 |  |  |                     icon="el-icon-search" | 
 |  |  |                     size="medium" | 
 |  |  |                     @click="getaddtopiclist" | 
 |  |  |                     >搜索</el-button | 
 |  |  |                   > | 
 |  |  |                   <el-button | 
 |  |  |                     icon="el-icon-refresh" | 
 |  |  |                     size="medium" | 
 |  |  |                     @click="resetQuery" | 
 |  |  |                     >重置</el-button | 
 |  |  |                   > | 
 |  |  |                 </el-form-item> | 
 |  |  |               </el-form> | 
 |  |  |               <el-table v-loading="loading" :data="userList"> | 
 |  |  |                 <el-table-column | 
 |  |  |                   label="标题" | 
 |  |  |                   align="center" | 
 |  |  |                   key="scriptTopic" | 
 |  |  |                   prop="scriptTopic" | 
 |  |  |                   width="100" | 
 |  |  |                 /> | 
 |  |  |                 <el-table-column | 
 |  |  |                   label="问题内容" | 
 |  |  |                   align="center" | 
 |  |  |                   key="scriptContent" | 
 |  |  |                   prop="scriptContent" | 
 |  |  |                   width="200" | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 /> | 
 |  |  |                 <el-table-column | 
 |  |  |                   label="选项内容" | 
 |  |  |                   align="center" | 
 |  |  |                   key="targetoptions" | 
 |  |  |                   prop="targetoptions" | 
 |  |  |                   width="200" | 
 |  |  |                   :show-overflow-tooltip="true" | 
 |  |  |                 /> | 
 |  |  |  | 
 |  |  |                 <el-table-column | 
 |  |  |                   label="操作" | 
 |  |  |                   align="center" | 
 |  |  |                   class-name="small-padding fixed-width" | 
 |  |  |                 > | 
 |  |  |                   <template slot-scope="scope"> | 
 |  |  |                     <el-button | 
 |  |  |                       size="medium" | 
 |  |  |                       type="text" | 
 |  |  |                       @click="addtopic(scope.row)" | 
 |  |  |                       ><span class="button-textxg" | 
 |  |  |                         ><i class="el-icon-circle-plus-outline"></i>添加</span | 
 |  |  |                       ></el-button | 
 |  |  |                     > | 
 |  |  |                   </template> | 
 |  |  |                 </el-table-column> | 
 |  |  |               </el-table> | 
 |  |  |               <pagination | 
 |  |  |                 v-show="total > 0" | 
 |  |  |                 :total="total" | 
 |  |  |                 :page.sync="queryParams.pageNum" | 
 |  |  |                 :limit.sync="queryParams.pageSize" | 
 |  |  |                 @pagination="getaddtopiclist" | 
 |  |  |               /> | 
 |  |  |             </div> | 
 |  |  |           </el-tab-pane> | 
 |  |  |           <el-tab-pane label="手动配置" name="second"> | 
 |  |  |             <div class="preview-left"> | 
 |  |  |               <el-form | 
 |  |  |                 :inline="true" | 
 |  |  |                 :model="indexform" | 
 |  |  |                 class="demo-form-inline" | 
 |  |  |               > | 
 |  |  |                 <div class="headline"> | 
 |  |  |                   问题设置详情 | 
 |  |  |                   <span style="margin-left: 30px" | 
 |  |  |                     ><el-button type="primary" @click="Submittopicobj" | 
 |  |  |                       >保存新增</el-button | 
 |  |  |                     ></span | 
 |  |  |                   > | 
 |  |  |                 </div> | 
 |  |  |                 <el-divider></el-divider> | 
 |  |  |                 <div> | 
 |  |  |                   <el-row :gutter="10"> | 
 |  |  |                     <el-col :span="18" | 
 |  |  |                       ><el-form-item label="问题内容"> | 
 |  |  |                         <el-input | 
 |  |  |                           style="width: 400px" | 
 |  |  |                           type="textarea" | 
 |  |  |                           v-model="indexform.scriptContent" | 
 |  |  |                           placeholder="请输入问题内容" | 
 |  |  |                         ></el-input> </el-form-item | 
 |  |  |                     ></el-col> | 
 |  |  |                   </el-row> | 
 |  |  |                   <el-row :gutter="10"> | 
 |  |  |                     <el-col :span="12"> | 
 |  |  |                       <el-form-item label="问题主题"> | 
 |  |  |                         <el-input | 
 |  |  |                           v-model="indexform.scriptTopic" | 
 |  |  |                           placeholder="请输入问题主题" | 
 |  |  |                         ></el-input> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-col> | 
 |  |  |                     <el-col :span="12"> | 
 |  |  |                       <el-form-item label="问题得分"> | 
 |  |  |                         <el-input | 
 |  |  |                           v-model="indexform.score" | 
 |  |  |                           placeholder="请输入分数" | 
 |  |  |                         ></el-input> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-col> | 
 |  |  |                   </el-row> | 
 |  |  |                   <el-row :gutter="10"> | 
 |  |  |                     <el-col :span="12"> | 
 |  |  |                       <el-form-item label="评价类型"> | 
 |  |  |                         <el-select | 
 |  |  |                           v-model="indexform.scoreType" | 
 |  |  |                           placeholder="请选择分类" | 
 |  |  |                         > | 
 |  |  |                           <el-option | 
 |  |  |                             v-for="group in appraiselist" | 
 |  |  |                             :key="group.value" | 
 |  |  |                             :label="group.label" | 
 |  |  |                             :value="group.value" | 
 |  |  |                           > | 
 |  |  |                           </el-option> | 
 |  |  |                         </el-select> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-col> | 
 |  |  |                     <el-col :span="12"> | 
 |  |  |                       <el-form-item label="语言"> | 
 |  |  |                         <el-select | 
 |  |  |                           v-model="indexform.language" | 
 |  |  |                           size="medium" | 
 |  |  |                           filterable | 
 |  |  |                           placeholder="请选择分类" | 
 |  |  |                         > | 
 |  |  |                           <el-option | 
 |  |  |                             class="topicobjaa" | 
 |  |  |                             v-for="item in languagelist" | 
 |  |  |                             :key="item.value" | 
 |  |  |                             :label="item.label" | 
 |  |  |                             :value="item.value" | 
 |  |  |                           > | 
 |  |  |                           </el-option> | 
 |  |  |                         </el-select> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-col> | 
 |  |  |                   </el-row> | 
 |  |  |                   <el-row :gutter="10"> | 
 |  |  |                     <el-col :span="12"> | 
 |  |  |                       <el-form-item label="是否可用"> | 
 |  |  |                         <el-radio-group v-model="indexform.isenable"> | 
 |  |  |                           <el-radio | 
 |  |  |                             v-for="(item, index) in usable" | 
 |  |  |                             :label="item.value" | 
 |  |  |                             >{{ item.label }}</el-radio | 
 |  |  |                           > | 
 |  |  |                         </el-radio-group> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-col> | 
 |  |  |                     <el-col :span="12"> | 
 |  |  |                       <el-form-item label="是否必填"> | 
 |  |  |                         <el-radio-group v-model="indexform.ismandatory"> | 
 |  |  |                           <el-radio | 
 |  |  |                             v-for="(item, index) in required" | 
 |  |  |                             :label="item.value" | 
 |  |  |                             >{{ item.label }}</el-radio | 
 |  |  |                           > | 
 |  |  |                         </el-radio-group> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-col> | 
 |  |  |                   </el-row> | 
 |  |  |                 </div> | 
 |  |  |                 <div> | 
 |  |  |                   <el-form-item label="指标名称" prop="deptId"> | 
 |  |  |                     <el-input | 
 |  |  |                       style="width: 250px" | 
 |  |  |                       type="textarea" | 
 |  |  |                       :rows="2" | 
 |  |  |                       v-model="indexform.targetname" | 
 |  |  |                       placeholder="请输入指标名称" | 
 |  |  |                       maxlength="20" | 
 |  |  |                     /> | 
 |  |  |                   </el-form-item> | 
 |  |  |                   <el-form-item label="指标描述" prop="deptId"> | 
 |  |  |                     <el-input | 
 |  |  |                       style="width: 250px" | 
 |  |  |                       type="textarea" | 
 |  |  |                       :rows="2" | 
 |  |  |                       v-model="indexform.targetdesc" | 
 |  |  |                       placeholder="请输入指标描述" | 
 |  |  |                       maxlength="60" | 
 |  |  |                     /> | 
 |  |  |                   </el-form-item> | 
 |  |  |  | 
 |  |  |                   <el-row> | 
 |  |  |                     <el-col :span="20"> | 
 |  |  |                       <el-form-item label="结果类型"> | 
 |  |  |                         <el-radio-group v-model="indexform.valueType"> | 
 |  |  |                           <el-radio :label="1">选项</el-radio> | 
 |  |  |                           <el-radio :label="2">文本</el-radio> | 
 |  |  |                           <el-radio :label="3">数值</el-radio> | 
 |  |  |                         </el-radio-group> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-col> | 
 |  |  |                   </el-row> | 
 |  |  |                   <el-row> | 
 |  |  |                     <el-col :span="20"> | 
 |  |  |                       <el-form-item label="问题类型"> | 
 |  |  |                         <el-radio-group v-model="indexform.scriptType"> | 
 |  |  |                           <el-radio :label="1">单选</el-radio> | 
 |  |  |                           <el-radio :label="2">多选</el-radio> | 
 |  |  |                           <el-radio :label="4">问答</el-radio> | 
 |  |  |                         </el-radio-group> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-col> | 
 |  |  |                   </el-row> | 
 |  |  |                 </div> | 
 |  |  |                 <div class="topicxq" v-if="indexform.scriptType == 4"> | 
 |  |  |                   <el-row> | 
 |  |  |                     <el-col :span="20"> | 
 |  |  |                       <el-form-item label="收集内容"> | 
 |  |  |                         <el-input | 
 |  |  |                           style="width: 400px" | 
 |  |  |                           type="textarea" | 
 |  |  |                           v-model="indexform.value" | 
 |  |  |                           placeholder="问题收集内容" | 
 |  |  |                         ></el-input> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-col> | 
 |  |  |                   </el-row> | 
 |  |  |                 </div> | 
 |  |  |  | 
 |  |  |                 <div v-else> | 
 |  |  |                   <div class="headline"> | 
 |  |  |                     <div class="basics"> | 
 |  |  |                       选项设置 | 
 |  |  |                       <span style="margin-left: 30px" | 
 |  |  |                         ><el-button type="primary" round @click="addoption" | 
 |  |  |                           >+新增</el-button | 
 |  |  |                         ></span | 
 |  |  |                       > | 
 |  |  |                     </div> | 
 |  |  |                   </div> | 
 |  |  |                   <el-divider></el-divider> | 
 |  |  |                   <div | 
 |  |  |                     class="topicxq" | 
 |  |  |                     v-for="item in indexform.svyLibTemplateTargetoptions" | 
 |  |  |                     v-if="item.isoperation != 3" | 
 |  |  |                   > | 
 |  |  |                     <el-row :gutter="10"> | 
 |  |  |                       <el-col :span="11" | 
 |  |  |                         ><el-form-item label="选项名称"> | 
 |  |  |                           <el-input | 
 |  |  |                             style="width: 400px" | 
 |  |  |                             type="text" | 
 |  |  |                             placeholder="请输入选项分值" | 
 |  |  |                             v-model="item.optioncontent" | 
 |  |  |                             show-word-limit | 
 |  |  |                           > | 
 |  |  |                           </el-input> </el-form-item | 
 |  |  |                       ></el-col> | 
 |  |  |                       <el-col :span="11"> | 
 |  |  |                         <el-form-item | 
 |  |  |                           v-if="indexform.scoreType == 1" | 
 |  |  |                           label="分值" | 
 |  |  |                         > | 
 |  |  |                           <el-input | 
 |  |  |                             type="text" | 
 |  |  |                             placeholder="请输入选项分值" | 
 |  |  |                             v-model="item.score" | 
 |  |  |                             show-word-limit | 
 |  |  |                           > | 
 |  |  |                           </el-input> | 
 |  |  |                         </el-form-item> | 
 |  |  |                         <el-form-item | 
 |  |  |                           v-else-if="indexform.scoreType == 2" | 
 |  |  |                           label="ABC等级" | 
 |  |  |                         > | 
 |  |  |                           <el-radio-group v-model="item.score"> | 
 |  |  |                             <el-radio :label="1">A</el-radio> | 
 |  |  |                             <el-radio :label="2">B</el-radio> | 
 |  |  |                             <el-radio :label="3">C</el-radio> | 
 |  |  |                           </el-radio-group> | 
 |  |  |                         </el-form-item> | 
 |  |  |                         <el-form-item | 
 |  |  |                           v-else-if="indexform.scoreType == 3" | 
 |  |  |                           label="优良等级" | 
 |  |  |                         > | 
 |  |  |                           <el-radio-group v-model="item.score"> | 
 |  |  |                             <el-radio label="优">优</el-radio> | 
 |  |  |                             <el-radio label="良">良</el-radio> | 
 |  |  |                             <el-radio label="差">差</el-radio> | 
 |  |  |                           </el-radio-group> | 
 |  |  |                         </el-form-item> | 
 |  |  |                       </el-col> | 
 |  |  |  | 
 |  |  |                       <el-col | 
 |  |  |                         :span="2" | 
 |  |  |                         :offsset="indexform.scoreType == 4 ? 11 : 0" | 
 |  |  |                       > | 
 |  |  |                         <el-button | 
 |  |  |                           type="danger" | 
 |  |  |                           icon="el-icon-delete" | 
 |  |  |                           circle | 
 |  |  |                           @click="deletexuanx(item)" | 
 |  |  |                         ></el-button> | 
 |  |  |                       </el-col> | 
 |  |  |                     </el-row> | 
 |  |  |                     <el-row :gutter="10"> | 
 |  |  |                       <el-form-item label="异常提醒"> | 
 |  |  |                         <el-radio-group v-model="item.isabnormal"> | 
 |  |  |                           <el-radio :label="1">是</el-radio> | 
 |  |  |                           <el-radio :label="0">否</el-radio> | 
 |  |  |                         </el-radio-group> | 
 |  |  |                       </el-form-item> | 
 |  |  |                     </el-row> | 
 |  |  |                     <el-row :gutter="10" v-if="item.scriptType == 1"> | 
 |  |  |                       <el-form-item label="选中提示"> | 
 |  |  |                         <el-input | 
 |  |  |                           style="width: 400px" | 
 |  |  |                           type="textarea" | 
 |  |  |                           autosize | 
 |  |  |                           placeholder="请输入内容" | 
 |  |  |                           v-model="item.prompt" | 
 |  |  |                         > | 
 |  |  |                         </el-input | 
 |  |  |                       ></el-form-item> | 
 |  |  |                     </el-row> | 
 |  |  |                     <el-form-item label="选项文件" prop="sickness"> | 
 |  |  |                       <div style="width: 40vw"> | 
 |  |  |                         <el-upload | 
 |  |  |                           class="upload-demo" | 
 |  |  |                           :action="uploadImgUrl" | 
 |  |  |                           :headers="headers" | 
 |  |  |                           accept=".jpg,.png,image/*" | 
 |  |  |                           :on-success="handleChange.bind(this, item)" | 
 |  |  |                         > | 
 |  |  |                           <el-button size="small" type="primary" | 
 |  |  |                             >点击上传</el-button | 
 |  |  |                           > | 
 |  |  |                         </el-upload> | 
 |  |  |                         <div style="margin: 20px"> | 
 |  |  |                           <el-image | 
 |  |  |                             style="width: 100px; height: 100px" | 
 |  |  |                             :src="item.picturePath" | 
 |  |  |                             :preview-src-list=" | 
 |  |  |                               item.picturePath ? [item.picturePath] : [] | 
 |  |  |                             " | 
 |  |  |                           > | 
 |  |  |                           </el-image> | 
 |  |  |                         </div> | 
 |  |  |                       </div> | 
 |  |  |                     </el-form-item> | 
 |  |  |                   </div> | 
 |  |  |                 </div> | 
 |  |  |               </el-form> | 
 |  |  |             </div> | 
 |  |  |           </el-tab-pane> | 
 |  |  |         </el-tabs> | 
 |  |  |       </div> | 
 |  |  |     </el-drawer> | 
 |  |  |     <!-- 添加适用疾病窗口 --> | 
 |  |  |     <Optional-Form | 
 |  |  |       ref="child" | 
 |  |  |       :dialogVisiblepatient="dialogVisiblepatient" | 
 |  |  |       :overallCase="illnesslist" | 
 |  |  |       @addoption="dialogVisiblepatient = false" | 
 |  |  |       @kkoption="dialogVisiblepatient = true" | 
 |  |  |     /> | 
 |  |  |   </div> | 
 |  |  | </template> | 
 |  |  |  | 
 |  |  | 
 |  |  | import store from "@/store"; | 
 |  |  | import { | 
 |  |  |   getQtemplateclassify, | 
 |  |  |   delQtemplateclassify, | 
 |  |  |   addQtemplateclassify, | 
 |  |  |   getQtemplatelist, | 
 |  |  |   depthospgetson, | 
 |  |  |   depthospgetsonlist, | 
 |  |  |   getQtemplateobj, | 
 |  |  |   compileQtemplate, | 
 |  |  |   Qtemplateinfo, | 
 |  |  |   compileissue, | 
 |  |  | 
 |  |  |   Followupinfo, | 
 |  |  |   issueinfo, | 
 |  |  |   getissuelist, | 
 |  |  |   depthospgetsondel, | 
 |  |  |   deltargetillness, | 
 |  |  |   addtargetillness, | 
 |  |  |   getillnesslist, | 
 |  |  |   illnesslistget, | 
 |  |  |   getillness, | 
 |  |  | } from "@/api/AiCentre/index"; | 
 |  |  | import OptionalForm from "@/components/OptionalForm"; //正则组件 | 
 |  |  | import { getToken } from "@/utils/auth"; | 
 |  |  | import { deptTreeSelect } from "@/api/system/user"; | 
 |  |  |  | 
 |  |  | export default { | 
 |  |  |   name: "Questionnaireinfo", | 
 |  |  |  | 
 |  |  |   components: { OptionalForm }, | 
 |  |  |  | 
 |  |  |   data() { | 
 |  |  |     return { | 
 |  |  |       headers: { | 
 |  |  | 
 |  |  |       radio: "false", //单选题选中 | 
 |  |  |       radios: [], //多选题选中 | 
 |  |  |       radioas: "", //填空题答案 | 
 |  |  |       activeName: "first", | 
 |  |  |       dynamicTags: [], | 
 |  |  |       inputVisible: false, | 
 |  |  |       dialogVisiblepatient: false, //适用疾病窗口 | 
 |  |  |       inputValue: "", | 
 |  |  |       topicobj: {}, | 
 |  |  |       // 总条数 | 
 |  |  | 
 |  |  |         svyTemplateLibScripts: [], | 
 |  |  |         tempDetpRelevances: [], | 
 |  |  |         svyLibTemplateTagList: [], | 
 |  |  |         suitway: [], | 
 |  |  |         scoreType: "4", | 
 |  |  |         isenable: "0", | 
 |  |  |         longTemp: "0", | 
 |  |  |         sendDay: "5", | 
 |  |  |       }, | 
 |  |  |       rules: {}, | 
 |  |  |       indexform: { | 
 |  |  |         svyLibTemplateTargetoptions: [], | 
 |  |  |       }, | 
 |  |  |       // 表单校验 | 
 |  |  |       rules: { | 
 |  |  |         categoryid: [ | 
 |  |  |           { required: true, message: "问卷分类不能为空", trigger: "blur" }, | 
 |  |  |         ], | 
 |  |  |         scoreType: [ | 
 |  |  |           { required: true, message: "评价类型不能为空", trigger: "blur" }, | 
 |  |  |         ], | 
 |  |  |         svyname: [ | 
 |  |  |           { required: true, message: "问卷名称不能为空", trigger: "blur" }, | 
 |  |  |         ], | 
 |  |  |         isenable: [ | 
 |  |  |           { required: true, message: "可用状态不能为空", trigger: "blur" }, | 
 |  |  |         ], | 
 |  |  |         scriptTopic: [ | 
 |  |  |           { required: true, message: "问题主题不能为空", trigger: "blur" }, | 
 |  |  |         ], | 
 |  |  |         ismandatory: [ | 
 |  |  |           { required: true, message: "是否必填不能为空", trigger: "blur" }, | 
 |  |  |         ], | 
 |  |  |         scriptType: [ | 
 |  |  |           { required: true, message: "问题类型不能为空", trigger: "blur" }, | 
 |  |  |         ], | 
 |  |  |         suitway: [ | 
 |  |  |           { required: true, message: "问卷方式不能为空", trigger: "blur" }, | 
 |  |  |         ], | 
 |  |  |         conclusion: [ | 
 |  |  |           { required: true, message: "问卷结束语不能为空", trigger: "blur" }, | 
 |  |  |         ], | 
 |  |  |       }, | 
 |  |  |       rulesa: {}, | 
 |  |  |       optionsclass: [], //分类列表 | 
 |  |  |       optionlist: [ | 
 |  |  | 
 |  |  |         { value: "scriptTopic", table: "scriptTopic" }, | 
 |  |  |       ], | 
 |  |  |  | 
 |  |  |       appraiselist: [ | 
 |  |  |         { label: "分数", value: "1" }, | 
 |  |  |         { label: "ABC等级", value: "2" }, | 
 |  |  |         { label: "优良等级", value: "3" }, | 
 |  |  |       ], | 
 |  |  |       appraiselist: [], | 
 |  |  |  | 
 |  |  |       fileList: [ | 
 |  |  |         { | 
 |  |  | 
 |  |  |           sdadd: ["sss", "ssccss", "ssaas", "ss"], | 
 |  |  |         }, | 
 |  |  |       ], | 
 |  |  |       addvalue: "添加题目", | 
 |  |  |       // 题目表格数据 | 
 |  |  |       addvalue: "添加问题", | 
 |  |  |       // 问题表格数据 | 
 |  |  |       userList: [], | 
 |  |  |       deptList: [], | 
 |  |  |       props: { multiple: true, value: "deptId", label: "deptName" }, | 
 |  |  |       themelist: [], | 
 |  |  |       languagelist: [], | 
 |  |  |       courtyardlist: [], | 
 |  |  |       askvaluetype: [], | 
 |  |  |       precedencetype: [], | 
 |  |  |       inputValueillness: "", | 
 |  |  |       inputVisible: false, | 
 |  |  |       inputVisibleillness: false, | 
 |  |  |       illnessVisible: false, //指标疾病弹框 | 
 |  |  |       Operateit: true, | 
 |  |  |       deptOptions: [], | 
 |  |  |       flatArray: [], | 
 |  |  |       optionsillness: [], | 
 |  |  |       delScriptVOList: [], | 
 |  |  |       illnesslistapi: [], | 
 |  |  |       illnesslist: [], | 
 |  |  |       tempDetpRelevanceslist: [], | 
 |  |  |       tempDetpRelevanceslist: [], //科室数据 | 
 |  |  |       tempDetpRelevanceslistform: [], //科室数据 | 
 |  |  |       tempbelongWards: [], //病区数据 | 
 |  |  |       tempbelongWardsform: [], //病区数据 | 
 |  |  |       optionstag: [], | 
 |  |  |       valuetype: [], | 
 |  |  |       qremark: [], | 
 |  |  |       hosplist: [], | 
 |  |  |       deptlist: [], | 
 |  |  |       usable: [ | 
 |  |  |         { value: "0", label: "可用" }, | 
 |  |  |         { value: "1", label: "停用" }, | 
 |  |  |       ], | 
 |  |  |       hides: [ | 
 |  |  |         { value: 0, label: "正常" }, | 
 |  |  |         { value: 1, label: "隐藏" }, | 
 |  |  |       ], | 
 |  |  |       longtype: [ | 
 |  |  |         { value: "0", label: "普通任务" }, | 
 |  |  |         { value: "1", label: "长期任务" }, | 
 |  |  |       ], | 
 |  |  |       required: [ | 
 |  |  |         { value: "1", label: "必填" }, | 
 |  |  | 
 |  |  |         pageNum: 1, | 
 |  |  |         pageSize: 10, | 
 |  |  |       }, | 
 |  |  |       arr: [ | 
 |  |  |         [ | 
 |  |  |           { id: 1, grade: "5" }, | 
 |  |  |           { id: 2, grade: "5" }, | 
 |  |  |           { id: 3, grade: "5" }, | 
 |  |  |           { id: 4, grade: "5" }, | 
 |  |  |         ], | 
 |  |  |         [ | 
 |  |  |           { id: 1, grade: "5" }, | 
 |  |  |           { id: 3, grade: "5" }, | 
 |  |  |           { id: 4, grade: "5" }, | 
 |  |  |         ], | 
 |  |  |         [ | 
 |  |  |           { id: 1, grade: "5" }, | 
 |  |  |           { id: 2, grade: "5" }, | 
 |  |  |           { id: 4, grade: "5" }, | 
 |  |  |         ], | 
 |  |  |       ], | 
 |  |  |       belongWards: [], | 
 |  |  |       belongDepts: [], | 
 |  |  |       queryParamsdept: { | 
 |  |  |         tempid: "", | 
 |  |  |         type: 1, | 
 |  |  |       }, | 
 |  |  |     }; | 
 |  |  |   }, | 
 |  |  |  | 
 |  |  |   activated() { | 
 |  |  |     if (this.id != this.$route.query.id) { | 
 |  |  |       this.getissueinfo(); | 
 |  |  |       this.gettabList(); | 
 |  |  |     } else { | 
 |  |  |       this.ruleForm.svyTemplateLibScripts = | 
 |  |  |         this.ruleForm.svyTemplateLibScripts.filter( | 
 |  |  |           (item) => item.isoperation != 3 | 
 |  |  |         ); | 
 |  |  |       this.ruleForm.svyLibTemplateTagList = | 
 |  |  |         this.ruleForm.svyLibTemplateTagList.filter( | 
 |  |  |           (item) => item.isoperation != 3 | 
 |  |  |         ); | 
 |  |  |       if (this.ruleForm.suitway) | 
 |  |  |         this.ruleForm.suitway = this.ruleForm.suitway.split(","); | 
 |  |  |       this.delScriptVOList = []; | 
 |  |  |       this.tempDetpRelevanceslistform = []; | 
 |  |  |       this.tempbelongWardsform = []; | 
 |  |  |       this.$forceUpdate(); | 
 |  |  |     } | 
 |  |  |   }, | 
 |  |  |   created() { | 
 |  |  |     this.gettabList(); | 
 |  |  |     this.getissueinfo(); | 
 |  |  |     this.gettabList(); | 
 |  |  |     this.getDeptTree(); | 
 |  |  |     this.mode = store.getters.Askmode; | 
 |  |  |     this.languagelist = store.getters.languagelist; | 
 |  |  |     this.usable = store.getters.usable; | 
 |  |  |     this.required = store.getters.required; | 
 |  |  |     this.valuetype = store.getters.valuetype; | 
 |  |  |     this.courtyardlist = store.getters.courtyardlist; | 
 |  |  |     this.askvaluetype = store.getters.askvaluetype; | 
 |  |  |     this.appraiselist = store.getters.appraiselist; | 
 |  |  |     this.belongWards = store.getters.belongWards; | 
 |  |  |     this.belongDepts = store.getters.belongDepts; | 
 |  |  |  | 
 |  |  |     // this.test(); | 
 |  |  |   }, | 
 |  |  |  | 
 |  |  |   computed: { | 
 |  |  |     displayedTags() { | 
 |  |  |       // 返回前10个tag | 
 |  |  |       return this.illnesslist.slice(0, 10); | 
 |  |  |     }, | 
 |  |  |     hasMore() { | 
 |  |  |       // 判断是否有更多的tag | 
 |  |  |       return this.illnesslist.length > 10; | 
 |  |  |     }, | 
 |  |  |     remaining() { | 
 |  |  |       // 计算剩余的tag数量 | 
 |  |  |       return this.illnesslist.length - 10; | 
 |  |  |     }, | 
 |  |  |   }, | 
 |  |  |   methods: { | 
 |  |  |     // 公共方法--------------- | 
 |  |  |     getIndexInArray(arr, obj) { | 
 |  |  | 
 |  |  |     // 获取数据 | 
 |  |  |     getissueinfo() { | 
 |  |  |       this.id = this.$route.query.id; | 
 |  |  |       this.queryParamsdept.tempid = this.id; | 
 |  |  |       this.ruleForm = { | 
 |  |  |         svyTemplateLibScripts: [], | 
 |  |  |         tempDetpRelevances: [], | 
 |  |  |         svyLibTemplateTagList: [], | 
 |  |  |         scoreType: "4", | 
 |  |  |         isenable: "0", | 
 |  |  |         longTemp: "0", | 
 |  |  |         sendDay: "5", | 
 |  |  |       }; | 
 |  |  |       this.topicobj = {}; | 
 |  |  |  | 
 |  |  |       if (this.id) { | 
 |  |  |         getQtemplatelist({ svyid: this.id }).then((res) => { | 
 |  |  |         getQtemplateobj({ svyid: this.id }).then((res) => { | 
 |  |  |           this.ruleForm = res.rows[0]; | 
 |  |  |           this.dynamicTags = this.ruleForm.svyLibTemplateTagList.map( | 
 |  |  |             this.processElement | 
 |  |  |           ); | 
 |  |  |           this.tempDetpRelevanceslist = JSON.parse(this.ruleForm.deptNames); | 
 |  |  |           this.ruleForm.suitway = this.ruleForm.suitway.split(","); | 
 |  |  |           console.log(this.tempDetpRelevanceslist); | 
 |  |  |           console.log(this.dynamicTags, "this.dynamicTags"); | 
 |  |  |           if (this.ruleForm.suitway) | 
 |  |  |             this.ruleForm.suitway = this.ruleForm.suitway.split(","); | 
 |  |  |         }); | 
 |  |  |         getillness({ outid: this.id, type: 5 }).then((res) => { | 
 |  |  |           this.illnesslist = res.rows; | 
 |  |  |           this.illnesslist.forEach((item) => { | 
 |  |  |             item.icdname = item.icd10name; | 
 |  |  |           }); | 
 |  |  |         }); | 
 |  |  |       } else { | 
 |  |  |         this.ruleForm.isenable = "1"; | 
 |  |  |       } | 
 |  |  |       getillnesslist({ | 
 |  |  |         pageNum: 1, | 
 |  |  |         pageSize: 100, | 
 |  |  |       }).then((response) => { | 
 |  |  |         this.optionsillness = response.rows; | 
 |  |  |       }); | 
 |  |  |       listDept(this.queryParams).then((response) => { | 
 |  |  |         this.deptList = this.handleTree(response.data, "deptId"); | 
 |  |  |       }); | 
 |  |  |  | 
 |  |  |       // 分类 | 
 |  |  |       getQtemplateclassify({}).then((res) => { | 
 |  |  |         // this.optionsclass = this.flattenArray(res.rows); | 
 |  |  |         this.optionsclass = res.rows; | 
 |  |  |       }); | 
 |  |  |       this.tempDetpRelevanceslist = []; | 
 |  |  |       this.tempbelongWards = []; | 
 |  |  |       if (this.queryParamsdept.tempid) { | 
 |  |  |         depthospgetsonlist(this.queryParamsdept).then((res) => { | 
 |  |  |           if (res.code == 200) { | 
 |  |  |             let arr = res.rows; | 
 |  |  |             arr.forEach((item) => { | 
 |  |  |               if (item.deptType == 1) { | 
 |  |  |                 this.deptlist.push(item); | 
 |  |  |                 this.tempDetpRelevanceslist.push(item.deptCode); | 
 |  |  |               } else if (item.deptType == 2) { | 
 |  |  |                 this.hosplist.push(item); | 
 |  |  |                 this.tempbelongWards.push(item.deptCode); | 
 |  |  |               } | 
 |  |  |             }); | 
 |  |  |           } | 
 |  |  |         }); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     // 获取科室树 | 
 |  |  |     getDeptTree() { | 
 |  |  |       // 科室列表 | 
 |  |  |       deptTreeSelect().then((response) => { | 
 |  |  |         this.deptOptions = response.data; | 
 |  |  |         this.flatArray = this.flattenArray(response.data); | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  |     flattenArray(multiArray) { | 
 |  |  |       let result = []; | 
 |  |  |  | 
 |  |  |       // 递归函数,用于将多级数组转换为一维数组,只包含最底层的元素 | 
 |  |  |       function flatten(element) { | 
 |  |  |         // 如果当前元素有子元素,继续递归 | 
 |  |  |         if (element.children && element.children.length > 0) { | 
 |  |  |           element.children.forEach((child) => flatten(child)); | 
 |  |  |         } else { | 
 |  |  |           // 克隆元素以避免修改原始数据 | 
 |  |  |           let item = JSON.parse(JSON.stringify(element)); | 
 |  |  |           result.push(item); // 将最底层的元素添加到结果数组 | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |  | 
 |  |  |       // 从顶层元素开始递归 | 
 |  |  |       multiArray.forEach((element) => flatten(element)); | 
 |  |  |       return result; // 返回只包含最底层元素的一维数组 | 
 |  |  |     }, | 
 |  |  |     submitForm(formName) { | 
 |  |  |       this.$modal.loading("正在上传数据,请稍候..."); | 
 |  |  |  | 
 |  |  |       this.ruleForm.suitway = this.ruleForm.suitway.join(","); | 
 |  |  |  | 
 |  |  |       this.$modal.loading("正在修正保存数据,请稍候..."); | 
 |  |  |       if (Array.isArray(this.ruleForm.suitway)) { | 
 |  |  |         this.ruleForm.suitway = this.ruleForm.suitway.join(","); | 
 |  |  |       } | 
 |  |  |       if (!this.ruleForm.categoryid) { | 
 |  |  |         this.ruleForm.categoryid = -1; | 
 |  |  |       } | 
 |  |  |       // 题目保存处理 | 
 |  |  |       //   提交 | 
 |  |  |       this.ruleForm.svyTemplateLibScripts.forEach((res) => { | 
 |  |  |         if (!res.isoperation) { | 
 |  |  |           res.isoperation = 2; | 
 |  |  |         } | 
 |  |  |         res.ivrLibaScriptTargetoptionList = res.svyLibTemplateTargetoptions.map( | 
 |  |  |           (item) => { | 
 |  |  |             if (!item.isoperation) { | 
 |  |  |               item.isoperation = 2; | 
 |  |  |               item.templateID = this.ruleForm.id; | 
 |  |  |             } | 
 |  |  |             return item; | 
 |  |  |           } | 
 |  |  |         ); | 
 |  |  |       }); | 
 |  |  |       this.delScriptVOList.forEach((item) => { | 
 |  |  |         this.ruleForm.svyTemplateLibScripts.push(item); | 
 |  |  |       }); | 
 |  |  |       if (this.id) { | 
 |  |  |         this.ruleForm.isoperation = 2; | 
 |  |  |         this.ruleForm.tempDetpRelevances = null; | 
 |  |  |         compileQtemplate(this.ruleForm).then((res) => { | 
 |  |  |           this.$modal.msgSuccess("修改成功"); | 
 |  |  |           this.confirmillness(); | 
 |  |  |           this.putbelongDepts(); | 
 |  |  |           this.$modal.closeLoading(); | 
 |  |  |  | 
 |  |  |           this.$router.go(-1); | 
 |  |  |           // window.location.reload(); | 
 |  |  |         }); | 
 |  |  |       } else { | 
 |  |  |         this.ruleForm.isoperation = 1; | 
 |  |  |         this.ruleForm.version = this.ruleForm.version | 
 |  |  |           ? this.ruleForm.version | 
 |  |  |           : "1.0"; | 
 |  |  |         this.ruleForm.tempDetpRelevances = null; | 
 |  |  |         compileQtemplate(this.ruleForm).then((res) => { | 
 |  |  |           this.$modal.msgSuccess("新增成功"); | 
 |  |  |           this.confirmillness(res.data); | 
 |  |  |  | 
 |  |  |           this.putbelongDepts(res.data); | 
 |  |  |           this.$modal.closeLoading(); | 
 |  |  |  | 
 |  |  |           this.$router.go(-1); | 
 |  |  |         }); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     // 科室处理 | 
 |  |  |     // 题目校验 | 
 |  |  |     toExamine() { | 
 |  |  |       // 遍历题目集合 | 
 |  |  |       for (let i = 0; i < this.ruleForm.svyTemplateLibScripts.length; i++) { | 
 |  |  |         const question = this.ruleForm.svyTemplateLibScripts[i]; | 
 |  |  |  | 
 |  |  |         // 如果 scriptType 为 4,则跳过当前题目 | 
 |  |  |         if (question.scriptType === 4) { | 
 |  |  |           continue; | 
 |  |  |         } | 
 |  |  |         // 获取当前题目的选项集合 | 
 |  |  |         const options = question.svyLibTemplateTargetoptions; | 
 |  |  |  | 
 |  |  |         // 创建一个 Set 来存储选项名称,用于检测重复 | 
 |  |  |         const optionNames = new Set(); | 
 |  |  |  | 
 |  |  |         // 遍历选项集合 | 
 |  |  |         for (let j = 0; j < options.length; j++) { | 
 |  |  |           const option = options[j]; | 
 |  |  |           const optionContent = option.optioncontent; | 
 |  |  |  | 
 |  |  |           // 如果选项名称已经存在于 Set 中,说明重复 | 
 |  |  |           if (optionNames.has(optionContent)) { | 
 |  |  |             this.$message.error( | 
 |  |  |               `题目 ${question.id} 的选项名称 "${optionContent}" 重复` | 
 |  |  |             ); | 
 |  |  |             return false; // 返回 false 表示校验失败 | 
 |  |  |           } | 
 |  |  |           // 将选项名称添加到 Set 中 | 
 |  |  |           optionNames.add(optionContent); | 
 |  |  |         } | 
 |  |  |       } | 
 |  |  |  | 
 |  |  |       // 如果所有题目都校验通过,返回 true | 
 |  |  |       console.log("所有题目校验通过,选项名称无重复"); | 
 |  |  |       this.Departmenttreatment(); | 
 |  |  |     }, | 
 |  |  |  | 
 |  |  |     // 科室/院区处理 | 
 |  |  |     Departmenttreatment() { | 
 |  |  |       this.ruleForm.deptNames = JSON.stringify(this.tempDetpRelevanceslist); | 
 |  |  |       console.log(this.tempDetpRelevanceslist); | 
 |  |  |       this.ruleForm.svyTemplateLibScripts = | 
 |  |  |         this.ruleForm.svyTemplateLibScripts.concat(this.delScriptVOList); | 
 |  |  |       console.log(this.tempDetpRelevanceslist, "this.tempDetpRelevanceslist"); | 
 |  |  |       const result = this.tempDetpRelevanceslist.map( | 
 |  |  |         (subArr) => subArr[subArr.length - 1] | 
 |  |  |       ); | 
 |  |  |       // id数组查数组对象 | 
 |  |  |       result.forEach((item) => { | 
 |  |  |         const condition = this.ruleForm.tempDetpRelevances.some( | 
 |  |  |           (obj) => obj.deptId === item | 
 |  |  |         ); | 
 |  |  |         if (!condition) { | 
 |  |  |           listDept({ deptId: item }).then((res) => { | 
 |  |  |             console.log(res.data[0]); | 
 |  |  |             res.data[0].type = 2; | 
 |  |  |             this.ruleForm.tempDetpRelevances.push(res.data[0]); | 
 |  |  |       this.tempDetpRelevanceslist.forEach((item) => { | 
 |  |  |         console.log(item); | 
 |  |  |         let result = this.deptlist.some((obj) => obj.deptCode == item); | 
 |  |  |         console.log(this.result, "result"); | 
 |  |  |  | 
 |  |  |         if (!result) { | 
 |  |  |           this.tempDetpRelevanceslistform.push({ | 
 |  |  |             deptType: 1, | 
 |  |  |             longTemp: this.ruleForm.longTemp, | 
 |  |  |             deptCode: item, | 
 |  |  |             tempid: this.id, | 
 |  |  |             type: 1, | 
 |  |  |           }); | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |       // 数组对象查id数组 | 
 |  |  |       this.ruleForm.tempDetpRelevances.forEach((item) => { | 
 |  |  |         const condition = result.some((obj) => obj === item.deptId); | 
 |  |  |         if (!condition) { | 
 |  |  |           console.log(condition); | 
 |  |  |           const index = this.ruleForm.tempDetpRelevances.indexOf(item); | 
 |  |  |           this.ruleForm.tempDetpRelevances[index].delFlag = 1; | 
 |  |  |       this.tempbelongWards.forEach((item) => { | 
 |  |  |         let result = this.hosplist.some((obj) => obj.deptCode == item); | 
 |  |  |         if (!result) { | 
 |  |  |           this.tempbelongWardsform.push({ | 
 |  |  |             deptType: 2, | 
 |  |  |             longTemp: this.ruleForm.longTemp, | 
 |  |  |             deptCode: item, | 
 |  |  |             tempid: this.id, | 
 |  |  |             type: 1, | 
 |  |  |           }); | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |  | 
 |  |  |       // return | 
 |  |  |       setTimeout(() => { | 
 |  |  |         this.submitForm(); | 
 |  |  |       }, 1000); | 
 |  |  |       }, 500); | 
 |  |  |     }, | 
 |  |  |     // 科室删除触发 | 
 |  |  |     removetag(row) { | 
 |  |  |       let result = this.deptlist | 
 |  |  |         .filter((item) => item.deptCode == row) | 
 |  |  |         .map((item) => item.id); | 
 |  |  |       console.log(result.length); | 
 |  |  |       if (result.length) { | 
 |  |  |         depthospgetsondel(result).then((res) => { | 
 |  |  |           if (res.code) { | 
 |  |  |           } | 
 |  |  |         }); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     // 删除删除触发 | 
 |  |  |     removehpsp(row) { | 
 |  |  |       let result = this.hosplist | 
 |  |  |         .filter((item) => item.deptCode == row) | 
 |  |  |         .map((item) => item.id); | 
 |  |  |       if (result.length) { | 
 |  |  |         depthospgetsondel(result).then((res) => { | 
 |  |  |           if (res.code) { | 
 |  |  |           } | 
 |  |  |         }); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     // 下一步 | 
 |  |  |     nextstep() { | 
 |  |  | 
 |  |  |           }); | 
 |  |  |         }); | 
 |  |  |     }, | 
 |  |  |     // 获取题目列表 | 
 |  |  |     // 获取问题列表 | 
 |  |  |     getaddtopiclist() { | 
 |  |  |       this.drawer = true; | 
 |  |  |       this.queryParams.scoretype = this.ruleForm.scoreType; | 
 |  |  |       this.queryParams.scoreType = this.ruleForm.scoreType; | 
 |  |  |       getissuelist(this.queryParams).then((res) => { | 
 |  |  |         this.loading = false; | 
 |  |  |         this.userList = res.rows; | 
 |  |  | 
 |  |  |         console.log(this.userList); | 
 |  |  |       }); | 
 |  |  |     }, | 
 |  |  |     // 新增题目 | 
 |  |  |     // 新增问题 | 
 |  |  |     addtopic(row) { | 
 |  |  |       row.isoperation = 1; | 
 |  |  |       row.svyLibScriptOptions.forEach((item) => { | 
 |  |  | 
 |  |  |     handleUpdate(row) { | 
 |  |  |       this.topicobj = row; | 
 |  |  |       this.radioas = ""; | 
 |  |  |       console.log(this.topicobj, "看数据"); | 
 |  |  |       // getissuelist({ svyid: row.svyid }).then((res) => { | 
 |  |  |       // }); | 
 |  |  |     }, | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     sortFn() { | 
 |  |  |       this.ruleForm.svyTemplateLibScripts.forEach((item, index) => { | 
 |  |  |         item.sort = index + 1; | 
 |  |  |         item.svyLibTemplateTargetoptions.forEach((items) => { | 
 |  |  |           items.nextQuestion = Number(item.sort) + 1; | 
 |  |  |         }); | 
 |  |  |         item.sort = Number(index) + 1; | 
 |  |  |         if (item.sort == this.ruleForm.svyTemplateLibScripts.length) { | 
 |  |  |           item.nextScriptno = 0; | 
 |  |  |         } else { | 
 |  |  |           item.nextScriptno = item.sort + 1; | 
 |  |  |         } | 
 |  |  |         if (item.svyLibTemplateTargetoptions) { | 
 |  |  |           item.svyLibTemplateTargetoptions.forEach((items) => { | 
 |  |  |             items.nextQuestion = Number(item.sort) + 1; | 
 |  |  |           }); | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |       console.log(this.ruleForm.svyTemplateLibScripts); | 
 |  |  |     }, | 
 |  |  |  | 
 |  |  |     // 修改题目信息 | 
 |  |  |     Submittopicobj() {}, | 
 |  |  |     // 修改问题信息 | 
 |  |  |     Submittopicobj() { | 
 |  |  |       this.$modal | 
 |  |  |         .confirm( | 
 |  |  |           '是否确认新增名称为"' + this.indexform.scriptTopic + '"的问题数据?' | 
 |  |  |         ) | 
 |  |  |         .then(() => { | 
 |  |  |           this.indexform.isoperation = 1; | 
 |  |  |           this.indexform.svyLibTemplateTargetoptions.forEach((item) => { | 
 |  |  |             item.isoperation = 1; | 
 |  |  |           }); | 
 |  |  |           this.ruleForm.svyTemplateLibScripts.push(this.indexform); | 
 |  |  |           this.indexform = { svyTemplateLibScripts: [] }; | 
 |  |  |           this.drawer = false; | 
 |  |  |  | 
 |  |  |           this.sortFn(); | 
 |  |  |           this.$modal.msgSuccess("问题新增成功,保存模板失效"); | 
 |  |  |         }); | 
 |  |  |     }, | 
 |  |  |     // 新增变量 | 
 |  |  |     addvariable() { | 
 |  |  |       this.variablelist.push({ | 
 |  |  | 
 |  |  |     showInput() { | 
 |  |  |       this.inputVisible = true; | 
 |  |  |     }, | 
 |  |  |     // 疾病----------------------- | 
 |  |  |  | 
 |  |  |     handleCloseillness(tag) { | 
 |  |  |       this.illnesslist.splice(this.illnesslist.indexOf(tag), 1); | 
 |  |  |       if (tag.id) { | 
 |  |  |         this.illnesslistapi.push(tag.id); | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     remoteMethod(value) { | 
 |  |  |       console.log(value); | 
 |  |  |       const illnessqueryParams = { | 
 |  |  |         pageNum: 1, | 
 |  |  |         pageSize: 100, | 
 |  |  |         icdname: value, | 
 |  |  |       }; | 
 |  |  |       this.loading = true; | 
 |  |  |       setTimeout(() => { | 
 |  |  |         this.loading = false; | 
 |  |  |         getillnesslist(illnessqueryParams).then((response) => { | 
 |  |  |           this.optionsillness = response.rows; | 
 |  |  |         }); | 
 |  |  |       }, 200); | 
 |  |  |     }, | 
 |  |  |     illnessConfirm(item) { | 
 |  |  |       let opeavalue = {}; | 
 |  |  |       let tagname = this.inputValueillness; | 
 |  |  |       illnesslistget(item).then((res) => { | 
 |  |  |         opeavalue = res.data; | 
 |  |  |         opeavalue.outid = this.id; | 
 |  |  |         opeavalue.type = 5; | 
 |  |  |         opeavalue.icd10id = opeavalue.icdid; | 
 |  |  |         opeavalue.icd10name = opeavalue.icdname; | 
 |  |  |         opeavalue.icd10code = opeavalue.icdcode; | 
 |  |  |         if (tagname) { | 
 |  |  |           this.illnesslist.push(opeavalue); | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |       console.log(this.illnesslist); | 
 |  |  |       this.inputVisibleillness = false; | 
 |  |  |       this.inputValueillness = ""; | 
 |  |  |     }, | 
 |  |  |     // 保存 | 
 |  |  |     // 保存疾病 | 
 |  |  |     confirmillness(guid) { | 
 |  |  |       this.illnesslist.forEach((item, index) => { | 
 |  |  |         if (guid) { | 
 |  |  |           item.outid = guid; | 
 |  |  |         } else { | 
 |  |  |           console.log(this.ruleForm); | 
 |  |  |           item.outid = this.ruleForm.svyid; | 
 |  |  |         } | 
 |  |  |         item.icd10name = item.icdname; | 
 |  |  |         item.icd10code = item.icdcode; | 
 |  |  |         item.type = 5; | 
 |  |  |         if (!item.id) { | 
 |  |  |           addtargetillness(item).then((res) => {}); | 
 |  |  |         } | 
 |  |  |       }); | 
 |  |  |       if (this.illnesslistapi.length) { | 
 |  |  |         deltargetillness(this.illnesslistapi.join(",")).then((res) => {}); | 
 |  |  |       } | 
 |  |  |       this.illnessVisible = false; | 
 |  |  |       this.$modal.msgSuccess("编辑成功"); | 
 |  |  |     }, | 
 |  |  |     // -------------------------- | 
 |  |  |     // 保存科室/病区 | 
 |  |  |     putbelongDepts(id) { | 
 |  |  |       this.tempDetpRelevanceslistform.forEach((item) => { | 
 |  |  |         if (!item.tempid) item.tempid = id; | 
 |  |  |       }); | 
 |  |  |       this.tempbelongWardsform.forEach((item) => { | 
 |  |  |         if (!item.tempid) item.tempid = id; | 
 |  |  |       }); | 
 |  |  |       if (this.tempDetpRelevanceslistform.length > 0) { | 
 |  |  |         depthospgetson(this.tempDetpRelevanceslistform).then((res) => { | 
 |  |  |           if (res.code == 200) { | 
 |  |  |             this.$modal.msgSuccess("科室新增成功"); | 
 |  |  |           } | 
 |  |  |         }); | 
 |  |  |       } | 
 |  |  |       if (this.tempbelongWardsform.length > 0) { | 
 |  |  |         depthospgetson(this.tempbelongWardsform).then((res) => { | 
 |  |  |           if (res.code == 200) { | 
 |  |  |             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 + Number(current.score); | 
 |  |  |         }, 0); | 
 |  |  |         console.log(totalScore); | 
 |  |  |         console.log(this.ruleForm.scriptScore); | 
 |  |  |  | 
 |  |  |         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.indexform.svyLibTemplateTargetoptions = []; | 
 |  |  |       } | 
 |  |  |       this.indexform.svyLibTemplateTargetoptions.push({ | 
 |  |  |         score: "", | 
 |  |  |         isoperation: 1, | 
 |  |  |       }); | 
 |  |  |       console.log(this.indexform.svyLibTemplateTargetoptions); | 
 |  |  |     }, | 
 |  |  |     // 选项文件上传 | 
 |  |  |     handleChange(item, response, file, fileList) { | 
 |  |  |       console.log(response); | 
 |  |  |       if (response.code == 200) { | 
 |  |  |         console.log(item); | 
 |  |  |         let index = this.indexform.svyLibTemplateTargetoptions.findIndex( | 
 |  |  |           (obj) => obj.optioncontent == item.optioncontent | 
 |  |  |         ); | 
 |  |  |         console.log(index); | 
 |  |  |         this.indexform.svyLibTemplateTargetoptions[index].picturePath = | 
 |  |  |           response.url; | 
 |  |  |         console.log(this.indexform.svyLibTemplateTargetoptions[index]); | 
 |  |  |         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; | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |   }, | 
 |  |  | }; | 
 |  |  | 
 |  |  |   // display: flex; | 
 |  |  | } | 
 |  |  | .sidecolumn { | 
 |  |  |   margin: 20px; | 
 |  |  |   margin-bottom: 0; | 
 |  |  |   margin: 10px 20px 0 20px; | 
 |  |  |   padding: 20px; | 
 |  |  |   background: #edf1f7; | 
 |  |  |   border: 1px solid #dcdfe6; | 
 |  |  | 
 |  |  |   // margin-top: 20px; | 
 |  |  |   margin: 20px; | 
 |  |  |   padding: 30px; | 
 |  |  |   padding-top: 5px; | 
 |  |  |   margin-top: 10px; | 
 |  |  |   background: #ffff; | 
 |  |  |   border: 1px solid #dcdfe6; | 
 |  |  |   -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), | 
 |  |  | 
 |  |  |     font-size: 20px; | 
 |  |  |   } | 
 |  |  |   .leftvlue-jbxx { | 
 |  |  |     display: flex; /* 使用 Flexbox 布局 */ | 
 |  |  |     justify-content: space-between; | 
 |  |  |     font-size: 24px; | 
 |  |  |     border-left: 5px solid #41a1be; | 
 |  |  |     padding-left: 5px; | 
 |  |  | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } | 
 |  |  | .headline { | 
 |  |  |   display: flex; | 
 |  |  |   justify-content: space-between; | 
 |  |  |   font-size: 20px; | 
 |  |  |   border-left: 3px solid #41a1be; | 
 |  |  |   padding-left: 5px; | 
 |  |  |   margin: 15px 0; | 
 |  |  | } | 
 |  |  | .xinz-inf { | 
 |  |  |   font-size: 18px; | 
 |  |  |   white-space: nowrap; | 
 |  |  | 
 |  |  |     vertical-align: bottom; | 
 |  |  |   } | 
 |  |  | } | 
 |  |  | .xinz-infs { | 
 |  |  |   font-size: 18px; | 
 |  |  |   line-height: 48px; | 
 |  |  |  | 
 |  |  |   .el-tag + .el-tag { | 
 |  |  |     margin-left: 10px; | 
 |  |  |   } | 
 |  |  | } | 
 |  |  | .addtopic { | 
 |  |  |   margin-top: 30px; | 
 |  |  | } | 
 |  |  | 
 |  |  |   margin: 20px 0; | 
 |  |  |   display: flex; | 
 |  |  |   .presentation-left { | 
 |  |  |     width: 50%; | 
 |  |  |     width: 45%; | 
 |  |  |     max-height: 80vh; | 
 |  |  |     padding: 0 20px; | 
 |  |  |     font-size: 18px; | 
 |  |  |     overflow: auto; | 
 |  |  |     .button-textxg { | 
 |  |  |       color: #024df0; | 
 |  |  |     } | 
 |  |  |     .button-textsc { | 
 |  |  |       color: #f52727; | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  |   .spresentation-left { | 
 |  |  |     width: 100%; | 
 |  |  |     // height: 500px; | 
 |  |  |     .button-textxg { | 
 |  |  |       color: #024df0; | 
 |  |  | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  |   .presentation-right { | 
 |  |  |     width: 50%; | 
 |  |  |     max-height: 688px; | 
 |  |  |     width: 55%; | 
 |  |  |     max-height: 80vh; | 
 |  |  |     padding: 0 20px; | 
 |  |  |     font-size: 18px; | 
 |  |  |     overflow: auto; | 
 |  |  | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } | 
 |  |  | .topicxq { | 
 |  |  |   background-color: #e2f5fc; | 
 |  |  |   border-radius: 4px; | 
 |  |  |   margin-top: 15px; | 
 |  |  |   margin-left: 10%; | 
 |  |  |   padding-left: 20px; | 
 |  |  |   padding-top: 15px; | 
 |  |  |   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); | 
 |  |  | } | 
 |  |  | .custom-width { | 
 |  |  |   width: 100px; /* 设置宽度样式 */ | 
 |  |  | } | 
 |  |  | .el-select { | 
 |  |  |   width: 280px; | 
 |  |  | } | 
 |  |  |  | 
 |  |  | .el-cascader { | 
 |  |  |   width: 40%; | 
 |  |  | } | 
 |  |  | ::v-deep .addtopic-input { | 
 |  |  |   input { | 
 |  |  |     background: #02a7f0; |