当前位置: 首页 > 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.zhongyajixie.com/news/14779.html

相关文章:

  • 德芙巧克力网站开发方案常州网站建设制作
  • 东莞设计网站公司厦门百度广告开户
  • 美剧网站怎么做网络seo营销推广
  • 如何查网站处罚过百度指数与百度搜索量
  • 网络设计制作服务seo快速排名软件推荐
  • 太原市做网站公司360seo关键词优化
  • 网站qq代码生成互联网推广是干什么的
  • 源码网站免费怎么建立自己的网页
  • 网站更改建设方案模板开发一个网站
  • wordpress电台主题win7优化工具
  • 健身网站怎么做线上营销的优势和劣势
  • 红色企业网站源码求好用的seo软件
  • 手机网站建设设计6足球联赛排名
  • 永嘉专业网站建设团队怎么制作属于自己的网址
  • 做网站背景谷歌浏览器引擎入口
  • 网站背景图片优化营销图片素材
  • 做类似58类型网站网站日常维护有哪些
  • 给公司做网站怎么样网络营销公司是做什么的
  • 如何做门户网站网络策划
  • 网易企业邮箱电话厦门最好的seo公司
  • wordpress win8 主题下载深圳外包seo
  • 哪些香港网站不能访问网络推广方案七步法
  • 贷款在线申请aso推广优化
  • 百度优化关键词seo查询源码
  • 关于网站建设的参考文献写软文用什么软件
  • 用python做的网站多吗搜索关键词是什么意思
  • 手表网站哪家好网店推广费用多少钱
  • 赤峰做网站的网络公司网站seo诊断技巧
  • 上海市官方网站百度问答
  • 阜阳手机网站建设百度关键字优化