App.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <div
  3. id="app"
  4. :style="{'transform':`scale(${scalesNum}) translate(0%,-50%)`,
  5. '-webkit-transform':`scale(${scalesNum}) translate(0%,-50%)`,
  6. '-moz-transform':`scale(${scalesNum}) translate(-50%,-50%)`,
  7. '-o-transform':`scale(${scalesNum}) translate(-50%,-50%)`,
  8. '-ms-transform':`scale(${scalesNum}) translate(-50%,-50%)`}">
  9. <router-view />
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. name: "App",
  15. data() {
  16. return {
  17. scalesNum: 1, // 缩放比例:1
  18. };
  19. },
  20. mounted() {
  21. // 计算缩放比例
  22. this.resize_window();
  23. window.addEventListener("resize", () => {
  24. this.resize_window();
  25. });
  26. },
  27. methods: {
  28. resize_window() {
  29. // 因为设计图是带3840*1080的,但是浏览器本身带顶部工具栏,所以缩放到时候稍微更小一点,这样不会有滚动条,这个值可以选择更大些,比如2300,这样左右两边会有空白
  30. let myWidth = document.documentElement.clientWidth;
  31. let myHeight = document.documentElement.clientHeight;
  32. if (myHeight / 3840 !== 0 && myWidth / 3840 / (myHeight / 1080) >= 1) {
  33. this.scalesNum = myHeight / 1080;
  34. } else {
  35. this.scalesNum = myWidth / 3840;
  36. }
  37. },
  38. },
  39. metaInfo() {
  40. return {
  41. title:
  42. this.$store.state.settings.dynamicTitle &&
  43. this.$store.state.settings.title,
  44. titleTemplate: (title) => {
  45. return title
  46. ? `${title} - ${process.env.VUE_APP_TITLE}`
  47. : process.env.VUE_APP_TITLE;
  48. },
  49. };
  50. },
  51. };
  52. </script>
  53. <style lang="scss">
  54. @import "@/assets/styles/common.scss";
  55. #app{
  56. margin: auto !important;
  57. padding: 0;
  58. transform-origin: 0 0;
  59. position:relative;
  60. width:3840px;
  61. height: 1080px;
  62. top:50%;
  63. overflow: hidden;
  64. }
  65. .app-container {
  66. padding: 0 !important;
  67. width: 100%;
  68. height: 100%;
  69. background-color: $bodyBackGround;
  70. }
  71. .el-input__inner {
  72. height: 28px !important;
  73. line-height: 28px !important;
  74. }
  75. .el-input-number--small {
  76. height: 26px !important;
  77. line-height: 26px !important;
  78. }
  79. .el-textarea .el-input__count,
  80. .el-input .el-input__count .el-input__count-inner {
  81. font-size: 8px;
  82. height: 12px;
  83. line-height: 12px;
  84. background: transparent !important;
  85. }
  86. .el-input-number--medium {
  87. width: auto;
  88. line-height: 28px;
  89. }
  90. ::-webkit-scrollbar {
  91. width: 0px;
  92. }
  93. ::-webkit-scrollbar-thumb {
  94. background-color: #b6b6b6;
  95. }
  96. /* el-table 滚动条样式 */
  97. .el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar {
  98. width: 0px;
  99. }
  100. .el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-thumb {
  101. border-radius: 0px;
  102. background: rgba(0, 0, 0, 0.2);
  103. }
  104. .el-table--scrollable-y .el-table__body-wrapper::-webkit-scrollbar-track {
  105. border-radius: 0px;
  106. background: rgba(0, 0, 0, 0.1);
  107. }
  108. .el-table__header-wrapper .has-gutter th:nth-last-child(2) {
  109. border-right: 0;
  110. }
  111. .handle {
  112. color: $handle;
  113. }
  114. .handle2 {
  115. color: $green;
  116. }
  117. .untreated {
  118. color: $white;
  119. }
  120. .untreated2 {
  121. color: $red;
  122. }
  123. * {
  124. -webkit-text-size-adjust: auto !important;
  125. }
  126. .el-table::before {
  127. height: 0 !important;
  128. }
  129. .el-table,
  130. .el-table__expanded-cell {
  131. background-color: $modularBackGround !important;
  132. border: 0 !important;
  133. }
  134. /* 表格内背景颜色 */
  135. .el-table th,
  136. .el-table tr,
  137. .el-table td {
  138. background-color: transparent !important;
  139. border: 0 !important;
  140. font-size: 16px;
  141. color: $white;
  142. height: 40px;
  143. line-height: 20px;
  144. overflow: hidden;
  145. padding:0;
  146. cursor: pointer;
  147. }
  148. .el-table th > .cell {
  149. font-size: 16px;
  150. }
  151. /*去除底边框*/
  152. .el-table td.el-table__cell {
  153. border: 0;
  154. }
  155. .el-table th.el-table__cell.is-leaf {
  156. border: 0;
  157. }
  158. .el-table--enable-row-hover .el-table__body tr:hover > td {
  159. background-color: $tableHover !important;
  160. color:#FFC46D;
  161. }
  162. .el-table thead {
  163. background-color: $tableHover !important;
  164. }
  165. .el-table th > .cell{
  166. color: #A1A8B3;
  167. }
  168. .el-table__empty-text {
  169. color: #fff !important;
  170. font-size: 16px;
  171. margin-top: 10px;
  172. }
  173. .el-table__body tr.current-row > td {
  174. background-color: $tableHover !important;
  175. }
  176. .el-table--medium th, .el-table--medium td{
  177. padding:0 !important;
  178. color:$white2;
  179. }
  180. tr .cell{
  181. padding-left:40px !important;
  182. text-align: left;
  183. }
  184. .el-loading-mask{
  185. background-color:transparent !important;
  186. }
  187. </style>