|
@@ -28,39 +28,16 @@ function toPercent(val) {
|
|
*/
|
|
*/
|
|
function DEFAULT(params) {
|
|
function DEFAULT(params) {
|
|
const item = params.data.meta;
|
|
const item = params.data.meta;
|
|
- // debugger
|
|
|
|
|
|
+ const details = item.lists.map(item => item.split(',')).map(item => `<tr>
|
|
|
|
+ <td>${item[0]}</td><td><span style="color:#ffb800;font-weight:400;text-align: right;">${item[1]}</span></td>
|
|
|
|
+</tr>`).join('')
|
|
|
|
+ const score = item.综合得分
|
|
let res = `
|
|
let res = `
|
|
<table>
|
|
<table>
|
|
<tr>
|
|
<tr>
|
|
- <td>综合得分 <span style="font-size: 24px;color:red;font-weight:600;">${(item.总分 || 0).toFixed(2)}</span></td>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td>人口密度</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.人口密度)||0}</span>万人/km²</td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>公众消防安全常识知晓率</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.公众消防安全常识知晓率)||0}</span></td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>大型商业综合体数量</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.大型商业综合体数量)||0}</span>栋</td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>消防远程监控系统覆盖率</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.消防远程监控系统覆盖率)||0}</span></td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>火灾亡人数</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.火灾亡人数)||0}</span>人</td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>火灾直接财产损失数</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.火灾直接财产损失数)||0}</span>元</td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>火灾起数</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.火灾起数)||0}</span>起</td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>百栋高层建筑消防站拥有率</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.百栋高层建筑消防站拥有率)||0}</span>个/百栋</td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>百栋高层建筑高技术性能消防车拥有率</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.百栋高层建筑高技术性能消防车拥有率)||0}</span>台/百栋</td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>超高层建筑数量</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.超高层建筑数量)||0}</span>栋</td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>重大火灾隐患数</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.重大火灾隐患数)||0}</span>个</td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>高层建筑面积密度</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.高层建筑面积密度)||0}</span>栋/km²</td>
|
|
|
|
- </tr><tr>
|
|
|
|
- <td>高层建筑风险预警指数</td><td><span style="font-size:24px;color:#ffb800;font-weight:400;text-align: right;">${toPercent(item.高层建筑风险预警指数)||0}</span></td>
|
|
|
|
|
|
+ <td>综合得分 <span style="font-size: 24px;color:red;font-weight:600;">${(score || 0).toFixed(2)}</span></td>
|
|
</tr>
|
|
</tr>
|
|
|
|
+ ${details}
|
|
</table>
|
|
</table>
|
|
`;
|
|
`;
|
|
return res;
|
|
return res;
|