修复bug
This commit is contained in:
parent
aa67a66047
commit
ce682c3679
@ -26,11 +26,11 @@
|
||||
.page {
|
||||
width: min(100%, 960px);
|
||||
margin: 0 auto;
|
||||
padding: 48px 20px 72px;
|
||||
padding: 28px 16px 40px;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 32px 28px;
|
||||
padding: 24px 22px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.3);
|
||||
border-radius: 24px;
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
@ -48,7 +48,7 @@
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(28px, 4.6vw, 40px);
|
||||
font-size: clamp(22px, 3.6vw, 30px);
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
@ -183,11 +183,11 @@
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.page {
|
||||
padding: 24px 14px 40px;
|
||||
padding: 16px 10px 24px;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 24px 18px;
|
||||
padding: 18px 14px;
|
||||
border-radius: 18px;
|
||||
}
|
||||
|
||||
@ -208,70 +208,70 @@
|
||||
<body>
|
||||
<main class="page">
|
||||
<section class="card">
|
||||
<p class="eyebrow">DISCLAIMER</p>
|
||||
<h1>《交通运输工程造价咨询服务预算编制规范》(T/GDHS 017-2026)预算编制工具免责声明</h1>
|
||||
<p class="date">最后更新日期:<span id="current-date"></span></p>
|
||||
<p class="lead">
|
||||
<p id="eyebrow" class="eyebrow">DISCLAIMER</p>
|
||||
<h1 id="page-title">《交通运输工程造价咨询服务预算编制规范》(T/GDHS 017-2026)预算编制工具免责声明</h1>
|
||||
<p class="date"><span id="date-label">最后更新日期:</span><span id="current-date"></span></p>
|
||||
<p id="lead-text" class="lead">
|
||||
感谢您使用本网站提供的《交通运输工程造价咨询服务预算编制规范》(T/GDHS 017-2026)造价咨询服务预算编制工具(以下简称编制工具)(以下简称本工具)。在您使用本工具前,请仔细阅读以下免责声明条款。您继续使用本工具,即视为您已阅读、理解并同意接受本声明的全部内容。
|
||||
</p>
|
||||
<div class="divider"></div>
|
||||
|
||||
<section class="section">
|
||||
<h2>1. 标准依据说明</h2>
|
||||
<p>1.1 本工具依据广东省公路学会发布的团体标准《交通运输工程造价咨询服务预算编制规范》(T/GDHS 017-2026)(以下简称本规范)设定的编制方法。使用者应自行判断该标准是否适用于其具体项目及所在地区主管部门的要求。</p>
|
||||
<p>1.2 本工具所依据的规范版本已在工具界面中标注(T/GDHS 017-2026)。如该规范后续发布修订内容、补充规定或被新版本替代,本工具可能无法及时同步更新。使用者有责任在使用前确认所依据的规范版本是否为最新有效版本。</p>
|
||||
<p>1.3 本工具的计算结果基于本规范中的预算编制方法、费用组成及编制规则,但不同地区、不同项目法人对造价咨询服务预算编制的具体要求和计算方法可能存在差异。本工具不保证其计算结果符合任何特定项目或特定主管部门的审核要求。</p>
|
||||
<h2 id="section1-title">1. 标准依据说明</h2>
|
||||
<p id="section1-p1">1.1 本工具依据广东省公路学会发布的团体标准《交通运输工程造价咨询服务预算编制规范》(T/GDHS 017-2026)(以下简称本规范)设定的编制方法。使用者应自行判断该标准是否适用于其具体项目及所在地区主管部门的要求。</p>
|
||||
<p id="section1-p2">1.2 本工具所依据的规范版本已在工具界面中标注(T/GDHS 017-2026)。如该规范后续发布修订内容、补充规定或被新版本替代,本工具可能无法及时同步更新。使用者有责任在使用前确认所依据的规范版本是否为最新有效版本。</p>
|
||||
<p id="section1-p3">1.3 本工具的计算结果基于本规范中的预算编制方法、费用组成及编制规则,但不同地区、不同项目法人对造价咨询服务预算编制的具体要求和计算方法可能存在差异。本工具不保证其计算结果符合任何特定项目或特定主管部门的审核要求。</p>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<h2>2. 计算结果仅供参考</h2>
|
||||
<p>本工具所提供的所有计算结果(包括但不限于数值、明细表、汇总报表、编制说明等)均基于您输入的参数(如工程行业、项目规模、咨询类别、工程专业、工作内容、调整系数等)以及本规范中的数学模型与公式自动生成,仅供您参考使用。这些结果不构成任何形式的专业建议,也不代表任何官方或强制性的预算审批依据。</p>
|
||||
<h2 id="section2-title">2. 计算结果仅供参考</h2>
|
||||
<p id="section2-p1">本工具所提供的所有计算结果(包括但不限于数值、明细表、汇总报表、编制说明等)均基于您输入的参数(如工程行业、项目规模、咨询类别、工程专业、工作内容、调整系数等)以及本规范中的数学模型与公式自动生成,仅供您参考使用。这些结果不构成任何形式的专业建议,也不代表任何官方或强制性的预算审批依据。</p>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<h2>3. 不保证准确性与完整性</h2>
|
||||
<p>尽管我们尽力确保工具的可用性,但本工具按现状和现有基础提供,不附带任何明示或暗示的保证。我们无法保证计算结果在任何情况下均准确、无误或完整。由于数据输入错误、公式取舍、四舍五入或系统延迟等原因,结果可能与实际情况存在偏差。</p>
|
||||
<h2 id="section3-title">3. 不保证准确性与完整性</h2>
|
||||
<p id="section3-p1">尽管我们尽力确保工具的可用性,但本工具按现状和现有基础提供,不附带任何明示或暗示的保证。我们无法保证计算结果在任何情况下均准确、无误或完整。由于数据输入错误、公式取舍、四舍五入或系统延迟等原因,结果可能与实际情况存在偏差。</p>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<h2>4. 用户自行承担风险</h2>
|
||||
<p>您应当独立判断计算结果的可信性,并承担将其用于任何决策所产生的全部风险与责任。您不应依赖本工具的编制结果替代专业人士的具体计算或复核。在作出重大决定前,建议您咨询持有交通运输工程造价工程师注册证书的专业人员,或结合项目具体情况进行人工验证与复核。</p>
|
||||
<h2 id="section4-title">4. 用户自行承担风险</h2>
|
||||
<p id="section4-p1">您应当独立判断计算结果的可信性,并承担将其用于任何决策所产生的全部风险与责任。您不应依赖本工具的编制结果替代专业人士的具体计算或复核。在作出重大决定前,建议您咨询持有交通运输工程造价工程师注册证书的专业人员,或结合项目具体情况进行人工验证与复核。</p>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<h2>5. 责任限制</h2>
|
||||
<p>在适用法律允许的最大范围内,本工具的开发方、管理方、发布方及其关联方不对因使用或无法使用本工具而导致的任何直接、间接、偶然、特殊或后果性损失承担法律责任,即使已被告知可能发生此类损失。</p>
|
||||
<p>特别声明:任何造价咨询企业或人员依据本工具计算结果出具的造价咨询成果文件,其质量责任由出具方自行承担。本工具不对任何第三方造价咨询成果的准确性、合规性或引发的任何纠纷承担任何责任。</p>
|
||||
<h2 id="section5-title">5. 责任限制</h2>
|
||||
<p id="section5-p1">在适用法律允许的最大范围内,本工具的开发方、管理方、发布方及其关联方不对因使用或无法使用本工具而导致的任何直接、间接、偶然、特殊或后果性损失承担法律责任,即使已被告知可能发生此类损失。</p>
|
||||
<p id="section5-p2">特别声明:任何造价咨询企业或人员依据本工具计算结果出具的造价咨询成果文件,其质量责任由出具方自行承担。本工具不对任何第三方造价咨询成果的准确性、合规性或引发的任何纠纷承担任何责任。</p>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<h2>6. 服务中断与修改</h2>
|
||||
<p>我们保留随时修改、暂停或终止本工具部分或全部功能的权利,且可能不另行通知。对于因技术维护、网络故障、第三方服务中断、规范版本变更等原因导致的工具不可用、数据丢失或计算结果变化,我们不承担责任。</p>
|
||||
<h2 id="section6-title">6. 服务中断与修改</h2>
|
||||
<p id="section6-p1">我们保留随时修改、暂停或终止本工具部分或全部功能的权利,且可能不另行通知。对于因技术维护、网络故障、第三方服务中断、规范版本变更等原因导致的工具不可用、数据丢失或计算结果变化,我们不承担责任。</p>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<h2>7. 外部链接与第三方内容</h2>
|
||||
<p>如果本工具引用或链接至全国团体标准信息平台、广东省公路学会官网或其他第三方网站,该等链接仅为方便用户查阅规范原文而提供,不代表我们认可其内容的准确性、时效性或完整性。对于任何第三方网站或工具的信息、服务或内容,我们不承担任何责任。</p>
|
||||
<h2 id="section7-title">7. 外部链接与第三方内容</h2>
|
||||
<p id="section7-p1">如果本工具引用或链接至全国团体标准信息平台、广东省公路学会官网或其他第三方网站,该等链接仅为方便用户查阅规范原文而提供,不代表我们认可其内容的准确性、时效性或完整性。对于任何第三方网站或工具的信息、服务或内容,我们不承担任何责任。</p>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<h2>8. 适用法律</h2>
|
||||
<p>本声明的解释、效力及争议解决均适用中华人民共和国法律。若本声明任何条款被认定为无效或不可执行,不影响其余条款的效力。</p>
|
||||
<h2 id="section8-title">8. 适用法律</h2>
|
||||
<p id="section8-p1">本声明的解释、效力及争议解决均适用中华人民共和国法律。若本声明任何条款被认定为无效或不可执行,不影响其余条款的效力。</p>
|
||||
</section>
|
||||
|
||||
<section id="confirm-section" class="confirm">
|
||||
<p class="confirm-title">用户确认</p>
|
||||
<p>我已阅读、理解并同意本免责声明的全部内容。</p>
|
||||
<p>(勾选后方可继续使用本工具)</p>
|
||||
<p id="confirm-title" class="confirm-title">用户确认</p>
|
||||
<p id="confirm-desc-1">我已阅读、理解并同意本免责声明的全部内容。</p>
|
||||
<p id="confirm-desc-2">(勾选后方可继续使用本工具)</p>
|
||||
<label class="checkbox-row">
|
||||
<input id="accept-checkbox" type="checkbox" />
|
||||
<span>我已阅读、理解并同意本免责声明的全部内容。</span>
|
||||
<span id="checkbox-label">我已阅读、理解并同意本免责声明的全部内容。</span>
|
||||
</label>
|
||||
<div class="actions">
|
||||
<button id="continue-button" class="button button-primary" type="button" disabled>同意并继续</button>
|
||||
<a id="back-button" class="button button-secondary" href="/">返回入口</a>
|
||||
</div>
|
||||
<p class="hint">勾选后将记录当前浏览器的同意状态,后续从同一受限入口访问时不再重复提示。</p>
|
||||
<p id="confirm-hint" class="hint">勾选后将记录当前浏览器的同意状态,后续从同一受限入口访问时不再重复提示。</p>
|
||||
</section>
|
||||
|
||||
<div id="page-actions" class="actions page-actions" style="display: none;">
|
||||
@ -284,11 +284,126 @@
|
||||
const DISCLAIMER_ACCEPTANCE_STORAGE_KEY = 'jgjs-disclaimer-accepted-v1'
|
||||
const DISCLAIMER_RETURN_URL_QUERY_KEY = 'returnUrl'
|
||||
const DISCLAIMER_ENTRY_QUERY_KEY = 'from'
|
||||
const I18N_LOCALE_KEY = 'jgjs-locale-v1'
|
||||
const DEFAULT_LOCALE = 'zh-CN'
|
||||
const translations = {
|
||||
'zh-CN': {
|
||||
documentTitle: '预算编制工具免责声明',
|
||||
eyebrow: 'DISCLAIMER',
|
||||
pageTitle: '《交通运输工程造价咨询服务预算编制规范》(T/GDHS 017-2026)预算编制工具免责声明',
|
||||
dateLabel: '最后更新日期:',
|
||||
leadText: '感谢您使用本网站提供的《交通运输工程造价咨询服务预算编制规范》(T/GDHS 017-2026)造价咨询服务预算编制工具(以下简称编制工具)(以下简称本工具)。在您使用本工具前,请仔细阅读以下免责声明条款。您继续使用本工具,即视为您已阅读、理解并同意接受本声明的全部内容。',
|
||||
section1Title: '1. 标准依据说明',
|
||||
section1P1: '1.1 本工具依据广东省公路学会发布的团体标准《交通运输工程造价咨询服务预算编制规范》(T/GDHS 017-2026)(以下简称本规范)设定的编制方法。使用者应自行判断该标准是否适用于其具体项目及所在地区主管部门的要求。',
|
||||
section1P2: '1.2 本工具所依据的规范版本已在工具界面中标注(T/GDHS 017-2026)。如该规范后续发布修订内容、补充规定或被新版本替代,本工具可能无法及时同步更新。使用者有责任在使用前确认所依据的规范版本是否为最新有效版本。',
|
||||
section1P3: '1.3 本工具的计算结果基于本规范中的预算编制方法、费用组成及编制规则,但不同地区、不同项目法人对造价咨询服务预算编制的具体要求和计算方法可能存在差异。本工具不保证其计算结果符合任何特定项目或特定主管部门的审核要求。',
|
||||
section2Title: '2. 计算结果仅供参考',
|
||||
section2P1: '本工具所提供的所有计算结果(包括但不限于数值、明细表、汇总报表、编制说明等)均基于您输入的参数(如工程行业、项目规模、咨询类别、工程专业、工作内容、调整系数等)以及本规范中的数学模型与公式自动生成,仅供您参考使用。这些结果不构成任何形式的专业建议,也不代表任何官方或强制性的预算审批依据。',
|
||||
section3Title: '3. 不保证准确性与完整性',
|
||||
section3P1: '尽管我们尽力确保工具的可用性,但本工具按现状和现有基础提供,不附带任何明示或暗示的保证。我们无法保证计算结果在任何情况下均准确、无误或完整。由于数据输入错误、公式取舍、四舍五入或系统延迟等原因,结果可能与实际情况存在偏差。',
|
||||
section4Title: '4. 用户自行承担风险',
|
||||
section4P1: '您应当独立判断计算结果的可信性,并承担将其用于任何决策所产生的全部风险与责任。您不应依赖本工具的编制结果替代专业人士的具体计算或复核。在作出重大决定前,建议您咨询持有交通运输工程造价工程师注册证书的专业人员,或结合项目具体情况进行人工验证与复核。',
|
||||
section5Title: '5. 责任限制',
|
||||
section5P1: '在适用法律允许的最大范围内,本工具的开发方、管理方、发布方及其关联方不对因使用或无法使用本工具而导致的任何直接、间接、偶然、特殊或后果性损失承担法律责任,即使已被告知可能发生此类损失。',
|
||||
section5P2: '特别声明:任何造价咨询企业或人员依据本工具计算结果出具的造价咨询成果文件,其质量责任由出具方自行承担。本工具不对任何第三方造价咨询成果的准确性、合规性或引发的任何纠纷承担任何责任。',
|
||||
section6Title: '6. 服务中断与修改',
|
||||
section6P1: '我们保留随时修改、暂停或终止本工具部分或全部功能的权利,且可能不另行通知。对于因技术维护、网络故障、第三方服务中断、规范版本变更等原因导致的工具不可用、数据丢失或计算结果变化,我们不承担责任。',
|
||||
section7Title: '7. 外部链接与第三方内容',
|
||||
section7P1: '如果本工具引用或链接至全国团体标准信息平台、广东省公路学会官网或其他第三方网站,该等链接仅为方便用户查阅规范原文而提供,不代表我们认可其内容的准确性、时效性或完整性。对于任何第三方网站或工具的信息、服务或内容,我们不承担任何责任。',
|
||||
section8Title: '8. 适用法律',
|
||||
section8P1: '本声明的解释、效力及争议解决均适用中华人民共和国法律。若本声明任何条款被认定为无效或不可执行,不影响其余条款的效力。',
|
||||
confirmTitle: '用户确认',
|
||||
confirmDesc1: '我已阅读、理解并同意本免责声明的全部内容。',
|
||||
confirmDesc2: '(勾选后方可继续使用本工具)',
|
||||
checkboxLabel: '我已阅读、理解并同意本免责声明的全部内容。',
|
||||
continueButton: '同意并继续',
|
||||
backButton: '返回入口',
|
||||
confirmHint: '勾选后将记录当前浏览器的同意状态,后续从同一受限入口访问时不再重复提示。'
|
||||
},
|
||||
'en-US': {
|
||||
documentTitle: 'Budget Tool Disclaimer',
|
||||
eyebrow: 'DISCLAIMER',
|
||||
pageTitle: 'Disclaimer for the Budget Preparation Tool under T/GDHS 017-2026',
|
||||
dateLabel: 'Last updated: ',
|
||||
leadText: 'Thank you for using the cost consulting budget preparation tool for the Specification for Budget Preparation of Cost Consulting Services for Transportation Engineering (T/GDHS 017-2026) provided on this website. Before using this tool, please read the following disclaimer carefully. By continuing to use this tool, you acknowledge that you have read, understood, and agreed to all terms of this disclaimer.',
|
||||
section1Title: '1. Standard Basis',
|
||||
section1P1: '1.1 This tool is configured according to the methodology set out in the group standard Specification for Budget Preparation of Cost Consulting Services for Transportation Engineering (T/GDHS 017-2026) issued by the Guangdong Highway Society. Users are responsible for determining whether the standard applies to their specific projects and local regulatory requirements.',
|
||||
section1P2: '1.2 The standard version used by this tool is identified in the interface as T/GDHS 017-2026. If the standard is later revised, supplemented, or replaced, this tool may not be updated in time. Users are responsible for confirming that the referenced version remains the latest valid version before use.',
|
||||
section1P3: '1.3 The calculation results generated by this tool are based on the budgeting methods, cost structure, and preparation rules in the standard. Requirements and calculation approaches may still differ across regions and project owners. This tool does not guarantee that its results meet the review requirements of any specific project or authority.',
|
||||
section2Title: '2. Results Are for Reference Only',
|
||||
section2P1: 'All results generated by this tool, including but not limited to figures, detail tables, summary reports, and preparation notes, are produced automatically based on the parameters you provide and the mathematical models and formulas in the standard. They are for reference only and do not constitute professional advice or any official or mandatory basis for budget approval.',
|
||||
section3Title: '3. No Guarantee of Accuracy or Completeness',
|
||||
section3P1: 'Although we make reasonable efforts to keep the tool available, it is provided on an as-is basis without any express or implied warranty. We do not guarantee that the results will always be accurate, error-free, or complete. Differences may arise due to input errors, formula selection, rounding, or system delays.',
|
||||
section4Title: '4. Users Bear Their Own Risks',
|
||||
section4P1: 'You should independently assess the reliability of the calculation results and bear all risks and responsibilities arising from any decisions made based on them. The output of this tool should not replace professional calculation or review. Before making important decisions, you should consult qualified professionals or perform manual verification based on the specific project context.',
|
||||
section5Title: '5. Limitation of Liability',
|
||||
section5P1: 'To the fullest extent permitted by applicable law, the developers, operators, publishers, and their affiliates shall not be liable for any direct, indirect, incidental, special, or consequential losses arising from the use of or inability to use this tool, even if advised of the possibility of such losses.',
|
||||
section5P2: 'In particular, if any cost consulting enterprise or individual issues deliverables based on the results of this tool, the issuing party bears sole responsibility for their quality. This tool assumes no responsibility for the accuracy, compliance, or disputes arising from any third-party deliverables.',
|
||||
section6Title: '6. Service Interruption and Changes',
|
||||
section6P1: 'We reserve the right to modify, suspend, or terminate part or all of this tool at any time, with or without notice. We are not responsible for unavailability, data loss, or changes in calculation results caused by maintenance, network failures, third-party service interruptions, or updates to the standard.',
|
||||
section7Title: '7. External Links and Third-Party Content',
|
||||
section7P1: 'If this tool references or links to the National Group Standards Information Platform, the Guangdong Highway Society website, or other third-party websites, such links are provided only for convenience and do not imply endorsement of their accuracy, timeliness, or completeness. We assume no responsibility for any information, services, or content provided by third parties.',
|
||||
section8Title: '8. Governing Law',
|
||||
section8P1: 'This disclaimer shall be governed by the laws of the People\'s Republic of China. If any provision of this disclaimer is held invalid or unenforceable, the remaining provisions shall remain in effect.',
|
||||
confirmTitle: 'User Confirmation',
|
||||
confirmDesc1: 'I have read, understood, and agree to the full contents of this disclaimer.',
|
||||
confirmDesc2: '(You must check the box before continuing to use this tool.)',
|
||||
checkboxLabel: 'I have read, understood, and agree to the full contents of this disclaimer.',
|
||||
continueButton: 'Agree and Continue',
|
||||
backButton: 'Back to Home',
|
||||
confirmHint: 'Once checked, your acceptance will be recorded in this browser so the same restricted entry will not prompt you again.'
|
||||
}
|
||||
}
|
||||
const readLocale = () => {
|
||||
try {
|
||||
const saved = String(window.localStorage.getItem(I18N_LOCALE_KEY) || '').trim()
|
||||
if (saved === 'en-US' || saved === 'zh-CN') return saved
|
||||
} catch {
|
||||
// ignore local storage errors
|
||||
}
|
||||
const language = String(navigator.language || '').toLowerCase()
|
||||
return language.startsWith('en') ? 'en-US' : DEFAULT_LOCALE
|
||||
}
|
||||
const locale = readLocale()
|
||||
const text = translations[locale] || translations[DEFAULT_LOCALE]
|
||||
document.documentElement.lang = locale
|
||||
document.title = text.documentTitle
|
||||
document.getElementById('eyebrow').textContent = text.eyebrow
|
||||
document.getElementById('page-title').textContent = text.pageTitle
|
||||
document.getElementById('date-label').textContent = text.dateLabel
|
||||
document.getElementById('lead-text').textContent = text.leadText
|
||||
document.getElementById('section1-title').textContent = text.section1Title
|
||||
document.getElementById('section1-p1').textContent = text.section1P1
|
||||
document.getElementById('section1-p2').textContent = text.section1P2
|
||||
document.getElementById('section1-p3').textContent = text.section1P3
|
||||
document.getElementById('section2-title').textContent = text.section2Title
|
||||
document.getElementById('section2-p1').textContent = text.section2P1
|
||||
document.getElementById('section3-title').textContent = text.section3Title
|
||||
document.getElementById('section3-p1').textContent = text.section3P1
|
||||
document.getElementById('section4-title').textContent = text.section4Title
|
||||
document.getElementById('section4-p1').textContent = text.section4P1
|
||||
document.getElementById('section5-title').textContent = text.section5Title
|
||||
document.getElementById('section5-p1').textContent = text.section5P1
|
||||
document.getElementById('section5-p2').textContent = text.section5P2
|
||||
document.getElementById('section6-title').textContent = text.section6Title
|
||||
document.getElementById('section6-p1').textContent = text.section6P1
|
||||
document.getElementById('section7-title').textContent = text.section7Title
|
||||
document.getElementById('section7-p1').textContent = text.section7P1
|
||||
document.getElementById('section8-title').textContent = text.section8Title
|
||||
document.getElementById('section8-p1').textContent = text.section8P1
|
||||
document.getElementById('confirm-title').textContent = text.confirmTitle
|
||||
document.getElementById('confirm-desc-1').textContent = text.confirmDesc1
|
||||
document.getElementById('confirm-desc-2').textContent = text.confirmDesc2
|
||||
document.getElementById('checkbox-label').textContent = text.checkboxLabel
|
||||
document.getElementById('continue-button').textContent = text.continueButton
|
||||
document.getElementById('back-button').textContent = text.backButton
|
||||
document.getElementById('confirm-hint').textContent = text.confirmHint
|
||||
document.getElementById('fallback-back-button').textContent = text.backButton
|
||||
const now = new Date()
|
||||
const yyyy = now.getFullYear()
|
||||
const mm = String(now.getMonth() + 1).padStart(2, '0')
|
||||
const dd = String(now.getDate()).padStart(2, '0')
|
||||
document.getElementById('current-date').textContent = `${yyyy}年${mm}月${dd}日`
|
||||
document.getElementById('current-date').textContent =
|
||||
locale === 'en-US'
|
||||
? new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'long', day: 'numeric' }).format(now)
|
||||
: `${now.getFullYear()}年${String(now.getMonth() + 1).padStart(2, '0')}月${String(now.getDate()).padStart(2, '0')}日`
|
||||
|
||||
const url = new URL(window.location.href)
|
||||
const returnUrl = String(url.searchParams.get(DISCLAIMER_RETURN_URL_QUERY_KEY) || '').trim()
|
||||
|
||||
17
src/App.vue
17
src/App.vue
@ -19,7 +19,6 @@ import {
|
||||
import { collectActiveProjectSessionLocks, initProjectSessionLock } from '@/lib/projectSessionLock'
|
||||
import { listenProjectDeleted, listenResetAll } from '@/lib/projectEvents'
|
||||
import { listProjects, type ProjectMeta } from '@/lib/projectRegistry'
|
||||
import { closePage } from './lib/utils'
|
||||
|
||||
const tabStore = useTabStore()
|
||||
const { t } = useI18n()
|
||||
@ -113,12 +112,7 @@ const startCloseCountdown = () => {
|
||||
closeCountdown.value -= 1
|
||||
if (closeCountdown.value <= 0) {
|
||||
clearCloseCountdown()
|
||||
try {
|
||||
closePage()
|
||||
} catch {
|
||||
|
||||
// 部分浏览器会阻止关闭,保留阻断页。
|
||||
}
|
||||
backToHome()
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
@ -137,6 +131,10 @@ const createProjectAndOpen = () => {
|
||||
openProjectInNewTab(DEFAULT_PROJECT_ID, { newProject: true })
|
||||
}
|
||||
|
||||
const backToHome = () => {
|
||||
window.location.href = buildProjectUrl(DEFAULT_PROJECT_ID, { forceHome: true })
|
||||
}
|
||||
|
||||
const syncRouteRequestFlags = () => {
|
||||
try {
|
||||
const url = new URL(window.location.href)
|
||||
@ -306,9 +304,8 @@ onBeforeUnmount(() => {
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-md border border-slate-300 bg-white px-3 py-2 text-sm text-slate-700"
|
||||
:class="isConflictProjectOpen('default') ? 'cursor-not-allowed opacity-60' : 'cursor-pointer hover:bg-slate-100'"
|
||||
:disabled="isConflictProjectOpen('default')"
|
||||
@click="openProjectInNewTab('default')"
|
||||
:class="'cursor-pointer hover:bg-slate-100'"
|
||||
@click="backToHome"
|
||||
>
|
||||
{{ t('app.projectConflict.openDefault') }}
|
||||
</button>
|
||||
|
||||
@ -654,10 +654,10 @@ onBeforeUnmount(() => {
|
||||
class="inline-flex cursor-pointer items-center justify-center rounded-2xl border border-slate-300/60 bg-white/55 px-5 py-2 text-base font-semibold text-slate-700 shadow-[0_8px_24px_rgba(15,23,42,0.06)] backdrop-blur-sm underline decoration-slate-300 underline-offset-4 transition hover:border-slate-400/70 hover:bg-white/70 hover:text-slate-900 hover:decoration-slate-500"
|
||||
@click="openDisclaimerPage"
|
||||
>
|
||||
免责声明:跳转到免责声明页面
|
||||
{{ t('home.disclaimer.link') }}
|
||||
</button>
|
||||
<p class="mt-2 text-xs leading-5 text-slate-500">
|
||||
本计算工具由众为工程咨询有限公司提供免费技术支持
|
||||
{{ t('home.disclaimer.supportText') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -14,7 +14,7 @@ export const enUS = {
|
||||
countdown: 'This page will try to close automatically in {seconds} seconds. You can open another project in a new tab first.',
|
||||
opened: '(Opened)',
|
||||
lastEdited: 'Last edited: {time}',
|
||||
openDefault: 'Open Default Project',
|
||||
openDefault: 'Back to Home',
|
||||
createAndOpen: 'Create and Open'
|
||||
}
|
||||
},
|
||||
@ -37,6 +37,10 @@ export const enUS = {
|
||||
pickFile: 'Choose File',
|
||||
pickExisting: 'Choose Existing'
|
||||
},
|
||||
disclaimer: {
|
||||
link: 'Disclaimer: Go to disclaimer page',
|
||||
supportText: 'This calculator is provided with free technical support by Zhongwei Engineering Consulting Co., Ltd.'
|
||||
},
|
||||
dialog: {
|
||||
newProject: 'New Project',
|
||||
chooseIndustryDesc: 'Choose an industry and enter project calculation directly.',
|
||||
|
||||
@ -14,7 +14,7 @@ export const zhCN = {
|
||||
countdown: '本页将在 {seconds} 秒后自动尝试关闭。你也可以先在新标签页打开其他项目。',
|
||||
opened: '(已打开)',
|
||||
lastEdited: '最后编辑:{time}',
|
||||
openDefault: '打开默认项目',
|
||||
openDefault: '返回首页',
|
||||
createAndOpen: '新建项目并打开'
|
||||
}
|
||||
},
|
||||
@ -37,6 +37,10 @@ export const zhCN = {
|
||||
pickFile: '选择文件',
|
||||
pickExisting: '选择已有项目'
|
||||
},
|
||||
disclaimer: {
|
||||
link: '免责声明:跳转到免责声明页面',
|
||||
supportText: '本计算工具由众为工程咨询有限公司提供免费技术支持'
|
||||
},
|
||||
dialog: {
|
||||
newProject: '新建项目',
|
||||
chooseIndustryDesc: '选择工程行业后,直接进入项目计算页面。',
|
||||
|
||||
@ -27,6 +27,7 @@ import './style.css'
|
||||
import { i18n } from '@/i18n'
|
||||
import { ensureProjectIdInUrl, getProjectDbName } from '@/lib/workspace'
|
||||
import { listProjects } from '@/lib/projectRegistry'
|
||||
import { collectActiveProjectSessionLocks } from '@/lib/projectSessionLock'
|
||||
|
||||
LicenseManager.setLicenseKey(
|
||||
'[v3][RELEASE][0102]_NDg2Njc4MzY3MDgzNw==16d78ca762fb5d2ff740aed081e2af7b'
|
||||
@ -54,11 +55,14 @@ const AG_GRID_MODULES = [
|
||||
const pickBootstrapProjectId = () => {
|
||||
try {
|
||||
const url = new URL(window.location.href)
|
||||
|
||||
const explicit = String(url.searchParams.get('projectId') || '').trim()
|
||||
if (explicit) return ensureProjectIdInUrl()
|
||||
const projects = listProjects()
|
||||
if (projects.length > 0) {
|
||||
const lastEdited = projects[0]
|
||||
const openedProjectIds = collectActiveProjectSessionLocks(projects.map(project => project.id))
|
||||
const availableProjects = projects.filter(project => !openedProjectIds.has(project.id))
|
||||
if (availableProjects.length > 0) {
|
||||
const lastEdited = availableProjects[0]
|
||||
url.searchParams.set('projectId', lastEdited.id)
|
||||
window.history.replaceState({}, '', `${url.pathname}${url.search}${url.hash}`)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user