mainStatistics.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  1. <template>
  2. <view>
  3. <view class="head">
  4. <view class="">
  5. <image class="userFlagimg" src="../../static/img/userFlag.png" mode=""></image>
  6. </view>
  7. <view class="pname">
  8. <font class="wenzi" style="color: #BDD6F3;font-size:28upx"> {{$t('mainStatistics.name')}}: {{pnameData}}</font>
  9. </view>
  10. <view class="company">
  11. <font style="color: #BDD6F3;font-size:28upx">{{$t('mainStatistics.company')}}</font>
  12. </view>
  13. </view>
  14. <view class="ri">
  15. <view class="riShell">
  16. <view class="riImg">
  17. <image style="width: 64upx;height: 64upx;padding-top: 20upx;" :src="$t('mainStatistics.dayImg')"></image>
  18. </view>
  19. <view class="riTitle">
  20. <view style="text-align:left;font-size:28upx;font-family:PingFang-SC-Medium">
  21. <font class="fontLeft" style="color: #596D83;">{{$t('mainStatistics.dayTotalMoney')}}:</font>
  22. <font style="color: #ED341F;">{{dayTotalMoney}}</font>
  23. </view>
  24. <view style="text-align:left;font-size:28upx;font-family:PingFang-SC-Medium">
  25. <font class="fontLeft" style="color: #596D83;">{{$t('mainStatistics.dayTotalNum')}}:</font>
  26. <font style="color: #ED341F;">{{dayTotalNum}}</font>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="riqi">
  31. <view style="text-align:right" class="tody">
  32. <font style="color: #596D83;">{{today}}</font>
  33. </view>
  34. <view style="text-align:right" class="xingqi">
  35. <font style="color: #596D83;">{{week}}</font>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="fourTitle">
  40. <view class="four">
  41. <view class="fourImg">
  42. <image style="width: 54upx;height: 54upx;padding-top: 20upx;" :src="$t('mainStatistics.weekImg')" mode=""></image>
  43. </view>
  44. <view class="fourShell">
  45. <view class="one">
  46. <font class="fontLeft" style="color: #596D83;">{{$t('mainStatistics.weekTotalMoney')}}:</font>
  47. <font style="color: #ED341F;">{{weekTotalMoney}}</font>
  48. </view>
  49. <view class="two">
  50. <font class="fontLeft" style="color: #596D83;">{{$t('mainStatistics.weekTotalNum')}}:</font>
  51. <font style="color: #ED341F;">{{weekTotalNum}}</font>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="four">
  56. <view class="fourImg">
  57. <image style="width: 54upx;height: 54upx;padding-top: 20upx;" :src="$t('mainStatistics.monthImg')" mode=""></image>
  58. </view>
  59. <view class="fourShell">
  60. <view class="one">
  61. <font class="fontLeft" style="color: #596D83;">{{$t('mainStatistics.monthTotalMoney')}}:</font>
  62. <font style="color: #ED341F;">{{monthTotalMoney}}</font>
  63. </view>
  64. <view class="two">
  65. <font class="fontLeft" style="color: #596D83;">{{$t('mainStatistics.monthTotalNum')}}:</font>
  66. <font style="color: #ED341F;">{{monthTotalNum}}</font>
  67. </view>
  68. </view>
  69. </view>
  70. <view class="four">
  71. <view class="fourImg">
  72. <image style="width: 54upx;height: 54upx;padding-top: 20upx;" :src="$t('mainStatistics.yearImg')" mode=""></image>
  73. </view>
  74. <view class="fourShell">
  75. <view class="one">
  76. <font class="fontLeft" style="color: #596D83;">{{$t('mainStatistics.yearTotalMoney')}}:</font>
  77. <font style="color: #ED341F;">{{yearTotalMoney}}</font>
  78. </view>
  79. <view class="two">
  80. <font class="fontLeft" style="color: #596D83;">{{$t('mainStatistics.yearTotalNum')}}:</font>
  81. <font style="color: #ED341F;">{{yearTotalNum}}</font>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="four">
  86. <view class="fourImg">
  87. <image style="width: 54upx;height: 54upx;padding-top: 20upx;" :src="$t('mainStatistics.allImg')" mode=""></image>
  88. </view>
  89. <view class="fourShell">
  90. <view class="one">
  91. <font class="fontLeft" style="color: #596D83;">{{$t('mainStatistics.machineTotalNum')}}:</font>
  92. <font style="color: #ED341F;">{{machineTotalNum}}</font>
  93. </view>
  94. <view class="two">
  95. <font class="fontLeft" style="color: #596D83;">{{$t('mainStatistics.machineUseNum')}}:</font>
  96. <font style="color: #ED341F;">{{machineUseNum}}</font>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. <view class="qiun-columns">
  102. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  103. <view class="qiun-title-dot-light">
  104. <view class="dis">{{$t('mainStatistics.day')}}</view>
  105. </view>
  106. <view class="shijian" style="text-align: center;position: relative;">
  107. <image @click="pre('day')" class="preImg" src="/static/img/leftTriangle.png"></image>
  108. <span>{{startDate1}}</span>
  109. <image @click="next('day')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  110. </view>
  111. </view>
  112. <view class="qiun-charts" style="background-color: #FFFFFF;">
  113. <canvas canvas-id="canvaColumn1" id="canvaColumn1" class="charts" disable-scroll=true @touchstart="touchLine1"
  114. @touchmove="moveLine1" @touchend="touchEndLine1" 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">{{$t('mainStatistics.week')}}</view>
  122. </view>
  123. <view class="shijian" style="text-align: center;position: relative;">
  124. <image @click="pre('week')" class="preImg" src="/static/img/leftTriangle.png"></image>
  125. <span>{{startDate2}} -- {{endDate2}}</span>
  126. <image @click="next('week')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  127. </view>
  128. </view>
  129. <view class="qiun-charts" style="background-color: #FFFFFF;">
  130. <canvas canvas-id="canvaColumn2" id="canvaColumn2" class="charts" disable-scroll=true @touchstart="touchLine2"
  131. @touchmove="moveLine2" @touchend="touchEndLine2" style="background-color: #FFFFFF;"></canvas>
  132. </view>
  133. </view>
  134. <view class="line"></view>
  135. <view class="qiun-columns">
  136. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  137. <view class="qiun-title-dot-light">
  138. <view class="dis">{{$t('mainStatistics.month')}}</view>
  139. </view>
  140. <view class="shijian" style="text-align: center;position: relative;">
  141. <image @click="pre('month')" class="preImg" src="/static/img/leftTriangle.png"></image>
  142. <span>{{startDate3}} -- {{endDate3}}</span>
  143. <image @click="next('month')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  144. </view>
  145. </view>
  146. <view class="qiun-charts" style="background-color: #FFFFFF;">
  147. <canvas canvas-id="canvaColumn3" id="canvaColumn3" class="charts" disable-scroll=true @touchstart="touchLine3"
  148. @touchmove="moveLine3" @touchend="touchEndLine3" style="background-color: #FFFFFF;"></canvas>
  149. </view>
  150. </view>
  151. <view class="line"></view>
  152. <view class="qiun-columns">
  153. <view class="qiun-bg-white qiun-title-bar qiun-common-mt">
  154. <view class="qiun-title-dot-light">
  155. <view class="dis">{{$t('mainStatistics.year')}}</view>
  156. </view>
  157. <view class="shijian" style="text-align: center;position: relative;">
  158. <image @click="pre('year')" class="preImg" src="/static/img/leftTriangle.png"></image>
  159. <span>{{startDate4}} -- {{endDate4}}</span>
  160. <image @click="next('year')" class="nextImg" src="/static/img/rightTriangle.png"></image>
  161. </view>
  162. </view>
  163. <view class="qiun-charts" style="background-color: #FFFFFF;">
  164. <canvas canvas-id="canvaColumn4" id="canvaColumn4" class="charts" disable-scroll=true @touchstart="touchLine4"
  165. @touchmove="moveLine4" @touchend="touchEndLine4" style="background-color: #FFFFFF;"></canvas>
  166. </view>
  167. </view>
  168. </view>
  169. </template>
  170. <script>
  171. import {
  172. mapState,
  173. mapActions,
  174. mapMutations
  175. } from 'vuex';
  176. import uCharts from '@/components/u-charts/u-charts.js';
  177. import {
  178. dateUtils
  179. } from '@/common/util.js';
  180. var _self;
  181. var canvaColumn1 = null;
  182. var canvaColumn2 = null;
  183. var canvaColumn3 = null;
  184. var canvaColumn4 = null;
  185. export default {
  186. name: 'mainStatistics',
  187. props: {
  188. equipmentId: '',
  189. adminId: '',
  190. pname: '',
  191. },
  192. data() {
  193. return {
  194. machineTotalNum: 0,
  195. machineUseNum: 0,
  196. dayTotalMoney: 0,
  197. dayTotalNum: 0,
  198. weekTotalMoney: 0,
  199. weekTotalNum: 0,
  200. monthTotalMoney: 0,
  201. monthTotalNum: 0,
  202. yearTotalMoney: 0,
  203. yearTotalNum: 0,
  204. cWidth: '',
  205. cHeight: '',
  206. pixelRatio: 1,
  207. startDate1: '',
  208. startDate2: '',
  209. endDate2: '',
  210. startDate3: '',
  211. endDate3: '',
  212. startDate4: '',
  213. endDate4: '',
  214. today: '',
  215. week: ''
  216. }
  217. },
  218. computed: {
  219. ...mapState(['loginUser']),
  220. pnameData: {
  221. get() {
  222. return this.pname;
  223. }
  224. },
  225. },
  226. onShow() {
  227. uni.setNavigationBarTitle({
  228. title: this.$t('mainStatistics.title')
  229. });
  230. uni.setTabBarItem({
  231. index: 0,
  232. text: this.$t('tabs.tab1')
  233. });
  234. // console.log("onShow");
  235. var test = uni.getStorageSync('test');
  236. var globalUser = uni.getStorageSync("globalUser");
  237. if (globalUser.toString().length > 1) {
  238. //判断是不是初次登陆
  239. if (test == 2) {
  240. this.init();
  241. }
  242. }
  243. var id = this.adminId;
  244. this.day();
  245. },
  246. mounted() {
  247. var token = uni.getStorageSync("token");
  248. if (token.toString().length > 1) {
  249. this.init();
  250. }else{
  251. uni.reLaunch({
  252. url: '../Login/Login',
  253. });
  254. }
  255. this.day();
  256. },
  257. methods: {
  258. ...mapActions('chart', ['getStatistics', 'getMainStatistics', 'getMachineNum']),
  259. async init() {
  260. if (!this.pname) {
  261. this.pname = this.loginUser.name;
  262. }
  263. _self = this;
  264. //图表中图
  265. this.cWidth = uni.upx2px(690);
  266. this.cHeight = uni.upx2px(370);
  267. await this.getMainStatisticsData();
  268. await this.initDateRang(new Date(), 'day');
  269. await this.initDateRang(new Date(), 'week');
  270. await this.initDateRang(new Date(), 'month');
  271. await this.initDateRang(new Date(), 'year');
  272. //初次登陆跳转后,把test变成2
  273. uni.setStorageSync('test', '2');
  274. },
  275. day() {
  276. var date = new Date();
  277. // var daystr = dateUtils.formateDate(date, 'yyyy年MM月dd日');
  278. var daystr = dateUtils.formateDate(date, 'yyyy-MM-dd');
  279. this.today = daystr;
  280. // var str= '星期'+'日一二三四五六'.charAt(date.getDay());
  281. this.week = this.$t('mainStatistics.week' + date.getDay());
  282. },
  283. initDateRang(day, chartType) {
  284. const daystr = dateUtils.formateDate(day, 'yyyy/MM/dd');
  285. if (chartType === 'day') {
  286. this.startDate1 = dateUtils.formateDate(day, 'yyyy/MM/dd');
  287. }
  288. if (chartType === 'week') {
  289. this.startDate2 = dateUtils.formateDate(dateUtils.getFirstDayOfWeek(day), 'yyyy/MM/dd');
  290. this.endDate2 = dateUtils.formateDate(dateUtils.getLastDayOfWeek(day), 'yyyy/MM/dd');
  291. }
  292. if (chartType === 'month') {
  293. this.startDate3 = dateUtils.formateDate(dateUtils.getCurrentMonFirstDate(day), 'yyyy/MM/dd');
  294. this.endDate3 = dateUtils.formateDate(dateUtils.getCurrentMonLastDate(day), 'yyyy/MM/dd');
  295. }
  296. if (chartType === 'year') {
  297. this.startDate4 = dateUtils.formateDate(dateUtils.getCurrentYearFirstDate(day), 'yyyy/MM/dd');
  298. this.endDate4 = dateUtils.formateDate(dateUtils.getCurrentYearLastDate(day), 'yyyy/MM/dd');
  299. }
  300. return this.getStatisticsData(chartType);
  301. },
  302. /**上一个 */
  303. pre(chartType) {
  304. let day;
  305. if (chartType === 'day') { // 日
  306. day = new Date(this.startDate1);
  307. day.setDate(day.getDate() - 1);
  308. }
  309. if (chartType === 'week') { // 周
  310. day = new Date(this.startDate2);
  311. day.setDate(day.getDate() - 7);
  312. }
  313. if (chartType === 'month') { // 月
  314. day = new Date(this.startDate3);
  315. day.setMonth(day.getMonth() - 1);
  316. }
  317. if (chartType === 'year') { // 年
  318. day = new Date(this.startDate4);
  319. day.setFullYear(day.getFullYear() - 1);
  320. }
  321. this.initDateRang(day, chartType);
  322. },
  323. /**下一个 */
  324. next(chartType) {
  325. let day;
  326. if (chartType === 'day') { // 日
  327. day = new Date(this.startDate1);
  328. day.setDate(day.getDate() + 1);
  329. }
  330. if (chartType === 'week') { // 周
  331. day = new Date(this.startDate2);
  332. day.setDate(day.getDate() + 7);
  333. }
  334. if (chartType === 'month') { // 月
  335. day = new Date(this.startDate3);
  336. day.setMonth(day.getMonth() + 1);
  337. }
  338. if (chartType === 'year') { // 年
  339. day = new Date(this.startDate4);
  340. day.setFullYear(day.getFullYear() + 1);
  341. }
  342. this.initDateRang(day, chartType);
  343. },
  344. getStatisticsData(chartType) {
  345. const param = {
  346. 'chartType': chartType
  347. };
  348. if (chartType == 'day') {
  349. param['startDate'] = this.startDate1;
  350. param['endDate'] = this.startDate1;
  351. }
  352. if (chartType == 'week') {
  353. param['startDate'] = this.startDate2;
  354. param['endDate'] = this.endDate2;
  355. }
  356. if (chartType == 'month') {
  357. param['startDate'] = this.startDate3;
  358. param['endDate'] = this.endDate3;
  359. }
  360. if (chartType == 'year') {
  361. param['startDate'] = this.startDate4;
  362. param['endDate'] = this.endDate4;
  363. }
  364. if (this.adminId) { // 子组件,则拿传过来的参
  365. param['adminId'] = this.adminId;
  366. } else if ('admin' !== this.loginUser['username']) { //否则为主页,拿登录用户
  367. param['adminId'] = this.loginUser['id'];
  368. }
  369. var globalUser = uni.getStorageSync("globalUser");
  370. if (globalUser.id != 1) {
  371. if (param.adminId == null || param.adminId == undefined) {
  372. param['adminId'] = globalUser.id;
  373. }
  374. }
  375. if (this.equipmentId) {
  376. param['equipmentId'] = this.equipmentId;
  377. }
  378. return this.getStatistics(param)
  379. .then(data => {
  380. uni.stopPullDownRefresh();
  381. if (param['chartType'] == 'day') {
  382. canvaColumn1 = this.initChart('canvaColumn1', data);
  383. }
  384. if (param['chartType'] == 'week') {
  385. canvaColumn2 = this.initChart('canvaColumn2', data);
  386. }
  387. if (param['chartType'] == 'month') {
  388. canvaColumn3 = this.initChart('canvaColumn3', data);
  389. }
  390. if (param['chartType'] == 'year') {
  391. canvaColumn4 = this.initChart('canvaColumn4', data);
  392. }
  393. }, _ => {
  394. uni.stopPullDownRefresh();
  395. if (param['chartType'] == 'day') {
  396. canvaColumn1 = this.initChart('canvaColumn1', {
  397. categories: ['暂无数据'],
  398. series: [{
  399. name: '销售个数',
  400. data: [0]
  401. }]
  402. });
  403. }
  404. if (param['chartType'] == 'week') {
  405. canvaColumn2 = this.initChart('canvaColumn2', {
  406. categories: ['暂无数据'],
  407. series: [{
  408. name: '销售个数',
  409. data: [0]
  410. }]
  411. });
  412. }
  413. if (param['chartType'] == 'month') {
  414. canvaColumn3 = this.initChart('canvaColumn3', {
  415. categories: ['暂无数据'],
  416. series: [{
  417. name: '销售个数',
  418. data: [0]
  419. }]
  420. });
  421. }
  422. if (param['chartType'] == 'year') {
  423. canvaColumn4 = this.initChart('canvaColumn4', {
  424. categories: ['暂无数据'],
  425. series: [{
  426. name: '销售个数',
  427. data: [0]
  428. }]
  429. });
  430. }
  431. });
  432. },
  433. initChart(canvasId, chartData) {
  434. if (this.$t('lang') != 'zh') {
  435. chartData.categories = chartData.categories.map(e => {
  436. if (e.indexOf('点') >= 0) {
  437. return e.replace('点', this.$t('mainStatistics.oclock'));
  438. }
  439. if (e.indexOf('周') >= 0) {
  440. const weekNum = e.substring(e.length - 1) == '日' ? '0' : e.substring(e.length - 1);
  441. return this.$t('mainStatistics.week' + weekNum);
  442. }
  443. if (e.indexOf('月') >= 0) {
  444. var res = e.toString();
  445. if (res.length > 3) {
  446. return e.replace('月', this.$t('mainStatistics.mon'));
  447. } else {
  448. return e.replace('月', this.$t('mainStatistics.y'));
  449. }
  450. }
  451. return e;
  452. });
  453. chartData.series = chartData.series.map(e => {
  454. if (e['name'] == '销售个数') {
  455. e['name'] = this.$t('mainStatistics.saleNum');
  456. }
  457. if (e['name'] == '销售额') {
  458. e['name'] = this.$t('mainStatistics.saleroom');
  459. }
  460. return e;
  461. });
  462. }
  463. return new uCharts({
  464. $this: _self,
  465. canvasId: canvasId,
  466. enableScroll: true,
  467. type: 'column',
  468. legend: true,
  469. fontSize: 10,
  470. background: '#FFFFFF', //y轴颜色
  471. pixelRatio: 1,
  472. animation: true,
  473. categories: chartData.categories,
  474. series: chartData.series,
  475. xAxis: {
  476. type: 'grid',
  477. gridType: 'dash',
  478. itemCount: 5, //x轴单屏显示数据的数量,默认为5个
  479. scrollShow: true, //新增是否显示滚动条,默认false
  480. scrollAlign: 'left', //滚动条初始位置
  481. scrollBackgroundColor: '#F7F7FF', //默认为 #EFEBEF 滚动条颜色底色
  482. scrollColor: '#DEE7F7', //默认为 #A6A6A6 滚动条颜色
  483. disableGrid: true,
  484. },
  485. yAxis: {
  486. type: 'grid',
  487. gridType: 'soild',
  488. // disabled:true
  489. // disableGrid:true,
  490. },
  491. dataLabel: true,
  492. width: _self.cWidth * _self.pixelRatio,
  493. height: _self.cHeight * _self.pixelRatio,
  494. extra: {
  495. column: {
  496. // width: _self.cWidth*_self.pixelRatio*0.45/chartData.categories.length
  497. width: 18
  498. }
  499. }
  500. });
  501. },
  502. getMainStatisticsData() {
  503. const param = {};
  504. if (this.adminId) { // 子组件,则拿传过来的参
  505. param['adminId'] = this.adminId;
  506. } else if ('admin' !== this.loginUser['username']) { //否则为主页,拿登录用户
  507. param['adminId'] = this.loginUser['id'];
  508. }
  509. var globalUser = uni.getStorageSync("globalUser");
  510. if (globalUser.id != 1) {
  511. if (param.adminId == null || param.adminId == undefined) {
  512. param['adminId'] = globalUser.id;
  513. }
  514. }
  515. if (this.equipmentId) {
  516. param['equipmentId'] = this.equipmentId;
  517. }
  518. // console.log('getMainStatisticsData:{}', param);
  519. var adminId = param.adminId;
  520. var equipmentId = this.equipmentId;
  521. var serverurl = this.serverurl;
  522. var token = uni.getStorageSync("token");
  523. uni.request({
  524. url: serverurl + '/TEquipment/getMachineNum',
  525. data: {
  526. "adminId": adminId,
  527. "equipmentId": equipmentId
  528. },
  529. method: "POST",
  530. header:{'token':token},
  531. success: (res) => {
  532. var list = res.data.data;
  533. this.machineTotalNum = list[0];
  534. this.machineUseNum = list[1];
  535. }
  536. });
  537. return this.getMainStatistics(param)
  538. .then(data => {
  539. for (let bean of data) {
  540. if (bean['categorie'] === 'day') {
  541. this.dayTotalMoney = bean['salePrice'];
  542. this.dayTotalNum = bean['saleNum'];
  543. }
  544. if (bean['categorie'] === 'week') {
  545. this.weekTotalMoney = bean['salePrice'];
  546. this.weekTotalNum = bean['saleNum'];
  547. }
  548. if (bean['categorie'] === 'month') {
  549. this.monthTotalMoney = bean['salePrice'];
  550. this.monthTotalNum = bean['saleNum'];
  551. }
  552. if (bean['categorie'] === 'year') {
  553. this.yearTotalMoney = bean['salePrice'];
  554. this.yearTotalNum = bean['saleNum'];
  555. }
  556. }
  557. uni.stopPullDownRefresh();
  558. }, _ => void uni.stopPullDownRefresh());
  559. },
  560. touchLine1(e) {
  561. if (canvaColumn1) {
  562. canvaColumn1.scrollStart(e);
  563. }
  564. },
  565. moveLine1(e) {
  566. if (canvaColumn1) {
  567. canvaColumn1.scroll(e);
  568. }
  569. },
  570. touchEndLine1(e) {
  571. if (canvaColumn1) {
  572. canvaColumn1.scrollEnd(e);
  573. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  574. canvaColumn1.showToolTip(e, {
  575. format: function(item, category) {
  576. return category + ' ' + item.name + ':' + item.data
  577. }
  578. });
  579. }
  580. },
  581. touchLine2(e) {
  582. if (canvaColumn2) {
  583. canvaColumn2.scrollStart(e);
  584. }
  585. },
  586. moveLine2(e) {
  587. if (canvaColumn2) {
  588. canvaColumn2.scroll(e);
  589. }
  590. },
  591. touchEndLine2(e) {
  592. if (canvaColumn2) {
  593. canvaColumn2.scrollEnd(e);
  594. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  595. canvaColumn2.showToolTip(e, {
  596. format: function(item, category) {
  597. return category + ' ' + item.name + ':' + item.data
  598. }
  599. });
  600. }
  601. },
  602. touchLine3(e) {
  603. if (canvaColumn3) {
  604. canvaColumn3.scrollStart(e);
  605. }
  606. },
  607. moveLine3(e) {
  608. if (canvaColumn3) {
  609. canvaColumn3.scroll(e);
  610. }
  611. },
  612. touchEndLine3(e) {
  613. if (canvaColumn3) {
  614. canvaColumn3.scrollEnd(e);
  615. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  616. canvaColumn3.showToolTip(e, {
  617. format: function(item, category) {
  618. return category + ' ' + item.name + ':' + item.data
  619. }
  620. });
  621. }
  622. },
  623. touchLine4(e) {
  624. if (canvaColumn4) {
  625. canvaColumn4.scrollStart(e);
  626. }
  627. },
  628. moveLine4(e) {
  629. if (canvaColumn4) {
  630. canvaColumn4.scroll(e);
  631. }
  632. },
  633. touchEndLine4(e) {
  634. if (canvaColumn4) {
  635. canvaColumn4.scrollEnd(e);
  636. //下面是toolTip事件,如果滚动后不需要显示,可不填写
  637. canvaColumn4.showToolTip(e, {
  638. format: function(item, category) {
  639. return category + ' ' + item.name + ':' + item.data
  640. }
  641. });
  642. }
  643. },
  644. }
  645. }
  646. </script>
  647. <style>
  648. page {
  649. /* background: #F2F2F2; */
  650. background: #FFFFFF;
  651. width: 750upx;
  652. overflow-x: hidden;
  653. }
  654. .head {
  655. display: flex;
  656. flex-direction: row;
  657. background: #206DC3;
  658. width: 750upx;
  659. height: 180upx;
  660. }
  661. .company {
  662. width: 48%;
  663. text-align: right;
  664. }
  665. .pname {
  666. display: flex;
  667. flex-direction: row;
  668. width: 40%;
  669. }
  670. .userFlagimg {
  671. padding-left: 30upx;
  672. padding-top: 10upx;
  673. width: 26upx;
  674. height: 28upx;
  675. }
  676. .wenzi {
  677. padding-left: 5upx;
  678. /* text-align:right; */
  679. white-space: nowrap;
  680. overflow: hidden;
  681. /* text-overflow: ellipsis; */
  682. }
  683. .ri {
  684. width: 690upx;
  685. height: 180upx;
  686. background: #FFFFFF;
  687. border-radius: 15upx;
  688. /* 上移 */
  689. transform: translateY(-90upx);
  690. text-align: center;
  691. margin: auto;
  692. display: flex;
  693. flex-direction: row;
  694. /* 阴影 */
  695. box-shadow: 0upx -1upx 20upx #D3D3D3;
  696. /* box-shadow:0px 0px 10px 5px #aaa; */
  697. }
  698. .riShell {
  699. display: flex;
  700. flex-direction: row;
  701. margin: auto;
  702. }
  703. .riTitle {
  704. display: flex;
  705. flex-direction: column;
  706. margin: auto;
  707. }
  708. .riqi {
  709. display: flex;
  710. flex-direction: column;
  711. margin: auto;
  712. }
  713. .fourTitle {
  714. width: 690upx;
  715. height: 294upx;
  716. display: flex;
  717. flex-direction: row;
  718. flex-wrap: wrap;
  719. background: #FFFFFF;
  720. box-shadow: 0upx 0upx 20upx #D3D3D3;
  721. margin: auto;
  722. border-radius: 15upx;
  723. transform: translateY(-60upx);
  724. }
  725. .four {
  726. display: flex;
  727. flex-direction: row;
  728. margin: auto;
  729. width: 48%;
  730. }
  731. .fourImg {
  732. width: 54upx;
  733. height: 54upx;
  734. }
  735. .qiun-padding {
  736. padding: 2%;
  737. width: 96%;
  738. }
  739. .qiun-wrap {
  740. display: flex;
  741. flex-wrap: wrap;
  742. }
  743. .qiun-rows {
  744. display: flex;
  745. flex-direction: row !important;
  746. }
  747. .qiun-columns {
  748. display: flex;
  749. flex-direction: column !important;
  750. }
  751. .qiun-common-mt {
  752. margin-top: 0upx;
  753. height: 160upx;
  754. }
  755. .qiun-bg-white {
  756. background: #FFFFFF;
  757. }
  758. .qiun-title-bar {
  759. width: 100%;
  760. /* padding: 10upx 2%; */
  761. flex-wrap: nowrap;
  762. border-radius: 15upx;
  763. }
  764. .qiun-title-dot-light {
  765. width: 92%;
  766. border-left: 20upx;
  767. border-left: 10upx solid #206DC3;
  768. padding-left: 10upx;
  769. height: 32upx;
  770. /* padding-bottom: 40upx; */
  771. font-family: "PingFang-SC-Bold";
  772. font-weight: bold;
  773. margin: auto;
  774. font-size: 32upx;
  775. color: #363D44;
  776. transform: translateY(20upx);
  777. }
  778. .dis {
  779. transform: translateY(-13upx);
  780. font-size: 32upx;
  781. font-family: "PingFang-SC-Bold";
  782. color: #363D44;
  783. }
  784. .shijian {
  785. transform: translateY(40upx);
  786. padding-top: 30upx;
  787. height: 80upx;
  788. width: 690upx;
  789. margin: auto;
  790. box-shadow: 0upx 0upx 10upx #D3D3D3;
  791. }
  792. .line {
  793. background: #ECECEC;
  794. height: 20upx;
  795. }
  796. .qiun-charts {
  797. width: 690upx;
  798. height: 370upx;
  799. padding-top: 50upx;
  800. background-color: #FFFFFF;
  801. margin: auto;
  802. }
  803. .charts {
  804. width: 690upx;
  805. height: 370upx;
  806. background-color: #FFFFFF;
  807. margin: auto;
  808. }
  809. .preImg {
  810. position: absolute;
  811. left: 30upx;
  812. width: 71upx;
  813. height: 57upx;
  814. }
  815. .nextImg {
  816. position: absolute;
  817. right: 30upx;
  818. width: 71upx;
  819. height: 57upx;
  820. }
  821. .fontLeft {
  822. margin-right: 6upx;
  823. }
  824. </style>