Commit 98be2753 authored by miaojiale's avatar miaojiale

1.草稿箱删除功能

2.草稿箱编辑功能,以及数据回显问题
3.医联体下拉列表接口
parent 3dfa2583
......@@ -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}`,
......
......@@ -218,8 +218,8 @@
<el-option
v-for="(opt, optIndex) in unionList"
:key="optIndex"
:label="opt.label"
:value="opt.value"
:label="opt.unionName"
:value="opt.unionNo"
></el-option>
</template>
<template v-else>
......@@ -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" })
......
......@@ -29,6 +29,7 @@
form-type="1"
:patient-id="patientId"
:disabled="disabled"
:operation="'edit'"
></ConfigForms>
</div>
</div>
......@@ -56,7 +57,7 @@ export default {
{
label: "医联体",
minWidth: 120,
value: "groupName",
value: "unionId",
},
{
label: "姓名",
......
......@@ -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('/')
......
......@@ -95,6 +95,7 @@ export default {
survivalFlag: Boolean, //存活的显示
formEdit: {},
formInitial: {},
operation: String, // !默认新增,传入为edit为编辑需要传formRecordId
},
provide() {
return {
......@@ -174,9 +175,7 @@ export default {
},
// 临时保存确定
temporaryConfirm(data, done) {
this.$emit(
"temporaryConfirm",
{
let params = {
data,
formId: this.form.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId,
......@@ -186,21 +185,20 @@ export default {
is_draft: 1, //是否为草稿
check_status: 1, // 审核状态
},
},
done,
(res) => {
}
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",
{
let params = {
data,
formId: this.form.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId,
......@@ -210,16 +208,17 @@ export default {
is_draft: 0, //是否为草稿
check_status: 1, // 审核状态
},
},
done,
(res) => {
}
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)
......
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