fleetSee.vue 10 KB

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