提交
This commit is contained in:
1 parent
3d98104455
commit
0d52442902
76 files changed
+21994
-12642
No files matched your search
@@ -101,6 +101,10 @@ export function fetchOaInstanceDetail(id) {
|
||||
return get(`/web/admin/oa-approval/instances/${encodeURIComponent(id)}`)
|
||||
}
|
||||
|
||||
export function fetchOaInstanceHistory(params) {
|
||||
return get('/web/admin/oa-approval/instances/history', params)
|
||||
}
|
||||
|
||||
export function fetchApproveOaTask(taskId, comment) {
|
||||
return post(`/web/admin/oa-approval/tasks/${encodeURIComponent(taskId)}/approve`, {
|
||||
comment
|
||||
|
||||
@@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from 'vue-router'
|
||||
import FormSink from './views/FormSink.vue'
|
||||
import OaStart from './views/OaStart.vue'
|
||||
import OaDetail from './views/OaDetail.vue'
|
||||
import OaHistory from './views/OaHistory.vue'
|
||||
import OaMpBind from './views/OaMpBind.vue'
|
||||
|
||||
export default createRouter({
|
||||
@@ -13,6 +14,7 @@ export default createRouter({
|
||||
},
|
||||
{ path: '/oa-form-sink', component: FormSink },
|
||||
{ path: '/oa-start', component: OaStart },
|
||||
{ path: '/oa-history', component: OaHistory },
|
||||
{ path: '/oa-detail', component: OaDetail },
|
||||
{ path: '/oa-mp-bind', component: OaMpBind }
|
||||
]
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
class="oa-detail__body"
|
||||
:class="{
|
||||
'oa-detail__body--approve': canApprove,
|
||||
'oa-detail__body--mine-act': (canWithdraw || canCopyRestart) && !canApprove
|
||||
'oa-detail__body--mine-act':
|
||||
(canWithdraw || canCopyRestart || (!hidePrint && showViewFooter)) && !canApprove
|
||||
}"
|
||||
>
|
||||
<div class="oa-detail__stamp-host">
|
||||
@@ -25,6 +26,7 @@
|
||||
<OaProgressTimeline :items="timelineItems" />
|
||||
</div>
|
||||
<footer
|
||||
v-if="canApprove || showViewFooter"
|
||||
class="oa-detail__ft"
|
||||
:class="{
|
||||
'oa-detail__ft--center': !canApprove && !canWithdraw && !canCopyRestart,
|
||||
@@ -59,8 +61,9 @@
|
||||
<OaBtnLoadingInner :loading="acting">同意</OaBtnLoadingInner>
|
||||
</van-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-else-if="showViewFooter">
|
||||
<van-button
|
||||
v-if="!hidePrint"
|
||||
class="oa-detail__btn oa-detail__btn--ghost oa-detail__btn--print oa-btn-loading"
|
||||
:class="{ 'is-loading': printing }"
|
||||
:disabled="acting || printing"
|
||||
@@ -238,11 +241,18 @@ const transferComment = ref('')
|
||||
|
||||
const moreVisible = ref(false)
|
||||
|
||||
const moreActions = computed(() => buildMoreActions(detail.value))
|
||||
const hidePrint = computed(() => String(route.query.from || '').trim() === 'history')
|
||||
|
||||
const moreActions = computed(() => {
|
||||
const list = buildMoreActions(detail.value)
|
||||
if (!hidePrint.value) return list
|
||||
return list.filter((a) => a.key !== 'print')
|
||||
})
|
||||
|
||||
const instanceId = computed(() => String(route.query.instanceId || '').trim())
|
||||
const queryTaskId = computed(() => String(route.query.taskId || '').trim())
|
||||
const wantAutoPrint = computed(() => {
|
||||
if (hidePrint.value) return false
|
||||
const v = String(route.query.autoPrint || '').trim()
|
||||
return v === '1' || v === 'true'
|
||||
})
|
||||
@@ -326,6 +336,12 @@ const canCopyRestart = computed(() => {
|
||||
return ['returned', 'cancelled', 'rejected'].includes(String(detail.value.status || ''))
|
||||
})
|
||||
|
||||
/** 只读底栏:历史入口不展示打印;无其它动作时整栏隐藏 */
|
||||
const showViewFooter = computed(() => {
|
||||
if (canWithdraw.value || canCopyRestart.value) return true
|
||||
return !hidePrint.value
|
||||
})
|
||||
|
||||
/** 转交:排除自己 + 本节点已有 pending approval 的办理人 */
|
||||
const transferExcludeIds = computed(() => {
|
||||
const me = currentUserId.value
|
||||
|
||||
@@ -0,0 +1,613 @@
|
||||
<template>
|
||||
<div class="oa-history">
|
||||
<div v-if="canViewAll" class="oa-history__toolbar">
|
||||
<div class="search-box" :class="{ 'is-focus': searchFocused }">
|
||||
<span class="search-ico" aria-hidden="true" />
|
||||
<input
|
||||
v-model="initiatorName"
|
||||
class="search-input"
|
||||
type="search"
|
||||
enterkeyhint="search"
|
||||
placeholder="搜索申请人"
|
||||
@focus="searchFocused = true"
|
||||
@blur="searchFocused = false"
|
||||
@keyup.enter="onSearch"
|
||||
/>
|
||||
<button
|
||||
v-if="initiatorName"
|
||||
type="button"
|
||||
class="search-clear"
|
||||
aria-label="清空"
|
||||
@click="clearSearch"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="loading && !list.length" class="state state-loading">
|
||||
<div class="pulse-dots" aria-hidden="true">
|
||||
<span class="pulse-dot" />
|
||||
<span class="pulse-dot" />
|
||||
<span class="pulse-dot" />
|
||||
</div>
|
||||
<p class="state-loading__text">加载历史记录…</p>
|
||||
</div>
|
||||
|
||||
<div v-else-if="!list.length" class="oa-empty-wrap">
|
||||
<van-empty
|
||||
:description="initiatorName ? '未找到相关记录' : '暂无历史记录'"
|
||||
:image-size="80"
|
||||
/>
|
||||
<p class="oa-empty-tip">
|
||||
{{
|
||||
initiatorName
|
||||
? '试试其他申请人,或清空搜索'
|
||||
: '该流程暂无发起记录'
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div v-else ref="listEl" class="pending-list" @scroll="onScroll">
|
||||
<div
|
||||
v-for="(row, idx) in list"
|
||||
:key="row.id"
|
||||
class="dd-card"
|
||||
@click="openDetail(row)"
|
||||
>
|
||||
<div class="dd-card__corner" aria-hidden="true">
|
||||
<span class="dd-card__corner-num">{{ cornerIndex(idx) }}</span>
|
||||
</div>
|
||||
<div class="dd-card__head">
|
||||
<span class="dd-card__title">{{ cardTitle(row) }}</span>
|
||||
<span class="dd-card__time">{{
|
||||
formatRelativeTime(row.applyTime || row.createTime)
|
||||
}}</span>
|
||||
</div>
|
||||
<div v-if="metaLines(row).length" class="dd-card__meta">
|
||||
<span
|
||||
v-for="(line, i) in metaLines(row)"
|
||||
:key="i"
|
||||
class="dd-card__meta-line"
|
||||
>
|
||||
{{ line }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="dd-card__foot">
|
||||
<span
|
||||
class="dd-card__hint-tag"
|
||||
:class="'is-' + statusToneClass(row)"
|
||||
>
|
||||
{{ hintText(row) }}
|
||||
</span>
|
||||
<span
|
||||
class="dd-card__status"
|
||||
:class="'is-' + statusToneClass(row)"
|
||||
>
|
||||
{{ statusText(row.instanceStatus || row.status) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="loadingMore" class="oa-task-list__end">加载更多…</div>
|
||||
<div v-else-if="!hasMore" class="oa-task-list__end">已经到底了</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { showToast } from 'vant'
|
||||
import { fetchOaInstanceHistory } from '../api/oa.js'
|
||||
import { statusText, statusTone } from '../oa/status-label.js'
|
||||
|
||||
const PAGE_SIZE = 10
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
const appId = computed(() => String(route.query.appId || '').trim())
|
||||
const appName = computed(() => String(route.query.appName || '').trim())
|
||||
const pageTitle = computed(() =>
|
||||
appName.value ? `历史记录 · ${appName.value}` : '历史记录'
|
||||
)
|
||||
|
||||
const list = ref([])
|
||||
const page = ref(1)
|
||||
const total = ref(0)
|
||||
const loading = ref(false)
|
||||
const loadingMore = ref(false)
|
||||
const hasMore = ref(true)
|
||||
const canViewAll = ref(false)
|
||||
const initiatorName = ref('')
|
||||
const searchFocused = ref(false)
|
||||
const listEl = ref(null)
|
||||
|
||||
function formatCornerIndex(n) {
|
||||
const i = Math.floor(Number(n))
|
||||
if (!Number.isFinite(i) || i < 1) return '01'
|
||||
return i < 10 ? `0${i}` : String(i)
|
||||
}
|
||||
|
||||
function cornerIndex(idx) {
|
||||
return formatCornerIndex(Number(idx) + 1)
|
||||
}
|
||||
|
||||
function cardTitle(row) {
|
||||
return (row && (row.title || row.appName || appName.value)) || '-'
|
||||
}
|
||||
|
||||
function statusToneClass(row) {
|
||||
const s = String((row && (row.instanceStatus || row.status)) || '')
|
||||
const tone = statusTone(s)
|
||||
if (tone === 'warn') return 'warn'
|
||||
if (tone === 'ok') return 'success'
|
||||
if (tone === 'danger') return 'danger'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
function hintText(row) {
|
||||
const status = String((row && (row.instanceStatus || row.status)) || '')
|
||||
const names = String((row && row.currentApproverNames) || '').trim()
|
||||
const inProgress = status === 'pending' || status === 'running'
|
||||
if (inProgress && names && names !== '-') {
|
||||
return `待${names}处理`
|
||||
}
|
||||
const node = String((row && row.currentNodeName) || '').trim()
|
||||
if (node && node !== '-') return node
|
||||
const initiator = String((row && row.initiatorUserName) || '').trim()
|
||||
if (initiator) return initiator
|
||||
return '历史记录'
|
||||
}
|
||||
|
||||
function metaLines(row) {
|
||||
const lines = []
|
||||
const initiator = String((row && row.initiatorUserName) || '').trim()
|
||||
if (canViewAll.value && initiator) {
|
||||
lines.push(`申请人:${initiator}`)
|
||||
}
|
||||
const fields = (row && row.previewFields) || []
|
||||
for (let i = 0; i < fields.length && lines.length < 3; i++) {
|
||||
const f = fields[i] || {}
|
||||
const label = String(f.label || '').trim() || '字段'
|
||||
const value =
|
||||
f.value != null && String(f.value).trim() !== '' ? String(f.value) : '-'
|
||||
lines.push(`${label}:${value}`)
|
||||
}
|
||||
return lines
|
||||
}
|
||||
|
||||
function parseDateTime(str) {
|
||||
if (!str) return null
|
||||
const s = String(str).trim().replace(/-/g, '/')
|
||||
const d = new Date(s)
|
||||
return Number.isNaN(d.getTime()) ? null : d
|
||||
}
|
||||
|
||||
function pad2(n) {
|
||||
return n < 10 ? `0${n}` : String(n)
|
||||
}
|
||||
|
||||
function formatRelativeTime(str) {
|
||||
const d = parseDateTime(str)
|
||||
if (!d) return str || '-'
|
||||
const now = new Date()
|
||||
const startToday = new Date(now.getFullYear(), now.getMonth(), now.getDate())
|
||||
const startThat = new Date(d.getFullYear(), d.getMonth(), d.getDate())
|
||||
const diffDay = Math.round((startToday - startThat) / 86400000)
|
||||
const hm = `${pad2(d.getHours())}:${pad2(d.getMinutes())}`
|
||||
if (diffDay === 0) return `今天 ${hm}`
|
||||
if (diffDay === 1) return `昨天 ${hm}`
|
||||
if (d.getFullYear() === now.getFullYear()) {
|
||||
return `${pad2(d.getMonth() + 1)}-${pad2(d.getDate())} ${hm}`
|
||||
}
|
||||
return `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}`
|
||||
}
|
||||
|
||||
function openDetail(row) {
|
||||
const instanceId = String((row && (row.id || row.instanceId)) || '').trim()
|
||||
if (!instanceId) {
|
||||
showToast('缺少审批 ID')
|
||||
return
|
||||
}
|
||||
const q = { instanceId, from: 'history' }
|
||||
const token = String(route.query.token || '').trim()
|
||||
const returnPath = String(route.query.returnPath || '').trim()
|
||||
if (token) q.token = token
|
||||
if (returnPath) q.returnPath = returnPath
|
||||
router.push({ path: '/oa-detail', query: q })
|
||||
}
|
||||
|
||||
async function loadList(reset) {
|
||||
if (!appId.value) {
|
||||
showToast('缺少流程信息')
|
||||
return
|
||||
}
|
||||
const isReset = !!reset
|
||||
if (isReset) {
|
||||
page.value = 1
|
||||
hasMore.value = true
|
||||
loading.value = true
|
||||
} else {
|
||||
if (!hasMore.value || loadingMore.value || loading.value) return
|
||||
loadingMore.value = true
|
||||
}
|
||||
try {
|
||||
const params = {
|
||||
appId: appId.value,
|
||||
page: page.value,
|
||||
pageSize: PAGE_SIZE
|
||||
}
|
||||
const name = initiatorName.value.trim()
|
||||
if (name) params.initiatorName = name
|
||||
const res = await fetchOaInstanceHistory(params)
|
||||
if (typeof res?.canViewAll === 'boolean') {
|
||||
canViewAll.value = res.canViewAll
|
||||
}
|
||||
const rows = res?.list || []
|
||||
const t = res?.total != null ? Number(res.total) : 0
|
||||
total.value = t
|
||||
if (isReset) list.value = rows
|
||||
else list.value = list.value.concat(rows)
|
||||
const loaded = list.value.length
|
||||
hasMore.value = loaded < t && rows.length > 0
|
||||
if (rows.length > 0) page.value += 1
|
||||
} catch (e) {
|
||||
if (isReset) list.value = []
|
||||
showToast(e?.message || '加载失败')
|
||||
} finally {
|
||||
loading.value = false
|
||||
loadingMore.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
void loadList(true)
|
||||
}
|
||||
|
||||
function clearSearch() {
|
||||
initiatorName.value = ''
|
||||
void loadList(true)
|
||||
}
|
||||
|
||||
function onScroll(e) {
|
||||
const el = e?.target
|
||||
if (!el || !hasMore.value || loading.value || loadingMore.value) return
|
||||
if (el.scrollTop + el.clientHeight >= el.scrollHeight - 48) {
|
||||
void loadList(false)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
document.title = pageTitle.value
|
||||
void loadList(true)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.oa-history {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background: #f5f6f8;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.oa-history__toolbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 15;
|
||||
padding: 8px 12px;
|
||||
padding-top: calc(8px + env(safe-area-inset-top));
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
height: 36px;
|
||||
padding: 0 12px;
|
||||
background: #fafafa;
|
||||
border: 1px solid #e8eaed;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
transition:
|
||||
border-color 0.15s,
|
||||
background 0.15s,
|
||||
box-shadow 0.15s;
|
||||
}
|
||||
|
||||
.search-box.is-focus {
|
||||
background: #fff;
|
||||
border-color: #cbd5e1;
|
||||
box-shadow: 0 0 0 3px rgb(148 163 184 / 18%);
|
||||
}
|
||||
|
||||
.search-ico {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
border: 1.5px solid #94a3b8;
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.search-ico::after {
|
||||
position: absolute;
|
||||
right: -4px;
|
||||
bottom: -3px;
|
||||
width: 6px;
|
||||
height: 1.5px;
|
||||
content: '';
|
||||
background: #94a3b8;
|
||||
border-radius: 2px;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
height: 36px;
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
color: #1f2937;
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.search-clear {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
color: #6b7280;
|
||||
cursor: pointer;
|
||||
background: #e5e7eb;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.pending-list {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
min-height: 0;
|
||||
padding: 10px 12px 24px;
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dd-card {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 14px 14px 12px 42px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 10px rgb(15 23 42 / 4%);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dd-card:active {
|
||||
opacity: 0.92;
|
||||
}
|
||||
|
||||
.dd-card__corner {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
pointer-events: none;
|
||||
background: #0a9f6d;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 2px 6px rgb(10 159 109 / 28%);
|
||||
}
|
||||
|
||||
.dd-card__corner-num {
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.dd-card__head {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.dd-card__title {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
line-height: 1.4;
|
||||
color: #1f2329;
|
||||
}
|
||||
|
||||
.dd-card__time {
|
||||
flex-shrink: 0;
|
||||
padding-top: 2px;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
color: #8f959e;
|
||||
}
|
||||
|
||||
.dd-card__meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.dd-card__meta-line {
|
||||
overflow: hidden;
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
color: #8f959e;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dd-card__foot {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.dd-card__hint-tag {
|
||||
flex: 0 1 auto;
|
||||
max-width: 70%;
|
||||
min-width: 0;
|
||||
padding: 4px 9px;
|
||||
overflow: hidden;
|
||||
font-size: 11px;
|
||||
font-weight: 650;
|
||||
line-height: 1.2;
|
||||
color: #d97706;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
background: rgb(217 119 6 / 12%);
|
||||
border-radius: 999px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dd-card__hint-tag.is-warn {
|
||||
color: #d97706;
|
||||
background: rgb(217 119 6 / 12%);
|
||||
}
|
||||
|
||||
.dd-card__hint-tag.is-success {
|
||||
color: #0a9f6d;
|
||||
background: rgb(10 159 109 / 12%);
|
||||
}
|
||||
|
||||
.dd-card__hint-tag.is-danger {
|
||||
color: #ef4444;
|
||||
background: rgb(239 68 68 / 12%);
|
||||
}
|
||||
|
||||
.dd-card__hint-tag.is-info {
|
||||
color: #646a73;
|
||||
background: rgb(100 106 115 / 12%);
|
||||
}
|
||||
|
||||
.dd-card__status {
|
||||
flex-shrink: 0;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #d97706;
|
||||
}
|
||||
|
||||
.dd-card__status.is-warn {
|
||||
color: #d97706;
|
||||
}
|
||||
|
||||
.dd-card__status.is-success {
|
||||
color: #0a9f6d;
|
||||
}
|
||||
|
||||
.dd-card__status.is-danger {
|
||||
color: #ef4444;
|
||||
}
|
||||
|
||||
.dd-card__status.is-info {
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.oa-task-list__end {
|
||||
padding: 12px 0 8px;
|
||||
font-size: 12px;
|
||||
color: #94a3b8;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.state {
|
||||
padding: 40px 12px;
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.state-loading {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 50vh;
|
||||
padding: 48px 16px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.pulse-dots {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pulse-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
background: #0a9f6d;
|
||||
border-radius: 50%;
|
||||
animation: oa-pulse-bounce 1.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.pulse-dot:nth-child(2) {
|
||||
opacity: 0.75;
|
||||
animation-delay: 0.15s;
|
||||
}
|
||||
|
||||
.pulse-dot:nth-child(3) {
|
||||
opacity: 0.55;
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
|
||||
.state-loading__text {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
color: #5f7a6d;
|
||||
}
|
||||
|
||||
.oa-empty-wrap {
|
||||
padding: 48px 16px 24px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.oa-empty-tip {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
color: #94a3b8;
|
||||
}
|
||||
|
||||
@keyframes oa-pulse-bounce {
|
||||
0%,
|
||||
80%,
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
40% {
|
||||
transform: translateY(-6px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -40,8 +40,8 @@
|
||||
/>
|
||||
</div>
|
||||
<footer class="oa-start__ft">
|
||||
<van-button class="oa-start__btn oa-start__btn--cancel" @click="onCancel">
|
||||
取消
|
||||
<van-button class="oa-start__btn oa-start__btn--history" @click="onHistory">
|
||||
历史记录
|
||||
</van-button>
|
||||
<van-button
|
||||
class="oa-start__btn oa-start__btn--draft oa-btn-loading"
|
||||
@@ -741,8 +741,21 @@ async function bootstrap() {
|
||||
}
|
||||
}
|
||||
|
||||
function onCancel() {
|
||||
closeToMini({ action: 'oa-start-cancel' })
|
||||
function onHistory() {
|
||||
const appId = String(appMeta.value?.id || '').trim()
|
||||
if (!appId) {
|
||||
showToast('缺少流程信息')
|
||||
return
|
||||
}
|
||||
const q = {
|
||||
appId,
|
||||
appName: String(appMeta.value?.appName || '').trim() || undefined
|
||||
}
|
||||
const token = String(route.query.token || '').trim()
|
||||
const returnPath = String(route.query.returnPath || '').trim()
|
||||
if (token) q.token = token
|
||||
if (returnPath) q.returnPath = returnPath
|
||||
router.push({ path: '/oa-history', query: q })
|
||||
}
|
||||
|
||||
async function saveDraft() {
|
||||
@@ -919,10 +932,10 @@ onUnmounted(() => {
|
||||
border-radius: 12px !important;
|
||||
font-size: 15px;
|
||||
}
|
||||
.oa-start__btn--cancel {
|
||||
.oa-start__btn--history {
|
||||
flex: 0 0 auto;
|
||||
height: 44px;
|
||||
padding: 0 10px !important;
|
||||
padding: 0 8px !important;
|
||||
border: none !important;
|
||||
background: transparent !important;
|
||||
color: #94a3b8 !important;
|
||||
@@ -930,7 +943,7 @@ onUnmounted(() => {
|
||||
font-size: 14px;
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
.oa-start__btn--cancel:active {
|
||||
.oa-start__btn--history:active {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.oa-start__btn--draft {
|
||||
|
||||
Reference in new issue
Block a user