版本更新

This commit is contained in:
Zhang.WH
2025-09-03 15:54:41 +08:00
parent 0b93d16b64
commit 8f82322d10
3290 changed files with 154339 additions and 23829 deletions

View File

@@ -0,0 +1,105 @@
<template>
<div>
<el-table
ref="medicineRef"
height="400"
:data="medicineList"
@cell-click="clickRow"
>
<el-table-column
label="项目编码"
align="center"
prop="itemBusNo"
width="150"
/>
<el-table-column
label="项目名称"
align="center"
prop="name"
width="180"
/>
<el-table-column
label="项目类型"
align="center"
prop="itemType_enumText"
/>
<el-table-column
label="包装单位"
align="center"
prop="unitCode_dictText"
/>
<el-table-column
label="最小单位"
align="center"
prop="minUnitCode_dictText"
/>
<el-table-column label="规格" align="center" prop="volume" />
<!-- <el-table-column label="用法" align="center" prop="methodCode_dictText" />
<el-table-column label="单次剂量" align="center" prop="dose" />
<el-table-column
label="剂量单位"
align="center"
prop="doseUnitCode_dictText"
/> -->
<el-table-column label="生产厂家" align="center" prop="manufacturer" />
</el-table>
</div>
</template>
<script setup>
import { getMedicineList } from "./api";
import { watch } from "vue";
import { throttle } from "lodash-es";
const props = defineProps({
searchKey: {
type: String,
default: "",
},
itemType: {
type: String,
default: "",
},
});
const emit = defineEmits(["selectRow"]);
const queryParams = ref({
pageNum: 1,
pageSize: 50,
itemType: props.itemType,
});
const medicineList = ref([]);
// 节流函数
const throttledGetList = throttle(
() => {
getList();
},
300,
{ leading: true, trailing: true }
);
watch(
() => props,
(newValue) => {
queryParams.value.searchKey = newValue.searchKey;
queryParams.value.itemType = newValue.itemType;
throttledGetList();
},
{ immdiate: true, deep: true }
);
getList();
function getList() {
queryParams.value.purchaseFlag = 1
getMedicineList(queryParams.value).then((res) => {
medicineList.value = res.data;
});
}
function clickRow(row) {
emit("selectRow", row);
}
</script>
<style scoped>
</style>