fleetSee.vue 10 KB

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