feat: 新增续签电子签插件及多插件钉钉通知功能
- 新增 xq0034 续签电子签插件,包含核心流程与钉钉通知能力 - 为 xq0035、xq0008、xq0009、xq0010、xq0011、xq0031_xq0032、xq0037、xq0038、xq0045_xq0046 插件添加钉钉群通知配置 - 优化续签电子签执行结果日志,减少重复名单输出 - 桌面端插件列表新增分页功能,优化长列表展示
This commit is contained in:
@@ -16,25 +16,27 @@
|
||||
<!-- 时间队列:按下次执行时间组织的任务行(替代生硬表格) -->
|
||||
<div v-else class="sched-wrap">
|
||||
<div class="sched-list card">
|
||||
<div v-for="row in pagedList" :key="row.id" class="sched-row">
|
||||
<div class="sr-when">
|
||||
<div v-for="row in pagedList" :key="row.id" class="sched-row" :class="{ off: !row.enabled }">
|
||||
<div class="sr-when" :class="{ today: nextWhen(row).today }">
|
||||
<b>{{ nextWhen(row).main }}</b>
|
||||
<span>{{ nextWhen(row).sub }}</span>
|
||||
</div>
|
||||
<div class="sr-main">
|
||||
<b>{{ row.name }}</b>
|
||||
<b>{{ row.name }}<em v-if="!row.enabled" class="off-pill">停用</em></b>
|
||||
<span>{{ pluginName(row.plugin_id) }}</span>
|
||||
</div>
|
||||
<code class="cron-chip">{{ row.cron }}</code>
|
||||
<div class="sr-last" :class="row.last_status === 'ok' ? 'ok' : (row.last_status === 'error' ? 'err' : '')">
|
||||
<div class="sr-last">
|
||||
<template v-if="row.last_run_at">
|
||||
<span>上次 {{ fmtShort(row.last_run_at) }}</span>
|
||||
<span class="st2">
|
||||
<template v-if="row.last_status === 'ok'">✓ 成功<template v-if="row.last_duration"> · {{ row.last_duration }}s</template></template>
|
||||
<template v-else-if="row.last_status === 'error'">✕ 失败</template>
|
||||
<span class="st-pill" :class="row.last_status === 'ok' ? 'ok' : (row.last_status === 'error' ? 'err' : 'mid')">
|
||||
<i class="dot"></i>
|
||||
<template v-if="row.last_status === 'ok'">成功<template v-if="row.last_duration"> · {{ row.last_duration }}s</template></template>
|
||||
<template v-else-if="row.last_status === 'error'">失败</template>
|
||||
<template v-else>执行中</template>
|
||||
</span>
|
||||
<span class="sr-last-time">上次 {{ fmtShort(row.last_run_at) }}</span>
|
||||
</template>
|
||||
<span v-else class="st2 none">从未执行</span>
|
||||
<span v-else class="st-pill none"><i class="dot"></i>从未执行</span>
|
||||
</div>
|
||||
<div class="sr-acts">
|
||||
<el-switch :model-value="row.enabled" size="small" @change="(v) => onToggle(row, v)" />
|
||||
@@ -44,7 +46,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-pagination v-if="list.length > pageSize" class="sched-pager" small background
|
||||
layout="prev, pager, next" :total="list.length" :page-size="pageSize"
|
||||
layout="total, prev, pager, next" :total="list.length" :page-size="pageSize"
|
||||
:current-page="page" @current-change="(p) => page = p" />
|
||||
</div>
|
||||
|
||||
@@ -61,10 +63,13 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.plugin_id" label="执行配置">
|
||||
<el-select v-model="cfgSel" class="w-full" placeholder="插件当前配置">
|
||||
<el-option label="插件当前配置" value="" />
|
||||
<el-option v-for="c in configs" :key="c.id" :value="c.id" :label="c.name" />
|
||||
</el-select>
|
||||
<div class="w-full">
|
||||
<el-select v-model="cfgSel" class="w-full" placeholder="插件当前配置">
|
||||
<el-option label="插件当前配置" value="" />
|
||||
<el-option v-for="c in configs" :key="c.id" :value="c.id" :label="c.name" />
|
||||
</el-select>
|
||||
<div class="cfg-tip">到点自动执行该场景,使用<b>所选方案</b>的最新参数(方案更新自动跟随);方案在插件界面内保存维护;不选 = 使用插件当前保存的配置</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="触发时间">
|
||||
<div class="freq-zone">
|
||||
@@ -130,10 +135,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<!-- 参数引用插件界面维护的多配置方案:到点自动取所选方案的最新参数(方案更新自动跟随) -->
|
||||
<el-form-item label="执行配置">
|
||||
<span class="params-tip">到点自动执行该场景,使用上方<b>所选方案</b>的最新参数;方案在插件界面内保存维护(同名覆盖);不选 = 使用插件当前保存的配置</span>
|
||||
</el-form-item>
|
||||
<!-- 配置方案说明已并入上方「执行配置」选择器下方提示 -->
|
||||
<el-form-item label="启用">
|
||||
<el-switch v-model="form.enabled" />
|
||||
</el-form-item>
|
||||
@@ -161,7 +163,7 @@ const preset = ref('')
|
||||
|
||||
// ---- 列表分页:任务多时避免长列表刷屏 ----
|
||||
const page = ref(1)
|
||||
const pageSize = 8
|
||||
const pageSize = 10
|
||||
const pagedList = computed(() => list.value.slice((page.value - 1) * pageSize, page.value * pageSize))
|
||||
// 删除/清空后当前页可能超界,自动回退
|
||||
watch(() => list.value.length, (n) => {
|
||||
@@ -276,7 +278,7 @@ function nextWhen(row) {
|
||||
else if (diffDay === 1) main = '明天 ' + hm
|
||||
else if (diffDay === -1) main = '昨天 ' + hm
|
||||
else main = md + ' ' + hm
|
||||
return { main, sub: md + ' ' + week }
|
||||
return { main, sub: md + ' ' + week, today: diffDay === 0 }
|
||||
}
|
||||
|
||||
// 最近执行时间简写(MM-DD HH:mm)
|
||||
@@ -470,29 +472,46 @@ load()
|
||||
.sched-list { display: flex; flex-direction: column; overflow: hidden; }
|
||||
.sched-row {
|
||||
display: flex; align-items: center; gap: 14px;
|
||||
padding: 12px 16px;
|
||||
padding: 13px 16px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
transition: background .13s;
|
||||
}
|
||||
.sched-row:last-child { border-bottom: none; }
|
||||
.sched-row:hover { background: var(--surface-2); }
|
||||
.sr-when { width: 108px; flex-shrink: 0; }
|
||||
.sr-when b { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
|
||||
.sr-when { width: 112px; flex-shrink: 0; }
|
||||
.sr-when b { display: block; font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.25; }
|
||||
.sr-when.today b { color: var(--primary); }
|
||||
.sr-when span { font-size: 10.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
|
||||
.sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
|
||||
.sr-main b { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.sr-main b { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.sr-main span { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.sched-row.off .sr-when, .sched-row.off .sr-main span, .sched-row.off .cron-chip { opacity: .55; }
|
||||
.off-pill {
|
||||
flex-shrink: 0; font-style: normal; font-size: 10px; font-weight: 600;
|
||||
color: var(--text-faint); background: var(--surface-2);
|
||||
border: 1px solid var(--border); border-radius: 999px;
|
||||
padding: 0 7px; line-height: 17px;
|
||||
}
|
||||
.cron-chip {
|
||||
flex-shrink: 0;
|
||||
font-family: var(--mono); font-size: 11px; color: var(--primary);
|
||||
background: var(--primary-weak); border: 1px solid rgba(var(--primary-rgb), .3);
|
||||
border-radius: 6px; padding: 2px 8px;
|
||||
}
|
||||
.sr-last { width: 150px; flex-shrink: 0; display: flex; flex-direction: column; gap: 1px; font-size: 11px; color: var(--text-faint); }
|
||||
.sr-last .st2 { font-size: 10.5px; }
|
||||
.sr-last.ok .st2 { color: var(--ok); }
|
||||
.sr-last.err .st2 { color: var(--err); }
|
||||
.sr-last .st2.none { color: var(--text-faint); }
|
||||
.sr-last { width: 150px; flex-shrink: 0; display: flex; flex-direction: column; gap: 3px; }
|
||||
.st-pill {
|
||||
display: inline-flex; align-items: center; gap: 5px; width: fit-content;
|
||||
padding: 1px 9px; border-radius: 999px;
|
||||
font-size: 10.5px; font-weight: 600; line-height: 17px;
|
||||
background: var(--surface-2); color: var(--text-faint);
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
.st-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
|
||||
.st-pill.ok { color: var(--ok); background: var(--ok-weak); border-color: transparent; }
|
||||
.st-pill.err { color: var(--err); background: var(--err-weak); border-color: transparent; }
|
||||
.st-pill.mid { color: var(--primary); background: var(--primary-weak); border-color: transparent; }
|
||||
.st-pill.none { color: var(--text-faint); }
|
||||
.sr-last-time { font-size: 10.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
|
||||
.sr-acts { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
|
||||
.sr-acts .el-button + .el-button { margin-left: 0; }
|
||||
.sched-pager { justify-content: center; }
|
||||
@@ -585,12 +604,11 @@ load()
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.params-tip {
|
||||
font-size: 12.5px; color: var(--text-sub); line-height: 1.7;
|
||||
background: var(--surface-2); border: 1px solid var(--border);
|
||||
border-radius: 10px; padding: 9px 13px; width: 100%;
|
||||
.cfg-tip {
|
||||
font-size: 11.5px; color: var(--text-faint); line-height: 1.6;
|
||||
margin-top: 6px;
|
||||
}
|
||||
.params-tip b { color: var(--primary); font-weight: 600; }
|
||||
.cfg-tip b { color: var(--primary); font-weight: 600; }
|
||||
|
||||
.w-full {
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user