feat(xq0036): 接入钉钉群机器人通知,webhook/加签界面配置

新增 report/notify.py 走 dingtalk_sdk 推送处理汇总与失败/待人工核对明细(分批、状态色、试算标题);plugin.json 增加 dingtalk_sdk 依赖与 push_enabled/robot_webhook/robot_secret 字段;UI 新增「钉钉通知」一行配置区;版本 0.1.8。
This commit is contained in:
2026-11-20 15:45:13 +08:00
parent a2f4e756ae
commit 8cab685d8f
9 changed files with 205 additions and 18 deletions
@@ -81,6 +81,36 @@
</div>
</section>
<!-- 03 钉钉通知 -->
<section class="sec">
<div class="sec-head">
<span class="sec-badge">03</span>
<span class="sec-name">钉钉通知</span>
<span class="sec-line" />
</div>
<div class="sec-body">
<el-form label-position="top">
<div class="grid notify-row">
<el-form-item class="switch-cell" label="钉钉群通知">
<el-switch v-model="form.push_enabled" :disabled="running" />
</el-form-item>
<el-form-item class="webhook-cell" label="机器人 Webhook">
<el-input v-model="form.robot_webhook" :disabled="running || !form.push_enabled"
clearable placeholder="https://oapi.dingtalk.com/robot/send?access_token=..." />
</el-form-item>
<el-form-item class="secret-cell" label="加签密钥(Secret)">
<el-input v-model="form.robot_secret" :disabled="running || !form.push_enabled"
show-password clearable placeholder="安全设置选「加签」时填写,未加签留空" />
</el-form-item>
</div>
<div class="tip">
推送本次处理汇总与<b>失败 / 待人工核对</b>明细(格式由 SDK 统一渲染);试算运行标题带「试算」。
未填 webhook 时不推送,只记日志。
</div>
</el-form>
</div>
</section>
<!-- 规则说明:折叠 -->
<details class="help">
<summary><span>处理规则</span><span class="h-arrow">▾</span></summary>
@@ -126,6 +156,9 @@ const DEFAULTS = () => ({
date_end: '',
dry_run: true,
debug_mode: false,
push_enabled: false,
robot_webhook: '',
robot_secret: '',
})
const {
@@ -171,3 +204,11 @@ async function pickDir() {
}
}
</script>
<style scoped>
/* 钉钉通知:开关 + webhook + 加签密钥排一行(宽度 1 : 3 : 2) */
.notify-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.notify-row .switch-cell { grid-column: span 1; }
.notify-row .webhook-cell { grid-column: span 3; }
.notify-row .secret-cell { grid-column: span 2; }
</style>