@@ -36,15 +36,13 @@ const jumpTo = (key: string,qid:number = 0) => {
} else if ( key === 'details_closedoc' && qid ) {
routerPushByKey ( key , { query : { id : qid . toString ( ) , key : 'home' } } ) ;
} else if ( key === 'details_index' && qid ) {
routerPushByKey ( "details_index" , { query : { id : qid . toString ( ) , key : 'home' } } ) ;
routerPushByKey ( key , { query : { id : qid . toString ( ) , key : 'home' } } ) ;
} else if ( key === 'details_approval' && qid ) {
routerPushByKey ( key , { query : { id : qid . toString ( ) , key : 'home' } } ) ;
} else {
routerPushByKey ( key as any ) ;
}
}
// 打开审批详情
const openDetail = ( row : any ) => {
routerPushByKey ( "details_approval" , { query : { id : row ? . change _id ? . toString ( ) , status : row ? . status ? . toString ( ) || '' , key : 'home' } } ) ;
} ;
// 获取当前时间字符串
const getCurrentTimeStr = ( ) => {
@@ -163,14 +161,15 @@ onUnmounted(() => {
< div class = "flex justify-between" >
< CountTo
:start-value = "0"
: end -value = " homeData ? .dept_stats ? .reject_count | | 0 "
: end -value = " homeData ? .todo_sign ? .total | | 0 "
class = "text-26px font-600"
: style = "{ color: themeStore.otherColor.error }"
: style = "{ color: homeData?.todo_sign?.overdue_count > 0? themeStore.otherColor.error:themeStore.themeColor }"
/ >
< / div >
< div >
< p class = "text-12px font-600" > 待我会签 < / p >
< p class = "text-12px" : style = "{ color: themeStore.otherColor.error }" > 其中超期 1 项 · 请优先处理 < / p >
< p v-if = "homeData?.todo_sign?.overdue_count > 0" class="text-12px" :style= "{ color: themeStore.otherColor.error }" > 其中超期 {{ homeData ? .todo_sign ? .overdue_count }} 项 · 请优先处理 < / p >
< p v-else class = "text-12px text-slate-400" > 无超期 < / p >
< / div >
< / div >
< / NGi >
@@ -190,7 +189,7 @@ onUnmounted(() => {
< / div >
< div >
< p class = "text-12px font-600" > 本月已会签 < / p >
< p class = "text-12px text-slate-400" > 含驳回 1 起 · 系统自动采集 < / p >
< p class = "text-12px text-slate-400" > 含驳回 { { homeData ? . sign _stats ? . month _rejected || 0 } } 起 · 系统自动采集 < / p >
< / div >
< / div >
< / NGi >
@@ -203,7 +202,7 @@ onUnmounted(() => {
< div class = "flex justify-between" >
< CountTo
:start-value = "0"
: end -value = " homeData ? .dept_stats ? .reject_count | | 0 "
: end -value = " homeData ? .high_risk ? .total | | 0 "
class = "text-26px font-600"
: style = "{ color: themeStore.themeColor }"
/ >
@@ -218,7 +217,7 @@ onUnmounted(() => {
< div
class = "flex-1 bg-[#fff] px-16px py-12px cursor-pointer flex items-center gap-3"
: style = "{ borderRadius: themeStore.themeRadius + 'px' }"
@click ="jumpTo('my_mytask ')"
@click ="jumpTo('professionalstatistics ')"
>
< div class = "flex justify-between" >
< CountTo
@@ -239,7 +238,7 @@ onUnmounted(() => {
< NGrid :x-gap = "16" :y-gap = "16" responsive = "screen" item -responsive >
<!-- 左侧 -- >
< NGi span = "24 s:24 m:24 l:16" >
<!-- 我的变更进度 -- >
<!-- 待我会签 -- >
< NCard :bordered = "false" size = "small" : style = "{ borderRadius: themeStore.themeRadius + 'px' }" >
< div class = "flex items-center justify-between mb-3" >
< div class = "flex items-center gap-2" >
@@ -247,14 +246,14 @@ onUnmounted(() => {
< p class = "text-13px font-700 text-#64749a" > 待我会签 < / p >
< p class = "text-11px text-#94a3b8 mt-2px" > 超期项行内红色标记 · 审批时自动展示专业相关附件 < / p >
< / div >
< NButton v-if = "homeData?.my_changes_progress ?.total > 0" ghost size="small" class="text-xs" @click="jumpTo('my_mytask')" >
< NButton v-if = "homeData?.todo_sign ?.total > 0" ghost size="small" class="text-xs" @click="jumpTo('my_mytask')" >
我的任务
< Icon icon = "formkit:right" class = "size-12px" / >
< / NButton >
< / div >
< div class = "flex flex-col gap-3" >
< template v-if = "homeData?.my_changes_progress ?.total > 0" >
< div v-for = "row in homeData?.my_changes_progress ?.items?.slice(0, 3) || []" :key="row.change_id" @click="openDetail(row )"
< template v-if = "homeData?.todo_sign ?.total > 0" >
< div v-for = "row in homeData?.todo_sign ?.items?.slice(0, 3) || []" :key="row.change_id" @click="jumpTo('details_approval',row.change_id )"
class = "cursor-pointer flex w-full items-center gap-3 border px-3.5 py-2.5 text-left transition hover:border-[var(--hover-border)] hover:bg-[var(--hover-bg)] hover:bg-[#EAF0F9]/40"
: style = "{
borderRadius: themeStore.themeRadius + 'px',
@@ -287,31 +286,24 @@ onUnmounted(() => {
< NTag class = "text-[11px]" v-if = "row.duration_type===2" type="warning" size="small" > 临时 < / NTag >
< NTag class = "text-[11px]" v-else type = "info" size = "small" > 永久 < / NTag >
< span class = "text-xs" : style = "{ color: themeStore.otherColor.error }" > 已超期 3 天 < / span >
< span v-if = "row.overdue_status===2" class="text-xs" :style= "{ color: themeStore.otherColor.error }" > 已超期 {{ row.overdue_days | | 0 }} 天 < / span >
< / div >
< div class = "mt-1 flex items-center gap-2" >
< span class = "min-w-0 flex-1 truncate text-sm font-medium text-slate-800 dark:text-white" > { { row . title } } < / span >
<!-- 状态标签 -- >
< NTag v-if = "row.status==='APPROVING'" size="small" type="warning" > 审批中 < / NTag >
< NTag v-if = "row.status==='APPROVED'" size="small" type="success" > 已通过 < / NTag >
< NTag v-if = "row.status==='IMPLEMENTED'" size="small" type="success" > 待验收 < / NTag >
< NTag v-if = "row.status==='ACCEPTED'" size="small" type="error" > 待关闭 < / NTag >
< NTag v-if = "row.status==='CLOSED'" size="small" type="success" > 已关闭 < / NTag >
< NTag v-if = "row.status==='WITHDRAWN'" size="small" type="error" > 已撤回 < / NTag >
< NTag v-if = "row.status==='REJECTED'" size="small" type="error" > 已驳回 < / NTag >
< NTag v-if = "row.step_name" size="small" type="warning" > 审批 : {{ row.step_name }} < / NTag >
< NButton size = "small" type = "primary" class = "text-xs" >
去审批
< Icon icon = "akar-icons:arrow-right" class = "size-13px ml-1" / >
< / NButton >
< / div >
< div class = "mt-0.5 truncate text-[11px] text-slate-400 flex items-center gap-2" >
< p > 申请人 : { { row . step _name } } < / p >
< p > 申请人 : { { row . applicant _name } } < / p >
< span v-if = "row.apply_time" class="text-[11px] text-slate-400" > {{ row.apply_time ? .slice ( 0 , 10 ) }} < / span >
< / div >
< / div >
< / div >
< NButton dashed type = "primary" size = "small" class = "text-xs" @click ="jumpTo('my_mytask')" >
还有 {{ ( homeData ? .my_changes_progress ? .total - 3 ) > 0 ? ( homeData ? . my _changes _progress ? . total - 3 ) : 0 } } 条 , 前往我的任务查看全部 →
还有 {{ ( homeData ? .todo_sign ? .total - 3 ) > 0 ? ( homeData ? . todo _sign ? . total - 3 ) : 0 } } 条 , 前往我的任务查看全部 →
< / NButton >
< / template >
< template v-else >
@@ -357,14 +349,14 @@ onUnmounted(() => {
< p class = "text-13px font-700 text-#64749a" > 本专业高风险变更 < / p >
< p class = "text-11px text-#94a3b8" > 在办 · 建议重点关注 < / p >
< / div >
< template v-if = "highR isk.length " >
< template v-if = "homeData?. high_r isk?.total > 0 " >
< div class = "space-y-2.5" >
< div v-for = "h in highR isk" :key="h.title " class="rounded-md border border-amber-200 bg-amber-50/60 px-3.5 py-2.5" >
< div v-for = "h in homeData?. high_r isk?.items || [] " :key="h.record_id " class="rounded-md border border-amber-200 bg-amber-50/60 px-3.5 py-2.5" >
< div class = "flex items-center gap-2" >
< span class = "min-w-0 flex-1 truncate text-sm font-medium text-slate-800" > { { h . title } } < / span >
< NButton size = "tiny" ghost type = "warning" class = "text-xs" > 查看分析 < / NButton >
< span class = "min-w-0 flex-1 truncate text-sm font-medium text-slate-800" > { { h . change _title } } < / span >
< NButton size = "tiny" ghost type = "warning" class = "text-xs" @click ="jumpTo('my_highrisk')" > 查看分析 < / NButton >
< / div >
< div class = "mt-1 text-[11px]" : style = "{ color: themeStore.otherColor.warning }" > { { h . why } } < / div >
< div class = "mt-1 text-[11px]" : style = "{ color: themeStore.otherColor.warning }" > { { h . scene } } < / div >
< / div >
< / div >
< / template >
@@ -385,11 +377,11 @@ onUnmounted(() => {
< NProgress
type = "line"
status = "info"
: percentage = "(1.8 / 3) * 100"
: percentage = "((homeData?.sign_stats?.avg_audit_days || 0) / 3) * 100"
:height = "10"
border -radius = " 6px "
>
< span class = "text-xs text-slate-700 font-semibold" > 1.8 天 < / span >
< span class = "text-xs text-slate-700 font-semibold" > { { homeData ? . sign _stats ? . avg _audit _days || 0 } } 天 < / span >
< / NProgress >
< / div >
< div class = "flex items-center gap-2" >
@@ -397,15 +389,15 @@ onUnmounted(() => {
< NProgress
type = "line"
status = "error"
: percentage = "(2.6 / 3) * 100"
: percentage = "((homeData?.sign_stats?.max_audit_days || 0) / 3) * 100"
:height = "10"
border -radius = " 6px "
>
< span class = "text-xs text-slate-700 font-semibold" : style = "{ color: themeStore.otherColor.error }" > 2.6 天 < / span >
< span class = "text-xs text-slate-700 font-semibold" : style = "{ color: themeStore.otherColor.error }" > { { homeData ? . sign _stats ? . max _audit _days || 0 } } 天 < / span >
< / NProgress >
< / div >
< div class = "flex items-center justify-between text-[11px] text-slate-400" >
< span > 会签及时率 < b : style = "{ color: themeStore.otherColor.success }" > 92 % < / b > < / span >
< span > 会签及时率 < b : style = "{ color: themeStore.otherColor.success }" > { { homeData ? . sign _stats ? . timely _rate || 0.92 } } % < / b > < / span >
< span > 目标 2 天内签署 < / span >
< / div >
< / div >