合并分支 'lhj' 到 'master'
Lhj 查看合并请求 !5
正在显示
19 个修改的文件
包含
1028 行增加
和
29 行删除
@@ -33,6 +33,34 @@ App({ | @@ -33,6 +33,34 @@ App({ | ||
33 | } | 33 | } |
34 | }) | 34 | }) |
35 | }, | 35 | }, |
36 | + | ||
37 | + nowDate() { | ||
38 | + let date = new Date(); | ||
39 | + let month = date.getMonth() + 1; | ||
40 | + let day = date.getDate(); | ||
41 | + return date.getFullYear() + '年' + (month > 9 ? month : ('0' + month)) + '月' + (day > 9 ? day : ('0' + day)) + '日'; | ||
42 | + }, | ||
43 | + | ||
44 | + newnowDate() { | ||
45 | + let date = new Date(); | ||
46 | + let month = date.getMonth() + 1; | ||
47 | + let day = date.getDate(); | ||
48 | + return date.getFullYear() + '.' + (month > 9 ? month : ('0' + month)) + '.' + (day > 9 ? day : ('0' + day)); | ||
49 | + }, | ||
50 | + | ||
51 | + snewnowDate() { | ||
52 | + let date = new Date(); | ||
53 | + let month = date.getMonth() + 2; | ||
54 | + let day = date.getDate(); | ||
55 | + return date.getFullYear() + '.' + (month > 9 ? month : ('0' + month)) + '.' + (day > 9 ? day : ('0' + day)); | ||
56 | + }, | ||
57 | + | ||
58 | + monthnowDate() { | ||
59 | + let date = new Date(); | ||
60 | + let month = date.getMonth() + 1; | ||
61 | + let day = date.getDate(); | ||
62 | + return date.getFullYear() + '-' + (month > 9 ? month : ('0' + month)) | ||
63 | + }, | ||
36 | globalData: { | 64 | globalData: { |
37 | userInfo: null | 65 | userInfo: null |
38 | } | 66 | } |
1 | { | 1 | { |
2 | "pages": [ | 2 | "pages": [ |
3 | + "pages/changqu/changqu", | ||
4 | + "pages/shebei/shebeidetail/shebeidetail", | ||
5 | + "pages/qiyeyongdian/detail/detail", | ||
3 | "pages/companybox/qiyedetail/qiyedetail", | 6 | "pages/companybox/qiyedetail/qiyedetail", |
4 | "pages/companybox/defendetail/defendetail", | 7 | "pages/companybox/defendetail/defendetail", |
5 | "pages/companybox/jichuxinxi/jichuxinxi", | 8 | "pages/companybox/jichuxinxi/jichuxinxi", |
6 | - | ||
7 | - "pages/qiyeyongdian/detail/detail", | ||
8 | "pages/qiye/qiye", | 9 | "pages/qiye/qiye", |
9 | - "pages/changqu/changqu", | ||
10 | "pages/login/login", | 10 | "pages/login/login", |
11 | "pages/shebei/shebeilist/shebeilist", | 11 | "pages/shebei/shebeilist/shebeilist", |
12 | "pages/mine/mine", | 12 | "pages/mine/mine", |
13 | "pages/index/index", | 13 | "pages/index/index", |
14 | "pages/logs/logs", | 14 | "pages/logs/logs", |
15 | "pages/yujing/yujing", | 15 | "pages/yujing/yujing", |
16 | - "pages/shebei/shebeidetail/shebeidetail", | ||
17 | - "pages/qiyeyongdian/qyyd/qyyd" | ||
18 | - | ||
19 | - | ||
20 | - | 16 | + "pages/qiyeyongdian/qyyd/qyyd", |
17 | + "pages/member/member" | ||
21 | ], | 18 | ], |
22 | "window": { | 19 | "window": { |
23 | "backgroundTextStyle": "light", | 20 | "backgroundTextStyle": "light", |
@@ -146,11 +146,6 @@ function initChart1(canvas, width, height) { | @@ -146,11 +146,6 @@ function initChart1(canvas, width, height) { | ||
146 | // }, | 146 | // }, |
147 | }, | 147 | }, |
148 | 148 | ||
149 | - | ||
150 | - | ||
151 | - | ||
152 | - | ||
153 | - | ||
154 | ] | 149 | ] |
155 | }; | 150 | }; |
156 | 151 | ||
@@ -185,6 +180,15 @@ Page({ | @@ -185,6 +180,15 @@ Page({ | ||
185 | 180 | ||
186 | } | 181 | } |
187 | }, | 182 | }, |
183 | + onload(){ | ||
184 | + | ||
185 | + }, | ||
186 | + | ||
187 | + dian(){ | ||
188 | + wx.navigateTo({ | ||
189 | + url: '/pages/qiyeyongdian/qyyd/qyyd', | ||
190 | + }) | ||
191 | + }, | ||
188 | 192 | ||
189 | onReady() {} | 193 | onReady() {} |
190 | }); | 194 | }); |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | </view> | 40 | </view> |
41 | <view class="zhiname">开工</view> | 41 | <view class="zhiname">开工</view> |
42 | </view> | 42 | </view> |
43 | - <view class="zhishuitem"> | 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/demo (19).png"></image> |
46 | </view> | 46 | </view> |
pages/member/member.js
0 → 100644
1 | +// pages/member/member.js | ||
2 | +import * as echarts from '../../ec-canvas/echarts'; | ||
3 | +const app =getApp() | ||
4 | + | ||
5 | + | ||
6 | +function initChart1(canvas, width, height) { | ||
7 | + const chart = echarts.init(canvas, null, { | ||
8 | + width: width, | ||
9 | + height: height | ||
10 | + }); | ||
11 | + canvas.setChart(chart); | ||
12 | + | ||
13 | + var option = { | ||
14 | + title: { | ||
15 | + text: '', | ||
16 | + left: 'center' | ||
17 | + }, | ||
18 | + | ||
19 | + | ||
20 | + toolbox: { | ||
21 | + | ||
22 | + }, | ||
23 | + xAxis: { | ||
24 | + type: 'category', | ||
25 | + boundaryGap: false, | ||
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'], | ||
27 | + axisLabel: { | ||
28 | + interval: 1, | ||
29 | + }, | ||
30 | + name: '日期' | ||
31 | + | ||
32 | + | ||
33 | + }, | ||
34 | + yAxis: { | ||
35 | + type: 'value', | ||
36 | + axisLabel: { | ||
37 | + formatter: '{value}' | ||
38 | + }, | ||
39 | + min: 10, | ||
40 | + max: 100, | ||
41 | + splitNumber: 10, | ||
42 | + name: '人数' | ||
43 | + | ||
44 | + }, | ||
45 | + series: [ | ||
46 | + { | ||
47 | + name: '', | ||
48 | + type: 'line', | ||
49 | + smooth: true, | ||
50 | + color: '#A8ACE8', | ||
51 | + data: [41, 87, 35, 23, 42, 33, 40,30,50,80], | ||
52 | + markPoint: { | ||
53 | + data: [ | ||
54 | + { type: 'max', name: '最大值' }, | ||
55 | + { type: 'min', name: '最小值' } | ||
56 | + ] | ||
57 | + }, | ||
58 | + markLine: { | ||
59 | + data: [ | ||
60 | + { type: 'average', name: '平均值' } | ||
61 | + ] | ||
62 | + }, | ||
63 | + // areaStyle: { | ||
64 | + // // normal: { | ||
65 | + // // color: '#F8E9DD' //改变区域颜色 | ||
66 | + // // } | ||
67 | + // }, | ||
68 | + }, | ||
69 | + | ||
70 | + ] | ||
71 | + }; | ||
72 | + | ||
73 | + chart.setOption(option); | ||
74 | + return chart; | ||
75 | +} | ||
76 | + | ||
77 | +Page({ | ||
78 | + | ||
79 | + onShareAppMessage: function (res) { | ||
80 | + return { | ||
81 | + title: 'ECharts 可以在微信小程序中使用啦!', | ||
82 | + path: '', | ||
83 | + success: function () { }, | ||
84 | + fail: function () { } | ||
85 | + } | ||
86 | + }, | ||
87 | + | ||
88 | + /** | ||
89 | + * 页面的初始数据 | ||
90 | + */ | ||
91 | + data: { | ||
92 | + state:1, | ||
93 | + timestate:1, | ||
94 | + ec1: { | ||
95 | + | ||
96 | + onInit: initChart1, | ||
97 | + | ||
98 | + | ||
99 | + | ||
100 | + | ||
101 | + }, | ||
102 | + statedate: '', | ||
103 | + showdate: "", | ||
104 | + watertime: '', | ||
105 | + timesel:1 | ||
106 | + }, | ||
107 | + | ||
108 | + /** | ||
109 | + * 生命周期函数--监听页面加载 | ||
110 | + */ | ||
111 | + onLoad: function (options) { | ||
112 | + this.setData({ | ||
113 | + statedate: app.monthnowDate(), | ||
114 | + watertime: app.newnowDate() + '-' + app.snewnowDate() | ||
115 | + }) | ||
116 | + | ||
117 | + console.log(this.data.statedate) | ||
118 | + let newdate = this.data.statedate.split("-"); | ||
119 | + this.setData({ | ||
120 | + showdate: newdate[0]+'年'+newdate[1]+'月' | ||
121 | + }) | ||
122 | + }, | ||
123 | + | ||
124 | + selectshebei(e) { | ||
125 | + this.setData({ | ||
126 | + state: e.currentTarget.dataset.id | ||
127 | + }) | ||
128 | + }, | ||
129 | + // 选择时间和摄像头切换 | ||
130 | + seltime(e){ | ||
131 | + this.setData({ | ||
132 | + timestate:e.currentTarget.dataset.id | ||
133 | + }) | ||
134 | + }, | ||
135 | + | ||
136 | + //开始时间和结束时间切换 | ||
137 | + xuanshijan(e){ | ||
138 | + this.setData({ | ||
139 | + timesel:e.currentTarget.dataset.time | ||
140 | + }) | ||
141 | + }, | ||
142 | +// 选择日期 | ||
143 | + bindstateDateChange(e) { | ||
144 | + console.log('picker发送选择改变,携带值为', e.detail.value) | ||
145 | + this.setData({ | ||
146 | + statedate: e.detail.value | ||
147 | + }) | ||
148 | + let newdate = this.data.statedate.split("-"); | ||
149 | + this.setData({ | ||
150 | + showdate: newdate[0] + '年' + newdate[1] + '月' | ||
151 | + }) | ||
152 | + }, | ||
153 | + /** | ||
154 | + * 生命周期函数--监听页面初次渲染完成 | ||
155 | + */ | ||
156 | + onReady: function () { | ||
157 | + | ||
158 | + }, | ||
159 | + | ||
160 | + /** | ||
161 | + * 生命周期函数--监听页面显示 | ||
162 | + */ | ||
163 | + onShow: function () { | ||
164 | + | ||
165 | + }, | ||
166 | + | ||
167 | + /** | ||
168 | + * 生命周期函数--监听页面隐藏 | ||
169 | + */ | ||
170 | + onHide: function () { | ||
171 | + | ||
172 | + }, | ||
173 | + | ||
174 | + /** | ||
175 | + * 生命周期函数--监听页面卸载 | ||
176 | + */ | ||
177 | + onUnload: function () { | ||
178 | + | ||
179 | + }, | ||
180 | + | ||
181 | + /** | ||
182 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
183 | + */ | ||
184 | + onPullDownRefresh: function () { | ||
185 | + | ||
186 | + }, | ||
187 | + | ||
188 | + /** | ||
189 | + * 页面上拉触底事件的处理函数 | ||
190 | + */ | ||
191 | + onReachBottom: function () { | ||
192 | + | ||
193 | + }, | ||
194 | + | ||
195 | + /** | ||
196 | + * 用户点击右上角分享 | ||
197 | + */ | ||
198 | + onShareAppMessage: function () { | ||
199 | + | ||
200 | + } | ||
201 | +}) |
pages/member/member.json
0 → 100644
pages/member/member.wxml
0 → 100644
1 | +<!-- 日期弹出层 --> | ||
2 | +<view class="register"> | ||
3 | + | ||
4 | + <view class="timewrap"> | ||
5 | + | ||
6 | + <view class="detailhead"> | ||
7 | + <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> | ||
9 | + | ||
10 | + </view> | ||
11 | + | ||
12 | + <!-- 开始时间和结束时间 --> | ||
13 | + | ||
14 | + <view class="timetwo"> | ||
15 | + <view class="timebetin" bindtap="xuanshijan" data-time="1"> | ||
16 | + | ||
17 | + <view class="timetop {{timesel==1?'seltimeactive':''}}">开始时间</view> | ||
18 | + <view class="timebottom {{timesel==1?'selnameactive':''}}">2019.01.09</view> | ||
19 | + </view> | ||
20 | + <view class="timebetin" bindtap="xuanshijan" data-time="2"> | ||
21 | + | ||
22 | + <view class="timetop {{timesel==2?'seltimeactive':''}}">结束时间</view> | ||
23 | + <view class="timebottom {{timesel==2?'selnameactive':''}}">2019.01.09</view> | ||
24 | + </view> | ||
25 | + </view> | ||
26 | + | ||
27 | + <view class="timebox"> | ||
28 | + <view class="timeboxitem"> | ||
29 | + <view class="itemcontent">2017</view> | ||
30 | + <view class="itemcontent">01</view> | ||
31 | + <view class="itemcontent">01</view> | ||
32 | + </view> | ||
33 | + | ||
34 | + </view> | ||
35 | + </view> | ||
36 | + | ||
37 | + | ||
38 | +</view> | ||
39 | + | ||
40 | +<view class="detailhead"> | ||
41 | + <view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">人员状况</view> | ||
42 | + <view class="detailname {{state==2?'selactive':''}}" bindtap="selectshebei" data-id="2">进出水</view> | ||
43 | + | ||
44 | +</view> | ||
45 | + | ||
46 | + | ||
47 | +<!-- 人员状况 --> | ||
48 | + | ||
49 | +<view class="peoplestate" wx:if="{{state==1}}"> | ||
50 | + | ||
51 | + <view class="date"> | ||
52 | + <view class="dateleft"> | ||
53 | + <image src="/img/row.png"></image> | ||
54 | + </view> | ||
55 | + <view class="datetime"> | ||
56 | + <view class="datesel"> | ||
57 | + <picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindstateDateChange" fields="month"> | ||
58 | + <view class="picker"> | ||
59 | + {{statedate}} | ||
60 | + </view> | ||
61 | + </picker> | ||
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 | + <view class="shebeinum"> | ||
75 | + <text class="she">人员进出信息</text> | ||
76 | + </view> | ||
77 | + | ||
78 | + <view class="containerzhe"> | ||
79 | + <ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec1 }}"></ec-canvas> | ||
80 | + </view> | ||
81 | + | ||
82 | + <view class="datetime">{{showdate}}</view> | ||
83 | + | ||
84 | + | ||
85 | +</view> | ||
86 | + | ||
87 | +<!-- 进出流水 --> | ||
88 | + | ||
89 | +<view class="lishui" wx:if="{{state==2}}"> | ||
90 | + <view class="date"> | ||
91 | + <view class="dateleft"> | ||
92 | + <image src="/img/row.png"></image> | ||
93 | + </view> | ||
94 | + <view class="datetime"> | ||
95 | + <view class="datesel"> | ||
96 | + {{watertime}} | ||
97 | + </view> | ||
98 | + | ||
99 | + <view class="datepic"> | ||
100 | + <image src="/img/row.png"></image> | ||
101 | + </view> | ||
102 | + </view> | ||
103 | + | ||
104 | + <view class="dateright"> | ||
105 | + <image src="/img/row.png"></image> | ||
106 | + </view> | ||
107 | + </view> | ||
108 | + | ||
109 | +</view> |
pages/member/member.wxss
0 → 100644
1 | +.detailhead { | ||
2 | + display: flex; | ||
3 | + align-items: center; | ||
4 | + justify-content: space-around; | ||
5 | + padding: 20rpx 69rpx; | ||
6 | + box-sizing: border-box; | ||
7 | + border-bottom: 1rpx solid #f5f5f5; | ||
8 | + | ||
9 | +} | ||
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 | +.date{ | ||
34 | + display:flex; | ||
35 | + align-items: center; | ||
36 | + justify-content: space-between; | ||
37 | + height:70rpx; | ||
38 | + background: #F3F5F8; | ||
39 | + padding: 0 31rpx; | ||
40 | + box-sizing: border-box | ||
41 | +} | ||
42 | +.dateleft { | ||
43 | + width: 23rpx; | ||
44 | + height:23rpx; | ||
45 | + font-size: 0; | ||
46 | + transform: rotate(180deg); | ||
47 | +} | ||
48 | + | ||
49 | +.dateright { | ||
50 | + width: 23rpx; | ||
51 | + height: 23rpx; | ||
52 | + font-size: 0; | ||
53 | +} | ||
54 | +.datetime{ | ||
55 | + display:flex; | ||
56 | + align-items: center | ||
57 | +} | ||
58 | +.datepic{ | ||
59 | + width:16rpx; | ||
60 | + height:16rpx; | ||
61 | + font-size: 0; | ||
62 | + transform: rotate(90deg); | ||
63 | + margin-left:12rpx; | ||
64 | +} | ||
65 | +.datesel{ | ||
66 | + color:#666666; | ||
67 | + font-size: 28rpx; | ||
68 | +} | ||
69 | + | ||
70 | +.shebeinum { | ||
71 | + color: #333; | ||
72 | + font-size: 32rpx; | ||
73 | + font-weight: bold; | ||
74 | + padding: 40rpx 0 0 30rpx; | ||
75 | + box-sizing: border-box; | ||
76 | + border-top: 1rpx solid #f5f5f5; | ||
77 | + position: relative; | ||
78 | +} | ||
79 | +.she{ | ||
80 | + margin-left:18rpx; | ||
81 | +} | ||
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 | + | ||
92 | +} | ||
93 | +.containerzhe{ | ||
94 | + width:750rpx; | ||
95 | + height:500rpx; | ||
96 | +} | ||
97 | +.datetime{ | ||
98 | + color:#333333; | ||
99 | + font-size: 28rpx; | ||
100 | + display:flex; | ||
101 | + justify-content: center | ||
102 | +} | ||
103 | + | ||
104 | +.timewrap{ | ||
105 | + background: #fff; | ||
106 | + height:757rpx; | ||
107 | +} | ||
108 | +.timetwo{ | ||
109 | + display:flex; | ||
110 | + align-items: center; | ||
111 | + padding: 60rpx 100rpx 50rpx; | ||
112 | + box-sizing: border-box; | ||
113 | + justify-content: space-between | ||
114 | +} | ||
115 | +.timebetin{ | ||
116 | + display:flex; | ||
117 | + flex-direction: column; | ||
118 | + justify-content: center; | ||
119 | + align-items: center | ||
120 | +} | ||
121 | +.timetop{ | ||
122 | + color:#999999; | ||
123 | + font-size: 24rpx; | ||
124 | +} | ||
125 | +.timebottom{ | ||
126 | + color:#999999; | ||
127 | + font-size: 32rpx; | ||
128 | + margin-top:10rpx; | ||
129 | +} | ||
130 | +.seltimeactive{ | ||
131 | + color:#FF9400; | ||
132 | + | ||
133 | +} | ||
134 | +.selnameactive{ | ||
135 | + color:#333 | ||
136 | +} | ||
137 | +.timebox{ | ||
138 | + width:580rpx; | ||
139 | + margin:0 auto; | ||
140 | +} | ||
141 | +.timeboxitem{ | ||
142 | + display:flex; | ||
143 | + align-items: center; | ||
144 | + justify-content: space-between | ||
145 | +} |
@@ -45,6 +45,11 @@ Page({ | @@ -45,6 +45,11 @@ Page({ | ||
45 | index: e.detail.value | 45 | index: e.detail.value |
46 | }) | 46 | }) |
47 | }, | 47 | }, |
48 | + companydetail(){ | ||
49 | + wx.navigateTo({ | ||
50 | + url: '/pages/companybox/qiyedetail/qiyedetail', | ||
51 | + }) | ||
52 | + }, | ||
48 | //选择银行 | 53 | //选择银行 |
49 | chosebank(e){ | 54 | chosebank(e){ |
50 | console.log(e) | 55 | console.log(e) |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | 40 | ||
41 | 41 | ||
42 | <view class="qiyelist" > | 42 | <view class="qiyelist" > |
43 | - <view class="listitem"> | 43 | + <view class="listitem" bindtap="companydetail"> |
44 | <view class="itemname">无锡/万利达无锡/万利达</view> | 44 | <view class="itemname">无锡/万利达无锡/万利达</view> |
45 | <view class="hangname">金属加工</view> | 45 | <view class="hangname">金属加工</view> |
46 | <view class="pingname fenshu">98</view> | 46 | <view class="pingname fenshu">98</view> |
@@ -12,6 +12,7 @@ Page({ | @@ -12,6 +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 | changeColor: -1, | 16 | changeColor: -1, |
16 | ec: { | 17 | ec: { |
17 | 18 | ||
@@ -31,15 +32,31 @@ Page({ | @@ -31,15 +32,31 @@ Page({ | ||
31 | 32 | ||
32 | }, | 33 | }, |
33 | 34 | ||
34 | - lazyLoad: true // 延迟加载 | ||
35 | - | 35 | + lazyLoad: true, // 延迟加载 |
36 | + showt:false | ||
36 | }, | 37 | }, |
37 | 38 | ||
38 | }, | 39 | }, |
39 | choice(e) { | 40 | choice(e) { |
40 | let index = e.currentTarget.dataset.id; | 41 | 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 | + this.setData({ | ||
45 | + time:"("+"2019."+"0"+index+".01"+"-2019"+index+".31"+")" | ||
46 | + }) | ||
47 | + }else{ | ||
48 | + this.setData({ | ||
49 | + time: "(" + "2019." + "0" + index + ".01" + "-2019" + index + ".30" + ")" | ||
50 | + }) | ||
51 | + } | ||
52 | + this.setData({ | ||
53 | + changeColor: index-1 | ||
54 | + }) | ||
55 | + }, | ||
56 | + three(){ | ||
41 | this.setData({ | 57 | this.setData({ |
42 | - changeColor: index | 58 | + time:'近30天', |
59 | + showt: !this.data.showt | ||
43 | }) | 60 | }) |
44 | }, | 61 | }, |
45 | toShowModal(e) { | 62 | toShowModal(e) { |
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | <view class="modal_month"> | 9 | <view class="modal_month"> |
10 | <view class="month_single {{changeColor == index?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item}}</view> | 10 | <view class="month_single {{changeColor == index?'change':''}}" wx:for="{{monthList}}" wx:key="" data-id="{{index}}" catchtap="choice">{{item}}</view> |
11 | </view> | 11 | </view> |
12 | - <view class="date_descript">近30天</view> | 12 | + <view class="date_descript {{showt==true?'tactive':''}}" bindtap="three">近30天</view> |
13 | <view class='btns'> | 13 | <view class='btns'> |
14 | <view class="cacle" bindtap="hideModal">取消</view> | 14 | <view class="cacle" bindtap="hideModal">取消</view> |
15 | <view class="cacle sure" bindtap="hideModal">确定</view> | 15 | <view class="cacle sure" bindtap="hideModal">确定</view> |
@@ -21,7 +21,9 @@ | @@ -21,7 +21,9 @@ | ||
21 | <view class="rowimg"> | 21 | <view class="rowimg"> |
22 | <image src='/img/row.png' class="left"></image> | 22 | <image src='/img/row.png' class="left"></image> |
23 | </view> | 23 | </view> |
24 | - <view class="date_time" bindtap='toShowModal'>近30天(2019.03.01-2019.03.30) | 24 | + <view class="date_time" bindtap='toShowModal'> |
25 | + <!-- 近30天(2019.03.01-2019.03.30) --> | ||
26 | + {{time}} | ||
25 | <view class="rowimg"> | 27 | <view class="rowimg"> |
26 | <image src='/img/row.png' class="down"></image> | 28 | <image src='/img/row.png' class="down"></image> |
27 | </view> | 29 | </view> |
@@ -138,6 +138,10 @@ ec-canvas { | @@ -138,6 +138,10 @@ ec-canvas { | ||
138 | background: rgba(244, 244, 244, 1); | 138 | background: rgba(244, 244, 244, 1); |
139 | border-radius: 6rpx; | 139 | border-radius: 6rpx; |
140 | } | 140 | } |
141 | +.tactive{ | ||
142 | + background: #ff9400; | ||
143 | + color:#fff; | ||
144 | +} | ||
141 | 145 | ||
142 | .btns { | 146 | .btns { |
143 | margin-top: 50rpx; | 147 | margin-top: 50rpx; |
1 | // pages/shebei/shebeidetail/shebeidetail.js | 1 | // pages/shebei/shebeidetail/shebeidetail.js |
2 | +import * as echarts from '../../../ec-canvas/echarts'; | ||
3 | +const app=getApp(); | ||
4 | + | ||
5 | +function initChart1(canvas, width, height) { | ||
6 | + const chart = echarts.init(canvas, null, { | ||
7 | + width: width, | ||
8 | + height: height | ||
9 | + }); | ||
10 | + canvas.setChart(chart); | ||
11 | + | ||
12 | + var option = { | ||
13 | + title: { | ||
14 | + text: '半年度开工曲线', | ||
15 | + left: 'center' | ||
16 | + }, | ||
17 | + | ||
18 | + | ||
19 | + toolbox: { | ||
20 | + | ||
21 | + }, | ||
22 | + xAxis: { | ||
23 | + type: 'category', | ||
24 | + boundaryGap: false, | ||
25 | + data: ['2018-11', '2018-12', '2019-01', '2019-02', '2019-03', '2019-04'], | ||
26 | + axisLabel: { | ||
27 | + interval: 0, | ||
28 | + }, | ||
29 | + name: '日期' | ||
30 | + | ||
31 | + | ||
32 | + }, | ||
33 | + yAxis: { | ||
34 | + type: 'value', | ||
35 | + axisLabel: { | ||
36 | + formatter: '{value}' | ||
37 | + }, | ||
38 | + min: 100, | ||
39 | + max: 500, | ||
40 | + splitNumber: 5, | ||
41 | + name: '小时(h)' | ||
42 | + | ||
43 | + }, | ||
44 | + series: [ | ||
45 | + { | ||
46 | + name: '', | ||
47 | + type: 'line', | ||
48 | + smooth: true, | ||
49 | + color: '#FCB237', | ||
50 | + data: [112, 115, 454, 135, 125, 135, 170], | ||
51 | + markPoint: { | ||
52 | + data: [ | ||
53 | + { type: 'max', name: '最大值' }, | ||
54 | + { type: 'min', name: '最小值' } | ||
55 | + ] | ||
56 | + }, | ||
57 | + markLine: { | ||
58 | + data: [ | ||
59 | + { type: 'average', name: '平均值' } | ||
60 | + ] | ||
61 | + }, | ||
62 | + // areaStyle: { | ||
63 | + // // normal: { | ||
64 | + // // color: '#F8E9DD' //改变区域颜色 | ||
65 | + // // } | ||
66 | + // }, | ||
67 | + }, | ||
68 | + | ||
69 | + ] | ||
70 | + }; | ||
71 | + | ||
72 | + chart.setOption(option); | ||
73 | + return chart; | ||
74 | +} | ||
2 | Page({ | 75 | Page({ |
3 | 76 | ||
77 | + onShareAppMessage: function (res) { | ||
78 | + return { | ||
79 | + title: 'ECharts 可以在微信小程序中使用啦!', | ||
80 | + path: '', | ||
81 | + success: function () { }, | ||
82 | + fail: function () { } | ||
83 | + } | ||
84 | + }, | ||
85 | + | ||
4 | /** | 86 | /** |
5 | * 页面的初始数据 | 87 | * 页面的初始数据 |
6 | */ | 88 | */ |
7 | data: { | 89 | data: { |
90 | + state:1, | ||
91 | + statedate: "", | ||
92 | + date: '', | ||
93 | + | ||
94 | + ec: { | ||
95 | + onInit: initChart1, | ||
8 | 96 | ||
97 | + // onInit: initChart1 | ||
98 | + | ||
99 | + }, | ||
9 | }, | 100 | }, |
10 | 101 | ||
11 | /** | 102 | /** |
12 | * 生命周期函数--监听页面加载 | 103 | * 生命周期函数--监听页面加载 |
13 | */ | 104 | */ |
14 | onLoad: function (options) { | 105 | onLoad: function (options) { |
15 | - | 106 | + this.setData({ |
107 | + statedate: app.monthnowDate(), | ||
108 | + date: app.monthnowDate() | ||
109 | + }) | ||
110 | + }, | ||
111 | + selectshebei(e){ | ||
112 | + this.setData({ | ||
113 | + state:e.currentTarget.dataset.id | ||
114 | + }) | ||
16 | }, | 115 | }, |
17 | 116 | ||
117 | + bindstateDateChange(e){ | ||
118 | + console.log('picker发送选择改变,携带值为', e.detail.value) | ||
119 | + this.setData({ | ||
120 | + statedate: e.detail.value | ||
121 | + }) | ||
122 | + }, | ||
123 | + bindDateChange: function (e) { | ||
124 | + console.log('picker发送选择改变,携带值为', e.detail.value) | ||
125 | + this.setData({ | ||
126 | + date: e.detail.value | ||
127 | + }) | ||
128 | + }, | ||
18 | /** | 129 | /** |
19 | * 生命周期函数--监听页面初次渲染完成 | 130 | * 生命周期函数--监听页面初次渲染完成 |
20 | */ | 131 | */ |
1 | -<!--pages/shebei/shebeidetail/shebeidetail.wxml--> | ||
2 | -<text>pages/shebei/shebeidetail/shebeidetail.wxml</text> | 1 | +<view class="detailhead"> |
2 | + <view class="detailname {{state==1?'selactive':''}}" bindtap="selectshebei" data-id="1">设备状态</view> | ||
3 | + <view class="detailname {{state==2?'selactive':''}}" bindtap="selectshebei" data-id="2">设备详情</view> | ||
4 | + <view class="detailname {{state==3?'selactive':''}}" bindtap="selectshebei" data-id="3">设备月报</view> | ||
5 | +</view> | ||
6 | + | ||
7 | +<!-- 设备状态 --> | ||
8 | + | ||
9 | +<view class="date"> | ||
10 | + <view class="dateleft"> | ||
11 | + <image src="/img/row.png"></image> | ||
12 | + </view> | ||
13 | + <view class="datetime"> | ||
14 | + <view class="datesel"> | ||
15 | + <picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindstateDateChange" fields="month"> | ||
16 | + <view class="picker"> | ||
17 | + {{statedate}} | ||
18 | + </view> | ||
19 | + </picker> | ||
20 | + </view> | ||
21 | + | ||
22 | + <view class="datepic"> | ||
23 | + <image src="/img/row.png"></image> | ||
24 | + </view> | ||
25 | + </view> | ||
26 | + | ||
27 | + <view class="dateright"> | ||
28 | + <image src="/img/row.png"></image> | ||
29 | + </view> | ||
30 | +</view> | ||
31 | + | ||
32 | +<!-- 设备详情 --> | ||
33 | + | ||
34 | +<view class="shebeidetail" wx:if="{{state==2}}"> | ||
35 | + <view class="beginkaiji">开机时间</view> | ||
36 | + <view class="hournum">13604.61</view> | ||
37 | + <view class="xian"></view> | ||
38 | + | ||
39 | + <view class="desbox"> | ||
40 | + <view class="desboxhead">设备描述</view> | ||
41 | + <view class="destext"> | ||
42 | + 该公司的生产线是专业设备,大设备中有小设备,小设备中还有更小的设备,而且这些设备并不是成套购买的,组装成生产线后不容易清点。在本案中,原本是两条生产线都抵押给银行了,但在法院现场清点中,我们发现还有相当数量的设备未设定抵押。在法院委托评估的报告中罗列了110项设备,而两家银行合计抵 | ||
43 | + </view> | ||
44 | + </view> | ||
45 | + | ||
46 | + <view class="shepic"> | ||
47 | + <view class="pictitle">设备照片</view> | ||
48 | + <view class="piclist"> | ||
49 | + <view class="listitem"> | ||
50 | + <image src="/img/logo3.png"></image> | ||
51 | + </view> | ||
52 | + <view class="listitem"> | ||
53 | + <image src="/img/logo3.png"></image> | ||
54 | + </view> | ||
55 | + <view class="listitem"> | ||
56 | + <image src="/img/logo3.png"></image> | ||
57 | + </view> | ||
58 | + <view class="listitem"> | ||
59 | + <image src="/img/logo3.png"></image> | ||
60 | + </view> | ||
61 | + </view> | ||
62 | + | ||
63 | + </view> | ||
64 | +</view> | ||
65 | +<!-- 设备月报 --> | ||
66 | + | ||
67 | +<view class="yuebao" wx:if="{{state==3}}"> | ||
68 | + <view class="date"> | ||
69 | + <view class="dateleft"> | ||
70 | + <image src="/img/row.png"></image> | ||
71 | + </view> | ||
72 | + <view class="datetime"> | ||
73 | + <view class="datesel"> | ||
74 | + <picker mode="date" value="{{date}}" start="2015-09-01" end="2017-09-01" bindchange="bindDateChange" fields="month"> | ||
75 | + <view class="picker"> | ||
76 | + {{date}} | ||
77 | + </view> | ||
78 | + </picker> | ||
79 | + </view> | ||
80 | + | ||
81 | + <view class="datepic"> | ||
82 | + <image src="/img/row.png"></image> | ||
83 | + </view> | ||
84 | + </view> | ||
85 | + | ||
86 | + <view class="dateright"> | ||
87 | + <image src="/img/row.png"></image> | ||
88 | + </view> | ||
89 | + </view> | ||
90 | + | ||
91 | + <view class='shebeiworktime'> | ||
92 | + <view class="tophour"> | ||
93 | + 设备工作总时长(小时) | ||
94 | + </view> | ||
95 | + | ||
96 | + <view class="timenum"> | ||
97 | + <text class="timeleft">13604.61</text> | ||
98 | + <text class="timeright">4.1%</text> | ||
99 | + </view> | ||
100 | + </view> | ||
101 | + | ||
102 | + <view class="timelist"> | ||
103 | + <view class="timeitem"> | ||
104 | + <view class="timetop"> | ||
105 | + 18044.32 | ||
106 | + </view> | ||
107 | + <view class="timebottom"> | ||
108 | + 总工作时长(h) | ||
109 | + </view> | ||
110 | + </view> | ||
111 | + <view class="timeitem"> | ||
112 | + <view class="timetop"> | ||
113 | + 18044.32 | ||
114 | + </view> | ||
115 | + <view class="timebottom"> | ||
116 | + 日均工作时长(h) | ||
117 | + </view> | ||
118 | + </view> | ||
119 | + <view class="timeitem"> | ||
120 | + <view class="timetop"> | ||
121 | + 18044.32 | ||
122 | + </view> | ||
123 | + <view class="timebottom"> | ||
124 | + 低于上月总工作时长(h) | ||
125 | + </view> | ||
126 | + </view> | ||
127 | + <view class="timeitem"> | ||
128 | + <view class="timetop"> | ||
129 | + 18044.32 | ||
130 | + </view> | ||
131 | + <view class="timebottom"> | ||
132 | + 低于上月日均工作时长(h) | ||
133 | + </view> | ||
134 | + </view> | ||
135 | + </view> | ||
136 | + | ||
137 | + <!-- 半年度开工曲线 --> | ||
138 | + | ||
139 | + <view class="container"> | ||
140 | + <ec-canvas id="mychart-dom-graph" canvas-id="mychart-graph" ec="{{ ec }}"></ec-canvas> | ||
141 | + </view> | ||
142 | +</view> |
1 | -/* pages/shebei/shebeidetail/shebeidetail.wxss */ | ||
1 | +.detailhead { | ||
2 | + display: flex; | ||
3 | + align-items: center; | ||
4 | + justify-content: space-around; | ||
5 | + padding: 20rpx 69rpx; | ||
6 | + box-sizing: border-box; | ||
7 | + border-bottom: 1rpx solid #f5f5f5; | ||
8 | +} | ||
9 | + | ||
10 | +.detailname { | ||
11 | + color: #999; | ||
12 | + font-size: 28rpx; | ||
13 | +} | ||
14 | + | ||
15 | +.selactive { | ||
16 | + position: relative; | ||
17 | +} | ||
18 | + | ||
19 | +.selactive::after { | ||
20 | + display: block; | ||
21 | + content: ''; | ||
22 | + width: 130rpx; | ||
23 | + height: 1rpx; | ||
24 | + border: 1rpx solid #ff9400; | ||
25 | + position: absolute; | ||
26 | + left: -10rpx; | ||
27 | + bottom: -20rpx; | ||
28 | +} | ||
29 | + | ||
30 | +.beginkaiji { | ||
31 | + color: #666; | ||
32 | + font-size: 28rpx; | ||
33 | + margin-top: 52rpx; | ||
34 | + text-align: center; | ||
35 | +} | ||
36 | + | ||
37 | +.hournum { | ||
38 | + color: #ffb53c; | ||
39 | + font-size: 80rpx; | ||
40 | + text-align: center; | ||
41 | + margin-top: 41rpx; | ||
42 | +} | ||
43 | + | ||
44 | +.xian { | ||
45 | + width: 750rpx; | ||
46 | + height: 20rpx; | ||
47 | + background: #f6f7f8; | ||
48 | + margin-top: 50rpx; | ||
49 | +} | ||
50 | + | ||
51 | +.desbox { | ||
52 | + width: 710rpx; | ||
53 | + margin: 0 auto; | ||
54 | + border: 1rpx solid #d6d8db; | ||
55 | + border-radius: 10rpx; | ||
56 | + padding-bottom: 20rpx; | ||
57 | + box-sizing: border-box; | ||
58 | + margin-top: 50rpx; | ||
59 | +} | ||
60 | + | ||
61 | +.destext { | ||
62 | + padding: 20rpx 20rpx 30rpx; | ||
63 | + box-sizing: border-box; | ||
64 | + color: #333; | ||
65 | + font-size: 28rpx; | ||
66 | +} | ||
67 | + | ||
68 | +.desboxhead { | ||
69 | + height: 70rpx; | ||
70 | + background: #eef1f9; | ||
71 | + line-height: 70rpx; | ||
72 | + padding: 0 20rpx; | ||
73 | + box-sizing: border-box; | ||
74 | + color: #333; | ||
75 | + font-size: 32rpx; | ||
76 | + font-weight: bold; | ||
77 | +} | ||
78 | + | ||
79 | +.pictitle { | ||
80 | + color: #333; | ||
81 | + font-size: 32rpx; | ||
82 | + font-weight: bold; | ||
83 | +} | ||
84 | + | ||
85 | +.shepic { | ||
86 | + padding: 40rpx; | ||
87 | + box-sizing: border-box; | ||
88 | +} | ||
89 | + | ||
90 | +.listitem { | ||
91 | + width: 203rpx; | ||
92 | + height: 203rpx; | ||
93 | + font-size: 0; | ||
94 | + margin-right: 20rpx; | ||
95 | + margin-top: 15rpx; | ||
96 | +} | ||
97 | + | ||
98 | +.piclist { | ||
99 | + display: flex; | ||
100 | + flex-wrap: wrap; | ||
101 | + align-items: center; | ||
102 | + margin-top: 15rpx; | ||
103 | +} | ||
104 | +.date{ | ||
105 | + display:flex; | ||
106 | + align-items: center; | ||
107 | + justify-content: space-between; | ||
108 | + height:70rpx; | ||
109 | + background: #F3F5F8; | ||
110 | + padding: 0 31rpx; | ||
111 | + box-sizing: border-box | ||
112 | +} | ||
113 | +.dateleft { | ||
114 | + width: 23rpx; | ||
115 | + height:23rpx; | ||
116 | + font-size: 0; | ||
117 | + transform: rotate(180deg); | ||
118 | +} | ||
119 | + | ||
120 | +.dateright { | ||
121 | + width: 23rpx; | ||
122 | + height: 23rpx; | ||
123 | + font-size: 0; | ||
124 | +} | ||
125 | +.datetime{ | ||
126 | + display:flex; | ||
127 | + align-items: center | ||
128 | +} | ||
129 | +.datepic{ | ||
130 | + width:16rpx; | ||
131 | + height:16rpx; | ||
132 | + font-size: 0; | ||
133 | + transform: rotate(90deg); | ||
134 | + margin-left:12rpx; | ||
135 | +} | ||
136 | +.datesel{ | ||
137 | + color:#666666; | ||
138 | + font-size: 28rpx; | ||
139 | +} | ||
140 | +.shebeiworktime{ | ||
141 | + width:750rpx; | ||
142 | + height:369rpx; | ||
143 | + background: #FFB53C; | ||
144 | + overflow: hidden | ||
145 | +} | ||
146 | +.tophour{ | ||
147 | + color:#fff; | ||
148 | + font-size: 28rpx; | ||
149 | + opacity:0.4; | ||
150 | + text-align: center; | ||
151 | + margin-top:104rpx; | ||
152 | +} | ||
153 | +.timenum{ | ||
154 | + display:flex; | ||
155 | + align-items: center; | ||
156 | + justify-content: center; | ||
157 | + margin-top:18rpx; | ||
158 | + | ||
159 | +} | ||
160 | +.timeleft{ | ||
161 | + color:#fff; | ||
162 | + font-size: 80rpx; | ||
163 | +} | ||
164 | +.timeright{ | ||
165 | + color:#FF5D7E; | ||
166 | + font-size: 24rpx; | ||
167 | +} | ||
168 | +.timelist{ | ||
169 | + display:flex; | ||
170 | + align-items: center; | ||
171 | + flex-wrap: wrap | ||
172 | +} | ||
173 | +.timeitem{ | ||
174 | + width:375rpx; | ||
175 | + display:flex; | ||
176 | + flex-direction: column; | ||
177 | + justify-content: center; | ||
178 | + padding: 18rpx 0; | ||
179 | + box-sizing: border-box; | ||
180 | + border-bottom:1rpx solid #f5f5f5; | ||
181 | +} | ||
182 | +.timeitem:nth-child(2n){ | ||
183 | + border-left:1rpx solid #f5f5f5; | ||
184 | + | ||
185 | +} | ||
186 | +.timetop{ | ||
187 | + color:#333333; | ||
188 | + font-size: 40rpx; | ||
189 | + text-align: center; | ||
190 | + height:56rpx; | ||
191 | + line-height: 56rpx; | ||
192 | +} | ||
193 | +.timebottom{ | ||
194 | + color:#666666; | ||
195 | + font-size: 22rpx; | ||
196 | + text-align: center; | ||
197 | + margin-top:13rpx; | ||
198 | + | ||
199 | + | ||
200 | +} | ||
201 | +.container{ | ||
202 | + width:750rpx; | ||
203 | + height:500rpx; | ||
204 | + margin-top:48rpx; | ||
205 | + | ||
206 | +} |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | }, | 13 | }, |
14 | "compileType": "miniprogram", | 14 | "compileType": "miniprogram", |
15 | "libVersion": "2.8.0", | 15 | "libVersion": "2.8.0", |
16 | - "appid": "wxd4445f65df16adca", | 16 | + "appid": "wx1f51f42105b63343", |
17 | "projectname": "APPUI", | 17 | "projectname": "APPUI", |
18 | "debugOptions": { | 18 | "debugOptions": { |
19 | "hidedInDevtools": [] | 19 | "hidedInDevtools": [] |
@@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
39 | "list": [] | 39 | "list": [] |
40 | }, | 40 | }, |
41 | "miniprogram": { | 41 | "miniprogram": { |
42 | - "current": 1, | 42 | + "current": 4, |
43 | "list": [ | 43 | "list": [ |
44 | { | 44 | { |
45 | "id": -1, | 45 | "id": -1, |
@@ -54,6 +54,26 @@ | @@ -54,6 +54,26 @@ | ||
54 | "pathName": "pages/qiyeyongdian/detail/detail", | 54 | "pathName": "pages/qiyeyongdian/detail/detail", |
55 | "query": "", | 55 | "query": "", |
56 | "scene": null | 56 | "scene": null |
57 | + }, | ||
58 | + { | ||
59 | + "id": -1, | ||
60 | + "name": "企业用电", | ||
61 | + "pathName": "pages/qiyeyongdian/detail/detail", | ||
62 | + "query": "", | ||
63 | + "scene": null | ||
64 | + }, | ||
65 | + { | ||
66 | + "id": -1, | ||
67 | + "name": "企业用电", | ||
68 | + "pathName": "pages/qiyeyongdian/detail/detail", | ||
69 | + "query": "", | ||
70 | + "scene": null | ||
71 | + }, | ||
72 | + { | ||
73 | + "id": -1, | ||
74 | + "name": "人员", | ||
75 | + "pathName": "pages/member/member", | ||
76 | + "scene": null | ||
57 | } | 77 | } |
58 | ] | 78 | ] |
59 | } | 79 | } |
-
请 注册 或 登录 后发表评论