|
@@ -39,6 +39,7 @@ import { useRoute } from 'vue-router'
|
|
|
import { showToast } from 'vant'
|
|
import { showToast } from 'vant'
|
|
|
import { fetchOaInstanceDetail } from '../api/oa.js'
|
|
import { fetchOaInstanceDetail } from '../api/oa.js'
|
|
|
import { prepareMobileFormSchema } from '../oa/schema-prep.js'
|
|
import { prepareMobileFormSchema } from '../oa/schema-prep.js'
|
|
|
|
|
+import { statusText, statusTone } from '../oa/status-label.js'
|
|
|
import OaProgressTimeline from '../oa/components/OaProgressTimeline.vue'
|
|
import OaProgressTimeline from '../oa/components/OaProgressTimeline.vue'
|
|
|
import OaPulseLoading from '../oa/components/OaPulseLoading.vue'
|
|
import OaPulseLoading from '../oa/components/OaPulseLoading.vue'
|
|
|
|
|
|
|
@@ -73,28 +74,6 @@ const timelineItems = computed(() => {
|
|
|
}))
|
|
}))
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-/** 实例状态文案(对齐任务说明) */
|
|
|
|
|
-function statusText(s) {
|
|
|
|
|
- const map = {
|
|
|
|
|
- running: '进行中',
|
|
|
|
|
- pending: '进行中',
|
|
|
|
|
- completed: '已完成',
|
|
|
|
|
- approved: '已完成',
|
|
|
|
|
- done: '已完成',
|
|
|
|
|
- rejected: '已拒绝',
|
|
|
|
|
- returned: '已打回',
|
|
|
|
|
- cancelled: '已撤销'
|
|
|
|
|
- }
|
|
|
|
|
- return map[s] || s || ''
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-function statusTone(s) {
|
|
|
|
|
- if (s === 'pending' || s === 'running') return 'warn'
|
|
|
|
|
- if (s === 'approved' || s === 'completed' || s === 'done') return 'ok'
|
|
|
|
|
- if (s === 'rejected' || s === 'cancelled' || s === 'returned') return 'danger'
|
|
|
|
|
- return 'mute'
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/** 通知宿主关闭(对齐 OaStart closeToMini) */
|
|
/** 通知宿主关闭(对齐 OaStart closeToMini) */
|
|
|
function closeToMini(payload) {
|
|
function closeToMini(payload) {
|
|
|
const data = payload || { action: 'oa-detail-close' }
|
|
const data = payload || { action: 'oa-detail-close' }
|