|
@@ -1,450 +1,462 @@
|
|
|
-const test61 = (function() {
|
|
|
- function test61(id, domTitle) {
|
|
|
- if (domTitle) {
|
|
|
- $(".test61 .title h2").text(domTitle);
|
|
|
- }
|
|
|
- $(".test61 .box").css("z-index", ++zIndex);
|
|
|
- $(".test61 .box").attr("data-id", id);
|
|
|
- move3(".test61 .test-box");
|
|
|
- move2(".test61 .containerTool");
|
|
|
-
|
|
|
- $(".test61 .close").click(function() {
|
|
|
- $(".test61 .box").remove();
|
|
|
- $(".test61 .containerTool").css("display", "none");
|
|
|
- $(".test61 .setWidth").val("");
|
|
|
- $(".test61 .setHeight").val("");
|
|
|
- moduleIdRemove.push(id);
|
|
|
- });
|
|
|
-
|
|
|
- eventClick(".test61");
|
|
|
-
|
|
|
- const dists = document.querySelectorAll(".test61 .floor-dist");
|
|
|
- const testDoms = document.querySelectorAll(".test61 .box");
|
|
|
- for (let i = 0; i < dists.length; i++) {
|
|
|
- const dom = dists[i];
|
|
|
- setCharts(dom, testDoms[i]);
|
|
|
- }
|
|
|
-
|
|
|
- // 局本级
|
|
|
- $(".bg-center-img-one").click(function() {
|
|
|
- $(".sf1").slideDown();
|
|
|
- $(".sf3").slideUp();
|
|
|
- $(".sf4").slideUp();
|
|
|
- sp1Ajax11()
|
|
|
- sp1Ajax12()
|
|
|
- sp1Ajax14()
|
|
|
- sp1Ajax15()
|
|
|
- sp1Ajax17()
|
|
|
- });
|
|
|
-
|
|
|
- // 浪潮
|
|
|
- $(".bg-center-img-three").click(function() {
|
|
|
- $(".sf4").slideDown();
|
|
|
- $(".sf1").slideUp();
|
|
|
- $(".sf3").slideUp();
|
|
|
- sp4Ajax25()
|
|
|
- sp4Ajax26()
|
|
|
- sp4Ajax27();
|
|
|
- sp4Ajax28();
|
|
|
- sp4Ajax29();
|
|
|
- sp4Ajax30();
|
|
|
- });
|
|
|
-
|
|
|
- // 华为
|
|
|
- $(".bg-center-img-four").click(function() {
|
|
|
- $(".sf3").slideDown();
|
|
|
- $(".sf1").slideUp();
|
|
|
- $(".sf4").slideUp();
|
|
|
- sp3Ajax18()
|
|
|
- sp3Ajax19()
|
|
|
- sp3Ajax21()
|
|
|
- sp3Ajax22()
|
|
|
- myAjax1()
|
|
|
- myAjax2()
|
|
|
- myAjax3()
|
|
|
- });
|
|
|
-
|
|
|
- $(".test61 .close-Popup").click(function() {
|
|
|
- $(".test61 .Popup").css("display", "none");
|
|
|
- });
|
|
|
+const test61 = (function () {
|
|
|
+ function test61(id, domTitle) {
|
|
|
+ if (domTitle) {
|
|
|
+ $(".test61 .title h2").text(domTitle);
|
|
|
+ }
|
|
|
+ $(".test61 .box").css("z-index", ++zIndex);
|
|
|
+ $(".test61 .box").attr("data-id", id);
|
|
|
+ move3(".test61 .test-box");
|
|
|
+ move2(".test61 .containerTool");
|
|
|
+
|
|
|
+ $(".test61 .close").click(function () {
|
|
|
+ $(".test61 .box").remove();
|
|
|
+ $(".test61 .containerTool").css("display", "none");
|
|
|
+ $(".test61 .setWidth").val("");
|
|
|
+ $(".test61 .setHeight").val("");
|
|
|
+ moduleIdRemove.push(id);
|
|
|
+ });
|
|
|
+
|
|
|
+ eventClick(".test61");
|
|
|
+
|
|
|
+ const dists = document.querySelectorAll(".test61 .floor-dist");
|
|
|
+ const testDoms = document.querySelectorAll(".test61 .box");
|
|
|
+ for (let i = 0; i < dists.length; i++) {
|
|
|
+ const dom = dists[i];
|
|
|
+ setCharts(dom, testDoms[i]);
|
|
|
+ }
|
|
|
|
|
|
- const domPop = $('.Popup .tablebox');
|
|
|
- let popFlag = false;
|
|
|
- $(".test61 .left-box-three").click(function() {
|
|
|
- const tit = $(this).find('.left-box-one-title').html();
|
|
|
- $('.Popup-name span').eq(0).text(tit);
|
|
|
- const id = +$(this).attr('data-id');
|
|
|
- $.ajax({
|
|
|
- url: basicUrl +
|
|
|
- "/SystemRisk/GetSystemRiskList",
|
|
|
- data: {
|
|
|
- officeId:id
|
|
|
- },
|
|
|
- success: function(res) {
|
|
|
- console.log('安全等级弹框', res);
|
|
|
- const {result} = res;
|
|
|
- const html = result.map((item,index) => {
|
|
|
- const high = item.high_risk_number;
|
|
|
- const middle = item.middle_risk_number;
|
|
|
- let sum = high + middle;
|
|
|
- if(isNaN(sum)){
|
|
|
- sum = 0;
|
|
|
- }
|
|
|
- let status = '中';
|
|
|
- switch (item.safety_status) {
|
|
|
- case 1:
|
|
|
- status = '低'
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- status = '中'
|
|
|
- break;
|
|
|
- default:
|
|
|
- status = '高'
|
|
|
- break;
|
|
|
- }
|
|
|
+ // 局本级
|
|
|
+ $(".bg-center-img-one").click(function () {
|
|
|
+ $(".sf1").slideDown();
|
|
|
+ $(".sf3").slideUp();
|
|
|
+ $(".sf4").slideUp();
|
|
|
+ sp1Ajax11();
|
|
|
+ sp1Ajax12();
|
|
|
+ sp1Ajax14();
|
|
|
+ sp1Ajax15();
|
|
|
+ sp1Ajax17();
|
|
|
+ });
|
|
|
+
|
|
|
+ // 浪潮
|
|
|
+ $(".bg-center-img-three").click(function () {
|
|
|
+ $(".sf4").slideDown();
|
|
|
+ $(".sf1").slideUp();
|
|
|
+ $(".sf3").slideUp();
|
|
|
+ sp4Ajax25();
|
|
|
+ sp4Ajax26();
|
|
|
+ sp4Ajax27();
|
|
|
+ sp4Ajax28();
|
|
|
+ sp4Ajax29();
|
|
|
+ sp4Ajax30();
|
|
|
+ });
|
|
|
+
|
|
|
+ // 华为
|
|
|
+ $(".bg-center-img-four").click(function () {
|
|
|
+ $(".sf3").slideDown();
|
|
|
+ $(".sf1").slideUp();
|
|
|
+ $(".sf4").slideUp();
|
|
|
+ sp3Ajax18();
|
|
|
+ sp3Ajax19();
|
|
|
+ sp3Ajax21();
|
|
|
+ sp3Ajax22();
|
|
|
+ myAjax1();
|
|
|
+ myAjax2();
|
|
|
+ myAjax3();
|
|
|
+ });
|
|
|
+
|
|
|
+ $(".test61 .close-Popup").click(function () {
|
|
|
+ $(".test61 .Popup").css("display", "none");
|
|
|
+ });
|
|
|
+
|
|
|
+ const domPop = $(".Popup .tablebox");
|
|
|
+ let popFlag = false;
|
|
|
+ $(".test61 .left-box-three").click(function () {
|
|
|
+ const tit = $(this).find(".left-box-one-title").html();
|
|
|
+ $(".Popup-name span").eq(0).text(tit);
|
|
|
+ const id = +$(this).attr("data-id");
|
|
|
+ $.ajax({
|
|
|
+ url: basicUrl + "/SystemRisk/GetSystemRiskList",
|
|
|
+ data: {
|
|
|
+ officeId: id,
|
|
|
+ },
|
|
|
+ success: function (res) {
|
|
|
+ console.log("安全等级弹框", res);
|
|
|
+ const { result } = res;
|
|
|
+ const html = result
|
|
|
+ .map((item, index) => {
|
|
|
+ const high = item.high_risk_number;
|
|
|
+ const middle = item.middle_risk_number;
|
|
|
+ let sum = high + middle;
|
|
|
+ if (isNaN(sum)) {
|
|
|
+ sum = 0;
|
|
|
+ }
|
|
|
+ let status = "中";
|
|
|
+ switch (item.safety_status) {
|
|
|
+ case 1:
|
|
|
+ status = "低";
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ status = "中";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ status = "高";
|
|
|
+ break;
|
|
|
+ }
|
|
|
|
|
|
- return `
|
|
|
+ return `
|
|
|
<tr class="Tr-td">
|
|
|
<td>${item.system_name}</td>
|
|
|
<td>${high}</td>
|
|
|
<td>${middle}</td>
|
|
|
<td>${status}</td>
|
|
|
- <td>${item.update_time ? item.update_time.substring(0,10):false ||item.create_time ? item.create_time.substring(0,10) : false }</td>
|
|
|
+ <td>${
|
|
|
+ item.update_time
|
|
|
+ ? item.update_time.substring(0, 10)
|
|
|
+ : false || item.create_time
|
|
|
+ ? item.create_time.substring(0, 10)
|
|
|
+ : false
|
|
|
+ }</td>
|
|
|
</tr>
|
|
|
- `
|
|
|
- }).join('');
|
|
|
- $('.box61 .Popup tbody').html(html);
|
|
|
- setTimeout(() => {
|
|
|
- scroll(domPop, 0,popFlag)
|
|
|
- popFlag = true;
|
|
|
- }, 1500);
|
|
|
- },
|
|
|
- error: function(err) {
|
|
|
- console.log("----安全等级弹框--------超时");
|
|
|
- },
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- $(".test61 .Popup").css("display", "block");
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- const dom = $('.test61 .box61 .left-box');
|
|
|
- const dom1Children = $('.test61 .box61 .left-box').children();
|
|
|
-
|
|
|
- const dom2 = $('.test61 .box61 .right-box');
|
|
|
- const dom2Children = $('.test61 .box61 .right-box').children();
|
|
|
-
|
|
|
- dom.append(dom2Children.clone(true))
|
|
|
- dom.append(dom1Children.clone(true))
|
|
|
- dom.append(dom2Children.clone(true))
|
|
|
-
|
|
|
-
|
|
|
- dom2.append(dom1Children.clone(true))
|
|
|
- dom2.append(dom2Children.clone(true))
|
|
|
- dom2.append(dom1Children.clone(true))
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- hoverAnimation(dom,dom2)
|
|
|
- hoverAnimation(dom2,dom)
|
|
|
- function hoverAnimation(dom,dom2) {
|
|
|
- dom.hover(()=>{
|
|
|
- dom.css({
|
|
|
- 'animation-play-state': 'paused'
|
|
|
- })
|
|
|
- dom2.css({
|
|
|
- 'animation-play-state': 'paused'
|
|
|
+ `;
|
|
|
})
|
|
|
- },
|
|
|
- () => {
|
|
|
- dom.css({
|
|
|
- 'animation-play-state': 'running'
|
|
|
- })
|
|
|
- dom2.css({
|
|
|
- 'animation-play-state': 'running'
|
|
|
- })
|
|
|
- })
|
|
|
+ .join("");
|
|
|
+ $(".box61 .Popup tbody").html(html);
|
|
|
+ setTimeout(() => {
|
|
|
+ scroll(domPop, 0, popFlag);
|
|
|
+ popFlag = true;
|
|
|
+ }, 1500);
|
|
|
+ },
|
|
|
+ error: function (err) {
|
|
|
+ console.log("----安全等级弹框--------超时");
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ $(".test61 .Popup").css("display", "block");
|
|
|
+ });
|
|
|
+
|
|
|
+ const dom = $(".test61 .box61 .left-box");
|
|
|
+ const dom1Children = $(".test61 .box61 .left-box").children();
|
|
|
+
|
|
|
+ const dom2 = $(".test61 .box61 .right-box");
|
|
|
+ const dom2Children = $(".test61 .box61 .right-box").children();
|
|
|
+
|
|
|
+ dom.append(dom2Children.clone(true));
|
|
|
+ dom.append(dom1Children.clone(true));
|
|
|
+ dom.append(dom2Children.clone(true));
|
|
|
+
|
|
|
+ dom2.append(dom1Children.clone(true));
|
|
|
+ dom2.append(dom2Children.clone(true));
|
|
|
+ dom2.append(dom1Children.clone(true));
|
|
|
+
|
|
|
+ hoverAnimation(dom, dom2);
|
|
|
+ hoverAnimation(dom2, dom);
|
|
|
+ function hoverAnimation(dom, dom2) {
|
|
|
+ dom.hover(
|
|
|
+ () => {
|
|
|
+ dom.css({
|
|
|
+ "animation-play-state": "paused",
|
|
|
+ });
|
|
|
+ dom2.css({
|
|
|
+ "animation-play-state": "paused",
|
|
|
+ });
|
|
|
+ },
|
|
|
+ () => {
|
|
|
+ dom.css({
|
|
|
+ "animation-play-state": "running",
|
|
|
+ });
|
|
|
+ dom2.css({
|
|
|
+ "animation-play-state": "running",
|
|
|
+ });
|
|
|
}
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
+ const scroll = (dom, curLeft) => {
|
|
|
+ const option = {
|
|
|
+ duration: 16,
|
|
|
+ total: 5000,
|
|
|
+ begin: {
|
|
|
+ left: curLeft,
|
|
|
+ },
|
|
|
+ end: {
|
|
|
+ left: -dom.width() / 2,
|
|
|
+ },
|
|
|
+ startMove(curData) {
|
|
|
+ curLeft = curData.left;
|
|
|
+ dom.css("margin-left", curLeft);
|
|
|
+ },
|
|
|
+ stopMove() {
|
|
|
+ dom.css("margin-left", 0);
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
- const scroll = (dom,curLeft) => {
|
|
|
- const option = {
|
|
|
- duration: 16,
|
|
|
- total: 5000,
|
|
|
- begin: {
|
|
|
- left: curLeft
|
|
|
+ curLeft = 0;
|
|
|
+ scroll(dom, 0);
|
|
|
+ },
|
|
|
+ };
|
|
|
+ const animate = animateScrool(option);
|
|
|
+ animate.start();
|
|
|
+ dom.hover(
|
|
|
+ () => {
|
|
|
+ animate.stop();
|
|
|
+ },
|
|
|
+ () => {
|
|
|
+ animate.start();
|
|
|
+ }
|
|
|
+ );
|
|
|
+ return animate;
|
|
|
+ };
|
|
|
+ // scroll(dom,0)
|
|
|
+ }, 1500);
|
|
|
+ var player = new SVGA.Player("#bgCenter");
|
|
|
+ var parser = new SVGA.Parser("#bgCenter");
|
|
|
+ parser.load("../svga/云1.svga", function (videoItem) {
|
|
|
+ player.loops = 0;
|
|
|
+ player.clearsAfterStop = false;
|
|
|
+ player.setVideoItem(videoItem);
|
|
|
+ player.startAnimation();
|
|
|
+ player.onFrame(function (i) {});
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function setCharts(echartDom, testDom) {
|
|
|
+ var myChart = echarts.init(echartDom);
|
|
|
+ // 地图背景颜色
|
|
|
+ var highlight = "#03b7c9";
|
|
|
+
|
|
|
+ var demoData = [
|
|
|
+ {
|
|
|
+ name: "平均温度",
|
|
|
+ value: 22,
|
|
|
+ unit: "°",
|
|
|
+ pos: ["25%", "40%"],
|
|
|
+ range: [-40, 100],
|
|
|
+ YS: [
|
|
|
+ [0.4, "#119eff"],
|
|
|
+ [0.5, "#30da74"],
|
|
|
+ [1, "#f3390d"],
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "平均温度",
|
|
|
+ value: 90,
|
|
|
+ unit: "°",
|
|
|
+ pos: ["75%", "40%"],
|
|
|
+ range: [0, 100],
|
|
|
+ splitNum: 10,
|
|
|
+ YS: [
|
|
|
+ [0.3, "#f3390d"],
|
|
|
+ [0.8, "#30da74"],
|
|
|
+ [1, "#119eff"],
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+
|
|
|
+ option = {
|
|
|
+ series: (function () {
|
|
|
+ var result = [];
|
|
|
+
|
|
|
+ demoData.forEach(function (item) {
|
|
|
+ result.push(
|
|
|
+ // 外围刻度
|
|
|
+ {
|
|
|
+ type: "gauge",
|
|
|
+ center: item.pos,
|
|
|
+ radius: "50%", // 1行2个
|
|
|
+ splitNumber: item.splitNum || 10,
|
|
|
+ min: item.range[0],
|
|
|
+ max: item.range[1],
|
|
|
+ startAngle: 225,
|
|
|
+ endAngle: -45,
|
|
|
+ axisLine: {
|
|
|
+ show: true,
|
|
|
+ lineStyle: {
|
|
|
+ width: 2,
|
|
|
+ shadowBlur: 0,
|
|
|
+ color: [[1, highlight]],
|
|
|
+ },
|
|
|
},
|
|
|
- end: {
|
|
|
- left: -dom.width()/2
|
|
|
+ axisTick: {
|
|
|
+ show: true,
|
|
|
+ lineStyle: {
|
|
|
+ color: highlight,
|
|
|
+ width: 1,
|
|
|
+ },
|
|
|
+ length: -5,
|
|
|
+ splitNumber: 10,
|
|
|
},
|
|
|
- startMove (curData) {
|
|
|
- curLeft = curData.left;
|
|
|
- dom.css('margin-left',curLeft)
|
|
|
+ splitLine: {
|
|
|
+ show: true,
|
|
|
+ length: -10,
|
|
|
+ lineStyle: {
|
|
|
+ color: highlight,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ distance: -18,
|
|
|
+ textStyle: {
|
|
|
+ color: highlight,
|
|
|
+ fontSize: "10",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ pointer: {
|
|
|
+ show: 0,
|
|
|
+ },
|
|
|
+ detail: {
|
|
|
+ show: 0,
|
|
|
},
|
|
|
- stopMove () {
|
|
|
- dom.css('margin-left',0)
|
|
|
-
|
|
|
- curLeft = 0;
|
|
|
- scroll(dom,0)
|
|
|
- }
|
|
|
- }
|
|
|
- const animate = animateScrool(option);
|
|
|
- animate.start();
|
|
|
- dom.hover(() => {
|
|
|
- animate.stop();
|
|
|
- },() => {
|
|
|
- animate.start();
|
|
|
- })
|
|
|
- return animate;
|
|
|
- }
|
|
|
- // scroll(dom,0)
|
|
|
- }, 1500);
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- function setCharts(echartDom, testDom) {
|
|
|
- var myChart = echarts.init(echartDom);
|
|
|
- // 地图背景颜色
|
|
|
- var highlight = "#03b7c9";
|
|
|
-
|
|
|
- var demoData = [{
|
|
|
- name: "平均温度",
|
|
|
- value: 22,
|
|
|
- unit: "°",
|
|
|
- pos: ["25%", "40%"],
|
|
|
- range: [-40, 100],
|
|
|
- YS: [
|
|
|
- [0.4, "#119eff"],
|
|
|
- [0.5, "#30da74"],
|
|
|
- [1, "#f3390d"],
|
|
|
- ],
|
|
|
},
|
|
|
{
|
|
|
- name: "平均温度",
|
|
|
- value: 90,
|
|
|
- unit: "°",
|
|
|
- pos: ["75%", "40%"],
|
|
|
- range: [0, 100],
|
|
|
- splitNum: 10,
|
|
|
- YS: [
|
|
|
- [0.3, "#f3390d"],
|
|
|
- [0.8, "#30da74"],
|
|
|
- [1, "#119eff"],
|
|
|
- ],
|
|
|
+ name: "速度",
|
|
|
+ type: "gauge",
|
|
|
+ center: item.pos,
|
|
|
+ splitNumber: item.splitNum || 10,
|
|
|
+ min: item.range[0],
|
|
|
+ max: item.range[1],
|
|
|
+ radius: "45%",
|
|
|
+ axisLine: {
|
|
|
+ // 坐标轴线
|
|
|
+ show: false,
|
|
|
+ lineStyle: {
|
|
|
+ // 属性lineStyle控制线条样式
|
|
|
+ color: item.YS,
|
|
|
+ shadowColor: "#ccc",
|
|
|
+ shadowBlur: 25,
|
|
|
+ width: 0,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ axisTick: {
|
|
|
+ // 坐标轴小标记
|
|
|
+ // show: false,
|
|
|
+ length: 20, // 属性length控制线长
|
|
|
+ lineStyle: {
|
|
|
+ // 属性lineStyle控制线条样式
|
|
|
+ color: "auto",
|
|
|
+ width: 2,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ splitLine: {
|
|
|
+ // 分隔线
|
|
|
+ show: false,
|
|
|
+ length: 20, // 属性length控制线长
|
|
|
+ lineStyle: {
|
|
|
+ // 属性lineStyle(详见lineStyle)控制线条样式
|
|
|
+ color: "auto",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ title: {
|
|
|
+ textStyle: {
|
|
|
+ // 其余属性默认使用全局文本样式,详见TEXTSTYLE
|
|
|
+ fontWeight: "bolder",
|
|
|
+ fontSize: 20,
|
|
|
+ fontStyle: "italic",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ detail: {
|
|
|
+ show: true,
|
|
|
+ offsetCenter: [0, "100%"],
|
|
|
+ textStyle: {
|
|
|
+ fontSize: 25,
|
|
|
+ },
|
|
|
+ formatter: [
|
|
|
+ "{value} " + (item.unit || ""),
|
|
|
+ "{name|" + item.name + "}",
|
|
|
+ ].join("\n"),
|
|
|
+ rich: {
|
|
|
+ name: {
|
|
|
+ fontSize: 16,
|
|
|
+ lineHeight: 30,
|
|
|
+ color: "#4be4de",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ value: item.value,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ pointer: {
|
|
|
+ width: 5,
|
|
|
+ },
|
|
|
},
|
|
|
- ];
|
|
|
-
|
|
|
- option = {
|
|
|
- series: (function() {
|
|
|
- var result = [];
|
|
|
-
|
|
|
- demoData.forEach(function(item) {
|
|
|
- result.push(
|
|
|
- // 外围刻度
|
|
|
- {
|
|
|
- type: "gauge",
|
|
|
- center: item.pos,
|
|
|
- radius: "50%", // 1行2个
|
|
|
- splitNumber: item.splitNum || 10,
|
|
|
- min: item.range[0],
|
|
|
- max: item.range[1],
|
|
|
- startAngle: 225,
|
|
|
- endAngle: -45,
|
|
|
- axisLine: {
|
|
|
- show: true,
|
|
|
- lineStyle: {
|
|
|
- width: 2,
|
|
|
- shadowBlur: 0,
|
|
|
- color: [
|
|
|
- [1, highlight]
|
|
|
- ],
|
|
|
- },
|
|
|
- },
|
|
|
- axisTick: {
|
|
|
- show: true,
|
|
|
- lineStyle: {
|
|
|
- color: highlight,
|
|
|
- width: 1,
|
|
|
- },
|
|
|
- length: -5,
|
|
|
- splitNumber: 10,
|
|
|
- },
|
|
|
- splitLine: {
|
|
|
- show: true,
|
|
|
- length: -10,
|
|
|
- lineStyle: {
|
|
|
- color: highlight,
|
|
|
- },
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- distance: -18,
|
|
|
- textStyle: {
|
|
|
- color: highlight,
|
|
|
- fontSize: "10",
|
|
|
- },
|
|
|
- },
|
|
|
- pointer: {
|
|
|
- show: 0,
|
|
|
- },
|
|
|
- detail: {
|
|
|
- show: 0,
|
|
|
- },
|
|
|
- }, {
|
|
|
- name: "速度",
|
|
|
- type: "gauge",
|
|
|
- center: item.pos,
|
|
|
- splitNumber: item.splitNum || 10,
|
|
|
- min: item.range[0],
|
|
|
- max: item.range[1],
|
|
|
- radius: "45%",
|
|
|
- axisLine: {
|
|
|
- // 坐标轴线
|
|
|
- show: false,
|
|
|
- lineStyle: {
|
|
|
- // 属性lineStyle控制线条样式
|
|
|
- color: item.YS,
|
|
|
- shadowColor: "#ccc",
|
|
|
- shadowBlur: 25,
|
|
|
- width: 0,
|
|
|
- },
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- show: false,
|
|
|
- },
|
|
|
- axisTick: {
|
|
|
- // 坐标轴小标记
|
|
|
- // show: false,
|
|
|
- length: 20, // 属性length控制线长
|
|
|
- lineStyle: {
|
|
|
- // 属性lineStyle控制线条样式
|
|
|
- color: "auto",
|
|
|
- width: 2,
|
|
|
- },
|
|
|
- },
|
|
|
- splitLine: {
|
|
|
- // 分隔线
|
|
|
- show: false,
|
|
|
- length: 20, // 属性length控制线长
|
|
|
- lineStyle: {
|
|
|
- // 属性lineStyle(详见lineStyle)控制线条样式
|
|
|
- color: "auto",
|
|
|
- },
|
|
|
- },
|
|
|
- title: {
|
|
|
- textStyle: {
|
|
|
- // 其余属性默认使用全局文本样式,详见TEXTSTYLE
|
|
|
- fontWeight: "bolder",
|
|
|
- fontSize: 20,
|
|
|
- fontStyle: "italic",
|
|
|
- },
|
|
|
- },
|
|
|
- detail: {
|
|
|
- show: true,
|
|
|
- offsetCenter: [0, "100%"],
|
|
|
- textStyle: {
|
|
|
- fontSize: 25,
|
|
|
- },
|
|
|
- formatter: [
|
|
|
- "{value} " + (item.unit || ""),
|
|
|
- "{name|" + item.name + "}",
|
|
|
- ].join("\n"),
|
|
|
- rich: {
|
|
|
- name: {
|
|
|
- fontSize: 16,
|
|
|
- lineHeight: 30,
|
|
|
- color: "#4be4de",
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- data: [{
|
|
|
- value: item.value,
|
|
|
- }, ],
|
|
|
- pointer: {
|
|
|
- width: 5,
|
|
|
- },
|
|
|
- },
|
|
|
- // 内侧指针、数值显示
|
|
|
- {
|
|
|
- name: item.name,
|
|
|
- type: "gauge",
|
|
|
- center: item.pos,
|
|
|
- radius: "40%",
|
|
|
- startAngle: 225,
|
|
|
- endAngle: -45,
|
|
|
- min: item.range[0],
|
|
|
- max: item.range[1],
|
|
|
- axisLine: {
|
|
|
- show: true,
|
|
|
- lineStyle: {
|
|
|
- width: 16,
|
|
|
- color: [
|
|
|
- [1, "rgba(75,228,255,.1)"]
|
|
|
- ],
|
|
|
- },
|
|
|
- },
|
|
|
- axisTick: {
|
|
|
- show: 0,
|
|
|
- },
|
|
|
- splitLine: {
|
|
|
- show: 0,
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- show: 0,
|
|
|
- },
|
|
|
- pointer: {
|
|
|
- show: true,
|
|
|
- length: "90%",
|
|
|
- width: 3,
|
|
|
- },
|
|
|
- itemStyle: {
|
|
|
- //表盘指针的颜色
|
|
|
- color: "rgba(255, 153, 0, 0.31)",
|
|
|
- borderColor: "#ff9900",
|
|
|
- borderWidth: 1,
|
|
|
- },
|
|
|
- detail: {
|
|
|
- show: false,
|
|
|
- offsetCenter: [0, "100%"],
|
|
|
- textStyle: {
|
|
|
- fontSize: 20,
|
|
|
- color: "#00eff2",
|
|
|
- },
|
|
|
- formatter: [
|
|
|
- "{value} " + (item.unit || ""),
|
|
|
- "{name|" + item.name + "}",
|
|
|
- ].join("\n"),
|
|
|
- rich: {
|
|
|
- name: {
|
|
|
- fontSize: 14,
|
|
|
- lineHeight: 30,
|
|
|
- color: "#00eff2",
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
+ // 内侧指针、数值显示
|
|
|
+ {
|
|
|
+ name: item.name,
|
|
|
+ type: "gauge",
|
|
|
+ center: item.pos,
|
|
|
+ radius: "40%",
|
|
|
+ startAngle: 225,
|
|
|
+ endAngle: -45,
|
|
|
+ min: item.range[0],
|
|
|
+ max: item.range[1],
|
|
|
+ axisLine: {
|
|
|
+ show: true,
|
|
|
+ lineStyle: {
|
|
|
+ width: 16,
|
|
|
+ color: [[1, "rgba(75,228,255,.1)"]],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ axisTick: {
|
|
|
+ show: 0,
|
|
|
+ },
|
|
|
+ splitLine: {
|
|
|
+ show: 0,
|
|
|
+ },
|
|
|
+ axisLabel: {
|
|
|
+ show: 0,
|
|
|
+ },
|
|
|
+ pointer: {
|
|
|
+ show: true,
|
|
|
+ length: "90%",
|
|
|
+ width: 3,
|
|
|
+ },
|
|
|
+ itemStyle: {
|
|
|
+ //表盘指针的颜色
|
|
|
+ color: "rgba(255, 153, 0, 0.31)",
|
|
|
+ borderColor: "#ff9900",
|
|
|
+ borderWidth: 1,
|
|
|
+ },
|
|
|
+ detail: {
|
|
|
+ show: false,
|
|
|
+ offsetCenter: [0, "100%"],
|
|
|
+ textStyle: {
|
|
|
+ fontSize: 20,
|
|
|
+ color: "#00eff2",
|
|
|
+ },
|
|
|
+ formatter: [
|
|
|
+ "{value} " + (item.unit || ""),
|
|
|
+ "{name|" + item.name + "}",
|
|
|
+ ].join("\n"),
|
|
|
+ rich: {
|
|
|
+ name: {
|
|
|
+ fontSize: 14,
|
|
|
+ lineHeight: 30,
|
|
|
+ color: "#00eff2",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
|
|
|
- data: [{
|
|
|
- value: item.value,
|
|
|
- }, ],
|
|
|
- }
|
|
|
- );
|
|
|
- });
|
|
|
- return result;
|
|
|
- })(),
|
|
|
- };
|
|
|
- if (option) {
|
|
|
- myChart.setOption(option);
|
|
|
- }
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ value: item.value,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ }
|
|
|
+ );
|
|
|
+ });
|
|
|
+ return result;
|
|
|
+ })(),
|
|
|
+ };
|
|
|
+ if (option) {
|
|
|
+ myChart.setOption(option);
|
|
|
+ }
|
|
|
|
|
|
- if (!testDom) {
|
|
|
- testDom = document.querySelectorAll(".test61 .box");
|
|
|
- }
|
|
|
- obsDom(testDom, myChart);
|
|
|
+ if (!testDom) {
|
|
|
+ testDom = document.querySelectorAll(".test61 .box");
|
|
|
}
|
|
|
- return test61;
|
|
|
-})();
|
|
|
+ obsDom(testDom, myChart);
|
|
|
+ }
|
|
|
+ return test61;
|
|
|
+})();
|