personaldetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. <template>
  2. <div>
  3. <cu-custom bgColor="bg-gradual-pink" :isBack="true">
  4. <block slot="backText">返回</block>
  5. <block slot="content">个人资料</block>
  6. </cu-custom>
  7. <!-- <div class="top" @click="ret()">
  8. <div style="width: 10%;height: 5px;"></div>
  9. <div style="margin-left: 10px;">
  10. <span style="float: left;width: 20px;height: 20px;">
  11. <image src="../../static/icon/fanhui3.png" style="width: 18px;height: 18px;"></image>
  12. </span>
  13. <div style="margin-top: 5px;">
  14. <span style="color: #FFFFFF;">返回</span>
  15. </div>
  16. </div>
  17. <div style="text-align: center;margin-top: -22px;">
  18. <span style="color: #FFFFFF;">个人中心</span>
  19. </div>
  20. </div> -->
  21. <!-- <div class="panl" >
  22. <div style="width: 100%;height: 20px;"></div>
  23. <div class="card">
  24. <br>
  25. <div style="margin-left: 20px;margin-top: -10px;">
  26. <div>
  27. <h2>{{personalList.username}}
  28. <image src="../../static/icon/xbnv.png" class="ic" v-if="personalList.sex=='2'"></image>
  29. <image src="../../static/icon/xbn.png" class="ic" v-if="personalList.sex=='1'"></image>
  30. <image src="../../static/icon/xbn.png" class="ic" v-if="personalList.sex ==''"></image>
  31. </h2>
  32. </div> -->
  33. <!-- <div style="margin-top: -20px;border-radius:50%; overflow:hidden;">
  34. <span style="margin-left: 80%;">
  35. <image :src="personalList.avatar" class="imgs"></image>
  36. </span>
  37. </div> -->
  38. <!-- <div style="width:60px; height:60px; border-radius:50%; overflow:hidden;margin-left: 80%;margin-top: -20px;">
  39. <image :src="personalList.avatar" style="width:60px; height:60px;"></image>
  40. </div>
  41. <div style="margin-top: -35px;">
  42. <span class="fontColr">{{personalList.phone}}</span>
  43. </div>
  44. <div style="margin-top: 0px;">
  45. <span class="fontColr">{{personalList.email}}</span>
  46. </div>
  47. </div>
  48. </div>
  49. <br>
  50. </div> -->
  51. <div style="background-color: #FFFFFF; ">
  52. <ul>
  53. <li class="s">
  54. <div style="width: 10;height: 30px;"></div>
  55. <span class="fontColrs">头像</span>
  56. <span style="width: 10px;height: 10px;float: right;"></span>
  57. <div style="float: right; width:40px; height:40px; border-radius:50%; overflow:hidden;margin-top: -10px;">
  58. <image :src="personalList.avatar" style="width:40px; height:40px;"></image>
  59. </div>
  60. <br>
  61. <br>
  62. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  63. <div style="width: 10;height: 10px;"></div>
  64. </li>
  65. <li class="s">
  66. <span class="fontColrs">账号</span>
  67. <span style="width: 10px;height: 10px;float: right;"></span>
  68. <span style="float: right;">{{personalList.username}}</span>
  69. <br>
  70. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  71. <div style="width: 10;height: 10px;"></div>
  72. </li>
  73. <li class="s">
  74. <span class="fontColrs">工号</span>
  75. <span style="width: 10px;height: 10px;float: right;"></span>
  76. <span style="float: right;">{{personalList.workNo}}</span>
  77. <br>
  78. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  79. <div style="width: 10;height: 10px;"></div>
  80. </li>
  81. <li class="s">
  82. <span class="fontColrs">姓名</span>
  83. <span style="width: 10px;height: 10px;float: right;"></span>
  84. <span style="float: right;">{{personalList.realname}}</span>
  85. <br>
  86. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  87. <div style="width: 10;height: 10px;"></div>
  88. </li>
  89. <li class="s">
  90. <span class="fontColrs">性别</span>
  91. <span style="width: 10px;height: 10px;float: right;"></span>
  92. <span style="float: right;" v-if="personalList.sex=='2'">女</span>
  93. <span style="float: right;" v-if="personalList.sex=='1'">男</span>
  94. <br>
  95. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  96. <div style="width: 10;height: 10px;"></div>
  97. </li>
  98. <li class="s">
  99. <span class="fontColrs">英文名</span>
  100. <span style="width: 10px;height: 10px;float: right;"></span>
  101. <span style="float: right;">{{personalList.egName}}</span>
  102. <br>
  103. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  104. <div style="width: 10;height: 10px;"></div>
  105. </li>
  106. <li class="s">
  107. <span class="fontColrs">职位</span>
  108. <span style="width: 10px;height: 10px;float: right;"></span>
  109. <span style="float: right;">{{personalList.post}}</span>
  110. <br>
  111. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  112. <div style="width: 10;height: 10px;"></div>
  113. </li>
  114. <li class="s">
  115. <span class="fontColrs">部门</span>
  116. <span style="width: 10px;height: 10px;float: right;"></span>
  117. <span style="float: right;">{{personalList.orgCodeTxt}}</span>
  118. <br>
  119. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  120. <div style="width: 10;height: 10px;"></div>
  121. </li>
  122. <li class="s">
  123. <span class="fontColrs">邮箱</span>
  124. <span style="width: 10px;height: 10px;float: right;"></span>
  125. <span style="float: right;">{{personalList.email}}</span>
  126. <br>
  127. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  128. <div style="width: 10;height: 10px;"></div>
  129. </li>
  130. <li class="s">
  131. <span class="fontColrs">手机号码</span>
  132. <span style="width: 10px;height: 10px;float: right;"></span>
  133. <span style="float: right;">{{personalList.phone}}</span>
  134. <br>
  135. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  136. <div style="width: 10;height: 10px;"></div>
  137. </li>
  138. <li class="s">
  139. <span class="fontColrs">出生日期</span>
  140. <span style="width: 10px;height: 10px;float: right;"></span>
  141. <span style="float: right;">{{personalList.birthDate}}</span>
  142. <br>
  143. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  144. <div style="width: 10;height: 10px;"></div>
  145. </li>
  146. <li class="s">
  147. <span class="fontColrs">入职日期</span>
  148. <span style="width: 10px;height: 10px;float: right;"></span>
  149. <span style="float: right;">{{personalList.entryDate}}</span>
  150. <br>
  151. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  152. <div style="width: 10;height: 10px;"></div>
  153. </li>
  154. <li class="s">
  155. <span class="fontColrs">紧急联系人</span>
  156. <span style="width: 10px;height: 10px;float: right;"></span>
  157. <span style="float: right;">{{personalList.urgentName}}</span>
  158. <br>
  159. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  160. <div style="width: 10;height: 10px;"></div>
  161. </li>
  162. <li class="s">
  163. <span class="fontColrs">联系人电话</span>
  164. <span style="width: 10px;height: 10px;float: right;"></span>
  165. <span style="float: right;">{{personalList.urgentPhone}}</span>
  166. <br>
  167. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  168. <div style="width: 10;height: 10px;"></div>
  169. </li>
  170. <li class="s">
  171. <span class="fontColrs">当前可用年假</span>
  172. <span style="width: 10px;height: 10px;float: right;"></span>
  173. <span style="float: right;">{{personalList.availableDay/24}}天</span>
  174. <br>
  175. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  176. <div style="width: 10;height: 10px;"></div>
  177. </li>
  178. <li class="s">
  179. <span class="fontColrs">当前剩余调休</span>
  180. <span style="width: 10px;height: 10px;float: right;"></span>
  181. <span style="float: right;">{{personalList.leaveDate}}小时</span>
  182. <br>
  183. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  184. <div style="width: 10;height: 10px;"></div>
  185. </li>
  186. <li class="s">
  187. <span class="fontColrs">考勤记录</span>
  188. <span style="width: 10px;height: 10px;float: right;"></span>
  189. <span style="float: right;color: #0081FF;" v-if='personalList.sum=="2"' @click="sign()">本月无异常</span>
  190. <span style="float: right;color: red;" v-if='personalList.sum=="1"' @click="sign()">
  191. 本月有异常
  192. <div style="float: right;margin-top: 1.5px;" >
  193. <image style="width: 13px; height: 13px;" src="../../static/icon/redjt.png"></image>
  194. </div>
  195. </span>
  196. <br>
  197. <div style="width: 100%; height: 1px; border-top: solid #ACC0D8 1px;margin-top: 10px;"></div>
  198. </li>
  199. </ul>
  200. </div>
  201. <br>
  202. <!-- <button style="background-color: red;color: #FFFFFF;" @click="exit()">退出</button> -->
  203. </div>
  204. </template>
  205. <script>
  206. import api from '@/api/api'
  207. export default {
  208. data() {
  209. return {
  210. t:false,
  211. personalList:{
  212. avatar:'',
  213. realname:'',
  214. username:'',
  215. post:'',
  216. depart:'',
  217. phone:'',
  218. workNo:'',
  219. birthday:'',
  220. email:'',
  221. sex:'',
  222. egName:'',
  223. birthDate:'',
  224. entryDate:'',
  225. urgentName:'',
  226. urgentPhone:'',
  227. availableDay:'',
  228. orgCodeTxt:'',
  229. leaveDate:'',
  230. sum:''
  231. },
  232. userUrl:'/sys/user/queryById',
  233. }
  234. },
  235. created() {
  236. this.load();
  237. },methods:{
  238. upload(){
  239. },
  240. load(){
  241. this.$http.get(this.userUrl,{params:{id:this.$store.getters.userid}}).then(res=>{
  242. console.log("res",res)
  243. let perArr = res.data.data;
  244. let avatar=(perArr.avatar && perArr.avatar.length > 0)? api.getFileAccessHttpUrl(perArr.avatar):'/static/avatar_boy.png'
  245. this.personalList.avatar =avatar
  246. this.personalList.realname = perArr.realname
  247. this.personalList.username = perArr.username
  248. this.personalList.post = perArr.post
  249. this.personalList.depart = perArr.departIds
  250. this.personalList.phone=perArr.phone
  251. this.personalList.workNo=perArr.workNo
  252. this.personalList.birthday=perArr.birthday
  253. this.personalList.email=perArr.email
  254. this.personalList.sex=perArr.sex
  255. this.personalList.egName=perArr.egName
  256. this.personalList.birthDate=perArr.birthDate
  257. this.personalList.entryDate=perArr.entryDate
  258. this.personalList.urgentName=perArr.urgentName
  259. this.personalList.urgentPhone=perArr.urgentPhone
  260. if(res.data.sign!="" &&res.data.sign!=undefined){
  261. this.personalList.availableDay=res.data.sign.availableDay
  262. this.personalList.leaveDate=res.data.sign.leaveDate
  263. }
  264. this.personalList.orgCodeTxt=perArr.orgCodeTxt
  265. this.personalList.sum=res.data.sum
  266. }).catch(err => {
  267. console.log(err);
  268. });
  269. } ,
  270. exit(){
  271. this.$Router.push({name:'userexit'})
  272. },
  273. ret(){
  274. this.$Router.push({name:'index'})
  275. },
  276. sign(){
  277. this.$Router.push({name:'usersign'})
  278. }
  279. }
  280. }
  281. </script>
  282. <style>
  283. .panl{
  284. /* background-image: url(../../static/bj001.jpeg);
  285. background-size:100% 100%; */
  286. }
  287. .card{
  288. background-color: #FFFFFF;
  289. width: 95%;
  290. height: 105px;
  291. margin: 0 auto;
  292. border-radius:5px 5px 5px 5px;
  293. box-shadow:0 4px 8px 0 rgba(255, 255, 255, 0.2),0 6px 20px 0 rgba(255, 255, 255, 0.2);
  294. }
  295. .imgs{
  296. width: 60px;
  297. height: 60px;
  298. /* border-radius:5px 5px 5px 5px; */
  299. border-radius:50%;
  300. }
  301. .fontColr{
  302. color: #0081FF;
  303. font-size: 13px;
  304. }
  305. .s{
  306. list-style-type:none;
  307. margin-left: -20px;
  308. }
  309. .fontColrs{
  310. color: #A3A7B1;
  311. }
  312. .ic{
  313. width: 20px;
  314. height: 20px;
  315. margin-left: 10px;
  316. }
  317. .top{
  318. background-color: #5677AC;
  319. width: 100%;
  320. height: 40px;
  321. }
  322. </style>