diff --git a/src/components/follow/AsbitemCriticalValue.vue b/src/components/follow/AsbitemCriticalValue.vue index d2ad059..7f5440f 100644 --- a/src/components/follow/AsbitemCriticalValue.vue +++ b/src/components/follow/AsbitemCriticalValue.vue @@ -130,24 +130,25 @@ import { mapState } from "vuex"; import { dddw } from "../../utlis/proFunc"; import { getapi, postapi, putapi, deletapi } from "../../api/api"; export default { + props: ['refParams'], data() { return { asbitemCriticalValue: [], }; }, computed: { - ...mapState(["window", "dataTransOpts", "dict", "patientRegister"]), + ...mapState(["window", "dict"]), }, methods: { dddw, moment, getLists() { - if (this.dataTransOpts.tableS.patient_register.patientRegisterId) { + if (this.refParams.patientRegisterId) { postapi( "/api/app/PhoneFollowUp/GetAsbitemOrItemCriticalByPatientRegisterId", { patientRegisterId: - this.dataTransOpts.tableS.patient_register.patientRegisterId, + this.refParams.patientRegisterId, } ).then((res) => { if (res.code > -1) this.asbitemCriticalValue = res.data; @@ -207,14 +208,15 @@ export default { }, watch: { //人员ID未切换换时 也可以强制刷新数据 - "dataTransOpts.refresh.register_check_asbitem.M": { + "refParams.brushTimes": { // immediate:true, handler(newVal, oldVal) { console.log( - `watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}` + `watch 危急值 newVal:${newVal} oldVal:${oldVal} followUpId: ${this.refParams.followUpId}` ); - // if (newVal != oldVal) - this.getLists(); + if (newVal != oldVal){ + this.getLists(); + } }, }, }, diff --git a/src/components/follow/FollowList.vue b/src/components/follow/FollowList.vue index a7963ee..3e993f2 100644 --- a/src/components/follow/FollowList.vue +++ b/src/components/follow/FollowList.vue @@ -130,13 +130,13 @@ - + - + - + @@ -342,6 +342,13 @@ export default { }, LocalConfigInit: {}, columnData: [], + // 子组件传参 + refParams:{ + followUpId:'', // 随访主表ID + patientRegisterId:'', // 人员ID + criticalValueContents:'', // 随访原因 + brushTimes:0, // 人员ID未变时,亦可控制刷新 + } }; }, @@ -385,8 +392,7 @@ export default { }, computed: { ...mapState([ - "window", - "dataTransOpts", + "window", "dialogWin", "dict", "elProgress", @@ -451,23 +457,26 @@ export default { //点击体检次数行 rowClick(row) { - - this.dataTransOpts.tableS.patient_register = deepCopy(row); + this.tableDataCurrentRow = deepCopy(row); - this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新 + this.refParams.followUpId = row.followUpId + this.refParams.patientRegisterId = row.patientRegisterId + this.refParams.criticalValueContents = row.criticalValueContents + this.refParams.brushTimes++; //触发所选组合项目刷新 // } }, //查询 async Query() { // 查询时,清掉明细数据 (滚动时不清) - this.dataTransOpts.tableS.patient_register.followUpId = ""; - this.dataTransOpts.tableS.patient_register.patientRegisterId = ""; + this.refParams.followUpId = ""; + this.refParams.patientRegisterId = ""; + this.refParams.criticalValueContents = "" this.tableDataCurrentRow = {}; // 清除选择 this.tableData = []; setTimeout(() => { - this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新 + this.refParams.brushTimes++; //触发所选组合项目刷新 }, 10); this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit); @@ -619,8 +628,8 @@ export default { this.tableData = res.data; this.makeFollowInfo(); //如果 有选中 记录,则刷新其对应的组合项目 - if (this.dataTransOpts.tableS.patient_register.patientRegisterId) { - this.dataTransOpts.refresh.register_check_asbitem.M++; + if (this.refParams.patientRegisterId) { + this.refParams.brushTimes++; } } }); @@ -785,18 +794,18 @@ export default { //监听事件 watch: { - "patientRegister.query.customerOrgId": { - // immediate: true, // 立即执行 - // deep: true, // 深度监听复杂类型内变化 - handler(newVal, oldVal) { - //// console.log('watch:patientRegister.query.customerOrgId:',newVal,oldVal) - // 单位变化时,清除当前列表信息 - if (newVal && newVal != oldVal) { - this.tableData = []; - this.dataTransOpts.tableM.register_check_asbitem = []; - } - }, - }, + // "patientRegister.query.customerOrgId": { + // // immediate: true, // 立即执行 + // // deep: true, // 深度监听复杂类型内变化 + // handler(newVal, oldVal) { + // //// console.log('watch:patientRegister.query.customerOrgId:',newVal,oldVal) + // // 单位变化时,清除当前列表信息 + // if (newVal && newVal != oldVal) { + // this.tableData = []; + // this.dataTransOpts.tableM.register_check_asbitem = []; + // } + // }, + // }, //触发查询事件 "patientRegister.query.times"(newVal, oldVal) { diff --git a/src/components/follow/PhoneFollowUp.vue b/src/components/follow/PhoneFollowUp.vue index 6897896..2641d38 100644 --- a/src/components/follow/PhoneFollowUp.vue +++ b/src/components/follow/PhoneFollowUp.vue @@ -47,13 +47,36 @@ - + - + + + + + + + + + + + + + + + + + + + + + + @@ -74,26 +97,21 @@ + editable style="width: 115px"> + editable style="width: 115px"> - - - - - + editable style="width: 115px"> @@ -163,6 +181,7 @@ import { getapi, postapi, putapi, deletapi } from "../../api/api"; export default { components: {}, + props: ['refParams'], data() { return { phoneFollowUp: [], // 电话随访 @@ -177,8 +196,20 @@ export default { generateCount: "", intervalDays: "", generateCount: "", - replyContent: "" + replyContent: "", + followUpSourceId: "03", // 01-医生站,02-总检医生站,03-客服,99-其它 + followUpTypeId: "01" // 01-普通,02-复查,03-危急值,99-其它,01-30为系统保留,31以后给客户自定义用 + }, + + rules: { + followUpSourceId: [ + { required: true, message: "请填写随访来源", trigger: "blur" }, + ], + followUpTypeId: [ + { required: true, message: "请填写随访类型", trigger: "blur" }, + ] }, + mode: "0", modes: [ { @@ -212,7 +243,7 @@ export default { }, computed: { - ...mapState(["window", "dataTransOpts", "dict", "patientRegister"]), + ...mapState(["window", "dict" ]), }, methods: { dddw, @@ -224,11 +255,23 @@ export default { postapi("/api/app/Asbitem/GetSimpleAsbitemWithDetails").then((res) => { if (res.code > -1) this.asbItems = res.data; }); + + // 获取随访来源 + postapi("/api/app/FollowUpSource/GetList").then((res) => { + if (res.code > -1) this.dict.followUpSources = res.data; + }); + + // 获取随访类型 + postapi("/api/app/FollowUpType/GetList").then((res) => { + if (res.code > -1) this.dict.followUpTypes = res.data; + }); + + }, getLists() { - if (this.dataTransOpts.tableS.patient_register.followUpId) { + if (this.refParams.followUpId) { postapi("/api/app/PhoneFollowUp/GetList", { - followUpId: this.dataTransOpts.tableS.patient_register.followUpId, + followUpId: this.refParams.followUpId, }).then((res) => { if (res.code > -1) this.phoneFollowUp = res.data; }); @@ -237,36 +280,55 @@ export default { } }, addoredit() { - if (this.title == 1) { - if (this.mode == 1) { - if (this.form.intervalDays == "") { - this.$message.warning("请输入间隔天数"); - } else if (this.form.startDate == "") { - this.$message.warning("请选择开始时间"); - } else if (this.form.generateCount == "") { - this.$message.warning("请输入生成次数"); - } else { - postapi("/api/app/PhoneFollowUp/AutoCreate", { - followUpId: this.dataTransOpts.tableS.patient_register.followUpId, - intervalDays: this.form.intervalDays, - startDate: this.form.startDate, - followUpContent: this.form.followUpContent, - generateCount: this.form.generateCount, - }).then((res) => { - if (res.code > -1) { - this.getLists(); - this.dialogVisible = false; - this.mode = "0"; - } - }); - } - } else if (this.mode == 0) { - if (this.form.planFollowDate == "") { - this.$message.warning("请选择随访日期"); + this.$refs['form'].validate((valid, fields) => { + // console.log('fields', fields) + if (!valid) { + this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message }); + return false + } + if (this.title == 1) { + if (this.mode == 1) { + if (this.form.intervalDays == "") { + this.$message.warning("请输入间隔天数"); + } else if (this.form.startDate == "") { + this.$message.warning("请选择开始时间"); + } else if (this.form.generateCount == "") { + this.$message.warning("请输入生成次数"); + } else { + postapi("/api/app/PhoneFollowUp/AutoCreate", { + followUpId: this.refParams.followUpId, + intervalDays: this.form.intervalDays, + startDate: this.form.startDate, + followUpContent: this.form.followUpContent, + generateCount: this.form.generateCount, + }).then((res) => { + if (res.code > -1) { + this.getLists(); + this.dialogVisible = false; + this.mode = "0"; + } + }); + } + } else if (this.mode == 0) { + if (this.form.planFollowDate == "") { + this.$message.warning("请选择随访日期"); + } else { + postapi("/api/app/PhoneFollowUp/Create", { + followUpId: this.refParams.followUpId, + planFollowDate: this.form.planFollowDate, + followUpContent: this.form.followUpContent, + replyContent: this.form.replyContent, + }).then((res) => { + if (res.code > -1) { + this.getLists(); + this.dialogVisible = false; + this.mode = "0"; + } + }); + } } else { - postapi("/api/app/PhoneFollowUp/Create", { - followUpId: this.dataTransOpts.tableS.patient_register.followUpId, - planFollowDate: this.form.planFollowDate, + postapi("/api/app/PhoneFollowUp/CreateThreeMonthPlan", { + followUpId: this.refParams.followUpId, followUpContent: this.form.followUpContent, replyContent: this.form.replyContent, }).then((res) => { @@ -278,10 +340,12 @@ export default { }); } } else { - postapi("/api/app/PhoneFollowUp/CreateThreeMonthPlan", { - followUpId: this.dataTransOpts.tableS.patient_register.followUpId, + 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(); @@ -290,21 +354,7 @@ export default { } }); } - } 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; - this.mode = "0"; - } - }); - } + }) }, rowick(row) { this.curRow = { ...row }; @@ -330,7 +380,7 @@ export default { this.dialogVisible = true; this.title = 1; this.form = this.$options.data().form; - let followUpContent = this.dataTransOpts.tableS.patient_register.criticalValueContents + let followUpContent = this.refParams.criticalValueContents do { followUpContent = followUpContent.replace('', '\r\n') } while (followUpContent.includes('')); @@ -389,11 +439,11 @@ export default { { value: "本人已接电话,已通知避免过度劳累,必要时医院复查。" }, { value: "本人已接电话,xxxxx,已做手术,正在恢复期。" }, ]; - if(queryString){ + if (queryString) { restaurants.filter(e => { - if(e.value.toUpperCase().includes(queryString.toUpperCase())) return e + if (e.value.toUpperCase().includes(queryString.toUpperCase())) return e }) - } + } // 调用 callback 返回建议列表的数据 cb(restaurants); }, @@ -402,14 +452,14 @@ export default { //监听事件 watch: { //人员ID未切换换时 也可以强制刷新数据 - "dataTransOpts.refresh.register_check_asbitem.M": { + "refParams.brushTimes": { // immediate:true, handler(newVal, oldVal) { - console.log( - `watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}` - ); - // if (newVal != oldVal) - this.getLists(); + console.log(`watch 电话随访 newVal:${newVal} oldVal:${oldVal} refParams: `,this.refParams); + if (newVal != oldVal){ + this.getLists(); + } + }, }, }, diff --git a/src/components/follow/SmsSend.vue b/src/components/follow/SmsSend.vue index 7f74a4a..9c2b899 100644 --- a/src/components/follow/SmsSend.vue +++ b/src/components/follow/SmsSend.vue @@ -1,74 +1,30 @@ - + - + - + - + - - + + {{ moment(scope.row.creationTime).format("yyyy-MM-DD") }} - - + + {{ moment(scope.row.creationTime).format("yyyy-MM-DD") }} @@ -77,52 +33,57 @@ - 新增随访 + 新增随访 - 删除随访 + 删除随访 - + - + - + + + + + + + + + + + + + + + + + + - + - + - + @@ -142,50 +103,30 @@ - + - + - + - + - 取 消 - 确 定 + 取 消 + 确 定 @@ -198,22 +139,33 @@ import { getapi, postapi, putapi, deletapi } from "../../api/api"; export default { components: {}, + props: ['refParams'], data() { return { phoneFollowUp: [], // 电话随访 curRow: {}, dialogVisible: false, form: { - startDate:"", - intervalDays:"", - generateCount:"", - content:"" + startDate: "", + intervalDays: "", + generateCount: "", + content: "", + followUpSourceId: "03", // 01-医生站,02-总检医生站,03-客服,99-其它 + followUpTypeId: "01" // 01-普通,02-复查,03-危急值,99-其它,01-30为系统保留,31以后给客户自定义用 }, title: "", + rules: { + followUpSourceId: [ + { required: true, message: "请填写随访来源", trigger: "blur" }, + ], + followUpTypeId: [ + { required: true, message: "请填写随访类型", trigger: "blur" }, + ] + }, }; }, - created() {}, + created() { }, updated() { this.$nextTick(() => { @@ -227,7 +179,7 @@ export default { }, computed: { - ...mapState(["window", "dataTransOpts", "dict", "patientRegister"]), + ...mapState(["window", "dict"]), }, methods: { dddw, @@ -239,16 +191,26 @@ export default { postapi("/api/app/Asbitem/GetSimpleAsbitemWithDetails").then((res) => { if (res.code > -1) this.asbItems = res.data; }); + + // 获取随访来源 + postapi("/api/app/FollowUpSource/GetList").then((res) => { + if (res.code > -1) this.dict.followUpSources = res.data; + }); + + // 获取随访类型 + postapi("/api/app/FollowUpType/GetList").then((res) => { + if (res.code > -1) this.dict.followUpTypes = res.data; + }); }, getLists() { - if(this.dataTransOpts.tableS.patient_register.followUpId){ - postapi("/api/app/SmsSend/GetList", { - followUpId: this.dataTransOpts.tableS.patient_register.followUpId, - }).then((res) => { - if (res.code > -1) this.phoneFollowUp = res.data; - }); - }else{ - this.phoneFollowUp=[] + if (this.refParams.followUpId) { + postapi("/api/app/SmsSend/GetList", { + followUpId: this.refParams.followUpId, + }).then((res) => { + if (res.code > -1) this.phoneFollowUp = res.data; + }); + } else { + this.phoneFollowUp = [] } }, rowick(row) { @@ -266,11 +228,13 @@ export default { this.$message.warning("请输入短信内容"); } else { postapi("/api/app/SmsSend/AutoCreate", { - followUpId: this.dataTransOpts.tableS.patient_register.followUpId, + followUpId: this.refParams.followUpId, intervalDays: this.form.intervalDays, startDate: this.form.startDate, generateCount: this.form.generateCount, content: this.form.content, + followUpSourceId: this.form.followUpSourceId, + followUpTypeId: this.form.followUpTypeId }).then((res) => { if (res.code > -1) { this.getLists(); @@ -304,7 +268,7 @@ export default { }, // 编辑 - btnEdit() {}, + btnEdit() { }, // 删除 btnDel() { @@ -329,7 +293,7 @@ export default { } }); }) - .catch(() => {}); + .catch(() => { }); } }, }, @@ -337,14 +301,15 @@ export default { //监听事件 watch: { //人员ID未切换换时 也可以强制刷新数据 - "dataTransOpts.refresh.register_check_asbitem.M": { + "refParams.brushTimes": { // immediate:true, handler(newVal, oldVal) { console.log( - `watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}` + `watch 短信随访 newVal:${newVal} oldVal:${oldVal} followUpId: ${this.refParams.followUpId}` ); - // if (newVal != oldVal) - this.getLists(); + if (newVal != oldVal) { + this.getLists(); + } }, }, }, diff --git a/src/views/doctorCheck/sumDoctorCheck.vue b/src/views/doctorCheck/sumDoctorCheck.vue index f95fef4..2f9fc37 100644 --- a/src/views/doctorCheck/sumDoctorCheck.vue +++ b/src/views/doctorCheck/sumDoctorCheck.vue @@ -357,7 +357,7 @@ - + @@ -378,6 +378,10 @@ + + +