123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349 |
- <template>
- <div>
- <cu-custom bgColor="bg-gradual-pink" :isBack="true">
- <block slot="backText">返回</block>
- <block slot="content">个人资料</block>
- </cu-custom>
- <!-- <div class="top" @click="ret()">
- <div style="width: 10%;height: 5px;"></div>
- <div style="margin-left: 10px;">
- <span style="float: left;width: 20px;height: 20px;">
- <image src="../../static/icon/fanhui3.png" style="width: 18px;height: 18px;"></image>
- </span>
- <div style="margin-top: 5px;">
- <span style="color: #FFFFFF;">返回</span>
- </div>
- </div>
- <div style="text-align: center;margin-top: -22px;">
- <span style="color: #FFFFFF;">个人中心</span>
- </div>
- </div> -->
- <!-- <div class="panl" >
- <div style="width: 100%;height: 20px;"></div>
- <div class="card">
- <br>
- <div style="margin-left: 20px;margin-top: -10px;">
- <div>
- <h2>{{personalList.username}}
- <image src="../../static/icon/xbnv.png" class="ic" v-if="personalList.sex=='2'"></image>
- <image src="../../static/icon/xbn.png" class="ic" v-if="personalList.sex=='1'"></image>
- <image src="../../static/icon/xbn.png" class="ic" v-if="personalList.sex ==''"></image>
- </h2>
- </div> -->
- <!-- <div style="margin-top: -20px;border-radius:50%; overflow:hidden;">
- <span style="margin-left: 80%;">
- <image :src="personalList.avatar" class="imgs"></image>
- </span>
- </div> -->
- <!-- <div style="width:60px; height:60px; border-radius:50%; overflow:hidden;margin-left: 80%;margin-top: -20px;">
- <image :src="personalList.avatar" style="width:60px; height:60px;"></image>
- </div>
- <div style="margin-top: -35px;">
- <span class="fontColr">{{personalList.phone}}</span>
- </div>
-
- <div style="margin-top: 0px;">
- <span class="fontColr">{{personalList.email}}</span>
- </div>
-
- </div>
- </div>
-
- <br>
- </div> -->
- <div style="background-color: #FFFFFF; ">
- <ul>
- <li class="s">
- <div style="width: 10;height: 30px;"></div>
-
- <span class="fontColrs">头像</span>
-
- <span style="width: 10px;height: 10px;float: right;"></span>
- <div style="float: right; width:40px; height:40px; border-radius:50%; overflow:hidden;margin-top: -10px;">
- <image :src="personalList.avatar" style="width:40px; height:40px;"></image>
- </div>
- <br>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
-
- <span class="fontColrs">账号</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.username}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
-
- <span class="fontColrs">工号</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.workNo}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">姓名</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.realname}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
-
- <span class="fontColrs">性别</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;" v-if="personalList.sex=='2'">女</span>
- <span style="float: right;" v-if="personalList.sex=='1'">男</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">英文名</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.egName}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">职位</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.post}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">部门</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.orgCodeTxt}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">邮箱</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.email}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">手机号码</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.phone}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">出生日期</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.birthDate}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">入职日期</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.entryDate}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">紧急联系人</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.urgentName}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">联系人电话</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.urgentPhone}}</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">当前可用年假</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.availableDay/24}}天</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">当前剩余调休</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;">{{personalList.leaveDate}}小时</span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- <div style="width: 10;height: 10px;"></div>
- </li>
- <li class="s">
- <span class="fontColrs">考勤记录</span>
- <span style="width: 10px;height: 10px;float: right;"></span>
- <span style="float: right;color: #0081FF;" v-if='personalList.sum=="2"' @click="sign()">本月无异常</span>
- <span style="float: right;color: red;" v-if='personalList.sum=="1"' @click="sign()">
- 本月有异常
- <div style="float: right;margin-top: 1.5px;" >
- <image style="width: 13px; height: 13px;" src="../../static/icon/redjt.png"></image>
- </div>
- </span>
- <br>
- <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
- </li>
- </ul>
- </div>
- <br>
-
- <!-- <button style="background-color: red;color: #FFFFFF;" @click="exit()">退出</button> -->
- </div>
- </template>
- <script>
- import api from '@/api/api'
- export default {
- data() {
- return {
- t:false,
- personalList:{
- avatar:'',
- realname:'',
- username:'',
- post:'',
- depart:'',
- phone:'',
- workNo:'',
- birthday:'',
- email:'',
- sex:'',
- egName:'',
- birthDate:'',
- entryDate:'',
- urgentName:'',
- urgentPhone:'',
- availableDay:'',
- orgCodeTxt:'',
- leaveDate:'',
- sum:''
- },
- userUrl:'/sys/user/queryById',
- }
- },
- created() {
-
- this.load();
-
- },methods:{
- upload(){
-
- },
- load(){
- this.$http.get(this.userUrl,{params:{id:this.$store.getters.userid}}).then(res=>{
- console.log("res",res)
- let perArr = res.data.data;
- let avatar=(perArr.avatar && perArr.avatar.length > 0)? api.getFileAccessHttpUrl(perArr.avatar):'/static/avatar_boy.png'
- this.personalList.avatar =avatar
- this.personalList.realname = perArr.realname
- this.personalList.username = perArr.username
- this.personalList.post = perArr.post
- this.personalList.depart = perArr.departIds
- this.personalList.phone=perArr.phone
- this.personalList.workNo=perArr.workNo
- this.personalList.birthday=perArr.birthday
- this.personalList.email=perArr.email
- this.personalList.sex=perArr.sex
- this.personalList.egName=perArr.egName
- this.personalList.birthDate=perArr.birthDate
- this.personalList.entryDate=perArr.entryDate
- this.personalList.urgentName=perArr.urgentName
- this.personalList.urgentPhone=perArr.urgentPhone
- if(res.data.sign!="" &&res.data.sign!=undefined){
- this.personalList.availableDay=res.data.sign.availableDay
- this.personalList.leaveDate=res.data.sign.leaveDate
- }
- this.personalList.orgCodeTxt=perArr.orgCodeTxt
-
- this.personalList.sum=res.data.sum
-
-
-
- }).catch(err => {
- console.log(err);
- });
-
- } ,
- exit(){
- this.$Router.push({name:'userexit'})
- },
- ret(){
- this.$Router.push({name:'index'})
- },
- sign(){
- this.$Router.push({name:'usersign'})
- }
-
- }
-
- }
- </script>
- <style>
- .panl{
- /* background-image: url(../../static/bj001.jpeg);
- background-size:100% 100%; */
-
- }
- .card{
-
- background-color: #FFFFFF;
- width: 95%;
- height: 105px;
- margin: 0 auto;
- border-radius:5px 5px 5px 5px;
- box-shadow:0 4px 8px 0 rgba(255, 255, 255, 0.2),0 6px 20px 0 rgba(255, 255, 255, 0.2);
- }
- .imgs{
- width: 60px;
- height: 60px;
- /* border-radius:5px 5px 5px 5px; */
- border-radius:50%;
- }
- .fontColr{
- color: #0081FF;
- font-size: 13px;
- }
-
- .s{
-
- list-style-type:none;
- margin-left: -20px;
- }
- .fontColrs{
- color: #A3A7B1;
- }
- .ic{
- width: 20px;
- height: 20px;
-
- margin-left: 10px;
- }
-
- .top{
- background-color: #5677AC;
- width: 100%;
- height: 40px;
- }
- </style>
|