Browse Source

工业工联网沙盘大屏交接代码第一次提交

master
Daci 2 years ago
commit
6f6332fae4
  1. 24
      .gitignore
  2. BIN
      img/bg-big.png
  3. BIN
      img/border-small.png
  4. BIN
      img/border.png
  5. BIN
      img/crk.png
  6. BIN
      img/hbfx.png
  7. BIN
      img/header-1.png
  8. BIN
      img/header-2.png
  9. BIN
      img/header-3.png
  10. BIN
      img/header-4.png
  11. BIN
      img/header-5.png
  12. BIN
      img/header-6.png
  13. BIN
      img/icon-title.png
  14. BIN
      img/icon.png
  15. BIN
      img/smfx.png
  16. BIN
      img/title-bg.png
  17. BIN
      img/title-decorate-left.png
  18. BIN
      img/title-decorate-right.png
  19. BIN
      img/video1.mp4
  20. BIN
      img/video2.mp4
  21. 1928
      index.html
  22. 1657
      js/echarts-liquidfill.js
  23. 22
      js/echarts.min.js
  24. 45
      js/echarts5_0_1.min.js
  25. 4
      js/jquery-1.7.2.min.js
  26. 192
      js/scroll/index.html
  27. 67
      js/scroll/scroll.js

24
.gitignore

@ -0,0 +1,24 @@
.DS_Store
node_modules
/dist
/tests/e2e/videos/
/tests/e2e/screenshots/
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

BIN
img/bg-big.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 KiB

BIN
img/border-small.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
img/border.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
img/crk.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
img/hbfx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
img/header-1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
img/header-2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
img/header-3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
img/header-4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
img/header-5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
img/header-6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
img/icon-title.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

BIN
img/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

BIN
img/smfx.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
img/title-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
img/title-decorate-left.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
img/title-decorate-right.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
img/video1.mp4

Binary file not shown.

BIN
img/video2.mp4

Binary file not shown.

1928
index.html

File diff suppressed because it is too large

1657
js/echarts-liquidfill.js

File diff suppressed because it is too large

22
js/echarts.min.js

File diff suppressed because one or more lines are too long

45
js/echarts5_0_1.min.js

File diff suppressed because one or more lines are too long

4
js/jquery-1.7.2.min.js

File diff suppressed because one or more lines are too long

192
js/scroll/index.html

@ -0,0 +1,192 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>jQuery无缝滚动</title>
<style>
* {
margin: 0;
padding: 0;
}
.container {
width: 400px;
margin: 50px auto;
}
.header {
text-align: center;
margin-bottom: 10px;
}
.title {
border-left: 5px solid blue;
line-height: 35px;
padding-left: 5px;
margin-bottom: 5px;
}
.scroll {
width: 400px;
height: 260px;
border: 1px solid #ccc;
line-height: 26px;
font-size: 12px;
overflow: hidden;
}
.flex-between {
display: flex;
justify-content: space-between;
}
.flex-between-center {
display: flex;
justify-content: space-between;
align-items: center;
}
.bg-primary {
background-color: #0099CC;
}
.padding-5 {
padding: 5px;
}
.margin-t-20 {
margin-top: 20px;
}
a {
text-decoration: none;
}
.inline {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
background-color: #339933;
margin: 0 10px;
}
.underline {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
background-color: #FF0033;
margin: 0 10px;
}
.select {
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<h1 class="header">jQuery无缝滚动</h1>
<h4 class="title">车辆巡查</h4>
<div class="scroll">
<ul>
<li>
<div class="margin-b-5 padding-5">
<div class="flex-between-center">
<div>
<div class="bg-primary padding-5 margin-b-5">闽D29101</div>
<div>在线状态</div>
</div>
<div>保洁车</div>
</div>
<div class="flex-between">
<div><span class="inline"></span>在线</div>
<div>上次在线 2018-09-23 10:32:32</div>
</div>
</div>
</li>
<li>
<div class="margin-b-5 padding-5">
<div class="flex-between-center">
<div>
<div class="bg-primary padding-5 margin-b-5">闽D29102</div>
<div>在线状态</div>
</div>
<div>保洁车</div>
</div>
<div class="flex-between">
<div><span class="underline"></span>离线</div>
<div>上次在线 2018-09-23 10:32:32</div>
</div>
</div>
</li>
<li>
<div class="margin-b-5 padding-5">
<div class="flex-between-center">
<div>
<div class="bg-primary padding-5 margin-b-5">闽D29103</div>
<div>在线状态</div>
</div>
<div>保洁车</div>
</div>
<div class="flex-between">
<div><span class="underline"></span>离线</div>
<div>上次在线 2018-09-23 10:32:32</div>
</div>
</div>
</li>
<li>
<div class="margin-b-5 padding-5">
<div class="flex-between-center">
<div>
<div class="bg-primary padding-5 margin-b-5">闽D29104</div>
<div>在线状态</div>
</div>
<div>保洁车</div>
</div>
<div class="flex-between">
<div><span class="inline"></span>在线</div>
<div>上次在线 2018-09-23 10:32:32</div>
</div>
</div>
</li>
<li>
<div class="margin-b-5 padding-5">
<div class="flex-between-center">
<div>
<div class="bg-primary padding-5 margin-b-5">闽D29105</div>
<div>在线状态</div>
</div>
<div>保洁车</div>
</div>
<div class="flex-between">
<div><span class="underline"></span>离线</div>
<div>上次在线 2018-09-23 10:32:32</div>
</div>
</div>
</li>
</ul>
</div>
<div class="margin-t-20">
<div class="select"><a href="./index.html">li元素固定格式展示</a></div>
<div class="select"><a href="./index2.html">li元素无固定格式展示</a></div>
<div class="select"><a href="./index3.html">横向滚动展示</a></div>
</div>
</div>
<script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script src="js/scroll.js"></script>
<script type="text/javascript">
$(function () {
$('.scroll').scroll({
speed: 80, //数值越大,速度越快
});
});
</script>
</body>
</html>

67
js/scroll/scroll.js

@ -0,0 +1,67 @@
// JavaScript Document
(function ($) {
$.fn.scroll = function (options) {
//默认配置
var defaults = {
speed: 30, //滚动速度为0-100之间
direction: 'vertical' //方向:vertical向上滚动,horizantal向左滚动
};
var opts = $.extend({}, defaults, options), intId = [];
function marquee(obj, step, direction) {
if (direction == 'horizantal') {
obj.find("ul").animate({
marginLeft: '-=1'
}, 0, function () {
var s = Math.abs(parseInt($(this).css("margin-left")));
if (s >= step) {
$(this).find("li").slice(0, 1).appendTo($(this));
$(this).css("margin-left", 0);
}
});
} else if (direction == 'vertical') {
obj.find("ul").animate({
marginTop: '-=1'
}, 0, function () {
var s = Math.abs(parseInt($(this).css("margin-top")));
if (s >= step) {
$(this).find("li").slice(0, 1).appendTo($(this));
$(this).css("margin-top", 0);
}
});
}
}
this.each(function (i) {
var speed = 0 < 100 - opts["speed"] && 100 - opts["speed"] <= 100 ? 100 - opts["speed"] : 30;
var direction = opts["direction"] == 'vertical' || opts["direction"] == 'horizantal' ? opts["direction"] : 'vertical';
var _this = $(this);
intId[i] = setInterval(function () {
var sh;
if (direction == 'horizantal') {
sh = _this.find("ul").find("li:first").outerWidth(true);
} else {
sh = _this.find("ul").find("li:first").outerHeight(true);
}
marquee(_this, sh, direction);
}, speed);
_this.hover(function () {
clearInterval(intId[i]);
}, function () {
intId[i] = setInterval(function () {
var sh;
if (direction == 'horizantal') {
sh = _this.find("ul").find("li:first").outerWidth(true);
} else {
sh = _this.find("ul").find("li:first").outerHeight(true);
}
marquee(_this, sh, direction);
}, speed);
});
});
}
})(jQuery);
Loading…
Cancel
Save