loulijun2021
2023-02-12 adb74c51618faf025fe1d46bf6b22db895c2608f
src/views/login/index.vue
@@ -11,21 +11,21 @@
        <el-carousel-item>
          <img src="@/assets/images/img1.png" style="margin-top: -30px">
          <div class="itemLabel">
            <p class="title">智慧物联</p>
            <p class="title" :style="{color:$store.state.settings.theme}">智慧物联</p>
            <p class="content">生产现场数据实时采集、 传递、多维度可视化呈现</p>
          </div>
        </el-carousel-item>
        <el-carousel-item>
          <img src="@/assets/images/img2.png" style="margin-top: -30px">
          <div class="itemLabel">
            <p class="title">精益思维</p>
            <p class="title" :style="{color:$store.state.settings.theme}">精益思维</p>
            <p class="content">运用精益思想和IT系统技 术打造工厂制造协同平台</p>
          </div>
        </el-carousel-item>
        <el-carousel-item>
          <img src="@/assets/images/img3.png" style="margin-top: -30px">
          <div class="itemLabel">
            <p class="title">行业组件</p>
            <p class="title" :style="{color:$store.state.settings.theme}">行业组件</p>
            <p class="content">基于制造模型快速灵活地 配置客户专属的应用场景</p>
          </div>
        </el-carousel-item>
@@ -103,7 +103,7 @@
        <el-button
          :loading="loading"
          type="primary"
          style="width:100%;margin-top:20px;"
          style="width:100%;margin-top:20px;letter-spacing: 10px"
          @click.native.prevent="handleLogin"
        >登录
        </el-button>
@@ -123,12 +123,14 @@
      :close-on-click-modal="false"
      :show-close="false"
      top="5vh"
      class="dialogVisible"
    >
      <div style="font-size:20px;">
      <div style="font-size:18px;">
        <!--        <i class="el-icon-warning-outline" style="color: #ffef00" />-->
        当前账号已登录,是否强制下线!
      </div>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="dialogVisibleCancel">否</el-button>
          <el-button type="primary" @click="dialogVisibleConfirm">是</el-button>
@@ -215,7 +217,7 @@
        if (valid) {
          this.loading = true
          this.$store.dispatch('user/login', this.loginForm).then(() => {
            console.log(getCookie('code') === '302')
            console.log(getCookie('code') === '302', 9999)
            if (getCookie('code') === '302') {
              this.dialogVisible = true
            } else {
@@ -250,13 +252,15 @@
        usercode,
        username,
        usertype,
        userid
        userid,
        rid: ''
      }
      const res = await ForcedOffline(data)
      if (res.code === '200') {
        this.$message.success('强制下线成功!')
        this.dialogVisible = false
        this.$router.push({ path: this.redirect || '/' })
        // this.$router.push({ path: this.redirect || '/' })
        await this.handleLogin()
      }
    }
  }
@@ -451,4 +455,34 @@
::v-deep .el-dialog__title{
  color: red;
}
::v-deep .el-dialog__body {
  padding: 20px 20px !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .dialogVisible .el-button--primary {
  background-color: #42b983 !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
}
::v-deep .dialogVisible .el-button--default {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
</style>