From 98be275394aefe811e8d3602b73048f225aecd52 Mon Sep 17 00:00:00 2001
From: miaojiale <1123971748@qq.com>
Date: Tue, 7 Feb 2023 13:43:40 +0800
Subject: [PATCH] =?UTF-8?q?1.=E8=8D=89=E7=A8=BF=E7=AE=B1=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=202.=E8=8D=89=E7=A8=BF=E7=AE=B1=E7=BC=96?=
=?UTF-8?q?=E8=BE=91=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BB=A5=E5=8F=8A=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E5=9B=9E=E6=98=BE=E9=97=AE=E9=A2=98=203.=E5=8C=BB?=
=?UTF-8?q?=E8=81=94=E4=BD=93=E4=B8=8B=E6=8B=89=E5=88=97=E8=A1=A8=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/medicalunion-management.js | 9 +++
.../CustomForm/FormItemSelf.vue | 19 ++++-
src/views/screening/DraftBox.vue | 3 +-
.../screening/components/ConfigForms.vue | 6 ++
src/views/screening/components/FormTab.vue | 79 +++++++++----------
5 files changed, 71 insertions(+), 45 deletions(-)
diff --git a/src/api/medicalunion-management.js b/src/api/medicalunion-management.js
index 0e42096..5a50f14 100644
--- a/src/api/medicalunion-management.js
+++ b/src/api/medicalunion-management.js
@@ -24,6 +24,15 @@ export function medicalunionList(params = {}) {
params,
})
}
+// 添加标准获取医联体
+export function getMedicalunionList(params = {}) {
+ return request({
+ url: "/cloud-upms/sys/union/select",
+ method: "get",
+ params,
+ })
+}
+
export function deleteUnion(id) {
return request({
url: `/cloud-upms/sys/union/${id}`,
diff --git a/src/components/FormComponents/CustomForm/FormItemSelf.vue b/src/components/FormComponents/CustomForm/FormItemSelf.vue
index 3df0aaa..9da2981 100644
--- a/src/components/FormComponents/CustomForm/FormItemSelf.vue
+++ b/src/components/FormComponents/CustomForm/FormItemSelf.vue
@@ -218,8 +218,8 @@
@@ -400,7 +400,7 @@
/**
* @description 自定义单组件
*/
-
+import { getMedicalunionList } from "@/api/medicalunion-management"
import ElUploadSelf from "@/components/Upload"
import FormItemText from "./FormItemText"
import DialogToothBit from "./DialogToothBit"
@@ -483,13 +483,24 @@ export default {
this.numberReset()
this.checkboxReset()
if (this.item.prop == "union_id") {
- this.unionList = [{ label: "嗡嗡嗡", value: 1 }]
+ this.getMedicalunionList()
}
},
mounted() {
this.showFormItem()
},
methods: {
+ // 获取医联体列表
+ getMedicalunionList() {
+ getMedicalunionList().then((res) => {
+ console.log(res)
+ if (res.code == 1) {
+ this.unionList = res.data
+ } else {
+ this.unionList = []
+ }
+ })
+ },
scrollToView() {
if (this.$refs["JY_LCYY"]) {
this.$refs["JY_LCYY"].$el.scrollIntoView({ behavior: "smooth" })
diff --git a/src/views/screening/DraftBox.vue b/src/views/screening/DraftBox.vue
index 40f55ef..8cbed63 100644
--- a/src/views/screening/DraftBox.vue
+++ b/src/views/screening/DraftBox.vue
@@ -29,6 +29,7 @@
form-type="1"
:patient-id="patientId"
:disabled="disabled"
+ :operation="'edit'"
>
@@ -56,7 +57,7 @@ export default {
{
label: "医联体",
minWidth: 120,
- value: "groupName",
+ value: "unionId",
},
{
label: "姓名",
diff --git a/src/views/screening/components/ConfigForms.vue b/src/views/screening/components/ConfigForms.vue
index 4f0a780..075168d 100644
--- a/src/views/screening/components/ConfigForms.vue
+++ b/src/views/screening/components/ConfigForms.vue
@@ -41,6 +41,7 @@
:newform-record-id="newformRecordId"
:form="form"
:disabled="disabled"
+ :operation="operation"
contrast
:form-initial="formInitial"
:survival-flag="survivalFlag"
@@ -116,6 +117,7 @@ export default {
formType: String,
patientId: String,
formClass: String,
+ operation: String,
},
data() {
return {
@@ -258,6 +260,10 @@ export default {
}
// 清空红字:不符合筛查条件
this.$refs.showDialog.dialogVisible = false
+ //判断路径
+ if (this.$route.path != "/screening/add") {
+ this.$router.push("/screening/add")
+ }
},
viewJump() {
// this.$router.push('/')
diff --git a/src/views/screening/components/FormTab.vue b/src/views/screening/components/FormTab.vue
index 9e64327..cfb927b 100644
--- a/src/views/screening/components/FormTab.vue
+++ b/src/views/screening/components/FormTab.vue
@@ -95,6 +95,7 @@ export default {
survivalFlag: Boolean, //存活的显示
formEdit: {},
formInitial: {},
+ operation: String, // !默认新增,传入为edit为编辑需要传formRecordId
},
provide() {
return {
@@ -174,52 +175,50 @@ export default {
},
// 临时保存确定
temporaryConfirm(data, done) {
- this.$emit(
- "temporaryConfirm",
- {
- data,
- formId: this.form.formId, // 每个大表单的id
- patientId: this.patientId || this.patientStandbyId,
- // formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
- statusMap: {
- patient_from: this.$store.getters["table/selectedIndex"],
- is_draft: 1, //是否为草稿
- check_status: 1, // 审核状态
- },
+ let params = {
+ data,
+ formId: this.form.formId, // 每个大表单的id
+ patientId: this.patientId || this.patientStandbyId,
+ // formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
+ statusMap: {
+ patient_from: this.$store.getters["table/selectedIndex"],
+ is_draft: 1, //是否为草稿
+ check_status: 1, // 审核状态
},
- done,
- (res) => {
- // 多次填写的表单新增时,获取最新数据
- if (this.form.fillType === 1 && !this.formData.formRecordId) {
- this.getRecordList(res.data.formRecordId)
- }
- this.formatData(res, this.form.fillType !== 1)
+ }
+ if (this.operation && this.operation == "edit") {
+ params.formRecordId = this.formData.formRecordId || this.newformRecordId // 是否为编辑的表单id
+ }
+ this.$emit("temporaryConfirm", params, done, (res) => {
+ // 多次填写的表单新增时,获取最新数据
+ if (this.form.fillType === 1 && !this.formData.formRecordId) {
+ this.getRecordList(res.data.formRecordId)
}
- )
+ this.formatData(res, this.form.fillType !== 1)
+ })
},
handleConfirm(data, done) {
- this.$emit(
- "handleConfirm",
- {
- data,
- formId: this.form.formId, // 每个大表单的id
- patientId: this.patientId || this.patientStandbyId,
- // formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
- statusMap: {
- patient_from: this.$store.getters["table/selectedIndex"],
- is_draft: 0, //是否为草稿
- check_status: 1, // 审核状态
- },
+ let params = {
+ data,
+ formId: this.form.formId, // 每个大表单的id
+ patientId: this.patientId || this.patientStandbyId,
+ // formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
+ statusMap: {
+ patient_from: this.$store.getters["table/selectedIndex"],
+ is_draft: 0, //是否为草稿
+ check_status: 1, // 审核状态
},
- done,
- (res) => {
- // 多次填写的表单新增时,获取最新数据
- if (this.form.fillType === 1 && !this.formData.formRecordId) {
- this.getRecordList(res.data.formRecordId)
- }
- this.formatData(res, this.form.fillType !== 1)
+ }
+ if (this.operation && this.operation == "edit") {
+ params.formRecordId = this.formData.formRecordId || this.newformRecordId // 是否为编辑的表单id
+ }
+ this.$emit("handleConfirm", params, done, (res) => {
+ // 多次填写的表单新增时,获取最新数据
+ if (this.form.fillType === 1 && !this.formData.formRecordId) {
+ this.getRecordList(res.data.formRecordId)
}
- )
+ this.formatData(res, this.form.fillType !== 1)
+ })
},
onPrev(done) {
this.$emit("onPrev", done)
--
2.22.0