工作台图标
This commit is contained in:
+18
-13
@@ -40,7 +40,9 @@
|
||||
<view v-if="!flows.length" class="empty">暂无可用审批流,请确认账号已开通申请权限</view>
|
||||
<view class="grid">
|
||||
<view v-for="a in flows" :key="a.key" class="app" @click="openFlow(a)">
|
||||
<view class="icon"><text class="mark">{{ mark(a.label) }}</text></view>
|
||||
<view class="icon" :style="{ background: tileOf(a).bg }">
|
||||
<wd-icon :name="tileOf(a).name" size="44rpx" :color="tileOf(a).color" />
|
||||
</view>
|
||||
<text class="al">{{ a.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -52,8 +54,8 @@
|
||||
<view v-if="apps.length" class="card apps">
|
||||
<view class="grid">
|
||||
<view v-for="a in apps" :key="a.id" class="app" @click="open(a)">
|
||||
<view class="icon">
|
||||
<text class="mark">{{ mark(a.title) }}</text>
|
||||
<view class="icon" :style="{ background: tileOf(a).bg }">
|
||||
<wd-icon :name="tileOf(a).name" size="44rpx" :color="tileOf(a).color" />
|
||||
<text v-if="a.badge === 'todo' && todoCount" class="badge abs">{{ todoCount }}</text>
|
||||
</view>
|
||||
<text class="al">{{ a.title }}</text>
|
||||
@@ -66,7 +68,9 @@
|
||||
</view>
|
||||
<view v-if="erp.length" class="card mods">
|
||||
<view v-for="m in erp" :key="m.id" class="mod" @click="open(m)">
|
||||
<view class="mi"><text>{{ mark(m.title) }}</text></view>
|
||||
<view class="mi" :style="{ background: tileOf(m).bg }">
|
||||
<wd-icon :name="tileOf(m).name" size="36rpx" :color="tileOf(m).color" />
|
||||
</view>
|
||||
<text class="mt">{{ m.title }}</text>
|
||||
<text class="arr">›</text>
|
||||
</view>
|
||||
@@ -101,7 +105,7 @@ import { store } from '../../utils/store.js'
|
||||
import { toast } from '../../utils/format.js'
|
||||
import { oaPost } from '../../utils/api.js'
|
||||
import { visibleApplyKinds } from '../../utils/apply.js'
|
||||
import { openHref, tileEmoji } from '../../utils/nav.js'
|
||||
import { openHref, tileVisual } from '../../utils/nav.js'
|
||||
|
||||
export default {
|
||||
components: { FyHeader, FyScroll },
|
||||
@@ -121,7 +125,7 @@ export default {
|
||||
label: s.label || s.title || '入口',
|
||||
desc: s.desc || '',
|
||||
to: s.to || s.path || s.url || '',
|
||||
emoji: tileEmoji(s)
|
||||
emoji: tileVisual(s).name
|
||||
})).filter((s) => s.to)
|
||||
if (fromApi.length) return fromApi
|
||||
const me = store.me || {}
|
||||
@@ -135,7 +139,7 @@ export default {
|
||||
label: k.title,
|
||||
desc: k.hint,
|
||||
to: '/pages/apply/form?kind=' + k.kind,
|
||||
emoji: tileEmoji({ id: k.kind, title: k.title })
|
||||
emoji: tileVisual({ id: k.kind, title: k.title }).name
|
||||
}))
|
||||
},
|
||||
pending() {
|
||||
@@ -189,7 +193,9 @@ export default {
|
||||
else toast('没有发起申请权限')
|
||||
},
|
||||
goTodo() { uni.navigateTo({ url: '/pages/todo/list' }) },
|
||||
mark(s) { return String(s || '应').replace(/\s/g, '').slice(0, 1) },
|
||||
tileOf(item) {
|
||||
return tileVisual(item || {})
|
||||
},
|
||||
pendKey(t) { return t.no || t.id || t.to || t.title },
|
||||
openPending(t) {
|
||||
if (t.source === 'work' || t.taskId) {
|
||||
@@ -239,19 +245,18 @@ export default {
|
||||
.grid { display: flex; flex-wrap: wrap; }
|
||||
.app { width: 25%; display: flex; flex-direction: column; align-items: center; padding: 16rpx 4rpx; box-sizing: border-box; }
|
||||
.icon {
|
||||
width: 88rpx; height: 88rpx; border-radius: 24rpx; background: #F3F6FB;
|
||||
width: 88rpx; height: 88rpx; border-radius: 24rpx; background: #E8F1FF;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
position: relative; margin-bottom: 10rpx;
|
||||
}
|
||||
.mark { font-size: 30rpx; font-weight: 650; color: #1677FF; }
|
||||
.abs { position: absolute; top: -8rpx; right: -8rpx; }
|
||||
.al { font-size: 24rpx; text-align: center; color: #111827; line-height: 1.35; }
|
||||
.mod { display: flex; align-items: center; padding: 22rpx 16rpx; }
|
||||
.mod + .mod { border-top: 1rpx solid #F0F2F5; }
|
||||
.mi {
|
||||
width: 64rpx; height: 64rpx; border-radius: 16rpx; background: #F3F6FB;
|
||||
color: #1677FF; display: flex; align-items: center; justify-content: center;
|
||||
font-weight: 650; margin-right: 16rpx;
|
||||
width: 64rpx; height: 64rpx; border-radius: 16rpx; background: #E8F1FF;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
.mt { flex: 1; font-size: 28rpx; }
|
||||
.todo { display: flex; align-items: center; padding: 24rpx 24rpx; margin-bottom: 16rpx; }
|
||||
|
||||
Reference in New Issue
Block a user