feat: 任务发布到企微客户群(企业群发)与资源库单条新增
- 任务中心新增「发布到企微群」:同步客户群清单(wecom_group_chats)、 按群主分组创建企业群发任务(add_msg_template)、发送记录落库 wecom_group_pushes,迁移 mysql/0009;lib/wecom-client.ts 补 listCustomerGroupChats/createGroupMsgTemplate - KOC 资源库支持单条新增:app/api/resources-insert + lib/resource-write, 拆出资源写入公共逻辑供导入复用;0008 补合作方外部联系人字段 - 环境变量示例补企微凭证与 SEED_DEMO_DATA;next.config 增加 allowedDevOrigins;CLAUDE.md 补充项目说明 - .gitignore 排除 .codegraph/ 与 .ipynb_checkpoints/
This commit is contained in:
436
app/globals.css
436
app/globals.css
@@ -984,7 +984,8 @@ a {
|
||||
|
||||
.workflow-panel,
|
||||
.task-mini-panel,
|
||||
.table-panel {
|
||||
.table-panel,
|
||||
.wecom-status-panel {
|
||||
padding: 21px;
|
||||
}
|
||||
|
||||
@@ -1358,6 +1359,406 @@ a {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.wecom-status-panel .wecom-status-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.wecom-status-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding: 14px 16px;
|
||||
border-radius: 12px;
|
||||
background: #f4f8f5;
|
||||
border: 1px solid #e2ebe4;
|
||||
}
|
||||
|
||||
.wecom-status-card span {
|
||||
color: #687773;
|
||||
font-size: 10px;
|
||||
font-weight: 620;
|
||||
}
|
||||
|
||||
.wecom-status-card strong {
|
||||
font-size: 15px;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.wecom-status-card small {
|
||||
color: #9aa39f;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.wecom-status-card.ok {
|
||||
background: #eaf6ee;
|
||||
border-color: #c5e4cf;
|
||||
}
|
||||
|
||||
.wecom-status-card.ok strong {
|
||||
color: var(--green-deep);
|
||||
}
|
||||
|
||||
.wecom-status-card.off {
|
||||
background: #fdf2ee;
|
||||
border-color: #f3d4c4;
|
||||
}
|
||||
|
||||
.wecom-status-card.off strong {
|
||||
color: #c4622b;
|
||||
}
|
||||
|
||||
.wecom-status-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.wecom-status-hint {
|
||||
margin: 0;
|
||||
color: #9aa39f;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.wecom-status-hint code {
|
||||
padding: 1px 5px;
|
||||
border-radius: 4px;
|
||||
background: #eef2ef;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.partner-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.partner-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 0.6fr 1.4fr auto;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 9px;
|
||||
background: #fbfcfb;
|
||||
border: 1px solid #e8ece8;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.partner-row.head {
|
||||
background: #f1f4f2;
|
||||
color: #687773;
|
||||
font-weight: 620;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.partner-row.head span:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.partner-row.empty {
|
||||
justify-content: center;
|
||||
color: #9aa39f;
|
||||
font-size: 11px;
|
||||
padding: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.partner-external-cell {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.partner-external-cell input,
|
||||
.partner-external-cell code {
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.partner-external-cell code {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
padding: 4px 8px;
|
||||
background: #eef2ef;
|
||||
border-radius: 6px;
|
||||
color: #556861;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.partner-actions {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
min-width: 228px;
|
||||
}
|
||||
|
||||
.partner-actions .ghost-button,
|
||||
.partner-actions .primary-button {
|
||||
min-height: 28px;
|
||||
padding: 0 10px;
|
||||
border-radius: 7px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.wecom-picker-modal {
|
||||
width: min(640px, 100%);
|
||||
}
|
||||
|
||||
.wecom-picker-modal .import-guide-strip {
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.wecom-picker-search {
|
||||
flex: 1 1 220px;
|
||||
min-width: 180px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid rgb(20 40 34 / 0.16);
|
||||
border-radius: 10px;
|
||||
font-size: 13px;
|
||||
background: white;
|
||||
color: rgb(20 40 34);
|
||||
}
|
||||
|
||||
.wecom-picker-cache-hint {
|
||||
color: rgb(20 40 34 / 0.5);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.wecom-picker-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
margin-top: 12px;
|
||||
max-height: 48vh;
|
||||
overflow-y: auto;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.wecom-picker-empty {
|
||||
padding: 28px 12px;
|
||||
text-align: center;
|
||||
color: rgb(20 40 34 / 0.55);
|
||||
font-size: 13px;
|
||||
border: 1px dashed rgb(20 40 34 / 0.18);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.wecom-picker-row {
|
||||
display: grid;
|
||||
grid-template-columns: 40px 1fr auto;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgb(20 40 34 / 0.08);
|
||||
background: white;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.15s ease, background 0.15s ease;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wecom-picker-row:hover:not(:disabled) {
|
||||
border-color: rgb(20 184 166 / 0.4);
|
||||
background: rgb(20 184 166 / 0.06);
|
||||
}
|
||||
|
||||
.wecom-picker-row:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.wecom-picker-avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.wecom-picker-avatar.placeholder {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
background: rgb(20 40 34 / 0.06);
|
||||
color: rgb(20 40 34 / 0.55);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.wecom-picker-meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.wecom-picker-name {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: rgb(20 40 34);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.wecom-picker-sub {
|
||||
font-size: 11px;
|
||||
color: rgb(20 40 34 / 0.55);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.wecom-picker-id {
|
||||
font-size: 10px;
|
||||
color: rgb(20 40 34 / 0.4);
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.wecom-picker-binding,
|
||||
.wecom-picker-current {
|
||||
font-size: 11px;
|
||||
color: rgb(20 184 166);
|
||||
padding: 2px 8px;
|
||||
border: 1px solid rgb(20 184 166 / 0.35);
|
||||
border-radius: 999px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.wecom-picker-binding {
|
||||
color: rgb(20 40 34 / 0.5);
|
||||
border-color: rgb(20 40 34 / 0.18);
|
||||
}
|
||||
|
||||
.group-push-modal {
|
||||
width: min(720px, 100%);
|
||||
}
|
||||
|
||||
.group-push-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.group-push-count {
|
||||
font-size: 12px;
|
||||
color: rgb(20 40 34 / 0.55);
|
||||
}
|
||||
|
||||
.group-push-toolbar-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.group-push-row {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgb(20 40 34 / 0.08);
|
||||
background: white;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.15s ease, background 0.15s ease;
|
||||
}
|
||||
|
||||
.group-push-row:hover {
|
||||
border-color: rgb(20 184 166 / 0.4);
|
||||
background: rgb(20 184 166 / 0.06);
|
||||
}
|
||||
|
||||
.group-push-row input[type="checkbox"] {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
accent-color: rgb(20 184 166);
|
||||
}
|
||||
|
||||
.group-push-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
margin-top: 12px;
|
||||
font-size: 12px;
|
||||
color: rgb(20 40 34 / 0.6);
|
||||
}
|
||||
|
||||
.group-push-text textarea {
|
||||
width: 100%;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.group-push-result {
|
||||
margin-top: 12px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgb(20 184 166 / 0.35);
|
||||
background: rgb(20 184 166 / 0.06);
|
||||
font-size: 12px;
|
||||
color: rgb(20 40 34 / 0.75);
|
||||
}
|
||||
|
||||
.group-push-result ul,
|
||||
.group-push-history ul {
|
||||
margin: 6px 0 0;
|
||||
padding-left: 18px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.group-push-fail {
|
||||
color: rgb(190 60 50 / 0.9);
|
||||
}
|
||||
|
||||
.group-push-history {
|
||||
margin-top: 12px;
|
||||
font-size: 12px;
|
||||
color: rgb(20 40 34 / 0.6);
|
||||
}
|
||||
|
||||
.group-push-history-title {
|
||||
font-weight: 600;
|
||||
color: rgb(20 40 34 / 0.75);
|
||||
}
|
||||
|
||||
@media (max-width: 540px) {
|
||||
.wecom-picker-row {
|
||||
grid-template-columns: 32px 1fr auto;
|
||||
gap: 8px;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
.wecom-picker-avatar,
|
||||
.wecom-picker-avatar.placeholder {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.wecom-status-panel .wecom-status-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.partner-row,
|
||||
.partner-row.head {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 4px;
|
||||
}
|
||||
.partner-row.head {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.task-hero {
|
||||
display: flex;
|
||||
min-height: 170px;
|
||||
@@ -2182,6 +2583,39 @@ a {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.import-mode-tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
margin-bottom: 16px;
|
||||
padding: 4px;
|
||||
border-radius: 11px;
|
||||
background: #f1f4f2;
|
||||
}
|
||||
|
||||
.import-mode-tabs button {
|
||||
flex: 1;
|
||||
height: 36px;
|
||||
padding: 0 16px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
color: #687773;
|
||||
font-size: 11px;
|
||||
font-weight: 620;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
|
||||
.import-mode-tabs button:hover {
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.import-mode-tabs button.active {
|
||||
background: white;
|
||||
color: var(--green-deep);
|
||||
box-shadow: 0 1px 2px rgb(31 49 41 / 0.08);
|
||||
}
|
||||
|
||||
.import-guide-strip {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto 1fr auto auto 1fr auto auto;
|
||||
|
||||
Reference in New Issue
Block a user