当前位置: 首页 > news >正文

广州app网站建设企业查询天眼查

广州app网站建设,企业查询天眼查,国内专业的网站建设,网页设计设计一个网站首页本文在基础上进行改进,后端使用若依后端IofTV-Screen: 🔥一个基于 vue、datav、Echart 框架的物联网可视化(大屏展示)模板,提供数据动态刷新渲染、屏幕适应、数据滚动配置,内部图表自由替换、Mixins注入等功…

本文在基础上进行改进,后端使用若依后端IofTV-Screen: 🔥一个基于 vue、datav、Echart 框架的物联网可视化(大屏展示)模板,提供数据动态刷新渲染、屏幕适应、数据滚动配置,内部图表自由替换、Mixins注入等功能,持续更新.... - Gitee.com

1.效果:将系统总人数统计显示到大屏

1. 使用dv-digital-flop组件

 <dv-digital-flop :config="config1" style="width:100%;height:100%;" />

number中的元素将被用于替换content内容模版中的{nt}标记,其替换顺序与模版标记的顺序一一对应:

 config1: {
          number: [],
          content: '{nt}',
          style: {
            ...style,
            fill: "#00fdfa",
          },
        }

2. 获取数据并显示

 //统计人数
        countUsers().then(res=> {

          if (!this.timer) {
            console.log("统计人数", res);
          }
          if (res.code == 200) {
          this.countUsers = res.countUsers;
          this.config1 = {
            ...this.config1,
            number: [this.countUsers]
          } }
        })

3. 使用定时器轮询刷新

      //轮询
      switper() {
        if (this.timer) {
          return
        }
        let looper = (a) => {
           this.getData()
        };
        this.timer = setInterval(looper, this.$store.state.settings.echartsAutoTime);
      }

其中this.$store.state.settings.echartsAutoTime可替换成3000

4. user.js增加api

// 查询用户数
export function countUsers() {return request({url: '/system/user/countUsers',method: 'get'})
}

5. 增加controller后端方法

/*** 获取用户数*/@GetMapping("/countUsers")
public AjaxResult countUsers()
{AjaxResult ajax = AjaxResult.success();Integer count = userService.countUsers();ajax.put("countUsers", count);return ajax;
}

6. mapper.xml

<select id="countUsers"  resultType="Integer">select count(1) from sys_user where del_flag='0'
</select>

7. 最终代码

<template><ul class="user_Overview flex" v-if="pageflag"><li class="user_Overview-item" style="color: #00fdfa"><div class="user_Overview_nums allnum "><dv-digital-flop :config="config1" style="width:100%;height:100%;" /></div><p>总人数</p></li></ul><Reacquire v-else @onclick="getData" line-height="200px">重新获取</Reacquire>
</template><script>
import { countUsers } from "@/api/system/user";let style = {fontSize: 24}export default {data() {return {// 人员总数countUsers: 0,pageflag: true,timer: null,config1: {number: [],content: '{nt}',style: {...style,fill: "#00fdfa",},}};},created() {this.getData()},mounted() {},beforeDestroy() {this.clearData()},methods: {clearData() {if (this.timer) {clearInterval(this.timer)this.timer = null}},getData() {this.pageflag = true;//统计人数countUsers().then(res=> {if (!this.timer) {console.log("统计人数", res);}if (res.code == 200) {this.countUsers = res.countUsers;this.config1 = {...this.config1,number: [this.countUsers]} }})this.switper()},//轮询switper() {if (this.timer) {return}let looper = (a) => {this.getData()};this.timer = setInterval(looper, this.$store.state.settings.echartsAutoTime);},},};</script>
<style lang='scss' scoped>.user_Overview {li {flex: 1;p {text-align: center;height: 16px;font-size: 16px;}.user_Overview_nums {width: 100px;height: 100px;text-align: center;line-height: 100px;font-size: 22px;margin: 50px auto 30px;background-size: cover;background-position: center center;position: relative;&::before {content: '';position: absolute;width: 100%;height: 100%;top: 0;left: 0;}&.bgdonghua::before {animation: rotating 14s linear infinite;}}.allnum {// background-image: url("../../assets/img/left_top_lan.png");&::before {background-image: url("../../../assets/bigScreen/img/left_top_lan.png");}}}}</style>

 

 

http://www.dinnco.com/news/72832.html

相关文章:

  • 保定设计网站seo建站优化
  • 做易买网网站项目心得体会大数据免费查询平台
  • 西安市做网站公司有哪些中国第三波疫情将在9月份
  • 做网站必须知道的问题线上推广方式有哪些
  • 南沙网站建设wwiw深圳外贸网站制作
  • 哪些赌博的网站怎么做的宁波网站优化
  • 腾讯企点怎么删除好友seo外包服务专家
  • 如何做木工雕刻机网站seo网站内部优化
  • 建设网站 报告书百度电话客服24小时
  • 怎么做有趣的短视频网站免费的郑州网络推广服务
  • 丽江市住房建设局网站海豹直播nba
  • 唐山网站制作案例长春关键词搜索排名
  • 服务器地址怎么查询seo chinaz
  • 网站在工信部备案查询2022年网络流行语
  • 做网站图片要求高吗长沙做网站推广公司咨询
  • 网站开发还需要兼ie吗网络优化软件有哪些
  • 产品目录网站模板青岛网站seo
  • 长春疫情第二波最新消息杭州网站优化咨询
  • 个人单页网站模板国内十大4a广告公司
  • 网站如何做品牌宣传今日头条最新新闻消息
  • 新乡网站建设哪家好站内seo的技巧
  • 如何做网站运营营销网站制作
  • 建站工具交流自动引流推广软件
  • dede减肥网站源码制作网页的软件
  • 高碑店地区网站建设上海百度seo网站优化
  • 盐山国外网站建设郑州seo外包收费标准
  • 网站服务内容网站建设图片搜索图片识别
  • 招商银行官网首页 网站淘宝推广
  • 济南卓远网站建设seo人员是什么意思
  • 多国语言网站模板网络推广是啥