Commit 4afd404f authored by miaojiale's avatar miaojiale

提交部分随访表单的内容

parent 1684642a
......@@ -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) {
return request({
......
......@@ -5,6 +5,7 @@
form-type="2"
formClass="follow-form"
:disabled="false"
:patientId="patientId"
></ConfigForms>
</div>
</template>
......@@ -17,9 +18,11 @@ export default {
ConfigForms,
},
data() {
return {}
return { patientId: "" }
},
created() {
this.patientId = this.$route.query.patientId
},
created() {},
methods: {},
}
</script>
......
......@@ -282,7 +282,7 @@ export default {
console.log("跳转", data, i)
sessionStorage.setItem("formEdit", JSON.stringify(data))
this.$router.push({
path: "/followupentry",
path: `/followupentry?patientId=${data.patientId}`,
})
},
async handleSearch() {
......
......@@ -149,10 +149,12 @@ export default {
watch: {
activeName(val) {
if (!this.disabled) {
if (!["index0", "index1"].includes(val)) {
this.infoCompelete = true
} else {
this.infoCompelete = false
if (this.$route.path != "/followupentry") {
if (!["index0", "index1"].includes(val)) {
this.infoCompelete = true
} else {
this.infoCompelete = false
}
}
}
if (val == "index1") {
......@@ -218,11 +220,20 @@ export default {
},
methods: {
handleConfirm(data, done, cb) {
this.addPatient(data, done, cb)
this.$emit("addMethods", {
activeName: this.activeName,
form: data.data,
})
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.$emit("addMethods", {
activeName: this.activeName,
form: data.data,
})
}
},
temporaryConfirm(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 { mapGetters } from "vuex"
......@@ -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存储
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