enterpriseTeam.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <view class="page-wrap">
  3. <view class="tabs-panel">
  4. <view :class="{ item: true, active: tabActive === item.value }" v-for="(item, index) in tabList" :key="index" @click="tabActive = item.value">
  5. {{ item.label }}
  6. </view>
  7. </view>
  8. <!-- 团队成员 -->
  9. <view v-if="tabActive === 1" class="list-panel">
  10. <view class="item">
  11. <image class="avatar" src="../../static/auth-icon.png" mode="aspectFill"></image>
  12. <view class="text">
  13. 张无忌 18991397914
  14. <text class="sub">总经办</text>
  15. </view>
  16. <button class="btn" @click="handleOpenAuthSetting">权限设置</button>
  17. <button class="btn">删除</button>
  18. </view>
  19. <view class="item">
  20. <image class="avatar" src="../../static/auth-icon.png" mode="aspectFill"></image>
  21. <view class="text">
  22. 张无忌 18991397914
  23. <text class="sub">总经办</text>
  24. </view>
  25. <button class="btn">权限设置</button>
  26. <button class="btn">删除</button>
  27. </view>
  28. <view class="item">
  29. <image class="avatar" src="../../static/auth-icon.png" mode="aspectFill"></image>
  30. <view class="text">
  31. 张无忌 18991397914
  32. <text class="sub">总经办</text>
  33. </view>
  34. <button class="btn">待审核</button>
  35. <button class="btn">删除</button>
  36. </view>
  37. <button class="add-btn" @click="handleOpenAddMember">+ 添加团队成员</button>
  38. </view>
  39. <!-- 部门管理 -->
  40. <view v-if="tabActive === 2" class="list-panel">
  41. <view class="item">
  42. <view class="text">总经办</view>
  43. <button class="btn">删除</button>
  44. </view>
  45. <view class="item">
  46. <view class="text">财务部</view>
  47. <button class="btn">删除</button>
  48. </view>
  49. <view class="item">
  50. <view class="text">行政部</view>
  51. <button class="btn">删除</button>
  52. </view>
  53. <view class="item">
  54. <view class="text">后勤部</view>
  55. <button class="btn">删除</button>
  56. </view>
  57. <button class="add-btn" @click="handleOpenAddDepartment">+ 添加新部门</button>
  58. </view>
  59. <!-- 添加成员弹窗 -->
  60. <uni-popup ref="memberDialog" type="dialog">
  61. <uni-popup-dialog ref="inputClose" type="info" title="添加成员" @confirm="dialogInputConfirm">
  62. <view class="popup-form">
  63. <view class="popup-form-item">
  64. <view class="label">姓名</view>
  65. <input class="input" type="text" placeholder="请输入" maxlength="20" />
  66. </view>
  67. <view class="popup-form-item">
  68. <view class="label">手机号</view>
  69. <input class="input" type="text" placeholder="请输入" maxlength="11" />
  70. </view>
  71. <view class="popup-form-item">
  72. <view class="label">部门</view>
  73. <picker class="picker" @change="bindPickerChange" :value="index" :range="array">
  74. <input class="input" type="text" placeholder="请选择" maxlength="11" :value="test" disabled />
  75. </picker>
  76. </view>
  77. <view class="popup-form-item">
  78. <view class="label">职务</view>
  79. <input class="input" type="text" placeholder="请输入" maxlength="11" />
  80. </view>
  81. </view>
  82. </uni-popup-dialog>
  83. </uni-popup>
  84. <!-- 添加部门弹窗 -->
  85. <uni-popup ref="departmentDialog" type="dialog">
  86. <uni-popup-dialog ref="inputClose" type="info" title="添加部门" @confirm="dialogInputConfirm">
  87. <view class="popup-form">
  88. <view class="popup-form-item">
  89. <view class="label">部门名称</view>
  90. <input class="input" type="text" placeholder="请输入" maxlength="20" />
  91. </view>
  92. </view>
  93. </uni-popup-dialog>
  94. </uni-popup>
  95. </view>
  96. </template>
  97. <script>
  98. export default {
  99. data() {
  100. return {
  101. tabActive: 1,
  102. tabList: [
  103. {
  104. label: '团队成员',
  105. value: 1
  106. },
  107. {
  108. label: '部门管理',
  109. value: 2
  110. }
  111. ],
  112. array: ['总经办', '财务部', '行政部'],
  113. test: ''
  114. };
  115. },
  116. methods: {
  117. handleOpenAddMember() {
  118. this.$refs.memberDialog.open();
  119. },
  120. handleOpenAddDepartment() {
  121. this.$refs.departmentDialog.open();
  122. },
  123. bindPickerChange(e) {
  124. this.test = this.array[e.detail.value];
  125. },
  126. dialogInputConfirm() {},
  127. //打开权限设置
  128. handleOpenAuthSetting() {
  129. uni.navigateTo({
  130. url: 'authSetting'
  131. });
  132. }
  133. }
  134. };
  135. </script>
  136. <style lang="scss" scoped>
  137. .page-wrap {
  138. padding-top: 82.42rpx;
  139. overflow: hidden;
  140. // .submit-btn{
  141. // width: 549.45rpx;
  142. // height: 75.55rpx;
  143. // background: #00BCD2;
  144. // font-size: 27.47rpx;
  145. // color: #fff;
  146. // border-radius: 8.24rpx;
  147. // margin: 54.95rpx auto;
  148. // }
  149. }
  150. .tabs-panel {
  151. position: fixed;
  152. left: 0;
  153. top: 0;
  154. right: 0;
  155. height: 82.42rpx;
  156. background: #fff;
  157. display: flex;
  158. padding: 0 41.21rpx;
  159. z-index: 1;
  160. &::before,
  161. &::after {
  162. content: '';
  163. position: absolute;
  164. left: 0;
  165. right: 0;
  166. height: 1rpx;
  167. background: #e0e0e0;
  168. }
  169. &::before {
  170. top: 0;
  171. }
  172. &::after {
  173. bottom: 0;
  174. }
  175. .item {
  176. padding: 0 9.62rpx;
  177. text-align: center;
  178. font-size: 27.47rpx;
  179. color: #999;
  180. line-height: 82.42rpx;
  181. position: relative;
  182. & + .item {
  183. margin-left: 27.47rpx;
  184. }
  185. }
  186. .active {
  187. color: #00bcd2;
  188. &::after {
  189. content: '';
  190. position: absolute;
  191. left: 0%;
  192. right: 0%;
  193. bottom: 0%;
  194. height: 5.49rpx;
  195. background: #00bcd2;
  196. z-index: 1;
  197. }
  198. }
  199. }
  200. .list-panel {
  201. margin-top: 13.74rpx;
  202. .item {
  203. display: flex;
  204. align-items: center;
  205. padding: 16.48rpx 27.47rpx;
  206. min-height: 96.15rpx;
  207. box-sizing: border-box;
  208. position: relative;
  209. background: #fff;
  210. & + .item::before {
  211. content: '';
  212. position: absolute;
  213. left: 0%;
  214. right: 0%;
  215. top: 0%;
  216. height: 1rpx;
  217. transform: scaleY(0.5);
  218. background: #e0e0e0;
  219. }
  220. }
  221. .avatar {
  222. width: 76.92rpx;
  223. height: 76.92rpx;
  224. }
  225. .text {
  226. flex: 1;
  227. font-size: 27.47rpx;
  228. color: #545e8f;
  229. margin-left: 13.74rpx;
  230. }
  231. .sub {
  232. display: block;
  233. font-size: 24.73rpx;
  234. color: #999999;
  235. }
  236. .btn {
  237. background: none;
  238. border: none;
  239. font-size: 27.47rpx;
  240. color: #f97631;
  241. white-space: nowrap;
  242. padding: 0;
  243. margin-left: 13.74rpx;
  244. }
  245. .add-btn {
  246. margin-top: 27.47rpx;
  247. font-size: 27.47rpx;
  248. color: #00bcd2;
  249. height: 82.42rpx;
  250. line-height: 82.42rpx;
  251. display: block;
  252. text-align: left;
  253. padding: 0 0 0 54.95rpx;
  254. background: #fff;
  255. border: none;
  256. border-radius: 13.74rpx;
  257. }
  258. }
  259. .popup-form {
  260. width: 100%;
  261. font-size: 27.47rpx;
  262. &-item {
  263. display: flex;
  264. align-items: center;
  265. height: 82.42rpx;
  266. position: relative;
  267. & + &::before {
  268. content: '';
  269. position: absolute;
  270. left: 0;
  271. right: 0;
  272. top: 0;
  273. height: 1rpx;
  274. background: #e0e0e0;
  275. }
  276. }
  277. .label {
  278. white-space: nowrap;
  279. margin-right: 13.74rpx;
  280. }
  281. .input {
  282. flex: 1;
  283. text-align: right;
  284. }
  285. .picker {
  286. flex: 1;
  287. }
  288. }
  289. </style>