| | |
| | | placeholder="请输入任务描述" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="服务形式"> |
| | | <!-- <el-form-item label="服务形式"> |
| | | <el-radio-group v-model="checkList"> |
| | | <el-radio |
| | | v-for="(item, index) in checkboxlist" |
| | |
| | | {{ item.label }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="服务形式"> |
| | | </el-form-item> --> |
| | | <el-form-item label="服务形式"> |
| | | <SortCheckbox |
| | | v-model="checkList" |
| | | :options="checkboxlist" |
| | | :initialselectedOrder="selectedOrder" |
| | | value-key="value" |
| | | label-key="label" |
| | | @change="checkSelectionChange" |
| | | /> |
| | | </el-form-item> --> |
| | | </el-form-item> |
| | | <el-form-item label="执行周期" prop="longTask"> |
| | | <el-radio-group v-model="form.longTask"> |
| | | <el-radio :label="0">自定义周期</el-radio> |
| | |
| | | <el-button type="primary" @click="nextstep('ruleForm')">{{ |
| | | quote ? "立即创建" : "派发患者配置" |
| | | }}</el-button> |
| | | <el-button type="success" @click="submitForm('ruleForm')">{{ |
| | | quote ? "立即创建" : "确认服务配置" |
| | | }}</el-button> |
| | | <el-button @click="resetForm('ruleForm')">重置</el-button> |
| | | <el-button |
| | | :loading="submitLoading" |
| | | type="success" |
| | | @click="submitForm('ruleForm')" |
| | | >{{ quote ? "立即创建" : "确认服务配置" }}</el-button |
| | | > |
| | | <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> --> |
| | | </div> |
| | | <!-- 任务详情 --> |
| | | <div v-if="Editprogress == 2"> |
| | |
| | | </div> |
| | | </div> |
| | | <el-button type="primary" @click="laststep()">上一步</el-button> |
| | | <el-button type="success" @click="submitForm('ruleForm')">{{ |
| | | quote ? "立即创建" : "确认服务配置" |
| | | }}</el-button> |
| | | <el-button @click="resetForm('ruleForm')">重置</el-button> |
| | | <el-button |
| | | :loading="submitLoading" |
| | | type="success" |
| | | @click="submitForm('ruleForm')" |
| | | >{{ quote ? "立即创建" : "确认服务配置" }}</el-button |
| | | > |
| | | <!-- <el-button @click="resetForm('ruleForm')">重置</el-button> --> |
| | | </div> |
| | | </div> |
| | | <!-- 添加患者 --> |
| | |
| | | import OptionalForm from "@/components/OptionalForm"; //疾病添加组件 |
| | | import SFtable from "@/components/SFtable"; //表格组件 |
| | | import SortCheckbox from "@/components/SortCheckbox"; //表格组件 |
| | | |
| | | import { MessageBox } from "element-ui"; |
| | | |
| | | export default { |
| | |
| | | previewid: "", //任务模板传递id |
| | | libName: "", |
| | | templateor: false, |
| | | submitLoading: false, // 控制按钮加载状态 |
| | | objyl: {}, |
| | | overallCase: [], //选择患者总 |
| | | allpids: [], |
| | |
| | | { label: "身份证", width: "200", prop: "idcardno" }, |
| | | { label: "性别", width: "", prop: "sex" }, |
| | | { label: "年龄", width: "", prop: "age" }, |
| | | { label: "电话", width: "180", prop: "telcode" }, |
| | | { label: "责任护士", width: "", prop: "nurseName" }, |
| | | { label: "主治医生", width: "", prop: "drname" }, |
| | | { label: "科室", width: "240", prop: "dept" }, |
| | |
| | | { label: "身份证", width: "200", prop: "sfzh" }, |
| | | { label: "性别", width: "", prop: "sex" }, |
| | | { label: "年龄", width: "", prop: "age" }, |
| | | { label: "电话", width: "180", prop: "telcode" }, |
| | | { label: "出院天数", width: "", prop: "endDay" }, |
| | | { label: "责任护士", width: "", prop: "nurseName" }, |
| | | { label: "主治医生", width: "", prop: "drname" }, |
| | |
| | | }, |
| | | // 保存 |
| | | submitForm(formName) { |
| | | if (this.time4 && this.form.sendType == 3) |
| | | this.form.showTimeMorn = this.time4; |
| | | this.form.sendTimeslot = [ |
| | | { |
| | | begantime: this.time4, |
| | | endtime: "", |
| | | xh: 1, |
| | | }, |
| | | ]; |
| | | if (this.form.appltype == 1) { |
| | | this.leavehospitaldistrictcodes = []; |
| | | this.operationcodes = []; |
| | | this.illnesscodes = []; |
| | | } else if (this.form.appltype == 2) { |
| | | this.deptcodesWards = []; |
| | | this.operationcodes = []; |
| | | this.illnesscodes = []; |
| | | } else if (this.form.appltype == 3) { |
| | | this.deptcodesWards = []; |
| | | this.leavehospitaldistrictcodes = []; |
| | | this.operationcodes = []; |
| | | } else if (this.form.appltype == 4) { |
| | | this.deptcodesWards = []; |
| | | this.illnesscodes = []; |
| | | this.leavehospitaldistrictcodes = []; |
| | | } |
| | | if (this.checkList) { |
| | | this.form.preachform = this.checkList; |
| | | } else { |
| | | this.$modal.msgError("请选择服务类型"); |
| | | console.log(this.submitLoading); |
| | | |
| | | if (this.submitLoading) { |
| | | return; |
| | | } |
| | | console.log(this.operationcodes[0]); |
| | | console.log(this.operationcodes); |
| | | // 第二步:开启加载状态,禁用按钮 |
| | | this.submitLoading = true; |
| | | console.log(this.submitLoading); |
| | | |
| | | if ( |
| | | this.deptcodesWards[0] || |
| | | this.leavehospitaldistrictcodes[0] || |
| | | this.diagglist[0] || |
| | | this.operationcodes[0] || |
| | | this.form.longTask == 2 |
| | | ) { |
| | | } else { |
| | | this.$modal.msgError("请选择任务关联条件"); |
| | | return; |
| | | } |
| | | //暂停任务患者限制 |
| | | // if (!this.form.patTaskRelevances[0] && !this.form.longTask) { |
| | | // this.$modal.msgError("请选择病人"); |
| | | // return; |
| | | // } |
| | | |
| | | if (!this.form.templatename && !this.templateor) { |
| | | this.$modal.msgError("未选择模板"); |
| | | return; |
| | | } |
| | | |
| | | if ((this.form.sendType == 1 && this.time1) || this.form.sendType == 2) { |
| | | } else if ( |
| | | (this.form.sendType == 3 && this.time4) || |
| | | this.form.longTask |
| | | ) { |
| | | } else { |
| | | return this.$modal.msgError("时间信息缺失"); |
| | | } |
| | | const filteredArray = this.variableList.filter( |
| | | (item) => |
| | | item.name !== "姓名" && item.name !== "电话" && item.name !== "地址" |
| | | ); |
| | | this.form.textParam = this.convertFormat2ToFormat1(filteredArray); |
| | | if (this.form.taskid) { |
| | | this.form.isoperation = 2; |
| | | } else { |
| | | this.form.isoperation = 1; |
| | | } |
| | | if (!this.form.type) { |
| | | this.form.type = this.$route.query.type; |
| | | } |
| | | this.form.serviceType = this.serviceType; |
| | | this.form.deptcode = this.deptcodesWards.join(","); |
| | | this.form.leavehospitaldistrictcode = |
| | | this.leavehospitaldistrictcodes.join(","); |
| | | this.form.opcode = this.operationcodes.join(","); |
| | | this.form.icd10code = this.diagglist |
| | | .map((item) => item.icdcode) |
| | | .join(","); |
| | | Editsingletask(this.form).then((res) => { |
| | | if (res.code == 200) { |
| | | if (this.form.taskid) { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | } else { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | } |
| | | this.$router.push({ |
| | | path: "/followvisit/tasklist", |
| | | query: { tasktopic: this.form.serviceType }, |
| | | }); |
| | | try { |
| | | if (this.time4 && this.form.sendType == 3) |
| | | this.form.showTimeMorn = this.time4; |
| | | this.form.sendTimeslot = [ |
| | | { |
| | | begantime: this.time4, |
| | | endtime: "", |
| | | xh: 1, |
| | | }, |
| | | ]; |
| | | if (this.form.appltype == 1) { |
| | | this.leavehospitaldistrictcodes = []; |
| | | this.operationcodes = []; |
| | | this.illnesscodes = []; |
| | | } else if (this.form.appltype == 2) { |
| | | this.deptcodesWards = []; |
| | | this.operationcodes = []; |
| | | this.illnesscodes = []; |
| | | } else if (this.form.appltype == 3) { |
| | | this.deptcodesWards = []; |
| | | this.leavehospitaldistrictcodes = []; |
| | | this.operationcodes = []; |
| | | } else if (this.form.appltype == 4) { |
| | | this.deptcodesWards = []; |
| | | this.illnesscodes = []; |
| | | this.leavehospitaldistrictcodes = []; |
| | | } |
| | | }); |
| | | if (this.checkList) { |
| | | this.form.preachform = this.checkList.join(","); |
| | | this.form.preachformList = this.selectedOrder; |
| | | } else { |
| | | this.$modal.msgError("请选择服务类型"); |
| | | return; |
| | | } |
| | | console.log(this.operationcodes[0]); |
| | | console.log(this.operationcodes); |
| | | |
| | | if ( |
| | | this.deptcodesWards[0] || |
| | | this.leavehospitaldistrictcodes[0] || |
| | | this.diagglist[0] || |
| | | this.operationcodes[0] || |
| | | this.form.longTask == 2 || |
| | | this.serviceType == 3 |
| | | ) { |
| | | } else { |
| | | this.$modal.msgError("请选择任务关联条件"); |
| | | return; |
| | | } |
| | | //暂停任务患者限制 |
| | | // if (!this.form.patTaskRelevances[0] && !this.form.longTask) { |
| | | // this.$modal.msgError("请选择病人"); |
| | | // return; |
| | | // } |
| | | |
| | | if (!this.form.templatename && !this.templateor) { |
| | | this.$modal.msgError("未选择模板"); |
| | | return; |
| | | } |
| | | |
| | | if ( |
| | | (this.form.sendType == 1 && this.time1) || |
| | | this.form.sendType == 2 |
| | | ) { |
| | | } else if ( |
| | | (this.form.sendType == 3 && this.time4) || |
| | | this.form.longTask |
| | | ) { |
| | | } else { |
| | | return this.$modal.msgError("时间信息缺失"); |
| | | } |
| | | const filteredArray = this.variableList.filter( |
| | | (item) => |
| | | item.name !== "姓名" && item.name !== "电话" && item.name !== "地址" |
| | | ); |
| | | this.form.textParam = this.convertFormat2ToFormat1(filteredArray); |
| | | if (this.form.taskid) { |
| | | this.form.isoperation = 2; |
| | | } else { |
| | | this.form.isoperation = 1; |
| | | } |
| | | if (!this.form.type) { |
| | | this.form.type = this.$route.query.type; |
| | | } |
| | | this.form.serviceType = this.serviceType; |
| | | this.form.deptcode = this.deptcodesWards.join(","); |
| | | this.form.leavehospitaldistrictcode = |
| | | this.leavehospitaldistrictcodes.join(","); |
| | | this.form.opcode = this.operationcodes.join(","); |
| | | this.form.icd10code = this.diagglist |
| | | .map((item) => item.icdcode) |
| | | .join(","); |
| | | Editsingletask(this.form).then((res) => { |
| | | if (res.code == 200) { |
| | | if (this.form.taskid) { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | } else { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | } |
| | | this.$router.push({ |
| | | path: "/followvisit/tasklist", |
| | | query: { tasktopic: this.form.serviceType }, |
| | | }); |
| | | this.submitLoading = false; |
| | | } |
| | | }); |
| | | } catch (error) { |
| | | this.submitLoading = false; |
| | | } finally { |
| | | // 第四步:无论成功或失败,最终都关闭加载状态 |
| | | } |
| | | }, |
| | | |
| | | // ----------------------表格子组件事件 |
| | |
| | | }); |
| | | }, |
| | | checkSelectionChange(selectedValues, selectedOrder) { |
| | | this.selectedOrder = selectedOrder; |
| | | this.selectedOrder = selectedValues; |
| | | console.log("当前选中:", selectedValues); |
| | | console.log("选中顺序:", selectedOrder); |
| | | }, |
| | | // 服务形式选取 |
| | | handleCheckedCitiesChange(row) { |
| | | console.log(row, "服务"); |
| | | this.foncheckList = this.checkboxlist.filter((obj) => |
| | | row.includes(obj.value) |
| | | ); |
| | | }, |
| | | // 服务形式删除 |
| | | handleClosetag(tag) { |
| | | console.log(tag, "tag"); |
| | | console.log(this.foncheckList, "foncheckList"); |
| | | this.checkList = this.checkList.filter((item) => item != tag.value); |
| | | this.foncheckList = this.foncheckList.filter( |
| | | (obj) => obj.value !== tag.value |
| | | ); |
| | | }, |
| | | getillness(id) { |
| | | if (id) { |
| | |
| | | { label: "身份证", width: "200", prop: "idcardno" }, |
| | | { label: "性别", width: "", prop: "sex" }, |
| | | { label: "年龄", width: "", prop: "age" }, |
| | | { label: "电话", width: "180", prop: "telcode" }, |
| | | { label: "出院天数", width: "", prop: "endDay" }, |
| | | { label: "责任护士", width: "", prop: "nurseName" }, |
| | | { label: "医生", width: "", prop: "drname" }, |
| | |
| | | { label: "身份证", width: "200", prop: "idcardno" }, |
| | | { label: "性别", width: "", prop: "sex" }, |
| | | { label: "年龄", width: "", prop: "age" }, |
| | | { label: "电话", width: "180", prop: "telcode" }, |
| | | { label: "出院天数", width: "", prop: "endDay" }, |
| | | { label: "责任护士", width: "", prop: "nurseName" }, |
| | | { label: "医生", width: "", prop: "drname" }, |
| | |
| | | { label: "电话号码", width: "180", prop: "telcode" }, |
| | | { label: "性别", width: "", prop: "sex" }, |
| | | { label: "年龄", width: "", prop: "age" }, |
| | | { label: "电话", width: "180", prop: "telcode" }, |
| | | { label: "出院天数", width: "", prop: "endDay" }, |
| | | { label: "责任护士", width: "", prop: "nurseName" }, |
| | | { label: "医生", width: "", prop: "drname" }, |
| | |
| | | { label: "身份证", width: "200", prop: "idcardno" }, |
| | | { label: "性别", width: "", prop: "sex" }, |
| | | { label: "年龄", width: "", prop: "age" }, |
| | | { label: "电话", width: "180", prop: "telcode" }, |
| | | { label: "出院天数", width: "", prop: "endDay" }, |
| | | ]; |
| | | this.patientqueryParams.pageSize = 1000; |
| | |
| | | ? this.form.patTaskRelevances |
| | | : []; |
| | | this.overallCase = this.form.patTaskRelevances.concat(); |
| | | this.checkList = this.form.preachform; |
| | | |
| | | this.checkList = this.form.preachform.split(","); |
| | | this.selectedOrder = this.form.preachformList; |
| | | this.overallCase.forEach((item) => { |
| | | if (item.endtime) { |
| | | item.endDay = this.daysBetween(item.endtime); |
| | |
| | | this.objyl.isoperation = 1; |
| | | this.objyl.svyTaskTemplateScriptVOS = |
| | | this.objyl.svyTemplateLibScripts; |
| | | this.objyl.svyTaskTemplateScriptVOS.forEach((item) => { |
| | | item.svyTaskTemplateTargetoptions = |
| | | item.svyLibTemplateTargetoptions; |
| | | }); |
| | | this.form.svyTaskTemplateVO = this.objyl; |
| | | this.form.templatename = this.objyl.svyname; |
| | | this.$modal.msgSuccess("暂存成功保存任务后模板失效"); |
| | | this.$modal.msgSuccess("暂存成功保存任务后模板生效"); |
| | | this.drawermb = false; |
| | | this.previewtf = false; |
| | | }) |