equipmentStatistics.vue 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407
  1. <!-- 机器销售排行 -->
  2. <template>
  3. <view>
  4. <view class="head">
  5. </view>
  6. <view class="ri">
  7. <font class="title">{{$t('equipmentStatics.title')}}</font>
  8. </view>
  9. <view class="qiun-columns">
  10. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  11. <view class="qiun-title-dot-light">
  12. <view class="dis">{{$t('equipmentStatics.day')}}</view>
  13. </view>
  14. <view class="shijian" style="text-align: center;position: relative;">
  15. <image @click="pre('day')" class="preImg" src="/static/img/leftTriangle.png"></image>
  16. <span>{{startDate1}}</span>
  17. <image @click="next('day')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  18. </view>
  19. </view>
  20. <view class="qiun-charts" style="background-color: #FFFFFF;">
  21. <canvas canvas-id="canvaColumn1" id="canvaColumn1" class="charts" disable-scroll=true
  22. @touchstart="touchLine1" @touchmove="moveLine1" @touchend="touchEndLine1"
  23. style="background-color: #FFFFFF;"></canvas>
  24. </view>
  25. </view>
  26. <view class="line"></view>
  27. <view class="qiun-columns">
  28. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  29. <view class="qiun-title-dot-light">
  30. <view class="dis">{{$t('equipmentStatics.week')}}</view>
  31. </view>
  32. <view class="shijian" style="text-align: center;position: relative;">
  33. <image @click="pre('week')" class="preImg" src="/static/img/leftTriangle.png"></image>
  34. <span>{{startDate2}} -- {{endDate2}}</span>
  35. <image @click="next('week')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  36. </view>
  37. </view>
  38. <view class="qiun-charts" style="background-color: #FFFFFF;">
  39. <canvas canvas-id="canvaColumn2" id="canvaColumn2" class="charts" disable-scroll=true
  40. @touchstart="touchLine2" @touchmove="moveLine2" @touchend="touchEndLine2"
  41. style="background-color: #FFFFFF;"></canvas>
  42. </view>
  43. </view>
  44. <view class="line"></view>
  45. <view class="qiun-columns">
  46. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  47. <view class="qiun-title-dot-light">
  48. <view class="dis">{{$t('equipmentStatics.month')}}</view>
  49. </view>
  50. <view class="shijian" style="text-align: center;position: relative;">
  51. <image @click="pre('month')" class="preImg" src="/static/img/leftTriangle.png"></image>
  52. <span>{{startDate3}} -- {{endDate3}}</span>
  53. <image @click="next('month')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  54. </view>
  55. </view>
  56. <view class="qiun-charts" style="background-color: #FFFFFF;">
  57. <canvas canvas-id="canvaColumn3" id="canvaColumn3" class="charts" disable-scroll=true
  58. @touchstart="touchLine3" @touchmove="moveLine3" @touchend="touchEndLine3"
  59. style="background-color: #FFFFFF;"></canvas>
  60. </view>
  61. </view>
  62. <view class="line"></view>
  63. <view class="qiun-columns">
  64. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  65. <view class="qiun-title-dot-light">
  66. <view class="dis">{{$t('equipmentStatics.year')}}</view>
  67. </view>
  68. <view class="shijian" style="text-align: center;position: relative;">
  69. <image @click="pre('year')" class="preImg" src="/static/img/leftTriangle.png"></image>
  70. <span>{{startDate4}} -- {{endDate4}}</span>
  71. <image @click="next('year')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  72. </view>
  73. </view>
  74. <view class="qiun-charts" style="background-color: #FFFFFF;">
  75. <canvas canvas-id="canvaColumn4" id="canvaColumn4" class="charts" disable-scroll=true
  76. @touchstart="touchLine4" @touchmove="moveLine4" @touchend="touchEndLine4"
  77. style="background-color: #FFFFFF;"></canvas>
  78. </view>
  79. </view>
  80. <!-- 各省份平均销售数据 -->
  81. <view v-if="show">
  82. <view class="qiun-columns">
  83. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  84. <view class="qiun-title-dot-light">
  85. <view class="dis">全国平均日销售排行(某省日销售总额/省机器数量)</view>
  86. </view>
  87. <view class="shijian" style="text-align: center;position: relative;">
  88. <image @click="pre2('day')" class="preImg" src="/static/img/leftTriangle.png"></image>
  89. <span>{{startDate5}}</span>
  90. <image @click="next2('day')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  91. </view>
  92. </view>
  93. <view class="qiun-charts2" style="background-color: #FFFFFF;">
  94. <canvas canvas-id="canvaColumn5" id="canvaColumn5" class="charts2" disable-scroll=true
  95. @touchstart="touchLine5" @touchmove="moveLine5" @touchend="touchEndLine5"
  96. style="background-color: #FFFFFF;"></canvas>
  97. </view>
  98. </view>
  99. <view class="line"></view>
  100. <view class="qiun-columns">
  101. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  102. <view class="qiun-title-dot-light">
  103. <view class="dis">全国平均周销售排行</view>
  104. </view>
  105. <view class="shijian" style="text-align: center;position: relative;">
  106. <image @click="pre2('week')" class="preImg" src="/static/img/leftTriangle.png"></image>
  107. <span>{{startDate6}} 至 {{endDate6}}</span>
  108. <image @click="next2('week')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  109. </view>
  110. </view>
  111. <view class="qiun-charts2" style="background-color: #FFFFFF;">
  112. <canvas canvas-id="canvaColumn6" id="canvaColumn6" class="charts2" disable-scroll=true
  113. @touchstart="touchLine6" @touchmove="moveLine6" @touchend="touchEndLine6"
  114. style="background-color: #FFFFFF;"></canvas>
  115. </view>
  116. </view>
  117. <view class="line"></view>
  118. <view class="qiun-columns">
  119. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  120. <view class="qiun-title-dot-light">
  121. <view class="dis">全国平均月销售排行</view>
  122. </view>
  123. <view class="shijian" style="text-align: center;position: relative;">
  124. <image @click="pre2('month')" class="preImg" src="/static/img/leftTriangle.png"></image>
  125. <span>{{startDate7}} 至 {{endDate7}}</span>
  126. <image @click="next2('month')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  127. </view>
  128. </view>
  129. <view class="qiun-charts2" style="background-color: #FFFFFF;">
  130. <canvas canvas-id="canvaColumn7" id="canvaColumn7" class="charts2" disable-scroll=true
  131. @touchstart="touchLine7" @touchmove="moveLine7" @touchend="touchEndLine7"
  132. style="background-color: #FFFFFF;"></canvas>
  133. </view>
  134. </view>
  135. <view class="line"></view>
  136. <view class="qiun-columns">
  137. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  138. <view class="qiun-title-dot-light">
  139. <view class="dis">全国平均年销售排行</view>
  140. </view>
  141. <view class="shijian" style="text-align: center;position: relative;">
  142. <image @click="pre2('year')" class="preImg" src="/static/img/leftTriangle.png"></image>
  143. <span>{{startDate8}} 至 {{endDate8}}</span>
  144. <image @click="next2('year')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  145. </view>
  146. </view>
  147. <view class="qiun-charts2" style="background-color: #FFFFFF;">
  148. <canvas canvas-id="canvaColumn8" id="canvaColumn8" class="charts2" disable-scroll=true
  149. @touchstart="touchLine8" @touchmove="moveLine8" @touchend="touchEndLine8"
  150. style="background-color: #FFFFFF;"></canvas>
  151. </view>
  152. </view>
  153. <!-- 各省销售额 -->
  154. <view class="qiun-columns">
  155. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  156. <view class="qiun-title-dot-light">
  157. <view class="dis">全国日销售排行(全省当日销售总额)</view>
  158. </view>
  159. <view class="shijian" style="text-align: center;position: relative;">
  160. <image @click="pre3('day')" class="preImg" src="/static/img/leftTriangle.png"></image>
  161. <span>{{startDate9}}</span>
  162. <image @click="next3('day')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  163. </view>
  164. </view>
  165. <view class="qiun-charts2" style="background-color: #FFFFFF;">
  166. <canvas canvas-id="canvaColumn9" id="canvaColumn9" class="charts2" disable-scroll=true
  167. @touchstart="touchLine9" @touchmove="moveLine9" @touchend="touchEndLine9"
  168. style="background-color: #FFFFFF;"></canvas>
  169. </view>
  170. </view>
  171. <view class="line"></view>
  172. <view class="qiun-columns">
  173. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  174. <view class="qiun-title-dot-light">
  175. <view class="dis">全国周销售排行</view>
  176. </view>
  177. <view class="shijian" style="text-align: center;position: relative;">
  178. <image @click="pre3('week')" class="preImg" src="/static/img/leftTriangle.png"></image>
  179. <span>{{startDate10}} 至 {{endDate10}}</span>
  180. <image @click="next3('week')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  181. </view>
  182. </view>
  183. <view class="qiun-charts2" style="background-color: #FFFFFF;">
  184. <canvas canvas-id="canvaColumn10" id="canvaColumn10" class="charts2" disable-scroll=true
  185. @touchstart="touchLine10" @touchmove="moveLine10" @touchend="touchEndLine10"
  186. style="background-color: #FFFFFF;"></canvas>
  187. </view>
  188. </view>
  189. <view class="line"></view>
  190. <view class="qiun-columns">
  191. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  192. <view class="qiun-title-dot-light">
  193. <view class="dis">全国月销售排行</view>
  194. </view>
  195. <view class="shijian" style="text-align: center;position: relative;">
  196. <image @click="pre3('month')" class="preImg" src="/static/img/leftTriangle.png"></image>
  197. <span>{{startDate11}} 至 {{endDate11}}</span>
  198. <image @click="next3('month')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  199. </view>
  200. </view>
  201. <view class="qiun-charts2" style="background-color: #FFFFFF;">
  202. <canvas canvas-id="canvaColumn11" id="canvaColumn11" class="charts2" disable-scroll=true
  203. @touchstart="touchLine11" @touchmove="moveLine11" @touchend="touchEndLine11"
  204. style="background-color: #FFFFFF;"></canvas>
  205. </view>
  206. </view>
  207. <view class="line"></view>
  208. <view class="qiun-columns">
  209. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  210. <view class="qiun-title-dot-light">
  211. <view class="dis">全国年销售排行</view>
  212. </view>
  213. <view class="shijian" style="text-align: center;position: relative;">
  214. <image @click="pre3('year')" class="preImg" src="/static/img/leftTriangle.png"></image>
  215. <span>{{startDate12}} 至 {{endDate12}}</span>
  216. <image @click="next3('year')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  217. </view>
  218. </view>
  219. <view class="qiun-charts2" style="background-color: #FFFFFF;">
  220. <canvas canvas-id="canvaColumn12" id="canvaColumn12" class="charts2" disable-scroll=true
  221. @touchstart="touchLine12" @touchmove="moveLine12" @touchend="touchEndLine12"
  222. style="background-color: #FFFFFF;"></canvas>
  223. </view>
  224. </view>
  225. </view>
  226. </view>
  227. </template>
  228. <script>
  229. import {
  230. mapState,
  231. mapActions,
  232. mapMutations
  233. } from 'vuex';
  234. import uCharts from '@/components/u-charts/u-charts.js';
  235. import {
  236. dateUtils
  237. } from '@/common/util.js';
  238. var _self;
  239. var canvaColumn1 = null;
  240. var canvaColumn2 = null;
  241. var canvaColumn3 = null;
  242. var canvaColumn4 = null;
  243. var canvaColumn5 = null;
  244. var canvaColumn6 = null;
  245. var canvaColumn7 = null;
  246. var canvaColumn8 = null;
  247. var canvaColumn9 = null;
  248. var canvaColumn10 = null;
  249. var canvaColumn11 = null;
  250. var canvaColumn12 = null;
  251. export default {
  252. name: 'equipmentStatistics',
  253. props: {
  254. adminId: '',
  255. pname: '',
  256. },
  257. data() {
  258. return {
  259. cWidth: '',
  260. cHeight: '',
  261. pixelRatio: 1,
  262. tese: 0,
  263. startDate1: '',
  264. endDate1: '',
  265. startDate2: '',
  266. endDate2: '',
  267. startDate3: '',
  268. endDate3: '',
  269. startDate4: '',
  270. endDate4: '',
  271. startDate5: '',
  272. endDate5: '',
  273. startDate6: '',
  274. endDate6: '',
  275. startDate7: '',
  276. endDate7: '',
  277. startDate8: '',
  278. endDate8: '',
  279. startDate9: '',
  280. endDate9: '',
  281. startDate10: '',
  282. endDate10: '',
  283. startDate11: '',
  284. endDate11: '',
  285. startDate12: '',
  286. endDate12: '',
  287. show: false
  288. }
  289. },
  290. computed: {
  291. ...mapState(['loginUser']),
  292. },
  293. mounted() {
  294. // this.init2();
  295. },
  296. onShow() {
  297. uni.setNavigationBarTitle({
  298. title: this.$t('equipmentStatics.title')
  299. });
  300. uni.setTabBarItem({
  301. index: 2,
  302. text: this.$t('tabs.tab3')
  303. });
  304. this.tese = this.tese + 1;
  305. var globalUser = uni.getStorageSync("globalUser");
  306. if (globalUser.id == '1') {
  307. this.show = true
  308. }
  309. var token = uni.getStorageSync("token");
  310. if (token.length > 1) {
  311. this.init();
  312. } else {
  313. uni.reLaunch({
  314. url: '../Login/Login',
  315. });
  316. }
  317. },
  318. methods: {
  319. ...mapActions('chart', ['getProvince', 'getProvinceAll', 'getEquipmentStatistics', 'getMainStatistics',
  320. 'getMachineNum'
  321. ]),
  322. async init() {
  323. if (this.pname === '') {
  324. this.pname = uni.getStorageSync("name");
  325. }
  326. // console.log("adminId:" + this.adminId)
  327. _self = this;
  328. //图表中图
  329. this.cWidth = uni.upx2px(690);
  330. this.cHeight = uni.upx2px(500);
  331. await this.initDateRang(new Date(), 'day');
  332. await this.initDateRang(new Date(), 'week');
  333. if (this.tese == 1) {
  334. await this.initDateRang(new Date(), 'month');
  335. await this.initDateRang(new Date(), 'year');
  336. }
  337. setTimeout(function() {
  338. _self.init2();
  339. }, 3000);
  340. // await this.init2();
  341. },
  342. async init2() {
  343. if (this.pname === '') {
  344. this.pname = uni.getStorageSync("name");
  345. }
  346. _self = this;
  347. //图表中图
  348. this.cWidth2 = uni.upx2px(690);
  349. this.cHeight2 = uni.upx2px(370);
  350. if (this.show == true) {
  351. await this.initDateRang2(new Date(), 'day');
  352. await this.initDateRang2(new Date(), 'week');
  353. if (this.tese == 1) {
  354. await this.initDateRang2(new Date(), 'month');
  355. await this.initDateRang2(new Date(), 'year');
  356. }
  357. }
  358. setTimeout(function() {
  359. _self.init3();
  360. }, 9000);
  361. // await this.init3();
  362. },
  363. async init3() {
  364. if (this.pname === '') {
  365. this.pname = uni.getStorageSync("name");
  366. }
  367. _self = this;
  368. //图表中图
  369. this.cWidth3 = uni.upx2px(690);
  370. this.cHeight3 = uni.upx2px(370);
  371. if (this.show == true) {
  372. await this.initDateRang3(new Date(), 'day');
  373. await this.initDateRang3(new Date(), 'week');
  374. if (this.tese == 1) {
  375. await this.initDateRang3(new Date(), 'month');
  376. await this.initDateRang3(new Date(), 'year');
  377. }
  378. }
  379. },
  380. initDateRang(day, chartType) {
  381. const daystr = dateUtils.formateDate(day, 'yyyy/MM/dd');
  382. if (chartType === 'day') {
  383. this.startDate1 = dateUtils.formateDate(day, 'yyyy/MM/dd');
  384. }
  385. if (chartType === 'week') {
  386. this.startDate2 = dateUtils.formateDate(dateUtils.getFirstDayOfWeek(day), 'yyyy/MM/dd');
  387. this.endDate2 = dateUtils.formateDate(dateUtils.getLastDayOfWeek(day), 'yyyy/MM/dd');
  388. }
  389. if (chartType === 'month') {
  390. this.startDate3 = dateUtils.formateDate(dateUtils.getCurrentMonFirstDate(day), 'yyyy/MM/dd');
  391. this.endDate3 = dateUtils.formateDate(dateUtils.getCurrentMonLastDate(day), 'yyyy/MM/dd');
  392. }
  393. if (chartType === 'year') {
  394. this.startDate4 = dateUtils.formateDate(dateUtils.getCurrentYearFirstDate(day), 'yyyy/MM/dd');
  395. this.endDate4 = dateUtils.formateDate(dateUtils.getCurrentYearLastDate(day), 'yyyy/MM/dd');
  396. }
  397. return this.getStatisticsData(chartType);
  398. },
  399. initDateRang2(day, chartType) {
  400. const daystr = dateUtils.formateDate(day, 'yyyy/MM/dd');
  401. if (chartType === 'day') {
  402. this.startDate5 = dateUtils.formateDate(day, 'yyyy/MM/dd');
  403. }
  404. if (chartType === 'week') {
  405. this.startDate6 = dateUtils.formateDate(dateUtils.getFirstDayOfWeek(day), 'yyyy/MM/dd');
  406. this.endDate6 = dateUtils.formateDate(dateUtils.getLastDayOfWeek(day), 'yyyy/MM/dd');
  407. }
  408. if (chartType === 'month') {
  409. this.startDate7 = dateUtils.formateDate(dateUtils.getCurrentMonFirstDate(day), 'yyyy/MM/dd');
  410. this.endDate7 = dateUtils.formateDate(dateUtils.getCurrentMonLastDate(day), 'yyyy/MM/dd');
  411. }
  412. if (chartType === 'year') {
  413. this.startDate8 = dateUtils.formateDate(dateUtils.getCurrentYearFirstDate(day), 'yyyy/MM/dd');
  414. this.endDate8 = dateUtils.formateDate(dateUtils.getCurrentYearLastDate(day), 'yyyy/MM/dd');
  415. }
  416. return this.getProvinceData(chartType);
  417. },
  418. initDateRang3(day, chartType) {
  419. const daystr = dateUtils.formateDate(day, 'yyyy/MM/dd');
  420. if (chartType === 'day') {
  421. this.startDate9 = dateUtils.formateDate(day, 'yyyy/MM/dd');
  422. }
  423. if (chartType === 'week') {
  424. this.startDate10 = dateUtils.formateDate(dateUtils.getFirstDayOfWeek(day), 'yyyy/MM/dd');
  425. this.endDate10 = dateUtils.formateDate(dateUtils.getLastDayOfWeek(day), 'yyyy/MM/dd');
  426. }
  427. if (chartType === 'month') {
  428. this.startDate11 = dateUtils.formateDate(dateUtils.getCurrentMonFirstDate(day), 'yyyy/MM/dd');
  429. this.endDate11 = dateUtils.formateDate(dateUtils.getCurrentMonLastDate(day), 'yyyy/MM/dd');
  430. }
  431. if (chartType === 'year') {
  432. this.startDate12 = dateUtils.formateDate(dateUtils.getCurrentYearFirstDate(day), 'yyyy/MM/dd');
  433. this.endDate12 = dateUtils.formateDate(dateUtils.getCurrentYearLastDate(day), 'yyyy/MM/dd');
  434. }
  435. return this.getProvinceAllData(chartType);
  436. },
  437. /**上一个 */
  438. pre(chartType) {
  439. let day;
  440. if (chartType === 'day') { // 日
  441. day = new Date(this.startDate1);
  442. day.setDate(day.getDate() - 1);
  443. }
  444. if (chartType === 'week') { // 周
  445. day = new Date(this.startDate2);
  446. day.setDate(day.getDate() - 7);
  447. }
  448. if (chartType === 'month') { // 月
  449. day = new Date(this.startDate3);
  450. day.setMonth(day.getMonth() - 1);
  451. }
  452. if (chartType === 'year') { // 年
  453. day = new Date(this.startDate4);
  454. day.setFullYear(day.getFullYear() - 1);
  455. }
  456. this.initDateRang(day, chartType);
  457. },
  458. pre2(chartType) {
  459. let day;
  460. if (chartType === 'day') { // 日
  461. day = new Date(this.startDate5);
  462. day.setDate(day.getDate() - 1);
  463. }
  464. if (chartType === 'week') { // 周
  465. day = new Date(this.startDate6);
  466. day.setDate(day.getDate() - 7);
  467. }
  468. if (chartType === 'month') { // 月
  469. day = new Date(this.startDate7);
  470. day.setMonth(day.getMonth() - 1);
  471. }
  472. if (chartType === 'year') { // 年
  473. day = new Date(this.startDate8);
  474. day.setFullYear(day.getFullYear() - 1);
  475. }
  476. this.initDateRang2(day, chartType);
  477. },
  478. pre3(chartType) {
  479. let day;
  480. if (chartType === 'day') { // 日
  481. day = new Date(this.startDate9);
  482. day.setDate(day.getDate() - 1);
  483. }
  484. if (chartType === 'week') { // 周
  485. day = new Date(this.startDate10);
  486. day.setDate(day.getDate() - 7);
  487. }
  488. if (chartType === 'month') { // 月
  489. day = new Date(this.startDate11);
  490. day.setMonth(day.getMonth() - 1);
  491. }
  492. if (chartType === 'year') { // 年
  493. day = new Date(this.startDate12);
  494. day.setFullYear(day.getFullYear() - 1);
  495. }
  496. this.initDateRang3(day, chartType);
  497. },
  498. /**下一个 */
  499. next(chartType) {
  500. let day;
  501. if (chartType === 'day') { // 日
  502. day = new Date(this.startDate1);
  503. day.setDate(day.getDate() + 1);
  504. }
  505. if (chartType === 'week') { // 周
  506. day = new Date(this.startDate2);
  507. day.setDate(day.getDate() + 7);
  508. }
  509. if (chartType === 'month') { // 月
  510. day = new Date(this.startDate3);
  511. day.setMonth(day.getMonth() + 1);
  512. }
  513. if (chartType === 'year') { // 年
  514. day = new Date(this.startDate4);
  515. day.setFullYear(day.getFullYear() + 1);
  516. }
  517. this.initDateRang(day, chartType);
  518. },
  519. next2(chartType) {
  520. let day;
  521. if (chartType === 'day') { // 日
  522. day = new Date(this.startDate5);
  523. day.setDate(day.getDate() + 1);
  524. }
  525. if (chartType === 'week') { // 周
  526. day = new Date(this.startDate6);
  527. day.setDate(day.getDate() + 7);
  528. }
  529. if (chartType === 'month') { // 月
  530. day = new Date(this.startDate7);
  531. day.setMonth(day.getMonth() + 1);
  532. }
  533. if (chartType === 'year') { // 年
  534. day = new Date(this.startDate8);
  535. day.setFullYear(day.getFullYear() + 1);
  536. }
  537. this.initDateRang2(day, chartType);
  538. },
  539. next3(chartType) {
  540. let day;
  541. if (chartType === 'day') { // 日
  542. day = new Date(this.startDate9);
  543. day.setDate(day.getDate() + 1);
  544. }
  545. if (chartType === 'week') { // 周
  546. day = new Date(this.startDate10);
  547. day.setDate(day.getDate() + 7);
  548. }
  549. if (chartType === 'month') { // 月
  550. day = new Date(this.startDate11);
  551. day.setMonth(day.getMonth() + 1);
  552. }
  553. if (chartType === 'year') { // 年
  554. day = new Date(this.startDate12);
  555. day.setFullYear(day.getFullYear() + 1);
  556. }
  557. this.initDateRang3(day, chartType);
  558. },
  559. getStatisticsData(chartType) {
  560. const param = {
  561. 'chartType': chartType
  562. };
  563. if (chartType == 'day') {
  564. param['startDate'] = this.startDate1;
  565. param['endDate'] = this.startDate1;
  566. }
  567. if (chartType == 'week') {
  568. param['startDate'] = this.startDate2;
  569. param['endDate'] = this.endDate2;
  570. }
  571. if (chartType == 'month') {
  572. param['startDate'] = this.startDate3;
  573. param['endDate'] = this.endDate3;
  574. }
  575. if (chartType == 'year') {
  576. param['startDate'] = this.startDate4;
  577. param['endDate'] = this.endDate4;
  578. }
  579. if (this.adminId) { // 子组件,则拿传过来的参
  580. param['adminId'] = this.adminId;
  581. } else if ('admin' !== this.loginUser['username']) { //否则为主页,拿登录用户
  582. param['adminId'] = this.loginUser['id'];
  583. }
  584. var globalUser = uni.getStorageSync("globalUser");
  585. if (globalUser.id != 1) {
  586. if (param.adminId == null || param.adminId == undefined) {
  587. param['adminId'] = globalUser.id;
  588. }
  589. }
  590. if (this.equipmentId) {
  591. param['equipmentId'] = this.equipmentId;
  592. }
  593. return this.getEquipmentStatistics(param)
  594. .then(data => {
  595. uni.stopPullDownRefresh();
  596. if (param['chartType'] == 'day') {
  597. canvaColumn1 = this.initChart('canvaColumn1', data);
  598. }
  599. if (param['chartType'] == 'week') {
  600. canvaColumn2 = this.initChart('canvaColumn2', data);
  601. }
  602. if (param['chartType'] == 'month') {
  603. canvaColumn3 = this.initChart('canvaColumn3', data);
  604. }
  605. if (param['chartType'] == 'year') {
  606. canvaColumn4 = this.initChart('canvaColumn4', data);
  607. }
  608. }, _ => {
  609. uni.stopPullDownRefresh();
  610. if (param['chartType'] == 'day') {
  611. canvaColumn1 = this.initChart('canvaColumn1', {
  612. categories: ['暂无数据'],
  613. series: [{
  614. name: '销售个数',
  615. data: [0]
  616. }]
  617. });
  618. }
  619. if (param['chartType'] == 'week') {
  620. canvaColumn2 = this.initChart('canvaColumn2', {
  621. categories: ['暂无数据'],
  622. series: [{
  623. name: '销售个数',
  624. data: [0]
  625. }]
  626. });
  627. }
  628. if (param['chartType'] == 'month') {
  629. canvaColumn3 = this.initChart('canvaColumn3', {
  630. categories: ['暂无数据'],
  631. series: [{
  632. name: '销售个数',
  633. data: [0]
  634. }]
  635. });
  636. }
  637. if (param['chartType'] == 'year') {
  638. canvaColumn4 = this.initChart('canvaColumn4', {
  639. categories: ['暂无数据'],
  640. series: [{
  641. name: '销售个数',
  642. data: [0]
  643. }]
  644. });
  645. }
  646. });
  647. },
  648. getProvinceData(chartType) {
  649. const param = {
  650. 'chartType': chartType
  651. };
  652. if (chartType == 'day') {
  653. param['startDate'] = this.startDate5;
  654. param['endDate'] = this.startDate5;
  655. }
  656. if (chartType == 'week') {
  657. param['startDate'] = this.startDate6;
  658. param['endDate'] = this.endDate6;
  659. }
  660. if (chartType == 'month') {
  661. param['startDate'] = this.startDate7;
  662. param['endDate'] = this.endDate7;
  663. }
  664. if (chartType == 'year') {
  665. param['startDate'] = this.startDate8;
  666. param['endDate'] = this.endDate8;
  667. }
  668. if (this.adminId) { // 子组件,则拿传过来的参
  669. param['adminId'] = this.adminId;
  670. } else if ('admin' !== this.loginUser['username']) { //否则为主页,拿登录用户
  671. param['adminId'] = this.loginUser['id'];
  672. }
  673. if (this.equipmentId) {
  674. param['equipmentId'] = this.equipmentId;
  675. }
  676. return this.getProvince(param)
  677. .then(data => {
  678. uni.stopPullDownRefresh();
  679. if (param['chartType'] == 'day') {
  680. canvaColumn5 = this.initChart2('canvaColumn5', data);
  681. }
  682. if (param['chartType'] == 'week') {
  683. canvaColumn6 = this.initChart2('canvaColumn6', data);
  684. }
  685. if (param['chartType'] == 'month') {
  686. canvaColumn7 = this.initChart2('canvaColumn7', data);
  687. }
  688. if (param['chartType'] == 'year') {
  689. canvaColumn8 = this.initChart2('canvaColumn8', data);
  690. }
  691. }, _ => {
  692. uni.stopPullDownRefresh();
  693. if (param['chartType'] == 'day') {
  694. canvaColumn5 = this.initChart2('canvaColumn5', {
  695. categories: ['暂无数据'],
  696. series: [{
  697. name: '平均销售额',
  698. data: [0]
  699. }]
  700. });
  701. }
  702. if (param['chartType'] == 'week') {
  703. canvaColumn6 = this.initChart2('canvaColumn6', {
  704. categories: ['暂无数据'],
  705. series: [{
  706. name: '平均销售额',
  707. data: [0]
  708. }]
  709. });
  710. }
  711. if (param['chartType'] == 'month') {
  712. canvaColumn7 = this.initChart2('canvaColumn7', {
  713. categories: ['暂无数据'],
  714. series: [{
  715. name: '平均销售额',
  716. data: [0]
  717. }]
  718. });
  719. }
  720. if (param['chartType'] == 'year') {
  721. canvaColumn8 = this.initChart2('canvaColumn8', {
  722. categories: ['暂无数据'],
  723. series: [{
  724. name: '平均销售额',
  725. data: [0]
  726. }]
  727. });
  728. }
  729. });
  730. },
  731. getProvinceAllData(chartType) {
  732. const param = {
  733. 'chartType': chartType
  734. };
  735. if (chartType == 'day') {
  736. param['startDate'] = this.startDate9;
  737. param['endDate'] = this.startDate9;
  738. }
  739. if (chartType == 'week') {
  740. param['startDate'] = this.startDate10;
  741. param['endDate'] = this.endDate10;
  742. }
  743. if (chartType == 'month') {
  744. param['startDate'] = this.startDate11;
  745. param['endDate'] = this.endDate11;
  746. }
  747. if (chartType == 'year') {
  748. param['startDate'] = this.startDate12;
  749. param['endDate'] = this.endDate12;
  750. }
  751. if (this.adminId) { // 子组件,则拿传过来的参
  752. param['adminId'] = this.adminId;
  753. } else if ('admin' !== this.loginUser['username']) { //否则为主页,拿登录用户
  754. param['adminId'] = this.loginUser['id'];
  755. }
  756. if (this.equipmentId) {
  757. param['equipmentId'] = this.equipmentId;
  758. }
  759. return this.getProvinceAll(param)
  760. .then(data => {
  761. uni.stopPullDownRefresh();
  762. if (param['chartType'] == 'day') {
  763. canvaColumn9 = this.initChart3('canvaColumn9', data);
  764. }
  765. if (param['chartType'] == 'week') {
  766. canvaColumn10 = this.initChart3('canvaColumn10', data);
  767. }
  768. if (param['chartType'] == 'month') {
  769. canvaColumn11 = this.initChart3('canvaColumn11', data);
  770. }
  771. if (param['chartType'] == 'year') {
  772. canvaColumn12 = this.initChart3('canvaColumn12', data);
  773. }
  774. }, _ => {
  775. uni.stopPullDownRefresh();
  776. if (param['chartType'] == 'day') {
  777. canvaColumn9 = this.initChart3('canvaColumn9', {
  778. categories: ['暂无数据'],
  779. series: [{
  780. name: '销售额',
  781. data: [0]
  782. }]
  783. });
  784. }
  785. if (param['chartType'] == 'week') {
  786. canvaColumn10 = this.initChart3('canvaColumn10', {
  787. categories: ['暂无数据'],
  788. series: [{
  789. name: '销售额',
  790. data: [0]
  791. }]
  792. });
  793. }
  794. if (param['chartType'] == 'month') {
  795. canvaColumn11 = this.initChart3('canvaColumn11', {
  796. categories: ['暂无数据'],
  797. series: [{
  798. name: '销售额',
  799. data: [0]
  800. }]
  801. });
  802. }
  803. if (param['chartType'] == 'year') {
  804. canvaColumn12 = this.initChart3('canvaColumn12', {
  805. categories: ['暂无数据'],
  806. series: [{
  807. name: '销售额',
  808. data: [0]
  809. }]
  810. });
  811. }
  812. });
  813. },
  814. initChart(canvasId, chartData) {
  815. return new uCharts({
  816. $this: _self,
  817. canvasId: canvasId,
  818. enableScroll: true,
  819. type: 'column',
  820. legend: true,
  821. fontSize: 11,
  822. background: '#FFFFFF', //y轴颜色
  823. pixelRatio: 1,
  824. animation: true,
  825. categories: chartData.categories,
  826. series: chartData.series,
  827. xAxis: {
  828. type: 'grid',
  829. gridType: 'dash',
  830. rotateLabel: true,
  831. itemCount: 4, //x轴单屏显示数据的数量,默认为5个
  832. scrollShow: true, //新增是否显示滚动条,默认false
  833. scrollAlign: 'left', //滚动条初始位置
  834. scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF 滚动条颜色底色
  835. scrollColor: '#DEE7F7', //默认为 #A6A6A6 滚动条颜色
  836. // disableGrid:true,
  837. },
  838. yAxis: {
  839. //disabled:true
  840. },
  841. dataLabel: true,
  842. width: _self.cWidth * _self.pixelRatio,
  843. height: _self.cHeight * _self.pixelRatio,
  844. extra: {
  845. column: {
  846. // width: _self.cWidth*_self.pixelRatio*0.45/chartData.categories.length
  847. width: 18
  848. }
  849. }
  850. });
  851. },
  852. initChart2(canvasId, chartData) {
  853. return new uCharts({
  854. $this: _self,
  855. canvasId: canvasId,
  856. enableScroll: true,
  857. type: 'column',
  858. legend: true,
  859. fontSize: 11,
  860. background: '#FFFFFF', //y轴颜色
  861. pixelRatio: 1,
  862. animation: true,
  863. categories: chartData.categories,
  864. series: chartData.series,
  865. xAxis: {
  866. type: 'grid',
  867. gridType: 'dash',
  868. rotateLabel: true,
  869. itemCount: 4, //x轴单屏显示数据的数量,默认为5个
  870. scrollShow: true, //新增是否显示滚动条,默认false
  871. scrollAlign: 'left', //滚动条初始位置
  872. scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF 滚动条颜色底色
  873. scrollColor: '#DEE7F7', //默认为 #A6A6A6 滚动条颜色
  874. // disableGrid:true,
  875. },
  876. yAxis: {
  877. //disabled:true
  878. },
  879. dataLabel: true,
  880. width: _self.cWidth2 * _self.pixelRatio,
  881. height: _self.cHeight2 * _self.pixelRatio,
  882. extra: {
  883. column: {
  884. width: 18
  885. }
  886. }
  887. });
  888. },
  889. initChart3(canvasId, chartData) {
  890. return new uCharts({
  891. $this: _self,
  892. canvasId: canvasId,
  893. enableScroll: true,
  894. type: 'column',
  895. legend: true,
  896. fontSize: 11,
  897. background: '#FFFFFF', //y轴颜色
  898. pixelRatio: 1,
  899. animation: true,
  900. categories: chartData.categories,
  901. series: chartData.series,
  902. xAxis: {
  903. type: 'grid',
  904. gridType: 'dash',
  905. rotateLabel: true,
  906. itemCount: 4, //x轴单屏显示数据的数量,默认为5个
  907. scrollShow: true, //新增是否显示滚动条,默认false
  908. scrollAlign: 'left', //滚动条初始位置
  909. scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF 滚动条颜色底色
  910. scrollColor: '#DEE7F7', //默认为 #A6A6A6 滚动条颜色
  911. // disableGrid:true,
  912. },
  913. yAxis: {
  914. //disabled:true
  915. },
  916. dataLabel: true,
  917. width: _self.cWidth3 * _self.pixelRatio,
  918. height: _self.cHeight3 * _self.pixelRatio,
  919. extra: {
  920. column: {
  921. width: 18
  922. }
  923. }
  924. });
  925. },
  926. touchLine1(e) {
  927. if (canvaColumn1) {
  928. canvaColumn1.scrollStart(e);
  929. }
  930. },
  931. moveLine1(e) {
  932. if (canvaColumn1) {
  933. canvaColumn1.scroll(e);
  934. }
  935. },
  936. touchEndLine1(e) {
  937. if (canvaColumn1) {
  938. canvaColumn1.scrollEnd(e);
  939. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  940. canvaColumn1.showToolTip(e, {
  941. format: function(item, category) {
  942. return category + ' ' + item.name + ':' + item.data
  943. }
  944. });
  945. }
  946. },
  947. touchLine2(e) {
  948. if (canvaColumn2) {
  949. canvaColumn2.scrollStart(e);
  950. }
  951. },
  952. moveLine2(e) {
  953. if (canvaColumn2) {
  954. canvaColumn2.scroll(e);
  955. }
  956. },
  957. touchEndLine2(e) {
  958. if (canvaColumn2) {
  959. canvaColumn2.scrollEnd(e);
  960. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  961. canvaColumn2.showToolTip(e, {
  962. format: function(item, category) {
  963. return category + ' ' + item.name + ':' + item.data
  964. }
  965. });
  966. }
  967. },
  968. touchLine3(e) {
  969. if (canvaColumn3) {
  970. canvaColumn3.scrollStart(e);
  971. }
  972. },
  973. moveLine3(e) {
  974. if (canvaColumn3) {
  975. canvaColumn3.scroll(e);
  976. }
  977. },
  978. touchEndLine3(e) {
  979. if (canvaColumn3) {
  980. canvaColumn3.scrollEnd(e);
  981. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  982. canvaColumn3.showToolTip(e, {
  983. format: function(item, category) {
  984. return category + ' ' + item.name + ':' + item.data
  985. }
  986. });
  987. }
  988. },
  989. touchLine4(e) {
  990. if (canvaColumn4) {
  991. canvaColumn4.scrollStart(e);
  992. }
  993. },
  994. moveLine4(e) {
  995. if (canvaColumn4) {
  996. canvaColumn4.scroll(e);
  997. }
  998. },
  999. touchEndLine4(e) {
  1000. if (canvaColumn4) {
  1001. canvaColumn4.scrollEnd(e);
  1002. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  1003. canvaColumn4.showToolTip(e, {
  1004. format: function(item, category) {
  1005. return category + ' ' + item.name + ':' + item.data
  1006. }
  1007. });
  1008. }
  1009. },
  1010. touchLine5(e) {
  1011. if (canvaColumn5) {
  1012. canvaColumn5.scrollStart(e);
  1013. }
  1014. },
  1015. moveLine5(e) {
  1016. if (canvaColumn5) {
  1017. canvaColumn5.scroll(e);
  1018. }
  1019. },
  1020. touchEndLine5(e) {
  1021. if (canvaColumn5) {
  1022. canvaColumn5.scrollEnd(e);
  1023. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  1024. canvaColumn5.showToolTip(e, {
  1025. format: function(item, category) {
  1026. return category + ' ' + item.name + ':' + item.data
  1027. }
  1028. });
  1029. }
  1030. },
  1031. touchLine6(e) {
  1032. if (canvaColumn6) {
  1033. canvaColumn6.scrollStart(e);
  1034. }
  1035. },
  1036. moveLine6(e) {
  1037. if (canvaColumn6) {
  1038. canvaColumn6.scroll(e);
  1039. }
  1040. },
  1041. touchEndLine6(e) {
  1042. if (canvaColumn6) {
  1043. canvaColumn6.scrollEnd(e);
  1044. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  1045. canvaColumn6.showToolTip(e, {
  1046. format: function(item, category) {
  1047. return category + ' ' + item.name + ':' + item.data
  1048. }
  1049. });
  1050. }
  1051. },
  1052. touchLine7(e) {
  1053. if (canvaColumn7) {
  1054. canvaColumn7.scrollStart(e);
  1055. }
  1056. },
  1057. moveLine7(e) {
  1058. if (canvaColumn7) {
  1059. canvaColumn7.scroll(e);
  1060. }
  1061. },
  1062. touchEndLine7(e) {
  1063. if (canvaColumn7) {
  1064. canvaColumn7.scrollEnd(e);
  1065. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  1066. canvaColumn7.showToolTip(e, {
  1067. format: function(item, category) {
  1068. return category + ' ' + item.name + ':' + item.data
  1069. }
  1070. });
  1071. }
  1072. },
  1073. touchLine8(e) {
  1074. if (canvaColumn8) {
  1075. canvaColumn8.scrollStart(e);
  1076. }
  1077. },
  1078. moveLine8(e) {
  1079. if (canvaColumn8) {
  1080. canvaColumn8.scroll(e);
  1081. }
  1082. },
  1083. touchEndLine8(e) {
  1084. if (canvaColumn8) {
  1085. canvaColumn8.scrollEnd(e);
  1086. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  1087. canvaColumn8.showToolTip(e, {
  1088. format: function(item, category) {
  1089. return category + ' ' + item.name + ':' + item.data
  1090. }
  1091. });
  1092. }
  1093. },
  1094. touchLine9(e) {
  1095. if (canvaColumn9) {
  1096. canvaColumn9.scrollStart(e);
  1097. }
  1098. },
  1099. moveLine9(e) {
  1100. if (canvaColumn9) {
  1101. canvaColumn9.scroll(e);
  1102. }
  1103. },
  1104. touchEndLine9(e) {
  1105. if (canvaColumn9) {
  1106. canvaColumn9.scrollEnd(e);
  1107. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  1108. canvaColumn9.showToolTip(e, {
  1109. format: function(item, category) {
  1110. return category + ' ' + item.name + ':' + item.data
  1111. }
  1112. });
  1113. }
  1114. },
  1115. touchLine10(e) {
  1116. if (canvaColumn10) {
  1117. canvaColumn10.scrollStart(e);
  1118. }
  1119. },
  1120. moveLine10(e) {
  1121. if (canvaColumn10) {
  1122. canvaColumn10.scroll(e);
  1123. }
  1124. },
  1125. touchEndLine10(e) {
  1126. if (canvaColumn10) {
  1127. canvaColumn10.scrollEnd(e);
  1128. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  1129. canvaColumn10.showToolTip(e, {
  1130. format: function(item, category) {
  1131. return category + ' ' + item.name + ':' + item.data
  1132. }
  1133. });
  1134. }
  1135. },
  1136. touchLine11(e) {
  1137. if (canvaColumn11) {
  1138. canvaColumn11.scrollStart(e);
  1139. }
  1140. },
  1141. moveLine11(e) {
  1142. if (canvaColumn11) {
  1143. canvaColumn11.scroll(e);
  1144. }
  1145. },
  1146. touchEndLine11(e) {
  1147. if (canvaColumn11) {
  1148. canvaColumn11.scrollEnd(e);
  1149. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  1150. canvaColumn11.showToolTip(e, {
  1151. format: function(item, category) {
  1152. return category + ' ' + item.name + ':' + item.data
  1153. }
  1154. });
  1155. }
  1156. },
  1157. touchLine12(e) {
  1158. if (canvaColumn12) {
  1159. canvaColumn12.scrollStart(e);
  1160. }
  1161. },
  1162. moveLine12(e) {
  1163. if (canvaColumn12) {
  1164. canvaColumn12.scroll(e);
  1165. }
  1166. },
  1167. touchEndLine12(e) {
  1168. if (canvaColumn12) {
  1169. canvaColumn12.scrollEnd(e);
  1170. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  1171. canvaColumn12.showToolTip(e, {
  1172. format: function(item, category) {
  1173. return category + ' ' + item.name + ':' + item.data
  1174. }
  1175. });
  1176. }
  1177. },
  1178. }
  1179. }
  1180. </script>
  1181. <style>
  1182. page {
  1183. /* background: #F2F2F2; */
  1184. background: #FFFFFF;
  1185. width: 750upx;
  1186. overflow-x: hidden;
  1187. }
  1188. .head {
  1189. display: flex;
  1190. flex-direction: row;
  1191. background: #206DC3;
  1192. width: 750upx;
  1193. height: 120upx;
  1194. }
  1195. .title {
  1196. /* border-left: 10upx solid #0ea391; */
  1197. color: #363D44;
  1198. font-size: 62upx;
  1199. font-family: "PingFang-SC-Bold";
  1200. text-align: center;
  1201. margin: auto;
  1202. }
  1203. .ri {
  1204. width: 690upx;
  1205. height: 210upx;
  1206. background: #FFFFFF;
  1207. border-radius: 15upx;
  1208. /* 上移 */
  1209. transform: translateY(-90upx);
  1210. text-align: center;
  1211. margin: auto;
  1212. display: flex;
  1213. flex-direction: row;
  1214. /* 阴影 */
  1215. box-shadow: 0upx -1upx 20upx #D3D3D3;
  1216. /* box-shadow:0px 0px 10px 5px #aaa; */
  1217. }
  1218. .riShell {
  1219. display: flex;
  1220. flex-direction: row;
  1221. margin: auto;
  1222. }
  1223. .riTitle {
  1224. display: flex;
  1225. flex-direction: column;
  1226. margin: auto;
  1227. }
  1228. .riqi {
  1229. display: flex;
  1230. flex-direction: column;
  1231. margin: auto;
  1232. }
  1233. .fourTitle {
  1234. width: 690upx;
  1235. height: 294upx;
  1236. display: flex;
  1237. flex-direction: row;
  1238. flex-wrap: wrap;
  1239. background: #FFFFFF;
  1240. box-shadow: 0upx 0upx 20upx #D3D3D3;
  1241. margin: auto;
  1242. border-radius: 15upx;
  1243. transform: translateY(-60upx);
  1244. }
  1245. .four {
  1246. display: flex;
  1247. flex-direction: row;
  1248. margin: auto;
  1249. width: 48%;
  1250. }
  1251. .fourImg {
  1252. width: 54upx;
  1253. height: 54upx;
  1254. }
  1255. .qiun-padding {
  1256. padding: 2%;
  1257. width: 96%;
  1258. }
  1259. .qiun-wrap {
  1260. display: flex;
  1261. flex-wrap: wrap;
  1262. }
  1263. .qiun-rows {
  1264. display: flex;
  1265. flex-direction: row !important;
  1266. }
  1267. .qiun-columns {
  1268. display: flex;
  1269. flex-direction: column !important;
  1270. }
  1271. .qiun-common-mt {
  1272. margin-top: 0upx;
  1273. height: 160upx;
  1274. }
  1275. .qiun-bg-white {
  1276. background: #FFFFFF;
  1277. }
  1278. .qiun-title-bar {
  1279. width: 100%;
  1280. /* padding: 10upx 2%; */
  1281. flex-wrap: nowrap;
  1282. border-radius: 15upx;
  1283. }
  1284. .qiun-title-dot-light {
  1285. width: 92%;
  1286. border-left: 20upx;
  1287. border-left: 10upx solid #206DC3;
  1288. padding-left: 10upx;
  1289. height: 32upx;
  1290. font-family: "PingFang-SC-Bold";
  1291. font-weight: bold;
  1292. margin: auto;
  1293. font-size: 32upx;
  1294. color: #363D44;
  1295. }
  1296. .dis {
  1297. transform: translateY(-13upx);
  1298. font-size: 32upx;
  1299. font-family: "PingFang-SC-Bold";
  1300. color: #363D44;
  1301. }
  1302. .shijian {
  1303. padding-top: 30upx;
  1304. height: 80upx;
  1305. width: 690upx;
  1306. margin: auto;
  1307. box-shadow: 0upx 0upx 10upx #D3D3D3;
  1308. }
  1309. .line {
  1310. background: #ECECEC;
  1311. height: 20upx;
  1312. }
  1313. .qiun-charts {
  1314. width: 690upx;
  1315. height: 550upx;
  1316. padding-top: 50upx;
  1317. background-color: #FFFFFF;
  1318. margin: auto;
  1319. }
  1320. .qiun-charts2 {
  1321. width: 690upx;
  1322. height: 370upx;
  1323. padding-top: 50upx;
  1324. background-color: #FFFFFF;
  1325. margin: auto;
  1326. }
  1327. .charts {
  1328. width: 690upx;
  1329. height: 550upx;
  1330. background-color: #FFFFFF;
  1331. margin: auto;
  1332. }
  1333. .charts2 {
  1334. width: 690upx;
  1335. height: 370upx;
  1336. background-color: #FFFFFF;
  1337. margin: auto;
  1338. }
  1339. .preImg {
  1340. position: absolute;
  1341. right: 30upx;
  1342. width: 71upx;
  1343. height: 57upx;
  1344. }
  1345. .nextImg {
  1346. position: absolute;
  1347. right: 30upx;
  1348. width: 71upx;
  1349. height: 57upx;
  1350. }
  1351. </style>