inits.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <div class="all">
  3. <div v-show="!appNavJx" class="noData flex-box-v flex-center-center">
  4. <div class="data-all">
  5. <img src="static/images/init.gif" class="appImg" />
  6. <div style="font-size: .31rem;">管理执行难,就用功道云</div>
  7. </div>
  8. </div>
  9. <div v-show="appNavJx" class="jxNav">
  10. <img :src="'static/images/' + navList[navNew].image + '.png'" />
  11. <van-button @click="navNew++" v-if="navNew < 1" type="primary" color="rgb(125 171 255)" block>下一步</van-button>
  12. <van-button @click="navPaths" v-else type="primary" color="rgb(125 171 255)" block>进入</van-button>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. data() {
  19. return {
  20. userInfo: {}, // 绩效接口人员信息
  21. userData: {}, // 7.0系统接口人员信息
  22. newNav: this.plusStoGet('newNav'),
  23. appNavJx: false,
  24. navList: [{ image: 'newNav1' }, { image: 'newNav2' }],
  25. navNew: 0
  26. };
  27. },
  28. created() {
  29. this.$removeCache("addthePlan")
  30. this.$removeCache("actionplanDetails")
  31. this.$removeCache("actionplanList")
  32. },
  33. activated() {
  34. this.newNav = this.plusStoGet('newNav');
  35. this.appNavJx = false;
  36. this.setRouters();
  37. },
  38. methods: {
  39. setRouters() {
  40. if (this.newNav) {
  41. this.$router.replace({ name: 'navigation',query:{index:this.$route.query.index} });
  42. } else {
  43. this.appNavJx = true;
  44. }
  45. },
  46. navPaths() {
  47. this.plusStoSet('newNav', 'true', () => {
  48. this.$router.replace({ name: 'navigation',query:{index:this.$route.query.index} });
  49. });
  50. },
  51. plusStoGet(key) {
  52. if (window.plus) {
  53. return plus.storage.getItem(key);
  54. } else {
  55. return localStorage.getItem(key);
  56. }
  57. },
  58. plusStoSet(key, val, fun = function() {}) {
  59. if (window.plus) {
  60. plus.storage.setItem(key, val);
  61. } else {
  62. localStorage.setItem(key, val);
  63. }
  64. fun();
  65. }
  66. }
  67. };
  68. </script>
  69. <style scoped="scoped" lang="less">
  70. .all {
  71. background-color: #fff;
  72. }
  73. .appImg {
  74. width: 200px;
  75. height: 200px;
  76. }
  77. .noData {
  78. text-align: center;
  79. position: fixed;
  80. left: 0;
  81. top: 0;
  82. right: 0;
  83. bottom: 0;
  84. }
  85. .data-all {
  86. margin-bottom: 10%;
  87. color: #595959;
  88. }
  89. .jxNav {
  90. width: 100%;
  91. height: 100%;
  92. img {
  93. width: 100%;
  94. margin-top: 50px;
  95. }
  96. button {
  97. width: 90%;
  98. margin: auto;
  99. border-radius: 5px;
  100. }
  101. }
  102. </style>