App.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <template>
  2. <div id="app">
  3. <router-view v-if="isRouterAlive"></router-view>
  4. </div>
  5. </template>
  6. <script>
  7. // import { loginconf } from "api/api.js";
  8. export default {
  9. name: "app",
  10. provide() {
  11. //父组件中通过provide来提供变量,在子组件中通过inject来注入变量。
  12. return {
  13. reload: this.reload,
  14. };
  15. },
  16. data() {
  17. return {
  18. isRouterAlive: true, //控制视图是否显示的变量
  19. };
  20. },
  21. methods: {
  22. reload() {
  23. this.isRouterAlive = false; //先关闭,
  24. this.$nextTick(function () {
  25. this.isRouterAlive = true; //再打开
  26. });
  27. },
  28. },
  29. created() {
  30. sessionStorage.removeItem('customSearchBack')
  31. sessionStorage.removeItem('customListBack')
  32. },
  33. };
  34. if (process.env.NODE_ENV === "production") {
  35. window.document.domain = "hzinsights.com";
  36. }
  37. </script>
  38. <style lang="scss">
  39. @import "~scss_vars";
  40. body {
  41. margin: 0px !important;
  42. padding: 0px;
  43. font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
  44. Microsoft YaHei, SimSun, sans-serif;
  45. font-size: 14px;
  46. -webkit-font-smoothing: antialiased;
  47. }
  48. .fr-second-toolbar {
  49. display: none !important;
  50. }
  51. img {
  52. object-fit: contain !important;
  53. image-rendering: -moz-crisp-edges;
  54. image-rendering: -o-crisp-edges;
  55. image-rendering: -webkit-optimize-contrast;
  56. image-rendering: crisp-edges;
  57. -ms-interpolation-mode: nearest-neighbor;
  58. }
  59. #app {
  60. width: 100%;
  61. position: absolute;
  62. top: 0px;
  63. bottom: 0px;
  64. /* left:0; */
  65. }
  66. .el-submenu [class^="fa"] {
  67. vertical-align: baseline;
  68. margin-right: 10px;
  69. }
  70. .el-menu-item [class^="fa"] {
  71. vertical-align: baseline;
  72. margin-right: 10px;
  73. }
  74. .toolbar {
  75. font: 14px "微软雅黑";
  76. color: $color-primary;
  77. background: #fff;
  78. padding: 10px 15px;
  79. margin: 10px 0px;
  80. .el-form-item {
  81. margin-bottom: 10px;
  82. }
  83. }
  84. .headTip {
  85. padding: 10px 15px;
  86. margin: 10px auto;
  87. font: 14px "微软雅黑";
  88. color: #fff;
  89. background: $color-primary;
  90. }
  91. .fade-enter-active,
  92. .fade-leave-active {
  93. transition: all 0.2s ease;
  94. }
  95. .fade-enter,
  96. .fade-leave-active {
  97. opacity: 0;
  98. }
  99. p[data-f-id="pbf"] {
  100. display: none;
  101. }
  102. iframe {
  103. border: none;
  104. }
  105. .el-table .success-row {
  106. background: #eaeaea;
  107. }
  108. .editsty {
  109. font-size: 14px;
  110. color: #409eff;
  111. cursor: pointer;
  112. }
  113. .deletesty {
  114. font-size: 14px;
  115. color: red;
  116. cursor: pointer;
  117. }
  118. .disty {
  119. font-size: 14px;
  120. color: #999;
  121. cursor: not-allowed;
  122. }
  123. .warnsty {
  124. font-size: 14px;
  125. color: #FF9900;
  126. }
  127. .successty {
  128. font-size: 14px;
  129. color: #1BB940;
  130. }
  131. .el-card__header {
  132. border: none !important;
  133. box-shadow: 0 3px 6px rgba(37, 37, 239, 0.1) !important;
  134. }
  135. .el-pagination.is-background .el-pager li {
  136. background: #fff;
  137. // border: 1px solid #8F9BB3;
  138. }
  139. .el-pagination.is-background .el-pager li:not(.disabled).active {
  140. border-color: #409eff;
  141. }
  142. .el-pagination.is-background .btn-next,
  143. .el-pagination.is-background .btn-prev {
  144. // border: 1px solid #8F9BB3;
  145. background: #fff;
  146. }
  147. .clearfix:after {
  148. content: "";
  149. height: 0;
  150. clear: both;
  151. visibility: hidden;
  152. display: block;
  153. zoom: 1;
  154. }
  155. .text_oneLine {
  156. overflow: hidden;
  157. text-overflow: ellipsis;
  158. white-space: nowrap;
  159. }
  160. /* 控制文字显示两行 */
  161. .text_twoLine {
  162. overflow:hidden;
  163. text-overflow:ellipsis;
  164. display:-webkit-box;
  165. -webkit-box-orient:vertical;
  166. -webkit-line-clamp:2;
  167. }
  168. /* .el-popover */
  169. .el-checkbox__input.is-disabled + span.el-checkbox__label {
  170. color: #666 !important;
  171. }
  172. .el-form-item__label {
  173. font-size: 16px;
  174. }
  175. .el-collapse-item__header {
  176. border: none;
  177. font-size: 16px;
  178. color: #333;
  179. font-weight: bold;
  180. position: relative;
  181. margin-bottom: 20px;
  182. }
  183. /* 省市选择禁用统一element样式 */
  184. .distpicker-address-wrapper select:disabled {
  185. cursor: not-allowed;
  186. background: #f5f7fa;
  187. border-color: #e4e7ed;
  188. color: #c0c4cc;
  189. opacity: 1;
  190. }
  191. .distpicker-address-wrapper select {
  192. font-size: 14px !important;
  193. }
  194. /* img preview */
  195. .el-image-viewer__mask {
  196. opacity: 0.8;
  197. }
  198. .el-image-viewer__canvas .el-image-viewer__img {
  199. position: absolute;
  200. // left: 40%;
  201. // top: 40%;
  202. // transform: translate(-50%,-50%);
  203. width: 1200px;
  204. max-height: 100vh;
  205. overflow-y: scroll;
  206. }
  207. .el-image-viewer__next,
  208. .el-image-viewer__prev {
  209. width: 62px;
  210. height: 110px;
  211. border: none;
  212. font-size: 80px;
  213. background: transparent;
  214. color: #858585;
  215. }
  216. .el-image-viewer__close {
  217. width: 66px;
  218. height: 66px;
  219. color: #fff;
  220. font-size: 48px;
  221. }
  222. .el-popconfirm .el-popconfirm__action {
  223. margin-top: 10px;
  224. }
  225. /*修改滚动条样式*/
  226. div::-webkit-scrollbar {
  227. width: 6px;
  228. height: 6px;
  229. }
  230. div::-webkit-scrollbar-track {
  231. background: rgb(239, 239, 239);
  232. border-radius: 2px;
  233. }
  234. div::-webkit-scrollbar-thumb {
  235. background: #ccc;
  236. border-radius: 10px;
  237. }
  238. div::-webkit-scrollbar-thumb:hover {
  239. background: #888;
  240. }
  241. div::-webkit-scrollbar-corner {
  242. background: #666;
  243. }
  244. .customName:hover {
  245. text-decoration: underline;
  246. }
  247. /**/
  248. .el-select-dropdown__wrap {
  249. max-height: 358px !important;
  250. }
  251. /* 日期选择 */
  252. .mx-datepicker {
  253. width: 280px !important;
  254. }
  255. .mx-calendar-content .cell.active {
  256. background-color: #409EFF !important;
  257. }
  258. .mx-datepicker .mx-input {
  259. height: 40px;
  260. border-color: #DCDFE6;
  261. box-shadow: none;
  262. }
  263. .mx-input {
  264. &::placeholder {
  265. color: #bbb;
  266. }
  267. &:hover {
  268. border-color: #C0C4CC !important;
  269. }
  270. }
  271. /*修改滚动条样式*/
  272. ul::-webkit-scrollbar {
  273. width: 6px;
  274. height: 6px;
  275. }
  276. ul::-webkit-scrollbar-track {
  277. background: rgb(239, 239, 239);
  278. border-radius: 2px;
  279. }
  280. ul::-webkit-scrollbar-thumb {
  281. background: #ccc;
  282. border-radius: 10px;
  283. }
  284. ul::-webkit-scrollbar-thumb:hover {
  285. background: #888;
  286. }
  287. ul::-webkit-scrollbar-corner {
  288. background: #666;
  289. }
  290. /* reset 表格头 */
  291. .el-table th.is-leaf {
  292. background:#F0F2F5 !important;
  293. }
  294. .el-table td, .el-table th.is-leaf {
  295. border-color: #DCDFE6 !important;
  296. }
  297. textarea {
  298. font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
  299. }
  300. // .el-dialog {
  301. // display: flex;
  302. // flex-direction: column;
  303. // margin: 0 !important;
  304. // position: absolute;
  305. // top: 50%;
  306. // left: 50%;
  307. // transform: translate(-50%, -50%);
  308. // max-height: calc(100% - 30px);
  309. // max-width: calc(100% - 30px);
  310. // }
  311. // .el-dialog .el-dialog__body {
  312. // flex: 1;
  313. // overflow: auto;
  314. // }
  315. .el-color-predefine {
  316. .el-color-predefine__color-selector {
  317. box-shadow: 0 0 1px 1px #999;
  318. }
  319. }
  320. //图表搜索select
  321. .chart-search-popper {
  322. min-width: 300px !important;
  323. width: auto !important;
  324. }
  325. //数据管理下的输入框
  326. .el-autocomplete-suggestion-data-entry {
  327. width: auto !important;
  328. }
  329. .el-tabs__nav-wrap::after {
  330. background: transparent !important;
  331. }
  332. </style>