fleetSee.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. <template>
  2. <view class="center">
  3. <view class="fleet_info">
  4. <view class="fleet_top_css">
  5. <u-avatar :src="fleetInfo.coverUrl" size="75" class="fleetInfo_img"></u-avatar>
  6. <view class="fleetInfo_top_right">
  7. <view class="fleetInfo_name">{{fleetInfo.fleetName}}
  8. <!-- type 1队长 2队员 -->
  9. <image v-if="type == 1" src="../../static/images/riders/shezhi.png" mode=""
  10. style="width: 22rpx;height: 22rpx;margin:10rpx 0 0 20rpx;"
  11. @click="setUp('/pages/riders/addFleet')"></image>
  12. </view>
  13. <view class="fleetInfo_address">{{fleetInfo.province}}{{fleetInfo.city}}{{fleetInfo.area}}</view>
  14. </view>
  15. <view class="notice_title">公告</view>
  16. <view class="flex notice_center" @click="noticeSee">
  17. <view class="notice_text">{{fleetInfo.notice?fleetInfo.notice:"暂无公告"}}</view>
  18. <image src="../../static/images/myimg/gengduo1.png" mode=""
  19. style="width: 18rpx;height: 24rpx;margin:10rpx 0 0 20rpx;"></image>
  20. </view>
  21. <!-- <view class="notice_text notice_center" v-else>暂无公告</view> -->
  22. <view class="notice_title">车队简介</view>
  23. <view class="introduce_info">
  24. {{fleetInfo.fleetProfile}}
  25. </view>
  26. <!-- <u--textarea v-model="fleetInfo.fleetProfile" placeholder="输入公告文字,0-500字" disabled maxlength="500"
  27. autoHeight count>
  28. </u--textarea> -->
  29. </view>
  30. <view class="member">
  31. <view class="flex member_top">
  32. <view class="notice_title member_title">车队成员</view>
  33. <!-- @click="setUp('/pages/riders/fleetMember')" -->
  34. <view class="member_right">
  35. <span>查看{{fleetInfo.fleetMemberNum}}名群成员</span>
  36. <image src="../../static/images/myimg/gengduo1.png" mode=""
  37. style="width: 18rpx;height: 24rpx;margin:10rpx 0 0 20rpx;"></image>
  38. </view>
  39. </view>
  40. <view class="flex member_avatar">
  41. <view margin v-for="(item,index) in 4" class="member_item"
  42. v-if="fleetInfo.fleetMemberInfoList[index]">
  43. <u-avatar
  44. :src="fleetInfo.fleetMemberInfoList[index].driverPortrait?fleetInfo.fleetMemberInfoList[index].driverPortrait:''"
  45. size="48" style="margin: 0 auto;"></u-avatar>
  46. <view class="member_name">
  47. {{fleetInfo.fleetMemberInfoList[index].driverNickname}}
  48. </view>
  49. </view>
  50. <view class="del" @click="setUp('/pages/riders/setMember',1)" v-if="type == 1">
  51. <view class="del_img">—</view>
  52. <view class="member_name">删除</view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="setUp" v-if="type == 1">
  57. <view class="flex set_item" @click="setUp('/pages/riders/notice')">
  58. <view class="set_name">
  59. 发布公告
  60. </view>
  61. <view class="set_img">
  62. <image src="../../static/images/myimg/gengduo1.png" mode=""
  63. style="width: 18rpx;height: 24rpx;margin:10rpx 0 0 20rpx;"></image>
  64. </view>
  65. </view>
  66. <view class="flex set_item" @click="setUp('/pages/riders/setMember',2)">
  67. <view class="set_name">
  68. 车队管理权转让
  69. </view>
  70. <view class="set_img">
  71. <image src="../../static/images/myimg/gengduo1.png" mode=""
  72. style="width: 18rpx;height: 24rpx;margin:10rpx 0 0 20rpx;"></image>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="setUp">
  77. <view class="flex set_item" @click="setUp('/pages/riders/report')">
  78. <view class="set_name">
  79. 举报
  80. </view>
  81. <view class="set_img">
  82. <image src="../../static/images/myimg/gengduo1.png" mode=""
  83. style="width: 18rpx;height: 24rpx;margin:10rpx 0 0 20rpx;"></image>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="setUp">
  88. <view class="set_item quit" @click="quitFleet">退出车队</view>
  89. </view>
  90. </view>
  91. <!-- chunLei-popups v-model="value" :popData="dataList" @tapPopup="tapPopup" :x="344" :y="20" placement="top-end">
  92. </chunLei-popups> -->
  93. <u-modal :show="quitShow" :title="alertTitle" :closeOnClickOverlay='true' :showCancelButton='true'
  94. confirmColor='#2772FB' @confirm="confirmClick" @close="cancelClick" @cancel="cancelClick"></u-modal>
  95. <u-toast ref="uToast"></u-toast>
  96. </view>
  97. </template>
  98. <script>
  99. // import chunLeiPopups from "@/components/chunLei-popups/chunLei-popups.vue";
  100. export default {
  101. components: {
  102. // chunLeiPopups
  103. },
  104. data() {
  105. return {
  106. value: false,
  107. type: "",
  108. id: "",
  109. fleetId: "",
  110. fleetInfo: {},
  111. quitShow:false,
  112. alertTitle:""
  113. }
  114. },
  115. onShow() {
  116. this.getList()
  117. },
  118. onLoad(options) {
  119. this.fleetId = options.fleetId
  120. this.id = options.id
  121. this.type = options.type
  122. this.read() //已读接口
  123. // this.getList()
  124. },
  125. methods: {
  126. cancelClick(){
  127. this.quitShow = false
  128. },
  129. confirmClick(){
  130. this.$request.baseRequest('post', '/fleetMemberInfo/api/delete', {
  131. commonId: uni.getStorageSync("firstAuthentication").commonId,
  132. fleetId:this.fleetId,
  133. outFlag: 1,
  134. }).then(res => {
  135. debugger
  136. console.log(res)
  137. if (res.code == 200) {
  138. this.$refs.uToast.show({
  139. type: 'success',
  140. message: "退出成功!",
  141. complete() {
  142. uni.$u.route("pages/riders/myTeam")
  143. }
  144. })
  145. }else{
  146. this.$refs.uToast.show({
  147. type: 'error',
  148. message: res.message,
  149. })
  150. }
  151. })
  152. .catch(res => {
  153. uni.$u.toast(res.message);
  154. });
  155. },
  156. setUp(url, num) {
  157. if (num == 1) { //删除成员
  158. this.$u.route(url, {
  159. id: this.fleetId,
  160. type: 1
  161. })
  162. } else if (num == 2) { //转移队长
  163. this.$u.route(url, {
  164. id: this.fleetId,
  165. type: 2
  166. })
  167. } else {
  168. this.$u.route(url, {
  169. id: this.fleetId
  170. })
  171. }
  172. },
  173. quitFleet() {
  174. if(this.fleetInfo.fleetMemberInfoList.length == 1){
  175. this.alertTitle= "退出后车队将解散,确定退出?"
  176. }else{
  177. this.alertTitle= "确定退出车队?"
  178. }
  179. this.quitShow = true
  180. },
  181. noticeSee() {
  182. this.$u.route("pages/riders/noticeSee", {
  183. _obj: JSON.stringify(this.fleetInfo)
  184. })
  185. },
  186. read() {
  187. this.$request.baseRequest('post', '/fleetMemberInfo/api/read', {
  188. id: this.id,
  189. readFlag: 3
  190. }).then(res => {})
  191. .catch(res => {
  192. uni.$u.toast(res.message);
  193. });
  194. },
  195. clickRightIcon() {
  196. this.value = true
  197. },
  198. // tapPopup(e) {
  199. // this.$u.route(e.src, {
  200. // id: this.id
  201. // })
  202. // // uni.showToast({
  203. // // title:e.title,
  204. // // icon:'none'
  205. // // })
  206. // },
  207. returnPage() {
  208. this.$u.route("/pages/riders/myTeam")
  209. },
  210. getList() {
  211. this.$request.baseRequest('get', '/fleetInfo/getFleetInfo', {
  212. id: this.fleetId
  213. }).then(res => {
  214. this.fleetInfo = res.data
  215. // if(this.fleetInfo.fleetUrl){
  216. // this.imgList = this.fleetInfo.fleetUrl.split(",")
  217. // }else{
  218. // this.imgList = this.fleetInfo.coverUrl.split(",")
  219. // }
  220. })
  221. .catch(res => {
  222. uni.$u.toast(res.message);
  223. });
  224. }
  225. }
  226. }
  227. </script>
  228. <style lang="scss" scoped>
  229. .center {
  230. background: #F2F4F7;
  231. padding: 30rpx 0;
  232. .top {
  233. margin-top: 20rpx;
  234. width: 100%;
  235. .top_left {
  236. width: 50%;
  237. }
  238. .top_right {
  239. width: 50%;
  240. text-align: right;
  241. margin-right: 20rpx;
  242. }
  243. }
  244. }
  245. .fleet_info {
  246. // padding-top: 20rpx;
  247. .fleet_top_css {
  248. padding: 10rpx 30rpx;
  249. background: #FFFFFF;
  250. margin-top: 90rpx;
  251. border-radius: 30rpx 30rpx 0px 0px;
  252. position: relative;
  253. .fleetInfo_img {
  254. position: absolute;
  255. top: -40rpx;
  256. left: 40rpx
  257. }
  258. .fleetInfo_top_right {
  259. // margin-top: 10rpx;
  260. margin-left: 200rpx;
  261. .fleetInfo_name {
  262. color: #333333;
  263. font-size: 36rpx;
  264. font-weight: 600;
  265. margin: 10rpx 0;
  266. // margin-top: 30rpx;
  267. }
  268. .fleetInfo_address {
  269. color: #BABABA;
  270. font-size: 26rpx;
  271. }
  272. }
  273. .notice_center {
  274. border-bottom: 1px solid #E6E6E6;
  275. }
  276. .notice_text {
  277. font-size: 30rpx;
  278. width: 95%;
  279. margin-bottom: 36rpx;
  280. overflow: hidden;
  281. word-break: break-all;
  282. /* break-all(允许在单词内换行。) */
  283. text-overflow: ellipsis;
  284. /* 超出部分省略号 */
  285. display: -webkit-box;
  286. /** 对象作为伸缩盒子模型显示 **/
  287. -webkit-box-orient: vertical;
  288. /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  289. -webkit-line-clamp: 1;
  290. /** 显示的行数 **/
  291. }
  292. .introduce_info {
  293. font-size: 30rpx;
  294. // width: 95%;
  295. margin-bottom: 48rpx;
  296. overflow: hidden;
  297. word-break: break-all;
  298. /* break-all(允许在单词内换行。) */
  299. text-overflow: ellipsis;
  300. /* 超出部分省略号 */
  301. display: -webkit-box;
  302. /** 对象作为伸缩盒子模型显示 **/
  303. -webkit-box-orient: vertical;
  304. /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  305. -webkit-line-clamp: 3;
  306. /** 显示的行数 **/
  307. }
  308. }
  309. .notice_title {
  310. margin: 60rpx 0 26rpx 0;
  311. color: #333333;
  312. font-size: 34rpx;
  313. font-weight: 600;
  314. }
  315. .member {
  316. padding: 1rpx 30rpx;
  317. background: #FFFFFF;
  318. margin-top: 30rpx;
  319. padding-bottom: 45rpx;
  320. .member_top {
  321. width: 100%;
  322. .member_title,
  323. .member_right {
  324. width: 50%;
  325. }
  326. .member_right {
  327. text-align: right;
  328. margin-top: 60rpx;
  329. color: #BABABA;
  330. }
  331. }
  332. .member_avatar {
  333. width: 100%;
  334. .member_item {
  335. width: 20%;
  336. text-align: center;
  337. margin-right: 44rpx;
  338. }
  339. .del {
  340. text-align: center;
  341. .del_img {
  342. width: 96rpx;
  343. height: 96rpx;
  344. background: #F2F4F7;
  345. border-radius: 48rpx;
  346. text-align: center;
  347. line-height: 86rpx;
  348. color: #AFB3BF;
  349. font-weight: 700;
  350. }
  351. }
  352. .member_name {
  353. overflow: hidden;
  354. text-overflow: ellipsis;
  355. white-space: nowrap;
  356. margin-top: 10rpx;
  357. font-size: 24rpx;
  358. }
  359. }
  360. }
  361. .setUp {
  362. padding: 0 30rpx;
  363. background-color: #FFFFFF;
  364. margin-top: 20rpx;
  365. .set_item {
  366. width: 100%;
  367. height: 120rpx;
  368. line-height: 120rpx;
  369. .set_name,
  370. .set_img {
  371. width: 50%;
  372. }
  373. .set_img {
  374. text-align: right;
  375. }
  376. }
  377. .quit {
  378. margin: 0 auto;
  379. text-align: center;
  380. color: #FE5C5C;
  381. font-size: 34rpx;
  382. font-weight: 600;
  383. }
  384. }
  385. }
  386. </style>