<template>
  <div id="app">
    <router-view v-if="isRouterAlive"></router-view>
  </div>
</template>

<script>
// import { loginconf } from "api/api.js";
export default {
  name: "app",
  provide() {
    //父组件中通过provide来提供变量，在子组件中通过inject来注入变量。
    return {
      reload: this.reload,
    };
  },
  data() {
    return {
      isRouterAlive: true, //控制视图是否显示的变量
    };
  },
  methods: {
    reload() {
      this.isRouterAlive = false; //先关闭，
      this.$nextTick(function () {
        this.isRouterAlive = true; //再打开
      });
    },
  },
};
</script>

<style lang="scss">
@import "~scss_global";
body {
  margin: 0px !important;
  padding: 0px;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
    Microsoft YaHei, SimSun, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.fr-second-toolbar {
  display: none !important;
}
img {
  object-fit: contain !important;
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}
#app {
  position: absolute;
  top: 0px;
  bottom: 0px;
  left:0;
  right:0;
}
.el-submenu [class^="fa"] {
  vertical-align: baseline;
  margin-right: 10px;
}
.el-menu-item [class^="fa"] {
  vertical-align: baseline;
  margin-right: 10px;
}
.toolbar {
  font: 14px "微软雅黑";
  color: $color-primary;
  background: #fff;
  padding: 10px 15px;
  margin: 10px 0px;
  .el-form-item {
    margin-bottom: 10px;
  }
}
.headTip {
  padding: 10px 15px;
  margin: 10px auto;
  font: 14px "微软雅黑";
  color: #fff;
  background: $color-primary;
}
.fade-enter-active,
.fade-leave-active {
  transition: all 0.2s ease;
}
.fade-enter,
.fade-leave-active {
  opacity: 0;
}
p[data-f-id="pbf"] {
  display: none;
}
iframe {
  border: none;
}
.el-table .success-row {
  background: #eaeaea;
}
.editsty {
  font-size: 14px;
  color: #0052D9;
  cursor: pointer;
  margin-right: 5px;
  display: inline-block;
  flex-shrink: 0;
}
.deletesty {
  font-size: 14px;
  color: #C54322;
  cursor: pointer;
  &:hover{color:#C54322}
}
.disty {
  font-size: 14px;
  color: #999;
  cursor: not-allowed;
}
.warnsty {
  font-size: 14px;
  color: #ff9900;
}
.successty {
  font-size: 14px;
  color: #1bb940;
}

.el-card__header {
  border: none !important;
  box-shadow: 0 3px 6px rgba(37, 37, 239, 0.1) !important;
}
.el-pagination.is-background .el-pager li {
  background: #fff;
  // border: 1px solid #8F9BB3;
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
  border-color: #0052D9;
}
.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev {
  // border: 1px solid #8F9BB3;
  background: #fff;
}
.clearfix:after {
  content: "";
  height: 0;
  clear: both;
  visibility: hidden;
  display: block;
  zoom: 1;
}
.text_oneLine {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 控制文字显示两行 */
.text_twoLine {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
/* .el-popover  */
.el-checkbox__input.is-disabled + span.el-checkbox__label {
  color: #666 !important;
}
.el-form-item__label {
  font-size: 14px;
}
.el-collapse-item__header {
  border: none;
  font-size: 14px;
  color: #333;
  font-weight: bold;
  position: relative;
  margin-bottom: 20px;
}
/* 省市选择禁用统一element样式 */
.distpicker-address-wrapper select:disabled {
  cursor: not-allowed;
  background: #f5f7fa;
  border-color: #e4e7ed;
  color: #c0c4cc;
  opacity: 1;
}
.distpicker-address-wrapper select {
  font-size: 14px !important;
}
/* img preview */
.el-image-viewer__mask {
  opacity: 0.8;
}
.el-image-viewer__canvas .el-image-viewer__img {
  position: absolute;
  // left: 40%;
  // top: 40%;
  // transform: translate(-50%,-50%);
  width: 1200px;
  max-height: 100vh;
  overflow-y: scroll;
}
.el-image-viewer__next,
.el-image-viewer__prev {
  width: 62px;
  height: 110px;
  border: none;
  font-size: 80px;
  background: transparent;
  color: #858585;
}
.el-image-viewer__close {
  width: 66px;
  height: 66px;
  color: #fff;
  font-size: 48px;
}

.el-popconfirm .el-popconfirm__action {
  margin-top: 10px;
}

/*修改滚动条样式 chrome edge safari*/
div::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
div::-webkit-scrollbar-track {
  background: rgb(239, 239, 239);
  border-radius: 2px;
}
div::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
div::-webkit-scrollbar-thumb:hover {
  background: #888;
}
div::-webkit-scrollbar-corner {
  background: #666;
}
/*firefox*/
/* div{
    scrollbar-width: thin;
} */
.customName:hover {
  text-decoration: underline;
}
/**/
.el-select-dropdown__wrap {
  max-height: 358px !important;
}

/* 日期选择 */
.mx-datepicker {
  width: 280px !important;
}
.mx-calendar-content .cell.active {
  background-color: #0052D9 !important;
}
.mx-datepicker .mx-input {
  height: 40px;
  border-color: #dcdfe6;
  box-shadow: none;
}
.mx-input {
  &::placeholder {
    color: #bbb;
  }
  &:hover {
    border-color: #c0c4cc !important;
  }
}

/*修改滚动条样式 chrome edge safari*/
ul::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
ul::-webkit-scrollbar-track {
  background: rgb(239, 239, 239);
  border-radius: 2px;
}
ul::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}
ul::-webkit-scrollbar-thumb:hover {
  background: #888;
}
ul::-webkit-scrollbar-corner {
  background: #666;
}
/*firefox*/
/* ul{
    scrollbar-width: thin;
} */

textarea {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}
// .el-dialog {
//     display: flex;
//     flex-direction: column;
//     margin: 0 !important;
//     position: absolute;
//     top: 50%;
//     left: 50%;
//     transform: translate(-50%, -50%);
//     max-height: calc(100% - 30px);
//     max-width: calc(100% - 30px);
//   }
//   .el-dialog .el-dialog__body {
//     flex: 1;
//     overflow: auto;
// }

.el-color-predefine {
  .el-color-predefine__color-selector {
    box-shadow: 0 0 1px 1px #999;
  }
}

//图表搜索select
.chart-search-popper {
  min-width: 300px !important;
  width: auto !important;
}

//数据管理下的输入框
.el-autocomplete-suggestion-data-entry {
  width: auto !important;
}
</style>
