contacts.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!--
  2. * @Author: liuzhenlin 461480418@qq.ocm
  3. * @Date: 2023-02-16 11:31:40
  4. * @LastEditors: liuzhenlin
  5. * @LastEditTime: 2023-02-21 10:00:48
  6. * @Description: file content
  7. * @FilePath: \frontend_mobile\pages\project\components\contacts.vue
  8. -->
  9. <template>
  10. <view class="contact-main">
  11. <view class="search-container">
  12. <view class="search-input">
  13. <u-input
  14. clearable
  15. placeholderStyle="font-size:26rpx"
  16. :customStyle="{ height: '66rpx' }"
  17. v-model="queryForm.cuctName"
  18. prefixIcon="search"
  19. prefixIconStyle="font-size: 22px;color: #909399"
  20. placeholder="请输入姓名"
  21. shape="circle"
  22. border="surround"
  23. @change="change"></u-input>
  24. </view>
  25. <view class="search-btn" @click="getContacts()">搜索</view>
  26. </view>
  27. <view class="todo-list">
  28. <u-empty mode="list" v-if="contactList.length == 0"></u-empty>
  29. <view v-else v-for="(v, i) in contactList" :key="i">
  30. <view class="contact-item">
  31. <view class="flex_l">
  32. <view class="label">姓名:</view>
  33. <view class="val">{{ v.cuctName }}</view>
  34. </view>
  35. <view class="flex_l">
  36. <view class="label">岗位:</view>
  37. <view class="val">{{ v.postion }}</view>
  38. </view>
  39. <view class="flex_l">
  40. <view class="label">电话:</view>
  41. <view class="val">{{ v.telephone }}</view>
  42. </view>
  43. <view class="flex_l">
  44. <view class="label">微信:</view>
  45. <view class="val">{{ v.wechat }}</view>
  46. </view>
  47. <view class="flex_l">
  48. <view class="label">邮箱:</view>
  49. <view class="val">{{ v.email }}</view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. import to from 'await-to-js'
  58. import userApi from '../../../api/system/user'
  59. export default {
  60. name: 'OmsCustomerDetail',
  61. props: {
  62. projectId: {
  63. type: [String, Number],
  64. default: '0',
  65. },
  66. },
  67. data() {
  68. return {
  69. queryForm: {
  70. busId: this.projectId,
  71. cuctName: '',
  72. pageNum: 1,
  73. pageSize: 9999,
  74. },
  75. contactList: [],
  76. }
  77. },
  78. mounted() {
  79. this.getContacts()
  80. },
  81. methods: {
  82. async getContacts() {
  83. const [err, res] = await to(userApi.getProjectContact(this.queryForm))
  84. if (err) return
  85. if (res.code == 200) this.contactList = res.data.list || []
  86. },
  87. },
  88. }
  89. </script>
  90. <style lang="scss" scoped>
  91. .contact-main {
  92. height: 100%;
  93. .search-container {
  94. display: flex;
  95. align-items: center;
  96. padding-bottom: 20rpx;
  97. border-bottom: 1px solid #ccc;
  98. .search-input {
  99. flex: 1;
  100. }
  101. .search-btn {
  102. text-align: center;
  103. line-height: 60rpx;
  104. border-radius: 12rpx;
  105. width: 100rpx;
  106. height: 60rpx;
  107. font-size: 26rpx;
  108. margin: 0 0 0 12rpx;
  109. background: $u-primary;
  110. color: #ffffff;
  111. }
  112. }
  113. .todo-list {
  114. height: 100%;
  115. overflow: auto;
  116. padding: 20rpx 20rpx 0;
  117. .contact-item {
  118. padding: 20rpx;
  119. box-shadow: 0 6rpx 19rpx 2rpx rgba(0, 45, 132, 0.15);
  120. border-radius: 8px;
  121. margin: 30rpx 0;
  122. .label,
  123. .val {
  124. font-size: 28rpx;
  125. padding-bottom: 14rpx;
  126. }
  127. .label {
  128. color: #646464;
  129. }
  130. }
  131. }
  132. }
  133. </style>