|
@@ -108,9 +108,11 @@ import { onMounted,ref, getCurrentInstance } from 'vue'
|
|
|
import { onLoad } from "@dcloudio/uni-app"
|
|
|
import {receiveOrderList, selectDepartment } from "@/static/js/api.js"
|
|
|
import {releaseOrder} from "@/static/js/request.js"
|
|
|
+import debounce from 'lodash.debounce'
|
|
|
|
|
|
// import { ID_INJECTION_KEY } from 'element-plus'
|
|
|
|
|
|
+
|
|
|
const userInfo = ref({})
|
|
|
const workStatus = ref('0')
|
|
|
const tabList = ref([
|
|
@@ -244,7 +246,7 @@ const emitSelect = (v)=>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const handleSearch = async()=>{
|
|
|
+const handleSearch = debounce(async()=>{
|
|
|
|
|
|
console.log('handleSearch searchPreMzZy',searchPreMzZy.value)
|
|
|
console.log('handleSearch searchStatus',searchStatus.value)
|
|
@@ -301,9 +303,9 @@ const handleSearch = async()=>{
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+},500)
|
|
|
|
|
|
-const handleRefresh = ()=>{
|
|
|
+const handleRefresh = debounce(()=>{
|
|
|
|
|
|
console.log('yijianshifang >orderList>>', orderList.value)
|
|
|
// let ids = ''
|
|
@@ -339,12 +341,12 @@ const handleRefresh = ()=>{
|
|
|
// ids.value = []
|
|
|
// }
|
|
|
// }
|
|
|
-}
|
|
|
+},500)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-const handleRelease = async()=>{
|
|
|
+const handleRelease = debounce(async()=>{
|
|
|
const params = {
|
|
|
token: uni.getStorageSync('token'),
|
|
|
data:{ids:ids.value.toString()}
|
|
@@ -370,7 +372,7 @@ const handleRelease = async()=>{
|
|
|
}
|
|
|
s.value = '1'
|
|
|
console.log('after handleRelease ids.value', ids.value)
|
|
|
-}
|
|
|
+},500)
|
|
|
|
|
|
const handleGetOffice = (e)=>{
|
|
|
console.log('handleGetOffice', e.detail.value)
|
|
@@ -498,7 +500,7 @@ const handleGetTags = (v)=>{
|
|
|
}
|
|
|
|
|
|
// 更新处方列表
|
|
|
-const checkIndex = async(index) => {
|
|
|
+const checkIndex = debounce(async(index) => {
|
|
|
tabActive.value = index
|
|
|
page.value= 1
|
|
|
console.log('index',index)
|
|
@@ -545,13 +547,13 @@ const checkIndex = async(index) => {
|
|
|
console.log('selectDepartment officeArr.value', officeArr.value)
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+},500)
|
|
|
|
|
|
const openTime = ()=>{
|
|
|
proxy.$refs.timeslot.open()
|
|
|
}
|
|
|
|
|
|
-const loadMoreList =async()=>{
|
|
|
+const loadMoreList = debounce(async()=>{
|
|
|
console.log('loadMoreList>>>')
|
|
|
if(isBottom){
|
|
|
return
|
|
@@ -561,10 +563,17 @@ const loadMoreList =async()=>{
|
|
|
token: uni.getStorageSync('token'),
|
|
|
data: JSON.stringify({
|
|
|
currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
|
|
|
- name: searchVal.value,
|
|
|
+ startTime: searchTime.value[0] || '',
|
|
|
+ endTime: searchTime.value[1] || '',
|
|
|
+ name: searchName.value.trim() || '',
|
|
|
+ preNo: searchPreNo.value || '',
|
|
|
+ department: searchDepartment.value || '',
|
|
|
+ prescriptionStatus: searchStatus.value || '',//煎煮发药
|
|
|
+ sex: searchSex.value || '',
|
|
|
+ preMzZy: searchPreMzZy.value || '',//门诊住院
|
|
|
pageNum: page.value,
|
|
|
pageSize: pageSize.value,
|
|
|
- status: tabActive.value + ''
|
|
|
+ status: tabList.value[tabActive.value].status
|
|
|
})
|
|
|
}
|
|
|
const {data:res} = await receiveOrderList(params)
|
|
@@ -585,16 +594,23 @@ const loadMoreList =async()=>{
|
|
|
tabList.value[0].leng = orderList.value.length
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+},500)
|
|
|
|
|
|
-const loadPreList = async()=>{
|
|
|
+const loadPreList = debounce(async()=>{
|
|
|
console.log('loadPreList>>>')
|
|
|
page.value = 1
|
|
|
const params = {
|
|
|
token: uni.getStorageSync('token'),
|
|
|
data: JSON.stringify({
|
|
|
currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
|
|
|
- name: searchVal.value,
|
|
|
+ startTime: searchTime.value[0] || '',
|
|
|
+ endTime: searchTime.value[1] || '',
|
|
|
+ name: searchName.value.trim() || '',
|
|
|
+ preNo: searchPreNo.value || '',
|
|
|
+ department: searchDepartment.value || '',
|
|
|
+ prescriptionStatus: searchStatus.value || '',//煎煮发药
|
|
|
+ sex: searchSex.value || '',
|
|
|
+ preMzZy: searchPreMzZy.value || '',//门诊住院
|
|
|
pageNum: page.value,
|
|
|
pageSize: pageSize.value,
|
|
|
status: tabList.value[tabActive.value].status
|
|
@@ -611,7 +627,7 @@ const loadPreList = async()=>{
|
|
|
tabList.value[0].leng = orderList.value.length
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+},500)
|
|
|
|
|
|
|
|
|
</script>
|