Index.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <q-page class="flex flex-center">
  3. <div style="margin-top: -7%;">
  4. <div class="q-mb-xl" style="color: #4C5875;text-align: center;">
  5. <div style="font-size: 40px;font-weight: bold;letter-spacing: 2px;">
  6. {{ $t('index.GreaterWMS_hello') }}
  7. </div>
  8. </div>
  9. <div class="flex flex-center">
  10. <lottie-web-cimo ref="lottie_web" animationName="warehouse" style="width: 50%; max-width: 80%" />
  11. </div>
  12. </div>
  13. <div style="position: absolute;right: 2%;bottom: 8%;font-family:SourceHanSansCN; font-size: 16px;color: #4C5875;">—— &nbsp;&nbsp; copyright &nbsp; {{ $t('index.developer') }} &nbsp; &nbsp;——</div>
  14. </q-page>
  15. </template>
  16. <script>
  17. import LottieWebCimo from 'components/lottie-web-cimo'
  18. import { database } from '../db/database'
  19. import { Platform, LocalStorage, Screen } from 'quasar'
  20. export default {
  21. name: 'PageIndex',
  22. components: { LottieWebCimo },
  23. data () {
  24. return {
  25. isEnglish: false,
  26. cleardata: [],
  27. height: '',
  28. width: '100%'
  29. }
  30. },
  31. methods: {},
  32. beforeCreate: function () {
  33. },
  34. created: function () {
  35. LocalStorage.set('menulink', '')
  36. if (this.$q.localStorage.getItem('lang') === 'en-us') {
  37. this.isEnglish = true
  38. } else {
  39. this.isEnglish = false
  40. }
  41. },
  42. beforeMount: function () {
  43. },
  44. mounted: function () {
  45. var _this = this
  46. var page = database.getInstance().get().test
  47. page.toArray().then(res => {
  48. if (res.length > 0) {
  49. this.cleardata = []
  50. page.each(result => {
  51. this.cleardata.push(result.id)
  52. })
  53. page.bulkDelete(this.cleardata)
  54. this.cleardata = []
  55. } else {
  56. page.add({
  57. id: 1,
  58. test: 'next'
  59. })
  60. }
  61. })
  62. if (Platform.is.electron) {
  63. _this.height = String(Screen.height) + 'px'
  64. } else {
  65. _this.height = Screen.height + '' + 'px'
  66. }
  67. }
  68. }
  69. </script>