Commit 4afd404f authored by miaojiale's avatar miaojiale

提交部分随访表单的内容

parent 1684642a
...@@ -43,6 +43,15 @@ export function addPatient(data = {}, type = "") { ...@@ -43,6 +43,15 @@ export function addPatient(data = {}, type = "") {
}) })
} }
// 随访录入
export function addFollowPatient(data = {}, type = "") {
return request({
url: `/disease-data/data/patient/follow/${type}`,
method: "post",
data,
})
}
// 删除草稿 // 删除草稿
export function deletePatient(data) { export function deletePatient(data) {
return request({ return request({
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
form-type="2" form-type="2"
formClass="follow-form" formClass="follow-form"
:disabled="false" :disabled="false"
:patientId="patientId"
></ConfigForms> ></ConfigForms>
</div> </div>
</template> </template>
...@@ -17,9 +18,11 @@ export default { ...@@ -17,9 +18,11 @@ export default {
ConfigForms, ConfigForms,
}, },
data() { data() {
return {} return { patientId: "" }
},
created() {
this.patientId = this.$route.query.patientId
}, },
created() {},
methods: {}, methods: {},
} }
</script> </script>
......
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
console.log("跳转", data, i) console.log("跳转", data, i)
sessionStorage.setItem("formEdit", JSON.stringify(data)) sessionStorage.setItem("formEdit", JSON.stringify(data))
this.$router.push({ this.$router.push({
path: "/followupentry", path: `/followupentry?patientId=${data.patientId}`,
}) })
}, },
async handleSearch() { async handleSearch() {
......
...@@ -149,12 +149,14 @@ export default { ...@@ -149,12 +149,14 @@ export default {
watch: { watch: {
activeName(val) { activeName(val) {
if (!this.disabled) { if (!this.disabled) {
if (this.$route.path != "/followupentry") {
if (!["index0", "index1"].includes(val)) { if (!["index0", "index1"].includes(val)) {
this.infoCompelete = true this.infoCompelete = true
} else { } else {
this.infoCompelete = false this.infoCompelete = false
} }
} }
}
if (val == "index1") { if (val == "index1") {
// 第二步问卷调查 // 第二步问卷调查
this.$nextTick(() => { this.$nextTick(() => {
...@@ -218,11 +220,20 @@ export default { ...@@ -218,11 +220,20 @@ export default {
}, },
methods: { methods: {
handleConfirm(data, done, cb) { handleConfirm(data, done, cb) {
console.log("提交", this.formType)
if (this.formType == "2") {
this.addFollowPatient(data, done, cb)
this.$emit("addMethods", {
activeName: this.activeName,
form: data.data,
})
} else {
this.addPatient(data, done, cb) this.addPatient(data, done, cb)
this.$emit("addMethods", { this.$emit("addMethods", {
activeName: this.activeName, activeName: this.activeName,
form: data.data, form: data.data,
}) })
}
}, },
temporaryConfirm(data, done, cb) { temporaryConfirm(data, done, cb) {
this.addPatient(data, done, cb, () => { this.addPatient(data, done, cb, () => {
......
import { addPatient } from "@/api/patient.js" import { addPatient, addFollowPatient } from "@/api/patient.js"
import FormTab from "./FormTab" import FormTab from "./FormTab"
import { mapGetters } from "vuex" import { mapGetters } from "vuex"
...@@ -86,6 +86,36 @@ export default { ...@@ -86,6 +86,36 @@ export default {
} }
}) })
}, },
async addFollowPatient(data, done, cb, ConfigFormsCallback) {
addFollowPatient(data, "")
.then((res) => {
// this.$message.success("操作成功")
if (res.data) {
this.isUpdated = true
this.patientStandbyId = res.data.patientId
this.newformRecordId = res.data.formRecordId
if (
cb &&
Object.prototype.toString.call(cb) === "[object Function]"
) {
cb(res)
}
}
})
.finally((e) => {
done()
console.log("走了", ConfigFormsCallback)
if (
ConfigFormsCallback &&
Object.prototype.toString.call(ConfigFormsCallback) ===
"[object Function]"
) {
ConfigFormsCallback()
} else {
this.nextTab()
}
})
},
// json存储 // json存储
setFormJson(formJson) { setFormJson(formJson) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment