正在显示
37 个修改的文件
包含
1799 行增加
和
445 行删除
@@ -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", | 5 | + "pages/companybox/zhishudetail/shebei/shebeilist/shebeilist", |
6 | + "pages/companybox/qiyedetail/qiyedetail", | ||
7 | + "pages/companybox/zhishudetail/member/member", | ||
8 | + "pages/companybox/zhishudetail/car/car", | ||
9 | + | ||
10 | + "pages/companybox/defendetail/defendetail", | ||
11 | + "pages/companybox/zhishudetail/chengpin/chengpin", | ||
6 | "pages/companybox/zhishudetail/yuanliaomsg/yuanliao/yuanliao", | 12 | "pages/companybox/zhishudetail/yuanliaomsg/yuanliao/yuanliao", |
13 | + "pages/qiye/qiye", | ||
14 | + "pages/changqu/changqu", | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + "pages/companybox/zhishudetail/yuanliaomsg/yuanliaoDetail/yuanliaoDetail", | ||
7 | 19 | ||
8 | "pages/companybox/zhishudetail/qiyeyongdian/detail/detail", | 20 | "pages/companybox/zhishudetail/qiyeyongdian/detail/detail", |
9 | - "pages/companybox/qiyedetail/qiyedetail", | ||
10 | - "pages/companybox/defendetail/defendetail", | 21 | + |
22 | + | ||
23 | + | ||
11 | "pages/companybox/jichuxinxi/jichuxinxi", | 24 | "pages/companybox/jichuxinxi/jichuxinxi", |
12 | - "pages/qiye/qiye", | ||
13 | "pages/login/login", | 25 | "pages/login/login", |
14 | - | ||
15 | "pages/mine/mine", | 26 | "pages/mine/mine", |
16 | "pages/index/index", | 27 | "pages/index/index", |
17 | "pages/logs/logs", | 28 | "pages/logs/logs", |
18 | "pages/yujing/yujing", | 29 | "pages/yujing/yujing", |
19 | "pages/companybox/zhishudetail/qiyeyongdian/qyyd/qyyd", | 30 | "pages/companybox/zhishudetail/qiyeyongdian/qyyd/qyyd", |
20 | - "pages/companybox/zhishudetail/member/member", | ||
21 | - "pages/companybox/zhishudetail/chengpin/chengpin", | ||
22 | - | ||
23 | - "pages/companybox/zhishudetail/yuanliaomsg/yuanliaoDetail/yuanliaoDetail" | 31 | + "pages/ditu/ditu", |
32 | + "pages/companybox/zhishudetail/chengpindetail/chengpindetail" | ||
24 | ], | 33 | ], |
25 | "window": { | 34 | "window": { |
26 | "backgroundTextStyle": "light", | 35 | "backgroundTextStyle": "light", |
@@ -61,5 +70,10 @@ | @@ -61,5 +70,10 @@ | ||
61 | } | 70 | } |
62 | ] | 71 | ] |
63 | }, | 72 | }, |
73 | + "permission": { | ||
74 | + "scope.userLocation": { | ||
75 | + "desc": "你的位置信息将用于小程序位置接口的效果展示" | ||
76 | + } | ||
77 | + }, | ||
64 | "sitemapLocation": "sitemap.json" | 78 | "sitemapLocation": "sitemap.json" |
65 | } | 79 | } |
@@ -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 | } |
img/demo (1).png
已删除
100644 → 0
2.1 KB
img/demo (18).png
已删除
100644 → 0
1.4 KB
img/demo (19).png
已删除
100644 → 0
1.5 KB
img/demo (20).png
已删除
100644 → 0
1.2 KB
img/demo (21).png
已删除
100644 → 0
1.9 KB
img/demo (22).png
已删除
100644 → 0
2.5 KB
img/demo (23).png
已删除
100644 → 0
2.1 KB
img/demo (24).png
已删除
100644 → 0
2.5 KB
@@ -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 | +<!--日期弹出层 --> | ||
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; |
@@ -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 | /* 月份 */ |
@@ -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> |
@@ -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) { |
@@ -64,16 +75,27 @@ Page({ | @@ -64,16 +75,27 @@ Page({ | ||
64 | }, | 75 | }, |
65 | 76 | ||
66 | }, | 77 | }, |
67 | - // 流水详情页 | ||
68 | - toDetail(){ | ||
69 | - wx.navigateTo({ | ||
70 | - url: '/pages/yuanliaomsg/yuanliaoDetail/yuanliaoDetail' | ||
71 | - }) | ||
72 | - }, | ||
73 | changeTab(e) { | 78 | changeTab(e) { |
74 | this.setData({ | 79 | this.setData({ |
75 | tabNum: e.currentTarget.dataset.id | 80 | tabNum: e.currentTarget.dataset.id |
76 | }) | 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 | + } | ||
77 | 99 | ||
78 | }, | 100 | }, |
79 | toShowModal(e) { | 101 | toShowModal(e) { |
@@ -81,16 +103,124 @@ Page({ | @@ -81,16 +103,124 @@ Page({ | ||
81 | showModal: true | 103 | showModal: true |
82 | }) | 104 | }) |
83 | }, | 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 | + } | ||
122 | + | ||
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)) | ||
132 | + this.setData({ | ||
133 | + datePickerValue: [year, month, day], | ||
134 | + }) | ||
135 | + | ||
136 | + }, | ||
137 | + | ||
138 | + // 时间地磅货物选择 | ||
84 | 139 | ||
85 | - hideModal() { | 140 | + selectbang(e) { |
86 | this.setData({ | 141 | this.setData({ |
87 | - showModal: false | 142 | + modalNum: e.currentTarget.dataset.index |
143 | + }) | ||
144 | + }, | ||
145 | + | ||
146 | + | ||
147 | + | ||
148 | + | ||
149 | + //开始时间和结束时间 | ||
150 | + xuanshijan(e) { | ||
151 | + this.setData({ | ||
152 | + timesel: e.currentTarget.dataset.time, | ||
153 | + currentdate: true | ||
154 | + }) | ||
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 | + }); | ||
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 | + } | ||
182 | + | ||
183 | + }, | ||
184 | + | ||
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 | ||
88 | }); | 193 | }); |
89 | }, | 194 | }, |
195 | + | ||
196 | + //确定选择开始日期和结束日期 | ||
197 | + qudingxuandate() { | ||
198 | + this.setData({ | ||
199 | + datechu: false, | ||
200 | + watertime: this.data.startdate + '-' + this.data.enddate | ||
201 | + }) | ||
202 | + }, | ||
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 | + }, | ||
90 | choice(e) { | 217 | choice(e) { |
218 | + let index = e.currentTarget.dataset.id | ||
91 | 219 | ||
92 | this.setData({ | 220 | this.setData({ |
93 | - changeColor: e.currentTarget.dataset.id | 221 | + changeColor: e.currentTarget.dataset.id, |
222 | + watertime: this.data.monthList[index], | ||
223 | + | ||
94 | }) | 224 | }) |
95 | }, | 225 | }, |
96 | /** | 226 | /** |
@@ -98,21 +228,39 @@ Page({ | @@ -98,21 +228,39 @@ Page({ | ||
98 | */ | 228 | */ |
99 | onLoad: function (options) { | 229 | onLoad: function (options) { |
100 | 230 | ||
101 | - this.echartsComponnet = this.selectComponent('#mychart'); | ||
102 | - | ||
103 | - | ||
104 | - //如果是第一次绘制 | ||
105 | - | ||
106 | - if (!Chart) { | ||
107 | - this.init_echarts(); //初始化图表 | 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 | + }) | ||
108 | 241 | ||
109 | 242 | ||
110 | - } else { | ||
111 | 243 | ||
112 | - this.setOption(Chart); //更新数据 | 244 | + }, |
113 | 245 | ||
114 | - } | 246 | + //跳转详情页 |
247 | + godetail(){ | ||
248 | + wx.navigateTo({ | ||
249 | + url: '/pages/companybox/zhishudetail/yuanliaomsg/yuanliaoDetail/yuanliaoDetail', | ||
250 | + }) | ||
251 | + }, | ||
115 | 252 | ||
253 | + //选择日期 | ||
254 | + | ||
255 | + bindstateDateChange(e) { | ||
256 | + console.log('picker发送选择改变,携带值为', e.detail.value) | ||
257 | + this.setData({ | ||
258 | + statedate: e.detail.value | ||
259 | + }) | ||
260 | + let newdate = this.data.statedate.split("-"); | ||
261 | + this.setData({ | ||
262 | + showdate: newdate[0] + '年' + newdate[1] + '月' | ||
263 | + }) | ||
116 | }, | 264 | }, |
117 | //初始化图表 | 265 | //初始化图表 |
118 | 266 | ||
@@ -224,7 +372,7 @@ Page({ | @@ -224,7 +372,7 @@ Page({ | ||
224 | 372 | ||
225 | type: 'line', | 373 | type: 'line', |
226 | 374 | ||
227 | - data: [10, 12, 13, 14, 23, 31, 23, 31, 48, 43, 55, 61, 46, 42, 31, 31, 23, 47, 57, 63, 69, 77, 82, 82, 93, 31, 13, 34, 34, 43, 25], | 375 | + data: [10, 12, 13, 14, 23, 31, 23, 31, 48, 43, 1, 100, 23, 42, 21, 31, 23, 34, 97, 43, 59, 67, 82, 42, 23, 31, 13, 34, 34, 43, 25], |
228 | 376 | ||
229 | symbol: 'true', | 377 | symbol: 'true', |
230 | 378 | ||
@@ -234,7 +382,7 @@ Page({ | @@ -234,7 +382,7 @@ Page({ | ||
234 | 382 | ||
235 | lineStyle: { | 383 | lineStyle: { |
236 | 384 | ||
237 | - color: '#ED3676' | 385 | + color: '#46C5C8' |
238 | 386 | ||
239 | } | 387 | } |
240 | 388 | ||
@@ -265,6 +413,7 @@ Page({ | @@ -265,6 +413,7 @@ Page({ | ||
265 | * 生命周期函数--监听页面显示 | 413 | * 生命周期函数--监听页面显示 |
266 | */ | 414 | */ |
267 | onShow: function () { | 415 | onShow: function () { |
416 | + | ||
268 | this.echartsComponnet = this.selectComponent('#mychart'); | 417 | this.echartsComponnet = this.selectComponent('#mychart'); |
269 | 418 | ||
270 | 419 |
@@ -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 | +<!-- 出库 流水选项卡 --> | ||
23 | <view class="tab"> | 84 | <view class="tab"> |
24 | <view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">{{item}}</view> | 85 | <view wx:for="{{tabList}}" wx:key="" class="tab_single {{tabNum == index?'tab_border':''}}" bindtap='changeTab' data-id="{{index}}">{{item}}</view> |
25 | </view> | 86 | </view> |
@@ -30,9 +91,15 @@ | @@ -30,9 +91,15 @@ | ||
30 | </view> | 91 | </view> |
31 | <view class="date_time"> | 92 | <view class="date_time"> |
32 | <!-- 出库 --> | 93 | <!-- 出库 --> |
33 | - <view wx:if="{{tabNum == 0}}">2019.06</view> | 94 | + <view wx:if="{{tabNum == 0}}"> |
95 | + <picker mode="date" value="{{date}}" start="" end="" bindchange="bindstateDateChange" fields="month"> | ||
96 | + <view class="picker"> | ||
97 | + {{statedate}} | ||
98 | + </view> | ||
99 | + </picker> | ||
100 | + </view> | ||
34 | <!-- 流水 --> | 101 | <!-- 流水 --> |
35 | - <view wx:if="{{tabNum == 1}}" bindtap='toShowModal'>{{time}}</view> | 102 | + <view wx:if="{{tabNum == 1}}" bindtap='datexianshi'>{{watertime}}</view> |
36 | <view class="rowimg"> | 103 | <view class="rowimg"> |
37 | <image src='/img/row.png' class="down"></image> | 104 | <image src='/img/row.png' class="down"></image> |
38 | </view> | 105 | </view> |
@@ -44,7 +111,7 @@ | @@ -44,7 +111,7 @@ | ||
44 | <!-- 出库 --> | 111 | <!-- 出库 --> |
45 | <view wx:if="{{tabNum == 0}}"> | 112 | <view wx:if="{{tabNum == 0}}"> |
46 | <view class="cp_title"> | 113 | <view class="cp_title"> |
47 | - 成品入库信息 | 114 | + 原料入库信息 |
48 | </view> | 115 | </view> |
49 | <view class="total"> | 116 | <view class="total"> |
50 | 重量总计(吨) | 117 | 重量总计(吨) |
@@ -56,7 +123,7 @@ | @@ -56,7 +123,7 @@ | ||
56 | <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas> | 123 | <ec-canvas id="mychart" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas> |
57 | </view> | 124 | </view> |
58 | <view class="total_power"> | 125 | <view class="total_power"> |
59 | - <view>2019年6月</view> | 126 | + <view>{{showdate}}</view> |
60 | </view> | 127 | </view> |
61 | </view> | 128 | </view> |
62 | </view> | 129 | </view> |
@@ -68,12 +135,12 @@ | @@ -68,12 +135,12 @@ | ||
68 | <view class="table_title"> | 135 | <view class="table_title"> |
69 | <view wx:for="{{tableTitle}}" wx:key="">{{item}}</view> | 136 | <view wx:for="{{tableTitle}}" wx:key="">{{item}}</view> |
70 | </view> | 137 | </view> |
71 | - <view class="table_tr" wx:for="{{trList}}" wx:key=""> | 138 | + <view class="table_tr" wx:for="{{trList}}" wx:key="" bindtap="godetail"> |
72 | <view class="tr_time">{{item.date}}</view> | 139 | <view class="tr_time">{{item.date}}</view> |
73 | <view class="tr_pos">{{item.position}}</view> | 140 | <view class="tr_pos">{{item.position}}</view> |
74 | <view class="tr_name">{{item.name}}</view> | 141 | <view class="tr_name">{{item.name}}</view> |
75 | <view class="tr_time">{{item.num}}</view> | 142 | <view class="tr_time">{{item.num}}</view> |
76 | - <view class="tr_btn" bindtap='toDetail'>{{item.btn}}</view> | 143 | + <view class="tr_btn">{{item.btn}}</view> |
77 | </view> | 144 | </view> |
78 | </view> | 145 | </view> |
79 | -</view> | 146 | +</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 | /* 月份 */ |
@@ -29,7 +29,9 @@ Page({ | @@ -29,7 +29,9 @@ Page({ | ||
29 | name: '中国银行', | 29 | name: '中国银行', |
30 | sel: false | 30 | sel: false |
31 | } | 31 | } |
32 | - ] | 32 | + ], |
33 | + fenup:true, | ||
34 | + timeup:true | ||
33 | }, | 35 | }, |
34 | 36 | ||
35 | /** | 37 | /** |
@@ -80,6 +82,18 @@ Page({ | @@ -80,6 +82,18 @@ Page({ | ||
80 | }) | 82 | }) |
81 | }, | 83 | }, |
82 | 84 | ||
85 | + //评分筛选 | ||
86 | + pingfen(){ | ||
87 | + this.setData({ | ||
88 | + fenup:!this.data.fenup | ||
89 | + }) | ||
90 | + }, | ||
91 | +// 时间筛选 | ||
92 | + creattime(){ | ||
93 | + this.setData({ | ||
94 | + timeup:!this.data.timeup | ||
95 | + }) | ||
96 | + }, | ||
83 | /** | 97 | /** |
84 | * 生命周期函数--监听页面初次渲染完成 | 98 | * 生命周期函数--监听页面初次渲染完成 |
85 | */ | 99 | */ |
@@ -22,17 +22,23 @@ | @@ -22,17 +22,23 @@ | ||
22 | <view class="qibrand"> | 22 | <view class="qibrand"> |
23 | <view class="branditem ming">企业名称</view> | 23 | <view class="branditem ming">企业名称</view> |
24 | <view class="branditem ">行业分类</view> | 24 | <view class="branditem ">行业分类</view> |
25 | - <view class="branditem ping"> | 25 | + <view class="branditem ping" bindtap="pingfen" > |
26 | <text>评分</text> | 26 | <text>评分</text> |
27 | - <view class="brandimg"> | 27 | + <view class="brandimg" wx:if="{{fenup}}"> |
28 | <image src="/img/rowup.png"></image> | 28 | <image src="/img/rowup.png"></image> |
29 | </view> | 29 | </view> |
30 | + <view class="brandimg" wx:else> | ||
31 | + <image src="/img/rowdown.png"></image> | ||
32 | + </view> | ||
30 | </view> | 33 | </view> |
31 | - <view class="branditem ping"> | 34 | + <view class="branditem ping" bindtap="creattime"> |
32 | <text>创建时间</text> | 35 | <text>创建时间</text> |
33 | - <view class="brandimg"> | 36 | + <view class="brandimg" wx:if="{{timeup}}"> |
34 | <image src="/img/rowup.png"></image> | 37 | <image src="/img/rowup.png"></image> |
35 | </view> | 38 | </view> |
39 | + <view class="brandimg" wx:else> | ||
40 | + <image src="/img/rowdown.png"></image> | ||
41 | + </view> | ||
36 | </view> | 42 | </view> |
37 | </view> | 43 | </view> |
38 | 44 | ||
@@ -166,12 +172,12 @@ | @@ -166,12 +172,12 @@ | ||
166 | 172 | ||
167 | <view class="fenduan"> | 173 | <view class="fenduan"> |
168 | <view class="fenleft"> | 174 | <view class="fenleft"> |
169 | - <input placeholder='0.0' type="number" /> | 175 | + <input placeholder='0.0' type="number" placeholder-class='entershuzi'/> |
170 | </view> | 176 | </view> |
171 | <view class="fenheng">-</view> | 177 | <view class="fenheng">-</view> |
172 | 178 | ||
173 | <view class="fenleft"> | 179 | <view class="fenleft"> |
174 | - <input placeholder='0.0' type="number" /> | 180 | + <input placeholder='0.0' type="number" placeholder-class='entershuzi' /> |
175 | </view> | 181 | </view> |
176 | 182 | ||
177 | </view> | 183 | </view> |
@@ -198,6 +198,16 @@ | @@ -198,6 +198,16 @@ | ||
198 | color: #ccccccff; | 198 | color: #ccccccff; |
199 | font-size: 27rpx; | 199 | font-size: 27rpx; |
200 | width: 350rpx; | 200 | width: 350rpx; |
201 | + height:64rpx; | ||
202 | + line-height: 64rpx; | ||
203 | +} | ||
204 | +.fenleft input{ | ||
205 | + height:64rpx; | ||
206 | + line-height: 64rpx; | ||
207 | +} | ||
208 | +.entershuzi{ | ||
209 | + color: #ccccccff; | ||
210 | + font-size: 27rpx; | ||
201 | } | 211 | } |
202 | 212 | ||
203 | .fenright { | 213 | .fenright { |
-
请 注册 或 登录 后发表评论