refactor(diagnosistreatment): 优化诊断治疗对话框组件结构
- 移除未使用的 title 响应式变量 - 移除未使用的下拉选项响应式变量(diagnosisCategoryOptions、statusFlagOptions、exeOrganizations、typeEnumOptions) - 简化组件初始化逻辑,直接使用 props 数据 - 清理多余的赋值操作,提高代码可读性 - 优化图标SVG路径定义,调整矩形绘制方式
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M512 128c-211.2 0-384 172.8-384 384 0 106.24 43.52 202.24 113.92 271.36L256 896h512l-85.33-112.64C769.28 714.24 812.8 618.24 812.8 512c0-211.2-172.8-384-384-384z m0 576c-106.24 0-192-85.76-192-192s85.76-192 192-192 192 85.76 192 192-85.76 192-192 192z" fill="currentColor"/>
|
<path d="M512 128c-211.2 0-384 172.8-384 384 0 106.24 43.52 202.24 113.92 271.36L256 896h512l-85.33-112.64C769.28 714.24 812.8 618.24 812.8 512c0-211.2-172.8-384-384-384z m0 576c-106.24 0-192-85.76-192-192s85.76-192 192-192 192 85.76 192 192-85.76 192-192 192z" fill="currentColor"/>
|
||||||
<path d="M384 320h256v64h-256z" fill="currentColor"/>
|
<path d="M384 320h64v384h-64z" fill="currentColor"/>
|
||||||
<path d="M384 448h256v64h-256z" fill="currentColor"/>
|
<path d="M576 320h64v384h-64z" fill="currentColor"/>
|
||||||
<path d="M384 576h256v64h-256z" fill="currentColor"/>
|
<path d="M384 384h256v64h-256z" fill="currentColor"/>
|
||||||
|
<path d="M384 512h256v64h-256z" fill="currentColor"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 538 B After Width: | Height: | Size: 592 B |
@@ -507,16 +507,11 @@ const { specimen_code, unit_code, med_chrgitm_type, fin_type_code, activity_cate
|
|||||||
);
|
);
|
||||||
|
|
||||||
const isTemplateActive = ref(true);
|
const isTemplateActive = ref(true);
|
||||||
const title = ref('');
|
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||||
const deptOptions = ref(undefined); // 部门树选项
|
const deptOptions = ref(undefined); // 部门树选项
|
||||||
const bodyOptions = ref(undefined); // 身体部位树选项
|
const bodyOptions = ref(undefined); // 身体部位树选项
|
||||||
const locationOptions = ref(undefined); // 地点树选项
|
const locationOptions = ref(undefined); // 地点树选项
|
||||||
const diagnosisCategoryOptions = ref(undefined);
|
|
||||||
const statusFlagOptions = ref(undefined);
|
|
||||||
const exeOrganizations = ref(undefined);
|
|
||||||
const typeEnumOptions = ref(undefined);
|
|
||||||
const diagnosisTreatmentList = ref([]);
|
const diagnosisTreatmentList = ref([]);
|
||||||
// 使用单位过滤后的选项
|
// 使用单位过滤后的选项
|
||||||
const filteredUnitCode = ref([]);
|
const filteredUnitCode = ref([]);
|
||||||
@@ -639,12 +634,6 @@ function show() {
|
|||||||
filteredUnitCode.value = [];
|
filteredUnitCode.value = [];
|
||||||
isFilteringUnitCode.value = false;
|
isFilteringUnitCode.value = false;
|
||||||
|
|
||||||
title.value = '';
|
|
||||||
title.value = props.title;
|
|
||||||
diagnosisCategoryOptions.value = props.diagnosisCategoryOptions;
|
|
||||||
statusFlagOptions.value = props.statusFlagOptions;
|
|
||||||
exeOrganizations.value = props.exeOrganizations;
|
|
||||||
typeEnumOptions.value = props.typeEnumOptions;
|
|
||||||
form.value.categoryCode = props.currentCategoryEnum;
|
form.value.categoryCode = props.currentCategoryEnum;
|
||||||
form.value.isEditInfoDisable = props.isEditInfoDisable;
|
form.value.isEditInfoDisable = props.isEditInfoDisable;
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
@@ -669,8 +658,6 @@ function edit() {
|
|||||||
// 重置使用单位过滤
|
// 重置使用单位过滤
|
||||||
filteredUnitCode.value = [];
|
filteredUnitCode.value = [];
|
||||||
isFilteringUnitCode.value = false;
|
isFilteringUnitCode.value = false;
|
||||||
title.value = '';
|
|
||||||
title.value = props.title;
|
|
||||||
form.value = props.item;
|
form.value = props.item;
|
||||||
form.value.chrgitmLv = form.value.chrgitmLv ? form.value.chrgitmLv.toString() : undefined;
|
form.value.chrgitmLv = form.value.chrgitmLv ? form.value.chrgitmLv.toString() : undefined;
|
||||||
// 所属科室:如果后端无法翻译科室名称(orgId_dictText为空),则清空orgId,
|
// 所属科室:如果后端无法翻译科室名称(orgId_dictText为空),则清空orgId,
|
||||||
@@ -697,10 +684,6 @@ function edit() {
|
|||||||
form.value.permittedUnitCode = form.value.permittedUnitCode
|
form.value.permittedUnitCode = form.value.permittedUnitCode
|
||||||
? form.value.permittedUnitCode.toString()
|
? form.value.permittedUnitCode.toString()
|
||||||
: undefined;
|
: undefined;
|
||||||
diagnosisCategoryOptions.value = props.diagnosisCategoryOptions;
|
|
||||||
statusFlagOptions.value = props.statusFlagOptions;
|
|
||||||
exeOrganizations.value = props.exeOrganizations;
|
|
||||||
typeEnumOptions.value = props.typeEnumOptions;
|
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
|
|
||||||
// 编辑时计算初始总价
|
// 编辑时计算初始总价
|
||||||
|
|||||||
Reference in New Issue
Block a user