|
|
@@ -31,8 +31,8 @@
|
|
|
<view class="popup_container">
|
|
|
<uni-popup ref="searchItemPopup" type="bottom">
|
|
|
<uni-list>
|
|
|
- <uni-list-item @click="clickSearchItem(item)" v-for="(item, index) in candidates" :key="index" clickable
|
|
|
- :title="item">
|
|
|
+ <uni-list-item @click="clickSearchItem(item)" v-for="(item, index) in candidates" :key="index"
|
|
|
+ clickable :title="item">
|
|
|
</uni-list-item>
|
|
|
</uni-list>
|
|
|
</uni-popup>
|
|
|
@@ -43,10 +43,13 @@
|
|
|
<script setup lang="ts">
|
|
|
import processList from '@/components/ygoa/processList.vue'
|
|
|
import { onMounted, reactive, ref } from 'vue';
|
|
|
+ import { useUserStore } from '@/store/user';
|
|
|
+ import { getUserProcess, getUserProcessed, getUserProcessing, getUserAllProcess } from '@/api/process';
|
|
|
+ const userStore = useUserStore();
|
|
|
// 分段器选项
|
|
|
const items = reactive(['我的', '待办', '在办', '办结'])
|
|
|
// 待办列表
|
|
|
- let processes = reactive([])
|
|
|
+ const processes = ref([])
|
|
|
// 分段器选项
|
|
|
const current = ref(-1)
|
|
|
|
|
|
@@ -78,59 +81,56 @@
|
|
|
function searchOnBlur(e) { // 搜索栏失去焦点
|
|
|
console.log('searchOnBlur', e);
|
|
|
}
|
|
|
+
|
|
|
+ const params = ref({});
|
|
|
function onClickItem({ currentIndex }) { // 点击分段器选项
|
|
|
current.value = currentIndex
|
|
|
switch (currentIndex) {
|
|
|
case 0: // 我的
|
|
|
+ params.value = {
|
|
|
+ "staffId": userStore.user.useId,
|
|
|
+ "page": 1,
|
|
|
+ "pageNum": 5
|
|
|
+ }
|
|
|
+ getUserAllProcess(params).then(res => {
|
|
|
+ processes.value = res.returnParams.list;
|
|
|
+ });
|
|
|
+ break;
|
|
|
case 1: // 待办
|
|
|
+ params.value = {
|
|
|
+ "staffId": userStore.user.useId,
|
|
|
+ "page": 1,
|
|
|
+ "pageNum": 5,
|
|
|
+ "modelId": "",
|
|
|
+ "control": 1
|
|
|
+ }
|
|
|
+ getUserProcess(params).then(res => {
|
|
|
+ processes.value = res.returnParams.list;
|
|
|
+ });
|
|
|
+ break;
|
|
|
case 2: // 在办
|
|
|
- processes = [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- title: '账户1 的请假申请',
|
|
|
- user: '账户1',
|
|
|
- createTime: '2024/10/10',
|
|
|
- startTime: '2024/10/10',
|
|
|
- endTime: '2024/10/12',
|
|
|
- totalTime: '2',
|
|
|
- description: '请假说明请假说明请假说明请假说明请假说明',
|
|
|
- type: 'icon-apply-leave',
|
|
|
- step: 0
|
|
|
- },
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- title: '账户2 的请假申请',
|
|
|
- user: '账户2',
|
|
|
- createTime: '2024/10/10',
|
|
|
- startTime: '2024/10/10',
|
|
|
- endTime: '2024/10/12',
|
|
|
- totalTime: '2',
|
|
|
- description: '请假说明请假说明',
|
|
|
- type: 'icon-apply-leave',
|
|
|
- step: 0
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- title: '账户2 的加班申请',
|
|
|
- user: '账户2',
|
|
|
- createTime: '2024/10/10',
|
|
|
- startTime: '2024/10/10 17/30/00',
|
|
|
- endTime: '2024/10/10 18/30/00',
|
|
|
- totalTime: '1',
|
|
|
- description: '加班说明加班说明',
|
|
|
- type: 'icon-apply-overtime',
|
|
|
- step: 0
|
|
|
- }
|
|
|
- ]
|
|
|
+ params.value = {
|
|
|
+ "staffId": userStore.user.useId,
|
|
|
+ "page": 1,
|
|
|
+ "pageNum": 5,
|
|
|
+ "modelId": "",
|
|
|
+ "control": 1
|
|
|
+ }
|
|
|
+ getUserProcessing(params).then(res => {
|
|
|
+ processes.value = res.returnParams.list;
|
|
|
+ });
|
|
|
break;
|
|
|
- // case 1:
|
|
|
- // processes = []
|
|
|
- // break;
|
|
|
- // case 2:
|
|
|
- // processes = []
|
|
|
- // break;
|
|
|
case 3: // 办结
|
|
|
- processes = []
|
|
|
+ params.value = {
|
|
|
+ "staffId": userStore.user.useId,
|
|
|
+ "page": 1,
|
|
|
+ "pageNum": 5,
|
|
|
+ "modelId": "",
|
|
|
+ "control": 1
|
|
|
+ }
|
|
|
+ getUserProcessed(params).then(res => {
|
|
|
+ processes.value = res.returnParams.list;
|
|
|
+ });
|
|
|
break;
|
|
|
}
|
|
|
}
|