|
@@ -27,8 +27,7 @@
|
|
|
activeColor="#409eff"></uni-segmented-control>
|
|
activeColor="#409eff"></uni-segmented-control>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="process_list">
|
|
<view class="process_list">
|
|
|
- <process-list ref="processListRef" :list="processes" @clickSegment="getProcessData"
|
|
|
|
|
- @clickItem="handleToProcessDetail" @scrollToBottom="getProcessPage" :current="current" :pSize="5"
|
|
|
|
|
|
|
+ <process-list ref="processListRef" @clickSegment="getProcessData" @clickItem="handleToProcessDetail" @scrollToBottom="getProcessPage" :current="current" :pSize="5"
|
|
|
:pageNo="1"></process-list>
|
|
:pageNo="1"></process-list>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="popup_container">
|
|
<view class="popup_container">
|
|
@@ -46,15 +45,17 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import processList from '@/components/ygoa/processList.vue'
|
|
import processList from '@/components/ygoa/processList.vue'
|
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
import { onShow } from '@dcloudio/uni-app'
|
|
|
-import { reactive, ref, onMounted, onUpdated } from 'vue';
|
|
|
|
|
|
|
+import { reactive, ref, onMounted } from 'vue';
|
|
|
import $tab from '@/plugins/tab.js'
|
|
import $tab from '@/plugins/tab.js'
|
|
|
import { getUserProcess, getUserProcessed, getUserProcessing, getUserAllProcess } from '@/api/process';
|
|
import { getUserProcess, getUserProcessed, getUserProcessing, getUserAllProcess } from '@/api/process';
|
|
|
import { useUserStore } from '@/store/user';
|
|
import { useUserStore } from '@/store/user';
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- uni.$on('ReloadProcessData', (res) => {
|
|
|
|
|
- processListRef.value.onClickItem()
|
|
|
|
|
|
|
+ uni.$on('ReloadProcessData', () => {
|
|
|
|
|
+ new Promise((resolve, reject) =>{
|
|
|
|
|
+ processListRef.value.onClickItem()
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
onShow(() => {
|
|
onShow(() => {
|
|
@@ -69,10 +70,10 @@ const current = ref(0)
|
|
|
const processListRef = ref(null)
|
|
const processListRef = ref(null)
|
|
|
|
|
|
|
|
// 待办列表
|
|
// 待办列表
|
|
|
-const processes = ref([])
|
|
|
|
|
|
|
+// const processes = ref([])
|
|
|
// 分段器点击事件 调用子组件刷新数据
|
|
// 分段器点击事件 调用子组件刷新数据
|
|
|
function clickSegmentItem({ currentIndex }) {
|
|
function clickSegmentItem({ currentIndex }) {
|
|
|
- processes.value = [] // 清空列表数据
|
|
|
|
|
|
|
+ // processes.value = [] // 清空列表数据
|
|
|
current.value = currentIndex // 更新分段器状态
|
|
current.value = currentIndex // 更新分段器状态
|
|
|
processListRef.value.onClickItem() // 调用子组件刷新数据
|
|
processListRef.value.onClickItem() // 调用子组件刷新数据
|
|
|
}
|
|
}
|
|
@@ -125,7 +126,7 @@ function getProcessData({ pageNo, pSize }, callback) {
|
|
|
getUserProcessed // 办结
|
|
getUserProcessed // 办结
|
|
|
]
|
|
]
|
|
|
requestMap[current.value](params).then(({ returnParams }) => {
|
|
requestMap[current.value](params).then(({ returnParams }) => {
|
|
|
- processes.value = returnParams.list
|
|
|
|
|
|
|
+ // processes.value = returnParams.list
|
|
|
callback(returnParams.list, returnParams.total, pageNo)
|
|
callback(returnParams.list, returnParams.total, pageNo)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -145,7 +146,7 @@ function getProcessPage({ pageNo, pSize }, callback) {
|
|
|
getUserProcessed // 办结
|
|
getUserProcessed // 办结
|
|
|
]
|
|
]
|
|
|
requestMap[current.value](params).then(({ returnParams }) => {
|
|
requestMap[current.value](params).then(({ returnParams }) => {
|
|
|
- processes.value.push(...returnParams.list)
|
|
|
|
|
|
|
+ // processes.value.push(...returnParams.list)
|
|
|
callback(returnParams.list, returnParams.total, pageNo)
|
|
callback(returnParams.list, returnParams.total, pageNo)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|