Blame view

src/common/mixins.js 1.33 KB
e1644c39   yangzhi   王哥起来屙尿了
1
2
3
  import {
      getToken
  } from '@/utils/auth'
e6276ef2   yangzhi   超哥牛批
4
  import { BASE_URL } from '@/common/config'
ed88fd8e   yangzhi   首页数据对接
5
  import { formatTime } from '@/utils/util'
e1644c39   yangzhi   王哥起来屙尿了
6
7
8
  export default {
      data() {
          return {
e6276ef2   yangzhi   超哥牛批
9
              Authorization: '',
097e5f47   yangzhi   添加了pdf预览插件
10
              BASE_ROOT_DOMAIN: BASE_URL,
e6276ef2   yangzhi   超哥牛批
11
              BASE_URL: BASE_URL
e1644c39   yangzhi   王哥起来屙尿了
12
13
14
15
16
          };
      },
      created() {
          this.Authorization = getToken();
      },
ed88fd8e   yangzhi   首页数据对接
17
18
19
20
21
      filters: {
          dateTimeFilter(val, formatter) {
              return formatTime(val, formatter)
          },
      },
e1644c39   yangzhi   王哥起来屙尿了
22
      methods: {
97c13b13   yangzhi   简历分析样式修改
23
24
25
26
27
          initRem() {
              var html = document.documentElement;
              var w = html.getBoundingClientRect().width;
              var fontSize = w / 1000;
              html.style.fontSize = fontSize + "px";
e1644c39   yangzhi   王哥起来屙尿了
28
  
97c13b13   yangzhi   简历分析样式修改
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
              if (this.echartOption1) {
                  this.echartOption1.textStyle = {
                      fontSize: fontSize * 9
                  };
              }
              if (this.echartOption2) {
                  this.echartOption2.textStyle = {
                      fontSize: fontSize * 9
                  };
              }
              if (this.echartOption3) {
                  this.echartOption3.textStyle = {
                      fontSize: fontSize * 9
                  };
              }
              if (this.resetChart) {
                  setTimeout(() => {
                      this.resetChart()
                  }, 2000)
              }
          },
e1644c39   yangzhi   王哥起来屙尿了
50
51
      }
  }