帆软报表页面添加天气

1. 描述

最近在报表开发制作欢迎页的时候,碰见一个需求,就是有当天的天气提醒。那么,这个天气的提醒怎么加到我们的报表页面中呢?下面给大家分享一下我的过程。

2. 思路
在我们的帆软报表中,有一种显示方式为HTML显示,所以我们可以直接在单元格中插入iframe标签,然后以HTML的形式展现!
[天气网挑选适合自己界面的天气预报,或者 标签自定义样式,复制所对应的 iframe。

比如直接使用下面的:

样式1:
    <iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=1" width="330" height="35" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>

样式2:
    <iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=48" width="440" height="45" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
    
样式3:
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=3" width="160" height="70" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>

样式4:
<iframe name="weather_inc" src="http://i.tianqi.com/index.php?c=code&id=2&num=2" width="330" height="70" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>

3 模板设计
在我们的报表中对应的单元格插入自己选好的标签,选择其他属性,单元格属性表->其他属性,将显示内容修改为“用 HTML 显示内容”.
如图:
![在这里插入图片描述](https://img-blog.csdnimg.cn/2019081116015429.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzMxNDU3NDEz,size_1
6,color_FFFFFF,t_70)
在这里插入图片描述
总结:

这个实现起来比较简单,但是需要注意的是,无法访问外网的情况下,无法访问,可以访问外网的情况下,加载时间也可能较长。

  • 5
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值