From baced9f6a1005f85e4cf19848ff93163256917ac Mon Sep 17 00:00:00 2001
From: zoujiandong <10130823232@qq.com>
Date: Tue, 26 Sep 2023 08:46:31 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/isOkModal.vue | 17 +++----------
src/views/patient/family-list/index.vue | 21 ++++++++++------
src/views/patient/patient-list/index.vue | 32 +++++++++++++++++++++---
3 files changed, 45 insertions(+), 25 deletions(-)
diff --git a/src/components/isOkModal.vue b/src/components/isOkModal.vue
index 4b70c02..f353ee8 100644
--- a/src/components/isOkModal.vue
+++ b/src/components/isOkModal.vue
@@ -40,28 +40,17 @@ const {isVisible,title,id,api} = toRefs(props);
// Akiraka 20230210 关闭弹窗
const handleClose = () => {
emits('closeChangeOk',false);
- // alert(flag)
}
// Akiraka 20230210 确认按钮 => 开始数据检查
const handleConfirm = async () => {
- const {code}=api.value(id.value);
- if(code==200){
+ const data=title.value=="确定启用吗?"?await api.value(id.value,{status:1}):await api.value(id.value);
+ if(data.code==200){
Message.success("成功");
- proxy.$refs.modalFormRef.resetFields();
+ //proxy.$refs.modalFormRef.resetFields();
}else{
proxy.$notification.error(response.message);
}
emits('closeChangeOk',true);
- // api.value(id.value).then(response => {
- // // Akiraka 20230210 关闭弹窗
- // if(response.code==200){
- // Message.success("成功");
- // proxy.$refs.modalFormRef.resetFields();
- // }else{
- // proxy.$notification.error(response.message);
- // }
- // emits('closeChangeOk',true);
- // })
}
\ No newline at end of file
diff --git a/src/views/patient/family-list/index.vue b/src/views/patient/family-list/index.vue
index 44b97c5..9d204ed 100644
--- a/src/views/patient/family-list/index.vue
+++ b/src/views/patient/family-list/index.vue
@@ -3,11 +3,18 @@
-
+
+
+
+
+
+ 禁用
+ 正常
+ 删除
+
+
禁用
- 启用
+ 启用
+
@@ -235,6 +251,7 @@
const formRules = reactive({
disable_reason: [{ required: true, message: '请输入禁用理由' }]
});
+const isVisible=ref(false);
watch(() => deleteVisible.value, (value) => {
if (value == false) {
getPatientInfo(pager);
@@ -360,15 +377,22 @@ const formRules = reactive({
}
})
}
+//关闭启用弹框
+const closeChangeOk = () => {
+ isVisible.value = false;
+ modalVisible.value = false;
+ handleQuery();
+};
//改变用户状态
const handleChangeStatus=async(status)=>{
if(status==0){
cur_parent_id.value=modalForm.patient_id;
okVisible.value=true;
}else{
- switchStatus(modalForm.patient_id,{
- status:1
- })
+ isVisible.value=true
+ // switchStatus(modalForm.patient_id,{
+ // status:1
+ // })
}
// if(record.status==0){