feat(user): 缓存用户ID到本地存储- 在用户信息存储时增加UserId的本地缓存- 调整多个组件中的字段初始化逻辑
- 统一clinic相关模块的row-key为id - 移除冗余的默认列配置-修正clinicDoctorApply模块的删除逻辑 - 清理未使用的导入和变量定义 - 调整.env.development中的API地址注释状态
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
VITE_APP_NAME=后台管理(开发环境)
|
VITE_APP_NAME=后台管理(开发环境)
|
||||||
VITE_API_URL=http://127.0.0.1:9200/api
|
#VITE_API_URL=http://127.0.0.1:9200/api
|
||||||
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export const useUserStore = defineStore({
|
|||||||
this.info = result;
|
this.info = result;
|
||||||
// 缓存租户信息
|
// 缓存租户信息
|
||||||
localStorage.setItem('TenantName', `${this.info.tenantName}`);
|
localStorage.setItem('TenantName', `${this.info.tenantName}`);
|
||||||
|
localStorage.setItem('UserId', `${this.info.userId}`);
|
||||||
// 缓存企业信息
|
// 缓存企业信息
|
||||||
if (this.info.companyInfo) {
|
if (this.info.companyInfo) {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
|
|||||||
@@ -139,15 +139,10 @@
|
|||||||
doctorId: undefined,
|
doctorId: undefined,
|
||||||
userId: undefined,
|
userId: undefined,
|
||||||
comments: undefined,
|
comments: undefined,
|
||||||
sortNumber: undefined,
|
|
||||||
isDelete: undefined,
|
isDelete: undefined,
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
clinicAppointmentId: undefined,
|
|
||||||
clinicAppointmentName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
|
||||||
sortNumber: 100
|
sortNumber: 100
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
row-key="clinicAppointmentId"
|
row-key="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:datasource="datasource"
|
:datasource="datasource"
|
||||||
:customRow="customRow"
|
:customRow="customRow"
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
/* 删除单个 */
|
/* 删除单个 */
|
||||||
const remove = (row: ClinicAppointment) => {
|
const remove = (row: ClinicAppointment) => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeClinicAppointment(row.clinicAppointmentId)
|
removeClinicAppointment(row.id)
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
|
|||||||
@@ -280,13 +280,9 @@
|
|||||||
contractTime: undefined,
|
contractTime: undefined,
|
||||||
expirationTime: undefined,
|
expirationTime: undefined,
|
||||||
rejectReason: undefined,
|
rejectReason: undefined,
|
||||||
comments: undefined,
|
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
clinicDoctorApplyId: undefined,
|
|
||||||
clinicDoctorApplyName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
comments: '',
|
||||||
sortNumber: 100
|
sortNumber: 100
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -291,13 +291,6 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 默认显示的核心列(最多5个主要字段)
|
|
||||||
const defaultVisibleColumns = [
|
|
||||||
'applyId',
|
|
||||||
'createTime',
|
|
||||||
'action'
|
|
||||||
];
|
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: ClinicDoctorApplyParam) => {
|
const reload = (where?: ClinicDoctorApplyParam) => {
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
@@ -318,7 +311,7 @@
|
|||||||
/* 删除单个 */
|
/* 删除单个 */
|
||||||
const remove = (row: ClinicDoctorApply) => {
|
const remove = (row: ClinicDoctorApply) => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeClinicDoctorApply(row.id)
|
removeClinicDoctorApply(row.applyId)
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
@@ -343,7 +336,7 @@
|
|||||||
maskClosable: true,
|
maskClosable: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeBatchClinicDoctorApply(selection.value.map((d) => d.id))
|
removeBatchClinicDoctorApply(selection.value.map((d) => d.applyId))
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
|
|||||||
@@ -227,12 +227,7 @@
|
|||||||
comments: undefined,
|
comments: undefined,
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined
|
||||||
clinicDoctorMedicalRecordId: undefined,
|
|
||||||
clinicDoctorMedicalRecordName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
|
||||||
sortNumber: 100
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 更新visible */
|
/* 更新visible */
|
||||||
|
|||||||
@@ -143,13 +143,6 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 默认显示的核心列(最多5个主要字段)
|
|
||||||
const defaultVisibleColumns = [
|
|
||||||
'id',
|
|
||||||
'createTime',
|
|
||||||
'action'
|
|
||||||
];
|
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: ClinicDoctorMedicalRecordParam) => {
|
const reload = (where?: ClinicDoctorMedicalRecordParam) => {
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
|
|||||||
@@ -179,15 +179,10 @@
|
|||||||
consultationCount: undefined,
|
consultationCount: undefined,
|
||||||
qrcode: undefined,
|
qrcode: undefined,
|
||||||
comments: undefined,
|
comments: undefined,
|
||||||
sortNumber: undefined,
|
|
||||||
isDelete: undefined,
|
isDelete: undefined,
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
clinicDoctorUserId: undefined,
|
|
||||||
clinicDoctorUserName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
|
||||||
sortNumber: 100
|
sortNumber: 100
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -228,10 +228,6 @@
|
|||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
clinicMedicalHistoryId: undefined,
|
|
||||||
clinicMedicalHistoryName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
|
||||||
sortNumber: 100
|
sortNumber: 100
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -249,13 +249,6 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 默认显示的核心列(最多5个主要字段)
|
|
||||||
const defaultVisibleColumns = [
|
|
||||||
'id',
|
|
||||||
'createTime',
|
|
||||||
'action'
|
|
||||||
];
|
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: ClinicMedicalHistoryParam) => {
|
const reload = (where?: ClinicMedicalHistoryParam) => {
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
|
|||||||
@@ -91,14 +91,13 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, reactive, watch } from 'vue';
|
||||||
import { Form, message } from 'ant-design-vue';
|
import { Form, message } from 'ant-design-vue';
|
||||||
import { assignObject, uuid } from 'ele-admin-pro';
|
import { assignObject } from 'ele-admin-pro';
|
||||||
import { addClinicMedicine, updateClinicMedicine } from '@/api/clinic/clinicMedicine';
|
import { addClinicMedicine, updateClinicMedicine } from '@/api/clinic/clinicMedicine';
|
||||||
import { ClinicMedicine } from '@/api/clinic/clinicMedicine/model';
|
import { ClinicMedicine } from '@/api/clinic/clinicMedicine/model';
|
||||||
import { useThemeStore } from '@/store/modules/theme';
|
import { useThemeStore } from '@/store/modules/theme';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
|
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
|
||||||
import { FormInstance } from 'ant-design-vue/es/form';
|
import { FormInstance } from 'ant-design-vue/es/form';
|
||||||
import { FileRecord } from '@/api/system/file/model';
|
|
||||||
|
|
||||||
// 是否是修改
|
// 是否是修改
|
||||||
const isUpdate = ref(false);
|
const isUpdate = ref(false);
|
||||||
@@ -142,12 +141,7 @@
|
|||||||
comments: undefined,
|
comments: undefined,
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined
|
||||||
clinicMedicineId: undefined,
|
|
||||||
clinicMedicineName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
|
||||||
sortNumber: 100
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 更新visible */
|
/* 更新visible */
|
||||||
@@ -167,20 +161,6 @@
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
const chooseImage = (data: FileRecord) => {
|
|
||||||
images.value.push({
|
|
||||||
uid: data.id,
|
|
||||||
url: data.path,
|
|
||||||
status: 'done'
|
|
||||||
});
|
|
||||||
form.image = data.path;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onDeleteItem = (index: number) => {
|
|
||||||
images.value.splice(index, 1);
|
|
||||||
form.image = '';
|
|
||||||
};
|
|
||||||
|
|
||||||
const { resetFields } = useForm(form, rules);
|
const { resetFields } = useForm(form, rules);
|
||||||
|
|
||||||
/* 保存编辑 */
|
/* 保存编辑 */
|
||||||
@@ -218,13 +198,6 @@
|
|||||||
images.value = [];
|
images.value = [];
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
assignObject(form, props.data);
|
assignObject(form, props.data);
|
||||||
if(props.data.image){
|
|
||||||
images.value.push({
|
|
||||||
uid: uuid(),
|
|
||||||
url: props.data.image,
|
|
||||||
status: 'done'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
isUpdate.value = true;
|
isUpdate.value = true;
|
||||||
} else {
|
} else {
|
||||||
isUpdate.value = false;
|
isUpdate.value = false;
|
||||||
|
|||||||
@@ -224,15 +224,10 @@
|
|||||||
isInvalid: undefined,
|
isInvalid: undefined,
|
||||||
isSettled: undefined,
|
isSettled: undefined,
|
||||||
settleTime: undefined,
|
settleTime: undefined,
|
||||||
comments: undefined,
|
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
clinicMedicineInoutId: undefined,
|
comments: ''
|
||||||
clinicMedicineInoutName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
|
||||||
sortNumber: 100
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 更新visible */
|
/* 更新visible */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
row-key="clinicMedicineInoutId"
|
row-key="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:datasource="datasource"
|
:datasource="datasource"
|
||||||
:customRow="customRow"
|
:customRow="customRow"
|
||||||
@@ -249,13 +249,6 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 默认显示的核心列(最多5个主要字段)
|
|
||||||
const defaultVisibleColumns = [
|
|
||||||
'id',
|
|
||||||
'createTime',
|
|
||||||
'action'
|
|
||||||
];
|
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: ClinicMedicineInoutParam) => {
|
const reload = (where?: ClinicMedicineInoutParam) => {
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
@@ -276,7 +269,7 @@
|
|||||||
/* 删除单个 */
|
/* 删除单个 */
|
||||||
const remove = (row: ClinicMedicineInout) => {
|
const remove = (row: ClinicMedicineInout) => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeClinicMedicineInout(row.clinicMedicineInoutId)
|
removeClinicMedicineInout(row.id)
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
@@ -301,7 +294,7 @@
|
|||||||
maskClosable: true,
|
maskClosable: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeBatchClinicMedicineInout(selection.value.map((d) => d.clinicMedicineInoutId))
|
removeBatchClinicMedicineInout(selection.value.map((d) => d.id))
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
|
|||||||
@@ -120,15 +120,10 @@
|
|||||||
minStockLevel: undefined,
|
minStockLevel: undefined,
|
||||||
lastUpdated: undefined,
|
lastUpdated: undefined,
|
||||||
userId: undefined,
|
userId: undefined,
|
||||||
comments: undefined,
|
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
clinicMedicineStockId: undefined,
|
comments: ''
|
||||||
clinicMedicineStockName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
|
||||||
sortNumber: 100
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 更新visible */
|
/* 更新visible */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
row-key="clinicMedicineStockId"
|
row-key="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:datasource="datasource"
|
:datasource="datasource"
|
||||||
:customRow="customRow"
|
:customRow="customRow"
|
||||||
@@ -171,13 +171,6 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 默认显示的核心列(最多5个主要字段)
|
|
||||||
const defaultVisibleColumns = [
|
|
||||||
'id',
|
|
||||||
'createTime',
|
|
||||||
'action'
|
|
||||||
];
|
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: ClinicMedicineStockParam) => {
|
const reload = (where?: ClinicMedicineStockParam) => {
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
@@ -198,7 +191,7 @@
|
|||||||
/* 删除单个 */
|
/* 删除单个 */
|
||||||
const remove = (row: ClinicMedicineStock) => {
|
const remove = (row: ClinicMedicineStock) => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeClinicMedicineStock(row.clinicMedicineStockId)
|
removeClinicMedicineStock(row.id)
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
@@ -223,7 +216,7 @@
|
|||||||
maskClosable: true,
|
maskClosable: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeBatchClinicMedicineStock(selection.value.map((d) => d.clinicMedicineStockId))
|
removeBatchClinicMedicineStock(selection.value.map((d) => d.id))
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
|
|||||||
@@ -649,15 +649,10 @@
|
|||||||
version: undefined,
|
version: undefined,
|
||||||
userId: undefined,
|
userId: undefined,
|
||||||
comments: undefined,
|
comments: undefined,
|
||||||
sortNumber: undefined,
|
|
||||||
deleted: undefined,
|
deleted: undefined,
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
clinicOrderId: undefined,
|
|
||||||
clinicOrderName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
|
||||||
sortNumber: 100
|
sortNumber: 100
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
row-key="clinicOrderId"
|
row-key="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:datasource="datasource"
|
:datasource="datasource"
|
||||||
:customRow="customRow"
|
:customRow="customRow"
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { createVNode, ref, computed } from 'vue';
|
import { createVNode, ref } from 'vue';
|
||||||
import { message, Modal } from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import type { EleProTable } from 'ele-admin-pro';
|
import type { EleProTable } from 'ele-admin-pro';
|
||||||
@@ -567,14 +567,6 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 默认显示的核心列(最多5个主要字段)
|
|
||||||
const defaultVisibleColumns = [
|
|
||||||
'orderId',
|
|
||||||
'title',
|
|
||||||
'createTime',
|
|
||||||
'action'
|
|
||||||
];
|
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: ClinicOrderParam) => {
|
const reload = (where?: ClinicOrderParam) => {
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
@@ -595,7 +587,7 @@
|
|||||||
/* 删除单个 */
|
/* 删除单个 */
|
||||||
const remove = (row: ClinicOrder) => {
|
const remove = (row: ClinicOrder) => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeClinicOrder(row.clinicOrderId)
|
removeClinicOrder(row.orderId)
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
@@ -620,7 +612,7 @@
|
|||||||
maskClosable: true,
|
maskClosable: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeBatchClinicOrder(selection.value.map((d) => d.clinicOrderId))
|
removeBatchClinicOrder(selection.value.map((d) => d.orderId))
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
|
|||||||
@@ -222,20 +222,6 @@
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
const chooseImage = (data: FileRecord) => {
|
|
||||||
images.value.push({
|
|
||||||
uid: data.id,
|
|
||||||
url: data.path,
|
|
||||||
status: 'done'
|
|
||||||
});
|
|
||||||
form.image = data.path;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onDeleteItem = (index: number) => {
|
|
||||||
images.value.splice(index, 1);
|
|
||||||
form.image = '';
|
|
||||||
};
|
|
||||||
|
|
||||||
const { resetFields } = useForm(form, rules);
|
const { resetFields } = useForm(form, rules);
|
||||||
|
|
||||||
/* 保存编辑 */
|
/* 保存编辑 */
|
||||||
@@ -273,13 +259,6 @@
|
|||||||
images.value = [];
|
images.value = [];
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
assignObject(form, props.data);
|
assignObject(form, props.data);
|
||||||
if(props.data.image){
|
|
||||||
images.value.push({
|
|
||||||
uid: uuid(),
|
|
||||||
url: props.data.image,
|
|
||||||
status: 'done'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
isUpdate.value = true;
|
isUpdate.value = true;
|
||||||
} else {
|
} else {
|
||||||
isUpdate.value = false;
|
isUpdate.value = false;
|
||||||
|
|||||||
@@ -231,14 +231,6 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 默认显示的核心列(最多5个主要字段)
|
|
||||||
const defaultVisibleColumns = [
|
|
||||||
'id',
|
|
||||||
'status',
|
|
||||||
'createTime',
|
|
||||||
'action'
|
|
||||||
];
|
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: ClinicPrescriptionParam) => {
|
const reload = (where?: ClinicPrescriptionParam) => {
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
|
|||||||
@@ -120,14 +120,13 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, reactive, watch } from 'vue';
|
||||||
import { Form, message } from 'ant-design-vue';
|
import { Form, message } from 'ant-design-vue';
|
||||||
import { assignObject, uuid } from 'ele-admin-pro';
|
import { assignObject } from 'ele-admin-pro';
|
||||||
import { addClinicPrescriptionItem, updateClinicPrescriptionItem } from '@/api/clinic/clinicPrescriptionItem';
|
import { addClinicPrescriptionItem, updateClinicPrescriptionItem } from '@/api/clinic/clinicPrescriptionItem';
|
||||||
import { ClinicPrescriptionItem } from '@/api/clinic/clinicPrescriptionItem/model';
|
import { ClinicPrescriptionItem } from '@/api/clinic/clinicPrescriptionItem/model';
|
||||||
import { useThemeStore } from '@/store/modules/theme';
|
import { useThemeStore } from '@/store/modules/theme';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
|
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
|
||||||
import { FormInstance } from 'ant-design-vue/es/form';
|
import { FormInstance } from 'ant-design-vue/es/form';
|
||||||
import { FileRecord } from '@/api/system/file/model';
|
|
||||||
|
|
||||||
// 是否是修改
|
// 是否是修改
|
||||||
const isUpdate = ref(false);
|
const isUpdate = ref(false);
|
||||||
@@ -193,20 +192,6 @@
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
const chooseImage = (data: FileRecord) => {
|
|
||||||
images.value.push({
|
|
||||||
uid: data.id,
|
|
||||||
url: data.path,
|
|
||||||
status: 'done'
|
|
||||||
});
|
|
||||||
form.image = data.path;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onDeleteItem = (index: number) => {
|
|
||||||
images.value.splice(index, 1);
|
|
||||||
form.image = '';
|
|
||||||
};
|
|
||||||
|
|
||||||
const { resetFields } = useForm(form, rules);
|
const { resetFields } = useForm(form, rules);
|
||||||
|
|
||||||
/* 保存编辑 */
|
/* 保存编辑 */
|
||||||
@@ -244,13 +229,6 @@
|
|||||||
images.value = [];
|
images.value = [];
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
assignObject(form, props.data);
|
assignObject(form, props.data);
|
||||||
if(props.data.image){
|
|
||||||
images.value.push({
|
|
||||||
uid: uuid(),
|
|
||||||
url: props.data.image,
|
|
||||||
status: 'done'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
isUpdate.value = true;
|
isUpdate.value = true;
|
||||||
} else {
|
} else {
|
||||||
isUpdate.value = false;
|
isUpdate.value = false;
|
||||||
|
|||||||
@@ -207,13 +207,6 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 默认显示的核心列(最多5个主要字段)
|
|
||||||
const defaultVisibleColumns = [
|
|
||||||
'id',
|
|
||||||
'createTime',
|
|
||||||
'action'
|
|
||||||
];
|
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: ClinicPrescriptionItemParam) => {
|
const reload = (where?: ClinicPrescriptionItemParam) => {
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
|
|||||||
@@ -224,15 +224,10 @@
|
|||||||
isInvalid: undefined,
|
isInvalid: undefined,
|
||||||
isSettled: undefined,
|
isSettled: undefined,
|
||||||
settleTime: undefined,
|
settleTime: undefined,
|
||||||
comments: undefined,
|
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
clinicReportId: undefined,
|
comments: ''
|
||||||
clinicReportName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
|
||||||
sortNumber: 100
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 更新visible */
|
/* 更新visible */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
row-key="clinicReportId"
|
row-key="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:datasource="datasource"
|
:datasource="datasource"
|
||||||
:customRow="customRow"
|
:customRow="customRow"
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { createVNode, ref, computed } from 'vue';
|
import { createVNode, ref } from 'vue';
|
||||||
import { message, Modal } from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import type { EleProTable } from 'ele-admin-pro';
|
import type { EleProTable } from 'ele-admin-pro';
|
||||||
@@ -249,13 +249,6 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 默认显示的核心列(最多5个主要字段)
|
|
||||||
const defaultVisibleColumns = [
|
|
||||||
'id',
|
|
||||||
'createTime',
|
|
||||||
'action'
|
|
||||||
];
|
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: ClinicReportParam) => {
|
const reload = (where?: ClinicReportParam) => {
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
@@ -276,7 +269,7 @@
|
|||||||
/* 删除单个 */
|
/* 删除单个 */
|
||||||
const remove = (row: ClinicReport) => {
|
const remove = (row: ClinicReport) => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeClinicReport(row.clinicReportId)
|
removeClinicReport(row.id)
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
@@ -301,7 +294,7 @@
|
|||||||
maskClosable: true,
|
maskClosable: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeBatchClinicReport(selection.value.map((d) => d.clinicReportId))
|
removeBatchClinicReport(selection.value.map((d) => d.id))
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
|
|||||||
@@ -227,12 +227,7 @@
|
|||||||
comments: undefined,
|
comments: undefined,
|
||||||
tenantId: undefined,
|
tenantId: undefined,
|
||||||
createTime: undefined,
|
createTime: undefined,
|
||||||
updateTime: undefined,
|
updateTime: undefined
|
||||||
clinicVisitRecordId: undefined,
|
|
||||||
clinicVisitRecordName: '',
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
|
||||||
sortNumber: 100
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 更新visible */
|
/* 更新visible */
|
||||||
@@ -252,20 +247,6 @@
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
const chooseImage = (data: FileRecord) => {
|
|
||||||
images.value.push({
|
|
||||||
uid: data.id,
|
|
||||||
url: data.path,
|
|
||||||
status: 'done'
|
|
||||||
});
|
|
||||||
form.image = data.path;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onDeleteItem = (index: number) => {
|
|
||||||
images.value.splice(index, 1);
|
|
||||||
form.image = '';
|
|
||||||
};
|
|
||||||
|
|
||||||
const { resetFields } = useForm(form, rules);
|
const { resetFields } = useForm(form, rules);
|
||||||
|
|
||||||
/* 保存编辑 */
|
/* 保存编辑 */
|
||||||
@@ -303,13 +284,6 @@
|
|||||||
images.value = [];
|
images.value = [];
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
assignObject(form, props.data);
|
assignObject(form, props.data);
|
||||||
if(props.data.image){
|
|
||||||
images.value.push({
|
|
||||||
uid: uuid(),
|
|
||||||
url: props.data.image,
|
|
||||||
status: 'done'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
isUpdate.value = true;
|
isUpdate.value = true;
|
||||||
} else {
|
} else {
|
||||||
isUpdate.value = false;
|
isUpdate.value = false;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
<a-card :bordered="false" :body-style="{ padding: '16px' }">
|
||||||
<ele-pro-table
|
<ele-pro-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
row-key="clinicVisitRecordId"
|
row-key="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:datasource="datasource"
|
:datasource="datasource"
|
||||||
:customRow="customRow"
|
:customRow="customRow"
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { createVNode, ref, computed } from 'vue';
|
import { createVNode, ref } from 'vue';
|
||||||
import { message, Modal } from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import type { EleProTable } from 'ele-admin-pro';
|
import type { EleProTable } from 'ele-admin-pro';
|
||||||
@@ -249,13 +249,6 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 默认显示的核心列(最多5个主要字段)
|
|
||||||
const defaultVisibleColumns = [
|
|
||||||
'id',
|
|
||||||
'createTime',
|
|
||||||
'action'
|
|
||||||
];
|
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: ClinicVisitRecordParam) => {
|
const reload = (where?: ClinicVisitRecordParam) => {
|
||||||
selection.value = [];
|
selection.value = [];
|
||||||
@@ -276,7 +269,7 @@
|
|||||||
/* 删除单个 */
|
/* 删除单个 */
|
||||||
const remove = (row: ClinicVisitRecord) => {
|
const remove = (row: ClinicVisitRecord) => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeClinicVisitRecord(row.clinicVisitRecordId)
|
removeClinicVisitRecord(row.id)
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
@@ -301,7 +294,7 @@
|
|||||||
maskClosable: true,
|
maskClosable: true,
|
||||||
onOk: () => {
|
onOk: () => {
|
||||||
const hide = message.loading('请求中..', 0);
|
const hide = message.loading('请求中..', 0);
|
||||||
removeBatchClinicVisitRecord(selection.value.map((d) => d.clinicVisitRecordId))
|
removeBatchClinicVisitRecord(selection.value.map((d) => d.id))
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
hide();
|
hide();
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
|
|||||||
Reference in New Issue
Block a user