fleetSee.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  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" v-if="!tips">退出车队</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="$u.throttle(confirmClick, 1000)" @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. tips:""
  117. }
  118. },
  119. onShow() {
  120. this.getList()
  121. },
  122. onLoad(options) {
  123. this.fleetId = options.fleetId
  124. this.id = options.id
  125. this.type = options.type
  126. if(options.tips){
  127. this.tips = options.tips //判断是从哪页面进入的,判断是否显示退出车队按钮
  128. }
  129. this.read() //已读接口
  130. // this.getList()
  131. },
  132. methods: {
  133. seeInfo() {
  134. this.seeInfoShow = true
  135. },
  136. seeInfoClose() {
  137. this.seeInfoShow = false
  138. },
  139. cancelClick() {
  140. this.quitShow = false
  141. },
  142. confirmClick() {
  143. this.$request.baseRequest('post', '/fleetMemberInfo/api/delete', {
  144. commonId: uni.getStorageSync("firstAuthentication").commonId,
  145. fleetId: this.fleetId,
  146. outFlag: 1,
  147. }).then(res => {
  148. if (res.code == 200) {
  149. this.$refs.uToast.show({
  150. type: 'success',
  151. message: "退出成功!",
  152. complete() {
  153. uni.$u.route("pages/riders/myTeam")
  154. }
  155. })
  156. } else {
  157. this.$refs.uToast.show({
  158. type: 'error',
  159. message: res.message,
  160. })
  161. }
  162. })
  163. .catch(res => {
  164. uni.$u.toast(res.message);
  165. });
  166. },
  167. setUp(url, num) {
  168. if (num == 1) { //删除成员
  169. this.$u.route(url, {
  170. id: this.fleetId,
  171. type: 1
  172. })
  173. } else if (num == 2) { //转移管理
  174. this.$u.route(url, {
  175. id: this.fleetId,
  176. type: 2
  177. })
  178. } else {
  179. this.$u.route(url, {
  180. id: this.fleetId
  181. })
  182. }
  183. },
  184. quitFleet() {
  185. if (this.fleetInfo.fleetMemberInfoList.length == 1) {
  186. this.alertTitle = "退出后车队将解散,确定退出?"
  187. } else {
  188. this.alertTitle = "确定退出车队?"
  189. }
  190. this.quitShow = true
  191. },
  192. noticeSee() {
  193. if (!this.fleetInfo.notice) {
  194. this.$refs.uToast.show({
  195. type: 'error',
  196. message: "暂无公告!",
  197. })
  198. return
  199. }
  200. this.$u.route("pages/riders/noticeSee", {
  201. _obj: JSON.stringify(this.fleetInfo)
  202. })
  203. },
  204. read() {
  205. this.$request.baseRequest('post', '/fleetMemberInfo/api/read', {
  206. id: this.id,
  207. readFlag: 3
  208. }).then(res => {})
  209. .catch(res => {
  210. uni.$u.toast(res.message);
  211. });
  212. },
  213. clickRightIcon() {
  214. this.value = true
  215. },
  216. returnPage() {
  217. this.$u.route("/pages/riders/myTeam")
  218. },
  219. getList() {
  220. this.$request.baseRequest('get', '/fleetInfo/getFleetInfo', {
  221. id: this.fleetId
  222. }).then(res => {
  223. this.fleetInfo = res.data
  224. // if(this.fleetInfo.fleetUrl){
  225. // this.imgList = this.fleetInfo.fleetUrl.split(",")
  226. // }else{
  227. // this.imgList = this.fleetInfo.coverUrl.split(",")
  228. // }
  229. })
  230. .catch(res => {
  231. uni.$u.toast(res.message);
  232. });
  233. }
  234. }
  235. }
  236. </script>
  237. <style lang="scss" scoped>
  238. .center {
  239. background: #F2F4F7;
  240. padding: 30rpx 0;
  241. .top {
  242. margin-top: 20rpx;
  243. width: 100%;
  244. .top_left {
  245. width: 50%;
  246. }
  247. .top_right {
  248. width: 50%;
  249. text-align: right;
  250. margin-right: 20rpx;
  251. }
  252. }
  253. }
  254. .fleet_info {
  255. // padding-top: 20rpx;
  256. .fleet_top_css {
  257. padding: 10rpx 30rpx;
  258. background: #FFFFFF;
  259. margin-top: 90rpx;
  260. border-radius: 30rpx 30rpx 0px 0px;
  261. position: relative;
  262. .fleetInfo_img {
  263. position: absolute;
  264. top: -40rpx;
  265. left: 40rpx;
  266. }
  267. .fleetInfo_top_right {
  268. // margin-top: 10rpx;
  269. margin-left: 200rpx;
  270. .fleetInfo_name {
  271. color: #333333;
  272. font-size: 36rpx;
  273. font-weight: 600;
  274. margin: 10rpx 0;
  275. // margin-top: 30rpx;
  276. }
  277. .fleetInfo_address {
  278. color: #BABABA;
  279. font-size: 26rpx;
  280. }
  281. }
  282. .notice_center {
  283. border-bottom: 1px solid #E6E6E6;
  284. }
  285. .notice_text {
  286. font-size: 30rpx;
  287. width: 95%;
  288. margin-bottom: 36rpx;
  289. overflow: hidden;
  290. word-break: break-all;
  291. /* break-all(允许在单词内换行。) */
  292. text-overflow: ellipsis;
  293. /* 超出部分省略号 */
  294. display: -webkit-box;
  295. /** 对象作为伸缩盒子模型显示 **/
  296. -webkit-box-orient: vertical;
  297. /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  298. -webkit-line-clamp: 1;
  299. /** 显示的行数 **/
  300. }
  301. .introduce_info {
  302. font-size: 30rpx;
  303. // width: 95%;
  304. margin-bottom: 48rpx;
  305. overflow: hidden;
  306. word-break: break-all;
  307. /* break-all(允许在单词内换行。) */
  308. text-overflow: ellipsis;
  309. /* 超出部分省略号 */
  310. display: -webkit-box;
  311. /** 对象作为伸缩盒子模型显示 **/
  312. -webkit-box-orient: vertical;
  313. /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  314. -webkit-line-clamp: 3;
  315. /** 显示的行数 **/
  316. }
  317. .popUp {
  318. padding: 60rpx 30rpx;
  319. .fleet_introduce_css {
  320. text-align: center;
  321. margin-bottom: 40rpx;
  322. font-size: 36rpx;
  323. font-weight: 600;
  324. }
  325. }
  326. }
  327. .notice_title {
  328. margin: 60rpx 0 26rpx 0;
  329. color: #333333;
  330. font-size: 34rpx;
  331. font-weight: 600;
  332. }
  333. .member {
  334. padding: 1rpx 30rpx;
  335. background: #FFFFFF;
  336. margin-top: 30rpx;
  337. padding-bottom: 45rpx;
  338. .member_top {
  339. width: 100%;
  340. .member_title,
  341. .member_right {
  342. width: 50%;
  343. }
  344. .member_right {
  345. text-align: right;
  346. margin-top: 60rpx;
  347. color: #BABABA;
  348. }
  349. }
  350. .member_avatar {
  351. width: 100%;
  352. .member_item {
  353. width: 20%;
  354. text-align: center;
  355. margin-right: 44rpx;
  356. }
  357. .del {
  358. text-align: center;
  359. .del_img {
  360. width: 96rpx;
  361. height: 96rpx;
  362. background: #F2F4F7;
  363. border-radius: 48rpx;
  364. text-align: center;
  365. line-height: 86rpx;
  366. color: #AFB3BF;
  367. font-weight: 700;
  368. }
  369. }
  370. .member_name {
  371. overflow: hidden;
  372. text-overflow: ellipsis;
  373. white-space: nowrap;
  374. margin-top: 10rpx;
  375. font-size: 24rpx;
  376. }
  377. }
  378. }
  379. .setUp {
  380. padding: 0 30rpx;
  381. background-color: #FFFFFF;
  382. margin-top: 20rpx;
  383. .set_item {
  384. width: 100%;
  385. height: 120rpx;
  386. line-height: 120rpx;
  387. .set_name,
  388. .set_img {
  389. width: 50%;
  390. }
  391. .set_img {
  392. text-align: right;
  393. }
  394. }
  395. .quit {
  396. margin: 0 auto;
  397. text-align: center;
  398. color: #FE5C5C;
  399. font-size: 34rpx;
  400. font-weight: 600;
  401. }
  402. }
  403. }
  404. </style>