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