|
|
@@ -0,0 +1,309 @@
|
|
|
+--- production/src/core/kfs/build.js
|
|
|
++++ ksf-workshop-board-20261110-r1/src/core/kfs/build.js
|
|
|
+@@ -228,6 +228,12 @@
|
|
|
+ quoteCount: quotes.length,
|
|
|
+ evidenceCount: Number(r.evidenceCount) || 0,
|
|
|
+ projectId: String(r.projectRef?.objectId || r.projectId || ''),
|
|
|
++ sessionId: String(r.sessionRef?.objectId || r.ownerSession || ''),
|
|
|
++ workshopKey: String(r.workshopKey || ''),
|
|
|
++ reportSeriesKey: String(r.reportSeriesKey || ''),
|
|
|
++ version: Number.isSafeInteger(r.version) && r.version > 0 ? r.version : null,
|
|
|
++ dataMode: String(r.dataMode || ''),
|
|
|
++ groupId: String(r.groupId || ''),
|
|
|
+ rawText: String(r.rawText || ''),
|
|
|
+ report: r.report && typeof r.report === 'object' && !Array.isArray(r.report) ? r.report : null,
|
|
|
+ /** 痛点严重度(整理人标注,1–5);没标就是 null,展示层标「待标注」,不猜 */
|
|
|
+--- production/src/core/library/reports.js
|
|
|
++++ ksf-workshop-board-20261110-r1/src/core/library/reports.js
|
|
|
+@@ -24,7 +24,7 @@
|
|
|
+ /** artifactType(库里存的)→ 类型页 key。多映射时取第一个。 */
|
|
|
+ export const TYPE_FOR_ARTIFACT = Object.freeze({
|
|
|
+ category_report: 'category',
|
|
|
+- assessment_report: 'concept',
|
|
|
++ assessment_report: 'assessment',
|
|
|
+ competitor_report: 'competitor',
|
|
|
+ voc_report: 'voc',
|
|
|
+ pain_list: 'pain',
|
|
|
+@@ -290,6 +290,8 @@
|
|
|
+ metrics = ['—', a.severity ? `${a.severity}/5` : '待标注', '—', a.stageObj?.code || '—'];
|
|
|
+ } else if (typeKey === 'concept') {
|
|
|
+ metrics = [subject || '—', '—', a.evidenceLabel, a.stageObj?.code || '—'];
|
|
|
++ } else if (typeKey === 'assessment') {
|
|
|
++ metrics = [String(report?.quoteCount ?? a.quotes.length), a.evidenceLabel, a.stageObj?.code || '—', a.report ? '结构化报告' : a.rawText ? '原文' : '正文未保存'];
|
|
|
+ } else {
|
|
|
+ metrics = [a.tags[0] || '—', '—', '—', a.stageObj?.code || '—'];
|
|
|
+ }
|
|
|
+@@ -800,6 +802,7 @@
|
|
|
+ ['competitor', '竞品分析'],
|
|
|
+ ['voc', 'VOC / 用户洞察'],
|
|
|
+ ['pain', '痛点清单'],
|
|
|
++ ['assessment', '评估与论证'],
|
|
|
+ ['concept', '概念提案'],
|
|
|
+ ['opportunity', '机会卡'],
|
|
|
+ ['other', '其他成果'],
|
|
|
+--- production/src/core/library/types.js
|
|
|
++++ ksf-workshop-board-20261110-r1/src/core/library/types.js
|
|
|
+@@ -22,6 +22,14 @@
|
|
|
+ * looks 「主要看什么」:页面第一块想要给人的那个结论面
|
|
|
+ */
|
|
|
+ export const REPORT_TYPES = Object.freeze([
|
|
|
++ {
|
|
|
++ key: 'assessment', name: '评估与论证', en: 'Assessment', icon: 'doc',
|
|
|
++ question: '当前判断在什么条件下成立,下一项验证如何改变选择?',
|
|
|
++ looks: '依据与反证 / 产品取舍 / 商业与生产条件 / 待验证问题',
|
|
|
++ fields: { artifactTypes: ['assessment_report'] },
|
|
|
++ metricLabels: ['引文', '证据', '阶段', '正文'], dims: [],
|
|
|
++ empty: '当前没有评估报告。优先级、商业与生产论证及运行验收按实际内容保存;产品概念提案另行查看。',
|
|
|
++ },
|
|
|
+ {
|
|
|
+ key: 'category',
|
|
|
+ name: '品类分析',
|
|
|
+--- production/src/core/workshop-outputs.js
|
|
|
++++ ksf-workshop-board-20261110-r1/src/core/workshop-outputs.js
|
|
|
+@@ -0,0 +1,105 @@
|
|
|
++/** Classroom output navigation. Explicit task/chapter references only; no title guessing. */
|
|
|
++export const WORKSHOP_OUTPUTS = Object.freeze([
|
|
|
++ { key: 'market', name: '市场分析', anchor: 'market-analysis', modules: ['D1-01', 'D1-03'] },
|
|
|
++ { key: 'social', name: '社媒场景需求', anchor: 'social-needs', modules: [] },
|
|
|
++ { key: 'evidence', name: '用户与竞品证言池', anchor: 'evidence-pool', modules: [] },
|
|
|
++ { key: 'opportunities', name: '三方机会卡', anchor: 'opportunity-cards', modules: ['D2-04'] },
|
|
|
++ { key: 'validation', name: '产品论证机会清单', anchor: 'opportunity-validation', modules: ['D2-05', 'D2-06'] },
|
|
|
++ { key: 'value', name: '场景买点方案', anchor: 'buying-points', modules: ['D2-07'] },
|
|
|
++ { key: 'proposal', name: '产品概念提案', anchor: 'product-proposal', modules: [] },
|
|
|
++]);
|
|
|
++export const OUTPUT_GROUP_NONE = '__ungrouped';
|
|
|
++const text = value => typeof value === 'string' ? value.trim() : '';
|
|
|
++const modeOf = value => ['live', 'sample', 'manual'].includes(value) ? value : 'unknown';
|
|
|
++const hasContent = chapter => (chapter.sections || []).some(section =>
|
|
|
++ ['para', 'longpara'].includes(section.kind) ? Boolean(text(section.text))
|
|
|
++ : section.kind === 'table' ? Boolean(section.data?.rows?.length)
|
|
|
++ : Array.isArray(section.data) ? Boolean(section.data.length)
|
|
|
++ : Boolean(section.data && Object.keys(section.data).length));
|
|
|
++
|
|
|
++export function workshopOutputRefs(artifact) {
|
|
|
++ const chapters = artifact.report?.chapters || [];
|
|
|
++ const series = text(artifact.reportSeriesKey);
|
|
|
++ const module = series.match(/(?:^|:)(D1-(?:0[1-4]|N)|D2-0[1-8])(?=:|$)/)?.[1] || '';
|
|
|
++ const refs = [];
|
|
|
++ for (const output of WORKSHOP_OUTPUTS) {
|
|
|
++ const explicit = chapters.filter(ch => ch.id === output.anchor && hasContent(ch));
|
|
|
++ if (explicit.length) {
|
|
|
++ refs.push({ key: output.key, chapterId: output.anchor, basis: 'chapter' }); continue;
|
|
|
++ }
|
|
|
++ const byTask = output.modules.includes(module)
|
|
|
++ || (output.key === 'market' && module === 'D1-04' && /:market-report(?:$|:)/.test(series))
|
|
|
++ || (output.key === 'social' && /:social-insights(?:$|:)/.test(series))
|
|
|
++ || (output.key === 'evidence' && /:evidence-pools(?:$|:)/.test(series))
|
|
|
++ || (output.key === 'validation' && module === 'D2-08' && /:final-list(?:$|:)/.test(series))
|
|
|
++ || (output.key === 'proposal' && module === 'D2-08' && /:proposal(?:$|:)/.test(series));
|
|
|
++ if (byTask && (chapters.some(hasContent) || text(artifact.rawText))) refs.push({ key: output.key, chapterId: '', basis: 'task' });
|
|
|
++ }
|
|
|
++ return { module, refs };
|
|
|
++}
|
|
|
++
|
|
|
++export function readWorkshopQuery(query = {}) {
|
|
|
++ return {
|
|
|
++ group: text(query.group), workshop: text(query.workshop),
|
|
|
++ output: WORKSHOP_OUTPUTS.some(o => o.key === query.output) || query.output === 'unmapped' ? query.output : '',
|
|
|
++ stage: /^S[1-5]$/.test(query.stage || '') ? query.stage : '',
|
|
|
++ mode: ['all', 'live', 'sample', 'manual', 'unknown'].includes(query.mode) ? query.mode : 'live',
|
|
|
++ history: query.history === '1', search: text(query.search),
|
|
|
++ };
|
|
|
++}
|
|
|
++
|
|
|
++/** Keep each author's series separate; absent identity/series never hides older records. */
|
|
|
++function seriesKey(row) {
|
|
|
++ if (!row.artifact.reportSeriesKey || !row.artifact.memberId || !row.artifact.workshopKey) return '';
|
|
|
++ return JSON.stringify([row.artifact.workshopKey, row.artifact.memberId, row.artifact.reportSeriesKey, row.mode]);
|
|
|
++}
|
|
|
++
|
|
|
++export function workshopReview(db, groupState, query = {}) {
|
|
|
++ const q = readWorkshopQuery(query);
|
|
|
++ const groups = (groupState?.groups || []).map(g => ({ id: g.id, name: g.name }));
|
|
|
++ const groupNames = new Map(groups.map(g => [g.id, g.name]));
|
|
|
++ const assignments = groupState?.assignments || {};
|
|
|
++ const rows = (db.artifacts || []).map(artifact => {
|
|
|
++ const group = groupNames.has(assignments[artifact.memberId]) ? assignments[artifact.memberId] : OUTPUT_GROUP_NONE;
|
|
|
++ return { artifact, id: artifact.id, group, groupName: groupNames.get(group) || '未分组', mode: modeOf(artifact.dataMode),
|
|
|
++ ...workshopOutputRefs(artifact), historyCount: 1, versionConfirmed: Number.isSafeInteger(artifact.version) && artifact.version > 0 };
|
|
|
++ });
|
|
|
++ const workshops = [...new Set(rows.map(r => r.artifact.workshopKey).filter(Boolean))].sort();
|
|
|
++ const modeCounts = Object.fromEntries(['live', 'sample', 'manual', 'unknown'].map(m => [m, rows.filter(r => r.mode === m).length]));
|
|
|
++ const scope = rows.filter(r => (q.mode === 'all' || r.mode === q.mode)
|
|
|
++ && (!q.workshop || r.artifact.workshopKey === q.workshop));
|
|
|
++ const newest = new Map();
|
|
|
++ const seriesCounts = new Map();
|
|
|
++ for (const row of scope) {
|
|
|
++ const key = seriesKey(row); if (!key) continue;
|
|
|
++ seriesCounts.set(key, (seriesCounts.get(key) || 0) + 1);
|
|
|
++ if (!row.versionConfirmed) continue;
|
|
|
++ const old = newest.get(key);
|
|
|
++ if (!old || row.artifact.version > old.artifact.version) newest.set(key, row);
|
|
|
++ }
|
|
|
++ const scoped = scope.filter(row => {
|
|
|
++ const key = seriesKey(row), current = newest.get(key);
|
|
|
++ if (current) row.historyCount = seriesCounts.get(key);
|
|
|
++ // Conflicting records with the same version remain visible for reconciliation.
|
|
|
++ return q.history || !current || !row.versionConfirmed || row.artifact.version === current.artifact.version;
|
|
|
++ }).filter(row => !q.stage || row.artifact.stageObj?.code === q.stage);
|
|
|
++ const groupRows = [...groups, { id: OUTPUT_GROUP_NONE, name: '未分组' }].map(group => {
|
|
|
++ const artifacts = scoped.filter(r => r.group === group.id);
|
|
|
++ return { ...group, artifacts: artifacts.length,
|
|
|
++ unassigned: artifacts.filter(r => !r.refs.length).length,
|
|
|
++ outputs: Object.fromEntries(WORKSHOP_OUTPUTS.map(output => [output.key, artifacts.filter(r => r.refs.some(ref => ref.key === output.key)).length])),
|
|
|
++ };
|
|
|
++ });
|
|
|
++ const search = q.search.toLocaleLowerCase();
|
|
|
++ const visible = scoped.filter(r => (!q.group || r.group === q.group)
|
|
|
++ && (!q.stage || r.artifact.stageObj?.code === q.stage)
|
|
|
++ && (!q.output || (q.output === 'unmapped' ? !r.refs.length : r.refs.some(ref => ref.key === q.output)))
|
|
|
++ && (!search || [r.artifact.title, r.artifact.ownerName, r.id].some(v => String(v || '').toLocaleLowerCase().includes(search))))
|
|
|
++ .sort((a, b) => String(b.artifact.updatedAt || b.artifact.createdAt || '').localeCompare(String(a.artifact.updatedAt || a.artifact.createdAt || '')) || a.id.localeCompare(b.id));
|
|
|
++ return { q, rows: visible, total: rows.length, scopedTotal: scoped.length, workshops, modeCounts, groups: groupRows,
|
|
|
++ ungrouped: scoped.filter(r => r.group === OUTPUT_GROUP_NONE).length,
|
|
|
++ unmapped: scoped.filter(r => !r.refs.length).length,
|
|
|
++ missingSeries: scoped.filter(r => !seriesKey(r)).length,
|
|
|
++ groupStateAvailable: Boolean(groupState),
|
|
|
++ };
|
|
|
++}
|
|
|
+--- production/src/layout/kf-app.js
|
|
|
++++ ksf-workshop-board-20261110-r1/src/layout/kf-app.js
|
|
|
+@@ -29,6 +29,7 @@
|
|
|
+ import '../pages/view-report.js';
|
|
|
+ import '../pages/view-ledger.js';
|
|
|
+ import '../pages/view-members.js';
|
|
|
++import '../pages/view-workshop-outputs.js';
|
|
|
+ import '../pages/view-library.js';
|
|
|
+ import '../pages/view-industry.js';
|
|
|
+
|
|
|
+@@ -42,6 +43,7 @@
|
|
|
+ report: ['报告阅读', ''],
|
|
|
+ ledger: ['证据台账', '六维筛选:优先级 · 品类 · 阶段 · 人 · 层 · 状态'],
|
|
|
+ members: ['成员', ''],
|
|
|
++ 'workshop-outputs': ['小组成果', ''],
|
|
|
+ library: ['行业资料库', ''],
|
|
|
+ industry: ['方便面行业监测', ''],
|
|
|
+ 'library-detail': ['资料详情', ''],
|
|
|
+@@ -493,6 +495,7 @@
|
|
|
+ case 'report': return html`<view-report key=${r.params.id} .db=${db} .artifactId=${r.params.id} .routeQuery=${q}></view-report>`;
|
|
|
+ case 'ledger': return html`<view-ledger .db=${db} .routeQuery=${q}></view-ledger>`;
|
|
|
+ case 'members': return html`<view-members .db=${db} .me=${this.#svc.me.get()}></view-members>`;
|
|
|
++ case 'workshop-outputs': return html`<view-workshop-outputs .db=${db} .routeQuery=${q}></view-workshop-outputs>`;
|
|
|
+ default:
|
|
|
+ return html`<kf-empty title="页面不存在" hint=${`没有 ${r.path} 这条路由。`} action-label="回工作台" @empty-action=${() => navigate('/')}></kf-empty>`;
|
|
|
+ }
|
|
|
+--- production/src/layout/kf-nav.js
|
|
|
++++ ksf-workshop-board-20261110-r1/src/layout/kf-nav.js
|
|
|
+@@ -20,6 +20,7 @@
|
|
|
+ { path: '/pool', label: '机会卡池', en: 'Opportunity pool', icon: 'pool', badge: 'pool', short: '卡池' },
|
|
|
+ { path: '/stages', label: '五阶段产出', en: 'Stages S1–S5', icon: 'bars', short: '阶段' },
|
|
|
+ { path: '/reports', label: '分析报告', en: 'Reports', icon: 'doc', short: '报告' },
|
|
|
++ { path: '/workshop', label: '小组成果', en: 'Workshop outputs', icon: 'grid', mobileHidden: true },
|
|
|
+ { path: '/ledger', label: '证据台账', en: 'Ledger', icon: 'ledger', mobileHidden: true },
|
|
|
+ { path: '/library', label: '行业资料库', en: 'Research library', icon: 'inbox', short: '资料库' },
|
|
|
+ { path: '/industry', label: '行业监测', en: 'Industry monitor', icon: 'bars', short: '监测', mobileHidden: true },
|
|
|
+--- production/src/pages/view-reports.js
|
|
|
++++ ksf-workshop-board-20261110-r1/src/pages/view-reports.js
|
|
|
+@@ -101,7 +101,7 @@
|
|
|
+ font-size: 12px; line-height: 1.3; letter-spacing: var(--ls-cn-small); font-weight: 500; color: var(--kf-ink-3); border-bottom: 1px solid var(--kf-line); }
|
|
|
+ .scope-note { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--kf-ink-3); }
|
|
|
+ /* 5 张类型片:宽了 5 张一行(每张 ≥ 212px,够放「类型名 + 份数」),窄了 3 + 2 */
|
|
|
+- .types { grid-template-columns: repeat(5, minmax(0, 1fr)); }
|
|
|
++ .types { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
|
|
|
+ @media (max-width: 1180px) { .types { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
|
|
|
+ @media (max-width: 760px) { .types { grid-template-columns: 1fr; } }
|
|
|
+
|
|
|
+@@ -137,6 +137,7 @@
|
|
|
+ const recent = (e) => e.at && Date.now() - Date.parse(e.at) <= 7 * 86400000;
|
|
|
+ return html`
|
|
|
+ ${section('分类', t(`全部 ${c.total} 份`))}
|
|
|
++ <p class="scope-note"><a href=${href('/workshop')} data-link>按小组与课题查看工作坊成果 ↗</a></p>
|
|
|
+ <p class="scope-note">同一成果可出现在多个分类中,总清单只显示一次。</p>
|
|
|
+ <div class="types" data-types>
|
|
|
+ ${c.types.map((ty, i) => html`
|
|
|
+--- production/src/pages/view-workshop-outputs.js
|
|
|
++++ ksf-workshop-board-20261110-r1/src/pages/view-workshop-outputs.js
|
|
|
+@@ -0,0 +1,73 @@
|
|
|
++import { LitElement, html, css } from 'lit';
|
|
|
++import { useTokens } from '../components/base.js';
|
|
|
++import { WORKSHOP_OUTPUTS, workshopReview } from '../core/workshop-outputs.js';
|
|
|
++import { memberGroupService } from '../services/member-groups.js';
|
|
|
++import { href, setQuery, currentUrl, reportUrl, detailUrl } from '../utils/router.js';
|
|
|
++import { fmtDate } from '../core/kfs/util.js';
|
|
|
++import { head, section, VIEW_CSS } from './shared.js';
|
|
|
++
|
|
|
++const MODE_LABELS = { live: '真实资料', sample: '样例', manual: '人工提供', unknown: '未标明' };
|
|
|
++export class ViewWorkshopOutputs extends LitElement {
|
|
|
++ static properties = { db: { type: Object }, routeQuery: { type: Object }, _groups: { state: true }, _loading: { state: true }, _error: { state: true } };
|
|
|
++ constructor() { super();this.db = null;this.routeQuery = {};this._groups = null;this._loading = false;this._error = ''; }
|
|
|
++ connectedCallback() { super.connectedCallback();useTokens(this);this._readGroups(); }
|
|
|
++ updated(changed) { if (changed.has('db') && changed.get('db') && !this._loading) this._readGroups(); }
|
|
|
++ async _readGroups() {
|
|
|
++ if (this._loading) return;
|
|
|
++ this._loading = true;
|
|
|
++ try { this._groups = await memberGroupService.read();this._error = ''; }
|
|
|
++ catch (error) { this._error = error.message || '分组读取失败';this._groups = null; }
|
|
|
++ finally { this._loading = false; }
|
|
|
++ }
|
|
|
++ _filter(key, value) { setQuery({ [key]: value, page: '', artifact: '', evidence: '', evidenceReport: '' }, { force: true }); }
|
|
|
++ _outputLink(row, ref = null) {
|
|
|
++ if (!row.artifact.report) return detailUrl('artifact', row.id, currentUrl());
|
|
|
++ return reportUrl(row.id, currentUrl()) + (ref?.chapterId ? '&ch=' + encodeURIComponent(ref.chapterId) : '');
|
|
|
++ }
|
|
|
++ render() {
|
|
|
++ if (!this.db) return html`<kf-empty kind="loading" title="小组成果"></kf-empty>`;
|
|
|
++ const view = workshopReview(this.db, this._groups, this.routeQuery), q = view.q;
|
|
|
++ const filter = (name, label, options) => html`<label><span>${label}</span><select aria-label=${label} @change=${e => this._filter(name, e.target.value)}>${options.map(o => html`<option value=${o.value} .selected=${q[name] === o.value}>${o.label}</option>`)}</select></label>`;
|
|
|
++ return html`
|
|
|
++ ${head('小组成果', '围绕本组课题查看研究依据、产品取舍和待验证问题。', html`<a class="button" href=${href('/members')} data-link>成员与分组</a>`)}
|
|
|
++ <div class="filters">
|
|
|
++ ${filter('workshop', '研究课题', [{ value: '', label: '全部课题' }, ...view.workshops.map(value => ({ value, label: value }))])}
|
|
|
++ ${filter('group', '小组', [{ value: '', label: '全部小组' }, ...view.groups.map(g => ({ value: g.id, label: g.name }))])}
|
|
|
++ ${filter('mode', '资料范围', [{ value: 'live', label: '真实资料' }, { value: 'sample', label: '样例' }, { value: 'manual', label: '人工提供' }, { value: 'unknown', label: '未标明' }, { value: 'all', label: '全部记录' }])}
|
|
|
++ ${filter('stage', '阶段', [{ value: '', label: '全部阶段' }, ...['S1','S2','S3','S4','S5'].map(value => ({ value, label: value }))])}
|
|
|
++ ${filter('output', '成果类别', [{ value: '', label: '全部成果' }, ...WORKSHOP_OUTPUTS.map(o => ({ value: o.key, label: o.name })), { value: 'unmapped', label: '待定位成果' }])}
|
|
|
++ <label class="search"><span>搜索成果或成员</span><input type="search" aria-label="搜索成果或成员" .value=${q.search} @change=${e => this._filter('search', e.target.value)}></label>
|
|
|
++ </div>
|
|
|
++ <div class="range"><span>${MODE_LABELS[q.mode] || '全部记录'} · 当前范围 ${view.scopedTotal} 份成果</span><label><input type="checkbox" aria-label="显示历史版本" .checked=${q.history} @change=${e => this._filter('history', e.target.checked ? '1' : '')}>显示历史版本</label></div>
|
|
|
++ ${this._loading ? html`<p class="note" role="status">正在读取共享分组…</p>` : ''}
|
|
|
++ ${this._error ? html`<p class="error" role="alert">${this._error},小组归属暂未确认。<button @click=${() => this._readGroups()}>重试</button></p>` : ''}
|
|
|
++ ${section('七类产出', '各组成果导航')}
|
|
|
++ <p class="note">数字表示已关联的成果,点击查看具体内容。缺项留空待补;内容质量仍需结合依据、取舍与验证条件评审。</p>
|
|
|
++ ${view.groupStateAvailable ? html`<div class="matrix-scroll"><table class="matrix"><thead><tr><th>小组</th>${WORKSHOP_OUTPUTS.map(o => html`<th>${o.name}</th>`)}<th>待定位</th></tr></thead>
|
|
|
++ <tbody>${view.groups.map(g => html`<tr data-output-group=${g.id}><th><button @click=${() => this._filter('group', g.id)}>${g.name}</button><small>${g.artifacts} 份</small></th>${WORKSHOP_OUTPUTS.map(o => html`<td>${g.outputs[o.key] ? html`<button aria-label=${`${g.name} ${o.name} ${g.outputs[o.key]}份`} @click=${() => setQuery({ group: g.id, output: o.key, stage: '', search: '' }, { force: true })}>${g.outputs[o.key]} 份 ↗</button>` : html`<span class="missing">待补</span>`}</td>`)}<td>${g.unassigned ? html`<button @click=${() => setQuery({ group: g.id, output: 'unmapped', stage: '', search: '' }, { force: true })}>${g.unassigned} 份</button>` : '—'}</td></tr>`)}</tbody></table></div>` : html`<p class="note">共享分组确认后显示小组对照。下方仍可阅读成果。</p>`}
|
|
|
++ ${view.ungrouped && view.groupStateAvailable ? html`<p class="note">当前范围 ${view.ungrouped} 份成果未分组,可在成员页核对实际归属。</p>` : ''}
|
|
|
++ ${view.unmapped ? html`<p class="note">${view.unmapped} 份成果尚未定位到七类产出,保留在清单中供核对。</p>` : ''}
|
|
|
++ ${view.missingSeries ? html`<p class="note">部分记录缺少任务系列信息,各版本分别保留显示。</p>` : ''}
|
|
|
++ ${section('成果清单', `${view.rows.length} 份`, html`<span>范围内共 ${view.scopedTotal} 份</span>`)}
|
|
|
++ <div class="results">${view.rows.map(row => html`<article class="result" data-workshop-artifact=${row.id}>
|
|
|
++ <div class="meta"><span>${row.artifact.stageObj?.code || '阶段未标明'}</span><span>${MODE_LABELS[row.mode]}</span><span>${row.versionConfirmed ? `版本 ${row.artifact.version}` : '版本未标明'}</span>${row.historyCount > 1 ? html`<span>本系列 ${row.historyCount} 个记录</span>` : ''}</div>
|
|
|
++ <h3><a href=${href(this._outputLink(row))} data-link>${row.artifact.title}</a></h3>
|
|
|
++ <p class="summary">${row.artifact.report?.executive?.[0] || row.artifact.rawText?.slice(0, 180) || '尚未保存完整报告正文,请打开详情核对现有内容。'}</p>
|
|
|
++ <div class="refs">${row.refs.length ? row.refs.map(ref => html`<a href=${href(this._outputLink(row, ref))} data-link>${WORKSHOP_OUTPUTS.find(o => o.key === ref.key).name} ↗</a>`) : html`<span class="missing">产出类别待定位</span>`}</div>
|
|
|
++ <footer><span>${row.artifact.ownerName || '成员未标明'} · ${view.groupStateAvailable ? row.groupName : '分组待确认'}</span><time>${fmtDate(row.artifact.updatedAt || row.artifact.createdAt, true)}</time><code>${row.id}</code></footer>
|
|
|
++ </article>`)}</div>
|
|
|
++ ${!view.rows.length ? html`<kf-empty title="当前范围暂无成果" hint="可调整课题、小组或资料范围;尚未提交的产出保持待补。"></kf-empty>` : ''}
|
|
|
++ `;
|
|
|
++ }
|
|
|
++ static styles = [VIEW_CSS, css`
|
|
|
++ *{box-sizing:border-box}a{color:var(--kf-accent-ink);text-decoration:none}a:hover{text-decoration:underline}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--kf-accent);outline-offset:3px}
|
|
|
++ .button{display:inline-flex;align-items:center;min-height:40px;padding:8px 14px;border:1px solid var(--kf-line);border-radius:8px;color:var(--kf-ink)}
|
|
|
++ .filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:18px;background:var(--kf-surface);border:1px solid var(--kf-line);border-radius:12px}
|
|
|
++ label{display:grid;gap:6px;min-width:0;font-size:13px;color:var(--kf-ink-2)}select,input[type=search]{min-width:0;width:100%;height:40px;padding:0 10px;border:1px solid var(--kf-line-strong);border-radius:6px;background:var(--kf-surface);color:var(--kf-ink)}
|
|
|
++ select{appearance:auto}.range{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:14px 0;color:var(--kf-ink-3);font-size:13px}.range label{display:flex;align-items:center}.range input[type=checkbox]{appearance:auto;width:16px;height:16px;accent-color:var(--kf-accent)}.note{font-size:13px;line-height:1.7;color:var(--kf-ink-3);margin:10px 0}.error{padding:12px;color:var(--kf-bad-text);background:var(--kf-surface)}
|
|
|
++ .matrix-scroll{overflow:auto;max-width:100%;border:1px solid var(--kf-line);border-radius:10px;background:var(--kf-surface)}table{border-collapse:collapse;width:100%;min-width:850px;font-size:13px}th,td{text-align:left;padding:14px 10px;border-bottom:1px solid var(--kf-line);line-height:1.6}thead th{font-weight:600;background:var(--kf-surface-2)}th:first-child{min-width:100px}th small{display:block;color:var(--kf-ink-3);font-weight:400}td button,th button{border:0;padding:6px 0;background:transparent;color:var(--kf-accent-ink)}.missing{color:var(--kf-ink-3)}
|
|
|
++ .results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.result{min-width:0;border:1px solid var(--kf-line);border-radius:12px;padding:20px;background:var(--kf-surface)}.meta{display:flex;flex-wrap:wrap;gap:6px;font-size:12px;color:var(--kf-ink-3)}.meta span{padding:3px 7px;border-radius:4px;background:var(--kf-surface-2)}h3{font-size:17px;line-height:1.65;margin:12px 0;overflow-wrap:anywhere}h3 a{color:var(--kf-ink)}.summary{font-size:14px;line-height:1.8;color:var(--kf-ink-2);overflow-wrap:anywhere}.refs{display:flex;gap:12px;flex-wrap:wrap;font-size:13px;line-height:1.8}footer{display:flex;flex-wrap:wrap;gap:8px 12px;margin-top:18px;padding-top:12px;border-top:1px solid var(--kf-line);font-size:12px;line-height:1.7;color:var(--kf-ink-3);overflow-wrap:anywhere}footer code{width:100%}.concepts{margin-top:24px;font-size:14px;line-height:1.8}
|
|
|
++ @media(max-width:760px){.filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;gap:10px}.results{grid-template-columns:1fr}.result{padding:16px}.search{grid-column:1/-1}h3{font-size:16px}}
|
|
|
++ `];
|
|
|
++}
|
|
|
++if (!customElements.get('view-workshop-outputs')) customElements.define('view-workshop-outputs', ViewWorkshopOutputs);
|
|
|
+--- production/src/utils/router.js
|
|
|
++++ ksf-workshop-board-20261110-r1/src/utils/router.js
|
|
|
+@@ -30,6 +30,7 @@
|
|
|
+ { name: 'report', path: '/reports/:type/:id' },
|
|
|
+ { name: 'ledger', path: '/ledger' },
|
|
|
+ { name: 'members', path: '/members' },
|
|
|
++ { name: 'workshop-outputs', path: '/workshop' },
|
|
|
+ { name: 'industry', path: '/industry' },
|
|
|
+ { name: 'library', path: '/library' },
|
|
|
+ { name: 'library-detail', path: '/library/:entity/:id' },
|