var linexData = ['06-01', '06-02', '06-03', '06-04', '06-05', '06-06', '06-07']; var lineyData = [22, 23, 23, 23, 24, 25, 28]; var lineyData2 = [16.5, 17.5, 18, 16.5, 18, 19, 21]; var lineyData3 = [11, 12, 13, 10, 12, 13, 14]; $(document).ready(function () { var html = ""; if(depotList){ $.each(depotList, function (index, item) { html += '
货位信息
    '; html += '
  • '+item.name+'
    名称
  • '; html += '
  • '+item.depotStatusName+'
    货位状态
  • '; html += '
  • '+item.storageReal+'t
    粮食储量
  • '; html += '
  • '+item.foodVarietyName+'
    粮食品种
  • '; html += '
  • '+item.foodTypeName+'
    粮食性质
  • '; html += '
  • '+item.foodLevelName+'
    粮食等级
  • '; html += '
  • '+item.foodYear+'
    粮食年份
  • '; html += '
  • '+item.storeDate+'
    入仓时间
  • '; html += '
  • '+item.depotTypeName+'
    仓房类型
'; html += '
粮情三温图
'; html += '
粮情信息
'; html += '
  • '; html += '
    '+item.inTemp+' °C
    仓内温度
    '; html += '
    '+item.outTemp+' °C
    仓外温度
  • '; html += '
  • '; html += '
    '+item.inHumidity+' %
    仓内湿度
    '; html += '
    '+item.outHumidity+' %
    仓外湿度
'; html += '
  • '+item.maxTemp+'°C
    粮高温
  • '; html += '
  • '+item.aveTemp+'°C
    粮均温
  • '; html += '
  • '+item.minTemp+'°C
    粮低温
'+item.grainDate+'
'; html += '
质检信息
    '; html += '
  • '+item.foodVarietyName+'
    粮食品种
  • '; html += '
  • --
    检验人
  • '; html += '
  • --
    检验日期
  • '; html += '
  • --%
    水分
  • '; html += '
  • --%
    杂质
  • '; html += '
  • --%
    不完善类
'; html += '
气体信息
    '; html += '
  • '; html += '
    '+item.perPh3+'ppm
    磷化氢
  • '; html += '
  • '; html += '
    '+item.perO2+'%
    氧气
  • '; html += '
  • '; html += '
    '+item.perCo2+'ppm
    二氧化碳
  • '+item.gasDate+'
'; html += '
保管员
    '; html += '
  • 保管员
    '+item.storeKeeperName+'
  • '; html += '
  • 电话
    '+item.storeKeeperPhone+'
  • '; html += '
  • 部门
    --
  • '; html += '
  • 最近打卡
    --
'; html += '
'; }) }else{ html += '
货位信息
    '; html += '
  • --
    名称
  • '; html += '
  • --
    货位状态
  • '; html += '
  • --t
    粮食储量
  • '; html += '
  • --
    粮食品种
  • '; html += '
  • --
    粮食性质
  • '; html += '
  • --
    粮食等级
  • '; html += '
  • --
    粮食年份
  • '; html += '
  • --
    入仓时间
  • '; html += '
  • --
    仓房类型
'; html += '
粮情三温图
'; html += '
粮情信息
'; html += '
  • '; html += '
    -- °C
    仓内温度
    '; html += '
    -- °C
    仓外温度
  • '; html += '
  • '; html += '
    -- %
    仓内湿度
    '; html += '
    -- %
    仓外湿度
'; html += '
  • --°C
    粮高温
  • '; html += '
  • --°C
    粮均温
  • '; html += '
  • --°C
    粮低温
'; html += '
质检信息
    '; html += '
  • --
    粮食品种
  • '; html += '
  • --
    检验人
  • '; html += '
  • --
    检验日期
  • '; html += '
  • --%
    水分
  • '; html += '
  • --%
    杂质
  • '; html += '
  • --%
    不完善类
'; html += '
气体信息
    '; html += '
  • '; html += '
    --ppm
    磷化氢
  • '; html += '
  • '; html += '
    --%
    氧气
  • '; html += '
  • '; html += '
    --ppm
    二氧化碳
'; html += '
保管员
    '; html += '
  • 保管员
    --
  • '; html += '
  • 电话
    --
  • '; html += '
  • 部门
    --
  • '; html += '
  • 最近打卡
    --
'; html += '
'; initLineEchart('lineChart1', linexData, lineyData, lineyData2, lineyData3) } $("#depotList").html(html); //初始化三温图 $.each(depotList, function (index, item) { initLineEchart('lineChart' + index, linexData, lineyData, lineyData2, lineyData3); }) var swiper = new Swiper('.m-swiperl2 .swiper', { slidesPerView: 1, // autoplay: { // delay: 2500, // disableOnInteraction: false, // }, loop: true, autoplay:{ delay: 5000, disableOnInteraction: false }, pagination: { el: '.g-swbtnl .swiper-pagination', type: 'fraction', }, navigation: { nextEl: '.g-swbtnl .swiper-button-next', prevEl: '.g-swbtnl .swiper-button-prev', }, }); }); function initLineEchart(id, xData, yData, yData2, yData3) { var echart = null var dom = document.getElementById(id); echart = echarts.init(dom); var option = { tooltip: { trigger: 'axis', }, legend: { right: '0', top: '2%', itemWidth: 12, itemHeight: 12, icon: 'circle', textStyle: { color: '#91ceff', fontSize: 18, paddingLeft: 5, } }, grid: { top: '15%', left: '3%', right: '0', bottom: '3%', containLabel: true }, xAxis: { type: "category", axisLine: { show: true, lineStyle: { color: "rgba(255,255,255,.6)", width: 1 } }, axisTick: { show: false }, axisLabel: { show: true, color: "#fff", fontSize: 20, }, splitLine: { show: false, lineStyle: { color: "rgba(255,255,255,.2)", } }, data: xData }, yAxis: [{ name: '(°C)', min: 0, max: 40, interval: 10, nameTextStyle: { color: 'rgba(145,206,255,.5)', fontSize: 18, padding: [0, 0, 5, -30] }, type: 'value', axisTick: { show: false }, axisLine: { show: false, }, axisLabel: { color: "#91ceff", //X轴文字颜色 fontSize: 18, }, splitLine: { show: true, lineStyle: { type: "dashed", color: "rgba(255,255,255,.3)", } }, }], series: [{ name: '粮高温', type: 'line', symbol: 'none', color: '#ffd12b', lineStyle: { width: 3 }, areaStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(255, 209, 43,0.3)' }, { offset: 1, color: 'rgba(255, 209, 43,0)' }, ]), }, label: { show: false, }, data: yData, }, { name: '粮均温', type: 'line', symbol: 'none', color: '#02afff', lineStyle: { width: 3 }, areaStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgba(2, 175, 255, .3)' }, { offset: 1, color: 'rgba(2, 175, 255,0)' }, ]), }, label: { show: false, }, data: yData2, }, { name: '粮低温', type: 'line', symbol: 'none', color: '#39ff02', lineStyle: { width: 3 }, areaStyle: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ offset: 0, color: 'rgb(97,154,82)' }, { offset: 1, color: 'rgba(2, 175, 255,0)' }, ]), }, label: { show: false, }, data: yData3, }] }; if (option && typeof option === "object") { echart.setOption(option, true); } }