fleetSee.vue 10 KB

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