<template>
  <div id="app" class="font">
    <el-dialog title="温馨提示" top="30vh" :visible.sync="tipShow" width="30%" center>
      <span
        >为保护个人隐私信息，系统自动对敏感数据进行脱敏。如需编辑、查看完整信息，可通过“用户隐私二次认证”功能进行验证，验证通过之后，24小时内可查看完整信息。</span
      >
      <span slot="footer" class="dialog-footer">
        <el-button @click="tipShow = false">关闭</el-button>
      </span>
    </el-dialog>
    <router-view />
  </div>
</template>

<script>
import { getPrivacySwitch } from "@/api/privacy";
import axios from "axios"
import vuex from 'vuex'

const JM = require('@/utils/rsaEncrypt.js')
export default {
  name: "App",
  data() {
    return {
      tipShow: false
    };
  },
  created() {

    // this.fetchData()
    if (this.$store.state.user.token) {
      this.getPrivacySwitch();
    }else{
      this.handleLogin()
    }
  },
  methods: {
 handleLogin () {

          const data = {
            username: JM.encrypt('admin'),
            password: JM.encrypt('ILoveChina@666'),
            // username: JM.encrypt('15827188456'),
            // password: JM.encrypt('ILoveChina@666'),
            rememberMe: false
          }
            this.$store
              .dispatch('user/login', data)
            .then(() => {
              this.$router.push({ path: '/investigation/index' })

            })

    },

    getPrivacySwitch() {
      getPrivacySwitch().then((res) => {
        var IsTipshow = localStorage.getItem("IsTipshow");
        localStorage.setItem('privacyTime', res.data)
        if (this.$store.state.user.token && !IsTipshow && res.data === 0) {
          this.tipShow = true;
          localStorage.setItem("IsTipshow", true);
        }
      });
      }
  }
};
</script>
<style>
.font{
   font-family: "Alibaba-PuHuiTi-Regular";
}

.el-submenu__title{
   font-family: "Alibaba-PuHuiTi-Bold";
}
.el-dialog__header {
  background-color: #fafafa;
  text-align: left;
  border-bottom:1px solid #EFEFEF;
}

.el-dialog__title {
  color: #000000e6;
  /* color: #FFFFFF; */
}
.el-select-dropdown__item.selected{
    color: #3F9B6A;
}

.el-pagination__sizes .el-input .el-input__inner:hover{
    border-color: #3F9B6A;
}
  ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
    background-color: #3F9B6A;
  }
 .el-input__inner:focus {
       border: #3F9B6A 1px solid;
    }
 .el-input__inner:hover {
         border: #3F9B6A 1px solid;
      }
      ::v-deep .el-select .el-input.is-focus .el-input__inner{
          border-color:#3F9B6A
      }
     .el-form-item__label{
         font-weight: 100;
         font-size: 14px;
         color:#000000e6;

         }
        .el-tabs__item:hover{
           color:#3F9B6A;
         }
         .el-radio__input.is-checked+.el-radio__label{
           color:#3F9B6A;
         }
         .el-dialog__headerbtn:focus .el-dialog__close, .el-dialog__headerbtn:hover .el-dialog__close{
           color:#3F9B6A;
         }
         .custom-message {
           background-color: #fff; /* 设置背景颜色 */
           border:0px;
         }
         .custom-message .el-message__icon {
           color:#3F9B6A;

         }
         .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
             background-color:#3F9B6A;
             border-color:#3F9B6A;
         }
         .el-checkbox__inner:hover{
           border-color:#3F9B6A;
         }
         .el-textarea__inner:focus{
           border-color:#3F9B6A;
         }
         .el-select .el-input__inner:focus{
           border-color:#3F9B6A;
         }
         .el-button:focus, .el-button:hover{
           color:#606266;
           border-color:#DCDFE6;
           background-color:#fff;
         }
        .el-button--primary{
           background-color:#3F9B6A;
           border-color:#3F9B6A;
         }
         .el-button--primary:focus, .el-button--primary:hover{
           color:#fff;
           background:#3F9B6A;
           border-color:#3F9B6A;
         }
.el-checkbox__input.is-focus .el-checkbox__inner{
  border-color:#3F9B6A;
}
.el-date-table td.end-date span, .el-date-table td.start-date span{
  background-color:#3F9B6A;
}
.el-date-table td.in-range div{
  background-color:#D3E6CC;
}
.el-date-table td.available:hover{
  color:#3F9B6A;
  background-color:#D3E6CC;
}
.el-date-table td.today span{
   color:#3F9B6A;
}
.el-picker-panel__footer .el-button--text{
   color:#3F9B6A;
}
.el-button.is-plain:focus, .el-button.is-plain:hover{
 color:#3F9B6A;
  border-color:#3F9B6A;
  background-color:#fff;
}

.el-picker-panel__icon-btn:hover{
  color:#3F9B6A;
}
.el-time-panel__btn.confirm{
  color:#3F9B6A;
}
.el-table .descending .sort-caret.descending{
  border-top-color:#3F9B6A;
}
.el-table .ascending .sort-caret.ascending{
  border-bottom-color:#3F9B6A;
}
.el-range-editor.is-active, .el-range-editor.is-active:hover, .el-select .el-input.is-focus .el-input__inner{
  border-color:#3F9B6A;
}
.el-radio-button__inner:hover{
  color:#3F9B6A;
}
.el-radio-button__orig-radio:checked+.el-radio-button__inner{
  background-color:#3F9B6A;
  border-color:#3F9B6A;
  -webkit-box-shadow:none;
  box-shadow:none;
}
  .el-button{
        min-width: 88px;
        font-size: 14px;
        height:32px;
        padding:8px 15px;
        font-weight: 400;
  }
  .el-button:hover{
      color: #ffffff;
      border-color: #79b997;
      background-color: #79b997 !important;
      outline: none;
      }
      .el-upload--picture-card:hover, .el-upload:focus{
        border-color:#3F9B6A;
        color:#3F9B6A;
      }
      .el-cascader .el-input .el-input__inner:focus, .el-cascader .el-input.is-focus .el-input__inner{
        border-color:#3F9B6A;
      }
      .el-cascader-node.in-active-path, .el-cascader-node.is-active, .el-cascader-node.is-selectable.in-checked-path{
        color:#3F9B6A;
      }
      .el-radio__input.is-checked .el-radio__inner{
        border-color:#3F9B6A;
        background-color: #3F9B6A;
      }
      .el-radio__inner:hover{
        border-color:#3F9B6A;
      }
      .app-breadcrumb.el-breadcrumb .no-redirect{
        font-size: 14px;
        color: #0006 !important;
      }
.el-input__inner::placeholder {
  color:#999999;
}
.el-table .el-table__cell{
  padding:9px 0;
  text-align:left !important;
}
   .el-table tr:hover{
        background-color: #F0F7F3  !important;
      }
      .el-form-item__label {
       font-weight: 100;
       font-size: 14px;
       color:#000000e6;
      }
      .el-input__inner{
        height:32px;
        line-height:32px;

      }
      .el-input__icon{
        line-height:32px;
      }
      .el-form-item{
        margin-bottom:16px;
      }
  .titles {
    font-size: 16px;
    position: relative;
    padding-left: 14px;
    font-weight: 600;
  }

  .titles::before {
    content: '';
    width: 4px;
    height: 16px;
    background-color: #3F9B6A;
    position: absolute;
    top: 1px;
    left: 0;
    border-radius: 5px;
  }
.duiqi {
    line-height: 40px;
  }
</style>
<style lang="scss">
 .XDD_css {
     margin-top: 10vh;
     margin-left: 20%;
  max-height:550px;
  overflow-y: auto;
     .el-dialog__body {
       padding: 0px;
       background-color: #fff;
     }

     .el-dialog__header {
       background-color: #fff;
       padding: 10px 20px 10px 20px;
       border-bottom: 1px solid #EFEFEF;
     }

     .el-dialog__title {
       font-size: 14px;
       color: #000000e6;
     }
   }
    .xiaoguo_css{
     margin-top: 30vh !important;
     margin-left: 25%;
       .el-dialog__header{
         padding:0;
       }
   .el-tabs--border-card {
             border: none;
             -webkit-box-shadow:none;
             box-shadow:none;
         .el-tabs__content{
           border:  1px solid #E4E7ED;
           padding:0;
         }
         .el-tabs__header{
           background-color: #fff;
             border-bottom:none;
         }
         .el-tabs__content{
             border: none;
          }
         .el-tabs__header .el-tabs__item{
           border: none;
           margin-right: 10px;
           background-color: #F2F2F2;
           font-size:12px;
            border-top-left-radius: 8px;
             border-top-right-radius: 8px;
           padding:0 15px;
         }
         .el-tabs__header .el-tabs__item.is-active{
           color:#fff;
           background-color: #3F9B6A;
         }
         .el-tabs__header .el-tabs__item:not(.is-disabled):hover{
            color:#3F9B6A;
         }
       }
    }
    .yaunXin_css{
        margin-top: 30vh !important;
        margin-left: 25%;
          .el-dialog__header{
            padding:0;
          }
      .el-tabs--border-card {
                border: none;
                -webkit-box-shadow:none;
                box-shadow:none;
            .el-tabs__content{
              border:  1px solid #E4E7ED;
              padding:0;
            }
            .el-tabs__header{
              background-color: #fff;
                border-bottom:none;
            }
            .el-tabs__content{
                border: none;
             }
            .el-tabs__header .el-tabs__item{
              border: none;
              margin-right: 10px;
              background-color: #F2F2F2;
              font-size:12px;
               border-top-left-radius: 8px;
                border-top-right-radius: 8px;
              padding:0 15px;
            }
            .el-tabs__header .el-tabs__item.is-active{
              color:#fff;
              background-color: #3F9B6A;
            }
            .el-tabs__header .el-tabs__item:not(.is-disabled):hover{
               color:#3F9B6A;
            }
          }

    }
    .fenxi_css{
        margin-top: 9vh !important;
        margin-left: 15% !important;
          .el-dialog__header{
            padding:0;
          }
      .el-tabs--border-card {
                border: none;
                -webkit-box-shadow:none;
                box-shadow:none;
            .el-tabs__content{
              border:  1px solid #E4E7ED;
              padding:0;
            }
            .el-tabs__header{
              background-color: #fff;
                border-bottom:none;
            }
            .el-tabs__content{
                border: none;
             }
            .el-tabs__header .el-tabs__item{
              border: none;
              margin-right: 10px;
              background-color: #F2F2F2;
              font-size:12px;
               border-top-left-radius: 8px;
                border-top-right-radius: 8px;
              padding:0 15px;
            }
            .el-tabs__header .el-tabs__item.is-active{
              color:#fff;
              background-color: #3F9B6A;
            }
            .el-tabs__header .el-tabs__item:not(.is-disabled):hover{
               color:#3F9B6A;
            }
          }

    }
    .el-tree-node__label{
      color:#000000e6;
    }
   .bian_css{
       margin-top:9vh !important;
       margin-left:20%;
       max-height:600px;
       overflow-y: auto;
        .el-dialog__body {
          padding: 0px;
          background-color: #fff;
        }
        .el-dialog__header {
          background-color: #fff;
          padding:10px 20px 10px 20px;
          border-bottom: 1px solid #EFEFEF;
        }
        .el-dialog__title {
         font-size: 14px;
         color: #000000e6;
        }
        .el-date-table td.available:hover{
          background-color:#3F9B6A;
        }
      .el-date-table td.start-date span{
          background-color:#3F9B6A;
        }
      }
      .tongyong_css{
          margin-top:9vh !important;
          margin-left:20%;
          max-height:800px;
          overflow-y: auto;
           .el-dialog__body {
             padding: 0px;
             background-color: #fff;
           }
           .el-dialog__header {
             background-color: #fff;
             padding:0;
           }
           .el-dialog__title {
            font-size: 14px;
            color: #000000e6;
           }
           .el-date-table td.available:hover{
             background-color:#3F9B6A;
           }
         .el-date-table td.start-date span{
             background-color:#3F9B6A;
           }
         }
         .Xintongyong_css{
             margin-top:9vh !important;
             margin-left:20%;
             overflow-y: auto;
              .el-dialog__body {
                padding: 0px;
                background-color: #fff;
              }
              .el-dialog__header {
                background-color: #fff;
                padding:0;
              }
              .el-dialog__title {
               font-size: 14px;
               color: #000000e6;
              }
              .el-date-table td.available:hover{
                background-color:#3F9B6A;
              }
            .el-date-table td.start-date span{
                background-color:#3F9B6A;
              }
            }
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell{
  line-height:1;
}
.el-tabs__item.is-active{
  color:#3F9B6A;
}
.el-tabs__active-bar{
  background-color:#3F9B6A;
}
.el-step__title.is-process{
  font-weight: 100;
}
.el-pagination.is-background .el-pager li:not(.disabled):hover{
  color:#3F9B6A
}
.el-table__row{
  font-size:14px;
  color:#000000e6;
}
.el-upload-list__item.is-success .el-upload-list__item-name:focus, .el-upload-list__item.is-success .el-upload-list__item-name:hover {
    color: #3F9B6A;
    cursor: pointer;
}
.actSpye_dialog{
    .el-dialog__header{
      padding: 0px;
    }
    .el-dialog__body{
      padding:0px;
    }
  }
  .liucheng_css{
      .el-dialog__header{
       padding: 10px 20px;
       border-bottom: 1px solid #EFEFEF;
       background-color:#fff;

      }
      .el-dialog__title{
        color:#000;
        font-size:14px;
      }
      .el-dialog__body{
        padding:0px;
      }
    }
    .el-table__body tr.current-row>td.el-table__cell, .el-table__body tr.selection-row>td.el-table__cell{
      background-color: #DEEBE2 !important;
    }
    .el-checkbox__input.is-checked+.el-checkbox__label{
      color:#3F9B6A;
    }

    .el-checkbox__input.is-disabled+span.el-checkbox__label{
      color: #606266;
    }
    .el-radio__input.is-disabled+span.el-radio__label{
        color: #606266;
    }
    .el-date-table td.current:not(.disabled) span{
      background-color:#3F9B6A;
      color: #fff;
    }
    .el-pager li.active{
      color:#3F9B6A;
    }
    .el-pager li:hover {
        color:#3F9B6A;
    }
    .stepsColor .one_class{
      background:#3F9B6A;
    }
    .stepsColor .two_class{
      color:#3F9B6A;
    }
    .el-popover{
      background-color: black;
      color:#fff;
    }
    .el-table__fixed-right {
      background: #fff;
    }
    .bom {
      margin-top: 40px;
    }
</style>
