Commit 98be2753 authored by miaojiale's avatar miaojiale

1.草稿箱删除功能

2.草稿箱编辑功能,以及数据回显问题
3.医联体下拉列表接口
parent 3dfa2583
...@@ -24,6 +24,15 @@ export function medicalunionList(params = {}) { ...@@ -24,6 +24,15 @@ export function medicalunionList(params = {}) {
params, params,
}) })
} }
// 添加标准获取医联体
export function getMedicalunionList(params = {}) {
return request({
url: "/cloud-upms/sys/union/select",
method: "get",
params,
})
}
export function deleteUnion(id) { export function deleteUnion(id) {
return request({ return request({
url: `/cloud-upms/sys/union/${id}`, url: `/cloud-upms/sys/union/${id}`,
......
...@@ -218,8 +218,8 @@ ...@@ -218,8 +218,8 @@
<el-option <el-option
v-for="(opt, optIndex) in unionList" v-for="(opt, optIndex) in unionList"
:key="optIndex" :key="optIndex"
:label="opt.label" :label="opt.unionName"
:value="opt.value" :value="opt.unionNo"
></el-option> ></el-option>
</template> </template>
<template v-else> <template v-else>
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
/** /**
* @description 自定义单组件 * @description 自定义单组件
*/ */
import { getMedicalunionList } from "@/api/medicalunion-management"
import ElUploadSelf from "@/components/Upload" import ElUploadSelf from "@/components/Upload"
import FormItemText from "./FormItemText" import FormItemText from "./FormItemText"
import DialogToothBit from "./DialogToothBit" import DialogToothBit from "./DialogToothBit"
...@@ -483,13 +483,24 @@ export default { ...@@ -483,13 +483,24 @@ export default {
this.numberReset() this.numberReset()
this.checkboxReset() this.checkboxReset()
if (this.item.prop == "union_id") { if (this.item.prop == "union_id") {
this.unionList = [{ label: "嗡嗡嗡", value: 1 }] this.getMedicalunionList()
} }
}, },
mounted() { mounted() {
this.showFormItem() this.showFormItem()
}, },
methods: { methods: {
// 获取医联体列表
getMedicalunionList() {
getMedicalunionList().then((res) => {
console.log(res)
if (res.code == 1) {
this.unionList = res.data
} else {
this.unionList = []
}
})
},
scrollToView() { scrollToView() {
if (this.$refs["JY_LCYY"]) { if (this.$refs["JY_LCYY"]) {
this.$refs["JY_LCYY"].$el.scrollIntoView({ behavior: "smooth" }) this.$refs["JY_LCYY"].$el.scrollIntoView({ behavior: "smooth" })
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
form-type="1" form-type="1"
:patient-id="patientId" :patient-id="patientId"
:disabled="disabled" :disabled="disabled"
:operation="'edit'"
></ConfigForms> ></ConfigForms>
</div> </div>
</div> </div>
...@@ -56,7 +57,7 @@ export default { ...@@ -56,7 +57,7 @@ export default {
{ {
label: "医联体", label: "医联体",
minWidth: 120, minWidth: 120,
value: "groupName", value: "unionId",
}, },
{ {
label: "姓名", label: "姓名",
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
:newform-record-id="newformRecordId" :newform-record-id="newformRecordId"
:form="form" :form="form"
:disabled="disabled" :disabled="disabled"
:operation="operation"
contrast contrast
:form-initial="formInitial" :form-initial="formInitial"
:survival-flag="survivalFlag" :survival-flag="survivalFlag"
...@@ -116,6 +117,7 @@ export default { ...@@ -116,6 +117,7 @@ export default {
formType: String, formType: String,
patientId: String, patientId: String,
formClass: String, formClass: String,
operation: String,
}, },
data() { data() {
return { return {
...@@ -258,6 +260,10 @@ export default { ...@@ -258,6 +260,10 @@ export default {
} }
// 清空红字:不符合筛查条件 // 清空红字:不符合筛查条件
this.$refs.showDialog.dialogVisible = false this.$refs.showDialog.dialogVisible = false
//判断路径
if (this.$route.path != "/screening/add") {
this.$router.push("/screening/add")
}
}, },
viewJump() { viewJump() {
// this.$router.push('/') // this.$router.push('/')
......
...@@ -95,6 +95,7 @@ export default { ...@@ -95,6 +95,7 @@ export default {
survivalFlag: Boolean, //存活的显示 survivalFlag: Boolean, //存活的显示
formEdit: {}, formEdit: {},
formInitial: {}, formInitial: {},
operation: String, // !默认新增,传入为edit为编辑需要传formRecordId
}, },
provide() { provide() {
return { return {
...@@ -174,52 +175,50 @@ export default { ...@@ -174,52 +175,50 @@ export default {
}, },
// 临时保存确定 // 临时保存确定
temporaryConfirm(data, done) { temporaryConfirm(data, done) {
this.$emit( let params = {
"temporaryConfirm", data,
{ formId: this.form.formId, // 每个大表单的id
data, patientId: this.patientId || this.patientStandbyId,
formId: this.form.formId, // 每个大表单的id // formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
patientId: this.patientId || this.patientStandbyId, statusMap: {
// formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id patient_from: this.$store.getters["table/selectedIndex"],
statusMap: { is_draft: 1, //是否为草稿
patient_from: this.$store.getters["table/selectedIndex"], check_status: 1, // 审核状态
is_draft: 1, //是否为草稿
check_status: 1, // 审核状态
},
}, },
done, }
(res) => { if (this.operation && this.operation == "edit") {
// 多次填写的表单新增时,获取最新数据 params.formRecordId = this.formData.formRecordId || this.newformRecordId // 是否为编辑的表单id
if (this.form.fillType === 1 && !this.formData.formRecordId) { }
this.getRecordList(res.data.formRecordId) this.$emit("temporaryConfirm", params, done, (res) => {
} // 多次填写的表单新增时,获取最新数据
this.formatData(res, this.form.fillType !== 1) if (this.form.fillType === 1 && !this.formData.formRecordId) {
this.getRecordList(res.data.formRecordId)
} }
) this.formatData(res, this.form.fillType !== 1)
})
}, },
handleConfirm(data, done) { handleConfirm(data, done) {
this.$emit( let params = {
"handleConfirm", data,
{ formId: this.form.formId, // 每个大表单的id
data, patientId: this.patientId || this.patientStandbyId,
formId: this.form.formId, // 每个大表单的id // formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
patientId: this.patientId || this.patientStandbyId, statusMap: {
// formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id patient_from: this.$store.getters["table/selectedIndex"],
statusMap: { is_draft: 0, //是否为草稿
patient_from: this.$store.getters["table/selectedIndex"], check_status: 1, // 审核状态
is_draft: 0, //是否为草稿
check_status: 1, // 审核状态
},
}, },
done, }
(res) => { if (this.operation && this.operation == "edit") {
// 多次填写的表单新增时,获取最新数据 params.formRecordId = this.formData.formRecordId || this.newformRecordId // 是否为编辑的表单id
if (this.form.fillType === 1 && !this.formData.formRecordId) { }
this.getRecordList(res.data.formRecordId) this.$emit("handleConfirm", params, done, (res) => {
} // 多次填写的表单新增时,获取最新数据
this.formatData(res, this.form.fillType !== 1) if (this.form.fillType === 1 && !this.formData.formRecordId) {
this.getRecordList(res.data.formRecordId)
} }
) this.formatData(res, this.form.fillType !== 1)
})
}, },
onPrev(done) { onPrev(done) {
this.$emit("onPrev", done) this.$emit("onPrev", done)
......
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