From be5cd659dd19c4f9ba5e00bb7a2906e9ed4df6f7 Mon Sep 17 00:00:00 2001
From: “dzb” <2632970487@qq.com>
Date: 星期二, 20 九月 2022 11:47:30 +0800
Subject: [PATCH] 添加分页功能

---
 src/views/systemSetting/baseSetting/role/createUser/index.vue |   94 +++++++++++++++++++++++++++-------------------
 1 files changed, 55 insertions(+), 39 deletions(-)

diff --git a/src/views/systemSetting/baseSetting/role/createUser/index.vue b/src/views/systemSetting/baseSetting/role/createUser/index.vue
index a56064a..99aa8a6 100644
--- a/src/views/systemSetting/baseSetting/role/createUser/index.vue
+++ b/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="濉啓鎵�灞瀒p鍦板潃:" prop="ip">
                         <el-input v-model="user.ip" placeholder="璇峰~鍐欐墍灞瀒p鍦板潃"></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;
                 }
             }

--
Gitblit v1.8.0