资料档案库完成、去审批页面添加
This commit is contained in:
@@ -51,7 +51,11 @@ const tabChange = (k: string) => {
|
||||
}
|
||||
// 待我审批
|
||||
if(k === "approval"){
|
||||
list.value = resetGrouped([...dataSource.value.todo]);
|
||||
const result = resetGrouped([...dataSource.value.todo]);
|
||||
result.forEach((item: any) => {
|
||||
item.todo = true;
|
||||
})
|
||||
list.value = result;
|
||||
}
|
||||
// 我的申请
|
||||
if(k === "apply"){
|
||||
@@ -65,6 +69,11 @@ const tabChange = (k: string) => {
|
||||
}
|
||||
};
|
||||
|
||||
// 去审批
|
||||
const goApproval = (c: any) => {
|
||||
routerPushByKey("details_approval",{ query: { id: c?.change_id?.toString(),status:c?.status?.toString() || '',key:'my_mytask' } });
|
||||
}
|
||||
|
||||
// 处置申请跳转
|
||||
const jumpTo = (act: string) => {
|
||||
routerPushByKey("details_disposal",{ query: { id: currentRow.value?.change_id?.toString(),type:act } });
|
||||
@@ -72,7 +81,6 @@ const jumpTo = (act: string) => {
|
||||
|
||||
// 打开详情、修改重报
|
||||
const openDetail = (c: any,type:string = '') => {
|
||||
console.log(c)
|
||||
if(type==='detail'){
|
||||
routerPushByKey("details_index",{ query: { id: c?.change_id?.toString(),status:c?.status?.toString() || '',key:'my_mytask' } });
|
||||
}
|
||||
@@ -151,6 +159,9 @@ const getList = async () => {
|
||||
loading.value = true;
|
||||
const {data,error} = await myTasksListApi();
|
||||
if(!error){
|
||||
data?.todo?.forEach((item:any) => {
|
||||
item.todo = true;
|
||||
})
|
||||
dataSource.value = data;
|
||||
tabChange(currentTab.value);
|
||||
// 统计数量
|
||||
@@ -381,6 +392,10 @@ onMounted(() => {
|
||||
<span v-if="c.rejected_at" class="text-11px text-slate-400">驳回于 {{ c.rejected_at.slice(0, 16) }}</span>
|
||||
</div>
|
||||
<!-- 右区 -->
|
||||
<!-- 去审批 -->
|
||||
<div v-if="c.todo" class="flex gap-1.5">
|
||||
<NButton class="text-xs" text type="primary" @click="goApproval(c)">去审批</NButton>
|
||||
</div>
|
||||
<!-- 审批中 -->
|
||||
<div v-if="c.status === 'APPROVING'" class="flex gap-1.5">
|
||||
<NButton class="text-xs" text type="primary" @click="openDetail(c,'detail')">详情</NButton>
|
||||
|
||||
Reference in New Issue
Block a user