function.point.ejs 10.4 KB
<!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>
    table {
      border-collapse: collapse;
      width: 100%;
      max-width: 1200px;
      margin: 20px 0;
    }

    th,
    td {
      border: 1px solid #ddd;
      padding: 10px 15px;
      text-align: center;
    }

    th {
      font-weight: bold;
    }

    tr.highlight {
      background-color: #e8f5e9;
    }
    /* .last-bg td:last-child {
      background-color: #f1f4fe;
    }
    .last-bg tr td:last-child {
      background-color: #f1f4fe;
    } */
  </style>
</head>

<body>
  <div>
    <p>各位领导、同事:</p>
    <p style="text-indent: 2em;">以下是重点功能上线后的使用情况,邮件中仅展示 <%= locals.mentorship_page[0].formattedStart + ' 至 ' + locals.mentorship_page[0].formattedEnd %> 的数据。</p>
    <p style="text-indent: 2em;">所有的数据汇总文档:<a
        href="https://mcnywc2tcye7.feishu.cn/wiki/UiCSwaOqMigcDzkyy0tcPOvLnOe" target="_blank">所有数据汇总在线文档</a></p>

    <h3>1、<span style="text-decoration: underline;">带教管理&填写带教任务&飞行督导工作日报&群推送</span></h3>
    <h4>带教管理 上线时间(4.16)小程序(入口埋点)</h4>
    <table>
      <thead>
        <tr>
          <th>日期</th>
          <th>总数(人)</th>
          <th>有效点击人员数(人)</th>
          <th>点击量(次)</th>
          <th>最高点击日 / 次数(原因)</th>
        </tr>
      </thead>
      <tbody>
        <% locals.mentorship_page.forEach(row=> { %>
          <tr class="highlight">
            <td>
              <%= row.formattedStart + ' 至 ' + row.formattedEnd %>
            </td>
            <td>
              <%= row.totalPopulation %>
            </td>
            <td>
              <%= row.uniqueAccounts %>
            </td>
            <td>
              <%= row.count %>
            </td>
            <td>
              <%= row.peakDay && row.peakDay.date && row.peakDay.count ? `${row.peakDay.date} / ${row.peakDay.count}` : '-' %>
            </td>
          </tr>
          <% }); %>
      </tbody>
    </table>
    <br />
    <h4>工作日报(督导) 上线时间(4.16)小程序(入口埋点)</h4>
    <table>
      <thead>
        <tr>
          <th>日期</th>
          <th>总数(人)</th>
          <th>有效点击人员数(人)</th>
          <th>点击量(次)</th>
          <th>精品升级入口(次)</th>
          <th>会员权益入口(次)</th>
        </tr>
      </thead>
      <tbody>
        <% locals.supervisor_daily_page.forEach(row=> { %>
          <tr class="highlight">
            <td>
              <%= row.formattedStart + ' 至 ' + row.formattedEnd %>
            </td>
            <td>
              <%= row.totalPopulation %>
            </td>
            <td>
              <%= row.uniqueAccounts %>
            </td>
            <td>
              <%= row.count %>
            </td>
            <td>
              <%= row.equityCount %>
            </td>
            <td>
              <%= row.upgradeCount %>
            </td>
          </tr>
          <% }); %>
      </tbody>
    </table>
    <br />
    <% if (locals.reportData && locals.reportData.length > 0) { %>
    <p>pc数据分析如下:</p>
    <p>目前,建了三种日报模版(区域运营考核模版,督导培训日报模版,导师培训日报模版)。</p>
    <table>
      <thead>
        <tr>
          <th></th>
          <th>模版内容</th>
          <th>填写情况</th>
          <th>填报人数</th>
          <th>上线时间</th>
        </tr>
      </thead>
      <tbody>
        <% locals.reportData.forEach(row=> { %>
          <tr>
            <td>
              <%= row.templateName %>
            </td>
            <td>
              <%= row.templateContent %>
            </td>
            <td>
              <%= row.total %>
            </td>
            <td>
              <%= row.descript %>
            </td>
            <td>
              <%= row.oinlineTime %>
            </td>
          </tr>
          <% }); %>
      </tbody>
    </table>
    <br />
    <% } %>
    <% if (locals.template && locals.template.length > 0) { %>
    <p>① 区域运营考核模版数据计算</p>
    <table>
      <thead>
        <tr>
          <th>日期</th>
          <th>每日提交份数</th>
          <th>填报人数(所有关联该模版的督导人数,包括当天请假或者休息的员工)</th>
          <th>提交率</th>
        </tr>
      </thead>
      <tbody>
        <% locals.template.forEach(row=> { %>
          <tr class="highlight">
            <td>
              <%= row.date %>
            </td>
            <td>
              <%= row.finishCount %>
            </td>
            <td>
              <%= row.totalCount %>
            </td>
            <td>
              <%= row.rate %>
            </td>
          </tr>
          <% }); %>
      </tbody>
    </table>
    <p>导师模版 上线时间(4.16) - 目前,业务端没开始用</p>
    <br />
    <% } %>
    <h3>2、<span style="text-decoration: underline;">话术萃取 上线时间(4.16)</span></h3>
    <p>数据库统计(浏览时长得是 60s以上 才会记录)</p>
    <table>
      <thead>
        <tr>
          <th>日期</th>
          <th>总浏览次数(次)①</th>
          <th>总浏览人数(人)②</th>
          <th>总浏览批次(次)③</th>
        </tr>
      </thead>
       <tbody>
        <% locals.extraction.forEach(row=> { %>
          <tr>
            <td>
              <%= row.formattedStart + ' 至 ' + row.formattedEnd %>
            </td>
            <td>
              <%= row.count %>
            </td>
            <td>
              <%= row.peopleTotal %>
            </td>
            <td>
              <%= row.batchTotal %>
            </td>
          </tr>
          <% }); %>
      </tbody>
    </table>
    <p>① 总浏览次数:在时间周期内,所有话术的总浏览次数。</p>
    <p>② 总浏览人次:在时间周期内,浏览话术的所有人次。</p>
    <p>③ 总浏览批次:在时间周期内,批量浏览话术的总次数,即一次性批量浏览多条话术。</p>
    <p>话术萃取推送已关闭(4月21停止推送 )</p>
    <br />
    <h3>3、<span style="text-decoration: underline;">营销素材 上线时间(3.12)</span></h3>
    <p>数据库统计(点击素材浏览算一次点击)</p>
    <table>
      <thead>
        <tr>
          <th>日期</th>
          <th>有效点击(次)</th>
          <th>点击人数(人)</th>
          <th>备注</th>
        </tr>
      </thead>
      <tbody>
        <% locals.sales_content.forEach(row=> { %>
          <tr class="highlight">
            <td>
              <%= row.formattedStart + ' 至 ' + row.formattedEnd %>
            </td>
            <td>
              <%= row.count %>
            </td>
            <td>
              <%= row.uniqueAccounts %>
            </td>
            <td>
              <% if (row.remark && row.remark.length > 0) { %>
                <% row.remark.forEach(i=> { %>
                  <div><%= i.name + ': ' + i.count %></div>
                <% }); %>
              <% } else { %>
                -
              <% } %>
            </td>
          </tr>
          <% }); %>
      </tbody>
    </table>
    <br />
    <h3>4、<span style="text-decoration: underline;">场景集市  上线时间(4.16)</span></h3>
    <table>
      <thead>
        <tr>
          <th>日期</th>
          <th>有效点击(次)</th>
          <th>点击人数(人)</th>
          <th>备注</th>
        </tr>
      </thead>
      <tbody>
        <% locals.scene_market.forEach(row=> { %>
          <tr class="highlight">
            <td>
              <%= row.formattedStart + ' 至 ' + row.formattedEnd %>
            </td>
            <td>
              <%= row.count %>
            </td>
            <td>
              <%= row.uniqueAccounts %>
            </td>
            <td>
              <% if (row.remark && row.remark.length > 0) { %>
                <% row.remark.forEach(i=> { %>
                  <div><%= i.name + ': ' + i.count %></div>
                <% }); %>
              <% } else { %>
                -
              <% } %>
            </td>
          </tr>
          <% }); %>
      </tbody>
    </table>
    <br />
    <h3>5、<span style="text-decoration: underline;">培训资料</span></h3>
    <table>
      <thead>
        <tr>
          <th>日期</th>
          <th>有效点击(次)</th>
          <th>点击人数(人)</th>
          <th>备注</th>
        </tr>
      </thead>
      <tbody>
        <% locals.training_materials.forEach(row=> { %>
          <tr class="highlight">
            <td>
              <%= row.formattedStart + ' 至 ' + row.formattedEnd %>
            </td>
            <td>
              <%= row.count %>
            </td>
            <td>
              <%= row.uniqueAccounts %>
            </td>
            <td>
              <% if (row.remark && row.remark.length > 0) { %>
                <% row.remark.forEach(i=> { %>
                  <div><%= i.name + ': ' + i.count %></div>
                <% }); %>
              <% } else { %>
                -
              <% } %>
            </td>
          </tr>
          <% }); %>
      </tbody>
    </table>
    <br />
    <h3>6、<span style="text-decoration: underline;">AI助手  上线时间(5.16)</span></h3>
    <h4>智能体使用情况</h4>
    <ul>
      <li>1、表格中统计的数据为:提问人数(人)、提问次数(次)</li>
      <li>2、表格中底色的用于标识当天提问最高人次、当天提问最高次数</li>
      <li>3、表格中空白处代表 0人、0次</li>
    </ul>
    <table class="last-bg">
      <thead>
        <tr>
          <% locals.aiAgentColumns.forEach(column => { %>
            <th><%= column.title %></th>
          <% }); %>
        </tr>
      </thead>
      <tbody>
        <% locals.ai_agent.forEach(row => { %>
          <tr>
            <% locals.aiAgentColumns.forEach(column => { %>
              <td>
                <% if (column.dataIndex === 'date') { %>
                  <%= row.date %>
                <% } else { %>
                  <%= row[column.dataIndex] || '-' %>
                <% } %>
              </td>
            <% }); %>
          </tr>
          <% }); %>
      </tbody>
    </table>
  </div>
</body>

</html>