修改耗材/诊疗绑定,耗材项目药品的缺失
This commit is contained in:
@@ -18,7 +18,7 @@ export function getBindList(queryParams) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取耗材列表
|
// 获取耗材列表(受限制的API,只返回单次消耗类耗材)
|
||||||
export function getDeviceList(queryParams) {
|
export function getDeviceList(queryParams) {
|
||||||
return request({
|
return request({
|
||||||
url: '/personalization/activity-device/device-page',
|
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() {
|
export function init() {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getDeviceList } from './api';
|
import { getFullDeviceList } from './api';
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import { throttle } from 'lodash-es';
|
import { throttle } from 'lodash-es';
|
||||||
|
|
||||||
@@ -27,10 +27,12 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['selectRow']);
|
const emit = defineEmits(['selectRow']);
|
||||||
const queryParams = ref({
|
// 修改查询参数,添加searchKey字段以匹配搜索框输入
|
||||||
pageNum: 1,
|
const queryParams = reactive({
|
||||||
pageSize: 50,
|
searchKey: '',
|
||||||
itemType: props.itemType,
|
pageNo: 1, // 新API使用pageNo而不是pageNum
|
||||||
|
pageSize: 50
|
||||||
|
// 移除categoryCode参数,避免任何可能的限制
|
||||||
});
|
});
|
||||||
const deviceList = ref([]);
|
const deviceList = ref([]);
|
||||||
|
|
||||||
@@ -43,18 +45,22 @@ const throttledGetList = throttle(
|
|||||||
{ leading: true, trailing: true }
|
{ leading: true, trailing: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 初始化时设置搜索关键字
|
||||||
|
queryParams.searchKey = props.searchKey;
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props,
|
() => props.searchKey,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
queryParams.value.searchKey = newValue.searchKey;
|
queryParams.searchKey = newValue;
|
||||||
throttledGetList();
|
throttledGetList();
|
||||||
},
|
},
|
||||||
{ immdiate: true, deep: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
function getList() {
|
function getList() {
|
||||||
getDeviceList(queryParams.value).then((res) => {
|
// 使用新的不受限制的API,不设置任何会限制查询范围的参数
|
||||||
|
getFullDeviceList(queryParams).then((res) => {
|
||||||
deviceList.value = res.data.records;
|
deviceList.value = res.data.records;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -496,12 +496,11 @@ function getDeptTree() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 查询地点下拉树结构 */
|
/** 查询地点下拉树结构 */
|
||||||
const getLocationTree = () => {
|
function getLocationTree() {
|
||||||
locationTreeSelect({ formList: '11,16,17' }).then((res) => {
|
locationTreeSelect({ formList: '11,16' }).then((response) => {
|
||||||
if (res.data && res.data.records) {
|
console.log(response, 'response查询部门下拉树结构');
|
||||||
locationOptions.value = res.data.records
|
locationOptions.value = response.data.records;
|
||||||
}
|
});
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// 显示弹框
|
// 显示弹框
|
||||||
function edit() {
|
function edit() {
|
||||||
|
|||||||
Reference in New Issue
Block a user