作者 李洪娟

合并分支 'lhj' 到 'master'

Lhj



查看合并请求 !13
正在显示 46 个修改的文件 包含 3601 行增加385 行删除

要显示太多修改。

为保证性能只显示 46 of 46+ 个文件。

@@ -61,6 +61,13 @@ App({ @@ -61,6 +61,13 @@ App({
61 let day = date.getDate(); 61 let day = date.getDate();
62 return date.getFullYear() + '-' + (month > 9 ? month : ('0' + month)) 62 return date.getFullYear() + '-' + (month > 9 ? month : ('0' + month))
63 }, 63 },
  64 + //结束时间
  65 + endate(){
  66 + let date = new Date();
  67 + let month = date.getMonth() + 1;
  68 + let day = date.getDate()+1;
  69 + return date.getFullYear() + '.' + (month > 9 ? month : ('0' + month)) + '.' + (day > 9 ? day : ('0' + day));
  70 + },
64 globalData: { 71 globalData: {
65 userInfo: null 72 userInfo: null
66 } 73 }
1 { 1 {
2 "pages": [ 2 "pages": [
3 - "pages/companybox/zhishudetail/shebei/shebeilist/shebeilist", 3 + "pages/companybox/qiyeyuebao/qiyeyuebao",
4 "pages/companybox/zhishudetail/shebei/shebeidetail/shebeidetail", 4 "pages/companybox/zhishudetail/shebei/shebeidetail/shebeidetail",
5 - "pages/changqu/changqu",  
6 - "pages/companybox/zhishudetail/yuanliaomsg/yuanliao/yuanliao",  
7 - "pages/companybox/zhishudetail/qiyeyongdian/detail/detail", 5 + "pages/companybox/zhishudetail/shebei/shebeilist/shebeilist",
8 "pages/companybox/qiyedetail/qiyedetail", 6 "pages/companybox/qiyedetail/qiyedetail",
  7 + "pages/companybox/zhishudetail/member/member",
  8 + "pages/companybox/zhishudetail/car/car",
  9 +
9 "pages/companybox/defendetail/defendetail", 10 "pages/companybox/defendetail/defendetail",
10 - "pages/companybox/jichuxinxi/jichuxinxi", 11 + "pages/companybox/zhishudetail/chengpin/chengpin",
  12 + "pages/companybox/zhishudetail/yuanliaomsg/yuanliao/yuanliao",
11 "pages/qiye/qiye", 13 "pages/qiye/qiye",
  14 + "pages/changqu/changqu",
  15 +
  16 +
  17 + "pages/companybox/zhishudetail/yuanliaomsg/yuanliaoDetail/yuanliaoDetail",
  18 +
  19 + "pages/companybox/zhishudetail/qiyeyongdian/detail/detail",
  20 +
  21 +
  22 +
  23 + "pages/companybox/jichuxinxi/jichuxinxi",
12 "pages/login/login", 24 "pages/login/login",
13 "pages/mine/mine", 25 "pages/mine/mine",
14 "pages/index/index", 26 "pages/index/index",
@@ -62,5 +74,10 @@ @@ -62,5 +74,10 @@
62 } 74 }
63 ] 75 ]
64 }, 76 },
  77 + "permission": {
  78 + "scope.userLocation": {
  79 + "desc": "你的位置信息将用于小程序位置接口的效果展示"
  80 + }
  81 + },
65 "sitemapLocation": "sitemap.json" 82 "sitemapLocation": "sitemap.json"
66 } 83 }
@@ -59,6 +59,8 @@ @@ -59,6 +59,8 @@
59 height: 90rpx; 59 height: 90rpx;
60 justify-content: space-between; 60 justify-content: space-between;
61 border-top:1rpx solid #f5f5f5; 61 border-top:1rpx solid #f5f5f5;
  62 + background: #fff;
  63 + z-index:999999
62 /* padding: 0 154rpx; 64 /* padding: 0 154rpx;
63 box-sizing: border-box */ 65 box-sizing: border-box */
64 } 66 }
@@ -6,36 +6,49 @@ Page({ @@ -6,36 +6,49 @@ Page({
6 */ 6 */
7 data: { 7 data: {
8 markers: [{ 8 markers: [{
9 - iconPath: "", 9 + iconPath: "/img/map.png",
10 id: 0, 10 id: 0,
11 - latitude: 23.099994,  
12 - longitude: 113.324520,  
13 - width: 50,  
14 - height: 50  
15 - }],  
16 - polyline: [{  
17 - points: [{  
18 - longitude: 113.3245211,  
19 - latitude: 23.10229  
20 - }, {  
21 - longitude: 113.324520,  
22 - latitude: 23.21229  
23 - }],  
24 - color: "#FF0000DD",  
25 - width: 2,  
26 - dottedLine: true  
27 - }],  
28 - controls: [{  
29 - id: 1,  
30 - iconPath: '',  
31 - position: {  
32 - left: 0,  
33 - top: 300 - 50,  
34 - width: 50,  
35 - height: 50 11 + latitude: 39.908710,
  12 + longitude: 116.397499,
  13 + width: 20,
  14 + height: 20,
  15 + id:1
  16 + },
  17 +
  18 + {
  19 + iconPath: "/img/map2.png",
  20 + id: 0,
  21 + latitude: 39.957306,
  22 + longitude: 116.371027,
  23 + width: 20,
  24 + height: 20,
  25 + id:2
36 }, 26 },
37 - clickable: true  
38 - }] 27 + {
  28 + iconPath: "/img/map3.png",
  29 + id: 0,
  30 + latitude: 39.907020,
  31 + longitude: 116.400680,
  32 + width: 20,
  33 + height: 20,
  34 + id: 2
  35 + },
  36 + {
  37 + iconPath: "/img/map2.png",
  38 + id: 0,
  39 + latitude: 39.905160,
  40 + longitude: 116.393924,
  41 + width: 20,
  42 + height: 20,
  43 + id: 2
  44 + }
  45 +
  46 +
  47 + ],
  48 +
  49 + longitude:'116.397499',
  50 + latitude:'39.908710'
  51 +
39 }, 52 },
40 53
41 /** 54 /**
@@ -45,16 +58,15 @@ Page({ @@ -45,16 +58,15 @@ Page({
45 58
46 }, 59 },
47 60
48 - regionchange(e) {  
49 - console.log(e.type)  
50 - }, 61 +// 跳转到对应的企业详情页面
51 markertap(e) { 62 markertap(e) {
  63 + console.log(e)
52 console.log(e.markerId) 64 console.log(e.markerId)
  65 + wx.navigateTo({
  66 + url: '/pages/companybox/qiyedetail/qiyedetail',
  67 + })
53 }, 68 },
54 - controltap(e) {  
55 - console.log(e.controlId)  
56 - },  
57 - 69 +
58 /** 70 /**
59 * 生命周期函数--监听页面初次渲染完成 71 * 生命周期函数--监听页面初次渲染完成
60 */ 72 */
@@ -7,5 +7,7 @@ @@ -7,5 +7,7 @@
7 <input placeholder='湖南' placeholder-class='searchword'/> 7 <input placeholder='湖南' placeholder-class='searchword'/>
8 </view> 8 </view>
9 </view> 9 </view>
10 - <map id="map" longitude="113.324520" latitude="23.099994" scale="14" controls="{{controls}}" bindcontroltap="controltap" markers="{{markers}}" bindmarkertap="markertap" polyline="{{polyline}}" bindregionchange="regionchange" show-location style="width: 100%;height:100% "></map> 10 + <map id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="14" controls="{{controls}}" bindcontroltap="controltap" markers="{{markers}}" bindmarkertap="markertap" polyline="{{polyline}}" bindregionchange="regionchange" show-location style="width: 100%;height:100% "></map>
  11 +
  12 +
11 </view> 13 </view>
  1 +// pages/member/member.js
1 import * as echarts from '../../../ec-canvas/echarts'; 2 import * as echarts from '../../../ec-canvas/echarts';
  3 +const app = getApp()
2 4
3 -const app = getApp();  
4 5
5 -function initChart(canvas, width, height) { 6 +function initChart1(canvas, width, height) {
6 const chart = echarts.init(canvas, null, { 7 const chart = echarts.init(canvas, null, {
7 width: width, 8 width: width,
8 height: height 9 height: height
9 }); 10 });
10 canvas.setChart(chart); 11 canvas.setChart(chart);
11 - var colors = ['#5793f3', '#d14a61', '#675bba'];  
12 - var option = {  
13 - color: colors,  
14 12
  13 + var option = {
  14 + title: {
  15 + text: '',
  16 + subtext: ''
  17 + },
  18 + textStyle: {
  19 + fontSize: 12
  20 + },
15 tooltip: { 21 tooltip: {
16 - trigger: 'none',  
17 - axisPointer: {  
18 - type: 'cross'  
19 - } 22 + trigger: 'axis'
20 }, 23 },
21 legend: { 24 legend: {
22 - data: ['每月','平均' ] 25 + data: ['每月', '平均']
23 }, 26 },
24 - grid: {  
25 - top: 70,  
26 - bottom: 50 27 + toolbox: {
  28 +
  29 +
27 }, 30 },
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, 31 + xAxis: {
  32 + type: 'category',
  33 + boundaryGap: false,
  34 + data: ['18.11', '18.12', '19.01', '19.02', '19.03', '19.04', '19.05', '19.06', '19.07'],
  35 + axisLabel: {
  36 + interval: 1,
55 }, 37 },
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 - }, 38 + },
  39 + yAxis: {
  40 + type: 'value',
  41 + min: 10,
  42 + max: 100,
  43 + splitNumber: 10,
75 44
76 - }  
77 - ],  
78 - yAxis: [  
79 - {  
80 - type: 'value',  
81 - min:10,  
82 - max:100,  
83 - splitNumber: 10,  
84 45
  46 + axisLabel: {
  47 + formatter: '{value}'
85 } 48 }
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] 49 + },
  50 + series: [{
  51 + name: '每月',
  52 + type: 'line',
  53 + color: '#FF5345',
  54 + data: [11, 11, 15, 13, 12, 13, 10],
  55 + markPoint: {
  56 + data: [{
  57 + type: 'max',
  58 + name: '最大值'
  59 + },
  60 + {
  61 + type: 'min',
  62 + name: '最小值'
  63 + }
  64 + ]
  65 + },
  66 + markLine: {
  67 + data: [{
  68 + type: 'average',
  69 + name: '平均值'
  70 + }]
  71 + }
  72 + },
  73 + {
  74 + name: '平均',
  75 + type: 'line',
  76 + color: '#6497F5',
  77 + data: [78, 18, 44, 33, 25, 45, 67],
  78 + markPoint: {
  79 + data: [{
  80 + name: '周最低',
  81 + value: 10,
  82 + xAxis: 1,
  83 + yAxis: 10
  84 + }]
94 }, 85 },
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] 86 + markLine: {
  87 + data: [{
  88 + type: 'average',
  89 + name: '平均值'
  90 + },
  91 + [{
  92 + symbol: 'none',
  93 + x: '90%',
  94 + yAxis: 'max'
  95 + }, {
  96 + symbol: 'circle',
  97 + label: {
  98 + normal: {
  99 + position: 'start',
  100 + formatter: '最大值'
  101 + }
  102 + },
  103 + type: 'max',
  104 + name: '最高点'
  105 + }]
  106 + ]
100 } 107 }
  108 + }
101 ] 109 ]
102 }; 110 };
103 111
  112 +
104 chart.setOption(option); 113 chart.setOption(option);
105 return chart; 114 return chart;
106 } 115 }
107 116
108 Page({ 117 Page({
  118 +
109 onShareAppMessage: function (res) { 119 onShareAppMessage: function (res) {
110 return { 120 return {
111 title: 'ECharts 可以在微信小程序中使用啦!', 121 title: 'ECharts 可以在微信小程序中使用啦!',
112 - path: '/pages/index/index', 122 + path: '',
113 success: function () { }, 123 success: function () { },
114 fail: function () { } 124 fail: function () { }
115 } 125 }
116 }, 126 },
  127 +
  128 + /**
  129 + * 页面的初始数据
  130 + */
117 data: { 131 data: {
118 - ec: {  
119 - onInit: initChart 132 + state: 1,
  133 + timestate: 1,
  134 + ec1: {
  135 + onInit: initChart1,
  136 + },
  137 + statedate: '',
  138 + showdate: "",
  139 + watertime: '',
  140 + timesel: 1,
  141 + timearr: [
  142 +
  143 +
  144 + ],
  145 + date: '',
  146 + datePickerValue: ['', '', ''],
  147 + datePickerIsShow: false,
  148 + datechu: false,
  149 + currentdate: true,
  150 + //开始日期
  151 + startdate: '',
  152 + //结束日期
  153 + enddate: '',
  154 +
  155 + // 车辆状况日期
  156 + showModal: false,
  157 + monthList: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  158 + time: '',
  159 + year: ''
  160 +
  161 + },
  162 +
  163 + /**
  164 + * 生命周期函数--监听页面加载
  165 + */
  166 + onLoad: function (options) {
  167 + this.setData({
  168 + statedate: app.monthnowDate(),
  169 + watertime: app.newnowDate() + '-' + app.endate(),
  170 + startdate: app.newnowDate(),
  171 + enddate: app.endate()
  172 + })
  173 +
  174 +
  175 +
  176 + //默认车辆状况日期
  177 + var date = new Date();
  178 + var month = date.getMonth() + 1;
  179 + var year = date.getFullYear();
  180 + this.setData({
  181 + showdate: year + '年' + month + '月'
  182 + })
  183 + if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
  184 + if (month < 10) {
  185 + this.setData({
  186 + time: "(" + year + "." + "0" + month + ".01" + "-2019." + '0' + month + ".31" + ")"
  187 + })
  188 + } else {
  189 + this.setData({
  190 + time: "(" + year + "." + month + ".01" + "-2019." + month + ".31" + ")"
  191 + })
  192 + }
  193 +
  194 + } else {
  195 + if (month < 10) {
  196 + this.setData({
  197 + time: "(" + year + "." + "0" + month + ".01" + "-2019." + '0' + month + ".30" + ")"
  198 + })
  199 + } else {
  200 + this.setData({
  201 + time: "(" + year + "." + month + ".01" + "-2019." + month + ".30" + ")"
  202 + })
  203 + }
  204 +
  205 + }
  206 +
  207 + },
  208 +
  209 + //车辆状况日期
  210 + choice(e) {
  211 +
  212 + //默认显示当前月份
  213 +
  214 +
  215 + this.setData({
  216 + showt: false
  217 + })
  218 +
  219 + var date = new Date();
  220 +
  221 + var year = date.getFullYear()
  222 + let index = e.currentTarget.dataset.id;
  223 + index = index + 1
  224 + if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) {
  225 + if (month < 10) {
  226 + this.setData({
  227 + time: "(" + year + "." + "0" + index + ".01" + "-2019." + '0' + index + ".31" + ")"
  228 + })
  229 + } else {
  230 + this.setData({
  231 + time: "(" + year + "." + index + ".01" + "-2019." + index + ".31" + ")"
  232 + })
  233 + }
  234 +
  235 + } else {
  236 + if (index < 10) {
  237 + this.setData({
  238 + time: "(" + year + "." + "0" + index + ".01" + "-2019." + '0' + index + ".30" + ")"
  239 + })
  240 + } else {
  241 + this.setData({
  242 + time: "(" + year + "." + index + ".01" + "-2019." + index + ".30" + ")"
  243 + })
  244 + }
  245 +
120 } 246 }
  247 + this.setData({
  248 + changeColor: index - 1,
  249 + showdate: year + '年' + index + '月'
  250 +
  251 + })
  252 +
  253 + },
  254 + three() {
  255 + this.setData({
  256 + time: '近30天',
  257 + showt: !this.data.showt,
  258 + changeColor: -1
  259 + })
  260 + },
  261 + toShowModal(e) {
  262 + this.setData({
  263 + showModal: true
  264 +
  265 + })
  266 +
  267 + var date = new Date();
  268 +
  269 + var mon = date.getMonth();
  270 + console.log(mon)
  271 + this.setData({
  272 + changeColor: mon
  273 + })
  274 + },
  275 +
  276 + hideModal() {
  277 + this.setData({
  278 + showModal: false
  279 + });
  280 + },
  281 +
  282 + showDatePicker: function (e) {
  283 + // this.data.datePicker.show(this);
  284 + this.setData({
  285 + datePickerIsShow: true,
  286 + });
  287 + },
  288 +
  289 + datePickerOnSureClick: function (e) {
  290 + console.log('datePickerOnSureClick');
  291 +
  292 + if (this.data.timesel == 1) {
  293 + console.log(e);
  294 + this.setData({
  295 + date: `${e.detail.value[0]}${e.detail.value[1]}${e.detail.value[2]}日`,
  296 + datePickerValue: e.detail.value,
  297 + datePickerIsShow: false,
  298 + currentdate: false,
  299 +
  300 + startdate: e.detail.value[0] + '.' + e.detail.value[1] + "." + e.detail.value[2]
  301 + });
  302 + } else {
  303 + console.log(e);
  304 + this.setData({
  305 + date: `${e.detail.value[0]}${e.detail.value[1]}${e.detail.value[2]}日`,
  306 + datePickerValue: e.detail.value,
  307 + datePickerIsShow: false,
  308 + currentdate: false,
  309 +
  310 + enddate: e.detail.value[0] + '.' + e.detail.value[1] + "." + e.detail.value[2]
  311 + });
  312 + }
  313 +
  314 + },
  315 +
  316 + datePickerOnCancelClick: function (event) {
  317 + console.log('datePickerOnCancelClick');
  318 + console.log(event);
  319 + this.setData({
  320 + datePickerIsShow: false,
  321 +
  322 + currentdate: false,
  323 +
  324 + });
  325 + },
  326 + changedate(e) {
  327 + console.log(e)
  328 + },
  329 + // 选择设备切换
  330 + selectshebei(e) {
  331 + this.setData({
  332 + state: e.currentTarget.dataset.id,
  333 +
  334 + })
  335 + // if (e.currentdate.dataset.id == 1) {
  336 + // this.setData({
  337 + // ec1: {
  338 + // onInit: initChart1,
  339 + // },
  340 + // })
  341 + // }
  342 + },
  343 +
  344 + // 显示日期
  345 + datexianshi() {
  346 + this.setData({
  347 + datechu: true,
  348 + currentdate: true
  349 + })
  350 +
  351 + //获取年
  352 + var date = new Date();
  353 + var obj = {}
  354 + var year = date.getFullYear();
  355 + var month = date.getMonth() + 1;
  356 + if (month < 10) {
  357 + month = '0' + month
  358 + }
  359 +
  360 + var day = date.getDate();
  361 + if (day < 10) {
  362 + day = "0" + day
  363 + }
  364 + console.log()
  365 + if (typeof (day) == 'number') {
  366 + day = day.toString()
  367 + }
  368 + console.log(typeof (day))
  369 + this.setData({
  370 + datePickerValue: [year, month, day],
  371 + })
  372 +
  373 + },
  374 +
  375 +
  376 + // 选择时间和摄像头切换
  377 + seltime(e) {
  378 + this.setData({
  379 + timestate: e.currentTarget.dataset.id
  380 + })
  381 + },
  382 +
  383 + //开始时间和结束时间切换
  384 + xuanshijan(e) {
  385 + this.setData({
  386 + timesel: e.currentTarget.dataset.time,
  387 + currentdate: true
  388 + })
  389 +
  390 + this.datexianshi()
  391 + },
  392 +
  393 +
  394 + //确定选择开始日期和结束日期
  395 + qudingxuandate() {
  396 + this.setData({
  397 + datechu: false,
  398 + watertime: this.data.startdate + '-' + this.data.enddate
  399 + })
  400 + },
  401 + /**
  402 + * 生命周期函数--监听页面初次渲染完成
  403 + */
  404 + onReady: function () {
  405 +
  406 + },
  407 +
  408 + /**
  409 + * 生命周期函数--监听页面显示
  410 + */
  411 + onShow: function () {
  412 +
  413 +
  414 +
  415 +
  416 +
  417 + },
  418 +
  419 + /**
  420 + * 生命周期函数--监听页面隐藏
  421 + */
  422 + onHide: function () {
  423 +
  424 + },
  425 +
  426 + /**
  427 + * 生命周期函数--监听页面卸载
  428 + */
  429 + onUnload: function () {
  430 +
  431 + },
  432 +
  433 + /**
  434 + * 页面相关事件处理函数--监听用户下拉动作
  435 + */
  436 + onPullDownRefresh: function () {
  437 +
121 }, 438 },
122 439
123 - onReady() { }  
124 -});  
  440 + /**
  441 + * 页面上拉触底事件的处理函数
  442 + */
  443 + onReachBottom: function () {
  444 +
  445 + },
  446 +
  447 + /**
  448 + * 用户点击右上角分享
  449 + */
  450 + onShareAppMessage: function () {
  451 +
  452 + }
  453 +})
1 { 1 {
2 "usingComponents": { 2 "usingComponents": {
3 - "ec-canvas": "../../../ec-canvas/ec-canvas" 3 + "ec-canvas": "../../../ec-canvas/ec-canvas",
  4 + "date-picker": "../../../components/date-picker/date-picker"
4 } 5 }
5 } 6 }
  1 +<!--日期弹出层 -->
  2 +<view class="register" wx:if="{{datechu}}">
  3 +
  4 + <view class="timewrap">
  5 + <view class="detailhead">
  6 + <view class="detailname {{timestate==1?'selactive':''}}" bindtap="seltime" data-id="1">选择时间</view>
  7 + <view class="detailname {{timestate==2?'selactive':''}}" bindtap="seltime" data-id="2">选摄像头</view>
  8 + </view>
  9 +
  10 + <!-- 开始时间和结束时间 -->
  11 +
  12 + <view class="timetwo">
  13 + <view class="timebetin" bindtap="xuanshijan" data-time="1">
  14 +
  15 + <view class="timetop {{timesel==1?'seltimeactive':''}}">开始时间</view>
  16 + <view class="timebottom {{timesel==1?'selnameactive':''}}">{{startdate}}</view>
  17 + </view>
  18 + <view class="timebetin" bindtap="xuanshijan" data-time="2">
  19 +
  20 + <view class="timetop {{timesel==2?'seltimeactive':''}}">结束时间</view>
  21 + <view class="timebottom {{timesel==2?'selnameactive':''}}">{{enddate}}</view>
  22 + </view>
  23 + </view>
  24 +
  25 + <view class="timebox" wx:if="{{currentdate}}">
  26 + <view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key="">
  27 + <view class="itemcontent">{{item.year}}</view>
  28 + <view class="itemcontent">{{item.month}}</view>
  29 + <view class="itemcontent">{{item.day}}</view>
  30 + </view>
  31 +
  32 +
  33 + </view>
  34 + <view class="qudingdate" wx:else bindtap='qudingxuandate'>确定</view>
  35 +
  36 +
  37 + <view wx:if="{{currentdate}}">
  38 +
  39 + <date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" />
  40 +
  41 + </view>
  42 + </view>
  43 +</view>
  44 +
  45 +
  46 +
  47 +
  48 +
  49 +
  50 +
  51 +
  52 +<!-- 车辆状况 -->
  53 +
  54 +<view class="peoplestate" wx:if="{{state==1}}">
  55 + <view class="date" bindtap="datexianshi">
  56 + <view class="dateleft">
  57 + <image src="/img/row.png"></image>
  58 + </view>
  59 + <view class="datetime">
  60 + <view class="datesel">
  61 + {{watertime}}
  62 + </view>
  63 +
  64 + <view class="datepic">
  65 + <image src="/img/row.png"></image>
  66 + </view>
  67 + </view>
  68 +
  69 + <view class="dateright">
  70 + <image src="/img/row.png"></image>
  71 + </view>
  72 + </view>
  73 +
  74 +
  75 +
  76 +
  77 +
  78 + <view class="containerzhe">
  79 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
  80 + </view>
  81 +
  82 +
  83 +
  84 +
  85 +</view>
1 86
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; 1 +
  2 +
  3 +.detailhead {
  4 + display: flex;
  5 + align-items: center;
  6 + justify-content: space-around;
  7 + padding: 20rpx 69rpx;
  8 + box-sizing: border-box;
  9 + border-bottom: 1rpx solid #f5f5f5;
  10 +}
  11 +
  12 +.detailname {
  13 + color: #999;
  14 + font-size: 28rpx;
  15 +}
  16 +
  17 +.selactive {
  18 + position: relative;
  19 +}
  20 +
  21 +.selactive::after {
  22 + display: block;
  23 + content: '';
  24 + width: 60rpx;
  25 + height: 1rpx;
  26 + border: 1rpx solid #ff9400;
  27 + position: absolute;
  28 + left: 50%;
  29 + right: 50%;
  30 + transform: translate(-50%);
  31 + bottom: -20rpx;
  32 +}
  33 +
  34 +.date {
  35 + display: flex;
  36 + align-items: center;
  37 + justify-content: space-between;
  38 + height: 70rpx;
  39 + background: #f3f5f8;
  40 + padding: 0 31rpx;
  41 + box-sizing: border-box;
  42 +}
  43 +
  44 +.dateleft {
  45 + width: 23rpx;
  46 + height: 23rpx;
  47 + font-size: 0;
  48 + transform: rotate(180deg);
  49 +}
  50 +
  51 +.dateright {
  52 + width: 23rpx;
  53 + height: 23rpx;
  54 + font-size: 0;
  55 +}
  56 +
  57 +.datetime {
  58 + display: flex;
  59 + align-items: center;
  60 +}
  61 +
  62 +.datepic {
  63 + width: 16rpx;
  64 + height: 16rpx;
  65 + font-size: 0;
  66 + transform: rotate(90deg);
  67 + margin-left: 12rpx;
  68 +}
  69 +
  70 +.datesel {
  71 + color: #666;
  72 + font-size: 28rpx;
  73 +}
  74 +
  75 +.shebeinum {
  76 + color: #333;
  77 + font-size: 32rpx;
  78 + font-weight: bold;
  79 + padding: 40rpx 0 0 30rpx;
  80 + box-sizing: border-box;
  81 + border-top: 1rpx solid #f5f5f5;
  82 + position: relative;
  83 +}
  84 +
  85 +.she {
  86 + margin-left: 18rpx;
  87 +}
  88 +
  89 +.shebeinum::before {
  90 + content: '';
  91 + display: block;
  92 + width: 8rpx;
  93 + height: 33rpx;
  94 + background: #ff9400ff;
  95 + position: absolute;
  96 + top: 43rpx;
  97 + left: 30rpx;
  98 +}
  99 +
  100 +.containerzhe {
  101 + width: 750rpx;
  102 + height: 500rpx;
  103 + margin-top:50rpx;
  104 +}
  105 +
  106 +.datetime {
  107 + color: #333;
  108 + font-size: 28rpx;
  109 + display: flex;
  110 + justify-content: center;
  111 +}
  112 +
  113 +.timewrap {
  114 + background: #fff;
  115 + /* height: 700rpx; */
  116 + padding-bottom: 40rpx;
  117 + box-sizing: border-box
4 } 118 }
5 119
6 -ec-canvas {  
7 - width: 100%;  
8 - height: 100%;  
9 -}  
  120 +.timetwo {
  121 + display: flex;
  122 + align-items: center;
  123 + padding: 60rpx 100rpx 50rpx;
  124 + box-sizing: border-box;
  125 + justify-content: space-between;
  126 +}
  127 +
  128 +.timebetin {
  129 + display: flex;
  130 + flex-direction: column;
  131 + justify-content: center;
  132 + align-items: center;
  133 +}
  134 +
  135 +.timetop {
  136 + color: #999;
  137 + font-size: 24rpx;
  138 +}
  139 +
  140 +.timebottom {
  141 + color: #999;
  142 + font-size: 32rpx;
  143 + margin-top: 10rpx;
  144 +}
  145 +
  146 +.seltimeactive {
  147 + color: #ff9400;
  148 +}
  149 +
  150 +.selnameactive {
  151 + color: #333;
  152 +}
  153 +
  154 +.timebox {
  155 + width: 580rpx;
  156 + height: 308rpx;
  157 + overflow-y: scroll;
  158 + margin: 0 auto;
  159 +}
  160 +
  161 +.timeboxitem {
  162 + display: flex;
  163 + align-items: center;
  164 + justify-content: space-between;
  165 + padding: 30rpx 78rpx;
  166 + box-sizing: border-box;
  167 + background: #f9f8fe;
  168 + color: #999;
  169 + font-size: 28rpx;
  170 + border-bottom: 1rpx solid #f5f5f5;
  171 +}
  172 +
  173 +.shihead {
  174 + display: flex;
  175 + align-items: center;
  176 + justify-content: space-between;
  177 + height: 100rpx;
  178 + padding: 0 28rpx;
  179 + border-bottom: 1rpx solid #f5f5f5;
  180 +}
  181 +
  182 +.headitem {
  183 + color: #666;
  184 + font-size: 28rpx;
  185 + text-align: left;
  186 +}
  187 +
  188 +.shuiitem {
  189 + display: flex;
  190 + align-items: center;
  191 + justify-content: space-between;
  192 + padding: 34rpx 28rpx;
  193 + box-sizing: border-box;
  194 + border-bottom: 1rpx solid #f5f5f5;
  195 +}
  196 +
  197 +.shuiitemleft {
  198 + color: #333;
  199 + font-size: 24rpx;
  200 + text-align: left;
  201 +}
  202 +
  203 +.shijian {
  204 + width: 60rpx;
  205 +}
  206 +
  207 +.shexiang {
  208 + width: 196rpx;
  209 + overflow: hidden;
  210 + text-overflow: ellipsis;
  211 + white-space: nowrap;
  212 +}
  213 +
  214 +.derition {
  215 + width: 56rpx;
  216 +}
  217 +
  218 +.qudingdate {
  219 + width: 260rpx;
  220 + height: 80rpx;
  221 + background: rgba(255, 148, 0, 1);
  222 + opacity: 1;
  223 + border-radius: 10rpx;
  224 + color:#fff;
  225 + font-size: 30rpx;
  226 + text-align: center;
  227 + line-height: 80rpx;
  228 + margin:8rpx auto 0;
  229 +
  230 +}
@@ -10,15 +10,41 @@ function initChart(canvas, width, height) { @@ -10,15 +10,41 @@ function initChart(canvas, width, height) {
10 canvas.setChart(chart); 10 canvas.setChart(chart);
11 11
12 var option = { 12 var option = {
13 - 13 +
14 tooltip: { 14 tooltip: {
15 trigger: 'axis' 15 trigger: 'axis'
16 }, 16 },
17 17
18 - radar: [{  
19 - indicator: [{ 18 + title: {
  19 + text: '雷达图',
  20 + textStyle: {
  21 + color: 'rgba(221,221,221,1)', //标题颜色
  22 + fontSize: 14,
  23 + lineHeight: 20,
  24 + },
  25 + // 标题的位置,此时放在图的底边
  26 + left: 'center',
  27 + top: 'bottom',
  28 + },
  29 +
  30 +
  31 +
  32 +
  33 + legend: {
  34 + enabled: true
  35 + },
  36 + radar: [
  37 +
  38 +
  39 + {
  40 + indicator: [
  41 +
  42 + {
20 text: '生产:90分', 43 text: '生产:90分',
21 - max: 100 44 + max: 100,
  45 +
  46 +
  47 +
22 }, 48 },
23 { 49 {
24 text: '预警:60分', 50 text: '预警:60分',
@@ -27,47 +53,53 @@ function initChart(canvas, width, height) { @@ -27,47 +53,53 @@ function initChart(canvas, width, height) {
27 { 53 {
28 text: '稳定性:80分', 54 text: '稳定性:80分',
29 max: 100, 55 max: 100,
30 -  
31 } 56 }
32 57
33 ], 58 ],
  59 +
34 center: ['50%', '60%'], 60 center: ['50%', '60%'],
35 - radius: 80 61 +
  62 + radius: 80,
  63 +
  64 + name: {
  65 + textStyle: {
  66 +
  67 + fontSize: 14
  68 + }
  69 + },
  70 +
36 }, 71 },
37 72
38 73
  74 +
  75 +
39 ], 76 ],
40 series: [{ 77 series: [{
41 type: 'radar', 78 type: 'radar',
42 - symbolSize: 6,  
43 - symbol: 'rect',  
44 - tooltip: {  
45 - trigger: 'item' 79 +
  80 + legend: {
  81 +
  82 +
46 }, 83 },
  84 +
  85 +
47 itemStyle: { 86 itemStyle: {
48 normal: { 87 normal: {
49 color: '#FBCB77', 88 color: '#FBCB77',
50 areaStyle: { 89 areaStyle: {
51 type: 'default', 90 type: 'default',
52 - color: '#FBCB77' 91 + color: '#FBCB77',
53 92
54 }, 93 },
55 - lineStyle:{  
56 - color:'#FBCB77',  
57 - 94 + lineStyle: {
  95 + color: '#FBCB77',
  96 +
58 } 97 }
59 } 98 }
60 }, 99 },
61 data: [{ 100 data: [{
62 value: [60, 73, 85], 101 value: [60, 73, 85],
63 - itemStyle: {  
64 - normal: {  
65 - areaStyle: {  
66 - type: 'default',  
67 - color: '#FBCB77'  
68 - }  
69 - }  
70 - } 102 +
71 // name: '某软件' 103 // name: '某软件'
72 }] 104 }]
73 }, 105 },
@@ -77,6 +109,12 @@ function initChart(canvas, width, height) { @@ -77,6 +109,12 @@ function initChart(canvas, width, height) {
77 ] 109 ]
78 }; 110 };
79 111
  112 +
  113 +
  114 +
  115 +
  116 +
  117 +
80 chart.setOption(option); 118 chart.setOption(option);
81 119
82 return chart; 120 return chart;
@@ -94,19 +132,22 @@ function initChart1(canvas, width, height) { @@ -94,19 +132,22 @@ function initChart1(canvas, width, height) {
94 text: '开平机01每日开工时间', 132 text: '开平机01每日开工时间',
95 left: 'center' 133 left: 'center'
96 }, 134 },
97 -  
98 - 135 +
  136 +
  137 +
  138 +
  139 +
99 toolbox: { 140 toolbox: {
100 - 141 +
101 }, 142 },
102 xAxis: { 143 xAxis: {
103 type: 'category', 144 type: 'category',
104 boundaryGap: false, 145 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'], 146 + 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: { 147 axisLabel: {
107 - interval:1, 148 + interval: 1,
108 }, 149 },
109 - name:'日期' 150 + name: '日期'
110 151
111 152
112 }, 153 },
@@ -115,29 +156,34 @@ function initChart1(canvas, width, height) { @@ -115,29 +156,34 @@ function initChart1(canvas, width, height) {
115 axisLabel: { 156 axisLabel: {
116 formatter: '{value}' 157 formatter: '{value}'
117 }, 158 },
118 - min:1,  
119 - max:24, 159 + min: 1,
  160 + max: 24,
120 splitNumber: 24, 161 splitNumber: 24,
121 - name:'小时' 162 + name: '小时'
122 163
123 }, 164 },
124 - series: [  
125 - { 165 + series: [{
126 name: '', 166 name: '',
127 type: 'line', 167 type: 'line',
128 smooth: true, 168 smooth: true,
129 - color:'#FCB237', 169 + color: '#FCB237',
130 data: [11, 11, 15, 13, 12, 13, 10], 170 data: [11, 11, 15, 13, 12, 13, 10],
131 markPoint: { 171 markPoint: {
132 - data: [  
133 - { type: 'max', name: '最大值' },  
134 - { type: 'min', name: '最小值' } 172 + data: [{
  173 + type: 'max',
  174 + name: '最大值'
  175 + },
  176 + {
  177 + type: 'min',
  178 + name: '最小值'
  179 + }
135 ] 180 ]
136 }, 181 },
137 markLine: { 182 markLine: {
138 - data: [  
139 - { type: 'average', name: '平均值' }  
140 - ] 183 + data: [{
  184 + type: 'average',
  185 + name: '平均值'
  186 + }]
141 }, 187 },
142 // areaStyle: { 188 // areaStyle: {
143 // // normal: { 189 // // normal: {
@@ -145,7 +191,7 @@ function initChart1(canvas, width, height) { @@ -145,7 +191,7 @@ function initChart1(canvas, width, height) {
145 // // } 191 // // }
146 // }, 192 // },
147 }, 193 },
148 - 194 +
149 ] 195 ]
150 }; 196 };
151 197
@@ -169,22 +215,29 @@ Page({ @@ -169,22 +215,29 @@ Page({
169 }, 215 },
170 data: { 216 data: {
171 ec: { 217 ec: {
172 - onInit: initChart,  
173 - 218 + onInit: initChart,
  219 +
174 // onInit: initChart1 220 // onInit: initChart1
175 - 221 +
176 }, 222 },
177 - ec1: {  
178 -  
179 - onInit: initChart1 223 + ec1: {
  224 +
  225 + onInit: initChart1
180 226
181 } 227 }
182 }, 228 },
183 - onload(){ 229 + onload() {
184 230
185 }, 231 },
186 232
187 - dian(){ 233 + //跳转得分页面
  234 + godefen() {
  235 + wx.navigateTo({
  236 + url: '/pages/companybox/defendetail/defendetail',
  237 + })
  238 + },
  239 +
  240 + dian() {
188 wx.navigateTo({ 241 wx.navigateTo({
189 url: '/pages/qiyeyongdian/qyyd/qyyd', 242 url: '/pages/qiyeyongdian/qyyd/qyyd',
190 }) 243 })
1 <!--index.wxml--> 1 <!--index.wxml-->
2 2
3 <view class="detailbox"> 3 <view class="detailbox">
4 -<view class="coint"> 4 +<view class="coint" bindtap="godefen">
5 <text class="cointleft">87</text> 5 <text class="cointleft">87</text>
6 <text class="cointword">分</text> 6 <text class="cointword">分</text>
7 7
@@ -36,55 +36,55 @@ @@ -36,55 +36,55 @@
36 <view class="zhilist"> 36 <view class="zhilist">
37 <view class="zhishuitem"> 37 <view class="zhishuitem">
38 <view class="zhilistimg"> 38 <view class="zhilistimg">
39 - <image src="/img/demo (18).png"></image> 39 + <image src="/img/demo18.png"></image>
40 </view> 40 </view>
41 <view class="zhiname">开工</view> 41 <view class="zhiname">开工</view>
42 </view> 42 </view>
43 <view class="zhishuitem" bindtap="dian"> 43 <view class="zhishuitem" bindtap="dian">
44 <view class="zhilistimg dian"> 44 <view class="zhilistimg dian">
45 - <image src="/img/demo (19).png"></image> 45 + <image src="/img/demo19.png"></image>
46 </view> 46 </view>
47 <view class="zhiname">电量</view> 47 <view class="zhiname">电量</view>
48 </view> 48 </view>
49 <view class="zhishuitem"> 49 <view class="zhishuitem">
50 <view class="zhilistimg people"> 50 <view class="zhilistimg people">
51 - <image src="/img/demo (20).png"></image> 51 + <image src="/img/demo20.png"></image>
52 </view> 52 </view>
53 <view class="zhiname">人员</view> 53 <view class="zhiname">人员</view>
54 </view> 54 </view>
55 <view class="zhishuitem"> 55 <view class="zhishuitem">
56 <view class="zhilistimg car"> 56 <view class="zhilistimg car">
57 - <image src="/img/demo (21).png"></image> 57 + <image src="/img/demo21.png"></image>
58 </view> 58 </view>
59 <view class="zhiname">车辆</view> 59 <view class="zhiname">车辆</view>
60 </view> 60 </view>
61 <view class="zhishuitem"> 61 <view class="zhishuitem">
62 <view class="zhilistimg cheng"> 62 <view class="zhilistimg cheng">
63 - <image src="/img/demo (22).png"></image> 63 + <image src="/img/demo22.png"></image>
64 </view> 64 </view>
65 <view class="zhiname">成品</view> 65 <view class="zhiname">成品</view>
66 </view> 66 </view>
67 <view class="zhishuitem"> 67 <view class="zhishuitem">
68 <view class="zhilistimg cheng"> 68 <view class="zhilistimg cheng">
69 - <image src="/img/demo (22).png"></image> 69 + <image src="/img/demo22.png"></image>
70 </view> 70 </view>
71 <view class="zhiname">原材料</view> 71 <view class="zhiname">原材料</view>
72 </view> 72 </view>
73 <view class="zhishuitem"> 73 <view class="zhishuitem">
74 <view class="zhilistimg shui"> 74 <view class="zhilistimg shui">
75 - <image src="/img/demo (1).png"></image> 75 + <image src="/img/demo1.png"></image>
76 </view> 76 </view>
77 <view class="zhiname">水量</view> 77 <view class="zhiname">水量</view>
78 </view> 78 </view>
79 <view class="zhishuitem"> 79 <view class="zhishuitem">
80 <view class="zhilistimg qi"> 80 <view class="zhilistimg qi">
81 - <image src="/img/demo (24).png"></image> 81 + <image src="/img/demo24.png"></image>
82 </view> 82 </view>
83 <view class="zhiname">气量</view> 83 <view class="zhiname">气量</view>
84 </view> 84 </view>
85 <view class="zhishuitem"> 85 <view class="zhishuitem">
86 <view class="zhilistimg wu"> 86 <view class="zhilistimg wu">
87 - <image src="/img/demo (23).png"></image> 87 + <image src="/img/demo23.png"></image>
88 </view> 88 </view>
89 <view class="zhiname">排污</view> 89 <view class="zhiname">排污</view>
90 </view> 90 </view>
@@ -9,7 +9,7 @@ page { @@ -9,7 +9,7 @@ page {
9 overflow: hidden 9 overflow: hidden
10 } 10 }
11 .container { 11 .container {
12 - width: 750rpx; 12 + width: 100%;
13 height: 382rpx; 13 height: 382rpx;
14 margin: 0 auto; 14 margin: 0 auto;
15 display: flex; 15 display: flex;
@@ -33,17 +33,19 @@ ec-canvas { @@ -33,17 +33,19 @@ ec-canvas {
33 } 33 }
34 34
35 .zonghe { 35 .zonghe {
36 - color: #ff9400ff; 36 + color: #ff9400!important;
37 font-size: 30rpx; 37 font-size: 30rpx;
38 text-align: center; 38 text-align: center;
39 } 39 }
40 40
41 .cointleft { 41 .cointleft {
42 font-size: 80rpx; 42 font-size: 80rpx;
  43 + color: #ff9400!important;
43 } 44 }
44 45
45 .cointword { 46 .cointword {
46 font-size: 30rpx; 47 font-size: 30rpx;
  48 + color: #ff9400!important;
47 } 49 }
48 50
49 .xian { 51 .xian {
@@ -92,7 +94,7 @@ ec-canvas { @@ -92,7 +94,7 @@ ec-canvas {
92 94
93 } 95 }
94 .zhishuitem{ 96 .zhishuitem{
95 - width:138rpx; 97 + width:20%;
96 display:flex; 98 display:flex;
97 flex-direction: column; 99 flex-direction: column;
98 justify-content: space-between; 100 justify-content: space-between;
  1 +// pages/companybox/qiyeyuebao/qiyeyuebao.js
  2 +import * as echarts from '../../../ec-canvas/echarts';
  3 +const app=getApp()
  4 +// 开平机1
  5 +function initChart1(canvas, width, height) {
  6 + const chart = echarts.init(canvas, null, {
  7 + width: width,
  8 + height: height
  9 + });
  10 + canvas.setChart(chart);
  11 +
  12 + var option = {
  13 + title: {
  14 + text: '开平机01每日开工时间',
  15 + left: 'center'
  16 + },
  17 +
  18 +
  19 + toolbox: {
  20 +
  21 + },
  22 + xAxis: {
  23 + type: 'category',
  24 + boundaryGap: false,
  25 + 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'],
  26 + axisLabel: {
  27 + interval: 1,
  28 + },
  29 + name: '日期'
  30 +
  31 +
  32 + },
  33 + yAxis: {
  34 + type: 'value',
  35 + axisLabel: {
  36 + formatter: '{value}'
  37 + },
  38 + min: 1,
  39 + max: 24,
  40 + splitNumber: 24,
  41 + name: '小时(h)'
  42 +
  43 + },
  44 + series: [
  45 + {
  46 + name: '',
  47 + type: 'line',
  48 + smooth: true,
  49 + color: '#FCB237',
  50 + data: [11, 11, 15, 13, 12, 13, 10],
  51 + markPoint: {
  52 + data: [
  53 + { type: 'max', name: '最大值' },
  54 + { type: 'min', name: '最小值' }
  55 + ]
  56 + },
  57 + markLine: {
  58 + data: [
  59 + { type: 'average', name: '平均值' }
  60 + ]
  61 + },
  62 + // areaStyle: {
  63 + // // normal: {
  64 + // // color: '#F8E9DD' //改变区域颜色
  65 + // // }
  66 + // },
  67 + },
  68 +
  69 +
  70 + ]
  71 + };
  72 +
  73 + chart.setOption(option);
  74 + return chart;
  75 +}
  76 +// 开平机2
  77 +function initChart2(canvas, width, height) {
  78 + const chart = echarts.init(canvas, null, {
  79 + width: width,
  80 + height: height
  81 + });
  82 + canvas.setChart(chart);
  83 +
  84 + var option = {
  85 + title: {
  86 + text: '开平机02每日开工时间',
  87 + left: 'center'
  88 + },
  89 +
  90 +
  91 + toolbox: {
  92 +
  93 + },
  94 + xAxis: {
  95 + type: 'category',
  96 + boundaryGap: false,
  97 + 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'],
  98 + axisLabel: {
  99 + interval: 1,
  100 + },
  101 + name: '日期'
  102 +
  103 +
  104 + },
  105 + yAxis: {
  106 + type: 'value',
  107 + axisLabel: {
  108 + formatter: '{value}'
  109 + },
  110 + min: 1,
  111 + max: 24,
  112 + splitNumber: 24,
  113 + name: '小时(h)'
  114 +
  115 + },
  116 + series: [
  117 + {
  118 + name: '',
  119 + type: 'line',
  120 + smooth: true,
  121 + color: '#FCB237',
  122 + data: [11, 11, 15, 13, 12, 13, 10],
  123 + markPoint: {
  124 + data: [
  125 + { type: 'max', name: '最大值' },
  126 + { type: 'min', name: '最小值' }
  127 + ]
  128 + },
  129 + markLine: {
  130 + data: [
  131 + { type: 'average', name: '平均值' }
  132 + ]
  133 + },
  134 + // areaStyle: {
  135 + // // normal: {
  136 + // // color: '#F8E9DD' //改变区域颜色
  137 + // // }
  138 + // },
  139 + },
  140 +
  141 + ]
  142 + };
  143 +
  144 + chart.setOption(option);
  145 + return chart;
  146 +}
  147 +
  148 +// 开工月累计时间
  149 +function initChart3(canvas, width, height) {
  150 + const chart = echarts.init(canvas, null, {
  151 + width: width,
  152 + height: height
  153 + });
  154 + canvas.setChart(chart);
  155 +
  156 + var option = {
  157 + title: {
  158 + text: '企业开工月累计时间',
  159 + left: 'center'
  160 + },
  161 +
  162 +
  163 + toolbox: {
  164 +
  165 + },
  166 + xAxis: {
  167 + type: 'category',
  168 + boundaryGap: false,
  169 + 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'],
  170 + axisLabel: {
  171 + interval: 1,
  172 + },
  173 + name: '日期'
  174 +
  175 +
  176 + },
  177 + yAxis: {
  178 + type: 'value',
  179 + axisLabel: {
  180 + formatter: '{value}'
  181 + },
  182 + min: 1,
  183 + max: 24,
  184 + splitNumber: 24,
  185 + name: '小时(h)'
  186 +
  187 + },
  188 + series: [
  189 + {
  190 + name: '',
  191 + type: 'line',
  192 + smooth: true,
  193 + color: '#AF56D7',
  194 + data: [11, 11, 15, 13, 12, 13, 10],
  195 + markPoint: {
  196 + data: [
  197 + { type: 'max', name: '最大值' },
  198 + { type: 'min', name: '最小值' }
  199 + ]
  200 + },
  201 + markLine: {
  202 + data: [
  203 + { type: 'average', name: '平均值' }
  204 + ]
  205 + },
  206 + // areaStyle: {
  207 + // // normal: {
  208 + // // color: '#F8E9DD' //改变区域颜色
  209 + // // }
  210 + // },
  211 + },
  212 +
  213 + ]
  214 + };
  215 +
  216 + chart.setOption(option);
  217 + return chart;
  218 +}
  219 +// 半年度开工时间对比
  220 +function initChart4(canvas, width, height) {
  221 + const chart = echarts.init(canvas, null, {
  222 + width: width,
  223 + height: height
  224 + });
  225 + canvas.setChart(chart);
  226 +
  227 + var option = {
  228 + xAxis: {
  229 + type: 'category',
  230 + data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  231 + },
  232 + yAxis: {
  233 + type: 'value'
  234 + },
  235 + series: [{
  236 + data: [120, 200, 150, 80, 70, 110, 130],
  237 + type: 'bar'
  238 + }]
  239 + };
  240 +
  241 + chart.setOption(option);
  242 + return chart;
  243 +}
  244 +// 企业每日电耗
  245 +function initChart5(canvas, width, height) {
  246 + const chart = echarts.init(canvas, null, {
  247 + width: width,
  248 + height: height
  249 + });
  250 + canvas.setChart(chart);
  251 +
  252 + var option = {
  253 + title: {
  254 + text: '企业月开工率',
  255 + left: 'center'
  256 + },
  257 +
  258 +
  259 + toolbox: {
  260 +
  261 + },
  262 + xAxis: {
  263 + type: 'category',
  264 + boundaryGap: false,
  265 + 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'],
  266 + axisLabel: {
  267 + interval: 1,
  268 + },
  269 + name: '日期'
  270 +
  271 +
  272 + },
  273 + yAxis: {
  274 + type: 'value',
  275 + axisLabel: {
  276 + formatter: '{value}'
  277 + },
  278 + min: 1,
  279 + max: 24,
  280 + splitNumber: 24,
  281 + name: '小时(h)'
  282 +
  283 + },
  284 + series: [
  285 + {
  286 + name: '',
  287 + type: 'line',
  288 + smooth: true,
  289 + color: '#6495F8',
  290 + data: [11, 11, 15, 13, 12, 13, 10],
  291 + markPoint: {
  292 + data: [
  293 + { type: 'max', name: '最大值' },
  294 + { type: 'min', name: '最小值' }
  295 + ]
  296 + },
  297 + markLine: {
  298 + data: [
  299 + { type: 'average', name: '平均值' }
  300 + ]
  301 + },
  302 + // areaStyle: {
  303 + // // normal: {
  304 + // // color: '#F8E9DD' //改变区域颜色
  305 + // // }
  306 + // },
  307 + },
  308 +
  309 + ]
  310 + };
  311 +
  312 + chart.setOption(option);
  313 + return chart;
  314 +}
  315 +// 企业每日电耗
  316 +function initChart6(canvas, width, height) {
  317 + const chart = echarts.init(canvas, null, {
  318 + width: width,
  319 + height: height
  320 + });
  321 + canvas.setChart(chart);
  322 +
  323 + var option = {
  324 + title: {
  325 + text: '企业月开工率',
  326 + left: 'center'
  327 + },
  328 +
  329 +
  330 + toolbox: {
  331 +
  332 + },
  333 + xAxis: {
  334 + type: 'category',
  335 + boundaryGap: false,
  336 + 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'],
  337 + axisLabel: {
  338 + interval: 1,
  339 + },
  340 + name: '日期'
  341 +
  342 +
  343 + },
  344 + yAxis: {
  345 + type: 'value',
  346 + axisLabel: {
  347 + formatter: '{value}'
  348 + },
  349 + min: 1,
  350 + max: 24,
  351 + splitNumber: 24,
  352 + name: '小时(h)'
  353 +
  354 + },
  355 + series: [
  356 + {
  357 + name: '',
  358 + type: 'line',
  359 + smooth: true,
  360 + color: '#6495F8',
  361 + data: [11, 11, 15, 13, 12, 13, 10],
  362 + markPoint: {
  363 + data: [
  364 + { type: 'max', name: '最大值' },
  365 + { type: 'min', name: '最小值' }
  366 + ]
  367 + },
  368 + markLine: {
  369 + data: [
  370 + { type: 'average', name: '平均值' }
  371 + ]
  372 + },
  373 + // areaStyle: {
  374 + // // normal: {
  375 + // // color: '#F8E9DD' //改变区域颜色
  376 + // // }
  377 + // },
  378 + },
  379 +
  380 + ]
  381 + };
  382 +
  383 + chart.setOption(option);
  384 + return chart;
  385 +}
  386 +// 半年度企业电耗对比
  387 +function initChart7(canvas, width, height) {
  388 + const chart = echarts.init(canvas, null, {
  389 + width: width,
  390 + height: height
  391 + });
  392 + canvas.setChart(chart);
  393 +
  394 + var option = {
  395 + xAxis: {
  396 + type: 'category',
  397 + data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  398 + },
  399 + yAxis: {
  400 + type: 'value'
  401 + },
  402 + series: [{
  403 + data: [120, 200, 150, 80, 70, 110, 130],
  404 + type: 'bar'
  405 + }]
  406 + };
  407 +
  408 + chart.setOption(option);
  409 + return chart;
  410 +}
  411 +function initChart8(canvas, width, height) {
  412 + const chart = echarts.init(canvas, null, {
  413 + width: width,
  414 + height: height
  415 + });
  416 + canvas.setChart(chart);
  417 +
  418 + var option = {
  419 +
  420 + tooltip: {
  421 + trigger: 'axis'
  422 + },
  423 +
  424 + title: {
  425 + text: '雷达图',
  426 + textStyle: {
  427 + color: 'rgba(221,221,221,1)', //标题颜色
  428 + fontSize: 14,
  429 + lineHeight: 20,
  430 + },
  431 + // 标题的位置,此时放在图的底边
  432 + left: 'center',
  433 + top: 'bottom',
  434 + },
  435 +
  436 +
  437 +
  438 +
  439 + legend: {
  440 + enabled: true
  441 + },
  442 + radar: [
  443 +
  444 +
  445 + {
  446 + indicator: [
  447 +
  448 + {
  449 + text: '生产:90分',
  450 + max: 100,
  451 +
  452 +
  453 +
  454 + },
  455 + {
  456 + text: '预警:60分',
  457 + max: 100
  458 + },
  459 + {
  460 + text: '稳定性:80分',
  461 + max: 100,
  462 + }
  463 +
  464 + ],
  465 +
  466 + center: ['50%', '60%'],
  467 +
  468 + radius: 80,
  469 +
  470 + name: {
  471 + textStyle: {
  472 +
  473 + fontSize: 14
  474 + }
  475 + },
  476 +
  477 + },
  478 +
  479 +
  480 +
  481 +
  482 + ],
  483 + series: [{
  484 + type: 'radar',
  485 +
  486 + legend: {
  487 +
  488 +
  489 + },
  490 +
  491 +
  492 + itemStyle: {
  493 + normal: {
  494 + color: '#FBCB77',
  495 + areaStyle: {
  496 + type: 'default',
  497 + color: '#FBCB77',
  498 +
  499 + },
  500 + lineStyle: {
  501 + color: '#FBCB77',
  502 +
  503 + }
  504 + }
  505 + },
  506 + data: [{
  507 + value: [60, 73, 85],
  508 +
  509 + // name: '某软件'
  510 + }]
  511 + },
  512 +
  513 +
  514 +
  515 + ]
  516 + };
  517 +
  518 +
  519 +
  520 +
  521 +
  522 +
  523 +
  524 + chart.setOption(option);
  525 +
  526 + return chart;
  527 +}
  528 +Page({
  529 + onShareAppMessage: function (res) {
  530 + return {
  531 + title: 'ECharts 可以在微信小程序中使用啦!',
  532 + path: '',
  533 + success: function () { },
  534 + fail: function () { }
  535 + }
  536 + },
  537 +
  538 + /**
  539 + * 页面的初始数据
  540 + */
  541 + data: {
  542 + statedate:"",
  543 + ec1: {
  544 +
  545 + onInit: initChart1
  546 +
  547 + },
  548 + ec2: {
  549 +
  550 + onInit: initChart2
  551 +
  552 + },
  553 + ec3:{
  554 + onInit: initChart3
  555 + },
  556 + ec4: {
  557 + onInit: initChart4
  558 + },
  559 + ec5: {
  560 + onInit: initChart5
  561 + },
  562 + ec6: {
  563 + onInit: initChart6
  564 + },
  565 + ec7: {
  566 + onInit: initChart7
  567 + },
  568 + ec8: {
  569 + onInit: initChart8
  570 + }
  571 + },
  572 +
  573 + /**
  574 + * 生命周期函数--监听页面加载
  575 + */
  576 + onLoad: function (options) {
  577 + this.setData({
  578 + statedate: app.monthnowDate(),
  579 + })
  580 +
  581 + },
  582 +
  583 + // 选择日期
  584 + bindstateDateChange(e) {
  585 + console.log('picker发送选择改变,携带值为', e.detail.value)
  586 + this.setData({
  587 + statedate: e.detail.value
  588 + })
  589 + let newdate = this.data.statedate.split("-");
  590 + this.setData({
  591 + showdate: newdate[0] + '年' + newdate[1] + '月'
  592 + })
  593 + },
  594 +
  595 + /**
  596 + * 生命周期函数--监听页面初次渲染完成
  597 + */
  598 + onReady: function () {
  599 +
  600 + },
  601 +
  602 + /**
  603 + * 生命周期函数--监听页面显示
  604 + */
  605 + onShow: function () {
  606 +
  607 + },
  608 +
  609 + /**
  610 + * 生命周期函数--监听页面隐藏
  611 + */
  612 + onHide: function () {
  613 +
  614 + },
  615 +
  616 + /**
  617 + * 生命周期函数--监听页面卸载
  618 + */
  619 + onUnload: function () {
  620 +
  621 + },
  622 +
  623 + /**
  624 + * 页面相关事件处理函数--监听用户下拉动作
  625 + */
  626 + onPullDownRefresh: function () {
  627 +
  628 + },
  629 +
  630 + /**
  631 + * 页面上拉触底事件的处理函数
  632 + */
  633 + onReachBottom: function () {
  634 +
  635 + },
  636 +
  637 + /**
  638 + * 用户点击右上角分享
  639 + */
  640 + onShareAppMessage: function () {
  641 +
  642 + }
  643 +})
  1 +{
  2 + "navigationBarTitleText": "企业月报",
  3 + "usingComponents": {
  4 + "ec-canvas": "../../../ec-canvas/ec-canvas"
  5 + }
  6 +}
  1 +<!-- 头部日期 -->
  2 +<view class="date">
  3 + <view class="dateleft">
  4 + <image src="/img/whiterow.png"></image>
  5 + </view>
  6 + <view class="datetime">
  7 + <view class="datesel">
  8 + <picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month">
  9 + <view class="picker">
  10 + {{statedate}}
  11 + </view>
  12 + </picker>
  13 + </view>
  14 +
  15 + <view class="datepic">
  16 + <image src="/img/whiterow.png"></image>
  17 + </view>
  18 + </view>
  19 +
  20 + <view class="dateright">
  21 + <image src="/img/whiterow.png"></image>
  22 + </view>
  23 +</view>
  24 +
  25 +
  26 +
  27 +<!-- 客观信息 -->
  28 +<view class="keguaninfo" wx:if="{{index==0}}">
  29 + <!-- 企业开工时间 -->
  30 + <view class="worktime">
  31 + <!-- 头部日期 -->
  32 +
  33 +
  34 + <!-- 企业设备月开工时间-->
  35 +
  36 + <view class="shebeinum">
  37 + <text class="she">企业设备月开工时间</text>
  38 + </view>
  39 +
  40 + <view class="kaijibox">
  41 + <!-- 开平机1 -->
  42 +
  43 + <view class="containerzhe">
  44 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
  45 + </view>
  46 +
  47 + <!-- 开平机2 -->
  48 +
  49 + <view class="containerzhe">
  50 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec2 }}"></ec-canvas>
  51 + </view>
  52 + </view>
  53 +
  54 + <view class="seemore">查看更多</view>
  55 +
  56 + <!-- 企业得分 -->
  57 +
  58 + <view class="companybox">
  59 + <view class="boxhead">
  60 + <view class="boxtopitem">企业名称</view>
  61 + <view class="boxtopitem">生产平稳性</view>
  62 + <view class="boxtopitem">生产趋势</view>
  63 + <view class="boxtopitem">生产状态</view>
  64 + <view class="boxtopitem">综合评分</view>
  65 + </view>
  66 + <view class="boxhead">
  67 + <view class="boxbottomitem">无锡市好事达人供 应链管理有限公司
  68 + </view>
  69 + <view class="boxbottomitem common">较平稳</view>
  70 + <view class="boxbottomitem common">下降</view>
  71 + <view class="boxbottomitem common">正常</view>
  72 + <view class="boxbottomitem common">87</view>
  73 + </view>
  74 + </view>
  75 + <!-- 分析-->
  76 +
  77 + <view class="desbox">
  78 + <view class="desboxhead">分析</view>
  79 + <view class="destext">
  80 + 在分析无锡市好事达供应链管理有限公司时,综合考虑无锡好事达供应链管理有限公司于2019年4月,目前处于
  81 + <text class="commonstate">正常状态</text>
  82 + </view>
  83 + </view>
  84 + </view>
  85 +
  86 + <!-- 企业累计时间 -->
  87 +
  88 + <view class='worktime'>
  89 + <!-- 企业开工月累计时间-->
  90 +
  91 + <view class="shebeinum">
  92 + <text class="she">企业开工月累计时间</text>
  93 + </view>
  94 + <!-- 企业开工月累计时间 -->
  95 +
  96 + <view class="containerzhe">
  97 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec3 }}"></ec-canvas>
  98 + </view>
  99 +
  100 + <view class="atten">注:月累计开工时间=企业所有设备当月开工时间总和。</view>
  101 +
  102 + <!-- 半年度开工时间对比 -->
  103 +
  104 + <view class="containerzhe">
  105 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ec4}}"></ec-canvas>
  106 + </view>
  107 +
  108 + <view class="desbox">
  109 + <view class="desboxhead">分析</view>
  110 + <view class="destext">
  111 + 在分析无锡市好事达供应链管理有限公司时,综合考虑无锡好事达供应链管理有限公司于2019年4月,目前处于
  112 + <text class="commonstate">正常状态</text>
  113 + </view>
  114 + </view>
  115 +
  116 + </view>
  117 + <!-- 企业开工率 -->
  118 + <view class="worktime">
  119 + <!-- 企业月开工率 -->
  120 + <view class="shebeinum">
  121 + <text class="she">企业月开工率</text>
  122 + </view>
  123 + <!-- 企业月开工率 -->
  124 +
  125 + <view class="containerzhe">
  126 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec5 }}"></ec-canvas>
  127 + </view>
  128 + <view class="atten">注:企业开工率=企业每日平均开工时间/24。</view>
  129 +
  130 + <view class="desbox">
  131 + <view class="desboxhead">分析</view>
  132 + <view class="destext">
  133 + 无锡好事达供应链管理有限公司于
  134 + <text class="commonstate">2019年4月</text>,所有监测设备平均每日开工时间:
  135 + <text class="commonstate">5.14小时</text>,当月企业月开工率为:
  136 + <text class="commonstate">21.4%</text>
  137 +
  138 + </view>
  139 + </view>
  140 + </view>
  141 +
  142 + <!-- 企业当月用电情况 -->
  143 + <view class="worktime">
  144 + <!-- 企业当月用电情况 -->
  145 + <view class="shebeinum">
  146 + <text class="she">企业当月用电情况</text>
  147 + </view>
  148 + <!-- 企业每日耗电 -->
  149 +
  150 + <view class="containerzhe">
  151 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec6}}"></ec-canvas>
  152 + </view>
  153 +
  154 + <view class="containerzhe">
  155 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec7}}"></ec-canvas>
  156 + </view>
  157 +
  158 + <view class="desbox">
  159 + <view class="desboxhead">分析</view>
  160 + <view class="destext">无锡好事达供应链管理有限公司
  161 +
  162 + <text class="commonstate">2019年4月</text>总电耗:
  163 + <text class="commonstate">9025千瓦时</text>,日均电耗:
  164 + <text class="commonstate">300.8千瓦时 </text>,较上月减少
  165 + <text class="commonstate">1694千瓦时 </text>
  166 +
  167 +
  168 + </view>
  169 + </view>
  170 + </view>
  171 +
  172 +</view>
  173 +
  174 +<!-- 生产总评 -->
  175 +
  176 +<view class="shengchanzog" wx:if="{{index==0}}">
  177 + <!-- 企业生产总评-->
  178 +
  179 + <view class="shebeinum">
  180 + <text class="she">企业生产总评</text>
  181 + </view>
  182 +
  183 + <view class="containerzhe con">
  184 + <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec8 }}"></ec-canvas>
  185 + </view>
  186 +
  187 + <!-- 企业得分 -->
  188 +
  189 + <view class="companybox">
  190 + <view class="boxhead">
  191 + <view class="boxtopitem">企业名称</view>
  192 + <view class="boxtopitem">生产平稳性</view>
  193 + <view class="boxtopitem">生产趋势</view>
  194 + <view class="boxtopitem">生产状态</view>
  195 + <view class="boxtopitem">综合评分</view>
  196 + </view>
  197 + <view class="boxhead">
  198 + <view class="boxbottomitem">无锡市好事达人供 应链管理有限公司
  199 + </view>
  200 + <view class="boxbottomitem common">较平稳</view>
  201 + <view class="boxbottomitem common">下降</view>
  202 + <view class="boxbottomitem common">正常</view>
  203 + <view class="boxbottomitem common">87</view>
  204 + </view>
  205 + </view>
  206 +
  207 + <view class="desbox">
  208 + <view class="desboxhead">分析</view>
  209 + <view class="destext">
  210 + 在分析无锡市好事达供应链管理有限公司时,综合考虑该公司客观生产信息、生产稳定性、预警提示信息等维度,进行主客观综合评分。
  211 +
  212 + </view>
  213 + </view>
  214 +</view>
  215 +<!-- 生产预警 -->
  216 +
  217 +<view class="yujing">
  218 + <view class="yujinghead">
  219 + <view class="yuitem xuhao">序号</view>
  220 + <view class="yuitem time">生产预警时间</view>
  221 + <view class="yuitem reason">生产预警原因</view>
  222 + </view>
  223 +
  224 + <view class="yujingbox">
  225 + <view class="yujingitem">
  226 + <view class="yuitem xuhao">1</view>
  227 + <view class="yuitem time">2019-06-12</view>
  228 + <view class="yuitem text">在分析无锡市好事达供应链管理有限公司时,综合考虑该公司客观生产信息、生产稳定性、预警提示信息等维度,进行主客观综合评分。</view>
  229 + </view>
  230 + <view class="yujingitem">
  231 + <view class="yuitem xuhao">1</view>
  232 + <view class="yuitem time">2019-06-12</view>
  233 + <view class="yuitem text">在分析无锡市好事达供应链管理有限公司时,综合考虑该公司客观生产信息、生产稳定性、预警提示信息等维度,进行主客观综合评分。</view>
  234 + </view>
  235 + <view class="yujingitem">
  236 + <view class="yuitem xuhao">1</view>
  237 + <view class="yuitem time">2019-06-12</view>
  238 + <view class="yuitem text">在分析无锡市好事达供应链管理有限公司时,综合考虑该公司客观生产信息、生产稳定性、预警提示信息等维度,进行主客观综合评分。</view>
  239 + </view>
  240 + <view class="yujingitem">
  241 + <view class="yuitem xuhao">1</view>
  242 + <view class="yuitem time">2019-06-12</view>
  243 + <view class="yuitem text">在分析无锡市好事达供应链管理有限公司时,综合考虑该公司客观生产信息、生产稳定性、预警提示信息等维度,进行主客观综合评分。</view>
  244 + </view>
  245 +
  246 +
  247 +
  248 + </view>
  249 +</view>
  1 +@import "../zhishudetail/member/member.wxss";
  2 +
  3 +.date {
  4 + background: #ff9400;
  5 +}
  6 +
  7 +.datesel {
  8 + color: #fff;
  9 +}
  10 +
  11 +.containerzhe {
  12 + height: 800rpx;
  13 + margin-top: 40rpx;
  14 +}
  15 +
  16 +.seemore {
  17 + width: 132rpx;
  18 + height: 49rpx;
  19 + background: rgba(211, 227, 255, 1);
  20 + opacity: 1;
  21 + border-radius: 4rpx;
  22 + font-size: 24rpx;
  23 + color: #538aee;
  24 + text-align: center;
  25 + line-height: 49rpx;
  26 + margin: 0 auto;
  27 +}
  28 +
  29 +.boxhead {
  30 + display: flex;
  31 + align-items: center;
  32 + justify-content: space-between;
  33 +}
  34 +
  35 +.companybox {
  36 + padding: 0 17rpx;
  37 + box-sizing: border-box;
  38 + margin-top: 40rpx;
  39 +}
  40 +
  41 +.boxtopitem {
  42 + width: 190rpx;
  43 + padding: 47rpx 10rpx;
  44 + box-sizing: border-box;
  45 + color: #333;
  46 + font-size: 24rpx;
  47 + border-right: 1rpx solid #f5f5f5;
  48 + border-top: 1rpx solid #f5f5f5;
  49 + border-bottom: 1rpx solid #f5f5f5;
  50 + text-align: center;
  51 +}
  52 +
  53 +.boxtopitem:first-child {
  54 + border-left: 1rpx solid #f5f5f5;
  55 +}
  56 +
  57 +.boxbottomitem {
  58 + width: 190rpx;
  59 + height:130rpx;
  60 + line-height: 130rpx;
  61 + padding: 10rpx;
  62 + box-sizing: border-box;
  63 + color: #333;
  64 + font-size: 24rpx;
  65 + border-right: 1rpx solid #f5f5f5;
  66 + border-bottom: 1rpx solid #f5f5f5;
  67 + text-align: center;
  68 + display: -webkit-box ;
  69 +overflow: hidden;
  70 +text-overflow: ellipsis;
  71 +word-break: break-all;
  72 +-webkit-box-orient:vertical;
  73 +-webkit-line-clamp:4;
  74 +}
  75 +
  76 +.boxbottomitem:first-child {
  77 + border-left: 1rpx solid #f5f5f5;
  78 + text-align: left;
  79 + line-height: 1.3;
  80 +}
  81 +
  82 +.common {
  83 + color: #ff8e5a;
  84 +}
  85 +
  86 +.desbox {
  87 + width: 710rpx;
  88 + margin: 0 auto;
  89 + border: 1rpx solid #d6d8db;
  90 + border-radius: 10rpx;
  91 + padding-bottom: 20rpx;
  92 + box-sizing: border-box;
  93 + margin-top: 50rpx;
  94 +}
  95 +
  96 +.destext {
  97 + padding: 20rpx 20rpx 30rpx;
  98 + box-sizing: border-box;
  99 + color: #333;
  100 + font-size: 28rpx;
  101 +}
  102 +
  103 +.desboxhead {
  104 + height: 70rpx;
  105 + background: #eef1f9;
  106 + line-height: 70rpx;
  107 + padding: 0 20rpx;
  108 + box-sizing: border-box;
  109 + color: #333;
  110 + font-size: 32rpx;
  111 + font-weight: bold;
  112 +}
  113 +
  114 +.commonstate {
  115 + color: #ff8e5a;
  116 +}
  117 +
  118 +.worktime {
  119 + padding-bottom: 30rpx;
  120 + border-bottom: 20rpx solid #f6f7f8;
  121 +}
  122 +.atten{
  123 + color:#538AEE;
  124 + font-size: 20rpx;
  125 + padding: 0 32rpx;
  126 + box-sizing: border-box;
  127 +
  128 +}
  129 +.con {
  130 + width: 100%;
  131 + height: 382rpx;
  132 + margin: 0 auto;
  133 + display: flex;
  134 + justify-content: center;
  135 + align-items: center;
  136 +}
  137 +.con ec-canvas{
  138 + width:100%;
  139 + height:100%;
  140 +}
  141 +.yujinghead{
  142 + display:flex;
  143 + align-items: center;
  144 + /* justify-content: space-between; */
  145 + padding: 27rpx 40rpx;
  146 + box-sizing: border-box;
  147 + background: #F4F4F4;
  148 + color:#A0A0A0;
  149 + font-size: 24rpx;
  150 +}
  151 +.yuitem{
  152 + text-align: center
  153 +}
  154 +.xuhao{
  155 + width:48rpx;
  156 +}
  157 +.time{
  158 + /* width:116rpx; */
  159 + margin-left:40rpx;
  160 +}
  161 +.reason{
  162 + margin-left:49rpx;
  163 + width:56%;
  164 +}
  165 +.yujingbox{
  166 +
  167 +
  168 + padding: 0 40rpx;
  169 + box-sizing: border-box;
  170 +
  171 +
  172 +
  173 +}
  174 +.yujingitem{
  175 + display:flex;
  176 + align-items: center;
  177 + /* justify-content: space-between; */
  178 + padding: 27rpx 0;
  179 + box-sizing: border-box;
  180 +
  181 + color:#A0A0A0;
  182 + font-size: 24rpx;
  183 + border-bottom:1rpx solid #f5f5f5;
  184 +}
  185 +.text{
  186 + margin-left:49rpx;
  187 + width:56%;
  188 + text-align: left
  189 +}
  1 +// pages/member/member.js
  2 +import * as echarts from '../../../../ec-canvas/echarts';
  3 +const app = getApp()
  4 +
  5 +
  6 +function initChart1(canvas, width, height) {
  7 + const chart = echarts.init(canvas, null, {
  8 + width: width,
  9 + height: height
  10 + });
  11 + canvas.setChart(chart);
  12 +
  13 + var option = {
  14 + title: {
  15 + text: '',
  16 + subtext: ''
  17 + },
  18 +
  19 + tooltip: {
  20 + trigger: 'axis'
  21 + },
  22 + legend: {
  23 + data: ['进车辆数', '出车辆数'],
  24 + textStyle: {
  25 + fontSize: 14
  26 + },
  27 +
  28 + },
  29 + toolbox: {
  30 +
  31 +
  32 + },
  33 + xAxis: {
  34 + type: 'category',
  35 + boundaryGap: false,
  36 + 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'],
  37 + axisLabel: {
  38 + interval: 1,
  39 + textStyle: {
  40 + fontSize: 12
  41 + },
  42 + },
  43 + nameTextStyle: { //在name值存在下,设置name的样式
  44 +
  45 + color: '#333',
  46 + fontStyle: 'normal',
  47 +
  48 +
  49 + },
  50 +
  51 +
  52 + },
  53 + yAxis: {
  54 + type: 'value',
  55 + min: 10,
  56 + max: 100,
  57 + splitNumber: 10,
  58 +
  59 +
  60 + axisLabel: {
  61 + formatter: '{value}',
  62 + textStyle: {
  63 + fontSize: 10
  64 + },
  65 + }
  66 + },
  67 + series: [{
  68 + name: '进车辆数',
  69 + type: 'line',
  70 + color: '#FF5345',
  71 + data: [11, 11, 15, 13, 12, 13, 10],
  72 + markPoint: {
  73 + data: [{
  74 + type: 'max',
  75 + name: '最大值'
  76 + },
  77 + {
  78 + type: 'min',
  79 + name: '最小值'
  80 + }
  81 + ]
  82 + },
  83 + markLine: {
  84 + data: [{
  85 + type: 'average',
  86 + name: '平均值'
  87 + }]
  88 + }
  89 + },
  90 + {
  91 + name: '出车辆数',
  92 + type: 'line',
  93 + color: '#6497F5',
  94 + data: [78, 20, 44, 33, 25, 45, 67],
  95 + markPoint: {
  96 + data: [{
  97 + name: '周最低',
  98 + value: 10,
  99 + xAxis: 1,
  100 + yAxis:10
  101 + }]
  102 + },
  103 + markLine: {
  104 + data: [{
  105 + type: 'average',
  106 + name: '平均值'
  107 + },
  108 + [{
  109 + symbol: 'none',
  110 + x: '90%',
  111 + yAxis: 'max'
  112 + }, {
  113 + symbol: 'circle',
  114 + label: {
  115 + normal: {
  116 + position: 'start',
  117 + formatter: '最大值'
  118 + }
  119 + },
  120 + type: 'max',
  121 + name: '最高点'
  122 + }]
  123 + ]
  124 + }
  125 + }
  126 + ]
  127 + };
  128 +
  129 +
  130 + chart.setOption(option);
  131 + return chart;
  132 +}
  133 +
  134 +Page({
  135 +
  136 + onShareAppMessage: function(res) {
  137 + return {
  138 + title: 'ECharts 可以在微信小程序中使用啦!',
  139 + path: '',
  140 + success: function() {},
  141 + fail: function() {}
  142 + }
  143 + },
  144 +
  145 + /**
  146 + * 页面的初始数据
  147 + */
  148 + data: {
  149 + state: 1,
  150 + timestate: 1,
  151 + ec1: {
  152 + onInit: initChart1,
  153 + },
  154 + statedate: '',
  155 + showdate: "",
  156 + watertime: '',
  157 + timesel: 1,
  158 + timearr: [
  159 +
  160 +
  161 + ],
  162 + date: '',
  163 + datePickerValue: ['', '', ''],
  164 + datePickerIsShow: false,
  165 + datechu: false,
  166 + currentdate: true,
  167 + //开始日期
  168 + startdate: '',
  169 + //结束日期
  170 + enddate: '',
  171 +
  172 + // 车辆状况日期
  173 + showModal: false,
  174 + monthList: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
  175 + time: '',
  176 + year:''
  177 +
  178 + },
  179 +
  180 + /**
  181 + * 生命周期函数--监听页面加载
  182 + */
  183 + onLoad: function(options) {
  184 + this.setData({
  185 + statedate: app.monthnowDate(),
  186 + watertime: app.newnowDate() + '-' + app.endate(),
  187 + startdate: app.newnowDate(),
  188 + enddate: app.endate()
  189 + })
  190 +
  191 +
  192 +
  193 + //默认车辆状况日期
  194 + var date = new Date();
  195 + var month = date.getMonth() + 1;
  196 + var year=date.getFullYear();
  197 + this.setData({
  198 + showdate:year+'年'+month+'月'
  199 + })
  200 + if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
  201 + if (month < 10) {
  202 + this.setData({
  203 + time: "(" + year+"." + "0" + month + ".01" + "-2019." + '0' + month + ".31" + ")"
  204 + })
  205 + } else {
  206 + this.setData({
  207 + time: "(" + year+"." + month + ".01" + "-2019." + month + ".31" + ")"
  208 + })
  209 + }
  210 +
  211 + } else {
  212 + if (month < 10) {
  213 + this.setData({
  214 + time: "(" + year+"." + "0" + month + ".01" + "-2019." + '0' + month + ".30" + ")"
  215 + })
  216 + } else {
  217 + this.setData({
  218 + time: "(" + year+"." + month + ".01" + "-2019." + month + ".30" + ")"
  219 + })
  220 + }
  221 +
  222 + }
  223 +
  224 + },
  225 +
  226 + //车辆状况日期
  227 + choice(e) {
  228 +
  229 + //默认显示当前月份
  230 +
  231 +
  232 + this.setData({
  233 + showt: false
  234 + })
  235 +
  236 + var date = new Date();
  237 +
  238 + var year = date.getFullYear()
  239 + let index = e.currentTarget.dataset.id;
  240 + index = index + 1
  241 + if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) {
  242 + if (month < 10) {
  243 + this.setData({
  244 + time: "(" + year + "." + "0" + index + ".01" + "-2019." + '0' + index + ".31" + ")"
  245 + })
  246 + } else {
  247 + this.setData({
  248 + time: "(" + year + "." + index + ".01" + "-2019." + index + ".31" + ")"
  249 + })
  250 + }
  251 +
  252 + } else {
  253 + if (index < 10) {
  254 + this.setData({
  255 + time: "(" + year + "." + "0" + index + ".01" + "-2019." + '0' + index + ".30" + ")"
  256 + })
  257 + } else {
  258 + this.setData({
  259 + time: "(" + year + "." + index + ".01" + "-2019." + index + ".30" + ")"
  260 + })
  261 + }
  262 +
  263 + }
  264 + this.setData({
  265 + changeColor: index - 1,
  266 + showdate: year + '年' + index + '月'
  267 +
  268 + })
  269 +
  270 + },
  271 + three() {
  272 + this.setData({
  273 + time: '近30天',
  274 + showt: !this.data.showt,
  275 + changeColor: -1
  276 + })
  277 + },
  278 + toShowModal(e) {
  279 + this.setData({
  280 + showModal: true
  281 +
  282 + })
  283 +
  284 + var date = new Date();
  285 +
  286 + var mon = date.getMonth();
  287 + console.log(mon)
  288 + this.setData({
  289 + changeColor: mon
  290 + })
  291 + },
  292 +
  293 + hideModal() {
  294 + this.setData({
  295 + showModal: false
  296 + });
  297 + },
  298 +
  299 + showDatePicker: function(e) {
  300 + // this.data.datePicker.show(this);
  301 + this.setData({
  302 + datePickerIsShow: true,
  303 + });
  304 + },
  305 +
  306 + datePickerOnSureClick: function(e) {
  307 + console.log('datePickerOnSureClick');
  308 +
  309 + if (this.data.timesel == 1) {
  310 + console.log(e);
  311 + this.setData({
  312 + date: `${e.detail.value[0]}${e.detail.value[1]}${e.detail.value[2]}日`,
  313 + datePickerValue: e.detail.value,
  314 + datePickerIsShow: false,
  315 + currentdate: false,
  316 +
  317 + startdate: e.detail.value[0] + '.' + e.detail.value[1] + "." + e.detail.value[2]
  318 + });
  319 + } else {
  320 + console.log(e);
  321 + this.setData({
  322 + date: `${e.detail.value[0]}${e.detail.value[1]}${e.detail.value[2]}日`,
  323 + datePickerValue: e.detail.value,
  324 + datePickerIsShow: false,
  325 + currentdate: false,
  326 +
  327 + enddate: e.detail.value[0] + '.' + e.detail.value[1] + "." + e.detail.value[2]
  328 + });
  329 + }
  330 +
  331 + },
  332 +
  333 + datePickerOnCancelClick: function(event) {
  334 + console.log('datePickerOnCancelClick');
  335 + console.log(event);
  336 + this.setData({
  337 + datePickerIsShow: false,
  338 +
  339 + currentdate: false,
  340 +
  341 + });
  342 + },
  343 + changedate(e) {
  344 + console.log(e)
  345 + },
  346 + // 选择设备切换
  347 + selectshebei(e) {
  348 + this.setData({
  349 + state: e.currentTarget.dataset.id,
  350 +
  351 + })
  352 + // if (e.currentdate.dataset.id == 1) {
  353 + // this.setData({
  354 + // ec1: {
  355 + // onInit: initChart1,
  356 + // },
  357 + // })
  358 + // }
  359 + },
  360 +
  361 + // 显示日期
  362 + datexianshi() {
  363 + this.setData({
  364 + datechu: true,
  365 + currentdate: true
  366 + })
  367 +
  368 + //获取年
  369 + var date = new Date();
  370 + var obj = {}
  371 + var year = date.getFullYear();
  372 + var month = date.getMonth() + 1;
  373 + if (month < 10) {
  374 + month = '0' + month
  375 + }
  376 +
  377 + var day = date.getDate();
  378 + if (day < 10) {
  379 + day = "0" + day
  380 + }
  381 + console.log()
  382 + if (typeof(day) == 'number') {
  383 + day = day.toString()
  384 + }
  385 + console.log(typeof(day))
  386 + this.setData({
  387 + datePickerValue: [year, month, day],
  388 + })
  389 +
  390 + },
  391 +
  392 +
  393 + // 选择时间和摄像头切换
  394 + seltime(e) {
  395 + this.setData({
  396 + timestate: e.currentTarget.dataset.id
  397 + })
  398 + },
  399 +
  400 + //开始时间和结束时间切换
  401 + xuanshijan(e) {
  402 + this.setData({
  403 + timesel: e.currentTarget.dataset.time,
  404 + currentdate: true
  405 + })
  406 +
  407 + this.datexianshi()
  408 + },
  409 +
  410 +
  411 + //确定选择开始日期和结束日期
  412 + qudingxuandate() {
  413 + this.setData({
  414 + datechu: false,
  415 + watertime: this.data.startdate + '-' + this.data.enddate
  416 + })
  417 + },
  418 + /**
  419 + * 生命周期函数--监听页面初次渲染完成
  420 + */
  421 + onReady: function() {
  422 +
  423 + },
  424 +
  425 + /**
  426 + * 生命周期函数--监听页面显示
  427 + */
  428 + onShow: function() {
  429 +
  430 +
  431 +
  432 +
  433 +
  434 + },
  435 +
  436 + /**
  437 + * 生命周期函数--监听页面隐藏
  438 + */
  439 + onHide: function() {
  440 +
  441 + },
  442 +
  443 + /**
  444 + * 生命周期函数--监听页面卸载
  445 + */
  446 + onUnload: function() {
  447 +
  448 + },
  449 +
  450 + /**
  451 + * 页面相关事件处理函数--监听用户下拉动作
  452 + */
  453 + onPullDownRefresh: function() {
  454 +
  455 + },
  456 +
  457 + /**
  458 + * 页面上拉触底事件的处理函数
  459 + */
  460 + onReachBottom: function() {
  461 +
  462 + },
  463 +
  464 + /**
  465 + * 用户点击右上角分享
  466 + */
  467 + onShareAppMessage: function() {
  468 +
  469 + }
  470 +})
  1 +{
  2 + "navigationBarTitleText": "车辆",
  3 + "usingComponents": {
  4 + "ec-canvas": "../../../../ec-canvas/ec-canvas",
  5 + "date-picker": "../../../../components/date-picker/date-picker"
  6 + }
  7 +}
  1 +<!-- 车辆流水日期弹出层 -->
  2 +<view class="register" wx:if="{{datechu}}">
  3 +
  4 + <view class="timewrap">
  5 + <view class="detailhead">
  6 + <view class="detailname {{timestate==1?'selactive':''}}" bindtap="seltime" data-id="1">选择时间</view>
  7 + <view class="detailname {{timestate==2?'selactive':''}}" bindtap="seltime" data-id="2">选摄像头</view>
  8 + </view>
  9 +
  10 + <!-- 开始时间和结束时间 -->
  11 +
  12 + <view class="timetwo">
  13 + <view class="timebetin" bindtap="xuanshijan" data-time="1">
  14 +
  15 + <view class="timetop {{timesel==1?'seltimeactive':''}}">开始时间</view>
  16 + <view class="timebottom {{timesel==1?'selnameactive':''}}">{{startdate}}</view>
  17 + </view>
  18 + <view class="timebetin" bindtap="xuanshijan" data-time="2">
  19 +
  20 + <view class="timetop {{timesel==2?'seltimeactive':''}}">结束时间</view>
  21 + <view class="timebottom {{timesel==2?'selnameactive':''}}">{{enddate}}</view>
  22 + </view>
  23 + </view>
  24 +
  25 + <view class="timebox" wx:if="{{currentdate}}">
  26 + <view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key="">
  27 + <view class="itemcontent">{{item.year}}</view>
  28 + <view class="itemcontent">{{item.month}}</view>
  29 + <view class="itemcontent">{{item.day}}</view>
  30 + </view>
  31 +
  32 +
  33 + </view>
  34 + <view class="qudingdate" wx:else bindtap='qudingxuandate'>确定</view>
  35 +
  36 +
  37 + <view wx:if="{{currentdate}}">
  38 +
  39 + <date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" />
  40 +
  41 + </view>
  42 + </view>
  43 +</view>
  44 +
  45 +<!-- 车辆状况日期弹出层 -->
  46 +
  47 +<view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view>
  48 +<view wx:if="{{showModal}}">
  49 + <view class="modal-content">
  50 + <!-- 年份 -->
  51 + <view class="modal_year">2019年</view>
  52 + <!-- 月份 -->
  53 + <view class="modal_month">
  54 + <view class="month_single {{changeColor == index?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item}}</view>
  55 + </view>
  56 + <view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view>
  57 + <view class='btns'>
  58 + <view class="cacle" bindtap="hideModal">取消</view>
  59 + <view class="cacle sure" bindtap="hideModal">确定</view>
  60 + </view>
  61 + </view>
  62 +</view>
  63 +
  64 +
  65 +
  66 +<view class="detailhead">
  67 + <view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">车辆状况</view>
  68 + <view class="detailname {{state==2?'selactive':''}}" bindtap="selectshebei" data-id="2">车辆流水</view>
  69 +
  70 +</view>
  71 +
  72 +
  73 +<!-- 车辆状况 -->
  74 +
  75 +<view class="peoplestate" wx:if="{{state==1}}">
  76 + <!-- <view class="date" bindtap="datexianshi">
  77 + <view class="dateleft">
  78 + <image src="/img/row.png"></image>
  79 + </view>
  80 + <view class="datetime">
  81 + <view class="datesel">
  82 + {{watertime}}
  83 + </view>
  84 +
  85 + <view class="datepic">
  86 + <image src="/img/row.png"></image>
  87 + </view>
  88 + </view>
  89 +
  90 + <view class="dateright">
  91 + <image src="/img/row.png"></image>
  92 + </view>
  93 + </view> -->
  94 +
  95 + <view class="date" bindtap='toShowModal'>
  96 + <view class="dateleft">
  97 + <image src="/img/row.png"></image>
  98 + </view>
  99 + <view class="datetime">
  100 + <view class="datesel">
  101 + {{time}}
  102 + </view>
  103 +
  104 + <view class="datepic">
  105 + <image src="/img/row.png"></image>
  106 + </view>
  107 + </view>
  108 +
  109 + <view class="dateright">
  110 + <image src="/img/row.png"></image>
  111 + </view>
  112 + </view>
  113 +
  114 +
  115 + <view class="shebeinum">
  116 + <text class="she">车辆进出信息</text>
  117 + </view>
  118 +
  119 + <view class="containerzhe">
  120 + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas>
  121 + </view>
  122 +
  123 + <view class="datetime">{{showdate}}</view>
  124 +
  125 +
  126 +</view>
  127 +
  128 +<!-- 车辆流水 -->
  129 +
  130 +<view class="lishui" wx:if="{{state==2}}">
  131 + <view class="date" bindtap="datexianshi">
  132 + <view class="dateleft">
  133 + <image src="/img/row.png"></image>
  134 + </view>
  135 + <view class="datetime">
  136 + <view class="datesel">
  137 + {{watertime}}
  138 + </view>
  139 +
  140 + <view class="datepic">
  141 + <image src="/img/row.png"></image>
  142 + </view>
  143 + </view>
  144 +
  145 + <view class="dateright">
  146 + <image src="/img/row.png"></image>
  147 + </view>
  148 + </view>
  149 +
  150 + <view class="shuibox">
  151 +
  152 + <view class="shihead">
  153 + <view class="headitem shijian">时间</view>
  154 + <view class="headitem shexiang">摄像头</view>
  155 + <view class="headitem derition">方向</view>
  156 +
  157 + </view>
  158 + <view class="shuicontent">
  159 + <view class="shuiitem">
  160 + <view class="shuiitemleft shijian">06.01</view>
  161 + <view class="shuiitemleft shexiang">大厅左上角</view>
  162 + <view class="shuiitemleft derition">进</view>
  163 + </view>
  164 + <view class="shuiitem">
  165 + <view class="shuiitemleft shijian">06.01</view>
  166 + <view class="shuiitemleft shexiang">大厅左上角</view>
  167 + <view class="shuiitemleft derition">进</view>
  168 + </view>
  169 +
  170 + <view class="shuiitem">
  171 + <view class="shuiitemleft shijian">06.01</view>
  172 + <view class="shuiitemleft shexiang">大厅左上角</view>
  173 + <view class="shuiitemleft derition">进</view>
  174 + </view>
  175 + <view class="shuiitem">
  176 + <view class="shuiitemleft shijian">06.01</view>
  177 + <view class="shuiitemleft shexiang">车间后方大转盘</view>
  178 + <view class="shuiitemleft derition">进</view>
  179 + </view>
  180 + </view>
  181 +
  182 + </view>
  183 +
  184 +</view>
  1 +@import "../qiyeyongdian/detail/detail.wxss";
  2 +
  3 +.detailhead {
  4 + display: flex;
  5 + align-items: center;
  6 + justify-content: space-around;
  7 + padding: 20rpx 69rpx;
  8 + box-sizing: border-box;
  9 + border-bottom: 1rpx solid #f5f5f5;
  10 +}
  11 +
  12 +.detailname {
  13 + color: #999;
  14 + font-size: 28rpx;
  15 +}
  16 +
  17 +.selactive {
  18 + position: relative;
  19 +}
  20 +
  21 +.selactive::after {
  22 + display: block;
  23 + content: '';
  24 + width: 60rpx;
  25 +
  26 + border: 1rpx solid #ff9400;
  27 + position: absolute;
  28 + left: 50%;
  29 + right: 50%;
  30 + transform: translate(-50%);
  31 + bottom: -20rpx;
  32 +}
  33 +
  34 +.date {
  35 + display: flex;
  36 + align-items: center;
  37 + justify-content: space-between;
  38 + height: 70rpx;
  39 + background: #f3f5f8;
  40 + padding: 0 31rpx;
  41 + box-sizing: border-box;
  42 +}
  43 +
  44 +.dateleft {
  45 + width: 23rpx;
  46 + height: 23rpx;
  47 + font-size: 0;
  48 + transform: rotate(180deg);
  49 +}
  50 +
  51 +.dateright {
  52 + width: 23rpx;
  53 + height: 23rpx;
  54 + font-size: 0;
  55 +}
  56 +
  57 +.datetime {
  58 + display: flex;
  59 + align-items: center;
  60 +}
  61 +
  62 +.datepic {
  63 + width: 16rpx;
  64 + height: 16rpx;
  65 + font-size: 0;
  66 + transform: rotate(90deg);
  67 + margin-left: 12rpx;
  68 +}
  69 +
  70 +.datesel {
  71 + color: #666;
  72 + font-size: 28rpx;
  73 +}
  74 +
  75 +.shebeinum {
  76 + color: #333;
  77 + font-size: 32rpx;
  78 + font-weight: bold;
  79 + padding: 40rpx 0 0 30rpx;
  80 + box-sizing: border-box;
  81 + border-top: 1rpx solid #f5f5f5;
  82 + position: relative;
  83 +}
  84 +
  85 +.she {
  86 + margin-left: 18rpx;
  87 +}
  88 +
  89 +.shebeinum::before {
  90 + content: '';
  91 + display: block;
  92 + width: 8rpx;
  93 + height: 33rpx;
  94 + background: #ff9400ff;
  95 + position: absolute;
  96 + top: 43rpx;
  97 + left: 30rpx;
  98 +}
  99 +
  100 +.containerzhe {
  101 + width: 750rpx;
  102 + height: 500rpx;
  103 +}
  104 +
  105 +.datetime {
  106 + color: #333;
  107 + font-size: 28rpx;
  108 + display: flex;
  109 + justify-content: center;
  110 +}
  111 +
  112 +.timewrap {
  113 + background: #fff;
  114 + /* height: 700rpx; */
  115 + padding-bottom: 40rpx;
  116 + box-sizing: border-box
  117 +}
  118 +
  119 +.timetwo {
  120 + display: flex;
  121 + align-items: center;
  122 + padding: 60rpx 100rpx 50rpx;
  123 + box-sizing: border-box;
  124 + justify-content: space-between;
  125 +}
  126 +
  127 +.timebetin {
  128 + display: flex;
  129 + flex-direction: column;
  130 + justify-content: center;
  131 + align-items: center;
  132 +}
  133 +
  134 +.timetop {
  135 + color: #999;
  136 + font-size: 24rpx;
  137 +}
  138 +
  139 +.timebottom {
  140 + color: #999;
  141 + font-size: 32rpx;
  142 + margin-top: 10rpx;
  143 +}
  144 +
  145 +.seltimeactive {
  146 + color: #ff9400;
  147 +}
  148 +
  149 +.selnameactive {
  150 + color: #333;
  151 +}
  152 +
  153 +.timebox {
  154 + width: 580rpx;
  155 + height: 308rpx;
  156 + overflow-y: scroll;
  157 + margin: 0 auto;
  158 +}
  159 +
  160 +.timeboxitem {
  161 + display: flex;
  162 + align-items: center;
  163 + justify-content: space-between;
  164 + padding: 30rpx 78rpx;
  165 + box-sizing: border-box;
  166 + background: #f9f8fe;
  167 + color: #999;
  168 + font-size: 28rpx;
  169 + border-bottom: 1rpx solid #f5f5f5;
  170 +}
  171 +
  172 +.shihead {
  173 + display: flex;
  174 + align-items: center;
  175 + justify-content: space-between;
  176 + height: 100rpx;
  177 + padding: 0 28rpx;
  178 + border-bottom: 1rpx solid #f5f5f5;
  179 +}
  180 +
  181 +.headitem {
  182 + color: #666;
  183 + font-size: 28rpx;
  184 + text-align: left;
  185 +}
  186 +
  187 +.shuiitem {
  188 + display: flex;
  189 + align-items: center;
  190 + justify-content: space-between;
  191 + padding: 34rpx 28rpx;
  192 + box-sizing: border-box;
  193 + border-bottom: 1rpx solid #f5f5f5;
  194 +}
  195 +
  196 +.shuiitemleft {
  197 + color: #333;
  198 + font-size: 24rpx;
  199 + text-align: left;
  200 +}
  201 +
  202 +.shijian {
  203 + width: 60rpx;
  204 +}
  205 +
  206 +.shexiang {
  207 + width: 196rpx;
  208 + overflow: hidden;
  209 + text-overflow: ellipsis;
  210 + white-space: nowrap;
  211 +}
  212 +
  213 +.derition {
  214 + width: 56rpx;
  215 +}
  216 +
  217 +.qudingdate {
  218 + width: 260rpx;
  219 + height: 80rpx;
  220 + background: rgba(255, 148, 0, 1);
  221 + opacity: 1;
  222 + border-radius: 10rpx;
  223 + color:#fff;
  224 + font-size: 30rpx;
  225 + text-align: center;
  226 + line-height: 80rpx;
  227 + margin:8rpx auto 0;
  228 +
  229 +}
@@ -12,7 +12,7 @@ Page({ @@ -12,7 +12,7 @@ Page({
12 data: { 12 data: {
13 showModal: false, 13 showModal: false,
14 modalTitle: ["选择时间", "选择地磅", "选择货物"], 14 modalTitle: ["选择时间", "选择地磅", "选择货物"],
15 - modalNum: 2, 15 + modalNum: 0,
16 monthList: ["货物名字", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", ], 16 monthList: ["货物名字", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘炒股的人格", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", "车间后方大转盘", ],
17 time: '2019.01.01-2019.01.31', 17 time: '2019.01.01-2019.01.31',
18 changeColor: 0, 18 changeColor: 0,
@@ -41,6 +41,17 @@ Page({ @@ -41,6 +41,17 @@ Page({
41 btn: "详情" 41 btn: "详情"
42 }, 42 },
43 ], 43 ],
  44 +
  45 + watertime:'',
  46 +
  47 +
  48 + //出库日期
  49 + statedate: '',
  50 +
  51 + timestate:1,
  52 + timesel:1,
  53 + startdate: '',
  54 + enddate: '',
44 ec: { 55 ec: {
45 56
46 onInit: function(canvas, width, height) { 57 onInit: function(canvas, width, height) {
@@ -68,6 +79,23 @@ Page({ @@ -68,6 +79,23 @@ Page({
68 this.setData({ 79 this.setData({
69 tabNum: e.currentTarget.dataset.id 80 tabNum: e.currentTarget.dataset.id
70 }) 81 })
  82 + if(this.data.tabNum==0){
  83 +
  84 + this.echartsComponnet = this.selectComponent('#mychart');
  85 +
  86 +
  87 + //如果是第一次绘制
  88 +
  89 + if (!Chart) {
  90 + this.init_echarts(); //初始化图表
  91 +
  92 +
  93 + } else {
  94 +
  95 + this.setOption(Chart); //更新数据
  96 +
  97 + }
  98 + }
71 99
72 }, 100 },
73 toShowModal(e) { 101 toShowModal(e) {
@@ -75,38 +103,163 @@ Page({ @@ -75,38 +103,163 @@ Page({
75 showModal: true 103 showModal: true
76 }) 104 })
77 }, 105 },
  106 + //显示日期弹层
  107 +
  108 + datexianshi() {
  109 + this.setData({
  110 + datechu: true,
  111 + currentdate: true
  112 + })
  113 +
  114 + //获取年
  115 + var date = new Date();
  116 + var obj = {}
  117 + var year = date.getFullYear();
  118 + var month = date.getMonth() + 1;
  119 + if (month < 10) {
  120 + month = '0' + month
  121 + }
78 122
79 - hideModal() { 123 + var day = date.getDate();
  124 + if (day < 10) {
  125 + day = "0" + day
  126 + }
  127 + console.log()
  128 + if (typeof (day) == 'number') {
  129 + day = day.toString()
  130 + }
  131 + console.log(typeof (day))
80 this.setData({ 132 this.setData({
81 - showModal: false  
82 - }); 133 + datePickerValue: [year, month, day],
  134 + })
  135 +
83 }, 136 },
84 - choice(e) {  
85 137
  138 + // 时间地磅货物选择
  139 +
  140 + selectbang(e){
86 this.setData({ 141 this.setData({
87 - changeColor: e.currentTarget.dataset.id 142 + modalNum:e.currentTarget.dataset.index
88 }) 143 })
89 }, 144 },
90 - /**  
91 - * 生命周期函数--监听页面加载  
92 - */  
93 - onLoad: function(options) {  
94 145
95 - this.echartsComponnet = this.selectComponent('#mychart');  
96 146
97 147
98 - //如果是第一次绘制  
99 -  
100 - if (!Chart) {  
101 - this.init_echarts(); //初始化图表  
102 148
  149 + //开始时间和结束时间
  150 + xuanshijan(e) {
  151 + this.setData({
  152 + timesel: e.currentTarget.dataset.time,
  153 + currentdate: true
  154 + })
103 155
  156 + this.datexianshi()
  157 + },
  158 + datePickerOnSureClick: function (e) {
  159 + console.log('datePickerOnSureClick');
  160 +
  161 + if (this.data.timesel == 1) {
  162 + console.log(e);
  163 + this.setData({
  164 + date: `${e.detail.value[0]}${e.detail.value[1]}${e.detail.value[2]}日`,
  165 + datePickerValue: e.detail.value,
  166 + datePickerIsShow: false,
  167 + currentdate: false,
  168 + state: 2,
  169 + startdate: e.detail.value[0] + '.' + e.detail.value[1] + "." + e.detail.value[2]
  170 + });
104 } else { 171 } else {
  172 + console.log(e);
  173 + this.setData({
  174 + date: `${e.detail.value[0]}${e.detail.value[1]}${e.detail.value[2]}日`,
  175 + datePickerValue: e.detail.value,
  176 + datePickerIsShow: false,
  177 + currentdate: false,
  178 + state: 2,
  179 + enddate: e.detail.value[0] + '.' + e.detail.value[1] + "." + e.detail.value[2]
  180 + });
  181 + }
105 182
106 - this.setOption(Chart); //更新数据 183 + },
107 184
108 - } 185 + datePickerOnCancelClick: function (event) {
  186 + console.log('datePickerOnCancelClick');
  187 + console.log(event);
  188 + this.setData({
  189 + datePickerIsShow: false,
  190 +
  191 + currentdate: false,
  192 + state: 2
  193 + });
  194 + },
  195 +
  196 + //确定选择开始日期和结束日期
  197 + qudingxuandate() {
  198 + this.setData({
  199 + datechu: false,
  200 + watertime: this.data.startdate + '-' + this.data.enddate
  201 + })
  202 + },
109 203
  204 +// 选择地磅
  205 + quedibang(){
  206 + this.setData({
  207 + datechu: false
  208 + })
  209 + },
  210 + // 取消选择
  211 + quxiaobang(){
  212 + this.setData({
  213 + datechu: false,
  214 + watertime: app.newnowDate() + '-' + app.endate(),
  215 + })
  216 + },
  217 + choice(e) {
  218 + let index = e.currentTarget.dataset.id
  219 +
  220 + this.setData({
  221 + changeColor: e.currentTarget.dataset.id,
  222 + watertime: this.data.monthList[index],
  223 +
  224 + })
  225 + },
  226 + /**
  227 + * 生命周期函数--监听页面加载
  228 + */
  229 + onLoad: function(options) {
  230 +
  231 + this.setData({
  232 + statedate: app.monthnowDate(),
  233 + startdate: app.newnowDate(),
  234 + enddate: app.endate()
  235 + })
  236 + let newdate = this.data.statedate.split("-");
  237 + this.setData({
  238 + showdate: newdate[0] + '年' + newdate[1] + '月',
  239 + watertime: app.newnowDate() + '-' + app.endate(),
  240 + })
  241 +
  242 +
  243 +
  244 + },
  245 + // 跳转详情页
  246 + detail(){
  247 + wx.navigateTo({
  248 + url: '/pages/companybox/zhishudetail/chengpindetail/chengpindetail',
  249 + })
  250 + },
  251 +
  252 +
  253 + // 选择日期
  254 + bindstateDateChange(e) {
  255 + console.log('picker发送选择改变,携带值为', e.detail.value)
  256 + this.setData({
  257 + statedate: e.detail.value
  258 + })
  259 + let newdate = this.data.statedate.split("-");
  260 + this.setData({
  261 + showdate: newdate[0] + '年' + newdate[1] + '月'
  262 + })
110 }, 263 },
111 //初始化图表 264 //初始化图表
112 265
@@ -259,6 +412,7 @@ Page({ @@ -259,6 +412,7 @@ Page({
259 * 生命周期函数--监听页面显示 412 * 生命周期函数--监听页面显示
260 */ 413 */
261 onShow: function() { 414 onShow: function() {
  415 +
262 this.echartsComponnet = this.selectComponent('#mychart'); 416 this.echartsComponnet = this.selectComponent('#mychart');
263 417
264 418
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 "navigationBarTextStyle": "black", 2 "navigationBarTextStyle": "black",
3 "navigationBarTitleText": "成品", 3 "navigationBarTitleText": "成品",
4 "usingComponents": { 4 "usingComponents": {
5 - "ec-canvas": "../../../../ec-canvas/ec-canvas" 5 + "ec-canvas": "../../../../ec-canvas/ec-canvas",
  6 + "date-picker": "../../../../components/date-picker/date-picker"
6 } 7 }
7 } 8 }
1 <!--pages/qiyeyongdian/detail/detail.wxml--> 1 <!--pages/qiyeyongdian/detail/detail.wxml-->
2 <!-- 货物信息 --> 2 <!-- 货物信息 -->
3 -<view class="modal-mask" bindtap="hideModal" wx:if="{{showModal}}"></view>  
4 -<view wx:if="{{showModal}}"> 3 +<view class="modal-mask" bindtap="hideModal" wx:if="{{datechu}}"></view>
  4 +<view wx:if="{{datechu}}">
5 <view class="modal-content"> 5 <view class="modal-content">
6 - <!-- 选项卡 --> 6 + <!-- 时间 地磅 货物 选项卡 -->
  7 +
7 <view class="modal_year"> 8 <view class="modal_year">
8 - <view class="modal_single {{modalNum == index ?'modal_choice':''}}" wx:for="{{modalTitle}}" wx:key="">{{item}}</view> 9 + <view class="modal_single {{modalNum == index ?'modal_choice':''}}" wx:for="{{modalTitle}}" wx:key="" bindtap='selectbang' data-index="{{index}}">{{item}}</view>
9 </view> 10 </view>
10 - <!-- 月份 -->  
11 - <scroll-view scroll-y style="height: 400px;">  
12 - <view class="modal_month">  
13 - <view class="month_single {{changeColor == index?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item}}</view> 11 +
  12 + <!-- 选择时间 -->
  13 + <view class="timewrap" wx:if="{{modalNum==0}}">
  14 +
  15 + <view class="timewrap">
  16 +
  17 +
  18 + <!-- 开始时间和结束时间 -->
  19 +
  20 + <view class="timetwo">
  21 + <view class="timebetin" bindtap="xuanshijan" data-time="1">
  22 +
  23 + <view class="timetop {{timesel==1?'seltimeactive':''}}">开始时间</view>
  24 + <view class="timebottom {{timesel==1?'selnameactive':''}}">{{startdate}}</view>
  25 + </view>
  26 + <view class="timebetin" bindtap="xuanshijan" data-time="2">
  27 +
  28 + <view class="timetop {{timesel==2?'seltimeactive':''}}">结束时间</view>
  29 + <view class="timebottom {{timesel==2?'selnameactive':''}}">{{enddate}}</view>
  30 + </view>
  31 + </view>
  32 +
  33 + <view class="timebox" wx:if="{{currentdate}}">
  34 + <view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key="">
  35 + <view class="itemcontent">{{item.year}}</view>
  36 + <view class="itemcontent">{{item.month}}</view>
  37 + <view class="itemcontent">{{item.day}}</view>
  38 + </view>
  39 +
  40 +
  41 + </view>
  42 + <view class="qudingdate" wx:else bindtap='qudingxuandate'>确定</view>
  43 +
  44 +
  45 + <view wx:if="{{currentdate}}">
  46 +
  47 + <date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" />
  48 +
  49 + </view>
  50 +
  51 +
  52 + </view>
  53 +
  54 +
14 </view> 55 </view>
15 - </scroll-view>  
16 - <view class='btns'>  
17 - <view class="cacle" bindtap="hideModal">取消</view>  
18 - <view class="cacle sure" bindtap="hideModal">确定</view> 56 +
  57 + <!-- 选择地磅 选择货物 -->
  58 + <view class="dibang" wx:else>
  59 + <!-- 选择地磅 -->
  60 + <scroll-view scroll-y style="height: 400px;" wx:if="{{modalNum==1}}">
  61 + <view class="modal_month">
  62 + <view class="month_single {{changeColor == index?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item}}</view>
  63 + </view>
  64 + </scroll-view>
  65 +
  66 + <!--选择货物 -->
  67 +
  68 + <scroll-view scroll-y style="height: 400px;" wx:if="{{modalNum==2}}">
  69 + <view class="modal_month">
  70 + <view class="month_single {{changeColor == index?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item}}</view>
  71 + </view>
  72 + </scroll-view>
  73 + <view class='btns'>
  74 + <view class="cacle" bindtap="quxiaobang">取消</view>
  75 + <view class="cacle sure" bindtap="quedibang">确定</view>
  76 + </view>
19 </view> 77 </view>
  78 +
  79 +
20 </view> 80 </view>
21 </view> 81 </view>
22 -<!-- 选项卡 --> 82 +
  83 +
  84 +
  85 +
  86 +
  87 +<!-- 出库 流水选项卡 -->
23 <view class="tab"> 88 <view class="tab">
24 <view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">{{item}}</view> 89 <view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">{{item}}</view>
25 </view> 90 </view>
@@ -30,9 +95,15 @@ @@ -30,9 +95,15 @@
30 </view> 95 </view>
31 <view class="date_time"> 96 <view class="date_time">
32 <!-- 出库 --> 97 <!-- 出库 -->
33 - <view wx:if="{{tabNum == 0}}">2019.06</view> 98 + <view wx:if="{{tabNum == 0}}">
  99 + <picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month">
  100 + <view class="picker">
  101 + {{statedate}}
  102 + </view>
  103 + </picker>
  104 + </view>
34 <!-- 流水 --> 105 <!-- 流水 -->
35 - <view wx:if="{{tabNum == 1}}" bindtap='toShowModal'>{{time}}</view> 106 + <view wx:if="{{tabNum == 1}}" bindtap='datexianshi'>{{watertime}}</view>
36 <view class="rowimg"> 107 <view class="rowimg">
37 <image src='/img/row.png' class="down"></image> 108 <image src='/img/row.png' class="down"></image>
38 </view> 109 </view>
@@ -56,7 +127,7 @@ @@ -56,7 +127,7 @@
56 <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas> 127 <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas>
57 </view> 128 </view>
58 <view class="total_power"> 129 <view class="total_power">
59 - <view>2019年6月</view> 130 + <view>{{showdate}}</view>
60 </view> 131 </view>
61 </view> 132 </view>
62 </view> 133 </view>
@@ -68,12 +139,12 @@ @@ -68,12 +139,12 @@
68 <view class="table_title"> 139 <view class="table_title">
69 <view wx:for="{{tableTitle}}" wx:key="">{{item}}</view> 140 <view wx:for="{{tableTitle}}" wx:key="">{{item}}</view>
70 </view> 141 </view>
71 - <view class="table_tr" wx:for="{{trList}}" wx:key=""> 142 + <view class="table_tr" wx:for="{{trList}}" wx:key="" bindtap="detail">
72 <view class="tr_time">{{item.date}}</view> 143 <view class="tr_time">{{item.date}}</view>
73 <view class="tr_pos">{{item.position}}</view> 144 <view class="tr_pos">{{item.position}}</view>
74 <view class="tr_name">{{item.name}}</view> 145 <view class="tr_name">{{item.name}}</view>
75 <view class="tr_time">{{item.num}}</view> 146 <view class="tr_time">{{item.num}}</view>
76 - <view class="tr_btn" >{{item.btn}}</view> 147 + <view class="tr_btn">{{item.btn}}</view>
77 </view> 148 </view>
78 </view> 149 </view>
79 </view> 150 </view>
1 /* pages/qiyeyongdian/detail/detail.wxss */ 1 /* pages/qiyeyongdian/detail/detail.wxss */
  2 +@import "../member/member.wxss";
2 3
3 .search_month { 4 .search_month {
4 width: 686rpx; 5 width: 686rpx;
@@ -86,7 +87,7 @@ ec-canvas { @@ -86,7 +87,7 @@ ec-canvas {
86 z-index: 9500; 87 z-index: 9500;
87 width: 100%; 88 width: 100%;
88 /* height: 55%; */ 89 /* height: 55%; */
89 - overflow: hidden; 90 + /* overflow: hidden; */
90 /* padding: 120rpx 50rpx 50rpx; */ 91 /* padding: 120rpx 50rpx 50rpx; */
91 background: #fff; 92 background: #fff;
92 border-radius: 2rpx; 93 border-radius: 2rpx;
@@ -101,19 +102,34 @@ ec-canvas { @@ -101,19 +102,34 @@ ec-canvas {
101 align-items: center; 102 align-items: center;
102 font-size: 28rpx; 103 font-size: 28rpx;
103 color: #666; 104 color: #666;
104 - padding-top: 20rpx; 105 + padding: 20rpx 0;
105 border:1rpx solid #f5f5f5; 106 border:1rpx solid #f5f5f5;
106 border-left:none; 107 border-left:none;
107 border-right: none; 108 border-right: none;
108 } 109 }
109 .modal_single{ 110 .modal_single{
  111 +
110 border-bottom:4rpx solid #fff; 112 border-bottom:4rpx solid #fff;
111 } 113 }
112 .modal_choice{ 114 .modal_choice{
113 - border-bottom-color: #FF9400; 115 +
114 color: #FF9400; 116 color: #FF9400;
115 font-weight: 600; 117 font-weight: 600;
116 - padding-bottom:20rpx; 118 + position: relative;
  119 +
  120 +}
  121 +.modal_choice::after{
  122 + display:bolck;
  123 + content:'';
  124 + width:60rpx;
  125 + border:1rpx solid #FF9400;
  126 + position: absolute;
  127 + bottom:-20rpx;
  128 + left:50%;
  129 + right:50%;
  130 + transform: translate(-50%)
  131 +
  132 +
117 } 133 }
118 /* 选项卡 */ 134 /* 选项卡 */
119 135
@@ -123,7 +139,7 @@ ec-canvas { @@ -123,7 +139,7 @@ ec-canvas {
123 justify-content: space-around; 139 justify-content: space-around;
124 align-items: center; 140 align-items: center;
125 padding-top: 20rpx; 141 padding-top: 20rpx;
126 - color: #ff9400; 142 + color: #666;
127 border-top: 1rpx solid #f5f5f5; 143 border-top: 1rpx solid #f5f5f5;
128 } 144 }
129 145
@@ -134,6 +150,7 @@ ec-canvas { @@ -134,6 +150,7 @@ ec-canvas {
134 150
135 .tab_border { 151 .tab_border {
136 border-bottom: 4rpx solid #ff9400; 152 border-bottom: 4rpx solid #ff9400;
  153 + color:#ff9400;
137 } 154 }
138 155
139 /* 月份 */ 156 /* 月份 */
  1 +// pages/companybox/zhishudetail/chengpindetail/chengpindetail.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 +<!--pages/yuanliaomsg/yuanliaoDetail/yuanliaoDetail.wxml-->
  2 +<view class="detail_single first_single">
  3 + <view>时间</view>
  4 + <view>2019-07-03 19:00:00</view>
  5 +</view>
  6 +<view class="detail_single">
  7 + <view>地磅</view>
  8 + <view>安装位置/地磅名称</view>
  9 +</view>
  10 +<view class="detail_single">
  11 + <view>货物名称</view>
  12 + <view>安装位置/地磅名称</view>
  13 +</view>
  14 +<view class="detail_single">
  15 + <view>车牌号</view>
  16 + <view>784646</view>
  17 +</view>
  18 +<view class="detail_single">
  19 + <view>毛重(吨)</view>
  20 + <view>4154</view>
  21 +</view>
  22 +<view class="detail_single">
  23 + <view>皮重(吨)</view>
  24 + <view>4154</view>
  25 +</view>
  26 +<view class="detail_single">
  27 + <view>净重(吨)</view>
  28 + <view>4154</view>
  29 +</view>
  30 +<view class="equipment_pic">
  31 + <view>设备照片</view>
  32 + <view class="pic_group">
  33 + <view class="equipment_img">
  34 + <image src="/img/logo3.png"></image>
  35 + </view>
  36 + <view class="equipment_img">
  37 + <image src="/img/logo3.png"></image>
  38 + </view>
  39 + <view class="equipment_img">
  40 + <image src="/img/logo3.png"></image>
  41 + </view>
  42 + </view>
  43 +</view>
  1 +/* pages/yuanliaomsg/yuanliaoDetail/yuanliaoDetail.wxss */
  2 +
  3 +
  4 +.detail_single{
  5 + display: flex;
  6 + flex: row;
  7 + align-items: center;
  8 + justify-content: space-between;
  9 + padding: 30rpx;
  10 + border-bottom: 1rpx solid #f5f5f5;
  11 + color: #333;
  12 + font-size: 28rpx;
  13 +}
  14 +.first_single{
  15 + border-top: 1rpx solid #f5f5f5;
  16 +}
  17 +.equipment_pic{
  18 + padding:40rpx;
  19 + color: #333;
  20 + font-size: 32rpx;
  21 + font-weight: 600;
  22 +}
  23 +.pic_group{
  24 + display: flex;
  25 + flex-direction: row;
  26 + justify-content: space-between;
  27 + align-items: center;
  28 + margin-top: 30rpx;
  29 +}
  30 +.equipment_img{
  31 + width: 210rpx;
  32 + height: 210rpx;
  33 + border-radius: 10rpx;
  34 +}
@@ -15,7 +15,12 @@ function initChart1(canvas, width, height) { @@ -15,7 +15,12 @@ function initChart1(canvas, width, height) {
15 text: '', 15 text: '',
16 left: 'center' 16 left: 'center'
17 }, 17 },
18 - 18 + legend: {
  19 + data: ['进人数']
  20 + },
  21 + textStyle: {
  22 + fontSize: 14
  23 + },
19 24
20 toolbox: { 25 toolbox: {
21 26
@@ -26,8 +31,13 @@ function initChart1(canvas, width, height) { @@ -26,8 +31,13 @@ function initChart1(canvas, width, height) {
26 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'], 31 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'],
27 axisLabel: { 32 axisLabel: {
28 interval: 1, 33 interval: 1,
  34 + fontSize: 13,
29 }, 35 },
30 - name: '日期' 36 + name: '日期',
  37 + nameTextStyle: {
  38 + fontSize: 12
  39 + }
  40 +
31 41
32 42
33 }, 43 },
@@ -39,11 +49,14 @@ function initChart1(canvas, width, height) { @@ -39,11 +49,14 @@ function initChart1(canvas, width, height) {
39 min: 10, 49 min: 10,
40 max: 100, 50 max: 100,
41 splitNumber: 10, 51 splitNumber: 10,
42 - name: '人数' 52 + name: '人数',
  53 + nameTextStyle:{
  54 + fontSize: 12
  55 + }
43 56
44 }, 57 },
45 series: [{ 58 series: [{
46 - name: '', 59 + name: '进人数',
47 type: 'line', 60 type: 'line',
48 smooth: true, 61 smooth: true,
49 color: '#A8ACE8', 62 color: '#A8ACE8',
@@ -115,7 +128,12 @@ Page({ @@ -115,7 +128,12 @@ Page({
115 date: '', 128 date: '',
116 datePickerValue: ['', '', ''], 129 datePickerValue: ['', '', ''],
117 datePickerIsShow: false, 130 datePickerIsShow: false,
118 - datechu:false 131 + datechu:false,
  132 + currentdate:true,
  133 + //开始日期
  134 + startdate:'',
  135 + //结束日期
  136 + enddate:'',
119 }, 137 },
120 138
121 /** 139 /**
@@ -124,7 +142,9 @@ Page({ @@ -124,7 +142,9 @@ Page({
124 onLoad: function(options) { 142 onLoad: function(options) {
125 this.setData({ 143 this.setData({
126 statedate: app.monthnowDate(), 144 statedate: app.monthnowDate(),
127 - watertime: app.newnowDate() + '-' + app.snewnowDate() 145 + watertime: app.newnowDate() + '-' + app.endate(),
  146 + startdate: app.newnowDate(),
  147 + enddate: app.endate()
128 }) 148 })
129 149
130 console.log(this.data.statedate) 150 console.log(this.data.statedate)
@@ -144,14 +164,29 @@ Page({ @@ -144,14 +164,29 @@ Page({
144 164
145 datePickerOnSureClick: function(e) { 165 datePickerOnSureClick: function(e) {
146 console.log('datePickerOnSureClick'); 166 console.log('datePickerOnSureClick');
147 - console.log(e);  
148 - this.setData({  
149 - date: `${e.detail.value[0]}${e.detail.value[1]}${e.detail.value[2]}日`,  
150 - datePickerValue: e.detail.value,  
151 - datePickerIsShow: false,  
152 - datechu:false,  
153 - state:2  
154 - }); 167 +
  168 + if (this.data.timesel==1){
  169 + console.log(e);
  170 + this.setData({
  171 + date: `${e.detail.value[0]}${e.detail.value[1]}${e.detail.value[2]}日`,
  172 + datePickerValue: e.detail.value,
  173 + datePickerIsShow: false,
  174 + currentdate: false,
  175 + state: 2,
  176 + startdate:e.detail.value[0]+'.'+e.detail.value[1]+"."+e.detail.value[2]
  177 + });
  178 + }else{
  179 + console.log(e);
  180 + this.setData({
  181 + date: `${e.detail.value[0]}${e.detail.value[1]}${e.detail.value[2]}日`,
  182 + datePickerValue: e.detail.value,
  183 + datePickerIsShow: false,
  184 + currentdate: false,
  185 + state: 2,
  186 + enddate: e.detail.value[0] + '.' + e.detail.value[1] + "." + e.detail.value[2]
  187 + });
  188 + }
  189 +
155 }, 190 },
156 191
157 datePickerOnCancelClick: function(event) { 192 datePickerOnCancelClick: function(event) {
@@ -159,7 +194,8 @@ Page({ @@ -159,7 +194,8 @@ Page({
159 console.log(event); 194 console.log(event);
160 this.setData({ 195 this.setData({
161 datePickerIsShow: false, 196 datePickerIsShow: false,
162 - datechu:false, 197 +
  198 + currentdate: false,
163 state:2 199 state:2
164 }); 200 });
165 }, 201 },
@@ -176,7 +212,8 @@ Page({ @@ -176,7 +212,8 @@ Page({
176 // 显示日期 212 // 显示日期
177 datexianshi(){ 213 datexianshi(){
178 this.setData({ 214 this.setData({
179 - datechu:true 215 + datechu:true,
  216 + currentdate:true
180 }) 217 })
181 218
182 //获取年 219 //获取年
@@ -204,12 +241,6 @@ Page({ @@ -204,12 +241,6 @@ Page({
204 }, 241 },
205 242
206 243
207 - bindDateChange: function (e) {  
208 - console.log('picker发送选择改变,携带值为', e.detail.value)  
209 - this.setData({  
210 - date: e.detail.value  
211 - })  
212 - },  
213 // 选择时间和摄像头切换 244 // 选择时间和摄像头切换
214 seltime(e) { 245 seltime(e) {
215 this.setData({ 246 this.setData({
@@ -220,8 +251,11 @@ Page({ @@ -220,8 +251,11 @@ Page({
220 //开始时间和结束时间切换 251 //开始时间和结束时间切换
221 xuanshijan(e) { 252 xuanshijan(e) {
222 this.setData({ 253 this.setData({
223 - timesel: e.currentTarget.dataset.time 254 + timesel: e.currentTarget.dataset.time,
  255 + currentdate:true
224 }) 256 })
  257 +
  258 + this.datexianshi()
225 }, 259 },
226 // 选择日期 260 // 选择日期
227 bindstateDateChange(e) { 261 bindstateDateChange(e) {
@@ -234,7 +268,15 @@ Page({ @@ -234,7 +268,15 @@ Page({
234 showdate: newdate[0] + '年' + newdate[1] + '月' 268 showdate: newdate[0] + '年' + newdate[1] + '月'
235 }) 269 })
236 }, 270 },
237 - /** 271 +
  272 + //确定选择开始日期和结束日期
  273 + qudingxuandate(){
  274 + this.setData({
  275 + datechu:false,
  276 + watertime: this.data.startdate+'-'+this.data.enddate
  277 + })
  278 + },
  279 + /**
238 * 生命周期函数--监听页面初次渲染完成 280 * 生命周期函数--监听页面初次渲染完成
239 */ 281 */
240 onReady: function() { 282 onReady: function() {
@@ -2,11 +2,9 @@ @@ -2,11 +2,9 @@
2 <view class="register" wx:if="{{datechu}}"> 2 <view class="register" wx:if="{{datechu}}">
3 3
4 <view class="timewrap"> 4 <view class="timewrap">
5 -  
6 <view class="detailhead"> 5 <view class="detailhead">
7 <view class="detailname {{timestate==1?'selactive':''}}" bindtap="seltime" data-id="1">选择时间</view> 6 <view class="detailname {{timestate==1?'selactive':''}}" bindtap="seltime" data-id="1">选择时间</view>
8 <view class="detailname {{timestate==2?'selactive':''}}" bindtap="seltime" data-id="2">选摄像头</view> 7 <view class="detailname {{timestate==2?'selactive':''}}" bindtap="seltime" data-id="2">选摄像头</view>
9 -  
10 </view> 8 </view>
11 9
12 <!-- 开始时间和结束时间 --> 10 <!-- 开始时间和结束时间 -->
@@ -15,16 +13,16 @@ @@ -15,16 +13,16 @@
15 <view class="timebetin" bindtap="xuanshijan" data-time="1"> 13 <view class="timebetin" bindtap="xuanshijan" data-time="1">
16 14
17 <view class="timetop {{timesel==1?'seltimeactive':''}}">开始时间</view> 15 <view class="timetop {{timesel==1?'seltimeactive':''}}">开始时间</view>
18 - <view class="timebottom {{timesel==1?'selnameactive':''}}">2019.01.09</view> 16 + <view class="timebottom {{timesel==1?'selnameactive':''}}">{{startdate}}</view>
19 </view> 17 </view>
20 <view class="timebetin" bindtap="xuanshijan" data-time="2"> 18 <view class="timebetin" bindtap="xuanshijan" data-time="2">
21 19
22 <view class="timetop {{timesel==2?'seltimeactive':''}}">结束时间</view> 20 <view class="timetop {{timesel==2?'seltimeactive':''}}">结束时间</view>
23 - <view class="timebottom {{timesel==2?'selnameactive':''}}">2019.01.09</view> 21 + <view class="timebottom {{timesel==2?'selnameactive':''}}">{{enddate}}</view>
24 </view> 22 </view>
25 </view> 23 </view>
26 24
27 - <view class="timebox"> 25 + <view class="timebox" wx:if="{{currentdate}}">
28 <view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key=""> 26 <view class="timeboxitem {{sel==index?'timeboxactive':''}}" wx:for="{{timearr}}" wx:key="">
29 <view class="itemcontent">{{item.year}}</view> 27 <view class="itemcontent">{{item.year}}</view>
30 <view class="itemcontent">{{item.month}}</view> 28 <view class="itemcontent">{{item.month}}</view>
@@ -33,11 +31,16 @@ @@ -33,11 +31,16 @@
33 31
34 32
35 </view> 33 </view>
  34 + <view class="qudingdate" wx:else bindtap='qudingxuandate'>确定</view>
  35 +
  36 +
  37 + <view wx:if="{{currentdate}}">
  38 +
  39 + <date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" />
  40 +
  41 + </view>
36 42
37 - <!-- <text>当前日期:{{date}}</text>  
38 - <view bindtap="showDatePicker">选择日期</view> -->  
39 43
40 - <date-picker id="date-picker" value="{{datePickerValue}}" isShow="{{datePickerIsShow}}" bindsureclick="datePickerOnSureClick" bindcancelclick="datePickerOnCancelClick" bindchange="bindDateChange" />  
41 </view> 44 </view>
42 45
43 46
@@ -62,7 +65,7 @@ @@ -62,7 +65,7 @@
62 </view> 65 </view>
63 <view class="datetime"> 66 <view class="datetime">
64 <view class="datesel"> 67 <view class="datesel">
65 - <picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindstateDateChange" fields="month"> 68 + <picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month">
66 <view class="picker"> 69 <view class="picker">
67 {{statedate}} 70 {{statedate}}
68 </view> 71 </view>
@@ -128,18 +131,18 @@ @@ -128,18 +131,18 @@
128 <view class="shuiitemleft shexiang">大厅左上角</view> 131 <view class="shuiitemleft shexiang">大厅左上角</view>
129 <view class="shuiitemleft derition">进</view> 132 <view class="shuiitemleft derition">进</view>
130 </view> 133 </view>
131 - <view class="shuiitem"> 134 + <view class="shuiitem">
132 <view class="shuiitemleft shijian">06.01</view> 135 <view class="shuiitemleft shijian">06.01</view>
133 <view class="shuiitemleft shexiang">大厅左上角</view> 136 <view class="shuiitemleft shexiang">大厅左上角</view>
134 <view class="shuiitemleft derition">进</view> 137 <view class="shuiitemleft derition">进</view>
135 </view> 138 </view>
136 139
137 - <view class="shuiitem"> 140 + <view class="shuiitem">
138 <view class="shuiitemleft shijian">06.01</view> 141 <view class="shuiitemleft shijian">06.01</view>
139 <view class="shuiitemleft shexiang">大厅左上角</view> 142 <view class="shuiitemleft shexiang">大厅左上角</view>
140 <view class="shuiitemleft derition">进</view> 143 <view class="shuiitemleft derition">进</view>
141 </view> 144 </view>
142 - <view class="shuiitem"> 145 + <view class="shuiitem">
143 <view class="shuiitemleft shijian">06.01</view> 146 <view class="shuiitemleft shijian">06.01</view>
144 <view class="shuiitemleft shexiang">车间后方大转盘</view> 147 <view class="shuiitemleft shexiang">车间后方大转盘</view>
145 <view class="shuiitemleft derition">进</view> 148 <view class="shuiitemleft derition">进</view>
@@ -5,10 +5,8 @@ @@ -5,10 +5,8 @@
5 padding: 20rpx 69rpx; 5 padding: 20rpx 69rpx;
6 box-sizing: border-box; 6 box-sizing: border-box;
7 border-bottom: 1rpx solid #f5f5f5; 7 border-bottom: 1rpx solid #f5f5f5;
8 -  
9 } 8 }
10 9
11 -  
12 .detailname { 10 .detailname {
13 color: #999; 11 color: #999;
14 font-size: 28rpx; 12 font-size: 28rpx;
@@ -22,26 +20,28 @@ @@ -22,26 +20,28 @@
22 display: block; 20 display: block;
23 content: ''; 21 content: '';
24 width: 60rpx; 22 width: 60rpx;
25 - height: 1rpx; 23 +
26 border: 1rpx solid #ff9400; 24 border: 1rpx solid #ff9400;
27 position: absolute; 25 position: absolute;
28 - left:50%;  
29 - right:50%; 26 + left: 50%;
  27 + right: 50%;
30 transform: translate(-50%); 28 transform: translate(-50%);
31 bottom: -20rpx; 29 bottom: -20rpx;
32 } 30 }
33 -.date{  
34 - display:flex; 31 +
  32 +.date {
  33 + display: flex;
35 align-items: center; 34 align-items: center;
36 justify-content: space-between; 35 justify-content: space-between;
37 - height:70rpx;  
38 - background: #F3F5F8; 36 + height: 70rpx;
  37 + background: #f3f5f8;
39 padding: 0 31rpx; 38 padding: 0 31rpx;
40 - box-sizing: border-box 39 + box-sizing: border-box;
41 } 40 }
  41 +
42 .dateleft { 42 .dateleft {
43 width: 23rpx; 43 width: 23rpx;
44 - height:23rpx; 44 + height: 23rpx;
45 font-size: 0; 45 font-size: 0;
46 transform: rotate(180deg); 46 transform: rotate(180deg);
47 } 47 }
@@ -51,19 +51,22 @@ @@ -51,19 +51,22 @@
51 height: 23rpx; 51 height: 23rpx;
52 font-size: 0; 52 font-size: 0;
53 } 53 }
54 -.datetime{  
55 - display:flex;  
56 - align-items: center 54 +
  55 +.datetime {
  56 + display: flex;
  57 + align-items: center;
57 } 58 }
58 -.datepic{  
59 - width:16rpx;  
60 - height:16rpx; 59 +
  60 +.datepic {
  61 + width: 16rpx;
  62 + height: 16rpx;
61 font-size: 0; 63 font-size: 0;
62 transform: rotate(90deg); 64 transform: rotate(90deg);
63 - margin-left:12rpx; 65 + margin-left: 12rpx;
64 } 66 }
65 -.datesel{  
66 - color:#666666; 67 +
  68 +.datesel {
  69 + color: #666;
67 font-size: 28rpx; 70 font-size: 28rpx;
68 } 71 }
69 72
@@ -76,119 +79,149 @@ @@ -76,119 +79,149 @@
76 border-top: 1rpx solid #f5f5f5; 79 border-top: 1rpx solid #f5f5f5;
77 position: relative; 80 position: relative;
78 } 81 }
79 -.she{  
80 - margin-left:18rpx; 82 +
  83 +.she {
  84 + margin-left: 18rpx;
81 } 85 }
82 -.shebeinum::before{  
83 - content:'';  
84 - display:block;  
85 - width:8rpx;  
86 - height:33rpx;  
87 - background: #FF9400FF;  
88 - position: absolute;  
89 - top:43rpx;  
90 - left:30rpx;  
91 86
  87 +.she::before {
  88 + content: '';
  89 + display: block;
  90 + width: 8rpx;
  91 + height: 33rpx;
  92 + background: #ff9400;
  93 + position: absolute;
  94 + top: 47rpx;
  95 + left: 30rpx;
92 } 96 }
93 -.containerzhe{  
94 - width:750rpx;  
95 - height:500rpx; 97 +
  98 +.containerzhe {
  99 + width: 750rpx;
  100 + height: 500rpx;
96 } 101 }
97 -.datetime{  
98 - color:#333333; 102 +
  103 +.datetime {
  104 + color: #333;
99 font-size: 28rpx; 105 font-size: 28rpx;
100 - display:flex;  
101 - justify-content: center 106 + display: flex;
  107 + justify-content: center;
102 } 108 }
103 109
104 -.timewrap{ 110 +.timewrap {
105 background: #fff; 111 background: #fff;
106 - height:700rpx; 112 + /* height: 700rpx; */
  113 + padding-bottom: 40rpx;
  114 + box-sizing: border-box
107 } 115 }
108 -.timetwo{  
109 - display:flex; 116 +
  117 +.timetwo {
  118 + display: flex;
110 align-items: center; 119 align-items: center;
111 padding: 60rpx 100rpx 50rpx; 120 padding: 60rpx 100rpx 50rpx;
112 box-sizing: border-box; 121 box-sizing: border-box;
113 - justify-content: space-between 122 + justify-content: space-between;
114 } 123 }
115 -.timebetin{  
116 - display:flex; 124 +
  125 +.timebetin {
  126 + display: flex;
117 flex-direction: column; 127 flex-direction: column;
118 justify-content: center; 128 justify-content: center;
119 - align-items: center 129 + align-items: center;
120 } 130 }
121 -.timetop{  
122 - color:#999999; 131 +
  132 +.timetop {
  133 + color: #999;
123 font-size: 24rpx; 134 font-size: 24rpx;
124 } 135 }
125 -.timebottom{  
126 - color:#999999; 136 +
  137 +.timebottom {
  138 + color: #999;
127 font-size: 32rpx; 139 font-size: 32rpx;
128 - margin-top:10rpx; 140 + margin-top: 10rpx;
129 } 141 }
130 -.seltimeactive{  
131 - color:#FF9400;  
132 142
  143 +.seltimeactive {
  144 + color: #ff9400;
133 } 145 }
134 -.selnameactive{  
135 - color:#333 146 +
  147 +.selnameactive {
  148 + color: #333;
136 } 149 }
137 -.timebox{  
138 - width:580rpx;  
139 - height:308rpx; 150 +
  151 +.timebox {
  152 + width: 580rpx;
  153 + height: 308rpx;
140 overflow-y: scroll; 154 overflow-y: scroll;
141 - margin:0 auto; 155 + margin: 0 auto;
142 } 156 }
143 -.timeboxitem{  
144 - display:flex; 157 +
  158 +.timeboxitem {
  159 + display: flex;
145 align-items: center; 160 align-items: center;
146 justify-content: space-between; 161 justify-content: space-between;
147 padding: 30rpx 78rpx; 162 padding: 30rpx 78rpx;
148 box-sizing: border-box; 163 box-sizing: border-box;
149 - background: #F9F8FE;  
150 - color:#999999; 164 + background: #f9f8fe;
  165 + color: #999;
151 font-size: 28rpx; 166 font-size: 28rpx;
152 - border-bottom:1rpx solid #f5f5f5; 167 + border-bottom: 1rpx solid #f5f5f5;
153 } 168 }
154 -.shihead{  
155 - display:flex; 169 +
  170 +.shihead {
  171 + display: flex;
156 align-items: center; 172 align-items: center;
157 justify-content: space-between; 173 justify-content: space-between;
158 - height:100rpx; 174 + height: 100rpx;
159 padding: 0 28rpx; 175 padding: 0 28rpx;
160 - border-bottom:1rpx solid #f5f5f5;  
161 - 176 + border-bottom: 1rpx solid #f5f5f5;
162 } 177 }
163 -.headitem{  
164 - color:#666666; 178 +
  179 +.headitem {
  180 + color: #666;
165 font-size: 28rpx; 181 font-size: 28rpx;
166 - text-align: left 182 + text-align: left;
167 } 183 }
168 -.shuiitem{  
169 - display:flex; 184 +
  185 +.shuiitem {
  186 + display: flex;
170 align-items: center; 187 align-items: center;
171 justify-content: space-between; 188 justify-content: space-between;
172 padding: 34rpx 28rpx; 189 padding: 34rpx 28rpx;
173 box-sizing: border-box; 190 box-sizing: border-box;
174 - border-bottom:1rpx solid #f5f5f5;  
175 - 191 + border-bottom: 1rpx solid #f5f5f5;
176 } 192 }
177 -.shuiitemleft{  
178 - color:#333333; 193 +
  194 +.shuiitemleft {
  195 + color: #333;
179 font-size: 24rpx; 196 font-size: 24rpx;
180 - text-align: left 197 + text-align: left;
181 } 198 }
182 -.shijian{  
183 - width:60rpx; 199 +
  200 +.shijian {
  201 + width: 60rpx;
184 } 202 }
185 -.shexiang{  
186 - width:196rpx; 203 +
  204 +.shexiang {
  205 + width: 196rpx;
187 overflow: hidden; 206 overflow: hidden;
188 text-overflow: ellipsis; 207 text-overflow: ellipsis;
189 - white-space: nowrap 208 + white-space: nowrap;
  209 +}
  210 +
  211 +.derition {
  212 + width: 56rpx;
  213 +}
  214 +
  215 +.qudingdate {
  216 + width: 260rpx;
  217 + height: 80rpx;
  218 + background: rgba(255, 148, 0, 1);
  219 + opacity: 1;
  220 + border-radius: 10rpx;
  221 + color:#fff;
  222 + font-size: 30rpx;
  223 + text-align: center;
  224 + line-height: 80rpx;
  225 + margin:8rpx auto 0;
190 226
191 } 227 }
192 -.derition{  
193 - width:56rpx;  
194 -}  
@@ -12,7 +12,7 @@ Page({ @@ -12,7 +12,7 @@ Page({
12 data: { 12 data: {
13 showModal: false, 13 showModal: false,
14 monthList: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], 14 monthList: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
15 - time:'2019.01.01-2019.01.31', 15 + time: '2019.01.01-2019.01.31',
16 changeColor: -1, 16 changeColor: -1,
17 ec: { 17 ec: {
18 18
@@ -33,49 +33,61 @@ Page({ @@ -33,49 +33,61 @@ Page({
33 }, 33 },
34 34
35 lazyLoad: true, // 延迟加载 35 lazyLoad: true, // 延迟加载
36 - showt:false 36 + showt: false
37 }, 37 },
38 38
39 }, 39 },
40 choice(e) { 40 choice(e) {
  41 + this.setData({
  42 + showt:false
  43 + })
41 let index = e.currentTarget.dataset.id; 44 let index = e.currentTarget.dataset.id;
42 - index=index+1  
43 - if(index==1||index==3||index==5||index==7||index==8||index==10||index==12){  
44 - if(index<10){ 45 + index = index + 1
  46 + if (index == 1 || index == 3 || index == 5 || index == 7 || index == 8 || index == 10 || index == 12) {
  47 + if (index < 10) {
45 this.setData({ 48 this.setData({
46 - time: "(" + "2019." + "0" + index + ".01" + "-2019." +'0'+ index + ".31" + ")" 49 + time: "(" + "2019." + "0" + index + ".01" + "-2019." + '0' + index + ".31" + ")"
47 }) 50 })
48 - }else{ 51 + } else {
49 this.setData({ 52 this.setData({
50 time: "(" + "2019." + index + ".01" + "-2019." + index + ".31" + ")" 53 time: "(" + "2019." + index + ".01" + "-2019." + index + ".31" + ")"
51 }) 54 })
52 } 55 }
53 -  
54 - }else{  
55 - if(index<10){ 56 +
  57 + } else {
  58 + if (index < 10) {
56 this.setData({ 59 this.setData({
57 time: "(" + "2019." + "0" + index + ".01" + "-2019." + '0' + index + ".30" + ")" 60 time: "(" + "2019." + "0" + index + ".01" + "-2019." + '0' + index + ".30" + ")"
58 }) 61 })
59 - }else{ 62 + } else {
60 this.setData({ 63 this.setData({
61 - time: "(" + "2019." + index + ".01" + "-2019." + index + ".30" + ")" 64 + time: "(" + "2019." + index + ".01" + "-2019." + index + ".30" + ")"
62 }) 65 })
63 } 66 }
64 - 67 +
65 } 68 }
66 this.setData({ 69 this.setData({
67 - changeColor: index-1 70 + changeColor: index - 1
68 }) 71 })
69 }, 72 },
70 - three(){ 73 + three() {
71 this.setData({ 74 this.setData({
72 - time:'近30天',  
73 - showt: !this.data.showt 75 + time: '近30天',
  76 + showt: !this.data.showt,
  77 + changeColor:-1
74 }) 78 })
75 }, 79 },
76 toShowModal(e) { 80 toShowModal(e) {
  81 +
  82 + var date = new Date();
  83 +
  84 + var mon = date.getMonth();
77 this.setData({ 85 this.setData({
78 - showModal: true 86 + showModal: true,
  87 +
  88 + changeColor: mon,
  89 + showt:false
  90 +
79 91
80 }) 92 })
81 }, 93 },
@@ -89,6 +101,37 @@ Page({ @@ -89,6 +101,37 @@ Page({
89 * 生命周期函数--监听页面加载 101 * 生命周期函数--监听页面加载
90 */ 102 */
91 onLoad: function(options) { 103 onLoad: function(options) {
  104 + // 获取默认的月份
  105 +
  106 + var date = new Date();
  107 + var month = date.getMonth() + 1;
  108 + var year = date.getFullYear();
  109 + this.setData({
  110 + showdate: year + '年' + month + '月'
  111 + })
  112 + if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
  113 + if (month < 10) {
  114 + this.setData({
  115 + time: "(" + year + "." + "0" + month + ".01" + "-2019." + '0' + month + ".31" + ")"
  116 + })
  117 + } else {
  118 + this.setData({
  119 + time: "(" + year + "." + month + ".01" + "-2019." + month + ".31" + ")"
  120 + })
  121 + }
  122 +
  123 + } else {
  124 + if (month < 10) {
  125 + this.setData({
  126 + time: "(" + year + "." + "0" + month + ".01" + "-2019." + '0' + month + ".30" + ")"
  127 + })
  128 + } else {
  129 + this.setData({
  130 + time: "(" + year + "." + month + ".01" + "-2019." + month + ".30" + ")"
  131 + })
  132 + }
  133 +
  134 + }
92 135
93 this.echartsComponnet = this.selectComponent('#mychart'); 136 this.echartsComponnet = this.selectComponent('#mychart');
94 137
@@ -170,10 +213,10 @@ Page({ @@ -170,10 +213,10 @@ Page({
170 }, 213 },
171 boundaryGap: false, //1.true 数据点在2个刻度直接 2.fals 数据点在分割线上,即刻度值上 214 boundaryGap: false, //1.true 数据点在2个刻度直接 2.fals 数据点在分割线上,即刻度值上
172 215
173 - 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'], 216 + 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'],
174 217
175 axisLabel: { 218 axisLabel: {
176 - 219 +
177 textStyle: { 220 textStyle: {
178 221
179 fontSize: 13, 222 fontSize: 13,
@@ -215,7 +258,7 @@ Page({ @@ -215,7 +258,7 @@ Page({
215 258
216 type: 'line', 259 type: 'line',
217 260
218 - data: [100, 120, 123, 142, 231, 231, 123, 341, 234, 432, 100, 120, 123, 142, 231, 231, 123, 341, 234, 432, 100, 120, 123, 142, 231, 231, 123, 341, 234, 432,253], 261 + data: [100, 120, 123, 142, 231, 231, 123, 341, 234, 432, 100, 120, 123, 142, 231, 231, 123, 341, 234, 432, 100, 120, 123, 142, 231, 231, 123, 341, 234, 432, 253],
219 262
220 symbol: 'true', 263 symbol: 'true',
221 264
@@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
80 </view> 80 </view>
81 <view class="datetime"> 81 <view class="datetime">
82 <view class="datesel"> 82 <view class="datesel">
83 - <picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange" fields="month"> 83 + <picker mode="date" value="{{date}}" start="" end="" bindchange="bindDateChange" fields="month">
84 <view class="picker"> 84 <view class="picker">
85 {{date}} 85 {{date}}
86 </view> 86 </view>
@@ -208,4 +208,5 @@ @@ -208,4 +208,5 @@
208 .containerzhu{ 208 .containerzhu{
209 width:750rpx; 209 width:750rpx;
210 height:1400rpx; 210 height:1400rpx;
  211 + margin-top:20rpx;
211 } 212 }