Parcourir la source

1.支付二维码数据结构调整

wangtao il y a 3 ans
Parent
commit
cb52364a95
45 fichiers modifiés avec 169 ajouts et 144 suppressions
  1. 0 1
      src/components/IconSelect/index.vue
  2. 1 1
      src/store/modules/permission.js
  3. 7 6
      src/store/modules/user.js
  4. 5 5
      src/utils/auth.js
  5. 61 26
      src/utils/request.js
  6. 0 1
      src/utils/yongtian.js
  7. 0 1
      src/views/index.vue
  8. 13 13
      src/views/login.vue
  9. 7 7
      src/views/monitor/jobTaskIndex/index.vue
  10. 5 5
      src/views/monitor/jobTaskLog/log.vue
  11. 6 6
      src/views/monitor/logininfor/index.vue
  12. 6 6
      src/views/monitor/operlog/index.vue
  13. 3 3
      src/views/recharge/channel/index.vue
  14. 3 3
      src/views/recharge/userRecharge/index.vue
  15. 3 3
      src/views/system/config/index.vue
  16. 3 5
      src/views/system/dept/index.vue
  17. 4 4
      src/views/system/dict/data.vue
  18. 2 2
      src/views/system/dict/index.vue
  19. 6 8
      src/views/system/menu/index.vue
  20. 2 2
      src/views/system/notice/index.vue
  21. 4 4
      src/views/system/post/index.vue
  22. 0 1
      src/views/system/product/index.vue
  23. 10 11
      src/views/system/role/index.vue
  24. 4 4
      src/views/system/user/authRole.vue
  25. 9 11
      src/views/system/user/index.vue
  26. 2 2
      src/views/system/user/profile/userAvatar.vue
  27. 1 1
      vue.config.js
  28. BIN
      vuedx.zip
  29. 0 0
      vuedx/index.html
  30. 0 1
      vuedx/static/css/chunk-12b22cd5.ec29d85d.css
  31. 0 0
      vuedx/static/css/chunk-3f6061a6.4a252ff2.css
  32. 0 0
      vuedx/static/css/chunk-4fe9afba.d65d9467.css
  33. 0 0
      vuedx/static/css/chunk-52101fb7.556d8fdc.css
  34. 1 1
      vuedx/static/css/chunk-58e08142.4f216fb8.css
  35. 1 0
      vuedx/static/css/chunk-f98c8d3a.e4bdabf8.css
  36. 0 0
      vuedx/static/js/app.65128c5f.js
  37. 0 0
      vuedx/static/js/app.c2880147.js
  38. 0 0
      vuedx/static/js/chunk-12b22cd5.0527daef.js
  39. 0 0
      vuedx/static/js/chunk-1546e5c6.a33540c0.js
  40. 0 0
      vuedx/static/js/chunk-1c3eafb5.0c86e8af.js
  41. 0 0
      vuedx/static/js/chunk-3f6061a6.63ae80e9.js
  42. 0 0
      vuedx/static/js/chunk-4fe9afba.fcee9f7a.js
  43. 0 0
      vuedx/static/js/chunk-52101fb7.3825eb3a.js
  44. 0 0
      vuedx/static/js/chunk-58e08142.c9f8ea16.js
  45. 0 0
      vuedx/static/js/chunk-f98c8d3a.903cec6a.js

+ 0 - 1
src/components/IconSelect/index.vue

@@ -35,7 +35,6 @@ export default {
       document.body.click()
     },
     reset() {
-      console.log(11)
       this.name = ''
       this.iconList = icons
     }

+ 1 - 1
src/store/modules/permission.js

@@ -110,4 +110,4 @@ export const loadView = (view) => { // 路由懒加载
     return (resolve) => require([`@/views/${view}`], resolve)
 }
 
-export default permission
+export default permission

+ 7 - 6
src/store/modules/user.js

@@ -37,8 +37,8 @@ const user = {
             const uuid = userInfo.uuid
             return new Promise((resolve, reject) => {
                 login(username, password, code, uuid).then(res => {
-                    setToken(res.token)
-                    commit('SET_TOKEN', res.token)
+                    setToken(res.data.token)
+                    commit('SET_TOKEN', res.data.token)
                     resolve()
                 }).catch(error => {
                     reject(error)
@@ -50,11 +50,12 @@ const user = {
         GetInfo({ commit, state }) {
             return new Promise((resolve, reject) => {
                 getInfo().then(res => {
-                    const user = res.user
+                    const user = res.data.user
                     const avatar = user.avatar == "" ? '' : process.env.VUE_APP_BASE_API + user.avatar;
-                    if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
-                        commit('SET_ROLES', res.roles)
-                        commit('SET_PERMISSIONS', res.permissions)
+                    if (res.data.roles && res.data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
+
+                        commit('SET_ROLES', res.data.roles)
+                        commit('SET_PERMISSIONS', res.data.permissions)
                     } else {
                         commit('SET_ROLES', ['ROLE_DEFAULT'])
                     }

+ 5 - 5
src/utils/auth.js

@@ -1,15 +1,15 @@
 import Cookies from 'js-cookie'
 
-const TokenKey = 'Admin-Token'
+const TokenKey = 'Admin-Token314'
 
 export function getToken() {
-  return Cookies.get(TokenKey)
+    return Cookies.get(TokenKey)
 }
 
 export function setToken(token) {
-  return Cookies.set(TokenKey, token)
+    return Cookies.set(TokenKey, token)
 }
 
 export function removeToken() {
-  return Cookies.remove(TokenKey)
-}
+    return Cookies.remove(TokenKey)
+}

+ 61 - 26
src/utils/request.js

@@ -54,35 +54,70 @@ service.interceptors.request.use(config => {
 // 响应拦截器
 service.interceptors.response.use(res => {
         // 未设置状态码则默认成功状态
-        const code = res.data.code || 200;
+        const code = res.data.status;
         // 获取错误信息
         const msg = errorCode[code] || res.data.msg || errorCode['default']
-        if (code === 401) {
-            MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
-                confirmButtonText: '重新登录',
-                cancelButtonText: '取消',
-                type: 'warning'
-            }).then(() => {
-                store.dispatch('LogOut').then(() => {
-                    location.href = '/vuedx/#/';
-                })
-            }).catch(() => {});
-            // return Promise.reject()
-            // return msg && Promise.reject(new Error(msg)) || ""
-        } else if (code === 500) {
-            Message({
-                message: msg,
-                type: 'error'
-            })
-            return msg && Promise.reject(new Error(msg)) || ""
-        } else if (code !== 200) {
-            Notification.error({
-                title: msg
-            })
-            return Promise.reject('error')
-        } else {
+        if (code == "SUCCESS") {
             return res.headers['content-type'].indexOf("application/vnd.ms-excel") != -1 ? res : res.data
+        } else {
+            if (res.data.code === 401) {
+                MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
+                    confirmButtonText: '重新登录',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    store.dispatch('LogOut').then(() => {
+                        location.href = '/vuedx/#/';
+                    })
+                }).catch(() => {});
+                // return Promise.reject()
+                // return msg && Promise.reject(new Error(msg)) || ""
+            } else if (res.data.code === 500) {
+                Message({
+                    message: msg,
+                    type: 'error'
+                })
+                return msg && Promise.reject(new Error(msg)) || ""
+            } else if (res.data.code !== 200) {
+                Notification.error({
+                    title: msg
+                })
+                return Promise.reject('error')
+            } else {
+
+            }
         }
+
+
+
+
+        // if (code === 401) {
+        //     MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', {
+        //         confirmButtonText: '重新登录',
+        //         cancelButtonText: '取消',
+        //         type: 'warning'
+        //     }).then(() => {
+        //         store.dispatch('LogOut').then(() => {
+        //             location.href = '/vuedx/#/';
+        //         })
+        //     }).catch(() => {});
+        //     // return Promise.reject()
+        //     // return msg && Promise.reject(new Error(msg)) || ""
+        // } else if (code === 500) {
+        //     Message({
+        //         message: msg,
+        //         type: 'error'
+        //     })
+        //     return msg && Promise.reject(new Error(msg)) || ""
+        // } else if (code !== 200) {
+        //     Notification.error({
+        //         title: msg
+        //     })
+        //     return Promise.reject('error')
+        // } else {
+        //     return res.headers['content-type'].indexOf("application/vnd.ms-excel") != -1 ? res : res.data.data
+        // }
+
     },
     error => {
         // console.log('err' + error)
@@ -113,4 +148,4 @@ service.interceptors.response.use(res => {
 
 
 
-export default service
+export default service

+ 0 - 1
src/utils/yongtian.js

@@ -149,7 +149,6 @@ export function praseStrEmpty(str) {
  * @param {*} children 孩子节点字段 默认 'children'
  */
 export function handleTree(data, id, parentId, children) {
-    //console.log(data, id, parentId, children)
     let config = {
         id: id || 'id',
         parentId: parentId || 'parentId',

+ 0 - 1
src/views/index.vue

@@ -272,7 +272,6 @@ export default {
     },
     channelOrderMoney() {//渠道订单金额
       channelOrderMoneyApi().then(response => {
-        console.log(response)
         this.channelOrderMoneyList = response.data
         this.channelOrderMoneyList = response.data.map(item => {
             return {

+ 13 - 13
src/views/login.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="login" >
-    <div class="bg"><img :src="bg" alt="" style="width:100%"></div>
+    <div class="bg"><img :src="bg" alt="" style="width:100%;height:100%"></div>
     <div class="logo">
       <img :src="logo" alt="">
       <span class="logo_txt">东信充值管理系统</span>
@@ -115,7 +115,7 @@ export default {
     }
   },
   created() {
-    this.getCode();
+    // this.getCode();
     this.getCookie();
   },
   methods: {
@@ -131,15 +131,15 @@ export default {
       getCodeImg().then(res => {
         this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
         if (this.captchaOnOff) {
-          this.codeUrl = "data:image/gif;base64," + res.img;
-          this.loginForm.uuid = res.uuid;
+          this.codeUrl = "data:image/gif;base64," + res.data.img;
+          this.loginForm.uuid = res.data.uuid;
         }
       });
     },
     getCookie() {
-      const username = Cookies.get("username");
-      const password = Cookies.get("password");
-      const rememberMe = Cookies.get('rememberMe')
+      const username = Cookies.get("username314");
+      const password = Cookies.get("password314");
+      const rememberMe = Cookies.get('rememberMe314')
       this.loginForm = {
         username: username === undefined ? this.loginForm.username : username,
         password: password === undefined ? this.loginForm.password : decrypt(password),
@@ -151,13 +151,13 @@ export default {
         if (valid) {
           this.loading = true;
           if (this.loginForm.rememberMe) {
-            Cookies.set("username", this.loginForm.username, { expires: 30 });
-            Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
-            Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
+            Cookies.set("username314", this.loginForm.username, { expires: 30 });
+            Cookies.set("password314", encrypt(this.loginForm.password), { expires: 30 });
+            Cookies.set('rememberMe314', this.loginForm.rememberMe, { expires: 30 });
           } else {
-            Cookies.remove("username");
-            Cookies.remove("password");
-            Cookies.remove('rememberMe');
+            Cookies.remove("username314");
+            Cookies.remove("password314");
+            Cookies.remove('rememberMe314');
           }
           this.$store.dispatch("Login", this.loginForm).then((res) => {
             this.$router.push({ path: "/index"}).catch(()=>{});

+ 7 - 7
src/views/monitor/jobTaskIndex/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item label="任务名称" prop="jobName">
         <el-input
           v-model="queryParams.jobName"
@@ -20,7 +20,7 @@
           />
         </el-select>
       </el-form-item> -->
-      <el-form-item label="任务状态" prop="status">
+      <el-form-item label="任务状态" prop="status" label-width="100px">
         <el-select v-model="queryParams.status" placeholder="请选择任务状态" clearable size="small">
           <el-option
             v-for="dict in statusOptions"
@@ -344,10 +344,10 @@ export default {
       runJob(105, "smgroup")
       localStorage.removeItem('department')
     }else{
-      
+
     }
 
-    
+
     this.getList();
     this.getDicts("sys_job_group").then(response => {
       this.jobGroupOptions = response.data;
@@ -361,8 +361,8 @@ export default {
     getList() {
       this.loading = true;
       listJob(this.queryParams).then(response => {
-        this.jobList = response.rows;
-        this.total = response.total;
+        this.jobList = response.data.rows;
+        this.total = response.data.total;
         this.loading = false;
       });
     },
@@ -531,4 +531,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 5 - 5
src/views/monitor/jobTaskLog/log.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item label="任务名称" prop="jobName">
         <el-input
           v-model="queryParams.jobName"
@@ -27,7 +27,7 @@
           />
         </el-select>
       </el-form-item> -->
-      <el-form-item label="执行状态" prop="status">
+      <el-form-item label="执行状态" prop="status" label-width="100px">
         <el-select
           v-model="queryParams.status"
           placeholder="请选择执行状态"
@@ -43,7 +43,7 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="执行时间">
+      <el-form-item label="执行时间" label-width="100px">
         <el-date-picker
           v-model="dateRange"
           size="small"
@@ -241,8 +241,8 @@ export default {
     getList() {
       this.loading = true;
       listJobLog(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.jobLogList = response.rows;
-          this.total = response.total;
+          this.jobLogList = response.data.rows;
+          this.total = response.data.total;
           this.loading = false;
         }
       );

+ 6 - 6
src/views/monitor/logininfor/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item label="登录地址" prop="ipaddr">
         <el-input
           v-model="queryParams.ipaddr"
@@ -11,7 +11,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="用户名称" prop="userName">
+      <el-form-item label="用户名称" prop="userName" label-width="100px">
         <el-input
           v-model="queryParams.userName"
           placeholder="请输入用户名称"
@@ -21,7 +21,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="状态" prop="status">
+      <el-form-item label="状态" prop="status" label-width="100px">
         <el-select
           v-model="queryParams.status"
           placeholder="登录状态"
@@ -37,7 +37,7 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="登录时间">
+      <el-form-item label="登录时间" label-width="100px">
         <el-date-picker
           v-model="dateRange"
           size="small"
@@ -166,8 +166,8 @@ export default {
     getList() {
       this.loading = true;
       list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.list = response.rows;
-          this.total = response.total;
+          this.list = response.data.rows;
+          this.total = response.data.total;
           this.loading = false;
         }
       );

+ 6 - 6
src/views/monitor/operlog/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
       <el-form-item label="系统模块" prop="title">
         <el-input
           v-model="queryParams.title"
@@ -11,7 +11,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="操作人员" prop="operName">
+      <el-form-item label="操作人员" prop="operName" label-width="100px">
         <el-input
           v-model="queryParams.operName"
           placeholder="请输入操作人员"
@@ -21,7 +21,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="类型" prop="businessType">
+      <el-form-item label="类型" prop="businessType" label-width="100px">
         <el-select
           v-model="queryParams.businessType"
           placeholder="操作类型"
@@ -37,7 +37,7 @@
           />
         </el-select>
       </el-form-item>
-      <el-form-item label="状态" prop="status">
+      <el-form-item label="状态" prop="status" label-width="100px">
         <el-select
           v-model="queryParams.status"
           placeholder="操作状态"
@@ -245,8 +245,8 @@ export default {
     getList() {
       this.loading = true;
       list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
-          this.list = response.rows;
-          this.total = response.total;
+          this.list = response.data.rows;
+          this.total = response.data.total;
           this.loading = false;
         }
       );

+ 3 - 3
src/views/recharge/channel/index.vue

@@ -9,7 +9,7 @@
           size="small"
           style="width: 240px"
           @keyup.enter.native="handleQuery"
-         
+
         />
       </el-form-item>
       <el-form-item>
@@ -49,7 +49,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:admin:remove']"
-        >删除</el-button> 
+        >删除</el-button>
       </el-col>wt注释-->
       <!-- <el-col :span="1.5">
         <el-button
@@ -185,7 +185,7 @@ export default {
         e.returnValue = false
       }
     },
-    
+
     forceUpdate(){ //重置form
       this.form = JSON.parse(JSON.stringify(this.form));
     },

+ 3 - 3
src/views/recharge/userRecharge/index.vue

@@ -52,7 +52,7 @@
       </el-form-item>
     </el-form>
     <div class="qrcode" ref="qrCodeUrl"></div>
-    <!-- <img :src="codeUrl" alt="请扫描二维码支付" v-if="codeUrl" title="请扫描二维码支付"> -->
+    <img :src="codeUrl" alt="请扫描二维码支付" v-if="codeUrl" title="请扫描二维码支付">
   </div>
 </template>
 
@@ -196,7 +196,7 @@ export default {
                 div.removeChild(pObjs[i]);
               }
               topScanPayApi(this.formSubmit).then(response => {
-                this.creatQrCode(response.msg)
+                this.creatQrCode(response.data)
               })
               // scanPayQr(this.form).then(response => {
               //   this.codeUrl = "data:image/gif;base64," + response.msg;
@@ -204,7 +204,7 @@ export default {
               //   this.loading = false
               // });
             }
-            // this.reset()
+            this.reset()
           }
         })
       }

+ 3 - 3
src/views/system/config/index.vue

@@ -247,8 +247,8 @@ export default {
     getList() {
       this.loading = true;
       listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.configList = response.rows;
-          this.total = response.total;
+          this.configList = response.data.rows;
+          this.total = response.data.total;
           this.loading = false;
         }
       );
@@ -367,4 +367,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 3 - 5
src/views/system/dept/index.vue

@@ -85,7 +85,7 @@
 
     <!-- 添加或修改部门对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :before-close="cancel" :close-on-click-modal="false">
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-row>
           <el-col :span="24" v-if="form.parentId !== 0">
             <el-form-item label="上级部门" prop="parentId" width="100%">
@@ -97,8 +97,8 @@
               <el-input v-model="form.deptName" placeholder="请输入部门名称" />
             </el-form-item>
           </el-col>
-          <el-col :span="12">
-            <el-form-item label="显示排序" prop="orderNum">
+          <el-col :span="4">
+            <el-form-item label="显示排序" prop="orderNum" width="100%">
               <el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
             </el-form-item>
           </el-col>
@@ -266,7 +266,6 @@ export default {
       this.open = true;
       this.title = "添加部门";
       listDept().then(response => {
-        console.log(response)
 	        this.deptOptions = this.handleTree(response.data, "deptId");
       });
     },
@@ -280,7 +279,6 @@ export default {
       });
       listDeptExcludeChild(row.deptId).then(response => {
 	        this.deptOptions = this.handleTree(response.data, "deptId");
-          console.log(this.deptOptions)
       });
     },
     /** 提交按钮 */

+ 4 - 4
src/views/system/dict/data.vue

@@ -288,15 +288,15 @@ export default {
     /** 查询字典类型列表 */
     getTypeList() {
       listType().then(response => {
-        this.typeOptions = response.rows;
+        this.typeOptions = response.data.rows;
       });
     },
     /** 查询字典数据列表 */
     getList() {
       this.loading = true;
       listData(this.queryParams).then(response => {
-        this.dataList = response.rows;
-        this.total = response.total;
+        this.dataList = response.data.rows;
+        this.total = response.data.total;
         this.loading = false;
       });
     },
@@ -407,4 +407,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 2 - 2
src/views/system/dict/index.vue

@@ -256,8 +256,8 @@ export default {
     getList() {
       this.loading = true;
       listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.typeList = response.rows;
-          this.total = response.total;
+          this.typeList = response.data.rows;
+          this.total = response.data.total;
           this.loading = false;
         }
       );

+ 6 - 8
src/views/system/menu/index.vue

@@ -325,7 +325,6 @@ export default {
         //   }
         // }
         this.menuList = this.handleTree(response.data, "menuId");
-        console.log(this.menuList )
         this.loading = false;
 
       });
@@ -422,13 +421,12 @@ export default {
         if (valid) {
           this.loading = true
           if (this.form.menuId != undefined) {
-            console.log(this.form)
-            // updateMenu(this.form).then(response => {
-            //   this.loading = false
-            //   this.msgSuccess("修改成功");
-            //   this.open = false;
-            //   this.getList();
-            // });
+            updateMenu(this.form).then(response => {
+              this.loading = false
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
           } else {
             addMenu(this.form).then(response => {
               this.loading = false

+ 2 - 2
src/views/system/notice/index.vue

@@ -241,8 +241,8 @@ export default {
     getList() {
       this.loading = true;
       listNotice(this.queryParams).then(response => {
-        this.noticeList = response.rows;
-        this.total = response.total;
+        this.noticeList = response.data.rows;
+        this.total = response.data.total;
         this.loading = false;
       });
     },

+ 4 - 4
src/views/system/post/index.vue

@@ -113,7 +113,7 @@
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -220,8 +220,8 @@ export default {
     getList() {
       this.loading = true;
       listPost(this.queryParams).then(response => {
-        this.postList = response.rows;
-        this.total = response.total;
+        this.postList = response.data.rows;
+        this.total = response.data.total;
         this.loading = false;
       });
     },
@@ -332,4 +332,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 0 - 1
src/views/system/product/index.vue

@@ -353,7 +353,6 @@ export default {
       });
     },
     uploadFile(param){
-      console.log(param.file)
       this.limit = 1
       document.getElementsByClassName("el-upload--picture-card")[0].style.display="none"
       fileId().then(res=>{

+ 10 - 11
src/views/system/role/index.vue

@@ -375,8 +375,8 @@ export default {
       this.loading = true;
       listRole(this.addDateRange(this.queryParams, this.dateRange)).then(
         response => {
-          this.roleList = response.rows;
-          this.total = response.total;
+          this.roleList = response.data.rows;
+          this.total = response.data.total;
           this.loading = false;
         }
       );
@@ -414,15 +414,14 @@ export default {
     /** 根据角色ID查询菜单树结构 */
     getRoleMenuTreeselect(roleId) {
       return roleMenuTreeselect(roleId).then(response => {
-        console.log(response)
-        this.menuOptions = response.menus;
+        this.menuOptions = response.data.menus;
         return response;
       });
     },
     /** 根据角色ID查询部门树结构 */
     getRoleDeptTreeselect(roleId) {
       return roleDeptTreeselect(roleId).then(response => {
-        this.deptOptions = response.depts;
+        this.deptOptions = response.data.depts;
         return response;
       });
     },
@@ -551,7 +550,7 @@ export default {
         this.open = true;
         this.$nextTick(() => {
           roleMenu.then(res => {
-            let checkedKeys = res.checkedKeys
+            let checkedKeys = res.data.checkedKeys
             checkedKeys.forEach((v) => {
                 this.$nextTick(()=>{
                     this.$refs.menu.setChecked(v, true ,false);
@@ -577,7 +576,7 @@ export default {
         this.openDataScope = true;
         this.$nextTick(() => {
           roleDeptTreeselect.then(res => {
-            this.$refs.dept.setCheckedKeys(res.checkedKeys);
+            this.$refs.dept.setCheckedKeys(res.data.checkedKeys);
           });
         });
         this.title = "分配数据权限";
@@ -596,10 +595,10 @@ export default {
           if (this.form.roleId != undefined) {
             this.form.menuIds = this.getMenuAllCheckedKeys();
             updateRole(this.form).then(response => {
-              // this.loading = false
-              // this.msgSuccess("修改成功");
-              // this.open = false;
-              // this.getList();
+              this.loading = false
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
             });
           } else {
             this.form.menuIds = this.getMenuAllCheckedKeys();

+ 4 - 4
src/views/system/user/authRole.vue

@@ -33,7 +33,7 @@
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
 
     <el-form label-width="100px">
@@ -72,8 +72,8 @@ export default {
     if (userId) {
       this.loading = true;
       getAuthRole(userId).then((response) => {
-        this.form = response.user;
-        this.roles = response.roles;
+        this.form = response.data.user;
+        this.roles = response.data.roles;
         this.total = this.roles.length;
         this.$nextTick(() => {
           this.roles.forEach((row) => {
@@ -115,4 +115,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 9 - 11
src/views/system/user/index.vue

@@ -482,7 +482,6 @@ export default {
     // 根据名称筛选部门树
     deptName(val) {
       this.$refs.tree.filter(val);
-      console.log(this.$refs.tree.filter(val))
     }
   },
   created() {
@@ -503,8 +502,8 @@ export default {
     getList() {
       this.loading = true;
       listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.userList = response.rows;
-          this.total = response.total;
+          this.userList = response.data.rows;
+          this.total = response.data.total;
           this.loading = false;
         }
       );
@@ -513,7 +512,6 @@ export default {
     getTreeselect() {
       treeselect().then(response => {
         this.deptOptions = response.data;
-        console.log(this.deptOptions)
       });
     },
     // 筛选节点
@@ -599,8 +597,8 @@ export default {
       this.reset();
       this.getTreeselect();
       getUser().then(response => {
-        this.postOptions = response.posts;
-        this.roleOptions = response.roles;
+        this.postOptions = response.data.posts;
+        this.roleOptions = response.data.roles;
         this.open = true;
         this.title = "添加用户";
         this.form.password = this.initPassword;
@@ -612,11 +610,11 @@ export default {
       this.getTreeselect();
       const userId = row.userId || this.ids;
       getUser(userId).then(response => {
-        this.form = response.data;
-        this.postOptions = response.posts;
-        this.roleOptions = response.roles;
-        this.form.postIds = response.postIds;
-        this.form.roleIds = response.roleIds;
+        this.form = response.data.data;
+        this.postOptions = response.data.posts;
+        this.roleOptions = response.data.roles;
+        this.form.postIds = response.data.postIds;
+        this.form.roleIds = response.data.roleIds;
         this.open = true;
         this.title = "修改用户";
         this.form.password = "";

+ 2 - 2
src/views/system/user/profile/userAvatar.vue

@@ -132,7 +132,7 @@ export default {
         formData.append("avatarfile", data);
         uploadAvatar(formData).then(response => {
           this.open = false;
-          this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
+          this.options.img = process.env.VUE_APP_BASE_API + response.data.imgUrl;
           store.commit('SET_AVATAR', this.options.img);
           this.msgSuccess("修改成功");
           this.visible = false;
@@ -175,4 +175,4 @@ export default {
   line-height: 110px;
   border-radius: 50%;
 }
-</style>
+</style>

+ 1 - 1
vue.config.js

@@ -125,4 +125,4 @@ module.exports = {
                 }
             )
     }
-}
+}

BIN
vuedx.zip


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/index.html


+ 0 - 1
vuedx/static/css/chunk-12b22cd5.ec29d85d.css

@@ -1 +0,0 @@
-.bg[data-v-42952d1a]{width:100%;height:100%;overflow:hidden;position:fixed;top:0;left:0;z-index:-1}.bg .bgimg[data-v-42952d1a]{width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1}.logo[data-v-42952d1a]{width:100%;position:fixed;top:0}.logo img[data-v-42952d1a]{width:152px;margin:10px 2rem 0 20px;vertical-align:middle}.logo .logo_txt[data-v-42952d1a]{font-size:1.5rem;color:#fff;vertical-align:middle;letter-spacing:4px}.login[data-v-42952d1a]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;background-size:cover}.title[data-v-42952d1a]{margin:0 auto 30px auto;text-align:left;color:#000;font-size:20px}.title span[data-v-42952d1a]{margin-left:10px;opacity:.25}.login-form[data-v-42952d1a]{border-radius:6px;background:#fff;width:456px;padding:63px 35px}.login-form .el-input[data-v-42952d1a]{height:40px;font-size:16px!important}.login-form .el-input input[data-v-42952d1a]{height:40px}.login-form .input-icon[data-v-42952d1a]{height:39px;width:14px;margin-left:2px}.login-tip[data-v-42952d1a]{font-size:13px;text-align:center;color:#bfbfbf}.login-code[data-v-42952d1a]{width:33%;height:38px;float:right}.login-code img[data-v-42952d1a]{cursor:pointer;vertical-align:middle}.el-login-footer[data-v-42952d1a]{height:40px;line-height:40px;position:fixed;bottom:0;width:100%;text-align:center;color:#fff;font-family:Arial;font-size:12px;letter-spacing:1px}.login-code-img[data-v-42952d1a]{height:38px}[data-v-42952d1a] .el-input__inner{height:36px!important;line-height:36px!important}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/css/chunk-3f6061a6.4a252ff2.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/css/chunk-4fe9afba.d65d9467.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/css/chunk-52101fb7.556d8fdc.css


+ 1 - 1
vuedx/static/css/chunk-1c3eafb5.0da3fcb4.css → vuedx/static/css/chunk-58e08142.4f216fb8.css

@@ -1 +1 @@
-.user-info-head[data-v-1ccee4f2]{position:relative;display:inline-block;height:120px}.user-info-head[data-v-1ccee4f2]:hover:after{content:"+";position:absolute;left:0;right:0;top:0;bottom:0;color:#eee;background:rgba(0,0,0,.5);font-size:24px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;cursor:pointer;line-height:110px;border-radius:50%}
+.user-info-head[data-v-20a6c9d6]{position:relative;display:inline-block;height:120px}.user-info-head[data-v-20a6c9d6]:hover:after{content:"+";position:absolute;left:0;right:0;top:0;bottom:0;color:#eee;background:rgba(0,0,0,.5);font-size:24px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;cursor:pointer;line-height:110px;border-radius:50%}

+ 1 - 0
vuedx/static/css/chunk-f98c8d3a.e4bdabf8.css

@@ -0,0 +1 @@
+.bg[data-v-12575b28]{width:100%;height:100%;overflow:hidden;position:fixed;top:0;left:0;z-index:-1}.bg .bgimg[data-v-12575b28]{width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1}.logo[data-v-12575b28]{width:100%;position:fixed;top:0}.logo img[data-v-12575b28]{width:152px;margin:10px 2rem 0 20px;vertical-align:middle}.logo .logo_txt[data-v-12575b28]{font-size:1.5rem;color:#fff;vertical-align:middle;letter-spacing:4px}.login[data-v-12575b28]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;background-size:cover}.title[data-v-12575b28]{margin:0 auto 30px auto;text-align:left;color:#000;font-size:20px}.title span[data-v-12575b28]{margin-left:10px;opacity:.25}.login-form[data-v-12575b28]{border-radius:6px;background:#fff;width:456px;padding:63px 35px}.login-form .el-input[data-v-12575b28]{height:40px;font-size:16px!important}.login-form .el-input input[data-v-12575b28]{height:40px}.login-form .input-icon[data-v-12575b28]{height:39px;width:14px;margin-left:2px}.login-tip[data-v-12575b28]{font-size:13px;text-align:center;color:#bfbfbf}.login-code[data-v-12575b28]{width:33%;height:38px;float:right}.login-code img[data-v-12575b28]{cursor:pointer;vertical-align:middle}.el-login-footer[data-v-12575b28]{height:40px;line-height:40px;position:fixed;bottom:0;width:100%;text-align:center;color:#fff;font-family:Arial;font-size:12px;letter-spacing:1px}.login-code-img[data-v-12575b28]{height:38px}[data-v-12575b28] .el-input__inner{height:36px!important;line-height:36px!important}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/js/app.65128c5f.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/js/app.c2880147.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/js/chunk-12b22cd5.0527daef.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/js/chunk-1546e5c6.a33540c0.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/js/chunk-1c3eafb5.0c86e8af.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/js/chunk-3f6061a6.63ae80e9.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/js/chunk-4fe9afba.fcee9f7a.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/js/chunk-52101fb7.3825eb3a.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/js/chunk-58e08142.c9f8ea16.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
vuedx/static/js/chunk-f98c8d3a.903cec6a.js


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff