cadresItem.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view>
  3. <view class="font-md text-dark font-weight pt-2">挂钩干部</view>
  4. <view class="py-2 border-bottom">
  5. <text class="text-primary">姓名:</text>
  6. <text class="text-secondary">{{hookName ? hookName : cadresData.realName}}</text>
  7. </view>
  8. <!-- <view class="py-2 border-bottom d-flex a-center">
  9. <text class="text-primary">联系电话:</text>
  10. <u--input v-model="cadresData.mobilePhone" color="#666666" :readonly="onlyFlag"
  11. :border="onlyFlag ? 'none' : 'surround'" :placeholder="!onlyFlag ? '请输入手机号码' : ''"></u--input>
  12. </view> -->
  13. </view>
  14. </template>
  15. <script>
  16. import {Store} from "@/common/store.js";
  17. export default {
  18. name: 'cadresItem',
  19. props: {
  20. cadresData: {
  21. type: Object,
  22. default: () => {}
  23. },
  24. readOnlyFlag: {
  25. type: Boolean,
  26. default: false
  27. }
  28. },
  29. computed: {
  30. onlyFlag() {
  31. return this.readOnlyFlag
  32. }
  33. },
  34. data() {
  35. return {
  36. hookName: ""
  37. }
  38. },
  39. mounted() {
  40. this.hookName = this.cadresData.realName
  41. const userInfo = Store.getUser() ? JSON.parse(Store.getUser()) : {}
  42. if( userInfo?.roleLevel == '2'){
  43. this.hookName = userInfo.userName
  44. }
  45. },
  46. methods: {}
  47. }
  48. </script>
  49. <style>
  50. </style>