提示词优化
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 11s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 24s
Docker Build & Deploy / Deploy to Production (push) Successful in 11s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
This commit is contained in:
@@ -419,7 +419,9 @@ public class BudgetService(
|
|||||||
【格式要求】
|
【格式要求】
|
||||||
1. 使用HTML格式(移动端H5页面风格)
|
1. 使用HTML格式(移动端H5页面风格)
|
||||||
2. 生成清晰的报告标题(基于用户问题)
|
2. 生成清晰的报告标题(基于用户问题)
|
||||||
3. 使用表格展示统计数据(table > thead/tbody > tr > th/td)
|
3. 使用表格展示统计数据(table > thead/tbody > tr > th/td),
|
||||||
|
3.1 table要求不能超过屏幕宽度,尽可能简洁明了,避免冗余信息
|
||||||
|
3.2 预算金额精确到整数即可,实际金额精确到小数点后1位
|
||||||
4. 使用合适的HTML标签:h2(标题)、h3(小节)、p(段落)、table(表格)、ul/li(列表)、strong(强调)
|
4. 使用合适的HTML标签:h2(标题)、h3(小节)、p(段落)、table(表格)、ul/li(列表)、strong(强调)
|
||||||
5. 支出金额用 <span class='expense-value'>金额</span> 包裹
|
5. 支出金额用 <span class='expense-value'>金额</span> 包裹
|
||||||
6. 收入金额用 <span class='income-value'>金额</span> 包裹
|
6. 收入金额用 <span class='income-value'>金额</span> 包裹
|
||||||
@@ -574,7 +576,18 @@ public class BudgetService(
|
|||||||
if (expenseItems.Count == 0) description.Append("<p>无支出预算</p>");
|
if (expenseItems.Count == 0) description.Append("<p>无支出预算</p>");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
description.Append("<table><thead><tr><th>名称</th><th>金额</th><th>折算</th><th>合计</th></tr></thead><tbody>");
|
description.Append("""
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 40%;">名称</th>
|
||||||
|
<th style="width: 20%;">金额</th>
|
||||||
|
<th style="width: 20%;">折算</th>
|
||||||
|
<th style="width: 20%;">合计</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
""");
|
||||||
foreach (var item in expenseItems)
|
foreach (var item in expenseItems)
|
||||||
{
|
{
|
||||||
description.Append($"<tr><td>{item.Name}</td><td>{item.Limit:N0}</td><td>x{item.Factor:0.##}</td><td><span class='expense-value'>{item.Total:N0}</span></td></tr>");
|
description.Append($"<tr><td>{item.Name}</td><td>{item.Limit:N0}</td><td>x{item.Factor:0.##}</td><td><span class='expense-value'>{item.Total:N0}</span></td></tr>");
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
.rich-html-content thead,
|
.rich-html-content thead,
|
||||||
.rich-html-content tbody {
|
.rich-html-content tbody {
|
||||||
display: table;
|
display: table;
|
||||||
width: 130%;
|
width: 100%;
|
||||||
min-width: 400px; /* 确保窄屏下有足够宽度触发滚动 */
|
min-width: 400px; /* 确保窄屏下有足够宽度触发滚动 */
|
||||||
table-layout: fixed; /* 核心:强制列宽分配逻辑一致 */
|
table-layout: fixed; /* 核心:强制列宽分配逻辑一致 */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user