elseStatistics.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!-- 单一统计图表 -->
  2. <template>
  3. <view>
  4. <mainStatistics :pname="pnameData" :equipmentId="equipmentIdData" :adminId="adminIdData" :isForeign="isForeignData"></mainStatistics>
  5. </view>
  6. </template>
  7. <script>
  8. import { mapState, mapActions, mapMutations } from 'vuex';
  9. import {mainStatistics} from '@/pages/Charts/mainStatistics';
  10. export default {
  11. name: 'elseStatistics',
  12. data() {
  13. return {
  14. equipmentId: '',
  15. adminId: '',
  16. pname: '',
  17. isForeign: 0,
  18. }
  19. },
  20. computed: {
  21. ...mapState(['loginUser']),
  22. equipmentIdData:{
  23. get(){
  24. return this.equipmentId;
  25. }
  26. },
  27. adminIdData:{
  28. get(){
  29. return this.adminId;
  30. }
  31. },
  32. pnameData:{
  33. get(){
  34. return this.pname;
  35. }
  36. },
  37. isForeignData:{
  38. get(){
  39. // console.log(this.isForeign);
  40. return this.isForeign;
  41. }
  42. },
  43. },
  44. onShow() {
  45. uni.setNavigationBarTitle({
  46. title: this.$t('mainStatistics.title')
  47. });
  48. },
  49. onLoad(option){
  50. var globalUser = uni.getStorageSync("globalUser");
  51. console.log(globalUser);
  52. this.isForeign = globalUser.ifForeign;
  53. console.log(this.isForeign);
  54. this.equipmentId = option['equipmentId'];
  55. this.adminId = option['adminId'];
  56. this.pname = option['pname'];
  57. uni.setStorageSync('test',0);
  58. },
  59. mounted() {
  60. },
  61. methods: {
  62. }
  63. }
  64. </script>
  65. <style>
  66. </style>