diff --git a/src/components/follow/FollowQuery.vue b/src/components/follow/FollowQuery.vue index edaab9a..06570ca 100644 --- a/src/components/follow/FollowQuery.vue +++ b/src/components/follow/FollowQuery.vue @@ -75,7 +75,7 @@ - + diff --git a/src/components/follow/PhoneFollowUp.vue b/src/components/follow/PhoneFollowUp.vue index dabb14a..b4b5555 100644 --- a/src/components/follow/PhoneFollowUp.vue +++ b/src/components/follow/PhoneFollowUp.vue @@ -112,23 +112,9 @@ > - + - - - - - - + @@ -143,62 +129,62 @@ - - - - - + + + + + + + + - - + + - + - - - - - - + + + + + + + + + @@ -214,7 +200,7 @@ - + - + - + - - + + {{ moment(scope.row.creationTime).format("yyyy-MM-DD") }} - - + + {{ moment(scope.row.creationTime).format("yyyy-MM-DD") }} - + - 新增随访 + 新增随访 - - 删除随访 - + + 删除随访 + - + - - - - - + + + + + + + + - + @@ -90,19 +127,6 @@ - - - - - - - - @@ -178,68 +202,43 @@ export default { return { phoneFollowUp: [], // 电话随访 curRow: {}, - dialogVisible:false, + dialogVisible: false, form: { - followUpMode:"", - modeValue:"", - content:"", - endDate:"" + startDate:"", + intervalDays:"", + generateCount:"", + content:"" }, - followUpMode: [ - { - id: "0", - displayName: "corn表达式", - }, - { - id: "1", - displayName: "按天", - }, - { - id: "2", - displayName: "按周", - }, - { - id: "3", - displayName: "按月", - }, - { - id: "4", - displayName: "按年", - }, - ], title: "", }; }, - created() { - - }, + created() {}, updated() { this.$nextTick(() => { - this.$refs['phoneFollowUp'].doLayout() - }) + this.$refs["phoneFollowUp"].doLayout(); + }); }, //挂载完成 mounted() { - this.dictInit() - + this.dictInit(); }, computed: { ...mapState(["window", "dataTransOpts", "dict", "patientRegister"]), }, methods: { - dddw, moment, + dddw, + moment, // 初始化字典信息 dictInit() { // 获取组合项目包含的明细 - postapi('/api/app/Asbitem/GetSimpleAsbitemWithDetails') - .then(res => { - if (res.code > -1) this.asbItems = res.data - }) + postapi("/api/app/Asbitem/GetSimpleAsbitemWithDetails").then((res) => { + if (res.code > -1) this.asbItems = res.data; + }); }, getLists() { postapi("/api/app/SmsSend/GetList", { @@ -253,75 +252,58 @@ export default { }, addoredit() { if (this.title == 1) { - if (this.form.followUpMode == "") { - this.$message.warning("请选择随访模式"); - } else if (this.form.followUpMode == 0 && this.form.modeValue == "") { - this.$message.warning("请输入corn表达式"); - } else if (this.form.followUpMode == 0 && this.form.endDate == "") { - this.$message.warning("请选择截止时间"); - } else if (this.form.followUpMode != 0 && this.form.modeValue == "") { - this.$message.warning("请输入生成天数"); - }else if (this.form.content== "") { - this.$message.warning("请输入短信内容"); - } else { - postapi("/api/app/SmsSend/AutoCreate", { - followUpId: this.dataTransOpts.tableS.patient_register.followUpId, - followUpMode: this.form.followUpMode, - modeValue: this.form.modeValue, - endDate: this.form.endDate, - content: this.form.content - }).then((res) => { - if (res.code > -1) { - this.getLists(); - this.dialogVisible = false; - } - }); - } - }else{ - postapi("/api/app/PhoneFollowUp/Update", { - phoneFollowUpId: this.form.id, - planFollowDate: this.form.planFollowDate, - followUpContent: this.form.followUpContent, - replyContent: this.form.replyContent, - isComplete:this.form.isComplete - }).then((res) => { - if (res.code > -1) { - this.getLists(); - this.dialogVisible = false; - } - }); + if (this.form.intervalDays == "") { + this.$message.warning("请输入间隔天数"); + } else if (this.form.startDate == "") { + this.$message.warning("请选择开始时间"); + } else if (this.form.generateCount == "") { + this.$message.warning("请输入生成天数"); + } else if (this.form.content == "") { + this.$message.warning("请输入短信内容"); + } else { + postapi("/api/app/SmsSend/AutoCreate", { + followUpId: this.dataTransOpts.tableS.patient_register.followUpId, + intervalDays: this.form.intervalDays, + startDate: this.form.startDate, + generateCount: this.form.generateCount, + content: this.form.content, + }).then((res) => { + if (res.code > -1) { + this.getLists(); + this.dialogVisible = false; + } + }); + } } }, - // 设置颜色 + // 设置颜色 setColor(checkCompleteFlag) { - let color = "#52555F" + let color = "#52555F"; switch (checkCompleteFlag) { - case '0': - color = "#FF5054" + case "0": + color = "#FF5054"; break; - case '2': - color = "#396FFA" + case "2": + color = "#396FFA"; break; default: break; } - return color + return color; }, // 新增 - btnAdd(){ + btnAdd() { this.dialogVisible = true; this.title = 1; this.form = this.$options.data().form; }, // 编辑 - btnEdit(){ - - }, + btnEdit() {}, // 删除 - btnDel(){ + btnDel() { if (this.curRow.id == undefined) { this.$message.warning("请选择删除的数据"); } else { @@ -333,11 +315,11 @@ export default { confirmButtonClass: "commonbutton", }) .then(() => { - postapi("/api/app/SmsSend/Delete",{ - smsSendId:this.curRow.id + postapi("/api/app/SmsSend/Delete", { + smsSendId: this.curRow.id, }).then((res) => { if (res.code != -1) { - this.curRow=this.$options.data().curRow + this.curRow = this.$options.data().curRow; this.getLists(); //this.$message.success("删除成功"); } @@ -346,9 +328,6 @@ export default { .catch(() => {}); } }, - - - }, //监听事件 @@ -357,12 +336,14 @@ export default { "dataTransOpts.refresh.register_check_asbitem.M": { // immediate:true, handler(newVal, oldVal) { - console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`); - // if (newVal != oldVal) + console.log( + `watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}` + ); + // if (newVal != oldVal) this.getLists(); - } + }, }, - } + }, };