引入Wot UI组件库
This commit is contained in:
@@ -51,8 +51,8 @@
|
||||
<view class="box"><textarea v-model="comment" placeholder="选填" /></view>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<view class="btn no" @click="audit('reject')">驳回</view>
|
||||
<view class="btn-primary yes" @click="audit('approve')">通过</view>
|
||||
<wd-button plain type="error" @click="audit('reject')">驳回</wd-button>
|
||||
<wd-button type="primary" custom-class="yes" @click="audit('approve')">通过</wd-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -186,6 +186,7 @@ export default {
|
||||
border-top: 1rpx solid #E8ECF2; padding: 16rpx 28rpx calc(16rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
.btns { display: flex; gap: 16rpx; }
|
||||
.btns :deep(.wd-button) { flex: 1; }
|
||||
.btn { flex: 1; height: 88rpx; border-radius: 16rpx; display: flex; align-items: center; justify-content: center; font-size: 30rpx; font-weight: 600; }
|
||||
.no { background: #fff; color: #DC2626; border: 1rpx solid #FECACA; }
|
||||
.yes { flex: 1.4; }
|
||||
|
||||
+10
-9
@@ -3,23 +3,20 @@
|
||||
<fy-header title="待办审批" back />
|
||||
<view v-if="!can" class="deny">当前账号没有审批或申请权限</view>
|
||||
<view v-else>
|
||||
<scroll-view scroll-x class="tabs" :show-scrollbar="false">
|
||||
<text v-for="t in tabs" :key="t.id" class="tab" :class="{ on: tab === t.id }" @click="switchTab(t.id)">{{ t.title }}</text>
|
||||
</scroll-view>
|
||||
<wd-tabs v-model="tab" slidable="always" @change="onTab">
|
||||
<wd-tab v-for="t in tabs" :key="t.id" :title="t.title" :name="t.id" />
|
||||
</wd-tabs>
|
||||
<view v-if="loading" class="empty">
|
||||
<view class="sk" /><view class="sk short" />
|
||||
</view>
|
||||
<view v-else-if="!rows.length" class="empty">
|
||||
<text class="et">暂无事项</text>
|
||||
<text class="es">当前分类下没有需要处理的记录</text>
|
||||
<wd-skeleton theme="paragraph" />
|
||||
</view>
|
||||
<wd-status-tip v-else-if="!rows.length" image="content" tip="暂无事项" />
|
||||
<view v-for="r in rows" :key="r.no || r.id" class="card item" @click="open(r)">
|
||||
<view class="main">
|
||||
<text class="type">{{ r.typeLabel || r.type || '审批' }}</text>
|
||||
<text class="t">{{ r.title || r.no }}</text>
|
||||
<text class="s">{{ r.submitter || r.assigneeName || '' }}</text>
|
||||
</view>
|
||||
<text class="chip">{{ r.status || '待处理' }}</text>
|
||||
<wd-tag type="primary" plain>{{ r.status || '待处理' }}</wd-tag>
|
||||
<text class="arr">›</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -55,6 +52,10 @@ export default {
|
||||
},
|
||||
onShow() { if (this.can) this.load() },
|
||||
methods: {
|
||||
onTab(e) {
|
||||
const id = (e && e.name) || this.tab
|
||||
this.switchTab(id)
|
||||
},
|
||||
switchTab(id) {
|
||||
this.tab = id
|
||||
this.load()
|
||||
|
||||
Reference in New Issue
Block a user