feat: 新增续签电子签插件及多插件钉钉通知功能
- 新增 xq0034 续签电子签插件,包含核心流程与钉钉通知能力 - 为 xq0035、xq0008、xq0009、xq0010、xq0011、xq0031_xq0032、xq0037、xq0038、xq0045_xq0046 插件添加钉钉群通知配置 - 优化续签电子签执行结果日志,减少重复名单输出 - 桌面端插件列表新增分页功能,优化长列表展示
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
|
||||
<div class="sc-list card">
|
||||
<button
|
||||
v-for="(p, i) in store.plugins" :key="p.id" class="sc-row"
|
||||
v-for="(p, i) in pagedList" :key="p.id" class="sc-row"
|
||||
:class="{ running: store.running && store.selectedId === p.id }"
|
||||
@click="open(p.id)"
|
||||
>
|
||||
<span class="sc-ic" :style="{ background: grad(i) }">{{ p.name.slice(0, 1) }}</span>
|
||||
<span class="sc-ic" :style="{ background: grad((page - 1) * pageSize + i) }">{{ p.name.slice(0, 1) }}</span>
|
||||
<span class="sc-body">
|
||||
<span class="sc-title">
|
||||
<b>{{ p.name }}</b>
|
||||
@@ -42,13 +42,27 @@
|
||||
<span>请联系管理员在控制面进行授权,授权后点左栏「同步」刷新</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-pagination v-if="store.plugins.length > pageSize" class="sc-pager" small background
|
||||
layout="total, prev, pager, next" :total="store.plugins.length" :page-size="pageSize"
|
||||
:current-page="page" @current-change="(p) => page = p" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { Collection } from '@element-plus/icons-vue'
|
||||
import { store } from '../store'
|
||||
|
||||
// ---- 分页:每页 10 个场景,避免长列表刷屏 ----
|
||||
const page = ref(1)
|
||||
const pageSize = 10
|
||||
const pagedList = computed(() => store.plugins.slice((page.value - 1) * pageSize, page.value * pageSize))
|
||||
// 同步/撤销授权后当前页可能超界,自动回退
|
||||
watch(() => store.plugins.length, (n) => {
|
||||
const max = Math.max(1, Math.ceil(n / pageSize))
|
||||
if (page.value > max) page.value = max
|
||||
})
|
||||
|
||||
const GRADS = [
|
||||
'var(--grad-sky)', 'var(--grad-peach)', 'var(--grad-mint)',
|
||||
'var(--grad-lilac)', 'var(--grad-honey)', 'var(--grad-blush)',
|
||||
@@ -121,4 +135,5 @@ function open(id) {
|
||||
}
|
||||
.sc-empty .empty-emoji { font-size: 26px; }
|
||||
.sc-empty b { color: var(--text-sub); font-size: 13.5px; font-weight: 600; }
|
||||
.sc-pager { justify-content: center; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user