index.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <view class="sdialog adffc" v-if="show">
  3. <view class="dbox adffc">
  4. <view class="db-top">{{title}}</view>
  5. <image class="db-close" :src="imgBase+'remind_close.png'" @click="close"></image>
  6. <view class="db-tip" v-if="addShow">团队应该是一个由具有互补技能的成员组成的群体,他们有共同的宗旨和绩效目标,并为此采用共同的工作方法,且成员间彼此相互负责,建议可为同部门、专案项目小组、核心管理层或是因企业战略目标而创建的跨部门成员等等。角色可包含团队负责人、团队成员、赞助人(出资人)、关键利益相关方等。</view>
  7. <view class="db-bottom" @click="addTeam" v-if="addShow">{{addText}}</view>
  8. <view class="db-list">
  9. <view class="db-list-item adfacjb" v-for="(item,index) in originList" :key="item.id" @click="selectItem(item,index)">
  10. <view class="db-list-item-left" :class="{'active':item.select}">{{item.name}}</view>
  11. <view class="db-list-item-right">
  12. <u-icon name="checkbox-mark" color="#199C9C" size="42rpx" v-if="item.select"></u-icon>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="zt_btn" style="margin-top: 20rpx;" @click="confirmTeam">{{confirmText}}</view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. props:{
  23. title:{
  24. typeof:String,
  25. default:'选择团队'
  26. },
  27. show:{
  28. typeof:Boolean,
  29. default:false
  30. },
  31. addShow:{
  32. typeof:Boolean,
  33. default:false
  34. },
  35. addText:{
  36. typeof:String,
  37. default:'+ 新增团队'
  38. },
  39. list:{
  40. typeof:Array,
  41. default:[]
  42. },
  43. confirmText:{
  44. typeof:String,
  45. default:'确定'
  46. },
  47. team:{
  48. typeof:Boolean,
  49. default:false
  50. }
  51. },
  52. data(){
  53. return {
  54. originList:[],
  55. current:null
  56. }
  57. },
  58. watch: {
  59. list: {
  60. handler(newValue) {
  61. this.originList = newValue;
  62. },
  63. immediate: true,
  64. deep: true
  65. }
  66. },
  67. mounted() {
  68. this.originList = this.list;
  69. },
  70. methods:{
  71. close(){
  72. this.$emit('close')
  73. },
  74. selectItem(item,index){
  75. if(this.$props.team){
  76. if(!item.functions||item.functions.length===0) return this.$showModal(`该【${item.teamName}】下团队职能类型信息未填写,不能发送报告,请更换或添加团队。`)
  77. if(!item.organizations||item.organizations.length===0) return this.$showModal(`该【${item.teamName}】下团队模式类型信息未填写,不能发送报告,请更换或添加团队。`)
  78. if(!item.organizations||item.organizations.length===0) return this.$showModal(`该【${item.teamName}】下团队模式类型信息未填写,不能发送报告,请更换或添加团队。`)
  79. if(!item.scale) return this.$showModal(`该【${item.teamName}】下团队规模信息未填写,不能发送报告,请更换或添加团队。`)
  80. if(!item.brief) return this.$showModal(`该【${item.teamName}】下团队简介信息未填写,不能发送报告,请更换或添加团队。`)
  81. }
  82. this.current = item;
  83. this.originList.forEach((t,i)=>{
  84. this.$set(this.originList[i],'select',i===index)
  85. })
  86. },
  87. addTeam(){
  88. this.$emit('addTeam')
  89. },
  90. confirmTeam(){
  91. this.$emit('confirmTeam',this.current)
  92. }
  93. }
  94. }
  95. </script>
  96. <style scoped lang="less">
  97. .sdialog{
  98. position: fixed;
  99. left: 0;
  100. right: 0;
  101. top: 0;
  102. bottom: 0;
  103. z-index: 1000;
  104. background: rgba(0, 0, 0, .4);
  105. justify-content: flex-end;
  106. .dbox{
  107. width: 100%;
  108. height: 1200rpx;
  109. background: #FFFFFF;
  110. box-shadow: 0rpx -2rpx 6rpx 0rpx rgba(0,0,0,0.07);
  111. border-radius: 24rpx 24rpx 0rpx 0rpx;
  112. padding: 41rpx 30rpx 64rpx;
  113. box-sizing: border-box;
  114. position: relative;
  115. .db-top{
  116. font-family: PingFang-SC, PingFang-SC;
  117. font-weight: bold;
  118. font-size: 36rpx;
  119. color: #002846;
  120. line-height: 36rpx;
  121. text-align: center;
  122. }
  123. .db-tip{
  124. background: #F5F8FA;
  125. border-radius: 24rpx;
  126. padding: 24rpx 24rpx 20rpx;
  127. border-radius: 24rpx;
  128. font-family: PingFangSC, PingFang SC;
  129. font-weight: 400;
  130. font-size: 24rpx;
  131. color: #667E90;
  132. line-height: 32rpx;
  133. margin-top: 40rpx;
  134. }
  135. .db-close{
  136. width: 48rpx;
  137. height: 48rpx;
  138. position: absolute;
  139. top: 35rpx;
  140. right: 30rpx;
  141. }
  142. .db-list{
  143. flex: 1;
  144. overflow-y: auto;
  145. margin-top: 10rpx;
  146. &-item{
  147. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EFEFEF;
  148. padding: 39rpx 0;
  149. &-left{
  150. font-family: PingFangSC, PingFang SC;
  151. font-weight: 400;
  152. font-size: 32rpx;
  153. color: #002846;
  154. line-height: 32rpx;
  155. &.active{
  156. font-weight: bold;
  157. color: #009191;
  158. }
  159. }
  160. }
  161. }
  162. .db-bottom{
  163. width: 100%;
  164. height: 88rpx;
  165. background: rgba(25,156,156,0.1);
  166. border-radius: 44rpx;
  167. font-family: PingFang-SC, PingFang-SC;
  168. font-weight: bold;
  169. font-size: 32rpx;
  170. color: #009191;
  171. line-height: 88rpx;
  172. text-align: center;
  173. margin-top: 20rpx;
  174. }
  175. }
  176. }
  177. </style>