|
@@ -18,8 +18,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn1" id="canvaColumn1" class="charts" disable-scroll=true @touchstart="touchLine1"
|
|
|
- @touchmove="moveLine1" @touchend="touchEndLine1" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn1" id="canvaColumn1" class="charts" disable-scroll=true
|
|
|
+ @touchstart="touchLine1" @touchmove="moveLine1" @touchend="touchEndLine1"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
@@ -35,8 +36,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn2" id="canvaColumn2" class="charts" disable-scroll=true @touchstart="touchLine2"
|
|
|
- @touchmove="moveLine2" @touchend="touchEndLine2" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn2" id="canvaColumn2" class="charts" disable-scroll=true
|
|
|
+ @touchstart="touchLine2" @touchmove="moveLine2" @touchend="touchEndLine2"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
@@ -52,8 +54,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn3" id="canvaColumn3" class="charts" disable-scroll=true @touchstart="touchLine3"
|
|
|
- @touchmove="moveLine3" @touchend="touchEndLine3" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn3" id="canvaColumn3" class="charts" disable-scroll=true
|
|
|
+ @touchstart="touchLine3" @touchmove="moveLine3" @touchend="touchEndLine3"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
@@ -69,8 +72,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn4" id="canvaColumn4" class="charts" disable-scroll=true @touchstart="touchLine4"
|
|
|
- @touchmove="moveLine4" @touchend="touchEndLine4" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn4" id="canvaColumn4" class="charts" disable-scroll=true
|
|
|
+ @touchstart="touchLine4" @touchmove="moveLine4" @touchend="touchEndLine4"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -88,8 +92,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts2" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn5" id="canvaColumn5" class="charts2" disable-scroll=true @touchstart="touchLine5"
|
|
|
- @touchmove="moveLine5" @touchend="touchEndLine5" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn5" id="canvaColumn5" class="charts2" disable-scroll=true
|
|
|
+ @touchstart="touchLine5" @touchmove="moveLine5" @touchend="touchEndLine5"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
@@ -105,8 +110,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts2" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn6" id="canvaColumn6" class="charts2" disable-scroll=true @touchstart="touchLine6"
|
|
|
- @touchmove="moveLine6" @touchend="touchEndLine6" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn6" id="canvaColumn6" class="charts2" disable-scroll=true
|
|
|
+ @touchstart="touchLine6" @touchmove="moveLine6" @touchend="touchEndLine6"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
@@ -122,8 +128,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts2" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn7" id="canvaColumn7" class="charts2" disable-scroll=true @touchstart="touchLine7"
|
|
|
- @touchmove="moveLine7" @touchend="touchEndLine7" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn7" id="canvaColumn7" class="charts2" disable-scroll=true
|
|
|
+ @touchstart="touchLine7" @touchmove="moveLine7" @touchend="touchEndLine7"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
@@ -139,11 +146,12 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts2" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn8" id="canvaColumn8" class="charts2" disable-scroll=true @touchstart="touchLine8"
|
|
|
- @touchmove="moveLine8" @touchend="touchEndLine8" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn8" id="canvaColumn8" class="charts2" disable-scroll=true
|
|
|
+ @touchstart="touchLine8" @touchmove="moveLine8" @touchend="touchEndLine8"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<!-- 各省销售额 -->
|
|
|
<view class="qiun-columns">
|
|
|
<view class="qiun-bg-white qiun-title-bar qiun-common-mt">
|
|
@@ -157,8 +165,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts2" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn9" id="canvaColumn9" class="charts2" disable-scroll=true @touchstart="touchLine9"
|
|
|
- @touchmove="moveLine9" @touchend="touchEndLine9" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn9" id="canvaColumn9" class="charts2" disable-scroll=true
|
|
|
+ @touchstart="touchLine9" @touchmove="moveLine9" @touchend="touchEndLine9"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
@@ -174,8 +183,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts2" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn10" id="canvaColumn10" class="charts2" disable-scroll=true @touchstart="touchLine10"
|
|
|
- @touchmove="moveLine10" @touchend="touchEndLine10" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn10" id="canvaColumn10" class="charts2" disable-scroll=true
|
|
|
+ @touchstart="touchLine10" @touchmove="moveLine10" @touchend="touchEndLine10"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
@@ -191,8 +201,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts2" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn11" id="canvaColumn11" class="charts2" disable-scroll=true @touchstart="touchLine11"
|
|
|
- @touchmove="moveLine11" @touchend="touchEndLine11" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn11" id="canvaColumn11" class="charts2" disable-scroll=true
|
|
|
+ @touchstart="touchLine11" @touchmove="moveLine11" @touchend="touchEndLine11"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
@@ -208,8 +219,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="qiun-charts2" style="background-color: #FFFFFF;">
|
|
|
- <canvas canvas-id="canvaColumn12" id="canvaColumn12" class="charts2" disable-scroll=true @touchstart="touchLine12"
|
|
|
- @touchmove="moveLine12" @touchend="touchEndLine12" style="background-color: #FFFFFF;"></canvas>
|
|
|
+ <canvas canvas-id="canvaColumn12" id="canvaColumn12" class="charts2" disable-scroll=true
|
|
|
+ @touchstart="touchLine12" @touchmove="moveLine12" @touchend="touchEndLine12"
|
|
|
+ style="background-color: #FFFFFF;"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -232,12 +244,12 @@
|
|
|
var canvaColumn2 = null;
|
|
|
var canvaColumn3 = null;
|
|
|
var canvaColumn4 = null;
|
|
|
-
|
|
|
+
|
|
|
var canvaColumn5 = null;
|
|
|
var canvaColumn6 = null;
|
|
|
var canvaColumn7 = null;
|
|
|
var canvaColumn8 = null;
|
|
|
-
|
|
|
+
|
|
|
var canvaColumn9 = null;
|
|
|
var canvaColumn10 = null;
|
|
|
var canvaColumn11 = null;
|
|
@@ -253,8 +265,8 @@
|
|
|
cWidth: '',
|
|
|
cHeight: '',
|
|
|
pixelRatio: 1,
|
|
|
- tese:0,
|
|
|
-
|
|
|
+ tese: 0,
|
|
|
+
|
|
|
startDate1: '',
|
|
|
endDate1: '',
|
|
|
startDate2: '',
|
|
@@ -263,7 +275,7 @@
|
|
|
endDate3: '',
|
|
|
startDate4: '',
|
|
|
endDate4: '',
|
|
|
-
|
|
|
+
|
|
|
startDate5: '',
|
|
|
endDate5: '',
|
|
|
startDate6: '',
|
|
@@ -272,7 +284,7 @@
|
|
|
endDate7: '',
|
|
|
startDate8: '',
|
|
|
endDate8: '',
|
|
|
-
|
|
|
+
|
|
|
startDate9: '',
|
|
|
endDate9: '',
|
|
|
startDate10: '',
|
|
@@ -292,17 +304,22 @@
|
|
|
// this.init2();
|
|
|
},
|
|
|
onShow() {
|
|
|
- uni.setNavigationBarTitle({title: this.$t('equipmentStatics.title')});
|
|
|
- uni.setTabBarItem({ index: 2,text: this.$t('tabs.tab3')});
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title: this.$t('equipmentStatics.title')
|
|
|
+ });
|
|
|
+ uni.setTabBarItem({
|
|
|
+ index: 2,
|
|
|
+ text: this.$t('tabs.tab3')
|
|
|
+ });
|
|
|
this.tese = this.tese + 1;
|
|
|
var globalUser = uni.getStorageSync("globalUser");
|
|
|
if (globalUser.id == '1') {
|
|
|
this.show = true
|
|
|
}
|
|
|
var token = uni.getStorageSync("token");
|
|
|
- if (token.length>1) {
|
|
|
+ if (token.length > 1) {
|
|
|
this.init();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.reLaunch({
|
|
|
url: '../Login/Login',
|
|
|
});
|
|
@@ -310,7 +327,9 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- ...mapActions('chart', ['getProvince','getProvinceAll', 'getEquipmentStatistics', 'getMainStatistics', 'getMachineNum']),
|
|
|
+ ...mapActions('chart', ['getProvince', 'getProvinceAll', 'getEquipmentStatistics', 'getMainStatistics',
|
|
|
+ 'getMachineNum'
|
|
|
+ ]),
|
|
|
async init() {
|
|
|
if (this.pname === '') {
|
|
|
this.pname = uni.getStorageSync("name");
|
|
@@ -323,13 +342,15 @@
|
|
|
|
|
|
await this.initDateRang(new Date(), 'day');
|
|
|
await this.initDateRang(new Date(), 'week');
|
|
|
- if(this.tese == 1){
|
|
|
+ if (this.tese == 1) {
|
|
|
await this.initDateRang(new Date(), 'month');
|
|
|
await this.initDateRang(new Date(), 'year');
|
|
|
}
|
|
|
+ setTimeout(function() {
|
|
|
+ _self.init2();
|
|
|
+ }, 3000);
|
|
|
+ // await this.init2();
|
|
|
|
|
|
- await this.init2();
|
|
|
- await this.init3();
|
|
|
},
|
|
|
async init2() {
|
|
|
if (this.pname === '') {
|
|
@@ -342,12 +363,16 @@
|
|
|
if (this.show == true) {
|
|
|
await this.initDateRang2(new Date(), 'day');
|
|
|
await this.initDateRang2(new Date(), 'week');
|
|
|
- if(this.tese == 1){
|
|
|
+ if (this.tese == 1) {
|
|
|
await this.initDateRang2(new Date(), 'month');
|
|
|
await this.initDateRang2(new Date(), 'year');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
+ setTimeout(function() {
|
|
|
+ _self.init3();
|
|
|
+ }, 9000);
|
|
|
+ // await this.init3();
|
|
|
},
|
|
|
async init3() {
|
|
|
if (this.pname === '') {
|
|
@@ -360,11 +385,11 @@
|
|
|
if (this.show == true) {
|
|
|
await this.initDateRang3(new Date(), 'day');
|
|
|
await this.initDateRang3(new Date(), 'week');
|
|
|
- if(this.tese == 1){
|
|
|
+ if (this.tese == 1) {
|
|
|
await this.initDateRang3(new Date(), 'month');
|
|
|
await this.initDateRang3(new Date(), 'year');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
initDateRang(day, chartType) {
|
|
@@ -424,7 +449,7 @@
|
|
|
this.startDate12 = dateUtils.formateDate(dateUtils.getCurrentYearFirstDate(day), 'yyyy/MM/dd');
|
|
|
this.endDate12 = dateUtils.formateDate(dateUtils.getCurrentYearLastDate(day), 'yyyy/MM/dd');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return this.getProvinceAllData(chartType);
|
|
|
},
|
|
|
/**上一个 */
|
|
@@ -549,7 +574,7 @@
|
|
|
day = new Date(this.startDate12);
|
|
|
day.setFullYear(day.getFullYear() + 1);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.initDateRang3(day, chartType);
|
|
|
},
|
|
|
getStatisticsData(chartType) {
|
|
@@ -728,7 +753,7 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
getProvinceAllData(chartType) {
|
|
|
const param = {
|
|
|
'chartType': chartType
|
|
@@ -757,7 +782,7 @@
|
|
|
if (this.equipmentId) {
|
|
|
param['equipmentId'] = this.equipmentId;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return this.getProvinceAll(param)
|
|
|
.then(data => {
|
|
|
uni.stopPullDownRefresh();
|
|
@@ -773,7 +798,7 @@
|
|
|
if (param['chartType'] == 'year') {
|
|
|
canvaColumn12 = this.initChart3('canvaColumn12', data);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}, _ => {
|
|
|
uni.stopPullDownRefresh();
|
|
|
if (param['chartType'] == 'day') {
|
|
@@ -1094,7 +1119,7 @@
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
touchLine9(e) {
|
|
|
if (canvaColumn9) {
|
|
|
canvaColumn9.scrollStart(e);
|