feat: 新增xq0031_xq0032 ERP报表导出插件,完成功能与基建更新

1. 新增xq0031_xq0032插件:包含前后端源码、打包脚本、配置文件与插件元数据
2. 新增内网文件服务器组件:exe、启停脚本、打包脚本与配置
3. 新增敏感凭证RSA加密下发能力与存储结构
4. 新增大文件源管理表与相关API
5. 优化登录流程与会话管理,新增Chrome自动化安装工具链
6. 清理废弃插件与示例代码
7. 更新版本号至1.1.3,完善安装包与.gitignore配置
This commit is contained in:
2026-09-17 12:42:44 +08:00
parent 6d2dd93628
commit f30ab9cc29
105 changed files with 7819 additions and 4276 deletions
@@ -0,0 +1,121 @@
<template>
<div class="page">
<div class="page-head cp-rise">
<div>
<h3>敏感凭证 <span class="badge">Creds</span></h3>
<p>执行机敏感凭证的明文源(钉钉开放平台)。保存后客户端下次启动用 RSA 私钥解密拉取;留空 = 该键不下发</p>
</div>
<el-button :loading="busy" :icon="Refresh" @click="refresh">刷新</el-button>
</div>
<div class="cp-card panel cp-rise">
<el-table :data="rows" v-loading="busy" size="default" style="width: 100%">
<el-table-column prop="account" label="执行机账号" width="150">
<template #default="{ row }">
<span class="mono">{{ row.account }}</span>
</template>
</el-table-column>
<el-table-column label="公钥" width="90">
<template #default="{ row }">
<el-tag :type="row.has_pubkey ? 'success' : 'info'" size="small" effect="light">
{{ row.has_pubkey ? '已上报' : '未上报' }}
</el-tag>
</template>
</el-table-column>
<el-table-column v-for="k in keyCols" :key="k.key" :label="k.label" min-width="170" show-overflow-tooltip>
<template #default="{ row }">
<span class="mono dim" :class="{ empty: !row.creds[k.key] }">{{ row.creds[k.key] || '(未配置)' }}</span>
</template>
</el-table-column>
<el-table-column prop="updated_at" label="更新时间" width="170" />
<el-table-column label="操作" width="90" fixed="right">
<template #default="{ row }">
<el-button link type="primary" :icon="EditPen" @click="openEdit(row)">编辑</el-button>
</template>
</el-table-column>
<template #empty>
<el-empty description="暂无账号,客户端启动注册后自动出现" :image-size="80" />
</template>
</el-table>
</div>
<el-dialog v-model="dlg" :title="`编辑凭证 · ${editing?.account || ''}`" width="540px">
<div class="form">
<div class="fitem" v-for="k in keyCols" :key="k.key">
<label>{{ k.label }} <span class="dim mono">({{ k.key }})</span></label>
<el-input v-model="form[k.key]" :type="k.key.includes('SECRET') ? 'password' : 'text'"
:show-password="k.key.includes('SECRET')" placeholder="留空 = 不下发该键" />
</div>
<p class="tip">值仅管理台可见;保存后客户端下次启动拉取更新(离线用本地加密缓存)。</p>
</div>
<template #footer>
<el-button @click="dlg = false">取消</el-button>
<el-button type="primary" :loading="saving" @click="save">保存</el-button>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { onMounted, ref } from 'vue'
import { Refresh, EditPen } from '@element-plus/icons-vue'
import { ElMessage as message } from 'element-plus'
import { adminCredsList, adminCredsSeed } from '../api'
const KEY_COLS = [
{ key: 'DINGTALK_APPKEY', label: 'AppKey' },
{ key: 'DINGTALK_APPSECRET', label: 'AppSecret' },
{ key: 'DINGTALK_AGENT_ID', label: 'AgentId' },
{ key: 'DINGTALK_CORP_ID', label: 'CorpId' },
]
const keyCols = KEY_COLS
const busy = ref(false)
const rows = ref([])
const dlg = ref(false)
const saving = ref(false)
const editing = ref(null)
const form = ref({})
async function refresh() {
busy.value = true
try {
const r = await adminCredsList()
rows.value = r.accounts || []
} catch (e) { message.error('读取失败:' + (e.message || e)) }
finally { busy.value = false }
}
function openEdit(row) {
editing.value = row
form.value = {}
keyCols.forEach(c => { form.value[c.key] = row.creds?.[c.key] || '' })
dlg.value = true
}
async function save() {
if (!editing.value) return
saving.value = true
try {
const values = {}
keyCols.forEach(c => { if (form.value[c.key]) values[c.key] = String(form.value[c.key]).trim() })
const r = await adminCredsSeed({ account: editing.value.account, values })
message.success(`已保存 ${r.seeded_keys.length} 个键(留空键已清除)`)
dlg.value = false
await refresh()
} catch (e) { message.error('保存失败:' + (e.message || e)) }
finally { saving.value = false }
}
onMounted(refresh)
</script>
<style scoped>
.panel { padding: 22px 24px 26px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.fitem { display: flex; flex-direction: column; gap: 7px; }
.fitem label { font-size: 13px; font-weight: 700; color: var(--cp-ink-1); }
.fitem .dim { font-weight: 500; font-size: 12px; }
.empty { color: var(--cp-ink-3); }
.tip { font-size: 12px; color: var(--cp-ink-3); margin: 2px 0 0; }
</style>