index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <div class="home-styles-box">
  3. <iframe src="http://visual.hczcxx.cn/view/1610205487507001345" v-if="userRoleId == website.role_id"
  4. class="iframe"
  5. ref="iframe">
  6. </iframe>
  7. <iframe src="http://visual.hczcxx.cn/view/1610204839034048514" v-else
  8. class="iframe"
  9. ref="iframe">
  10. </iframe>
  11. <div class="test-btn-view">
  12. <el-button type="primary" hc-btn @click="gotoQuery">开发测试时的进入系统入口</el-button>
  13. </div>
  14. </div>
  15. </template>
  16. <script setup>
  17. import {onMounted, ref, watch} from "vue";
  18. import {useAppStore} from "~src/store";
  19. import router from '~src/router/index';
  20. import website from '~src/config/index'
  21. //变量
  22. const useAppState = useAppStore()
  23. const HomeTheme = ref(useAppState.getHomeTheme);
  24. const userRoleId = ref(useAppState.getRoleId);
  25. const isDEV = ref(import.meta.env.DEV)
  26. //监听
  27. watch(() => [
  28. useAppState.getHomeTheme,
  29. ], ([theme]) => {
  30. HomeTheme.value = theme
  31. })
  32. onMounted(() => {
  33. isDEV.value = import.meta.env.DEV
  34. console.log(import.meta.env.DEV)
  35. })
  36. const gotoQuery=()=>{
  37. router.push({path: '/using/query'});
  38. }
  39. </script>
  40. <style lang="scss" scoped>
  41. @import "../../styles/view/home.scss";
  42. </style>
  43. <style lang="scss">
  44. .home-styles-box {
  45. position: relative;
  46. .test-btn-view {
  47. position: absolute;
  48. left: 45%;
  49. bottom: 25px;
  50. }
  51. }
  52. .home-link a {
  53. color: inherit;
  54. text-decoration: none;
  55. }
  56. .iframe {
  57. width: 100%;
  58. height: 100%;
  59. border: 0;
  60. overflow: hidden;
  61. box-sizing: border-box;
  62. }
  63. .head_div{
  64. width: 100%;
  65. display: flex;
  66. height: 80px;
  67. padding-bottom: 15px;
  68. background-color:rgb(4, 13, 56);
  69. .head_div_btn{
  70. position: absolute;
  71. right: 30px;
  72. width: 197px;
  73. line-height: 42px;
  74. height: 42px;
  75. border-color: rgb(255, 255, 255);
  76. border-width: 2px;
  77. border-style: solid;
  78. color: rgb(255, 255, 255);
  79. border-radius: 29px;
  80. font-size: 16px;
  81. text-align: center;
  82. font-weight: bold;
  83. font-style: normal;
  84. background: rgb(20, 28, 49);
  85. top:20px
  86. }
  87. .right1{
  88. right: 250px;
  89. }
  90. }
  91. @keyframes tada {
  92. from {
  93. transform: scale3d(1, 1, 1)
  94. }
  95. 10%, 20% {
  96. transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg)
  97. }
  98. 30%, 50%, 70%, 90% {
  99. transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)
  100. }
  101. 40%, 60%, 80% {
  102. transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)
  103. }
  104. to {
  105. transform: scale3d(1, 1, 1)
  106. }
  107. }
  108. .runbtn{
  109. cursor: pointer;
  110. }
  111. .runbtn:hover{
  112. animation: tada 1s;
  113. background-color: rgb(15, 64, 245);
  114. }
  115. </style>