Files
his/backup/vxetable-migration-20260602/medicationmanagement/statisticalManagement/medicationUsageDetails.vue
华佗 1d21661a78 feat: Spring Boot 3.5.14 全量升级 + 组件升级
核心升级:
- Spring Boot 2.7.18 → 3.5.14
- MyBatis Plus 3.5.5 → 3.5.16 (spring-boot3-starter)
- Springdoc 1.8.0 → 2.8.6 (OpenAPI 3)
- Flowable 6.8.0 → 7.1.0
- Druid 1.2.x → 1.2.28 (boot3-starter)
- kotlin-reflect 1.9.10 → 1.9.25

迁移适配:
- javax → jakarta 命名空间 (620+ 文件)
- Swagger 注解迁移到 OpenAPI 3 (@Tag/@Schema/@Operation/@Parameter)
- Spring Security 6.2 适配 (antMatchers→requestMatchers, EnableMethodSecurity)
- Druid 包名迁移 (boot→boot3)
- Redis 配置路径迁移 (spring.redis→spring.data.redis)
- Flyway 适配 (flyway-database-postgresql)
- Flowable 7.x 适配 (MULE_TASK_IMAGE 移除)

修复:
- spring-boot-maven-plugin 2.5.15→3.5.14 (SPI服务发现失效)
- mybatis-plus-boot-starter 3.5.5→3.5.16 (kotlin-reflect+fastjson2冲突)
- Flowable database-schema-update 启用自动建表

验证: 23/23 测试通过, 1374 API端点正常
2026-06-04 22:39:49 +08:00

226 lines
5.5 KiB
Vue
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="app-container">
<!-- 搜索区域 -->
<div class="search-form mb-4">
<el-form
:model="queryParams"
inline
@submit.prevent
>
<el-form-item label="搜索关键词">
<el-input
v-model="queryParams.searchKey"
placeholder="请输入药品名称/编码等关键词"
clearable
style="width: 200px"
@keyup.enter="getList"
/>
</el-form-item>
<el-form-item label="开始时间">
<el-date-picker
v-model="queryParams.startTime"
type="datetime"
placeholder="选择开始时间"
clearable
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 180px"
/>
</el-form-item>
<el-form-item label="结束时间">
<el-date-picker
v-model="queryParams.endTime"
type="datetime"
placeholder="选择结束日期"
clearable
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 180px"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
@click="getList"
>
查询
</el-button>
<el-button
icon="el-icon-refresh"
@click="resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
</div>
<!-- 数据表格 -->
<el-table
v-loading="loading"
:data="medicationUsageList"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="50"
align="center"
/>
<el-table-column
key="orgId"
label="医疗机构代码"
align="center"
prop="orgId"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
key="orgName"
label="组织机构名称"
align="center"
prop="orgName"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
key="nationalDrugCode"
label="国家药品编码(YPID)"
align="center"
prop="nationalDrugCode"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
key="busNo"
label="院内药品唯一码"
align="center"
prop="busNo"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
key="provincialDrugCode"
label="省级药品集中采购平台药品编码"
align="center"
prop="provincialDrugCode"
width="220"
:show-overflow-tooltip="true"
/>
<el-table-column
key="itemName"
label="产品名称"
align="center"
prop="itemName"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
key="totalSalesPrice"
label="销售总金额(元)"
align="center"
prop="totalSalesPrice"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
key="packageSalesQuantity"
label="销售数量(最小销售包装单位)"
align="center"
prop="packageSalesQuantity"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
key="unitCode_dictText"
label="销售数量(最小制剂单位)"
align="center"
prop="unitCode_dictText"
width="200"
:show-overflow-tooltip="true"
/>
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
</div>
</template>
<script setup name="medicationUsageDetails">
import {onMounted, ref} from 'vue';
import {getReportMedicationUsage} from './statisticalManagent';
// 表格数据
const medicationUsageList = ref([]);
// 加载状态
const loading = ref(true);
// 选中的ID列表
const ids = ref([]);
// 总条数
const total = ref(0);
// 单选/多选状态(原代码遗漏,补充)
const single = ref(true);
const multiple = ref(true);
// 查询参数新增searchKey、startTime、endTime
const queryParams = ref({
pageNo: 1,
pageSize: 10,
searchKey: '', // 搜索关键词
startTime: '', // 开始时间
endTime: '', // 结束时间
});
/** 查询调拨管理项目列表 */
function getList() {
loading.value = true;
getReportMedicationUsage(queryParams.value).then((res) => {
medicationUsageList.value = res.data.records;
total.value = res.data.total;
loading.value = false;
});
}
/** 选择条数 */
function handleSelectionChange(selection) {
ids.value = selection.map((item) => item.id);
single.value = selection.length !== 1;
multiple.value = !selection.length;
}
/** 重置查询条件 */
function resetQuery() {
queryParams.value = {
pageNo: 1,
pageSize: 10,
searchKey: '',
startTime: '',
endTime: '',
};
getList(); // 重置后重新查询
}
// 页面加载时获取数据
onMounted(() => {
getList();
});
</script>
<style scoped>
/* 搜索表单间距 */
.search-form {
padding: 10px;
background: #f5f5f5;
border-radius: 4px;
}
/* 表格与搜索框间距 */
.mb-4 {
margin-bottom: 16px;
}
</style>