You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

318 lines
16 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!doctype html>
<html lang="zh-CN">
<head>
<script>window.location.replace("./user-form.html?mode=detail");</script>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>“光联万物 创芯未来”首届沪苏协同新兴产业科创大赛报名系统</title>
<link rel="stylesheet" href="../assets/bootstrap.min.css" />
<link rel="stylesheet" href="../assets/prototype.css" />
</head>
<body class="prototype-page">
<div class="container-fluid p-3 p-md-4">
<div class="d-flex justify-content-between align-items-center flex-wrap gap-2 mb-3">
<h5 class="mb-0 section-title">赛事详情</h5>
<div id="myEventDetailTopActions" class="d-flex gap-2">
<span class="status-pill status-pending">待评审</span>
<a class="btn btn-sm event-back-btn" href="./my-events.html">返回列表</a>
</div>
</div>
<div class="card">
<div class="card-body">
<form id="detailForm" class="row g-3">
<div class="col-md-6">
<label class="form-label">参赛人姓名</label>
<input class="form-control" id="playerName" />
</div>
<div class="col-md-6">
<label class="form-label">项目名称</label>
<input class="form-control" id="projectName" />
</div>
<div class="col-md-6">
<label class="form-label">企业名称</label>
<input class="form-control company-name-input" id="companyName" placeholder="如已注册企业,请填写" autocomplete="organization" />
</div>
<div class="col-md-6">
<label class="form-label">注册邮箱</label>
<input type="email" class="form-control" id="email" />
</div>
<div class="col-md-6">
<label class="form-label">联系电话</label>
<input class="form-control" id="mobile" pattern="^1[3-9]\d{9}$" />
</div>
<div class="col-md-6">
<label class="form-label" id="trackFieldLabelDetail">细分赛道</label>
<div class="track-custom-select w-100">
<select id="track" class="visually-hidden" tabindex="-1" aria-hidden="true">
<option value="">请选择</option>
<option value="芯片与组件">芯片与组件</option>
<option value="制造与封装">制造与封装</option>
<option value="材料与设备">材料与设备</option>
<option value="场景与应用">场景与应用</option>
</select>
<div class="dropdown w-100">
<button type="button" class="form-select track-custom-toggle w-100 text-start" id="trackDropdownBtn" data-bs-toggle="dropdown" data-bs-display="static" aria-labelledby="trackFieldLabelDetail" aria-expanded="false">
<span class="d-block"><span id="trackMainText" class="text-secondary">请选择</span><span id="trackNoteText" class="track-custom-note"></span></span>
</button>
<ul class="dropdown-menu w-100 border shadow-sm rounded-2 py-0 my-1 track-custom-menu">
<li><button type="button" class="dropdown-item track-pick border-0 w-100 text-start rounded-0" data-value=""><span class="text-secondary">请选择</span></button></li>
<li><button type="button" class="dropdown-item track-pick border-0 w-100 text-start rounded-0" data-value="芯片与组件"><span class="track-pick-inline"><span class="text-body">芯片与组件</span><span class="track-custom-note">光芯片、光电元器件、光模块等核心芯片与组件研发创新</span></span></button></li>
<li><button type="button" class="dropdown-item track-pick border-0 w-100 text-start rounded-0" data-value="制造与封装"><span class="track-pick-inline"><span class="text-body">制造与封装</span><span class="track-custom-note">光电子精密制造、器件封装耦合、量产工艺优化等制造封装技术攻关</span></span></button></li>
<li><button type="button" class="dropdown-item track-pick border-0 w-100 text-start rounded-0" data-value="材料与设备"><span class="track-pick-inline"><span class="text-body">材料与设备</span><span class="track-custom-note">光电功能新材料、光纤基材及光刻、镀膜、精密测试等专用设备研发</span></span></button></li>
<li><button type="button" class="dropdown-item track-pick border-0 w-100 text-start rounded-0" data-value="场景与应用"><span class="track-pick-inline"><span class="text-body">场景与应用</span><span class="track-custom-note">面向算力网络、移动通信、车载互联、工业传感、航空航天、医疗等领域的系统方案与应用创新</span></span></button></li>
</ul>
</div>
</div>
</div>
<div class="col-12">
<label class="form-label">项目简介</label>
<textarea class="form-control" rows="4" id="intro"></textarea>
<div class="d-flex justify-content-end mt-1">
<small id="countInfo" class="text-secondary">0 字</small>
</div>
</div>
<div class="col-md-6">
<label class="form-label">毕业院校</label>
<input class="form-control" id="school" />
</div>
<div class="col-md-6">
<label class="form-label">最高学历</label>
<select class="form-select" id="degree">
<option value="">请选择</option>
<option>大专</option>
<option>本科</option>
<option selected>硕士</option>
<option>博士</option>
<option>其他</option>
</select>
</div>
<div class="col-12">
<label class="form-label">商业计划书</label>
<div class="file-upload-panel">
<input type="file" class="form-control" id="planFile" />
<div class="uploaded-file-row mt-2">
<span class="uploaded-file-label">已上传附件</span>
<a id="planFileLink" class="uploaded-file-link" href="#" target="_blank" rel="noopener">暂无附件</a>
</div>
</div>
</div>
<div class="col-12">
<label class="form-label">参赛承诺书</label>
<p class="form-control-plaintext border rounded px-3 py-2 mb-0 bg-light small text-secondary">
您已签署
<a
href="data:text/html;charset=utf-8,%3C!doctype%20html%3E%3Chtml%20lang%3D'zh-CN'%3E%3Chead%3E%3Cmeta%20charset%3D'UTF-8'%3E%3Cmeta%20name%3D'viewport'%20content%3D'width%3Ddevice-width%2Cinitial-scale%3D1.0'%3E%3Ctitle%3E承诺书预览%3C%2Ftitle%3E%3Cstyle%3Ebody%7Bfont-family%3A%22Noto%20Serif%20CJK%20SC%22%2C%22Source%20Han%20Serif%20SC%22%2Cserif%3Bpadding%3A28px%3Bline-height%3A1.9%3Bcolor%3A%23111%3Bmax-width%3A820px%3Bmargin%3A0%20auto%3B%7Dh2%7Btext-align%3Acenter%3Bmargin%3A0%200%201.2rem%3B%7Dp%7Btext-indent%3A2em%3Bmargin%3A0%200%201rem%3B%7D.footer%7Bmargin-top%3A2.2rem%3Btext-align%3Aright%3B%7D%3C%2Fstyle%3E%3C%2Fhead%3E%3Cbody%3E%3Ch2%3E首届沪苏协同新兴产业科创大赛承诺书%3C%2Fh2%3E%3Cp%3E本项目申报信息中所填写的各栏目内容真实、准确。本项目负责人(团队)对申报材料的真实性负完全责任。%3C%2Fp%3E%3Cp%3E若申报信息中存在虚假、伪造等不实情况,本项目负责人(团队)将积极配合调查,并按照有关规定接受处理。%3C%2Fp%3E%3Cdiv%20class%3D'footer'%3E参赛人签名:王清萍%3Cbr%3E日期:2026年4月30日%3C%2Fdiv%3E%3C%2Fbody%3E%3C%2Fhtml%3E"
target="_blank"
rel="noopener"
class="promise-doc-link"
>《首届沪苏协同新兴产业科创大赛承诺书》</a>
</p>
</div>
</form>
</div>
</div>
<div id="eventDetailActions" class="d-flex gap-2 flex-wrap mt-3">
<button type="button" class="btn btn-outline-primary" id="saveBtn">保存</button>
<button type="button" class="btn btn-success" id="resubmitBtn">重新提交</button>
<a class="btn btn-light" href="./my-events.html">返回列表</a>
</div>
</div>
<div class="modal fade" id="noticeModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered notice-modal-dialog">
<div class="modal-content notice-modal-content notice-success" id="noticeModalContent">
<div class="modal-header border-0 pb-0">
<button type="button" class="btn-close ms-auto" data-bs-dismiss="modal" aria-label="关闭"></button>
</div>
<div class="modal-body notice-modal-body">
<div class="notice-icon" aria-hidden="true">
<svg viewBox="0 0 24 24" width="36" height="36" fill="none"><circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="1.8"/><path d="M7 12.2l3.1 3.1L17.2 8.8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
</div>
<h5 class="notice-title" id="noticeTitle">保存成功</h5>
<p class="notice-text" id="noticeBody"></p>
</div>
<div class="modal-footer notice-modal-footer border-0">
<button type="button" class="btn btn-primary notice-ok-btn" data-bs-dismiss="modal">确定</button>
</div>
</div>
</div>
</div>
<script src="../assets/bootstrap.bundle.min.js"></script>
<script>
const storageKey = "jscc_my_event_detail_v1";
const intro = document.getElementById("intro");
const countInfo = document.getElementById("countInfo");
const planFile = document.getElementById("planFile");
const planFileLink = document.getElementById("planFileLink");
const noticeModal = new bootstrap.Modal(document.getElementById("noticeModal"));
const noticeTitle = document.getElementById("noticeTitle");
const noticeBody = document.getElementById("noticeBody");
const defaults = {
playerName: "王清萍",
projectName: "高速硅光芯片研发平台",
companyName: "江苏示例科技有限公司",
email: "wangqp@example.com",
mobile: "13800138000",
track: "场景与应用",
intro: "围绕新消费场景打造智能化服务能力,覆盖门店运营、用户画像和营销增长。",
school: "武汉大学",
degree: "硕士",
planFileName: "高速硅光芯片研发平台-商业计划书.pdf"
};
const defaultPlanPreviewUrl =
"data:text/html;charset=utf-8," +
encodeURIComponent(
"<!doctype html><html lang='zh-CN'><head><meta charset='UTF-8'><meta name='viewport' content='width=device-width,initial-scale=1.0'><title>附件预览</title><style>body{font-family:'Noto Sans CJK SC','Source Han Sans SC','Noto Sans SC','Liberation Sans',sans-serif;padding:24px;line-height:1.75;color:#222}h2{margin:0 0 10px}p{margin:0 0 8px}</style></head><body><h2>商业计划书(原型预览)</h2><p>文件名:高速硅光芯片研发平台-商业计划书.pdf</p><p>说明:原型环境未接入真实文件服务,当前为示例预览页。</p></body></html>"
);
let currentPlanPreviewUrl = "";
const trackSel = document.getElementById("track");
const trackBtn = document.getElementById("trackDropdownBtn");
function syncTrackField() {
if (!trackSel || !trackBtn) return;
const main = document.getElementById("trackMainText");
const note = document.getElementById("trackNoteText");
const notes = {
"芯片与组件": "光芯片、光电元器件、光模块等核心芯片与组件研发创新",
"制造与封装": "光电子精密制造、器件封装耦合、量产工艺优化等制造封装技术攻关",
"材料与设备": "光电功能新材料、光纤基材及光刻、镀膜、精密测试等专用设备研发",
"场景与应用": "面向算力网络、移动通信、车载互联、工业传感、航空航天、医疗等领域的系统方案与应用创新"
};
const v = trackSel.value;
if (!v) {
main.textContent = "请选择";
main.className = "text-secondary";
note.textContent = "";
} else {
main.textContent = v;
main.className = "text-body";
note.textContent = notes[v] || "";
}
}
document.querySelectorAll("#detailForm .track-pick").forEach((pick) => {
pick.addEventListener("click", () => {
trackSel.value = pick.getAttribute("data-value") || "";
trackSel.dispatchEvent(new Event("change", { bubbles: true }));
syncTrackField();
const inst = bootstrap.Dropdown.getInstance(trackBtn);
if (inst) inst.hide();
});
});
function updatePlanFileLink(name, url) {
if (!name) {
planFileLink.textContent = "暂无附件";
planFileLink.removeAttribute("href");
planFileLink.style.pointerEvents = "none";
planFileLink.style.color = "#8f939a";
currentPlanPreviewUrl = "";
return;
}
planFileLink.textContent = name;
planFileLink.href = url || defaultPlanPreviewUrl;
planFileLink.style.pointerEvents = "";
planFileLink.style.color = "";
currentPlanPreviewUrl = planFileLink.href;
}
function refreshCount() {
countInfo.textContent = intro.value.length + " 字";
}
intro.addEventListener("input", refreshCount);
function getDraftData() {
return {
playerName: document.getElementById("playerName").value,
projectName: document.getElementById("projectName").value,
companyName: document.getElementById("companyName").value,
email: document.getElementById("email").value,
mobile: document.getElementById("mobile").value,
track: document.getElementById("track").value,
intro: intro.value,
school: document.getElementById("school").value,
degree: document.getElementById("degree").value,
planFileName: planFile.files.length ? planFile.files[0].name : (planFile.dataset.savedName || "")
};
}
function applyData(data) {
document.getElementById("playerName").value = data.playerName || "";
document.getElementById("projectName").value = data.projectName || "";
document.getElementById("companyName").value = data.companyName || "";
document.getElementById("email").value = data.email || "";
document.getElementById("mobile").value = data.mobile || "";
document.getElementById("track").value = data.track || "";
syncTrackField();
intro.value = data.intro || "";
document.getElementById("school").value = data.school || "";
document.getElementById("degree").value = data.degree || "";
refreshCount();
const name = data.planFileName || "";
planFile.dataset.savedName = name;
updatePlanFileLink(name, defaultPlanPreviewUrl);
}
function restore() {
const raw = localStorage.getItem(storageKey);
if (raw) {
try {
applyData({ ...defaults, ...JSON.parse(raw) });
return;
} catch (e) {
localStorage.removeItem(storageKey);
}
}
applyData(defaults);
}
function persistDraft() {
const draft = getDraftData();
if (!draft.planFileName && planFile.dataset.savedName) {
draft.planFileName = planFile.dataset.savedName;
}
localStorage.setItem(storageKey, JSON.stringify(draft));
planFile.dataset.savedName = draft.planFileName || "";
if (draft.planFileName) {
updatePlanFileLink(draft.planFileName, defaultPlanPreviewUrl);
} else {
updatePlanFileLink("", "");
}
return draft;
}
planFile.addEventListener("change", () => {
const file = planFile.files[0];
if (!file) return;
if (currentPlanPreviewUrl && currentPlanPreviewUrl.startsWith("blob:")) {
URL.revokeObjectURL(currentPlanPreviewUrl);
}
const blobUrl = URL.createObjectURL(file);
updatePlanFileLink(file.name, blobUrl);
});
document.getElementById("saveBtn").addEventListener("click", () => {
persistDraft();
noticeTitle.textContent = "保存成功";
noticeBody.textContent = "已保存修改。";
noticeModal.show();
});
document.getElementById("resubmitBtn").addEventListener("click", () => {
persistDraft();
noticeTitle.textContent = "重新提交成功";
noticeBody.textContent = "已重新提交报名材料,请等待评审。";
noticeModal.show();
});
restore();
</script>
</body>
</html>