|  |  | 
 |  |  |         label-width="98px" | 
 |  |  |       > | 
 |  |  |         <el-form-item label="任务名称"> | 
 |  |  |           <el-input v-model="topqueryParams.taskName" placeholder="请选择任务名称"></el-input> | 
 |  |  |           <el-input | 
 |  |  |             v-model="topqueryParams.taskName" | 
 |  |  |             placeholder="请选择任务名称" | 
 |  |  |           ></el-input> | 
 |  |  |         </el-form-item> | 
 |  |  |         <!-- <el-form-item label="发起人"> | 
 |  |  |           <el-input v-model="topqueryParams.createBy"></el-input> | 
 |  |  | 
 |  |  |             > | 
 |  |  |             </el-option> | 
 |  |  |           </el-select> | 
 |  |  |         </el-form-item> | 
 |  |  |         <el-form-item label="患者范围" prop="status"> | 
 |  |  |           <el-cascader | 
 |  |  |             v-model="topqueryParams.scopetype" | 
 |  |  |             placeholder="默认全部" | 
 |  |  |             :options="sourcetype" | 
 |  |  |             :props="{ expandTrigger: 'hover' }" | 
 |  |  |             @change="handleChange" | 
 |  |  |           ></el-cascader> | 
 |  |  |         </el-form-item> | 
 |  |  |  | 
 |  |  |         <el-form-item label="宣教状态" prop="status"> | 
 |  |  | 
 |  |  |         <el-col :span="1.5"> | 
 |  |  |           <el-button | 
 |  |  |             type="primary" | 
 |  |  |             plain | 
 |  |  |             icon="el-icon-plus" | 
 |  |  |             size="medium" | 
 |  |  |             @click="handleAdd" | 
 |  |  | 
 |  |  |                 icon="el-icon-upload2" | 
 |  |  |                 size="medium" | 
 |  |  |                 @click="handleExport" | 
 |  |  |                 v-hasPermi="['system:user:export']" | 
 |  |  |                 >导出</el-button | 
 |  |  |               > | 
 |  |  |             </div> | 
 |  |  | 
 |  |  |       <el-table | 
 |  |  |         v-loading="loading" | 
 |  |  |         :data="userList" | 
 |  |  |          height="660" | 
 |  |  |         height="560" | 
 |  |  |         @selection-change="handleSelectionChange" | 
 |  |  |       > | 
 |  |  |         <el-table-column type="selection" width="50" align="center" /> | 
 |  |  |         <el-table-column | 
 |  |  |           label="任务名称" | 
 |  |  |           fixed | 
 |  |  | 
 |  |  |         <!-- <el-table-column label="序号" fixed align="center" key="id" prop="id" /> --> | 
 |  |  |         <el-table-column | 
 |  |  |           label="姓名" | 
 |  |  |           width="100" | 
 |  |  |           fixed | 
 |  |  |           align="center" | 
 |  |  |           key="sendname" | 
 |  |  |           prop="sendname" | 
 |  |  |         /> | 
 |  |  |         <el-table-column | 
 |  |  |         label="宣教状态" | 
 |  |  |         align="center" | 
 |  |  |         key="sendstate" | 
 |  |  |         prop="sendstate" | 
 |  |  |         width="120" | 
 |  |  |           label="宣教状态" | 
 |  |  |           align="center" | 
 |  |  |           key="sendstate" | 
 |  |  |           prop="sendstate" | 
 |  |  |           width="120" | 
 |  |  |         > | 
 |  |  |         <template slot-scope="scope"> | 
 |  |  |           <div v-if="scope.row.sendstate == 1"> | 
 |  |  |             <el-tag type="primary" :disable-transitions="false" | 
 |  |  |                 >被领取</el-tag | 
 |  |  |                 > | 
 |  |  |               </div> | 
 |  |  |               <div v-if="scope.row.sendstate == 2"> | 
 |  |  |                 <el-tag type="primary" :disable-transitions="false" | 
 |  |  |                 >待发送</el-tag | 
 |  |  |                 > | 
 |  |  |               </div> | 
 |  |  |               <div v-if="scope.row.sendstate == 3"> | 
 |  |  |                 <el-tag type="success" :disable-transitions="false" | 
 |  |  |                 >已发送未领取</el-tag | 
 |  |  |                 > | 
 |  |  |               </div> | 
 |  |  |               <div v-if="scope.row.sendstate == 4"> | 
 |  |  |                 <el-tag type="info" :disable-transitions="false">不执行</el-tag> | 
 |  |  |               </div> | 
 |  |  |               <div v-if="scope.row.sendstate == 5"> | 
 |  |  |                 <el-tag type="danger" :disable-transitions="false" | 
 |  |  |           <template slot-scope="scope"> | 
 |  |  |             <div v-if="scope.row.sendstate == 1"> | 
 |  |  |               <el-tag type="primary" :disable-transitions="false" | 
 |  |  |                 >表单已领取</el-tag | 
 |  |  |               > | 
 |  |  |             </div> | 
 |  |  |             <div v-if="scope.row.sendstate == 2"> | 
 |  |  |               <el-tag type="primary" :disable-transitions="false" | 
 |  |  |                 >待随访</el-tag | 
 |  |  |               > | 
 |  |  |             </div> | 
 |  |  |             <div v-if="scope.row.sendstate == 3"> | 
 |  |  |               <el-tag type="success" :disable-transitions="false" | 
 |  |  |                 >表单已发送</el-tag | 
 |  |  |               > | 
 |  |  |             </div> | 
 |  |  |             <div v-if="scope.row.sendstate == 4"> | 
 |  |  |               <el-tag type="info" :disable-transitions="false">不执行</el-tag> | 
 |  |  |             </div> | 
 |  |  |             <div v-if="scope.row.sendstate == 5"> | 
 |  |  |               <el-tag type="danger" :disable-transitions="false" | 
 |  |  |                 >发送失败</el-tag | 
 |  |  |                 > | 
 |  |  |               </div> | 
 |  |  |               <div v-if="scope.row.sendstate == 6"> | 
 |  |  |                 <el-tag type="danger" :disable-transitions="false">已完成</el-tag> | 
 |  |  |               </div> | 
 |  |  |             </template> | 
 |  |  |           </el-table-column> | 
 |  |  |               > | 
 |  |  |             </div> | 
 |  |  |             <div v-if="scope.row.sendstate == 6"> | 
 |  |  |               <el-tag type="danger" :disable-transitions="false">已完成</el-tag> | 
 |  |  |             </div> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |  | 
 |  |  |           <el-table-column | 
 |  |  |         <el-table-column | 
 |  |  |           label="结果状态" | 
 |  |  |           align="center" | 
 |  |  |           key="excep" | 
 |  |  |           prop="excep" | 
 |  |  |           width="120" | 
 |  |  |           > | 
 |  |  |         > | 
 |  |  |           <template slot-scope="scope"> | 
 |  |  |             <div v-if="scope.row.sendstate == 6"> | 
 |  |  |               <dict-tag | 
 |  |  |               :options="dict.type.sys_yujing" | 
 |  |  |               :value="scope.row.excep" | 
 |  |  |                 :options="dict.type.sys_yujing" | 
 |  |  |                 :value="scope.row.excep" | 
 |  |  |               /> | 
 |  |  |             </div> | 
 |  |  |             <div v-else> | 
 |  |  | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |         <el-table-column | 
 |  |  |         label="处理意见" | 
 |  |  |         align="center" | 
 |  |  |         key="suggest" | 
 |  |  |         prop="suggest" | 
 |  |  |         width="120" | 
 |  |  |           label="处理意见" | 
 |  |  |           align="center" | 
 |  |  |           key="suggest" | 
 |  |  |           prop="suggest" | 
 |  |  |           width="120" | 
 |  |  |         > | 
 |  |  |         <template slot-scope="scope"> | 
 |  |  |           <dict-tag | 
 |  |  |           :options="dict.type.sys_suggest" | 
 |  |  |           :value="scope.row.suggest" | 
 |  |  |           /> | 
 |  |  |           <template slot-scope="scope"> | 
 |  |  |             <dict-tag | 
 |  |  |               :options="dict.type.sys_suggest" | 
 |  |  |               :value="scope.row.suggest" | 
 |  |  |             /> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |  | 
 |  |  |         <el-table-column | 
 |  |  |         label="出院日期" | 
 |  |  |         width="200" | 
 |  |  |         align="center" | 
 |  |  |         key="endtime" | 
 |  |  |         prop="endtime" | 
 |  |  |           label="出院日期" | 
 |  |  |           width="200" | 
 |  |  |           align="center" | 
 |  |  |           key="endtime" | 
 |  |  |           prop="endtime" | 
 |  |  |         > | 
 |  |  |         <template slot-scope="scope"> | 
 |  |  |           <span>{{ formatTime(scope.row.endtime) }}</span> | 
 |  |  |         </template></el-table-column | 
 |  |  |         > | 
 |  |  |         <el-table-column | 
 |  |  |         label="应宣教日期" | 
 |  |  |         width="200" | 
 |  |  |         align="center" | 
 |  |  |         key="longSendTime" | 
 |  |  |         prop="longSendTime" | 
 |  |  |         > | 
 |  |  |         <template slot-scope="scope"> | 
 |  |  |           <span>{{ formatTime(scope.row.longSendTime) }}</span> | 
 |  |  |           <template slot-scope="scope"> | 
 |  |  |             <span>{{ formatTime(scope.row.endtime) }}</span> | 
 |  |  |           </template></el-table-column | 
 |  |  |           > | 
 |  |  |           <el-table-column | 
 |  |  |         > | 
 |  |  |         <el-table-column | 
 |  |  |           label="应宣教日期" | 
 |  |  |           width="200" | 
 |  |  |           align="center" | 
 |  |  |           key="longSendTime" | 
 |  |  |           prop="longSendTime" | 
 |  |  |         > | 
 |  |  |           <template slot-scope="scope"> | 
 |  |  |             <span>{{ formatTime(scope.row.longSendTime) }}</span> | 
 |  |  |           </template></el-table-column | 
 |  |  |         > | 
 |  |  |         <el-table-column | 
 |  |  |           label="出院天数" | 
 |  |  |           width="120" | 
 |  |  |           align="center" | 
 |  |  |           key="endDay" | 
 |  |  |           prop="endDay" | 
 |  |  |           > | 
 |  |  |         > | 
 |  |  |           <template slot-scope="scope"> | 
 |  |  |             <span>{{ | 
 |  |  |               scope.row.endDay ? scope.row.endDay + "天" : "日期缺失" | 
 |  |  |             }}</span> | 
 |  |  |             <span>{{ scope.row.endDay ? scope.row.endDay + "天" : "" }}</span> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |         <el-table-column | 
 |  |  | 
 |  |  |           key="drname" | 
 |  |  |           prop="drname" | 
 |  |  |         /> | 
 |  |  |         <el-table-column | 
 |  |  |           label="宣教异常记录" | 
 |  |  |           width="120" | 
 |  |  |           align="center" | 
 |  |  |           key="remark" | 
 |  |  |           prop="remark" | 
 |  |  |         /> | 
 |  |  |  | 
 |  |  |         <!-- <el-table-column | 
 |  |  |           label="病历号" | 
 |  |  | 
 |  |  |         /> --> | 
 |  |  |  | 
 |  |  |         <!-- <el-table-column label="年龄" align="center" key="age" prop="age" /> --> | 
 |  |  |         <!-- <el-table-column label="性别" align="center" key="sex" prop="sex" /> --> | 
 |  |  |         <!-- <el-table-column label="性别"width="100" align="center" key="sex" prop="sex" /> --> | 
 |  |  |         <!-- <el-table-column label="床号" align="center" key="badNo" prop="badNo" /> --> | 
 |  |  |         <el-table-column | 
 |  |  |           label="科室" | 
 |  |  | 
 |  |  |           align="center" | 
 |  |  |           key="templatename" | 
 |  |  |           prop="templatename" | 
 |  |  |           :show-overflow-tooltip="true" | 
 |  |  |           width="200" | 
 |  |  |         /> | 
 |  |  |  | 
 |  |  | 
 |  |  |           prop="createBy" | 
 |  |  |           width="120" | 
 |  |  |         /> | 
 |  |  |         <!-- <el-table-column | 
 |  |  |           label="责任医师" | 
 |  |  |           align="center" | 
 |  |  |           key="drname" | 
 |  |  |           prop="drname" | 
 |  |  |           width="120" | 
 |  |  |         /> --> | 
 |  |  |  | 
 |  |  |         <!-- <el-table-column | 
 |  |  |           label="出院时间" | 
 |  |  |           sortable | 
 |  |  |         fixed="right" | 
 |  |  |           label="任务发送流程" | 
 |  |  |           align="center" | 
 |  |  |           prop="createTime" | 
 |  |  |           key="serviceSubtaskRecordList" | 
 |  |  |           prop="serviceSubtaskRecordList" | 
 |  |  |           width="160" | 
 |  |  |           :show-overflow-tooltip="true" | 
 |  |  |         > | 
 |  |  |           <template slot-scope="scope"> | 
 |  |  |             <span>{{ formatTime(scope.row.createTime) }}</span> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> --> | 
 |  |  |         <!-- <el-table-column | 
 |  |  |           label="宣教时间" | 
 |  |  |           sortable | 
 |  |  |           align="center" | 
 |  |  |           prop="createTime" | 
 |  |  |           width="160" | 
 |  |  |         > | 
 |  |  |           <template slot-scope="scope"> | 
 |  |  |             <span v-if="scope.row.sendType != 3">{{ | 
 |  |  |               formatTime(scope.row.createTime) | 
 |  |  |             }}</span> | 
 |  |  |             <span v-else>即刻发送</span> | 
 |  |  |             <span v-for="item in scope.row.serviceSubtaskRecordList" | 
 |  |  |               >{{ item.remark }}、 | 
 |  |  |             </span> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> --> | 
 |  |  |         <el-table-column | 
 |  |  |           fixed="right" | 
 |  |  |           label="任务结果记录" | 
 |  |  |           width="120" | 
 |  |  |           align="center" | 
 |  |  |           key="remark" | 
 |  |  |           prop="remark" | 
 |  |  |         > | 
 |  |  |           <template slot-scope="scope" v-if="scope.row.remark"> | 
 |  |  |             <el-tag | 
 |  |  |               type="success" | 
 |  |  |               v-if=" | 
 |  |  |                 scope.row.sendstate != 5 && | 
 |  |  |                 scope.row.sendstate != 4 && | 
 |  |  |                 scope.row.remark | 
 |  |  |               " | 
 |  |  |               >{{ scope.row.remark }}</el-tag | 
 |  |  |             > | 
 |  |  |             <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> | 
 |  |  |         <el-table-column | 
 |  |  |           fixed="right" | 
 |  |  |           label="宣教时间" | 
 |  |  |           sortable | 
 |  |  |           align="center" | 
 |  |  | 
 |  |  |             <dict-tag :options="serviceState" :value="scope.row.sendstate" /> | 
 |  |  |           </template> | 
 |  |  |         </el-table-column> --> | 
 |  |  |  | 
 |  |  |       </el-table> | 
 |  |  |  | 
 |  |  |       <pagination | 
 |  |  | 
 |  |  |       ruleForm: { | 
 |  |  |         type: [], | 
 |  |  |       }, | 
 |  |  |       sourcetype: [ | 
 |  |  |         { | 
 |  |  |           value: 1, | 
 |  |  |           label: "科室", | 
 |  |  |           children: [], | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           value: 2, | 
 |  |  |           label: "病区", | 
 |  |  |           children: [], | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           value: 3, | 
 |  |  |           label: "全部", | 
 |  |  |         }, | 
 |  |  |       ], | 
 |  |  |       dynamicTags: ["选项一", "选项二", "选项三"], //选项 | 
 |  |  |       inputVisible: false, | 
 |  |  |       inputValue: "", | 
 |  |  | 
 |  |  |         pageNum: 1, | 
 |  |  |         pageSize: 10, | 
 |  |  |         serviceType: 4, | 
 |  |  |         searchscope:2, | 
 |  |  |         searchscope: 2, | 
 |  |  |         sendstate: 2, | 
 |  |  |          leaveldeptcodes: [], | 
 |  |  |         leavehospitaldistrictcodes: [], | 
 |  |  |       }, | 
 |  |  |       propss: { multiple: true }, | 
 |  |  |       options: [], | 
 |  |  | 
 |  |  |       topicoptions: [ | 
 |  |  |         { | 
 |  |  |           value: 1, | 
 |  |  |           label: "被领取", | 
 |  |  |           label: "表单已领取", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           value: 2, | 
 |  |  |           label: "待发送", | 
 |  |  |           label: "待随访", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           value: 3, | 
 |  |  |           label: "已发送未领取", | 
 |  |  |           label: "表单已发送", | 
 |  |  |         }, | 
 |  |  |         { | 
 |  |  |           value: 4, | 
 |  |  | 
 |  |  |   watch: {}, | 
 |  |  |   created() { | 
 |  |  |     this.serviceState = store.getters.serviceState; | 
 |  |  |     this.sourcetype[0].children = store.getters.belongDepts.map((dept) => { | 
 |  |  |       return { | 
 |  |  |         label: dept.deptName, | 
 |  |  |         value: dept.deptCode, | 
 |  |  |       }; | 
 |  |  |     }); | 
 |  |  |     this.sourcetype[1].children = store.getters.belongWards.map((dept) => { | 
 |  |  |       return { | 
 |  |  |         label: dept.districtName, | 
 |  |  |         value: dept.districtCode, | 
 |  |  |       }; | 
 |  |  |     }); | 
 |  |  |  | 
 |  |  |     this.getList(); | 
 |  |  |     this.getConfigKey("sys.user.initPassword").then((response) => { | 
 |  |  |       this.initPassword = response.msg; | 
 |  |  | 
 |  |  |   methods: { | 
 |  |  |     /** 查询门诊宣教服务列表 */ | 
 |  |  |     getList() { | 
 |  |  |       if (this.topqueryParams.searchscope == 1) { | 
 |  |  |         this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map( | 
 |  |  |           (obj) => obj.deptCode | 
 |  |  |         ); | 
 |  |  |         this.topqueryParams.leavehospitaldistrictcodes = null; | 
 |  |  |       } else if (this.topqueryParams.searchscope == 2) { | 
 |  |  |         this.topqueryParams.leavehospitaldistrictcodes = | 
 |  |  |           store.getters.belongWards.map((obj) => obj.districtCode); | 
 |  |  |         this.topqueryParams.leaveldeptcodes = null; | 
 |  |  |       } else { | 
 |  |  |       if (this.topqueryParams.searchscope == 3) { | 
 |  |  |         this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map( | 
 |  |  |           (obj) => obj.deptCode | 
 |  |  |         ); | 
 |  |  | 
 |  |  |           store.getters.belongWards.map((obj) => obj.districtCode); | 
 |  |  |       } | 
 |  |  |       this.loading = true; | 
 |  |  |       console.log(this.topqueryParams.leavehospitaldistrictcodes); | 
 |  |  |       console.log(this.topqueryParams.leaveldeptcodes); | 
 |  |  |  | 
 |  |  |       if ( | 
 |  |  |         this.topqueryParams.leavehospitaldistrictcodes[0] && | 
 |  |  |         this.topqueryParams.leaveldeptcodes[0] | 
 |  |  |       ) { | 
 |  |  |         this.topqueryParams.deptOrDistrict = 2; | 
 |  |  |       } else { | 
 |  |  |         this.topqueryParams.deptOrDistrict = 1; | 
 |  |  |       } | 
 |  |  |       console.log(55); | 
 |  |  |       getTaskservelist(this.topqueryParams).then((response) => { | 
 |  |  |         this.userList = response.rows[0].serviceSubtaskList; | 
 |  |  |         this.userList.forEach((item) => { | 
 |  |  | 
 |  |  |         }, 200); | 
 |  |  |       } else { | 
 |  |  |         this.options = []; | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     // 患者范围处理 | 
 |  |  |     handleChange(value) { | 
 |  |  |       let type = value[0]; | 
 |  |  |       let code = value.slice(-1)[0]; | 
 |  |  |       this.topqueryParams.leavehospitaldistrictcodes = []; | 
 |  |  |       this.topqueryParams.leaveldeptcodes = []; | 
 |  |  |       if (type == 1) { | 
 |  |  |         this.topqueryParams.leaveldeptcodes.push(code); | 
 |  |  |         this.topqueryParams.leavehospitaldistrictcodes = []; | 
 |  |  |         this.topqueryParams.searchscope = 1; | 
 |  |  |       } else if (type == 2) { | 
 |  |  |         this.topqueryParams.leavehospitaldistrictcodes.push(code); | 
 |  |  |         this.topqueryParams.leaveldeptcodes = []; | 
 |  |  |         this.topqueryParams.searchscope = 2; | 
 |  |  |       } else { | 
 |  |  |         this.topqueryParams.searchscope = 3; | 
 |  |  |       } | 
 |  |  |     }, | 
 |  |  |     // 门诊宣教状态修改 | 
 |  |  | 
 |  |  |         pageNum: 1, | 
 |  |  |         pageSize: 10, | 
 |  |  |         serviceType: 4, | 
 |  |  |         sendstate: 2, | 
 |  |  |       }; | 
 |  |  |       this.handleQuery(); | 
 |  |  |     }, | 
 |  |  | 
 |  |  |     // 便捷按钮 | 
 |  |  |     toleadExport(too) { | 
 |  |  |       if (too == 1) { | 
 |  |  |         this.topqueryParams.sendstate=4; | 
 |  |  |         this.topqueryParams.excep=null; | 
 |  |  |         this.topqueryParams.sendstate = 4; | 
 |  |  |         this.topqueryParams.excep = null; | 
 |  |  |       } else if (too == 2) { | 
 |  |  |         this.topqueryParams.excep=1; | 
 |  |  |         this.topqueryParams.excep = 1; | 
 |  |  |       } | 
 |  |  |       this.handleQuery(); | 
 |  |  |     }, | 
 |  |  |     /** 导出按钮操作 */ | 
 |  |  |     handleExport() { | 
 |  |  |       this.download( | 
 |  |  |         "system/user/export", | 
 |  |  |         "smartor/serviceSubtask/patItemExport", | 
 |  |  |         { | 
 |  |  |           ...this.topqueryParams, | 
 |  |  |         }, |