| | |
| | | placeholder="请输入任务描述" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="服务形式" prop="taskDesc"> |
| | | <el-form-item label="服务形式"> |
| | | <el-checkbox-group v-model="checkList"> |
| | | <el-checkbox |
| | | v-for="(item, index) in checkboxlist" |
| | |
| | | <div class="headline"> |
| | | <div>任务使用模板</div> |
| | | <div style="margin-left: 20px"> |
| | | <el-form :model="form"> |
| | | <el-form ref="forms"> |
| | | <el-form-item label=""> |
| | | <el-input |
| | | style="width: 300px" |
| | |
| | | ></el-button> |
| | | |
| | | <el-button |
| | | v-if="this.form.libtemplateid" |
| | | v-if="form.libtemplateid" |
| | | type="success" |
| | | icon="el-icon-search" |
| | | @click="previewfnmb" |
| | |
| | | <el-form-item label="问卷名称"> |
| | | <el-input v-model="topqueryParams.svyname"></el-input> |
| | | </el-form-item> |
| | | |
| | | <!-- <el-form-item label="问卷类型" prop="status"> |
| | | <el-select v-model="topqueryParams.topic" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in taskoptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | <el-form-item label="适用形式" prop="status"> |
| | | <el-select v-model="topqueryParams.topica" placeholder="请选择"> |
| | | <el-option |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <!-- <el-form-item label="适用科室" prop="status"> |
| | | <el-select v-model="topqueryParams.topicd" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in topicoptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | |
| | | { required: true, message: "任务名称不能为空", trigger: "blur" }, |
| | | { |
| | | min: 2, |
| | | max: 20, |
| | | message: "任务名称长度必须介于 2 和 20 之间", |
| | | max: 30, |
| | | message: "任务名称长度必须介于 2 和 30 之间", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | |
| | | taskDesc: [ |
| | | { required: true, message: "任务描述不能为空", trigger: "blur" }, |
| | | ], |
| | | sendType: [ |
| | | { required: true, message: "发送设置不能为空", trigger: "blur" }, |
| | | ], |
| | | daytime: [{ required: true, message: "民族不能为空", trigger: "blur" }], |
| | | }, |
| | | quote: false, |
| | | serviceType: null, |
| | |
| | | }); |
| | | }, |
| | | nextstep() { |
| | | if (this.Editprogress <= 3) { |
| | | return this.Editprogress++; |
| | | } |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.Editprogress <= 3) { |
| | | return this.Editprogress++; |
| | | } |
| | | } else { |
| | | this.$modal.msgError("表单内容未完善,请检查"); |
| | | } |
| | | }); |
| | | }, |
| | | // 保存 |
| | | submitForm(formName) { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.checkList[0]) { |
| | | this.form.preachform = this.checkList.join(","); |
| | | } else { |
| | | this.$modal.msgError("请选择服务类型"); |
| | | return; |
| | | } |
| | | if (!this.form.patTaskRelevances[0]) { |
| | | this.$modal.msgError("请选择病人"); |
| | | return; |
| | | } |
| | | const filteredArray = this.variableList.filter( |
| | | (item) => |
| | | item.name !== "姓名" && |
| | | item.name !== "电话" && |
| | | item.name !== "地址" |
| | | ); |
| | | this.form.textParam = this.convertFormat2ToFormat1(filteredArray); |
| | | if (this.time4 && this.form.sendType == 3) |
| | | this.form.showTimeMorn = this.time4; |
| | | this.form.sendTimeslot = [{ |
| | | begantime: this.time4, |
| | | endtime: "", |
| | | xh: 1, |
| | | }]; |
| | | if (this.checkList[0]) { |
| | | this.form.preachform = this.checkList.join(","); |
| | | } else { |
| | | this.$modal.msgError("请选择服务类型"); |
| | | return; |
| | | } |
| | | if (!this.form.patTaskRelevances[0]) { |
| | | this.$modal.msgError("请选择病人"); |
| | | return; |
| | | } |
| | | if (!this.form.templatename) { |
| | | this.$modal.msgError("未选择模板"); |
| | | return; |
| | | } |
| | | if ((this.form.sendType == 1 && this.time1) || this.form.sendType == 2) { |
| | | } else if (this.form.sendType == 3 && this.time4) { |
| | | } 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; |
| | | Editsingletask(this.form).then((res) => { |
| | | if (res.code == 200) { |
| | | if (this.form.taskid) { |
| | | this.form.isoperation = 2; |
| | | this.$modal.msgSuccess("新增成功"); |
| | | } else { |
| | | this.form.isoperation = 1; |
| | | this.$modal.msgSuccess("修改成功"); |
| | | } |
| | | if (!this.form.type) { |
| | | this.form.type = this.$route.query.type; |
| | | } |
| | | this.form.serviceType = this.serviceType; |
| | | 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.$router.push({ |
| | | path: "/followvisit/tasklist", |
| | | query: { tasktopic: this.form.serviceType }, |
| | | }); |
| | | }else{ |
| | | this.$modal.msgError("表单内容未完善,请检查"); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | : []; |
| | | this.overallCase = this.form.patTaskRelevances.concat(); |
| | | this.checkList = this.form.preachform.split(","); |
| | | console.log(this.form.showDate, "this.form"); |
| | | this.daytime = this.form.showDate.split(","); |
| | | console.log(this.form, "this.form"); |
| | | if (this.form.showDate)this.daytime = this.form.showDate.split(","); |
| | | if (this.form.showTimeMorn) { |
| | | if (this.form.sendType == 3) { |
| | | this.time4 = this.form.showTimeMorn; |
| | | console.log(1122); |
| | | } else { |
| | | this.time1 = this.form.showTimeMorn.split(","); |
| | | } |
| | |
| | | if (this.time1) this.form.showTimeMorn = this.time1.join(","); |
| | | if (this.time2) this.form.showTimeNoon = this.time2.join(","); |
| | | if (this.time3) this.form.showTimeNight = this.time3.join(","); |
| | | console.log(combinedData, "combinedData"); |
| | | }, |
| | | // 查看模板 |
| | | previewGo() { |