main.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. import Vue from 'vue'
  2. import axios from 'axios'
  3. import App from './App'
  4. import router from './router'
  5. import store from './store'
  6. import ElementUI from 'element-ui'
  7. import 'element-ui/lib/theme-chalk/index.css'
  8. import "video.js/dist/video-js.css"
  9. import Chat from 'jwchat';
  10. import http from '../utils/http'
  11. import md5 from 'js-md5';
  12. import TestResults from './components/TestResults'
  13. import StackedLine from './components/StackedLine'
  14. import TopPage from './components/TopPage'
  15. import TopDes from './components/TopDes.vue'
  16. import FootDes from './components/FootDes.vue'
  17. import '../utils/componetSubRegister.js'
  18. import '../utils/public.css'
  19. Vue.prototype.$md5 = md5;
  20. Vue.use(Chat)
  21. // import echarts from 'echarts/lib/echarts'
  22. // Vue.prototype.$echarts = echarts
  23. // import echarts from 'echarts'
  24. // Vue.prototype.$echarts = echarts
  25. if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
  26. // Vue.http = Vue.prototype.$http = axios
  27. Vue.prototype.$http = http;
  28. Vue.config.productionTip = false
  29. Vue.use(ElementUI)
  30. Vue.component("TestResults", TestResults)
  31. Vue.component("StackedLine", StackedLine)
  32. Vue.component("TopPage", TopPage)
  33. Vue.component("TopDes",TopDes)
  34. Vue.component('FootDes',FootDes)
  35. // Vue.use(TestResults)
  36. // Vue.use(StackedLine)
  37. /* eslint-disable no-new */
  38. new Vue({
  39. components: {
  40. App
  41. },
  42. data: function () {
  43. return {
  44. smartNum:0,
  45. topPageFlag:false,
  46. //登录类型设置
  47. // 设置全局变量 视频状态 加速度 状态, 脉搏状态 皮电状态
  48. statusFlag: {
  49. videoFlag: false,
  50. accelerationFlag: false,
  51. pulseFlag: false,
  52. dermatoelectric: false
  53. },
  54. acceleration: {
  55. x: [{
  56. jump: '',
  57. dataX: 0
  58. }],
  59. y: [{
  60. jump: '',
  61. dataY: 0
  62. }],
  63. z: [{
  64. jump: '',
  65. dataZ: 0
  66. }],
  67. pluse: [{
  68. jump: '',
  69. dataPluse: 0
  70. }]
  71. },
  72. flagAR: false,
  73. recordFlagGl: '记录',
  74. jumpFlag: false,
  75. timeCount: 0,
  76. // 全局变量得到脉搏的全部数据
  77. pluseAll: [],
  78. // 加一个全局字段保存hrv值得属性
  79. // HRV
  80. performanceData: '',
  81. // 全局变量
  82. reactionTime: 0,
  83. // 判断数据查看是否显示
  84. dataShowFlag: false,
  85. // 数据库ip
  86. // host:'49.232.26.44',
  87. host: 'localhost',
  88. // port:"3306",
  89. port: '54027',
  90. // 数据库用户名
  91. user: 'root',
  92. // 数据库密码
  93. password: 'Mysql@.2020',
  94. // 数据库名
  95. // database:"test_psychological2"
  96. database: 'psychological2_army',
  97. // 人员姓名
  98. name: '',
  99. // 人员编号
  100. num: '',
  101. // 人员性别
  102. sex: '1',
  103. //情绪量表的值
  104. mood: {
  105. testOne: '',
  106. testTwo: '',
  107. testThree: '',
  108. testFour: '',
  109. testFive: ''
  110. }
  111. }
  112. },
  113. router,
  114. store,
  115. template: '<App/>'
  116. // eslint-disable-next-line eol-last
  117. }).$mount('#app')