作者 李洪娟

合并分支 'lhj' 到 'master'

Lhj



查看合并请求 !4
1 { 1 {
2 "pages": [ 2 "pages": [
3 "pages/companybox/qiyedetail/qiyedetail", 3 "pages/companybox/qiyedetail/qiyedetail",
  4 + "pages/companybox/defendetail/defendetail",
  5 + "pages/companybox/jichuxinxi/jichuxinxi",
  6 +
  7 + "pages/qiyeyongdian/detail/detail",
4 "pages/qiye/qiye", 8 "pages/qiye/qiye",
5 "pages/changqu/changqu", 9 "pages/changqu/changqu",
6 "pages/login/login", 10 "pages/login/login",
@@ -10,8 +14,9 @@ @@ -10,8 +14,9 @@
10 "pages/logs/logs", 14 "pages/logs/logs",
11 "pages/yujing/yujing", 15 "pages/yujing/yujing",
12 "pages/shebei/shebeidetail/shebeidetail", 16 "pages/shebei/shebeidetail/shebeidetail",
13 - "pages/qiyeyongdian/qyyd/qyyd",  
14 - "pages/qiyeyongdian/detail/detail" 17 + "pages/qiyeyongdian/qyyd/qyyd"
  18 +
  19 +
15 20
16 ], 21 ],
17 "window": { 22 "window": {

404 字节

  1 +import * as echarts from '../../../ec-canvas/echarts';
  2 +
  3 +const app = getApp();
  4 +
  5 +function initChart(canvas, width, height) {
  6 + const chart = echarts.init(canvas, null, {
  7 + width: width,
  8 + height: height
  9 + });
  10 + canvas.setChart(chart);
  11 + var colors = ['#5793f3', '#d14a61', '#675bba'];
  12 + var option = {
  13 + color: colors,
  14 +
  15 + tooltip: {
  16 + trigger: 'none',
  17 + axisPointer: {
  18 + type: 'cross'
  19 + }
  20 + },
  21 + legend: {
  22 + data: ['每月','平均' ]
  23 + },
  24 + grid: {
  25 + top: 70,
  26 + bottom: 50
  27 + },
  28 + xAxis: [
  29 +
  30 + {
  31 + type: 'category',
  32 + axisTick: {
  33 + alignWithLabel: true
  34 + },
  35 + axisLine: {
  36 + onZero: false,
  37 + lineStyle: {
  38 + color: colors[1]
  39 + },
  40 +
  41 + },
  42 + axisPointer: {
  43 + label: {
  44 + formatter: function (params) {
  45 + return '降水量 ' + params.value
  46 + + (params.seriesData.length ? ':' + params.seriesData[0].data : '');
  47 + }
  48 + }
  49 + },
  50 + data: ["18.11", "18.12", "19.01", "19.02", "19.03", "19.04", "19.05", "19.06", "19.07"],
  51 + axisLabel: {
  52 + interval: 0,
  53 + },
  54 + smooth: true,
  55 + },
  56 + {
  57 + type: 'category',
  58 + axisTick: {
  59 + alignWithLabel: true
  60 + },
  61 + axisLine: {
  62 + onZero: false,
  63 + lineStyle: {
  64 + color: colors[0]
  65 + }
  66 + },
  67 + axisPointer: {
  68 + label: {
  69 + formatter: function (params) {
  70 + return '降水量 ' + params.value
  71 + + (params.seriesData.length ? ':' + params.seriesData[0].data : '');
  72 + }
  73 + }
  74 + },
  75 +
  76 + }
  77 + ],
  78 + yAxis: [
  79 + {
  80 + type: 'value',
  81 + min:10,
  82 + max:100,
  83 + splitNumber: 10,
  84 +
  85 + }
  86 + ],
  87 + series: [
  88 + {
  89 + name: '平均',
  90 + type: 'line',
  91 + xAxisIndex: 1,
  92 + smooth: true,
  93 + data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 86.6, 96.2, 48.7, 18.8, 6.0, 2.3]
  94 + },
  95 + {
  96 + name: '每月',
  97 + type: 'line',
  98 + smooth: true,
  99 + data: [3.9, 5.9, 11.1, 18.7, 48.3, 69.2, 31.6, 46.6, 55.4, 18.4, 10.3, 0.7]
  100 + }
  101 + ]
  102 + };
  103 +
  104 + chart.setOption(option);
  105 + return chart;
  106 +}
  107 +
  108 +Page({
  109 + onShareAppMessage: function (res) {
  110 + return {
  111 + title: 'ECharts 可以在微信小程序中使用啦!',
  112 + path: '/pages/index/index',
  113 + success: function () { },
  114 + fail: function () { }
  115 + }
  116 + },
  117 + data: {
  118 + ec: {
  119 + onInit: initChart
  120 + }
  121 + },
  122 +
  123 + onReady() { }
  124 +});
  1 +{
  2 + "usingComponents": {
  3 + "ec-canvas": "../../../ec-canvas/ec-canvas"
  4 + }
  5 +}
  1 +
  2 +<view class="container">
  3 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas>
  4 +</view>
  1 +.container{
  2 + width:750rpx;
  3 + height:800rpx;
  4 +}
  5 +
  6 +ec-canvas {
  7 + width: 100%;
  8 + height: 100%;
  9 +}
  1 +// pages/companybox/jichuxinxi/jichuxinxi.js
  2 +Page({
  3 +
  4 + /**
  5 + * 页面的初始数据
  6 + */
  7 + data: {
  8 +
  9 + },
  10 +
  11 + /**
  12 + * 生命周期函数--监听页面加载
  13 + */
  14 + onLoad: function (options) {
  15 +
  16 + },
  17 +
  18 + /**
  19 + * 生命周期函数--监听页面初次渲染完成
  20 + */
  21 + onReady: function () {
  22 +
  23 + },
  24 +
  25 + /**
  26 + * 生命周期函数--监听页面显示
  27 + */
  28 + onShow: function () {
  29 +
  30 + },
  31 +
  32 + /**
  33 + * 生命周期函数--监听页面隐藏
  34 + */
  35 + onHide: function () {
  36 +
  37 + },
  38 +
  39 + /**
  40 + * 生命周期函数--监听页面卸载
  41 + */
  42 + onUnload: function () {
  43 +
  44 + },
  45 +
  46 + /**
  47 + * 页面相关事件处理函数--监听用户下拉动作
  48 + */
  49 + onPullDownRefresh: function () {
  50 +
  51 + },
  52 +
  53 + /**
  54 + * 页面上拉触底事件的处理函数
  55 + */
  56 + onReachBottom: function () {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 用户点击右上角分享
  62 + */
  63 + onShareAppMessage: function () {
  64 +
  65 + }
  66 +})
  1 +{
  2 + "navigationBarTitleText": "无锡万峰金属制品有限公司"
  3 +}
  1 +<!-- <view class="infobox">
  2 + <view class="infoname">无锡万峰金属制品有限公司</view>
  3 +</view> -->
  4 +
  5 +<view class="middle">
  6 + <view class="companyname">无锡万峰金属制品有限公司</view>
  7 + <view class="middlelist">
  8 + <view class="middleitemleft">企业法人</view>
  9 + <view class="middleitemright">王刚</view>
  10 + </view>
  11 + <view class="middlelist">
  12 + <view class="middleitemleft">统一信用代码</view>
  13 + <view class="middleitemright">895597347547548758574</view>
  14 + </view>
  15 + <view class="middlelist">
  16 + <view class="middleitemleft">行业标签</view>
  17 + <view class="middleitemright">金属加工</view>
  18 + </view>
  19 +</view>
  1 +.infoname{
  2 + color:#333333;
  3 + font-size: 34rpx;
  4 + font-weight: bold
  5 +}
  6 +.infobox{
  7 + padding: 40rpx 60rpx;
  8 + box-sizing: border-box
  9 +}
  10 +.middle{
  11 + padding: 40rpx 60rpx;
  12 + box-sizing: border-box;
  13 + /* border-bottom:16rpx solid #F4F4F4 */
  14 +}
  15 +.companyname{
  16 + color:#333333;
  17 + font-size: 34rpx;
  18 + font-weight: bold
  19 +}
  20 +.middlelist{
  21 + display:flex;
  22 + align-items: center;
  23 + margin-top:26rpx;
  24 +
  25 +}
  26 +.middleitemleft{
  27 + width:168rpx;
  28 + color:#777777;
  29 + font-size: 28rpx;
  30 +}
  31 +.middleitemright{
  32 + color:#777777;
  33 + font-size: 28rpx;
  34 + margin-left:24rpx;
  35 +}
@@ -26,7 +26,8 @@ function initChart(canvas, width, height) { @@ -26,7 +26,8 @@ function initChart(canvas, width, height) {
26 }, 26 },
27 { 27 {
28 text: '稳定性:80分', 28 text: '稳定性:80分',
29 - max: 100 29 + max: 100,
  30 +
30 } 31 }
31 32
32 ], 33 ],
@@ -81,6 +82,87 @@ function initChart(canvas, width, height) { @@ -81,6 +82,87 @@ function initChart(canvas, width, height) {
81 return chart; 82 return chart;
82 } 83 }
83 84
  85 +function initChart1(canvas, width, height) {
  86 + const chart = echarts.init(canvas, null, {
  87 + width: width,
  88 + height: height
  89 + });
  90 + canvas.setChart(chart);
  91 +
  92 + var option = {
  93 + title: {
  94 + text: '开平机01每日开工时间',
  95 + left: 'center'
  96 + },
  97 +
  98 +
  99 + toolbox: {
  100 +
  101 + },
  102 + xAxis: {
  103 + type: 'category',
  104 + boundaryGap: false,
  105 + data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30','31'],
  106 + axisLabel: {
  107 + interval:1,
  108 + },
  109 + name:'日期'
  110 +
  111 +
  112 + },
  113 + yAxis: {
  114 + type: 'value',
  115 + axisLabel: {
  116 + formatter: '{value}'
  117 + },
  118 + min:1,
  119 + max:24,
  120 + splitNumber: 24,
  121 + name:'小时'
  122 +
  123 + },
  124 + series: [
  125 + {
  126 + name: '',
  127 + type: 'line',
  128 + smooth: true,
  129 + color:'#FCB237',
  130 + data: [11, 11, 15, 13, 12, 13, 10],
  131 + markPoint: {
  132 + data: [
  133 + { type: 'max', name: '最大值' },
  134 + { type: 'min', name: '最小值' }
  135 + ]
  136 + },
  137 + markLine: {
  138 + data: [
  139 + { type: 'average', name: '平均值' }
  140 + ]
  141 + },
  142 + // areaStyle: {
  143 + // // normal: {
  144 + // // color: '#F8E9DD' //改变区域颜色
  145 + // // }
  146 + // },
  147 + },
  148 +
  149 +
  150 +
  151 +
  152 +
  153 +
  154 + ]
  155 + };
  156 +
  157 + chart.setOption(option);
  158 + return chart;
  159 +}
  160 +
  161 +// 折线图
  162 +
  163 +
  164 +
  165 +
84 Page({ 166 Page({
85 onShareAppMessage: function(res) { 167 onShareAppMessage: function(res) {
86 return { 168 return {
@@ -92,7 +174,15 @@ Page({ @@ -92,7 +174,15 @@ Page({
92 }, 174 },
93 data: { 175 data: {
94 ec: { 176 ec: {
95 - onInit: initChart 177 + onInit: initChart,
  178 +
  179 + // onInit: initChart1
  180 +
  181 + },
  182 + ec1: {
  183 +
  184 + onInit: initChart1
  185 +
96 } 186 }
97 }, 187 },
98 188
1 { 1 {
  2 + "navigationBarTitleText": "无锡万峰金属制品有限公司",
2 "usingComponents": { 3 "usingComponents": {
3 "ec-canvas": "../../../ec-canvas/ec-canvas" 4 "ec-canvas": "../../../ec-canvas/ec-canvas"
4 } 5 }
1 <!--index.wxml--> 1 <!--index.wxml-->
2 2
  3 +<view class="detailbox">
3 <view class="coint"> 4 <view class="coint">
4 -<text class="cointleft">87</text>  
5 -<text class="cointword">分</text> 5 + <text class="cointleft">87</text>
  6 + <text class="cointword">分</text>
6 7
7 </view> 8 </view>
8 <view class="zonghe">综合得分</view> 9 <view class="zonghe">综合得分</view>
9 -<view class="container" > 10 +<view class="container">
10 <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas> 11 <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas>
11 </view> 12 </view>
12 13
@@ -27,3 +28,150 @@ @@ -27,3 +28,150 @@
27 <view class="middleitemright">金属加工</view> 28 <view class="middleitemright">金属加工</view>
28 </view> 29 </view>
29 </view> 30 </view>
  31 +
  32 +<!-- 指数详情 -->
  33 +
  34 +<view class="zhidetailbox">
  35 + <view class="zhititle">指数详情</view>
  36 + <view class="zhilist">
  37 + <view class="zhishuitem">
  38 + <view class="zhilistimg">
  39 + <image src="/img/demo (18).png"></image>
  40 + </view>
  41 + <view class="zhiname">开工</view>
  42 + </view>
  43 + <view class="zhishuitem">
  44 + <view class="zhilistimg dian">
  45 + <image src="/img/demo (19).png"></image>
  46 + </view>
  47 + <view class="zhiname">电量</view>
  48 + </view>
  49 + <view class="zhishuitem">
  50 + <view class="zhilistimg people">
  51 + <image src="/img/demo (20).png"></image>
  52 + </view>
  53 + <view class="zhiname">人员</view>
  54 + </view>
  55 + <view class="zhishuitem">
  56 + <view class="zhilistimg car">
  57 + <image src="/img/demo (21).png"></image>
  58 + </view>
  59 + <view class="zhiname">车辆</view>
  60 + </view>
  61 + <view class="zhishuitem">
  62 + <view class="zhilistimg cheng">
  63 + <image src="/img/demo (22).png"></image>
  64 + </view>
  65 + <view class="zhiname">成品</view>
  66 + </view>
  67 + <view class="zhishuitem">
  68 + <view class="zhilistimg cheng">
  69 + <image src="/img/demo (22).png"></image>
  70 + </view>
  71 + <view class="zhiname">原材料</view>
  72 + </view>
  73 + <view class="zhishuitem">
  74 + <view class="zhilistimg shui">
  75 + <image src="/img/demo (1).png"></image>
  76 + </view>
  77 + <view class="zhiname">水量</view>
  78 + </view>
  79 + <view class="zhishuitem">
  80 + <view class="zhilistimg qi">
  81 + <image src="/img/demo (24).png"></image>
  82 + </view>
  83 + <view class="zhiname">气量</view>
  84 + </view>
  85 + <view class="zhishuitem">
  86 + <view class="zhilistimg wu">
  87 + <image src="/img/demo (23).png"></image>
  88 + </view>
  89 + <view class="zhiname">排污</view>
  90 + </view>
  91 + </view>
  92 +</view>
  93 +
  94 +<!-- 企业月报 -->
  95 +
  96 +<view class="monthbao">
  97 + <view class="monthbaotop">
  98 + <view class="monthleft">企业月报</view>
  99 + <view class="monthright">
  100 + <view class="rightword">查看详情</view>
  101 + <view class="rightimg">
  102 + <image src="/img/yourow.png"></image>
  103 + </view>
  104 + </view>
  105 + </view>
  106 +
  107 +</view>
  108 +
  109 +<view class="containerzhe">
  110 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
  111 +</view>
  112 +
  113 +<!-- 预警设置 -->
  114 +
  115 +<view class="monthbaotop yujing">
  116 + <view class="monthleft">预警设置</view>
  117 + <view class="monthright">
  118 + <view class="rightword">查看详情</view>
  119 + <view class="rightimg">
  120 + <image src="/img/yourow.png"></image>
  121 + </view>
  122 + </view>
  123 +</view>
  124 +<!-- 预警列表 -->
  125 +
  126 +<view class='yujinglist'>
  127 + <view class="yujingitem">
  128 + <view class="yujingcontent kaigong">
  129 + 连续不开工时长(天):5
  130 + </view>
  131 + <view class="yujingcontent tuisong">
  132 + 推送人员:张三、李四、王五
  133 + </view>
  134 + <view class="yubottom">
  135 + <view class="yuleft">修改</view>
  136 + <view class="yuright">删除</view>
  137 + </view>
  138 + </view>
  139 + <view class="yujingitem">
  140 + <view class="yujingcontent kaigong">
  141 + 连续不开工时长(天):5
  142 + </view>
  143 + <view class="yujingcontent tuisong">
  144 + 推送人员:张三、李四、王五
  145 + </view>
  146 + <view class="yubottom">
  147 + <view class="yuleft">修改</view>
  148 + <view class="yuright">删除</view>
  149 + </view>
  150 + </view>
  151 + <view class="yujingitem">
  152 + <view class="yujingcontent kaigong">
  153 + 连续不开工时长(天):5
  154 + </view>
  155 + <view class="yujingcontent tuisong">
  156 + 推送人员:张三、李四、王五
  157 + </view>
  158 + <view class="yubottom">
  159 + <view class="yuleft">修改</view>
  160 + <view class="yuright">删除</view>
  161 + </view>
  162 + </view>
  163 + <view class="yujingitem">
  164 + <view class="yujingcontent kaigong">
  165 + 连续不开工时长(天):5
  166 + </view>
  167 + <view class="yujingcontent tuisong">
  168 + 推送人员:张三、李四、王五
  169 + </view>
  170 + <view class="yubottom">
  171 + <view class="yuleft">修改</view>
  172 + <view class="yuright">删除</view>
  173 + </view>
  174 + </view>
  175 +</view>
  176 +</view>
  177 +
@@ -2,8 +2,12 @@ @@ -2,8 +2,12 @@
2 2
3 page { 3 page {
4 height: 100%; 4 height: 100%;
  5 + background: #F4F4F4;
  6 +}
  7 +.detailbox{
  8 + background: #fff;
  9 + overflow: hidden
5 } 10 }
6 -  
7 .container { 11 .container {
8 width: 750rpx; 12 width: 750rpx;
9 height: 382rpx; 13 height: 382rpx;
@@ -12,6 +16,10 @@ page { @@ -12,6 +16,10 @@ page {
12 justify-content: center; 16 justify-content: center;
13 align-items: center; 17 align-items: center;
14 } 18 }
  19 +.tuisong{
  20 + color:#666666;
  21 + font-size: 24rpx;
  22 +}
15 23
16 ec-canvas { 24 ec-canvas {
17 width: 100%; 25 width: 100%;
@@ -71,3 +79,144 @@ ec-canvas { @@ -71,3 +79,144 @@ ec-canvas {
71 font-size: 28rpx; 79 font-size: 28rpx;
72 margin-left:24rpx; 80 margin-left:24rpx;
73 } 81 }
  82 +.zhidetailbox{
  83 + padding: 40rpx 32rpx 64rpx 32rpx;
  84 + box-sizing: border-box;
  85 + border-bottom:16rpx solid #f5f5f5;
  86 +}
  87 +.zhilist{
  88 + display:flex;
  89 + align-items: center;
  90 + flex-wrap: wrap;
  91 + margin-top:18rpx;
  92 +
  93 +}
  94 +.zhishuitem{
  95 + width:138rpx;
  96 + display:flex;
  97 + flex-direction: column;
  98 + justify-content: space-between;
  99 + align-items: center;
  100 + margin-top:32rpx;
  101 +
  102 +}
  103 +.zhilistimg{
  104 + width:32rpx;
  105 + height:45rpx;
  106 + font-size: 0
  107 +}
  108 +.dian{
  109 + width:48rpx;
  110 + height:52rpx;
  111 +}
  112 +.people{
  113 + width:38rpx;
  114 + height:48rpx;
  115 +}
  116 +.car{
  117 + width:48rpx;
  118 + height:42rpx;
  119 +}
  120 +.cheng{
  121 + width:47rpx;
  122 + height:48rpx;
  123 +}
  124 +.shui{
  125 + width:44rpx;
  126 + height:44rpx;
  127 +}
  128 +.qi{
  129 + width:45rpx;
  130 + height:45rpx;
  131 +}
  132 +.wu{
  133 + width:45rpx;
  134 + height:45rpx;
  135 +}
  136 +.zhititle{
  137 + color:#333;
  138 + font-size: 34rpx;
  139 + font-weight: bold
  140 +}
  141 +.zhiname{
  142 + color:#333;
  143 + font-size:23rpx;
  144 + margin-top:16rpx;
  145 +}
  146 +.monthbao{
  147 + padding: 41rpx 32rpx;
  148 + box-sizing: border-box;
  149 +}
  150 +.monthbaotop{
  151 + display:flex;
  152 + align-items: center;
  153 + justify-content: space-between
  154 +}
  155 +.monthright{
  156 + display:flex;
  157 + align-items: center
  158 +}
  159 +.rightimg{
  160 + width:16rpx;
  161 + height:32rpx;
  162 + font-size: 0
  163 +}
  164 +.monthleft{
  165 + color:#333;
  166 + font-size: 34rpx;
  167 + font-weight: bold;
  168 +}
  169 +.rightword{
  170 + color:#A0A0A0;
  171 + font-size:25rpx;
  172 + margin-right:10rpx;
  173 +}
  174 +.containerzhe{
  175 + width:750rpx;
  176 + height:778rpx;
  177 + margin:50rpx auto 0;
  178 +}
  179 +.yujing{
  180 + padding: 55rpx 32rpx;
  181 + box-sizing: border-box;
  182 + border-top:1rpx solid #f5f5f5;
  183 + border-bottom:8rpx solid #f5f5f5;
  184 +
  185 +}
  186 +.yujingcontent{
  187 + padding: 31rpx 32rpx;
  188 + box-sizing: border-box;
  189 + border-bottom:1rpx solid #f5f5f5;
  190 +}
  191 +.kaigong{
  192 + color:#333333;
  193 + font-size: 32rpx;
  194 + font-weight: bold
  195 +}
  196 +.yubottom{
  197 + display:flex;
  198 + align-items: center
  199 +}
  200 +.yuleft{
  201 + color:#FF9400;
  202 + font-size: 30rpx;
  203 + width:375rpx;
  204 + padding: 31rpx 0;
  205 + box-sizing: border-box;
  206 + text-align: center;
  207 + border-right: 1rpx solid #f5f5f5;
  208 +
  209 +}
  210 +.yuright{
  211 + color:#FF3038;
  212 + font-size: 30rpx;
  213 + width:375rpx;
  214 + padding: 31rpx 0;
  215 + box-sizing: border-box;
  216 + text-align: center;
  217 +
  218 +
  219 +}
  220 +.yujingitem{
  221 + border-bottom:8rpx solid #f5f5f5
  222 +}