contact.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <template>
  2. <view class="wrap">
  3. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  4. @clickLeft="toBack">
  5. <view style="width: 100%;display: flex;flex-direction: row;justify-content: center;align-items: center;">
  6. <text style="color: white;font-size: 1rem;">{{title}}</text>
  7. </view>
  8. </uni-nav-bar>
  9. <view class="container">
  10. <view v-for="item in list" :key="item.id">
  11. <uGroup :title="item.orgName" margin-top="20">
  12. <uni-table ref="order_table" border stripe type="" emptyText="暂无更多数据">
  13. <uni-tr>
  14. <uni-th width="120" align="center"><view style="text-align: center;color: black;">姓名</view></uni-th>
  15. <uni-th width="120" align="center"><view style="text-align: center;color: black;">角色</view></uni-th>
  16. <uni-th align="center"><view style="text-align: center;color: black;">联系电话</view></uni-th>
  17. </uni-tr>
  18. <uni-tr v-for="person in item.servicePersonVOList" :key="person.id">
  19. <uni-td>
  20. <view style="text-align: center;">{{ person.personName }}</view>
  21. </uni-td>
  22. <uni-td align="center">
  23. <view style="text-align: center;">{{ person.roleName }}</view>
  24. </uni-td>
  25. <uni-td align="center">
  26. <view style="text-align: center;">{{ person.contactPhone }}</view>
  27. </uni-td>
  28. </uni-tr>
  29. </uni-table>
  30. </uGroup>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
  38. import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
  39. import uGroup from '@/uni_modules/uni-group/uni-group.vue'
  40. import uSection from '@/uni_modules/uni-section/uni-section.vue'
  41. import uPagination from '@/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue'
  42. import uBreadcrumb from '@/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue'
  43. import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
  44. import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
  45. import uIcons from '@/uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
  46. import uSegmentedControl from '@/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue'
  47. import uniTable from '@/uni_modules/uni-table/components/uni-table/uni-table.vue'
  48. import http from '@/http/api.js';
  49. export default {
  50. components: {
  51. uNavBar,
  52. uList,
  53. uListItem,
  54. uIcons,
  55. uGroup,
  56. uPagination,
  57. uBreadcrumb,
  58. uSection,
  59. uDataPicker,
  60. uSegmentedControl,
  61. uniTable
  62. },
  63. onLoad(option) {
  64. this.getContact();
  65. },
  66. data() {
  67. return {
  68. list: [],
  69. title: '通讯录',
  70. desc: '',
  71. orderTableData: [],
  72. equipmentInspectionTableData: [],
  73. pageSize: 10,
  74. // 当前页
  75. pageCurrent: 1,
  76. // 数据总量
  77. total: 0,
  78. orgId: '',
  79. projectId: '',
  80. projectTree: [],
  81. selectedTreeNode: '',
  82. searchVal: '',
  83. }
  84. },
  85. computed: {
  86. getIcon() {
  87. return path => {
  88. return 'https://cdn.uviewui.com/uview/example/' + path + '.png';
  89. }
  90. },
  91. },
  92. onShow() {
  93. },
  94. methods: {
  95. toBack() {
  96. uni.navigateBack({
  97. delta: 1
  98. })
  99. },
  100. getContact() {
  101. var that = this;
  102. http.request({
  103. url: '/galaxy-test/project/person/contact',
  104. method: 'GET',
  105. }).then(res => {
  106. if (res.data != null) {
  107. that.list = res.data;
  108. }
  109. }).catch(err => {
  110. console.log(err)
  111. })
  112. },
  113. }
  114. }
  115. </script>
  116. <style>
  117. </style>
  118. <style lang="scss" scoped>
  119. .container {
  120. padding: 0 0 100rpx;
  121. }
  122. .u-cell-icon {
  123. width: 36rpx;
  124. height: 36rpx;
  125. margin-right: 8rpx;
  126. }
  127. .slot-box {
  128. /* #ifndef APP-NVUE */
  129. display: flex;
  130. /* #endif */
  131. flex-direction: row;
  132. align-items: center;
  133. }
  134. .slot-image {
  135. /* #ifndef APP-NVUE */
  136. display: block;
  137. /* #endif */
  138. //margin-right: 10px;
  139. width: 20px;
  140. height: 20px;
  141. }
  142. .order-title-image {
  143. /* #ifndef APP-NVUE */
  144. display: block;
  145. /* #endif */
  146. // margin-right: 10px;
  147. width: 20px;
  148. height: 20px;
  149. border-radius: 50%;
  150. }
  151. .slot-text {
  152. flex: 1;
  153. font-size: 14px;
  154. color: #4cd964;
  155. margin-right: 10px;
  156. }
  157. .content-box {
  158. flex: 1;
  159. /* #ifdef APP-NVUE */
  160. justify-content: center;
  161. /* #endif */
  162. height: 100%;
  163. line-height: 44px;
  164. padding: 0 15px;
  165. position: relative;
  166. background-color: #fff;
  167. border-bottom-color: #f5f5f5;
  168. border-bottom-width: 1px;
  169. border-bottom-style: solid;
  170. }
  171. .content-text {
  172. font-size: 15px;
  173. }
  174. .example-body {
  175. /* #ifndef APP-NVUE */
  176. display: flex;
  177. /* #endif */
  178. flex-direction: row;
  179. justify-content: center;
  180. padding: 10px 0;
  181. background-color: #fff;
  182. }
  183. .button {
  184. border-color: #e5e5e5;
  185. border-style: solid;
  186. border-width: 1px;
  187. padding: 4px 8px;
  188. border-radius: 4px;
  189. }
  190. .button-text {
  191. font-size: 15px;
  192. }
  193. .slot-button {
  194. /* #ifndef APP-NVUE */
  195. display: flex;
  196. height: 100%;
  197. /* #endif */
  198. flex: 1;
  199. flex-direction: row;
  200. justify-content: center;
  201. align-items: center;
  202. padding: 0 20px;
  203. background-color: #ff5a5f;
  204. }
  205. .slot-button-text {
  206. color: #ffffff;
  207. font-size: 14px;
  208. }
  209. </style>