index.vue 2.34 KB
<!--
 * @Author: xiaomiao 1158771342@qq.com
 * @Date: 2023-03-09 20:54:28
 * @LastEditors: xiaomiao 1158771342@qq.com
 * @LastEditTime: 2023-03-15 15:45:01
 * @FilePath: \上报\bdcjg-web\src\views\system\information\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="information from-clues">
    <div class="from-clues-header">
      <el-form ref="ruleForm" label-width="100px">
        <el-form-item>
          <Breadcrumb />
        </el-form-item>
        <el-row class="mb-5">
          <el-col :span="4" class="btnColRight">
            <btn nativeType="cx" type="primary" @click="information">
              基本信息
            </btn>
            <btn nativeType="cz" @click="password">
              修改密码
            </btn>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <div class="from-clues-content boxin">
      <div class="contentbox">
        <base-set v-if="isshow" :userInfo="userData" />
        <password-edit v-if="!isshow" :userInfo="userData" />
      </div>
    </div>
  </div>
</template>
<script>
  import "@/utils/flexible.js";
  import BaseSet from "./base-set.vue";
  import PasswordEdit from "./password-edit.vue";
  export default {
    components: {
      BaseSet,
      PasswordEdit,
    },
    data () {
      return {
        isshow: true,
      };
    },
    computed: {
      userData () {
        return this.$store.state.user.userInfo;
      },
    },
    watch: {},
    created () { },
    mounted () { },
    methods: {
      information () {
        this.isshow = true;
      },
      password () {
        this.isshow = false;
      },
    },
  };
</script>

<style scoped lang="scss">
  @import "~@/styles/mixin.scss";
  @import "~@/styles/public.scss";
  .information {
    display: flex;
    flex-direction: column;
    .btnColRight {
      // background-color: cadetblue;
      height: 30px;
      .button:nth-child(1) {
        position: absolute;
        left: 30px;
      }
      .button:nth-child(2) {
        position: absolute;
        left: 120px;
      }
    }
    /deep/.content {
      .el-input__inner {
        background: none;
      }
      .user-info {
        background: none;
      }
    }
    .boxin {
      flex: 1;
    }
  }
</style>