“dzb”
2022-09-21 091618590e16bc7e3f989944494b49ab6e98b626
src/views/systemSetting/baseSetting/role/updateUser/index.vue
@@ -1,19 +1,19 @@
<template>
    <div class="updateUser">
        <header>
        <!-- <header>
            <div class="headerTitle">{{updateFlag ? '修改角色信息' :'查看角色信息'}}</div>
        </header>
        </header> -->
        <main>
            <div class="mainContent">
                <el-form ref="user" label-width="140px" autoComplete="on" :model="role" :rules="createRoleRules"
                    label-position="right">
                    <!-- 角色名称 -->
                    <el-form-item class="optionItem" label="用户名称:" prop="name">
                    <el-form-item class="optionItem" label="角色名称:" prop="name">
                        <el-input v-model="role.name" placeholder="请填写角色名称" :disabled="!updateFlag"></el-input>
                    </el-form-item>
                    <!-- 角色类型 -->
                    <el-form-item class="optionItems" label="角色类型:" prop="status">
                        <el-select v-model="role.status" placeholder="请选择用户类型" :disabled="!updateFlag">
                        <el-select v-model="role.status" placeholder="请选择角色类型" :disabled="!updateFlag">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"
                                :disabled="item.disabled">
                            </el-option>
@@ -64,6 +64,7 @@
        };
        return {
            role: {
                id:'',
                name: '',
                status: '',
                description: '',
@@ -102,16 +103,19 @@
    },
    methods: {
        handleUser() {
            const { user } = this;
            this.$axios.post('sccg/depart/status', {
                id: user.departmentId,
                status: user.status ? 1 : 0,
            const { role } = this;
            this.$axios.post('/sccg/role/update/'+role.id, {
                id:role.id,
                status: role.status,
                description:role.description,
                name:role.name
            }).then(res => {
                console.log(res);
                this.$emit('changeDialog',{dialogUpdate:false});
                this.getUserList();
            })
        }
    },
    props: ['userInfo', 'updateFlag']
    props: ['userInfo', 'updateFlag','getUserList','changeDialog']
}
</script>
<style lang="scss" scoped>
@@ -119,29 +123,29 @@
    border-radius: 1px;
    background-color: #09152f;
    header {
        display: flex;
        justify-content: center;
        height: 60px;
        line-height: 60px;
        padding: 0 20px;
        border: 1px solid #fff;
        .headerTitle {
            color: #4b9bb7;
            font-weight: 600;
        }
    // header {
    //     display: flex;
    //     justify-content: center;
    //     height: 60px;
    //     line-height: 60px;
    //     padding: 0 20px;
    //     border: 1px solid #fff;
    //     .headerTitle {
    //         color: #4b9bb7;
    //         font-weight: 600;
    //     }
        .headerTip span {
            color: #ff3b6c;
        }
    //     .headerTip span {
    //         color: #ff3b6c;
    //     }
        .headerTip label {
            color: #4b9bb7;
        }
    }
    //     .headerTip label {
    //         color: #4b9bb7;
    //     }
    // }
    main {
        border: 1px solid #fff;
        // border: 1px solid #fff;
        text-align: left;
        padding: 0 55px;
        background-color: #09152f;
@@ -149,7 +153,7 @@
        .mainContent {
            display: flex;
            justify-content: center;
            margin-top: 50px    ;
            padding-top: 50px;
            .el-form-item__content {
                width: 400px;