Forráskód Böngészése

新增需求(电气火灾折线图改柱状图,两个3d环形图改为3d饼图,增加报告弹框提示)

Ming 4 éve
szülő
commit
fa86f3368e
5 módosított fájl, 630 hozzáadás és 542 törlés
  1. 3 1
      api/request.js
  2. 400 309
      css/index.css
  3. 16 0
      eleFireIndex.html
  4. 208 229
      js/eleFire.js
  5. 3 3
      js/water.js

+ 3 - 1
api/request.js

@@ -1,5 +1,7 @@
 //url
-const URL = "http://172.16.120.183:8080/";
+// const URL = "http://172.16.120.183:8080/";
+const URL = "https://iot.usky.cn/";
+
 
 //本地测试
 // const URL = "";

+ 400 - 309
css/index.css

@@ -1,458 +1,549 @@
 * {
-  margin: 0;
-  padding: 0;
-  box-sizing: border-box;
+    margin: 0;
+    padding: 0;
+    box-sizing: border-box;
 }
+
 li {
-  list-style: none;
+    list-style: none;
 }
+
 select,
 input {
-  outline: none;
+    outline: none;
 }
+
+option {
+    background-color: #666666;
+}
+
 .text-left {
-  text-align: left;
+    text-align: left;
 }
+
+
 /* 溢出滚动样式 */
+
 .summary ::-webkit-scrollbar {
-  height: 7px !important;
-  width: 7px !important;
+    height: 7px !important;
+    width: 7px !important;
 }
+
+
 /*定义了滚动条滑块的样式*/
+
 .summary ::-webkit-scrollbar-thumb {
-  border-radius: 5px;
-  border-style: dashed;
-  background-color: #28BEFC;
-  border-color: #e2242400;
-  border-width: 1.5px;
-  background-clip: padding-box;
-}
+    border-radius: 5px;
+    border-style: dashed;
+    background-color: #28BEFC;
+    border-color: #e2242400;
+    border-width: 1.5px;
+    background-clip: padding-box;
+}
+
+
 /*定义了轨道的样式*/
+
 .summary ::-webkit-scrollbar-track {
-  /*滚动条里面轨道*/
-  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
-  border-radius: 5px;
-  background: rgba(0, 0, 0, 0);
+    /*滚动条里面轨道*/
+    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0);
+    border-radius: 5px;
+    background: rgba(0, 0, 0, 0);
 }
+
 @font-face {
-  font-family: IMPACT;
-  src: url(../font/IMPACT.TTF);
+    font-family: IMPACT;
+    src: url(../font/IMPACT.TTF);
 }
+
 body {
-  font-family: Arial, Helvetica, sans-serif;
-  margin: 0;
-  padding: 0;
-  /*  背景图定位 / 背景图尺寸  cover 完全铺满容器  contain 完整显示在容器内 */
-  background: url(../images/bg.jpg) no-repeat #000;
-  background-size: cover;
-  /* 行高是字体1.15倍 */
-  line-height: 1.15;
-  position: relative;
-}
+    font-family: Arial, Helvetica, sans-serif;
+    margin: 0;
+    padding: 0;
+    /*  背景图定位 / 背景图尺寸  cover 完全铺满容器  contain 完整显示在容器内 */
+    background: url(../images/bg.jpg) no-repeat #000;
+    background-size: cover;
+    /* 行高是字体1.15倍 */
+    line-height: 1.15;
+    position: relative;
+}
+
 body .page-container {
-  font-family: Arial, Helvetica, sans-serif;
-  margin: 0;
-  padding: 0;
-  /*  背景图定位 / 背景图尺寸  cover 完全铺满容器  contain 完整显示在容器内 */
-  background: url(../images/bg.jpg) no-repeat #000;
-  background-size: cover;
-  /* 行高是字体1.15倍 */
-  line-height: 1.15;
-  position: relative;
-}
+    font-family: Arial, Helvetica, sans-serif;
+    margin: 0;
+    padding: 0;
+    /*  背景图定位 / 背景图尺寸  cover 完全铺满容器  contain 完整显示在容器内 */
+    background: url(../images/bg.jpg) no-repeat #000;
+    background-size: cover;
+    /* 行高是字体1.15倍 */
+    line-height: 1.15;
+    position: relative;
+}
+
 header {
-  position: relative;
-  height: 1rem;
-  background: url(../images/head_bg.png) no-repeat top center;
-  background-size: 100% 100%;
-  min-width: 1024px;
-  max-width: 1920px;
-}
+    position: relative;
+    height: 1rem;
+    background: url(../images/head_bg.png) no-repeat top center;
+    background-size: 100% 100%;
+    min-width: 1024px;
+    max-width: 1920px;
+}
+
 header h1 {
-  font-size: 0.35rem;
-  color: #fff;
-  text-align: center;
-  line-height: 1rem;
-  font-weight: normal;
+    font-size: 0.35rem;
+    color: #fff;
+    text-align: center;
+    line-height: 1rem;
+    font-weight: normal;
 }
+
 header .filterSec {
-  position: absolute;
-  top: 0;
-  right: 0.375rem;
-  line-height: 0.9375rem;
-  font-size: 0.25rem;
-  color: rgba(255, 255, 255, 0.7);
-}
+    position: absolute;
+    top: 0;
+    right: 0.375rem;
+    line-height: 0.9375rem;
+    font-size: 0.25rem;
+    color: rgba(255, 255, 255, 0.7);
+}
+
 .mainbox {
-  min-width: 1024px;
-  max-width: 1920px;
-  padding: 0.225rem 0.225rem 0 0.2625rem;
+    min-width: 1024px;
+    max-width: 1920px;
+    padding: 0.225rem 0.225rem 0 0.2625rem;
 }
+
 .mainbox .topSection,
 .mainbox .bottomSection {
-  display: flex;
+    display: flex;
 }
+
 .mainbox.eleFire .topSection .column {
-  flex: 2;
+    flex: 2;
 }
+
 .mainbox.eleFire .topSection .column:nth-child(2) {
-  flex: 5;
-  margin: 0 0 0 0.275rem;
-  overflow: hidden;
+    flex: 5;
+    margin: 0 0 0 0.275rem;
+    overflow: hidden;
 }
+
 .mainbox .bottomSection .column {
-  flex: 1;
+    flex: 1;
 }
+
 .mainbox .bottomSection .column:nth-child(2) {
-  flex: 1;
-  margin: 0 0 0 0.275rem;
-  overflow: hidden;
+    flex: 1;
+    margin: 0 0 0 0.275rem;
+    overflow: hidden;
 }
+
 .panel {
-  position: relative;
-  height: 5.9rem;
-  border: 1px solid rgba(25, 140, 186, 0.5);
-  background: rgba(8, 26, 50, 0.6);
-  padding: 0 0.5375rem;
-  margin-bottom: 0.2rem;
-}
+    position: relative;
+    height: 5.9rem;
+    border: 1px solid rgba(25, 140, 186, 0.5);
+    background: rgba(8, 26, 50, 0.6);
+    padding: 0 0.5375rem;
+    margin-bottom: 0.2rem;
+}
+
 .panel::before {
-  position: absolute;
-  top: 0;
-  left: 0;
-  content: "";
-  width: 10px;
-  height: 10px;
-  border-top: 2px solid #28BEFC;
-  border-left: 2px solid #28BEFC;
-}
+    position: absolute;
+    top: 0;
+    left: 0;
+    content: "";
+    width: 10px;
+    height: 10px;
+    border-top: 2px solid #28BEFC;
+    border-left: 2px solid #28BEFC;
+}
+
 .panel::after {
-  position: absolute;
-  top: 0;
-  right: 0;
-  content: "";
-  width: 10px;
-  height: 10px;
-  border-top: 2px solid #28BEFC;
-  border-right: 2px solid #28BEFC;
-}
+    position: absolute;
+    top: 0;
+    right: 0;
+    content: "";
+    width: 10px;
+    height: 10px;
+    border-top: 2px solid #28BEFC;
+    border-right: 2px solid #28BEFC;
+}
+
 .panel .panel-footer {
-  position: absolute;
-  left: 0;
-  bottom: 0;
-  width: 100%;
+    position: absolute;
+    left: 0;
+    bottom: 0;
+    width: 100%;
 }
+
 .panel .panel-footer::before {
-  position: absolute;
-  bottom: 0;
-  left: 0;
-  content: "";
-  width: 10px;
-  height: 10px;
-  border-bottom: 2px solid #28BEFC;
-  border-left: 2px solid #28BEFC;
-}
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    content: "";
+    width: 10px;
+    height: 10px;
+    border-bottom: 2px solid #28BEFC;
+    border-left: 2px solid #28BEFC;
+}
+
 .panel .panel-footer::after {
-  position: absolute;
-  bottom: 0;
-  right: 0;
-  content: "";
-  width: 10px;
-  height: 10px;
-  border-bottom: 2px solid #28BEFC;
-  border-right: 2px solid #28BEFC;
-}
+    position: absolute;
+    bottom: 0;
+    right: 0;
+    content: "";
+    width: 10px;
+    height: 10px;
+    border-bottom: 2px solid #28BEFC;
+    border-right: 2px solid #28BEFC;
+}
+
 .panel h2 {
-  height: 0.6rem;
-  line-height: 0.6rem;
-  text-align: center;
-  color: #0096FF;
-  font-size: 0.25rem;
-  font-weight: 400;
-  position: relative;
-}
+    height: 0.6rem;
+    line-height: 0.6rem;
+    text-align: center;
+    color: #0096FF;
+    font-size: 0.25rem;
+    font-weight: 400;
+    position: relative;
+}
+
 .panel h2 .line {
-  height: 1px;
-  background: rgba(25, 140, 186, 0.5);
-  position: relative;
-  width: 100%;
-  margin: 0 auto;
+    height: 1px;
+    background: rgba(25, 140, 186, 0.5);
+    position: relative;
+    width: 100%;
+    margin: 0 auto;
 }
+
 .panel h2 .line:before {
-  content: '';
-  top: 0.07rem;
-  left: -0.37rem;
-  width: 0.375rem;
-  height: 1px;
-  border-bottom: 1px solid rgba(25, 140, 186, 0.5);
-  display: inline-block;
-  transform: rotate(335deg);
-  position: absolute;
-}
+    content: '';
+    top: 0.07rem;
+    left: -0.37rem;
+    width: 0.375rem;
+    height: 1px;
+    border-bottom: 1px solid rgba(25, 140, 186, 0.5);
+    display: inline-block;
+    transform: rotate(335deg);
+    position: absolute;
+}
+
 .panel h2 .line:after {
-  content: '';
-  top: 0.07rem;
-  right: -0.35rem;
-  width: 0.375rem;
-  height: 1px;
-  border-bottom: 1px solid rgba(25, 140, 186, 0.5);
-  display: inline-block;
-  transform: rotate(25deg);
-  position: absolute;
-}
+    content: '';
+    top: 0.07rem;
+    right: -0.35rem;
+    width: 0.375rem;
+    height: 1px;
+    border-bottom: 1px solid rgba(25, 140, 186, 0.5);
+    display: inline-block;
+    transform: rotate(25deg);
+    position: absolute;
+}
+
 .panel h2 img {
-  height: 0.125rem;
-  vertical-align: middle;
+    height: 0.125rem;
+    vertical-align: middle;
 }
+
 .panel h2 span {
-  margin: 0 0.1875rem;
+    margin: 0 0.1875rem;
 }
+
 .panel .chart {
-  height: calc(100% - 0.6rem);
+    height: calc(100% - 0.6rem);
 }
+
 .tab-line {
-  height: 0.6rem;
-  margin: 0.25rem 0;
-  display: inline-block;
+    height: 0.6rem;
+    margin: 0.25rem 0;
+    display: inline-block;
 }
+
 .tab-line a {
-  font-size: 0.175rem;
-  color: #0090F5;
-  padding: 0.125rem 0.45rem;
-  display: block;
-  float: left;
-  border: 1px solid #0096ff;
-  text-decoration: none;
-}
+    font-size: 0.175rem;
+    color: #0090F5;
+    padding: 0.125rem 0.45rem;
+    display: block;
+    float: left;
+    border: 1px solid #0096ff;
+    text-decoration: none;
+}
+
 .tab-line a.active {
-  background: #0096FF;
-  color: #fff;
+    background: #0096FF;
+    color: #fff;
 }
+
 @media screen and (max-width: 1024px) {
-  html {
-    font-size: 42px !important;
-  }
+    html {
+        font-size: 42px !important;
+    }
 }
+
 @media screen and (min-width: 1920) {
-  html {
-    font-size: 80px !important;
-  }
+    html {
+        font-size: 80px !important;
+    }
 }
+
 .line.panel {
-  text-align: center;
+    text-align: center;
 }
+
 .line.panel .chart {
-  height: 50%;
+    height: 50%;
 }
+
 .hotAnalysis.panel .chart,
 .data_fluctuation.panel .chart {
-  height: 62%;
-  margin-top: 0.5rem;
+    height: 62%;
+    margin-top: 0.5rem;
 }
+
+
 /* 搜索区域样式 */
+
 .filterSec {
-  position: absolute;
-  bottom: -0.0625rem;
-  right: 0;
-  font-size: 0.175rem;
+    position: absolute;
+    bottom: -0.0625rem;
+    right: 0;
+    font-size: 0.175rem;
 }
+
 .filterSec select,
 .filterSec input {
-  border: 1px solid #64A7D4;
-  width: 2.1rem;
-  height: 0.35rem;
-  color: #fff;
-  line-height: 0.35rem;
-  background: rgba(0, 0, 0, 0);
-  margin-right: 0.4rem;
-  font-size: 0.175rem;
-}
+    border: 1px solid #64A7D4;
+    width: 2.1rem;
+    height: 0.35rem;
+    color: #fff;
+    line-height: 0.35rem;
+    background: rgba(0, 0, 0, 0);
+    margin-right: 0.4rem;
+    font-size: 0.175rem;
+}
+
 .filterSec span {
-  display: inline-block;
-  margin-right: 0.125rem;
-  font-size: 0.175rem;
+    display: inline-block;
+    margin-right: 0.125rem;
+    font-size: 0.175rem;
 }
+
 a.button {
-  padding: 0 0.15rem;
-  height: 0.35rem;
-  line-height: 0.35rem;
-  text-align: center;
-  border: 1px solid #64A7D4;
-  color: #fff;
-  display: inline-block;
-  text-decoration: none;
-  background: #034854;
-  cursor: pointer;
-  font-size: 0.175rem;
-}
+    padding: 0 0.15rem;
+    height: 0.35rem;
+    line-height: 0.35rem;
+    text-align: center;
+    border: 1px solid #64A7D4;
+    color: #fff;
+    display: inline-block;
+    text-decoration: none;
+    background: #034854;
+    cursor: pointer;
+    font-size: 0.175rem;
+}
+
 a.button img {
-  width: 0.25rem;
-  margin-top: -2px;
-  position: relative;
-  vertical-align: middle;
+    width: 0.25rem;
+    margin-top: -2px;
+    position: relative;
+    vertical-align: middle;
 }
+
 a.button text {
-  vertical-align: middle;
-  display: inline-block;
+    vertical-align: middle;
+    display: inline-block;
 }
+
 .mainbox.water .topSection .column:first-child {
-  flex: 1;
+    flex: 1;
 }
+
 .mainbox.water .topSection .column:nth-child(2) {
-  flex: 2;
-  margin: 0 0.275rem;
-  overflow: hidden;
+    flex: 2;
+    margin: 0 0.275rem;
+    overflow: hidden;
 }
+
 .mainbox.water .topSection .column:last-child {
-  flex: 1;
+    flex: 1;
 }
+
 .water .divergence .chart {
-  margin-top: 0.5rem;
-  height: 60%;
+    margin-top: 0.5rem;
+    height: 60%;
 }
+
 .water .hiddenCheck .chart {
-  margin-top: 0.5rem;
-  height: 60%;
+    margin-top: 0.5rem;
+    height: 60%;
 }
+
 .summary {
-  color: #fff;
-  font-size: 0.175rem;
-  text-align: left;
-  width: 100%;
-  margin-top: 0.1rem;
-  height: 0.825rem;
-  padding: 0.15rem;
-  background-image: url(../images/summary-bg.png);
-  background-size: 100% 100%;
-  background-repeat: no-repeat;
-  display: flex;
-  align-items: top;
-}
+    color: #fff;
+    font-size: 0.175rem;
+    text-align: left;
+    width: 100%;
+    margin-top: 0.1rem;
+    height: 0.825rem;
+    padding: 0.15rem;
+    background-image: url(../images/summary-bg.png);
+    background-size: 100% 100%;
+    background-repeat: no-repeat;
+    display: flex;
+    align-items: top;
+}
+
 .summary div:first-child {
-  width: 0.85rem;
+    width: 0.85rem;
 }
+
 .summary div:last-child {
-  width: calc(100% - 0.85rem);
-  padding-right: 0.2rem;
-  height: 0.57rem;
-  overflow: auto;
+    width: calc(100% - 0.85rem);
+    padding-right: 0.2rem;
+    height: 0.57rem;
+    overflow: auto;
 }
+
 .summary p {
-  line-height: 1.38;
+    line-height: 1.38;
 }
+
 .summary div {
-  display: inline-block;
+    display: inline-block;
 }
+
 .bar-3d .chart {
-  height: 50%;
-  background: url(../images/3d-bg.png);
-  background-repeat: no-repeat;
-  background-position: 50% 80%;
+    height: 50%;
+    background: url(../images/3d-bg.png);
+    background-repeat: no-repeat;
+    background-position: 50% 80%;
 }
+
 .bar-3d ul {
-  color: #fff;
-  font-size: 0.2rem;
-  display: flex;
-  margin: 0.5625rem 0;
+    color: #fff;
+    font-size: 0.2rem;
+    display: flex;
+    margin: 0.5625rem 0;
 }
+
 .bar-3d ul li {
-  flex: 1;
-  text-align: center;
+    flex: 1;
+    text-align: center;
 }
+
 .bar-3d ul li .num {
-  font-size: 0.375rem;
-  margin-bottom: 0.1rem;
-  font-family: IMPACT;
+    font-size: 0.375rem;
+    margin-bottom: 0.1rem;
+    font-family: IMPACT;
 }
+
 .bar-3d ul li .num.total {
-  color: #FF3E3E;
+    color: #FF3E3E;
 }
+
 .bar-3d ul li .num.unsolve {
-  color: #FA742B;
+    color: #FA742B;
 }
+
 .bar-3d ul li .num.solved {
-  color: #1DD9E5;
+    color: #1DD9E5;
 }
+
 .exportBox {
-  position: absolute;
-  left: 0;
-  right: 0;
-  bottom: 1rem;
-  top: 1rem;
-  font-size: 14px;
-  width: 100%;
-  height: 90%;
-  z-index: -1;
-}
+    position: absolute;
+    left: 0;
+    right: 0;
+    bottom: 1rem;
+    top: 1rem;
+    font-size: 14px;
+    width: 100%;
+    height: 90%;
+    z-index: -1;
+}
+
 .exportBox table,
 .exportBox table tr th,
 .exportBox table tr td {
-  border: 1px solid #eee;
-  margin: 0 auto;
+    border: 1px solid #eee;
+    margin: 0 auto;
 }
+
 .exportBox td,
 .exportBox th {
-  padding: 3px 0;
+    padding: 3px 0;
 }
+
 .exportBox .exportContainer {
-  z-index: 19000;
-  width: 650px;
-  margin: 0 auto;
-  box-shadow: #888888 0px 0px 4px;
-  display: block;
-  background: #1f2833;
-  color: #fff;
-  height: calc(100% - 1rem);
-  overflow: auto;
-  padding: 15px;
-}
+    z-index: 19000;
+    width: 650px;
+    margin: 0 auto;
+    box-shadow: #888888 0px 0px 4px;
+    display: block;
+    background: #1f2833;
+    color: #fff;
+    height: calc(100% - 1rem);
+    overflow: auto;
+    padding: 15px;
+}
+
 .exportBox h3.title {
-  text-align: center;
-  background: #1f2833;
-  font-size: 16px;
+    text-align: center;
+    background: #1f2833;
+    font-size: 16px;
 }
+
 .exportBox section {
-  padding-bottom: 30px;
+    padding-bottom: 30px;
 }
+
 .exportBox section .table-sub {
-  margin-top: 10px;
-  font-size: 13px;
+    margin-top: 10px;
+    font-size: 13px;
 }
+
 .exportBox section .innerChart {
-  width: 100%;
-  height: 220px;
-  padding: 10px 0;
+    width: 100%;
+    height: 220px;
+    padding: 10px 0;
 }
+
 .exportBox section .summary2 {
-  display: flex;
-  margin: 0 10px;
-  line-height: 1.5;
+    display: flex;
+    margin: 0 10px;
+    line-height: 1.5;
 }
-.exportBox section .summary2 > div:first-child {
-  width: 60px;
+
+.exportBox section .summary2>div:first-child {
+    width: 60px;
 }
-.exportBox section .summary2 > div:last-child {
-  width: calc(100% - 30px);
+
+.exportBox section .summary2>div:last-child {
+    width: calc(100% - 30px);
 }
+
 .exportBox section .big-tit {
-  padding: 10px 0;
-  background: #1f2833;
+    padding: 10px 0;
+    background: #1f2833;
 }
+
 .exportBox .section1 {
-  background: #1f2833;
+    background: #1f2833;
 }
+
 .layui-layer-title {
-  background: #081A32 !important;
-  color: #fff !important;
-  border-bottom: 1px solid #1E9FFF !important;
+    background: #081A32 !important;
+    color: #fff !important;
+    border-bottom: 1px solid #1E9FFF !important;
 }
+
 .layui-layer {
-  background: #072442 !important;
-  color: #fff;
+    background: #072442 !important;
+    color: #fff;
 }
+
 .layui-layer-ico {
-  border-radius: 50%;
+    border-radius: 50%;
 }
+
 .layui-layer-btn .layui-layer-btn0 {
-  font-size: 0.3rem;
-}
+    font-size: 0.2rem;
+}

+ 16 - 0
eleFireIndex.html

@@ -355,6 +355,22 @@
 
 
     <script>
+        layui.use('layer', function() {
+            var layer = layui.layer;
+            layer.open({
+                icon: 7,
+                title: '提示信息',
+                content: '您有报告未读,请查看!',
+                yes: function(index, layero) {
+
+
+                    //do something
+                    layer.close(index); //如果设定了yes回调,需进行手工关闭
+                    // location.reload();
+                }
+            });
+
+        });
     </script>
 </body>
 

+ 208 - 229
js/eleFire.js

@@ -155,7 +155,7 @@ function getListData(queryParam = {}) {
                     let startValue = 0;
                     let endValue = 0;
                     let legendData = [];
-                    let k = typeof internalDiameterRatio !== 'undefined' ? (1 - internalDiameterRatio) / (1 + internalDiameterRatio) : 1 / 3;
+                    let k = typeof internalDiameterRatio !== 'undefined' ? 1 : 1 / 3;
 
                     // 为每一个饼图数据,生成一个 series-surface 配置
                     for (let i = 0; i < pieData.length; i++) {
@@ -234,13 +234,13 @@ function getListData(queryParam = {}) {
 
 
                             show: false,
-                            boxHeight: 40,
+                            boxHeight: 50,
                             top: '-10%',
                             // bottom: '80%',
                             // environment: '../images/3d-bg.png', //aa背景色
 
                             viewControl: {
-                                distance: 170, //aa距离
+                                distance: 260, //aa距离
                                 alpha: 21, //aa角度
                                 beta: 60, //aa角度
                                 zoomSensitivity: false //是否开启缩放和平移
@@ -740,11 +740,14 @@ function getListData(queryParam = {}) {
                 });
             })();
 
-            // 折线图定制 (热老化分析)
+            // 柱状图定制 (热老化分析) 
+
+
             (function() {
 
                 let thermal_aging = result.RESULT[0].thermal_aging;
 
+
                 // 结论数据渲染
                 var items = '';
                 var conclusion = thermal_aging.conclusion
@@ -755,12 +758,14 @@ function getListData(queryParam = {}) {
                 $('.hotAnalysis .summaryDetail').html(items);
 
 
-                // 热老化
+
                 let a = [];
                 let b = [];
                 let c = [];
                 let data_time = [];
                 let visualization = thermal_aging.visualization;
+                console.log('visualization')
+                console.log(visualization)
                 visualization.forEach(function(item, index) {
                     a.push(item.generation_temperature)
                     b.push(item.ambient_temperature)
@@ -783,25 +788,42 @@ function getListData(queryParam = {}) {
                     return data;
                 }();
 
+
+
+
                 // 1. 实例化对象
                 var myChart = echarts.init(document.querySelector(".hotAnalysis .chart"));
+                // var xData = position;
+
+                var xData = xData;
+
                 // 2.指定配置
                 var option = {
-
-                    color: ["#05EEE7", "#9999FF", "#FE92B3"], // 通过这个color修改三条线的颜色
+                    backgroundColor: 'transparent',
+                    color: ['rgba(5,238,231,.6)', 'rgba(153,153,255,.6)', 'rgba(255,147,180,.6)'],
                     tooltip: {
-                        trigger: "axis",
-                        textStyle: {
-                            align: 'left' //图例左对齐
-                        },
                         backgroundColor: '#12DFE0',
-                        // formatter: '{a0}: {c0}°C<br />{a1}: {c1}°C<br />{a2}: {c2}°C<br />时间:' + chooseTime + ''
+                        //提示框组件
+                        trigger: 'axis',
                         formatter: function(params) {
-                            var res = params[0].seriesName + ':' + params[0].value + '°C<br />' + params[1].seriesName + ':' + params[1].value + '°C<br />' + params[2].seriesName + ':' + params[2].value + '°C<br />时间:' + data_time[params[2].dataIndex];
+                            var res = params[0].seriesName + ':' + params[0].value + '°C<br />' + params[1].seriesName + ':' + params[1].value + '°C<br />' + params[2].seriesName + ':' + params[2].value + '°C<br />' + data_time[params[1].dataIndex];
                             return res;
                         },
-
-
+                        axisPointer: {
+                            type: 'shadow',
+                        },
+                        textStyle: {
+                            fontStyle: 'normal',
+                            fontFamily: '微软雅黑',
+                            align: 'left' //图例左对齐
+                        },
+                    },
+                    grid: {
+                        left: '0',
+                        right: '0',
+                        bottom: '40',
+                        top: '0',
+                        containLabel: true,
                     },
                     legend: {
                         // 如果series 对象有name 值,则 legend可以不用写data
@@ -814,130 +836,119 @@ function getListData(queryParam = {}) {
                         },
                         top: "bottom",
                     },
-                    grid: {
-                        top: "0%",
-                        left: "1%",
-                        right: "1%",
-                        bottom: "15%",
-                        show: true, // 显示边框
-                        borderWidth: '0', //去除边框
-                        containLabel: true // 包含刻度文字在内
+
+
+                    //添加横线滚动条
+                    dataZoom: {
+                        start: 0, //默认为0
+                        end: 100 - 1500 / 10, //默认为100
+                        type: 'slider',
+                        show: xData.length > 4 ? true : false,
+                        xAxisIndex: [0],
+                        handleSize: 0, //滑动条的 左右2个滑动条的大小
+                        height: 4, //组件高度
+                        left: 20, //左边的距离
+                        right: 20, //右边的距离
+                        bottom: 30, //右边的距离
+                        handleColor: '#CBBCDB', //h滑动图标的颜色
+                        handleStyle: {
+                            borderColor: "#CBBCDB",
+                            borderWidth: "1",
+                            shadowBlur: 2,
+                            background: "#CBBCDB",
+                            shadowColor: "#CBBCDB",
+                        },
+                        textStyle: {
+                            color: "#fff"
+                        },
+
+                        backgroundColor: 'rgba(37, 46, 100, 0.45)', //两边未选中的滑动条区域的颜色
+                        showDataShadow: false, //是否显示数据阴影 默认auto
+                        // showDetail: false, //即拖拽时候是否显示详细数值信息 默认true
+                        filterMode: 'filter',
                     },
 
-                    xAxis: {
-                        type: "category",
-                        boundaryGap: false,
+
+                    xAxis: [{
+                        type: 'category',
+                        //	boundaryGap: true,//坐标轴两边留白
                         data: xData,
-                        axisTick: {
-                            show: false // 去除刻度线
-                        },
                         axisLabel: {
-                            color: "#AADDFF" // 文本颜色
+                            interval: 0,
+                            // rotate: 340,
+                            // formatter: function(val) {
+                            //     return val.split("").join("\n");
+                            // }, //横轴信息文字竖直显示
+                            textStyle: {
+                                color: '#AADDFF',
+                                fontStyle: 'normal',
+                                fontFamily: '微软雅黑',
+                                fontSize: 12,
+                            },
                         },
-                        axisLine: {
-                            show: false // 去除轴线
-                        }
-                    },
 
-                    yAxis: {
-                        type: "value",
                         axisTick: {
-                            show: false // 去除刻度线
+                            //坐标轴刻度相关设置。
+                            show: false,
                         },
-                        axisLabel: {
-                            show: false // 去除文本
+                        axisLine: {
+                            //坐标轴轴线相关设置
+
                         },
+                        splitLine: {
+                            //坐标轴在 grid 区域中的分隔线。
+                            show: false,
+                        },
+                    }, ],
+                    yAxis: [{
+                        type: 'value',
+
+                        axisLabel: false,
                         axisLine: {
-                            show: false // 去除轴线
+                            show: false,
+                        },
+                        axisTick: {
+                            show: false,
                         },
                         splitLine: {
+                            show: true,
                             lineStyle: {
-                                color: "#012f4a" // 分割线颜色
-                            }
-                        }
-                    },
+                                color: ['#204C6F'],
+                                opacity: 0.3,
+                            },
+                        },
+                        boundaryGap: ['0', '1%'],
+                    }],
                     series: [{
-                            symbol: "none",
-                            name: "线缆产生的温度",
-                            type: "line",
-                            smooth: true, // true 可以让我们的折线显示带有弧度
-                            areaStyle: {
-                                normal: {
-                                    color: new echarts.graphic.LinearGradient(
-                                        0,
-                                        0,
-                                        0,
-                                        1, [{
-                                                offset: 0,
-                                                color: "rgba(5,238,231,.6)"
-                                            },
-                                            {
-                                                offset: 0.8,
-                                                color: "rgba(5,238,231, 0.4)"
-                                            }
-                                        ],
-                                        false
-                                    ),
-                                }
+                            name: '线缆产生的温度',
+                            type: 'bar',
+                            data: sortData[0].data[0],
+                            barMaxWidth: '11',
+                            itemStyle: {
+                                borderColor: "#05EEE7",
                             },
-
-                            data: sortData[0].data[0]
+                            barGap: '50%',
                         },
                         {
-                            symbol: "none",
-                            name: "环境温度",
-                            type: "line",
-                            smooth: true,
-                            areaStyle: {
-                                normal: {
-                                    color: new echarts.graphic.LinearGradient(
-                                        0,
-                                        0,
-                                        0,
-                                        1, [{
-                                                offset: 0,
-                                                color: "rgba(153,153,255,.6)"
-                                            },
-                                            {
-                                                offset: 0.8,
-                                                color: "rgba(153,153,255, 0.4)"
-                                            }
-                                        ],
-                                        false
-                                    ),
-                                }
+                            name: '环境温度',
+                            type: 'bar',
+                            data: sortData[0].data[1],
+                            barMaxWidth: '11',
+                            itemStyle: {
+                                borderColor: "#9999FF"
                             },
-
-                            data: sortData[0].data[1]
                         },
                         {
-                            symbol: "none",
-                            name: "线缆温度",
-                            type: "line",
-                            smooth: true,
-                            areaStyle: {
-                                normal: {
-                                    color: new echarts.graphic.LinearGradient(
-                                        0,
-                                        0,
-                                        0,
-                                        1, [{
-                                                offset: 0,
-                                                color: "rgba(255,147,180,.6)"
-                                            },
-                                            {
-                                                offset: 0.8,
-                                                color: "rgba(255,147,180, 0.4)"
-                                            }
-                                        ],
-                                        false
-                                    ),
-                                }
+                            name: '线缆温度',
+                            type: 'bar',
+                            data: sortData[0].data[2],
+                            barMaxWidth: '11',
+                            itemStyle: {
+                                borderColor: "#FE92B3",
                             },
+                        },
 
-                            data: sortData[0].data[2]
-                        }
-                    ]
+                    ],
                 };
 
                 myChart.setOption(option);
@@ -2142,19 +2153,31 @@ function getListData(queryParam = {}) {
                 // 2.指定配置
                 var option = {
 
-                    color: ["#05EEE7", "#9999FF", "#FE92B3"], // 通过这个color修改三条线的颜色
+                    backgroundColor: 'transparent',
+                    color: ['rgba(5,238,231,.6)', 'rgba(153,153,255,.6)', 'rgba(255,147,180,.6)'],
                     tooltip: {
-                        trigger: "axis",
-                        textStyle: {
-                            align: 'left' //图例左对齐
-                        },
                         backgroundColor: '#12DFE0',
-                        // formatter: '{a0}: {c0}°C<br />{a1}: {c1}°C<br />{a2}: {c2}°C<br />时间:' + chooseTime + ''
+                        //提示框组件
+                        trigger: 'axis',
                         formatter: function(params) {
-                            var res = params[0].seriesName + ':' + params[0].value + '°C<br />' + params[1].seriesName + ':' + params[1].value + '°C<br />' + params[1].seriesName + ':' + params[1].value + '°C<br />时间:' + data_time[params[0].dataIndex];
+                            var res = params[0].seriesName + ':' + params[0].value + '°C<br />' + params[1].seriesName + ':' + params[1].value + '°C<br />' + params[2].seriesName + ':' + params[2].value + '°C<br />' + data_time[params[1].dataIndex];
                             return res;
                         },
-
+                        axisPointer: {
+                            type: 'shadow',
+                        },
+                        textStyle: {
+                            fontStyle: 'normal',
+                            fontFamily: '微软雅黑',
+                            align: 'left' //图例左对齐
+                        },
+                    },
+                    grid: {
+                        left: '0',
+                        right: '0',
+                        bottom: '40',
+                        top: '0',
+                        containLabel: true,
                     },
                     legend: {
                         // 如果series 对象有name 值,则 legend可以不用写data
@@ -2167,131 +2190,87 @@ function getListData(queryParam = {}) {
                         },
                         top: "bottom",
                     },
-                    grid: {
-                        top: "0%",
-                        left: "1%",
-                        right: "1%",
-                        bottom: "15%",
-                        show: true, // 显示边框
-                        borderWidth: '0', //去除边框
-                        containLabel: true // 包含刻度文字在内
-                    },
 
-                    xAxis: {
-                        type: "category",
-                        boundaryGap: false,
+                    xAxis: [{
+                        type: 'category',
+                        //	boundaryGap: true,//坐标轴两边留白
                         data: xData,
-                        axisTick: {
-                            show: false // 去除刻度线
-                        },
                         axisLabel: {
-                            color: "#AADDFF" // 文本颜色
+                            interval: 0,
+                            // rotate: 340,
+                            // formatter: function(val) {
+                            //     return val.split("").join("\n");
+                            // }, //横轴信息文字竖直显示
+                            textStyle: {
+                                color: '#AADDFF',
+                                fontStyle: 'normal',
+                                fontFamily: '微软雅黑',
+                                fontSize: 12,
+                            },
                         },
-                        axisLine: {
-                            show: false // 去除轴线
-                        }
-                    },
 
-                    yAxis: {
-                        type: "value",
                         axisTick: {
-                            show: false // 去除刻度线
+                            //坐标轴刻度相关设置。
+                            show: false,
                         },
-                        axisLabel: {
-                            show: false // 去除文本
+                        axisLine: {
+                            //坐标轴轴线相关设置
+
                         },
+                        splitLine: {
+                            //坐标轴在 grid 区域中的分隔线。
+                            show: false,
+                        },
+                    }, ],
+                    yAxis: [{
+                        type: 'value',
+
+                        axisLabel: false,
                         axisLine: {
-                            show: false // 去除轴线
+                            show: false,
+                        },
+                        axisTick: {
+                            show: false,
                         },
                         splitLine: {
+                            show: true,
                             lineStyle: {
-                                color: "#aaa", // 分割线颜色
-                                opacity: .2
-                            }
-                        }
-                    },
+                                color: ['#aaa'],
+                                opacity: 0.2,
+                            },
+                        },
+                        boundaryGap: ['0', '1%'],
+                    }],
                     series: [{
-                            symbol: "none",
-                            name: "线缆产生的温度",
-                            type: "line",
-                            smooth: true, // true 可以让我们的折线显示带有弧度
-                            areaStyle: {
-                                normal: {
-                                    color: new echarts.graphic.LinearGradient(
-                                        0,
-                                        0,
-                                        0,
-                                        1, [{
-                                                offset: 0,
-                                                color: "rgba(5,238,231,.6)"
-                                            },
-                                            {
-                                                offset: 0.8,
-                                                color: "rgba(5,238,231, 0.4)"
-                                            }
-                                        ],
-                                        false
-                                    ),
-                                }
+                            name: '线缆产生的温度',
+                            type: 'bar',
+                            data: sortData[0].data[0],
+                            barMaxWidth: '11',
+                            itemStyle: {
+                                borderColor: "#05EEE7",
                             },
-
-                            data: sortData[0].data[0]
+                            barGap: '50%',
                         },
                         {
-                            symbol: "none",
-                            name: "环境温度",
-                            type: "line",
-                            smooth: true,
-                            areaStyle: {
-                                normal: {
-                                    color: new echarts.graphic.LinearGradient(
-                                        0,
-                                        0,
-                                        0,
-                                        1, [{
-                                                offset: 0,
-                                                color: "rgba(153,153,255,.6)"
-                                            },
-                                            {
-                                                offset: 0.8,
-                                                color: "rgba(153,153,255, 0.4)"
-                                            }
-                                        ],
-                                        false
-                                    ),
-                                }
+                            name: '环境温度',
+                            type: 'bar',
+                            data: sortData[0].data[1],
+                            barMaxWidth: '11',
+                            itemStyle: {
+                                borderColor: "#9999FF"
                             },
-
-                            data: sortData[0].data[1]
                         },
                         {
-                            symbol: "none",
-                            name: "线缆温度",
-                            type: "line",
-                            smooth: true,
-                            areaStyle: {
-                                normal: {
-                                    color: new echarts.graphic.LinearGradient(
-                                        0,
-                                        0,
-                                        0,
-                                        1, [{
-                                                offset: 0,
-                                                color: "rgba(255,147,180,.6)"
-                                            },
-                                            {
-                                                offset: 0.8,
-                                                color: "rgba(255,147,180, 0.4)"
-                                            }
-                                        ],
-                                        false
-                                    ),
-                                }
+                            name: '线缆温度',
+                            type: 'bar',
+                            data: sortData[0].data[2],
+                            barMaxWidth: '11',
+                            itemStyle: {
+                                borderColor: "#FE92B3",
                             },
+                        },
 
-                            data: sortData[0].data[2]
-                        }
-                    ]
+                    ],
                 };
 
                 myChart.setOption(option);

+ 3 - 3
js/water.js

@@ -124,7 +124,7 @@ function getListData(queryParam = {}) {
                     let startValue = 0;
                     let endValue = 0;
                     let legendData = [];
-                    let k = typeof internalDiameterRatio !== 'undefined' ? (1 - internalDiameterRatio) / (1 + internalDiameterRatio) : 1 / 3;
+                    let k = typeof internalDiameterRatio !== 'undefined' ? 1 : 1 / 3;
 
                     // 为每一个饼图数据,生成一个 series-surface 配置
                     for (let i = 0; i < pieData.length; i++) {
@@ -201,13 +201,13 @@ function getListData(queryParam = {}) {
                         },
                         grid3D: {
                             show: false,
-                            boxHeight: 40,
+                            boxHeight: 50,
                             top: '-10%',
                             // bottom: '80%',
                             // environment: '../images/3d-bg.png', //aa背景色
 
                             viewControl: {
-                                distance: 170, //aa距离
+                                distance: 260, //aa距离
                                 alpha: 21, //aa角度
                                 beta: 60, //aa角度
                                 zoomSensitivity: false //是否开启缩放和平移