refactor(diagnosistreatment): 优化诊断治疗对话框组件结构

- 移除未使用的 title 响应式变量
- 移除未使用的下拉选项响应式变量(diagnosisCategoryOptions、statusFlagOptions、exeOrganizations、typeEnumOptions)
- 简化组件初始化逻辑,直接使用 props 数据
- 清理多余的赋值操作,提高代码可读性
- 优化图标SVG路径定义,调整矩形绘制方式
This commit is contained in:
2026-06-17 15:19:33 +08:00
parent 52b94b9df4
commit d5f177ae56
2 changed files with 4 additions and 20 deletions

View File

@@ -1,6 +1,7 @@
<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="M384 320h256v64h-256z" fill="currentColor"/>
<path d="M384 448h256v64h-256z" fill="currentColor"/>
<path d="M384 576h256v64h-256z" fill="currentColor"/>
<path d="M384 320h64v384h-64z" fill="currentColor"/>
<path d="M576 320h64v384h-64z" fill="currentColor"/>
<path d="M384 384h256v64h-256z" fill="currentColor"/>
<path d="M384 512h256v64h-256z" fill="currentColor"/>
</svg>

Before

Width:  |  Height:  |  Size: 538 B

After

Width:  |  Height:  |  Size: 592 B

View File

@@ -507,16 +507,11 @@ const { specimen_code, unit_code, med_chrgitm_type, fin_type_code, activity_cate
);
const isTemplateActive = ref(true);
const title = ref('');
const visible = ref(false);
const emits = defineEmits(['submit']); // 声明自定义事件
const deptOptions = ref(undefined); // 部门树选项
const bodyOptions = 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 filteredUnitCode = ref([]);
@@ -639,12 +634,6 @@ function show() {
filteredUnitCode.value = [];
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.isEditInfoDisable = props.isEditInfoDisable;
visible.value = true;
@@ -669,8 +658,6 @@ function edit() {
// 重置使用单位过滤
filteredUnitCode.value = [];
isFilteringUnitCode.value = false;
title.value = '';
title.value = props.title;
form.value = props.item;
form.value.chrgitmLv = form.value.chrgitmLv ? form.value.chrgitmLv.toString() : undefined;
// 所属科室如果后端无法翻译科室名称orgId_dictText为空则清空orgId
@@ -697,10 +684,6 @@ function edit() {
form.value.permittedUnitCode = form.value.permittedUnitCode
? form.value.permittedUnitCode.toString()
: undefined;
diagnosisCategoryOptions.value = props.diagnosisCategoryOptions;
statusFlagOptions.value = props.statusFlagOptions;
exeOrganizations.value = props.exeOrganizations;
typeEnumOptions.value = props.typeEnumOptions;
visible.value = true;
// 编辑时计算初始总价