“dzb”
2022-09-20 be5cd659dd19c4f9ba5e00bb7a2906e9ed4df6f7
添加分页功能
12个文件已修改
862 ■■■■■ 已修改文件
src/views/systemSetting/baseSetting/authority/createUser/index.vue 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/authority/index.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/authority/updateUser/index.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/department/createUser/index.vue 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/department/index.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/department/updateUser/index.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/role/createUser/index.vue 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/role/index.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/role/updateUser/index.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/user/createUser/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/user/index.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/user/updateUser/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/systemSetting/baseSetting/authority/createUser/index.vue
@@ -76,7 +76,8 @@
                    <!-- 所属部门 -->
                    <el-form-item class="optionItem" label="所属部门:" prop="departmentId">
                        <el-select v-model="user.departmentId" placeholder="请选择所属部门">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName" :value="item.id">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName"
                                :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
@@ -96,9 +97,11 @@
                    <!-- <el-form-item class="optionItem" label="填写所属ip地址:" prop="ip">
                        <el-input v-model="user.ip" placeholder="请填写所属ip地址"></el-input>
                    </el-form-item> -->
                    <el-form-item class="optionBtn">
                        <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                    <el-form-item>
                        <div class="optionBtn">
                            <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                        <el-button class="btn reset">重置</el-button>
                        </div>
                    </el-form-item>
                </el-form>
@@ -119,7 +122,7 @@
                callback(new Error("请填写登录密码"));
            } else {
                const rep = /^\w+$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("密码只能是以数字、26个英文字母或者下划线组成的字符串"));
                }
            }
@@ -129,7 +132,7 @@
                callback(new Error("请填写用户姓名"));
            } else {
                const rep = /^[\u4E00-\u9FA5]{2,4}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的用户姓名");
                }
            }
@@ -139,7 +142,7 @@
                callback(new Error("请填写手机号码"));
            } else {
                const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的手机号码");
                }
            }
@@ -147,7 +150,7 @@
        const validateMail = (rule, value, callback) => {
            if (value) {
                const rep = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("请输入正确的邮箱"))
                }
            }
@@ -265,8 +268,8 @@
            typeList: []
        }
    },
    created() {
        const that = this ;
    created() {
        const that = this;
        // 获取角色列表
        // this.$axios.get('')
        // 获取用户类型列表
@@ -274,39 +277,37 @@
        //     console.log(res);
        // })
        // 获取全部部门列表
        this.$axios.get('sccg/depart/page').then(res=>{
        this.$axios.get('sccg/depart/page').then(res => {
            that.typeList = res.data.records;
        })
    },
    methods: {
        handleUser() {
            const {user} = this;
            const { user } = this;
            console.log(user);
            this.$axios.post('sccg/admin/register',{
                departmentId:user.departmentId,
                email:user.email,
                jsDy:user.isDy,
                jobTitle:user.jobTitle,
                mobile:user.mobile,
                nickName:user.nickName,
                password:user.password,
                userType:user.userType,
                username:user.username,
            }).then(res=>{
                if(res.code === 200){
            this.$axios.post('sccg/admin/register', {
                departmentId: user.departmentId,
                email: user.email,
                jsDy: user.isDy,
                jobTitle: user.jobTitle,
                mobile: user.mobile,
                nickName: user.nickName,
                password: user.password,
                userType: user.userType,
                username: user.username,
            }).then(res => {
                if (res.code === 200) {
                    this.refresh();
                }
            })
        }
    },
    props:['refresh']
    props: ['refresh']
}
</script>
<style lang="scss" scpoed>
<style lang="scss" scoped>
.createUser {
    border-radius: 1px;
    // min-width: 1024px;
    // min-height: 1450px;
    background-color: #09152f;
    header {
@@ -316,9 +317,10 @@
        line-height: 60px;
        padding: 0 20px;
        border: 1px solid #fff;
        .headerTitle {
            color: #4b9bb7;
            font-weight: 600;
            color: #666;
        }
        .headerTip span {
@@ -326,19 +328,18 @@
        }
        .headerTip label {
            color: #999999;
            color: #4b9bb7;
        }
    }
    main {
        // border-top: 1px solid #f0f2f5;
        border: 1px solid #fff;
        text-align: left;
        padding: 0 55px;
        background-color: #09152f;
        padding-bottom: 50px;
        .mainTitle {
            // margin-left: 60px;
            color: #666;
            color: #4b9bb7;
            font-weight: 600;
            line-height: 100px;
            font-size: 14px;
@@ -347,6 +348,16 @@
        .mainContent {
            display: flex;
            justify-content: center;
            &::v-deep .el-form-item__label {
                color: #4b9bb7;
            }
            &::v-deep .el-input__inner {
                background-color: #09152f;
                border: 1px solid #17324c;
            }
            .el-form-item__content {
                width: 400px;
@@ -354,20 +365,25 @@
                    width: 100%;
                }
            }
            .optionHandleSp{
            .optionHandleSp {
                display: flex;
                .areaNumber,.moreNumber{
                .areaNumber,
                .moreNumber {
                    flex: 1;
                }
                .telNumber{
                .telNumber {
                    flex: 2;
                }
            }
            .optionBtn{
            .optionBtn {
                display: flex;
                justify-content: center;
                margin-top: 80px;
                .btn{
                margin-top: 20px;
                .btn {
                    padding: 12px 50px;
                }
            }
src/views/systemSetting/baseSetting/authority/index.vue
@@ -19,6 +19,7 @@
        </header>
        <main>
            <div class="mainContent">
                <!-- 数据展示 -->
                <el-table ref="multipleTable"
                    :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}"
                    :data="tableData" style="width: 100%" :row-class-name="tableRowClassName">
@@ -61,9 +62,16 @@
                        </template>
                    </el-table-column>
                </el-table>
                <!-- 查看修改页面 -->
                <el-dialog :visible.sync="dialogUpdate" width="45%">
                    <updateUser :updateFlag="updateFlag" :userInfo=userInfo />
                </el-dialog>
                <!-- 分页 -->
                <div class="pagination">
                    <el-pagination background :current-page="currentPage" layout="prev, pager, next" :total="totalNum"
                        :page-size="pageSize" @current-change="changeCurrentPage" @prev-click="handlePrev" @next-click="handleNext">
                    </el-pagination>
                </div>
            </div>
        </main>
    </div>
@@ -83,6 +91,9 @@
            dialogUpdate: false,
            updateFlag: false,
            userInfo: '',
            totalNum: 200,
            pageSize: 10,
            currentPage: 1,
        }
    },
    created() {
@@ -115,7 +126,8 @@
                        item.createTime = helper(item.createTime);
                        item.status == 1 ? item.status = true : item.status = false;
                    })
                    that.tableData = res.data.records;
                    that.totalNum = res.data.records.length;
                    that.tableData = res.data.records.slice((that.currentPage-1)*10,that.currentPage*10)
                }
            })
        },
@@ -139,7 +151,22 @@
            this.dialogUpdate = true;
            this.updateFlag = true;
            this.userInfo = rowData
        }
        },
        // 当前页改变触发事件
        changeCurrentPage(page){
            this.currentPage = page;
            this.getUserList();
        },
        // 上一页点击事件
        handlePrev(page){
            this.currentPage = page;
            this.getUserList();
        },
        // 下一页点击事件
        handleNext(page){
            this.currentPage = page;
            this.getUserList();
        },
    }
}
</script>
@@ -212,6 +239,20 @@
            line-height: 60px;
        }
        .pagination {
            margin-top: 50px;
            display: flex;
            line-height: 50px;
            justify-content: center;
            &::v-deep li,
            &::v-deep .btn-prev,
            &::v-deep .btn-next {
                background-color: #071f39;
                color: #4b9bb7;
            }
        }
        .el-table {
            color: #4b9bb7;
            font-size: 10px;
src/views/systemSetting/baseSetting/authority/updateUser/index.vue
@@ -1,11 +1,7 @@
<template>
    <div class="createUser">
    <div class="updateUser">
        <header>
            <div class="headerTitle">新增账户</div>
            <div class="headerTip">
                <span>*</span>
                <label>为必填项</label>
            </div>
            <div class="headerTitle">{{updateFlag ? '修改用户部门信息' :'查看用户信息'}}</div>
        </header>
        <main>
            <div class="mainTitle">基础信息</div>
@@ -13,12 +9,13 @@
                <el-form ref="user" label-width="140px" autoComplete="on" :model="user" :rules="createUserRules"
                    label-position="right">
                    <!-- 用户名称 -->
                    <el-form-item class="optionItem" label="用户名称:" prop="nickName">
                        <el-input v-model="user.nick_name" placeholder="填写用户名称"></el-input>
                    <el-form-item class="optionItem" label="用户名称:" prop="username">
                        <el-input v-model="user.username" placeholder="填写用户名称" :disabled="true"></el-input>
                    </el-form-item>
                    <!-- 用户密码 -->
                    <el-form-item class="optionItems" label="用户密码:" prop="password">
                        <el-input v-model="user.password" type="password" placeholder="请输入用户密码"></el-input>
                        <el-input v-model="user.password" type="password" placeholder="请输入用户密码" :disabled="true">
                        </el-input>
                    </el-form-item>
                    <!-- 所属用户姓名 -->
                    <!-- <el-form-item class="optionItem" label="所属用户姓名:" prop="true_name">
@@ -33,18 +30,18 @@
                    </el-form-item> -->
                    <!-- 是否党员 -->
                    <el-form-item class="optionItem" label="是否党员:" prop="isDy">
                        <el-radio-group v-model="user.member">
                        <el-radio-group v-model="user.isDy" disabled>
                            <el-radio :label="1">是</el-radio>
                            <el-radio :label="0">否</el-radio>
                        </el-radio-group>
                    </el-form-item>
                    <!-- 所属手机号码 -->
                    <el-form-item class="optionItem" label="所属手机号码:" prop="mobile">
                        <el-input v-model="user.phone" placeholder="请填写手机号码"></el-input>
                        <el-input v-model="user.mobile" placeholder="请填写手机号码" :disabled="true"></el-input>
                    </el-form-item>
                    <!-- 邮箱地址 -->
                    <el-form-item class="optionItem" label="邮箱地址:" prop="email">
                        <el-input v-model="user.mail" placeholder="请填写邮箱地址"></el-input>
                        <el-input v-model="user.email" placeholder="请填写邮箱地址" :disabled="true"></el-input>
                    </el-form-item>
                    <!-- 选择角色 -->
                    <!-- <el-form-item class="optionItem" label="选择角色:" prop="role">
@@ -56,14 +53,13 @@
                    </el-form-item> -->
                    <!-- 用户类型 -->
                    <el-form-item class="optionItem" label="用户类型:" prop="userType">
                        <el-select v-model="user.type" placeholder="请选择用户类型">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"
                                :disabled="item.disabled">
                        <el-select v-model="user.userType" placeholder="请选择用户类型" disabled>
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <!-- 座机/分机 -->
                    <el-form-item class="optionItem" label="座机/分机:" prop="zj">
                    <!-- <el-form-item class="optionItem" label="座机/分机:" prop="zj">
                        <div class="optionHandleSp">
                            <el-input class="areaNumber" v-model="user.zj.areaNumber" placeholder="电话区号">
                            </el-input>
@@ -72,19 +68,19 @@
                            <el-input class="moreNumber" v-model="user.zj.moreNumber" placeholder="分机号码">
                            </el-input>
                        </div>
                    </el-form-item>
                    </el-form-item> -->
                    <!-- 所属部门 -->
                    <el-form-item class="optionItem" label="所属部门:" prop="departmentId">
                        <el-select v-model="user.department" placeholder="请选择所属部门">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName" :value="item.id">
                        <el-select v-model="user.department" placeholder="请选择所属部门" :disabled="!updateFlag">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName"
                                :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <!-- 当前职务 -->
                    <el-form-item class="optionItem" label="当前职务:" prop="jobTitle">
                        <el-select v-model="user.work" placeholder="请选择当前职务">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"
                                :disabled="item.disabled">
                        <el-select v-model="user.work" placeholder="请选择当前职务" disabled>
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
@@ -96,9 +92,11 @@
                    <!-- <el-form-item class="optionItem" label="填写所属ip地址:" prop="ip">
                        <el-input v-model="user.ip" placeholder="请填写所属ip地址"></el-input>
                    </el-form-item> -->
                    <el-form-item class="optionBtn">
                        <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                        <el-button class="btn reset">重置</el-button>
                    <el-form-item v-if="updateFlag">
                        <div class="optionBtn">
                            <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交
                            </el-button>
                        </div>
                    </el-form-item>
                </el-form>
@@ -119,7 +117,7 @@
                callback(new Error("请填写登录密码"));
            } else {
                const rep = /^\w+$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("密码只能是以数字、26个英文字母或者下划线组成的字符串"));
                }
            }
@@ -129,7 +127,7 @@
                callback(new Error("请填写用户姓名"));
            } else {
                const rep = /^[\u4E00-\u9FA5]{2,4}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的用户姓名");
                }
            }
@@ -139,7 +137,7 @@
                callback(new Error("请填写手机号码"));
            } else {
                const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的手机号码");
                }
            }
@@ -147,7 +145,7 @@
        const validateMail = (rule, value, callback) => {
            if (value) {
                const rep = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("请输入正确的邮箱"))
                }
            }
@@ -265,8 +263,9 @@
            typeList: []
        }
    },
    created() {
        const that = this ;
    created() {
        const that = this;
        this.user = JSON.parse(JSON.stringify(that.userInfo));
        // 获取角色列表
        // this.$axios.get('')
        // 获取用户类型列表
@@ -274,38 +273,39 @@
        //     console.log(res);
        // })
        // 获取全部部门列表
        this.$axios.get('sccg/depart/page').then(res=>{
        this.$axios.get('sccg/depart/page').then(res => {
            that.typeList = res.data.records;
        })
    },
    methods: {
        handleUser() {
            const that = this;
            console.log(this.user);
            // this.$axios.post('sccg/admin/register',that.user).then(res=>{
            //     console.log(res);
            // })
            const { user } = this;
            this.$axios.post('sccg/depart/status', {
                id: user.departmentId,
                status: user.status ? 1 : 0,
            }).then(res => {
                console.log(res);
            })
        }
    },
    props:[]
    props: ['userInfo', 'updateFlag']
}
</script>
<style lang="scss" scpoed>
.createUser {
<style lang="scss" scoped>
.updateUser {
    border-radius: 1px;
    // min-width: 1024px;
    // min-height: 1450px;
    background-color: #fff;
    background-color: #09152f;
    header {
        display: flex;
        justify-content: space-between;
        justify-content: center;
        height: 60px;
        line-height: 60px;
        padding: 0 20px;
        border: 1px solid #fff;
        .headerTitle {
            color: #4b9bb7;
            font-weight: 600;
            color: #666;
        }
        .headerTip span {
@@ -313,17 +313,18 @@
        }
        .headerTip label {
            color: #999999;
            color: #4b9bb7;
        }
    }
    main {
        border-top: 1px solid #f0f2f5;
        border: 1px solid #fff;
        text-align: left;
        padding: 0 55px;
        background-color: #09152f;
        padding-bottom: 50px;
        .mainTitle {
            // margin-left: 60px;
            color: #666;
            color: #4b9bb7;
            font-weight: 600;
            line-height: 100px;
            font-size: 14px;
@@ -332,6 +333,7 @@
        .mainContent {
            display: flex;
            justify-content: center;
            .el-form-item__content {
                width: 400px;
@@ -339,20 +341,25 @@
                    width: 100%;
                }
            }
            .optionHandleSp{
            .optionHandleSp {
                display: flex;
                .areaNumber,.moreNumber{
                .areaNumber,
                .moreNumber {
                    flex: 1;
                }
                .telNumber{
                .telNumber {
                    flex: 2;
                }
            }
            .optionBtn{
            .optionBtn {
                display: flex;
                justify-content: center;
                margin-top: 80px;
                .btn{
                margin-top: 20px;
                .btn {
                    padding: 12px 50px;
                }
            }
@@ -360,4 +367,13 @@
        }
    }
}
.updateUser::v-deep .el-form-item__label {
    color: #4b9bb7;
}
.updateUser::v-deep .el-input__inner {
    background-color: #09152f;
    border: 1px solid #17324c;
}
</style>
src/views/systemSetting/baseSetting/department/createUser/index.vue
@@ -76,7 +76,8 @@
                    <!-- 所属部门 -->
                    <el-form-item class="optionItem" label="所属部门:" prop="departmentId">
                        <el-select v-model="user.departmentId" placeholder="请选择所属部门">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName" :value="item.id">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName"
                                :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
@@ -96,9 +97,11 @@
                    <!-- <el-form-item class="optionItem" label="填写所属ip地址:" prop="ip">
                        <el-input v-model="user.ip" placeholder="请填写所属ip地址"></el-input>
                    </el-form-item> -->
                    <el-form-item class="optionBtn">
                        <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                    <el-form-item>
                        <div class="optionBtn">
                            <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                        <el-button class="btn reset">重置</el-button>
                        </div>
                    </el-form-item>
                </el-form>
@@ -119,7 +122,7 @@
                callback(new Error("请填写登录密码"));
            } else {
                const rep = /^\w+$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("密码只能是以数字、26个英文字母或者下划线组成的字符串"));
                }
            }
@@ -129,7 +132,7 @@
                callback(new Error("请填写用户姓名"));
            } else {
                const rep = /^[\u4E00-\u9FA5]{2,4}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的用户姓名");
                }
            }
@@ -139,7 +142,7 @@
                callback(new Error("请填写手机号码"));
            } else {
                const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的手机号码");
                }
            }
@@ -147,7 +150,7 @@
        const validateMail = (rule, value, callback) => {
            if (value) {
                const rep = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("请输入正确的邮箱"))
                }
            }
@@ -265,8 +268,8 @@
            typeList: []
        }
    },
    created() {
        const that = this ;
    created() {
        const that = this;
        // 获取角色列表
        // this.$axios.get('')
        // 获取用户类型列表
@@ -274,39 +277,37 @@
        //     console.log(res);
        // })
        // 获取全部部门列表
        this.$axios.get('sccg/depart/page').then(res=>{
        this.$axios.get('sccg/depart/page').then(res => {
            that.typeList = res.data.records;
        })
    },
    methods: {
        handleUser() {
            const {user} = this;
            const { user } = this;
            console.log(user);
            this.$axios.post('sccg/admin/register',{
                departmentId:user.departmentId,
                email:user.email,
                jsDy:user.isDy,
                jobTitle:user.jobTitle,
                mobile:user.mobile,
                nickName:user.nickName,
                password:user.password,
                userType:user.userType,
                username:user.username,
            }).then(res=>{
                if(res.code === 200){
            this.$axios.post('sccg/admin/register', {
                departmentId: user.departmentId,
                email: user.email,
                jsDy: user.isDy,
                jobTitle: user.jobTitle,
                mobile: user.mobile,
                nickName: user.nickName,
                password: user.password,
                userType: user.userType,
                username: user.username,
            }).then(res => {
                if (res.code === 200) {
                    this.refresh();
                }
            })
        }
    },
    props:['refresh']
    props: ['refresh']
}
</script>
<style lang="scss" scpoed>
<style lang="scss" scoped>
.createUser {
    border-radius: 1px;
    // min-width: 1024px;
    // min-height: 1450px;
    background-color: #09152f;
    header {
@@ -316,9 +317,10 @@
        line-height: 60px;
        padding: 0 20px;
        border: 1px solid #fff;
        .headerTitle {
            color: #4b9bb7;
            font-weight: 600;
            color: #666;
        }
        .headerTip span {
@@ -326,19 +328,18 @@
        }
        .headerTip label {
            color: #999999;
            color: #4b9bb7;
        }
    }
    main {
        // border-top: 1px solid #f0f2f5;
        border: 1px solid #fff;
        text-align: left;
        padding: 0 55px;
        background-color: #09152f;
        padding-bottom: 50px;
        .mainTitle {
            // margin-left: 60px;
            color: #666;
            color: #4b9bb7;
            font-weight: 600;
            line-height: 100px;
            font-size: 14px;
@@ -347,6 +348,16 @@
        .mainContent {
            display: flex;
            justify-content: center;
            &::v-deep .el-form-item__label {
                color: #4b9bb7;
            }
            &::v-deep .el-input__inner {
                background-color: #09152f;
                border: 1px solid #17324c;
            }
            .el-form-item__content {
                width: 400px;
@@ -354,20 +365,25 @@
                    width: 100%;
                }
            }
            .optionHandleSp{
            .optionHandleSp {
                display: flex;
                .areaNumber,.moreNumber{
                .areaNumber,
                .moreNumber {
                    flex: 1;
                }
                .telNumber{
                .telNumber {
                    flex: 2;
                }
            }
            .optionBtn{
            .optionBtn {
                display: flex;
                justify-content: center;
                margin-top: 80px;
                .btn{
                margin-top: 20px;
                .btn {
                    padding: 12px 50px;
                }
            }
src/views/systemSetting/baseSetting/department/index.vue
@@ -19,6 +19,7 @@
        </header>
        <main>
            <div class="mainContent">
                <!-- 数据展示 -->
                <el-table ref="multipleTable"
                    :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}"
                    :data="tableData" style="width: 100%" :row-class-name="tableRowClassName">
@@ -61,9 +62,16 @@
                        </template>
                    </el-table-column>
                </el-table>
                <!-- 查看修改页面 -->
                <el-dialog :visible.sync="dialogUpdate" width="45%">
                    <updateUser :updateFlag="updateFlag" :userInfo=userInfo />
                </el-dialog>
                <!-- 分页 -->
                <div class="pagination">
                    <el-pagination background :current-page="currentPage" layout="prev, pager, next" :total="totalNum"
                        :page-size="pageSize" @current-change="changeCurrentPage" @prev-click="handlePrev" @next-click="handleNext">
                    </el-pagination>
                </div>
            </div>
        </main>
    </div>
@@ -83,6 +91,9 @@
            dialogUpdate: false,
            updateFlag: false,
            userInfo: '',
            totalNum: 200,
            pageSize: 10,
            currentPage: 1,
        }
    },
    created() {
@@ -115,7 +126,8 @@
                        item.createTime = helper(item.createTime);
                        item.status == 1 ? item.status = true : item.status = false;
                    })
                    that.tableData = res.data.records;
                    that.totalNum = res.data.records.length;
                    that.tableData = res.data.records.slice((that.currentPage-1)*10,that.currentPage*10)
                }
            })
        },
@@ -139,7 +151,22 @@
            this.dialogUpdate = true;
            this.updateFlag = true;
            this.userInfo = rowData
        }
        },
        // 当前页改变触发事件
        changeCurrentPage(page){
            this.currentPage = page;
            this.getUserList();
        },
        // 上一页点击事件
        handlePrev(page){
            this.currentPage = page;
            this.getUserList();
        },
        // 下一页点击事件
        handleNext(page){
            this.currentPage = page;
            this.getUserList();
        },
    }
}
</script>
@@ -212,6 +239,20 @@
            line-height: 60px;
        }
        .pagination {
            margin-top: 50px;
            display: flex;
            line-height: 50px;
            justify-content: center;
            &::v-deep li,
            &::v-deep .btn-prev,
            &::v-deep .btn-next {
                background-color: #071f39;
                color: #4b9bb7;
            }
        }
        .el-table {
            color: #4b9bb7;
            font-size: 10px;
src/views/systemSetting/baseSetting/department/updateUser/index.vue
@@ -1,11 +1,7 @@
<template>
    <div class="createUser">
    <div class="updateUser">
        <header>
            <div class="headerTitle">新增账户</div>
            <div class="headerTip">
                <span>*</span>
                <label>为必填项</label>
            </div>
            <div class="headerTitle">{{updateFlag ? '修改用户部门信息' :'查看用户信息'}}</div>
        </header>
        <main>
            <div class="mainTitle">基础信息</div>
@@ -13,12 +9,13 @@
                <el-form ref="user" label-width="140px" autoComplete="on" :model="user" :rules="createUserRules"
                    label-position="right">
                    <!-- 用户名称 -->
                    <el-form-item class="optionItem" label="用户名称:" prop="nickName">
                        <el-input v-model="user.nick_name" placeholder="填写用户名称"></el-input>
                    <el-form-item class="optionItem" label="用户名称:" prop="username">
                        <el-input v-model="user.username" placeholder="填写用户名称" :disabled="true"></el-input>
                    </el-form-item>
                    <!-- 用户密码 -->
                    <el-form-item class="optionItems" label="用户密码:" prop="password">
                        <el-input v-model="user.password" type="password" placeholder="请输入用户密码"></el-input>
                        <el-input v-model="user.password" type="password" placeholder="请输入用户密码" :disabled="true">
                        </el-input>
                    </el-form-item>
                    <!-- 所属用户姓名 -->
                    <!-- <el-form-item class="optionItem" label="所属用户姓名:" prop="true_name">
@@ -33,18 +30,18 @@
                    </el-form-item> -->
                    <!-- 是否党员 -->
                    <el-form-item class="optionItem" label="是否党员:" prop="isDy">
                        <el-radio-group v-model="user.member">
                        <el-radio-group v-model="user.isDy" disabled>
                            <el-radio :label="1">是</el-radio>
                            <el-radio :label="0">否</el-radio>
                        </el-radio-group>
                    </el-form-item>
                    <!-- 所属手机号码 -->
                    <el-form-item class="optionItem" label="所属手机号码:" prop="mobile">
                        <el-input v-model="user.phone" placeholder="请填写手机号码"></el-input>
                        <el-input v-model="user.mobile" placeholder="请填写手机号码" :disabled="true"></el-input>
                    </el-form-item>
                    <!-- 邮箱地址 -->
                    <el-form-item class="optionItem" label="邮箱地址:" prop="email">
                        <el-input v-model="user.mail" placeholder="请填写邮箱地址"></el-input>
                        <el-input v-model="user.email" placeholder="请填写邮箱地址" :disabled="true"></el-input>
                    </el-form-item>
                    <!-- 选择角色 -->
                    <!-- <el-form-item class="optionItem" label="选择角色:" prop="role">
@@ -56,14 +53,13 @@
                    </el-form-item> -->
                    <!-- 用户类型 -->
                    <el-form-item class="optionItem" label="用户类型:" prop="userType">
                        <el-select v-model="user.type" placeholder="请选择用户类型">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"
                                :disabled="item.disabled">
                        <el-select v-model="user.userType" placeholder="请选择用户类型" disabled>
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <!-- 座机/分机 -->
                    <el-form-item class="optionItem" label="座机/分机:" prop="zj">
                    <!-- <el-form-item class="optionItem" label="座机/分机:" prop="zj">
                        <div class="optionHandleSp">
                            <el-input class="areaNumber" v-model="user.zj.areaNumber" placeholder="电话区号">
                            </el-input>
@@ -72,19 +68,19 @@
                            <el-input class="moreNumber" v-model="user.zj.moreNumber" placeholder="分机号码">
                            </el-input>
                        </div>
                    </el-form-item>
                    </el-form-item> -->
                    <!-- 所属部门 -->
                    <el-form-item class="optionItem" label="所属部门:" prop="departmentId">
                        <el-select v-model="user.department" placeholder="请选择所属部门">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName" :value="item.id">
                        <el-select v-model="user.department" placeholder="请选择所属部门" :disabled="!updateFlag">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName"
                                :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <!-- 当前职务 -->
                    <el-form-item class="optionItem" label="当前职务:" prop="jobTitle">
                        <el-select v-model="user.work" placeholder="请选择当前职务">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"
                                :disabled="item.disabled">
                        <el-select v-model="user.work" placeholder="请选择当前职务" disabled>
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
@@ -96,9 +92,11 @@
                    <!-- <el-form-item class="optionItem" label="填写所属ip地址:" prop="ip">
                        <el-input v-model="user.ip" placeholder="请填写所属ip地址"></el-input>
                    </el-form-item> -->
                    <el-form-item class="optionBtn">
                        <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                        <el-button class="btn reset">重置</el-button>
                    <el-form-item v-if="updateFlag">
                        <div class="optionBtn">
                            <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交
                            </el-button>
                        </div>
                    </el-form-item>
                </el-form>
@@ -119,7 +117,7 @@
                callback(new Error("请填写登录密码"));
            } else {
                const rep = /^\w+$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("密码只能是以数字、26个英文字母或者下划线组成的字符串"));
                }
            }
@@ -129,7 +127,7 @@
                callback(new Error("请填写用户姓名"));
            } else {
                const rep = /^[\u4E00-\u9FA5]{2,4}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的用户姓名");
                }
            }
@@ -139,7 +137,7 @@
                callback(new Error("请填写手机号码"));
            } else {
                const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的手机号码");
                }
            }
@@ -147,7 +145,7 @@
        const validateMail = (rule, value, callback) => {
            if (value) {
                const rep = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("请输入正确的邮箱"))
                }
            }
@@ -265,8 +263,9 @@
            typeList: []
        }
    },
    created() {
        const that = this ;
    created() {
        const that = this;
        this.user = JSON.parse(JSON.stringify(that.userInfo));
        // 获取角色列表
        // this.$axios.get('')
        // 获取用户类型列表
@@ -274,38 +273,39 @@
        //     console.log(res);
        // })
        // 获取全部部门列表
        this.$axios.get('sccg/depart/page').then(res=>{
        this.$axios.get('sccg/depart/page').then(res => {
            that.typeList = res.data.records;
        })
    },
    methods: {
        handleUser() {
            const that = this;
            console.log(this.user);
            // this.$axios.post('sccg/admin/register',that.user).then(res=>{
            //     console.log(res);
            // })
            const { user } = this;
            this.$axios.post('sccg/depart/status', {
                id: user.departmentId,
                status: user.status ? 1 : 0,
            }).then(res => {
                console.log(res);
            })
        }
    },
    props:[]
    props: ['userInfo', 'updateFlag']
}
</script>
<style lang="scss" scpoed>
.createUser {
<style lang="scss" scoped>
.updateUser {
    border-radius: 1px;
    // min-width: 1024px;
    // min-height: 1450px;
    background-color: #fff;
    background-color: #09152f;
    header {
        display: flex;
        justify-content: space-between;
        justify-content: center;
        height: 60px;
        line-height: 60px;
        padding: 0 20px;
        border: 1px solid #fff;
        .headerTitle {
            color: #4b9bb7;
            font-weight: 600;
            color: #666;
        }
        .headerTip span {
@@ -313,17 +313,18 @@
        }
        .headerTip label {
            color: #999999;
            color: #4b9bb7;
        }
    }
    main {
        border-top: 1px solid #f0f2f5;
        border: 1px solid #fff;
        text-align: left;
        padding: 0 55px;
        background-color: #09152f;
        padding-bottom: 50px;
        .mainTitle {
            // margin-left: 60px;
            color: #666;
            color: #4b9bb7;
            font-weight: 600;
            line-height: 100px;
            font-size: 14px;
@@ -332,6 +333,7 @@
        .mainContent {
            display: flex;
            justify-content: center;
            .el-form-item__content {
                width: 400px;
@@ -339,20 +341,25 @@
                    width: 100%;
                }
            }
            .optionHandleSp{
            .optionHandleSp {
                display: flex;
                .areaNumber,.moreNumber{
                .areaNumber,
                .moreNumber {
                    flex: 1;
                }
                .telNumber{
                .telNumber {
                    flex: 2;
                }
            }
            .optionBtn{
            .optionBtn {
                display: flex;
                justify-content: center;
                margin-top: 80px;
                .btn{
                margin-top: 20px;
                .btn {
                    padding: 12px 50px;
                }
            }
@@ -360,4 +367,13 @@
        }
    }
}
.updateUser::v-deep .el-form-item__label {
    color: #4b9bb7;
}
.updateUser::v-deep .el-input__inner {
    background-color: #09152f;
    border: 1px solid #17324c;
}
</style>
src/views/systemSetting/baseSetting/role/createUser/index.vue
@@ -76,7 +76,8 @@
                    <!-- 所属部门 -->
                    <el-form-item class="optionItem" label="所属部门:" prop="departmentId">
                        <el-select v-model="user.departmentId" placeholder="请选择所属部门">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName" :value="item.id">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName"
                                :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
@@ -96,9 +97,11 @@
                    <!-- <el-form-item class="optionItem" label="填写所属ip地址:" prop="ip">
                        <el-input v-model="user.ip" placeholder="请填写所属ip地址"></el-input>
                    </el-form-item> -->
                    <el-form-item class="optionBtn">
                        <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                    <el-form-item>
                        <div class="optionBtn">
                            <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                        <el-button class="btn reset">重置</el-button>
                        </div>
                    </el-form-item>
                </el-form>
@@ -119,7 +122,7 @@
                callback(new Error("请填写登录密码"));
            } else {
                const rep = /^\w+$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("密码只能是以数字、26个英文字母或者下划线组成的字符串"));
                }
            }
@@ -129,7 +132,7 @@
                callback(new Error("请填写用户姓名"));
            } else {
                const rep = /^[\u4E00-\u9FA5]{2,4}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的用户姓名");
                }
            }
@@ -139,7 +142,7 @@
                callback(new Error("请填写手机号码"));
            } else {
                const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的手机号码");
                }
            }
@@ -147,7 +150,7 @@
        const validateMail = (rule, value, callback) => {
            if (value) {
                const rep = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("请输入正确的邮箱"))
                }
            }
@@ -265,8 +268,8 @@
            typeList: []
        }
    },
    created() {
        const that = this ;
    created() {
        const that = this;
        // 获取角色列表
        // this.$axios.get('')
        // 获取用户类型列表
@@ -274,39 +277,37 @@
        //     console.log(res);
        // })
        // 获取全部部门列表
        this.$axios.get('sccg/depart/page').then(res=>{
        this.$axios.get('sccg/depart/page').then(res => {
            that.typeList = res.data.records;
        })
    },
    methods: {
        handleUser() {
            const {user} = this;
            const { user } = this;
            console.log(user);
            this.$axios.post('sccg/admin/register',{
                departmentId:user.departmentId,
                email:user.email,
                jsDy:user.isDy,
                jobTitle:user.jobTitle,
                mobile:user.mobile,
                nickName:user.nickName,
                password:user.password,
                userType:user.userType,
                username:user.username,
            }).then(res=>{
                if(res.code === 200){
            this.$axios.post('sccg/admin/register', {
                departmentId: user.departmentId,
                email: user.email,
                jsDy: user.isDy,
                jobTitle: user.jobTitle,
                mobile: user.mobile,
                nickName: user.nickName,
                password: user.password,
                userType: user.userType,
                username: user.username,
            }).then(res => {
                if (res.code === 200) {
                    this.refresh();
                }
            })
        }
    },
    props:['refresh']
    props: ['refresh']
}
</script>
<style lang="scss" scpoed>
<style lang="scss" scoped>
.createUser {
    border-radius: 1px;
    // min-width: 1024px;
    // min-height: 1450px;
    background-color: #09152f;
    header {
@@ -316,9 +317,10 @@
        line-height: 60px;
        padding: 0 20px;
        border: 1px solid #fff;
        .headerTitle {
            color: #4b9bb7;
            font-weight: 600;
            color: #666;
        }
        .headerTip span {
@@ -326,19 +328,18 @@
        }
        .headerTip label {
            color: #999999;
            color: #4b9bb7;
        }
    }
    main {
        // border-top: 1px solid #f0f2f5;
        border: 1px solid #fff;
        text-align: left;
        padding: 0 55px;
        background-color: #09152f;
        padding-bottom: 50px;
        .mainTitle {
            // margin-left: 60px;
            color: #666;
            color: #4b9bb7;
            font-weight: 600;
            line-height: 100px;
            font-size: 14px;
@@ -347,6 +348,16 @@
        .mainContent {
            display: flex;
            justify-content: center;
            &::v-deep .el-form-item__label {
                color: #4b9bb7;
            }
            &::v-deep .el-input__inner {
                background-color: #09152f;
                border: 1px solid #17324c;
            }
            .el-form-item__content {
                width: 400px;
@@ -354,20 +365,25 @@
                    width: 100%;
                }
            }
            .optionHandleSp{
            .optionHandleSp {
                display: flex;
                .areaNumber,.moreNumber{
                .areaNumber,
                .moreNumber {
                    flex: 1;
                }
                .telNumber{
                .telNumber {
                    flex: 2;
                }
            }
            .optionBtn{
            .optionBtn {
                display: flex;
                justify-content: center;
                margin-top: 80px;
                .btn{
                margin-top: 20px;
                .btn {
                    padding: 12px 50px;
                }
            }
src/views/systemSetting/baseSetting/role/index.vue
@@ -19,6 +19,7 @@
        </header>
        <main>
            <div class="mainContent">
                <!-- 数据展示 -->
                <el-table ref="multipleTable"
                    :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}"
                    :data="tableData" style="width: 100%" :row-class-name="tableRowClassName">
@@ -61,9 +62,16 @@
                        </template>
                    </el-table-column>
                </el-table>
                <!-- 查看修改页面 -->
                <el-dialog :visible.sync="dialogUpdate" width="45%">
                    <updateUser :updateFlag="updateFlag" :userInfo=userInfo />
                </el-dialog>
                <!-- 分页 -->
                <div class="pagination">
                    <el-pagination background :current-page="currentPage" layout="prev, pager, next" :total="totalNum"
                        :page-size="pageSize" @current-change="changeCurrentPage" @prev-click="handlePrev" @next-click="handleNext">
                    </el-pagination>
                </div>
            </div>
        </main>
    </div>
@@ -83,6 +91,9 @@
            dialogUpdate: false,
            updateFlag: false,
            userInfo: '',
            totalNum: 200,
            pageSize: 10,
            currentPage: 1,
        }
    },
    created() {
@@ -115,7 +126,8 @@
                        item.createTime = helper(item.createTime);
                        item.status == 1 ? item.status = true : item.status = false;
                    })
                    that.tableData = res.data.records;
                    that.totalNum = res.data.records.length;
                    that.tableData = res.data.records.slice((that.currentPage-1)*10,that.currentPage*10)
                }
            })
        },
@@ -139,7 +151,22 @@
            this.dialogUpdate = true;
            this.updateFlag = true;
            this.userInfo = rowData
        }
        },
        // 当前页改变触发事件
        changeCurrentPage(page){
            this.currentPage = page;
            this.getUserList();
        },
        // 上一页点击事件
        handlePrev(page){
            this.currentPage = page;
            this.getUserList();
        },
        // 下一页点击事件
        handleNext(page){
            this.currentPage = page;
            this.getUserList();
        },
    }
}
</script>
@@ -212,6 +239,20 @@
            line-height: 60px;
        }
        .pagination {
            margin-top: 50px;
            display: flex;
            line-height: 50px;
            justify-content: center;
            &::v-deep li,
            &::v-deep .btn-prev,
            &::v-deep .btn-next {
                background-color: #071f39;
                color: #4b9bb7;
            }
        }
        .el-table {
            color: #4b9bb7;
            font-size: 10px;
src/views/systemSetting/baseSetting/role/updateUser/index.vue
@@ -1,11 +1,7 @@
<template>
    <div class="createUser">
    <div class="updateUser">
        <header>
            <div class="headerTitle">新增账户</div>
            <div class="headerTip">
                <span>*</span>
                <label>为必填项</label>
            </div>
            <div class="headerTitle">{{updateFlag ? '修改用户部门信息' :'查看用户信息'}}</div>
        </header>
        <main>
            <div class="mainTitle">基础信息</div>
@@ -13,12 +9,13 @@
                <el-form ref="user" label-width="140px" autoComplete="on" :model="user" :rules="createUserRules"
                    label-position="right">
                    <!-- 用户名称 -->
                    <el-form-item class="optionItem" label="用户名称:" prop="nickName">
                        <el-input v-model="user.nick_name" placeholder="填写用户名称"></el-input>
                    <el-form-item class="optionItem" label="用户名称:" prop="username">
                        <el-input v-model="user.username" placeholder="填写用户名称" :disabled="true"></el-input>
                    </el-form-item>
                    <!-- 用户密码 -->
                    <el-form-item class="optionItems" label="用户密码:" prop="password">
                        <el-input v-model="user.password" type="password" placeholder="请输入用户密码"></el-input>
                        <el-input v-model="user.password" type="password" placeholder="请输入用户密码" :disabled="true">
                        </el-input>
                    </el-form-item>
                    <!-- 所属用户姓名 -->
                    <!-- <el-form-item class="optionItem" label="所属用户姓名:" prop="true_name">
@@ -33,18 +30,18 @@
                    </el-form-item> -->
                    <!-- 是否党员 -->
                    <el-form-item class="optionItem" label="是否党员:" prop="isDy">
                        <el-radio-group v-model="user.member">
                        <el-radio-group v-model="user.isDy" disabled>
                            <el-radio :label="1">是</el-radio>
                            <el-radio :label="0">否</el-radio>
                        </el-radio-group>
                    </el-form-item>
                    <!-- 所属手机号码 -->
                    <el-form-item class="optionItem" label="所属手机号码:" prop="mobile">
                        <el-input v-model="user.phone" placeholder="请填写手机号码"></el-input>
                        <el-input v-model="user.mobile" placeholder="请填写手机号码" :disabled="true"></el-input>
                    </el-form-item>
                    <!-- 邮箱地址 -->
                    <el-form-item class="optionItem" label="邮箱地址:" prop="email">
                        <el-input v-model="user.mail" placeholder="请填写邮箱地址"></el-input>
                        <el-input v-model="user.email" placeholder="请填写邮箱地址" :disabled="true"></el-input>
                    </el-form-item>
                    <!-- 选择角色 -->
                    <!-- <el-form-item class="optionItem" label="选择角色:" prop="role">
@@ -56,14 +53,13 @@
                    </el-form-item> -->
                    <!-- 用户类型 -->
                    <el-form-item class="optionItem" label="用户类型:" prop="userType">
                        <el-select v-model="user.type" placeholder="请选择用户类型">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"
                                :disabled="item.disabled">
                        <el-select v-model="user.userType" placeholder="请选择用户类型" disabled>
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <!-- 座机/分机 -->
                    <el-form-item class="optionItem" label="座机/分机:" prop="zj">
                    <!-- <el-form-item class="optionItem" label="座机/分机:" prop="zj">
                        <div class="optionHandleSp">
                            <el-input class="areaNumber" v-model="user.zj.areaNumber" placeholder="电话区号">
                            </el-input>
@@ -72,19 +68,19 @@
                            <el-input class="moreNumber" v-model="user.zj.moreNumber" placeholder="分机号码">
                            </el-input>
                        </div>
                    </el-form-item>
                    </el-form-item> -->
                    <!-- 所属部门 -->
                    <el-form-item class="optionItem" label="所属部门:" prop="departmentId">
                        <el-select v-model="user.department" placeholder="请选择所属部门">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName" :value="item.id">
                        <el-select v-model="user.department" placeholder="请选择所属部门" :disabled="!updateFlag">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.departName"
                                :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <!-- 当前职务 -->
                    <el-form-item class="optionItem" label="当前职务:" prop="jobTitle">
                        <el-select v-model="user.work" placeholder="请选择当前职务">
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value"
                                :disabled="item.disabled">
                        <el-select v-model="user.work" placeholder="请选择当前职务" disabled>
                            <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
@@ -96,9 +92,11 @@
                    <!-- <el-form-item class="optionItem" label="填写所属ip地址:" prop="ip">
                        <el-input v-model="user.ip" placeholder="请填写所属ip地址"></el-input>
                    </el-form-item> -->
                    <el-form-item class="optionBtn">
                        <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                        <el-button class="btn reset">重置</el-button>
                    <el-form-item v-if="updateFlag">
                        <div class="optionBtn">
                            <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交
                            </el-button>
                        </div>
                    </el-form-item>
                </el-form>
@@ -119,7 +117,7 @@
                callback(new Error("请填写登录密码"));
            } else {
                const rep = /^\w+$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("密码只能是以数字、26个英文字母或者下划线组成的字符串"));
                }
            }
@@ -129,7 +127,7 @@
                callback(new Error("请填写用户姓名"));
            } else {
                const rep = /^[\u4E00-\u9FA5]{2,4}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的用户姓名");
                }
            }
@@ -139,7 +137,7 @@
                callback(new Error("请填写手机号码"));
            } else {
                const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback("请输入正确的手机号码");
                }
            }
@@ -147,7 +145,7 @@
        const validateMail = (rule, value, callback) => {
            if (value) {
                const rep = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
                if(!rep.test(value)){
                if (!rep.test(value)) {
                    callback(new Error("请输入正确的邮箱"))
                }
            }
@@ -265,8 +263,9 @@
            typeList: []
        }
    },
    created() {
        const that = this ;
    created() {
        const that = this;
        this.user = JSON.parse(JSON.stringify(that.userInfo));
        // 获取角色列表
        // this.$axios.get('')
        // 获取用户类型列表
@@ -274,38 +273,39 @@
        //     console.log(res);
        // })
        // 获取全部部门列表
        this.$axios.get('sccg/depart/page').then(res=>{
        this.$axios.get('sccg/depart/page').then(res => {
            that.typeList = res.data.records;
        })
    },
    methods: {
        handleUser() {
            const that = this;
            console.log(this.user);
            // this.$axios.post('sccg/admin/register',that.user).then(res=>{
            //     console.log(res);
            // })
            const { user } = this;
            this.$axios.post('sccg/depart/status', {
                id: user.departmentId,
                status: user.status ? 1 : 0,
            }).then(res => {
                console.log(res);
            })
        }
    },
    props:[]
    props: ['userInfo', 'updateFlag']
}
</script>
<style lang="scss" scpoed>
.createUser {
<style lang="scss" scoped>
.updateUser {
    border-radius: 1px;
    // min-width: 1024px;
    // min-height: 1450px;
    background-color: #fff;
    background-color: #09152f;
    header {
        display: flex;
        justify-content: space-between;
        justify-content: center;
        height: 60px;
        line-height: 60px;
        padding: 0 20px;
        border: 1px solid #fff;
        .headerTitle {
            color: #4b9bb7;
            font-weight: 600;
            color: #666;
        }
        .headerTip span {
@@ -313,17 +313,18 @@
        }
        .headerTip label {
            color: #999999;
            color: #4b9bb7;
        }
    }
    main {
        border-top: 1px solid #f0f2f5;
        border: 1px solid #fff;
        text-align: left;
        padding: 0 55px;
        background-color: #09152f;
        padding-bottom: 50px;
        .mainTitle {
            // margin-left: 60px;
            color: #666;
            color: #4b9bb7;
            font-weight: 600;
            line-height: 100px;
            font-size: 14px;
@@ -332,6 +333,7 @@
        .mainContent {
            display: flex;
            justify-content: center;
            .el-form-item__content {
                width: 400px;
@@ -339,20 +341,25 @@
                    width: 100%;
                }
            }
            .optionHandleSp{
            .optionHandleSp {
                display: flex;
                .areaNumber,.moreNumber{
                .areaNumber,
                .moreNumber {
                    flex: 1;
                }
                .telNumber{
                .telNumber {
                    flex: 2;
                }
            }
            .optionBtn{
            .optionBtn {
                display: flex;
                justify-content: center;
                margin-top: 80px;
                .btn{
                margin-top: 20px;
                .btn {
                    padding: 12px 50px;
                }
            }
@@ -360,4 +367,13 @@
        }
    }
}
.updateUser::v-deep .el-form-item__label {
    color: #4b9bb7;
}
.updateUser::v-deep .el-input__inner {
    background-color: #09152f;
    border: 1px solid #17324c;
}
</style>
src/views/systemSetting/baseSetting/user/createUser/index.vue
@@ -97,9 +97,11 @@
                    <!-- <el-form-item class="optionItem" label="填写所属ip地址:" prop="ip">
                        <el-input v-model="user.ip" placeholder="请填写所属ip地址"></el-input>
                    </el-form-item> -->
                    <el-form-item class="optionBtn">
                        <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                    <el-form-item>
                        <div class="optionBtn">
                            <el-button type="primary" class="btn submit" @click.native.prevent="handleUser">提交</el-button>
                        <el-button class="btn reset">重置</el-button>
                        </div>
                    </el-form-item>
                </el-form>
@@ -335,7 +337,7 @@
        text-align: left;
        padding: 0 55px;
        background-color: #09152f;
        padding-bottom: 50px;
        .mainTitle {
            color: #4b9bb7;
            font-weight: 600;
@@ -379,8 +381,7 @@
            .optionBtn {
                display: flex;
                justify-content: center;
                margin-top: 80px;
                margin-top: 20px;
                .btn {
                    padding: 12px 50px;
src/views/systemSetting/baseSetting/user/index.vue
@@ -19,6 +19,7 @@
        </header>
        <main>
            <div class="mainContent">
                <!-- 数据展示 -->
                <el-table ref="multipleTable"
                    :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}"
                    :data="tableData" style="width: 100%" :row-class-name="tableRowClassName">
@@ -61,9 +62,16 @@
                        </template>
                    </el-table-column>
                </el-table>
                <!-- 查看修改页面 -->
                <el-dialog :visible.sync="dialogUpdate" width="45%">
                    <updateUser :updateFlag="updateFlag" :userInfo=userInfo />
                </el-dialog>
                <!-- 分页 -->
                <div class="pagination">
                    <el-pagination background :current-page="currentPage" layout="prev, pager, next" :total="totalNum"
                        :page-size="pageSize" @current-change="changeCurrentPage" @prev-click="handlePrev" @next-click="handleNext">
                    </el-pagination>
                </div>
            </div>
        </main>
    </div>
@@ -83,6 +91,9 @@
            dialogUpdate: false,
            updateFlag: false,
            userInfo: '',
            totalNum: 200,
            pageSize: 10,
            currentPage: 1,
        }
    },
    created() {
@@ -115,7 +126,8 @@
                        item.createTime = helper(item.createTime);
                        item.status == 1 ? item.status = true : item.status = false;
                    })
                    that.tableData = res.data.records;
                    that.totalNum = res.data.records.length;
                    that.tableData = res.data.records.slice((that.currentPage-1)*10,that.currentPage*10)
                }
            })
        },
@@ -139,7 +151,22 @@
            this.dialogUpdate = true;
            this.updateFlag = true;
            this.userInfo = rowData
        }
        },
        // 当前页改变触发事件
        changeCurrentPage(page){
            this.currentPage = page;
            this.getUserList();
        },
        // 上一页点击事件
        handlePrev(page){
            this.currentPage = page;
            this.getUserList();
        },
        // 下一页点击事件
        handleNext(page){
            this.currentPage = page;
            this.getUserList();
        },
    }
}
</script>
@@ -212,6 +239,20 @@
            line-height: 60px;
        }
        .pagination {
            margin-top: 50px;
            display: flex;
            line-height: 50px;
            justify-content: center;
            &::v-deep li,
            &::v-deep .btn-prev,
            &::v-deep .btn-next {
                background-color: #071f39;
                color: #4b9bb7;
            }
        }
        .el-table {
            color: #4b9bb7;
            font-size: 10px;
src/views/systemSetting/baseSetting/user/updateUser/index.vue
@@ -322,7 +322,7 @@
        text-align: left;
        padding: 0 55px;
        background-color: #09152f;
        padding-bottom: 50px;
        .mainTitle {
            color: #4b9bb7;
            font-weight: 600;
@@ -357,8 +357,7 @@
            .optionBtn {
                display: flex;
                justify-content: center;
                margin-top: 80px;
                margin-top: 20px;
                .btn {
                    padding: 12px 50px;