修改耗材/诊疗绑定,耗材项目药品的缺失

This commit is contained in:
叶锦涛
2025-11-19 16:33:12 +08:00
parent 18c96e006f
commit dfe35bb7f0
3 changed files with 30 additions and 16 deletions

View File

@@ -18,7 +18,7 @@ export function getBindList(queryParams) {
})
}
// 获取耗材列表
// 获取耗材列表受限制的API只返回单次消耗类耗材
export function getDeviceList(queryParams) {
return request({
url: '/personalization/activity-device/device-page',
@@ -27,6 +27,15 @@ export function getDeviceList(queryParams) {
})
}
// 获取完整的器材目录列表使用原始API不限制categoryCode
export function getFullDeviceList(queryParams) {
return request({
url: '/data-dictionary/device/information-page',
method: 'get',
params: queryParams
})
}
// 获取耗材列表
export function init() {
return request({

View File

@@ -16,7 +16,7 @@
</template>
<script setup>
import { getDeviceList } from './api';
import { getFullDeviceList } from './api';
import { watch } from 'vue';
import { throttle } from 'lodash-es';
@@ -27,10 +27,12 @@ const props = defineProps({
},
});
const emit = defineEmits(['selectRow']);
const queryParams = ref({
pageNum: 1,
pageSize: 50,
itemType: props.itemType,
// 修改查询参数添加searchKey字段以匹配搜索框输入
const queryParams = reactive({
searchKey: '',
pageNo: 1, // 新API使用pageNo而不是pageNum
pageSize: 50
// 移除categoryCode参数避免任何可能的限制
});
const deviceList = ref([]);
@@ -43,18 +45,22 @@ const throttledGetList = throttle(
{ leading: true, trailing: true }
);
// 初始化时设置搜索关键字
queryParams.searchKey = props.searchKey;
watch(
() => props,
() => props.searchKey,
(newValue) => {
queryParams.value.searchKey = newValue.searchKey;
queryParams.searchKey = newValue;
throttledGetList();
},
{ immdiate: true, deep: true }
{ immediate: true }
);
getList();
function getList() {
getDeviceList(queryParams.value).then((res) => {
// 使用新的不受限制的API不设置任何会限制查询范围的参数
getFullDeviceList(queryParams).then((res) => {
deviceList.value = res.data.records;
});
}

View File

@@ -496,12 +496,11 @@ function getDeptTree() {
}
/** 查询地点下拉树结构 */
const getLocationTree = () => {
locationTreeSelect({ formList: '11,16,17' }).then((res) => {
if (res.data && res.data.records) {
locationOptions.value = res.data.records
}
})
function getLocationTree() {
locationTreeSelect({ formList: '11,16' }).then((response) => {
console.log(response, 'response查询部门下拉树结构');
locationOptions.value = response.data.records;
});
}
// 显示弹框
function edit() {