fix: 系统功能优化完善。
This commit is contained in:
@@ -114,7 +114,7 @@ const healthRecordList = ref([])
|
||||
const personList = ref([])
|
||||
const typeList = ref([])
|
||||
const showType = ref(false)
|
||||
|
||||
const flag = ref('add')
|
||||
const data = reactive({
|
||||
form: {
|
||||
id: null,
|
||||
@@ -163,12 +163,17 @@ const { form, queryPersonParams, queryHealthRecordParams, rules} = toRefs(data)
|
||||
|
||||
|
||||
onLoad((option) => {
|
||||
form.value.id = option.id
|
||||
if(form.value.id!=null){
|
||||
form.value.id = option.id
|
||||
flag.value = option.flag
|
||||
if(flag.value==null){
|
||||
if(form.value.id!=null){
|
||||
title.value="就医记录-修改"
|
||||
}else{
|
||||
title.value="就医记录-新增"
|
||||
}
|
||||
}else{
|
||||
title.value="就医记录-复制"
|
||||
}
|
||||
getData()
|
||||
})
|
||||
onReady(() => {
|
||||
@@ -304,13 +309,24 @@ function datePickConfirm(e) {
|
||||
function submit() {
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
if (form.value.id != null) {
|
||||
updateDoctorRecord(form.value).then(res => {
|
||||
if(flag.value==null){
|
||||
updateDoctorRecord(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/health/doctorRecord/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}else {
|
||||
form.value.id == null
|
||||
addDoctorRecord(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '新增成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/health/doctorRecord/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}else {
|
||||
addDoctorRecord(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
|
||||
Reference in New Issue
Block a user