App.vue 6.6 KB

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