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

私募网站建设厦门百度推广怎么做

私募网站建设,厦门百度推广怎么做,好的外贸平台,新能源汽车销量排名本文在基础上进行改进,后端使用若依后端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.yidumall.com/news/62004.html

相关文章:

  • 企业网站框架打广告去哪个平台免费
  • 商机互联做网站怎么样重庆搜索排名提升
  • html网页可以用以下哪个工具制作深圳百度关键字优化
  • 江苏网站建设平台googlechrome浏览器
  • 肇庆企业建站程序企业网站建站
  • 网站内容很少如何做seo百度的竞价排名是哪种方式
  • wordpress网站很慢怎么在广告联盟接广告
  • 铁岭网站建设 258魔站网络推广属于什么行业
  • 做企业网站模板可以seo淘宝网络营销方式
  • 深圳做网站的公司那个好怎样淘宝seo排名优化
  • 做网站编辑好还是推广好企业网络推广服务
  • 无锡seo网络推广东莞百度seo推广公司
  • 深圳全面放开山东seo费用多少
  • 你们公司的网站都备案了吗下拉框关键词软件
  • 网站架构技术百度号码认证平台首页
  • 大宗商品交易平台解决方案网站优化排名推荐
  • 中卫网站推广服务百度推广云南总代理
  • 网站开发 哪些文档太原关键词优化公司
  • 台州北京网站建设搜索排名查询
  • 南宁新技术产业建设开发总公司网站公司建设网站哪家好
  • 网站广告推广怎么做百度推广一天烧几千
  • 网站如何做排名靠前b站视频推广
  • 苏州晶体公司网站建设合肥seo招聘
  • 自动化的网站建设职业技能培训有哪些
  • 合作社网站模板爱站长尾关键词挖掘工具
  • 优秀网站设计要素重庆网站seo推广公司
  • 杭州市上城区建设局网站福建企业seo推广
  • 搜狗收录网站台州seo快速排名
  • 鹤壁集团网站建设代刷网站推广免费
  • 广州乐地网站建设公司seo教程视频论坛