فهرست منبع

1.人员管理模块调整
2.添加用户头像

haizhouwang 2 سال پیش
والد
کامیت
7843e785c2

+ 2 - 2
config/dev.env.js

@@ -5,9 +5,9 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
   ENV_CONFIG:'"dev"',
-  // BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
+  BASE_URL: '"http://39.98.239.48/web-api"',//测试服务器
   // BASE_URL:'"http://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL:'"http://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
-  BASE_URL: '"http://192.168.0.115:8080/"' //凯森
+  // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
   // BASE_URL: '"http:///192.168.0.253:8082/"',//田智
   // BASE_URL: '"http:///192.168.0.253:8082/"',//田智
 })
 })
 
 

+ 0 - 7
src/components/PeopleImage/index.vue

@@ -197,12 +197,10 @@ export default {
     }
     }
   },
   },
   created() {
   created() {
-    console.log(this.dataForm)
   },
   },
   methods: {
   methods: {
     //预览图片
     //预览图片
     handlePictureCardPreview(img) {
     handlePictureCardPreview(img) {
-      console.log(img)
       if(!img){
       if(!img){
         this.$message.error('暂无照片')
         this.$message.error('暂无照片')
         return 
         return 
@@ -216,7 +214,6 @@ export default {
     },
     },
     // 上传图片的方法Start
     // 上传图片的方法Start
     beforeAvatarUpload(file) {
     beforeAvatarUpload(file) {
-      console.log(file);
       const isJPG = file.type === "image/jpeg" || file.type === "image/png";
       const isJPG = file.type === "image/jpeg" || file.type === "image/png";
       const isLt2M = file.size / 1024 / 1024 < 2;
       const isLt2M = file.size / 1024 / 1024 < 2;
       if (!isJPG) {
       if (!isJPG) {
@@ -229,7 +226,6 @@ export default {
     },
     },
     //上传影像
     //上传影像
     httpRequest(options) {
     httpRequest(options) {
-      console.log(options);
       let file = options.file;
       let file = options.file;
       let filename = options.filename;
       let filename = options.filename;
       let reader = new FileReader();
       let reader = new FileReader();
@@ -240,12 +236,10 @@ export default {
         let base64Str = reader.result;
         let base64Str = reader.result;
         this.dataForm[options.filename] = base64Str;
         this.dataForm[options.filename] = base64Str;
       };
       };
-      console.log(this.dataForm)
       const params = new FormData(); // 声明formData数据类型
       const params = new FormData(); // 声明formData数据类型
       params.append("multipartFile", file);
       params.append("multipartFile", file);
       params.append("type", "personnel");
       params.append("type", "personnel");
       this.$api.letter.uploadFile(params).then(res => {
       this.$api.letter.uploadFile(params).then(res => {
-        console.log(res)
         if (res.code == "200") {
         if (res.code == "200") {
           if (this.imagesIdList.some(v => v.type == filename)) {
           if (this.imagesIdList.some(v => v.type == filename)) {
             this.imagesIdList.map(val => {
             this.imagesIdList.map(val => {
@@ -259,7 +253,6 @@ export default {
               type: filename,
               type: filename,
             })
             })
           }
           }
-          console.log(this.imagesIdList)
         }
         }
       });
       });
     },
     },

+ 8 - 0
src/http/moudules/role.js

@@ -50,4 +50,12 @@ export const saveRoleMenus = (data) => {
         method: 'post',
         method: 'post',
         data
         data
     })
     })
+}
+
+// 查询角色数据
+export const findRoleByUserId = (data) => {
+    return axios({
+      url: '/role/findRoleByUserId',
+      method: 'get'
+    })
 }
 }

+ 9 - 3
src/views/Core/PersonalPanel.vue

@@ -2,7 +2,8 @@
   <div class="personal-panel">
   <div class="personal-panel">
     <div class="personal-desc" :style="{ 'background': this.$store.state.app.themeColor }">
     <div class="personal-desc" :style="{ 'background': this.$store.state.app.themeColor }">
       <div class="avatar-container u-f u-f-ajc">
       <div class="avatar-container u-f u-f-ajc">
-        <img class="avatar" :src="require('@/assets/user.png')" />
+        <!-- <img class="avatar" :src="require('@/assets/user.png')" /> -->
+        <img class="avatar" :src="user.headSculpture?user.headSculpture:avatar" />
       </div>
       </div>
       <!-- <div class="name-role">
       <!-- <div class="name-role">
         <template v-if="user.name == 'admin'">
         <template v-if="user.name == 'admin'">
@@ -27,7 +28,7 @@
         <div class="registe-info">
         <div class="registe-info">
           <span class="registe-info">
           <span class="registe-info">
             <li class="fa fa-clock-o"></li>
             <li class="fa fa-clock-o"></li>
-            {{ user.createTime.substr(0,10) }}
+            {{ user.createTime }}
           </span>
           </span>
         </div>
         </div>
       </template>
       </template>
@@ -107,7 +108,8 @@ export default {
         jobCode: "",
         jobCode: "",
         jobName: "",
         jobName: "",
         // role: "超级管理员",
         // role: "超级管理员",
-        registeInfo: "注册时间:2018-12-25 "
+        registeInfo: "注册时间:2018-12-25 ",
+        createTime:'',
       }
       }
     }
     }
   },
   },
@@ -119,6 +121,7 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+      avatar: require("@/assets/user.png"),
     }
     }
   },
   },
   created(){
   created(){
@@ -129,6 +132,9 @@ export default {
       //   });
       //   });
       // }
       // }
   },
   },
+  mounted() {
+    this.user.createTime = this.user.createTime.substr(0,10)
+  },
   methods: {
   methods: {
 
 
     //闪电增员
     //闪电增员

+ 6 - 3
src/views/HeadBar/HeadBar.vue

@@ -61,7 +61,7 @@
         </el-menu-item>
         </el-menu-item>
         <el-menu-item index="5" v-popover:popover-personal>
         <el-menu-item index="5" v-popover:popover-personal>
           <!-- 用户信息 -->
           <!-- 用户信息 -->
-          <span class="user-info"><img :src="avatar" />{{ userData.name }}</span>
+          <span class="user-info"><img :src="userData.headSculpture?userData.headSculpture:avatar" />{{ userData.name }}</span>
           <el-popover ref="popover-personal" placement="bottom-end" trigger="click" :visible-arrow="false">
           <el-popover ref="popover-personal" placement="bottom-end" trigger="click" :visible-arrow="false">
             <personal-panel :user="userData"></personal-panel>
             <personal-panel :user="userData"></personal-panel>
           </el-popover>
           </el-popover>
@@ -119,7 +119,7 @@ export default {
       sum: null,
       sum: null,
       datawidth: 1920,
       datawidth: 1920,
       screenWidth: document.body.clientWidth,
       screenWidth: document.body.clientWidth,
-      userData: JSON.parse(localStorage.getItem('user_data'))  ,
+      userData: {},
       activeIndex: '86',
       activeIndex: '86',
       langVisible: false,
       langVisible: false,
       avatar: require("@/assets/user.png"),
       avatar: require("@/assets/user.png"),
@@ -132,8 +132,11 @@ export default {
       }
       }
     if(!JSON.parse(localStorage.getItem('user_data'))){
     if(!JSON.parse(localStorage.getItem('user_data'))){
       this.$api.user.getLoginUser().then((response) => {
       this.$api.user.getLoginUser().then((response) => {
-          this.userData=response.data
+        response.data.headSculpture = response.data.headSculpture?process.env.BASE_URL +response.data.headSculpture:response.data.headSculpture
+        this.userData=response.data
       })
       })
+    }else{
+      this.userData=JSON.parse(localStorage.getItem('user_data'))
     }
     }
     if(this.screenWidth<=1260){
     if(this.screenWidth<=1260){
       this.sum = Math.ceil((this.datawidth - this.screenWidth) / 100)
       this.sum = Math.ceil((this.datawidth - this.screenWidth) / 100)

+ 4 - 0
src/views/Login.vue

@@ -168,6 +168,10 @@ export default {
           this.getDictItems()
           this.getDictItems()
           this.$api.user.getLoginUser().then((response) => {
           this.$api.user.getLoginUser().then((response) => {
             if(response.code==200){
             if(response.code==200){
+              //头像地址拼接
+              if(response.data.headSculpture!=''&&response.data.headSculpture!=null&&response.data.headSculpture!=undefined){
+                response.data.headSculpture = process.env.BASE_URL +response.data.headSculpture
+              }
               localStorage.setItem('user_data', JSON.stringify(response.data)) 
               localStorage.setItem('user_data', JSON.stringify(response.data)) 
             }
             }
             else{
             else{

+ 1 - 0
src/views/PeopleManage/Agent/AgentManage.vue

@@ -587,6 +587,7 @@ export default {
         let day = myDate.getDate();
         let day = myDate.getDate();
           sex = iden.substring(16,17);
           sex = iden.substring(16,17);
           birth = iden.substring(6,10)+"-"+iden.substring(10,12)+"-"+iden.substring(12,14);
           birth = iden.substring(6,10)+"-"+iden.substring(10,12)+"-"+iden.substring(12,14);
+          let age = 0;
           if (iden.substring(10, 12) < month || iden.substring(10, 12) == month && iden.substring(12, 14) <= day) age++;
           if (iden.substring(10, 12) < month || iden.substring(10, 12) == month && iden.substring(12, 14) <= day) age++;
         if(sex%2 === 0)
         if(sex%2 === 0)
           sex = '女';
           sex = '女';

+ 3 - 7
src/views/PeopleManage/Player/PlayerManage.vue

@@ -21,7 +21,7 @@
   
   
           <!-- 右侧列表页面Start -->
           <!-- 右侧列表页面Start -->
           <SplitArea :size="rightSplitWidth">
           <SplitArea :size="rightSplitWidth">
-            <templateTable :formList="formList" :searchData.sync="queryFrom" :tableConfig="tableConfig" :btnGroup="btnGroup"
+            <templateTable :formList="formList" :searchData.sync="queryFrom" :tableConfig="tableConfig"
               :data="pageResult" @getList="findPage" @handleSearchList="handleSearchList" :pagination="pageData">
               :data="pageResult" @getList="findPage" @handleSearchList="handleSearchList" :pagination="pageData">
             </templateTable>
             </templateTable>
           </SplitArea>
           </SplitArea>
@@ -129,8 +129,8 @@
     data() {
     data() {
       return {
       return {
         activeName: '1', //弹框tab索引
         activeName: '1', //弹框tab索引
-        isShow:true,
-        formList: [
+        isShow:true, //密码是否显示 
+        formList: [ //树右侧搜索数据列
           {
           {
             label: "工号",
             label: "工号",
             prop: "userId",
             prop: "userId",
@@ -153,10 +153,6 @@
             options: JSON.parse(localStorage.getItem('user_statusoptions'))
             options: JSON.parse(localStorage.getItem('user_statusoptions'))
           },
           },
         ],
         ],
-        btnGroup: [{
-          name: 'upload',
-          slot: true
-        },],
         tableConfig: {
         tableConfig: {
           columns: [
           columns: [
             // 数据列
             // 数据列

+ 1 - 0
src/views/PeopleManage/Seo/StaffSeo.vue

@@ -612,6 +612,7 @@ export default {
         let day = myDate.getDate();
         let day = myDate.getDate();
           sex = iden.substring(16,17);
           sex = iden.substring(16,17);
           birth = iden.substring(6,10)+"-"+iden.substring(10,12)+"-"+iden.substring(12,14);
           birth = iden.substring(6,10)+"-"+iden.substring(10,12)+"-"+iden.substring(12,14);
+          let age = 0;
           if (iden.substring(10, 12) < month || iden.substring(10, 12) == month && iden.substring(12, 14) <= day) age++;
           if (iden.substring(10, 12) < month || iden.substring(10, 12) == month && iden.substring(12, 14) <= day) age++;
         if(sex%2 === 0)
         if(sex%2 === 0)
           sex = '女';
           sex = '女';

+ 25 - 19
src/views/PeopleManage/Staff/StaffManage.vue

@@ -462,7 +462,7 @@ export default {
         { validator: validateSfz }], 
         { validator: validateSfz }], 
         },
         },
         formDataDetail: {},
         formDataDetail: {},
-      formDataRulesDetail: {
+      formDataRulesDetail: { //详情信息内容校验规则
         // accountno: [{ required: true, message: "请填写开户账号", trigger: "blur" }],
         // accountno: [{ required: true, message: "请填写开户账号", trigger: "blur" }],
         // address: [{ required: true, message: "请填写居住地址", trigger: "blur" }],
         // address: [{ required: true, message: "请填写居住地址", trigger: "blur" }],
         // bankName: [{ required: true, message: "请填写开户行", trigger: "blur" }],
         // bankName: [{ required: true, message: "请填写开户行", trigger: "blur" }],
@@ -546,7 +546,7 @@ export default {
       deptInfo: {}, //选中机构的基本信息
       deptInfo: {}, //选中机构的基本信息
       sexoptions: JSON.parse(localStorage.getItem('sexOptions')) ,
       sexoptions: JSON.parse(localStorage.getItem('sexOptions')) ,
       user_statusoptions: JSON.parse(localStorage.getItem('user_statusoptions')) ,
       user_statusoptions: JSON.parse(localStorage.getItem('user_statusoptions')) ,
-      roles: JSON.parse(localStorage.getItem('find_all')) ,
+      roles: [],
       option: [], //机构列表
       option: [], //机构列表
       //影像资料
       //影像资料
       dataForm: {
       dataForm: {
@@ -570,7 +570,7 @@ export default {
     // this.getDictItems("sex");
     // this.getDictItems("sex");
     // this.getDictItems("user_status");
     // this.getDictItems("user_status");
     this.findLeftTreeData(); // 获取机构树的数据
     this.findLeftTreeData(); // 获取机构树的数据
-
+    this.getFindRoleByUserId();
   },
   },
   mounted() {
   mounted() {
     //用像素初始化左边的split的宽度
     //用像素初始化左边的split的宽度
@@ -587,6 +587,12 @@ export default {
     },
     },
   },
   },
   methods: {
   methods: {
+    //获取角色数据
+    getFindRoleByUserId(){
+      this.$api.role.findRoleByUserId().then(res=>{
+        this.roles = res.data
+      })
+    },
     //状态改变时
     //状态改变时
     statusChange(e){
     statusChange(e){
       if(e==0){
       if(e==0){
@@ -601,20 +607,21 @@ export default {
       this.isShow=!this.isShow
       this.isShow=!this.isShow
     },
     },
     identityChange(iden){
     identityChange(iden){
-        let sex = null;
-        let birth = null;
-        let myDate = new Date();
-        let month = myDate.getMonth() + 1;
-        let day = myDate.getDate();
-          sex = iden.substring(16,17);
-          birth = iden.substring(6,10)+"-"+iden.substring(10,12)+"-"+iden.substring(12,14);
-          if (iden.substring(10, 12) < month || iden.substring(10, 12) == month && iden.substring(12, 14) <= day) age++;
-        if(sex%2 === 0)
-          sex = '女';
-        else
-          sex = '男';
-          this.formDataDetail.birthday=birth
-          this.formDataDetail.sex=this.sexoptions.find(val=>sex==val.label).value
+      let sex = null;
+      let birth = null;
+      let myDate = new Date();
+      let month = myDate.getMonth() + 1;
+      let day = myDate.getDate();
+        sex = iden.substring(16,17);
+        birth = iden.substring(6,10)+"-"+iden.substring(10,12)+"-"+iden.substring(12,14);
+        let age = 0;
+        if (iden.substring(10, 12) < month || iden.substring(10, 12) == month && iden.substring(12, 14) <= day) age++;
+      if(sex%2 === 0)
+        sex = '女';
+      else
+        sex = '男';
+        this.formDataDetail.birthday=birth
+        this.formDataDetail.sex=this.sexoptions.find(val=>sex==val.label).value
     },
     },
     // 查询Start
     // 查询Start
     queryStaffInfo() {
     queryStaffInfo() {
@@ -704,9 +711,8 @@ export default {
               val.status=this.user_statusoptions.find(ele=>ele.value==val.status).label
               val.status=this.user_statusoptions.find(ele=>ele.value==val.status).label
             }
             }
             if(val.roleId&& val.roleId!==''&& val.roleId!==null){
             if(val.roleId&& val.roleId!==''&& val.roleId!==null){
-              val.roleId=this.roles.find(ele=>ele.id==val.roleId).name
+              val.roleId=val.roleName
             }
             }
-            
           })
           })
           this.pageResult = res.data;
           this.pageResult = res.data;
         })
         })

+ 1 - 0
src/views/PeopleManage/TeamLeader/TeamLeaderManage.vue

@@ -625,6 +625,7 @@ export default {
         let day = myDate.getDate();
         let day = myDate.getDate();
           sex = iden.substring(16,17);
           sex = iden.substring(16,17);
           birth = iden.substring(6,10)+"-"+iden.substring(10,12)+"-"+iden.substring(12,14);
           birth = iden.substring(6,10)+"-"+iden.substring(10,12)+"-"+iden.substring(12,14);
+          let age = 0;
           if (iden.substring(10, 12) < month || iden.substring(10, 12) == month && iden.substring(12, 14) <= day) age++;
           if (iden.substring(10, 12) < month || iden.substring(10, 12) == month && iden.substring(12, 14) <= day) age++;
         if(sex%2 === 0)
         if(sex%2 === 0)
           sex = '女';
           sex = '女';