list.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. <template>
  2. <view>
  3. <!-- 第一种样式 人员管理-->
  4. <block v-if="datainfo.length>0">
  5. <!-- 报修管理 步骤条-->
  6. <block v-if="type=='warranty'">
  7. <!-- @click.stop="getDetail(ite.repairId)" -->
  8. <view class="bxlists" v-for="(ite,idx) in datainfo" :key="ite.repairId" >
  9. <view class="bxtop">
  10. <swiper v-if="ite.repairImages" class="swiper" circular :indicator-color="incolorh" :indicator-active-color="activecolorh" :indicator-dots="indicatorDotsh" :autoplay="autoplay">
  11. <swiper-item v-for="(aite,aidx) in ite.repairImages" :key="aidx">
  12. <image :src="baseUrl+aite" @click="getPreviewImage(ite.repairImages,aidx)"></image>
  13. </swiper-item>
  14. </swiper>
  15. <view class="toptit mb10">{{ite.repairDetails}}</view>
  16. <view class="walist"><view class="tit">项目</view>:{{kaType(ite.maintenanceCategory,bxlbList)}}</view>
  17. <view class="walist"><view class="tit">报修门户</view>:{{ite.houseAddress}}</view>
  18. <view class="walist"><view class="tit">报修时间</view>:{{ite.repairTime}}</view>
  19. <!-- <view class="walist" v-if="ite.type==3"><view class="tit" >完成时间</view>:{{ite.completionTime}}</view> -->
  20. <view class="btns">
  21. <view class="btn btna" v-if="checkPermi(['wuYe:repair:remove'])&&ite.repairStatus<2" @click.stop="getDelFn(ite.repairId)">删除</view>
  22. <!-- <view class="btn btnb" v-if="checkPermi(['wuYe:repair:assign'])&&ite.repairStatus==1">指派</view> -->
  23. </view>
  24. </view>
  25. <view class="bxsteps">
  26. <uni-collapse ref="collapse" v-model="value">
  27. <uni-collapse-item title-border="none">
  28. <template v-slot:title>
  29. <view class="chtop flexc" >
  30. <view class="line"></view>
  31. <view>流程记录</view>
  32. <view class="flex1"></view>
  33. <!-- <image :src="upimg" class="upimg"></image> -->
  34. </view>
  35. </template>
  36. <view class="hfstep">
  37. <view class="hfslist flex" v-if="ite.repairStatus>3">
  38. <view class="limg flexccc">
  39. <image :src="cira" class="imga"></image>
  40. </view>
  41. <view class="flex1">
  42. <view class="hfstit co01">已完成 <text>{{ite.completionTime}}</text></view>
  43. <view class="hfstxt">【{{ite.staffName}} {{ite.staffPhone}}】已完成报修业务</view>
  44. <view class="hfimgs flexcw">
  45. <image :src="cira"></image>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="hfslist flex" v-if="ite.repairStatus>2">
  50. <view class="limg flexccc">
  51. <image :src="cira" class="imga" v-if="ite.repairStatus==3"></image>
  52. <image :src="cirb" class="imgb" v-else></image>
  53. </view>
  54. <view class="flex1">
  55. <view class="hfstit">处理中 <text>{{ite.visitTime}}</text></view>
  56. <view class="hfstxt">【{{ite.staffName}} {{ite.staffPhone}}】已上门处理中</view>
  57. </view>
  58. </view>
  59. <view class="hfslist flex" v-if="ite.repairStatus>1">
  60. <view class="limg flexccc">
  61. <image :src="cira" class="imga" v-if="ite.repairStatus==2"></image>
  62. <image :src="cirb" class="imgb" v-else></image>
  63. </view>
  64. <view class="flex1">
  65. <view class="hfstit">待上门 <text>{{ite.assignTime}}</text></view>
  66. <view class="hfstxt">您的报修申请已派于【{{ite.staffName}} {{ite.staffPhone}}】处理</view>
  67. </view>
  68. </view>
  69. <view class="hfslist flex" >
  70. <view class="limg flexccc">
  71. <image :src="cira" class="imga" v-if="ite.repairStatus==1"></image>
  72. <image :src="cirb" class="imgb" v-else></image>
  73. </view>
  74. <view class="flex1">
  75. <view class="hfstit">待指派 <text>{{ite.repairTime}}</text></view>
  76. <view class="hfstxt">您的报修申请已提交,请耐心等待</view>
  77. </view>
  78. </view>
  79. </view>
  80. </uni-collapse-item>
  81. </uni-collapse>
  82. </view>
  83. </view>
  84. </block>
  85. <!-- 报修管理 不需要了-->
  86. <block v-if="type=='bxylwarranty'">
  87. <view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getPut(ite.repairId,ite.repairStatus)"
  88. :data-idx="idx"
  89. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
  90. >
  91. <view class="delleft">
  92. <view class="watop ">
  93. <view class="watit">
  94. <view class="tit">{{ite.repairTitle}}</view>
  95. <view class="txt co01":class="{'co01':ite.repairStatus=='1','coa':ite.repairStatus=='3','co28':ite.repairStatus=='3'}">{{kaType(ite.repairStatus,bxztList)}}</view>
  96. </view>
  97. <!-- <view class="walist"><view class="tit">小区名称</view>:{{ite.communityName}}</view> -->
  98. <view class="walist"><view class="tit">项目</view>:{{kaType(ite.maintenanceCategory,bxlbList)}}</view>
  99. <view class="walist"><view class="tit">报修门户</view>:{{ite.houseAddress}}</view>
  100. <view class="walist"><view class="tit">报修时间</view>:{{ite.repairTime}}</view>
  101. <view class="walist" v-if="ite.type==3"><view class="tit" >完成时间</view>:{{ite.completionTime}}</view>
  102. </view>
  103. <view class="wabtn" @click.stop="getDetail(ite.repairId)">
  104. <view>查看详情</view>
  105. <image :src="rimg"></image>
  106. </view>
  107. </view>
  108. <view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:repair:remove'])&&ite.repairStatus<4" @click.stop="getDelFn(ite.repairId)">撤销</view>
  109. </view>
  110. </block>
  111. <!-- 访客 -->
  112. <block v-if="type=='visitor'">
  113. <view class="pr mb12" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.reservRecordId)" :data-idx="idx"
  114. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'">
  115. <view class="vislist pr" style="z-index: 1;margin-bottom: 0;">
  116. <view class="vistop flexc mb12">
  117. <view class="tit flex0">{{ite.name}}</view>
  118. <view class="btns flex0" v-if="ite.isCar=='Y'">驾车</view>
  119. <view class="flex1"></view>
  120. <view class="txt flex0" :class="{'co01':ite.status==1,'coa':ite.status==2,'cof4':ite.status==3,}">{{kaType(ite.status,fkztList)}}</view>
  121. </view>
  122. <view class="vlist flexcw">
  123. <view>来访人数:{{ite.num}}人</view>
  124. <view>来访事由:{{ite.reason}}</view>
  125. <view>车牌号码:{{ite.plateNumber}}</view>
  126. <view>手机号码:{{ite.mobileNumber}}</view>
  127. <view>来访时间:{{ite.visitorTime}}</view>
  128. </view>
  129. </view>
  130. <view class="spdel" v-if="ite.right>0" @click.stop="getDelFn(ite.reservRecordId)">删除</view>
  131. </view>
  132. </block>
  133. <!-- 历史账单 -->
  134. <block v-if="type=='moneybill'">
  135. <view class="carlist peolist" v-for="(ite,idx) in datainfo" :key="idx">
  136. <view class="ctop flexc" style="padding: 26rpx 24rpx 24rpx;">
  137. <image :src="time" class="imgs"></image>
  138. <view class="tit">2024/01 -2024/12</view>
  139. <view class="btn btnbgb" v-if="ite.type==1">已缴费</view>
  140. <view class="btn btnbgc" v-else>未缴费</view>
  141. <view class="flex1"></view>
  142. <view class="txta">1号楼3单元1102</view>
  143. </view>
  144. <view class="clists flexc">
  145. <view class="mlistl">
  146. <view class="mltit">应缴总额 /元</view>
  147. <view class="mltxt">4307.20</view>
  148. </view>
  149. <view class="mlistr">
  150. <view class="clist"><view class="tit">物业费用:</view>3247.20元</view>
  151. <view class="clist"><view class="tit">车位费用:</view>960.00元</view>
  152. <view class="clist"><view class="tit">能耗费用:</view>100.00元</view>
  153. </view>
  154. </view>
  155. </view>
  156. </block>
  157. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  158. </block>
  159. <!-- 无数据 -->
  160. <view class="nodata" v-else>
  161. <image :src="noiconpimg"></image>
  162. <view>
  163. 暂无数据
  164. </view>
  165. </view>
  166. </view>
  167. </template>
  168. <script>
  169. import config from '@/config'
  170. import {selectDictValue} from "@/utils/common.js"
  171. import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
  172. export default{
  173. props:{
  174. datainfo: {
  175. type: Array,
  176. default () {
  177. return []
  178. }
  179. },
  180. wtdt:{
  181. type:String,
  182. default () {
  183. return ''
  184. }
  185. },
  186. type:{
  187. type:String,
  188. default () {
  189. return 0
  190. }
  191. },
  192. bxztList:{
  193. type:Array,
  194. default () {
  195. return []
  196. }
  197. },
  198. fkztList:{
  199. type:Array,
  200. default () {
  201. return []
  202. }
  203. },
  204. bxlbList:{
  205. type:Array,
  206. default () {
  207. return []
  208. }
  209. }
  210. },
  211. data(){
  212. return{
  213. noiconpimg:require("@/static/images/nodata.png"),
  214. rimg:require('@/static/images/rimg.png'),
  215. cira:require('@/news/static/complaint/cira.png'),
  216. cirb:require('@/news/static/complaint/cirb.png'),
  217. upimg:require('@/work/static/manage/up.png'),
  218. baseUrl:config.baseUrl,
  219. delBtnWidth:66,//左滑默认宽度
  220. value:[],
  221. autoplay:false,
  222. incolorh:'#C0C3C3',
  223. activecolorh:'#FFFFFF',
  224. indicatorDotsh: true,
  225. }
  226. },
  227. mounted() {
  228. },
  229. methods:{
  230. checkPermi,checkRole,
  231. kaType(data, list) {
  232. return selectDictValue(list, data);
  233. },
  234. getDetail(e){
  235. this.$emit('getDetail',e)
  236. },
  237. getPut(e,type){
  238. if(type>1){
  239. this.$emit('getDetail',e)
  240. }else{
  241. this.$emit('getPut',e)
  242. }
  243. },
  244. getDelFn(id){
  245. var that=this;
  246. uni.showModal({
  247. title: '确认删除',
  248. content: "是否确认删除",
  249. cancelText: '取消',
  250. confirmText: '确认',
  251. success: function(res) {
  252. if (res.confirm) {
  253. that.$emit('getDelFn',id)
  254. } else if (res.cancel) {
  255. }
  256. }
  257. });
  258. },
  259. getPreviewImage(arr,idx){
  260. var newArr=[];
  261. arr.forEach(ite=>{
  262. var ds=this.baseUrl+ite
  263. newArr.push(ds)
  264. })
  265. uni.previewImage({
  266. urls: newArr,
  267. current:idx,
  268. success: function(data) {
  269. },
  270. fail: function(err) {
  271. }
  272. });
  273. },
  274. //开始触摸滑动
  275. drawStart(e) {
  276. // console.log("开始触发");
  277. var touch = e.touches[0];
  278. this.startX = touch.clientX;
  279. },
  280. //触摸滑动
  281. drawMove(e) {
  282. // console.log("滑动");
  283. for (var index in this.datainfo) {
  284. // this.csListArrl[index].right=0
  285. this.$set(this.datainfo[index],'right',0);
  286. }
  287. var idx=e.currentTarget.dataset.idx
  288. var touch = e.touches[0];
  289. var item = this.datainfo[idx];
  290. var disX = this.startX - touch.clientX;
  291. if (disX >= 20) {
  292. if (disX > this.delBtnWidth) {
  293. disX = this.delBtnWidth;
  294. }
  295. // this.csListArrl[idx].right=disX
  296. this.$set(this.datainfo[idx],'right',disX);
  297. } else {
  298. // this.csListArrl[idx].right=0
  299. this.$set(this.datainfo[idx],'right',0);
  300. }
  301. },
  302. //触摸滑动结束
  303. drawEnd(e) {
  304. // console.log("滑动结束");
  305. var idx=e.currentTarget.dataset.idx
  306. var item = this.datainfo[idx];
  307. if (item.right >= this.delBtnWidth / 2) {
  308. // this.datainfo[idx].right=this.delBtnWidth
  309. this.$set(this.datainfo[idx],'right',this.delBtnWidth);
  310. } else {
  311. this.datainfo[idx].right=0
  312. }
  313. },
  314. }
  315. }
  316. </script>
  317. <style lang="scss" scoped>
  318. .flex{display: flex;}
  319. .flexc{display: flex;align-items: center;}
  320. .mb10{margin-bottom: 20rpx;}
  321. // 报修
  322. .walists{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx; position: relative;
  323. .watop{
  324. padding: 0 36rpx 8rpx 38rpx;
  325. .watit{padding: 24rpx 0;margin-bottom: 4rpx;display: flex;
  326. .tit{font-weight: bold;font-size: 28rpx;color: #272727;flex: 1;
  327. .cir{width: 14rpx;margin-left: 8rpx;margin-bottom: 10rpx;height: 14rpx;display: inline-block;background: #FF6969;border-radius: 8rpx;}
  328. }
  329. .txt{font-weight: bold;font-size: 26rpx;flex: 0 0 auto;
  330. }
  331. }
  332. }
  333. .walist{display: flex;font-weight: 500;font-size: 24rpx;color: #666666;margin-bottom: 16rpx;
  334. .tit{min-width: 100rpx;text-align-last: justify}
  335. }
  336. .wabtn{display: flex;align-items: center;justify-content: space-between;border-top: 2rpx solid #E5E5E5;height: 80rpx;padding: 0 38rpx;
  337. view{font-weight: 500;font-size: 24rpx;color: #666666;}
  338. image{width: 16rpx;height: 28rpx;}
  339. }
  340. }
  341. .vislist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;padding: 26rpx 38rpx 12rpx;
  342. .vistop{
  343. .tit{font-size: 28rpx;color: #272727;font-weight: bold;}
  344. .btns{min-width: 70rpx;font-weight: 500;
  345. font-size: 20rpx;padding: 0 8rpx;box-sizing: border-box;text-align: center;margin-left: 18rpx;color: #00B861;border-radius: 16rpx;border: 2rpx solid #0AC86E;}
  346. .txt{font-weight: bold;font-size: 26rpx;margin-left: 18rpx;}
  347. }
  348. .vlist{
  349. view{font-weight: 500;font-size: 24rpx;color: #666666;margin-bottom: 16rpx;flex: 0 1 auto;min-width: 50%;}
  350. }
  351. }
  352. .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  353. .carltop{min-height: 154rpx;border-bottom: 2rpx solid #E5E5E5;
  354. .tit{font-weight: bold;font-size: 32rpx;}
  355. .txt{font-weight: 500;font-size: 26rpx;color: #272727;}
  356. .txtbtn{min-width: 82rpx;
  357. height: 32rpx;font-weight: 500;font-size: 20rpx;color: #45CB99;
  358. border-radius: 16rpx;border: 1px solid #45CB99;margin-left: 12rpx;}
  359. .cara{flex: 0 0 auto;width: 232rpx;height: 74rpx;margin-right: 40rpx;}
  360. .carb{flex: 0 0 auto;width: 278rpx;height: 130rpx;}
  361. }
  362. .carlf{padding:26rpx 0 10rpx;
  363. .clflist{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 16rpx;}
  364. }
  365. .ctop{border-bottom: 2rpx solid #E5E5E5;padding:26rpx 24rpx;
  366. .imgs{width: 40rpx;height: 42rpx;margin-right: 30rpx;}
  367. .tit{font-size: 32rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}
  368. .txt{font-weight: 500;font-size: 26rpx;
  369. &.ca{color: #3565ED;}
  370. &.cb{color: #FE5A0E;}
  371. &.cc{color: #28C529;}
  372. }
  373. .txta{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  374. .num{font-size: 24rpx;color: #AAAAAA;}
  375. }
  376. .btn{height: 34rpx;border-radius: 18rpx;display: flex;align-items: center;justify-content: center;padding: 0 10rpx;font-size: 22rpx;margin-right: 24rpx;
  377. &.btna{border: 2rpx solid #06C770;color: #06C770;}
  378. &.btnb{border: 2rpx solid #3565ED;color: #3565ED;}
  379. &.btnc{border: 2rpx solid #FE5A0E;color: #FE5A0E;}
  380. &.btnbga{border: 1px solid #0156FE;color: #3565ED;background: #DFEAFF;height: 36rpx;}
  381. &.btnbgb{border: 1px solid #C1C1C1;color: #666666;background: #F1F1F1;height: 36rpx;}
  382. &.btnbgc{border: 1px solid #FE5A0E;color:#FE5A0E;background:#FFEEE6;height: 36rpx;}
  383. }
  384. .clists{padding: 24rpx 24rpx 8rpx;
  385. .clist{font-weight: 500;margin-bottom: 16rpx;
  386. font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
  387. .tit{font-size: 26rpx;color: #AAAAAA;flex: 0 0 auto;margin-right: 16rpx;min-width: 108rpx;text-align-last: justify;}
  388. .imgas{display: flex;align-items: center;flex-wrap: wrap;
  389. image{width: 142rpx;height: 142rpx;margin-right: 30rpx;margin-top: 8rpx;}
  390. }
  391. }
  392. .w50{
  393. .clist{width: 50%;}
  394. }
  395. }
  396. }
  397. // 物业费
  398. .mlistl{width: 40%;display: flex;flex-direction: column;align-items: center;flex: 0 0 auto;
  399. .mltit{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 18rpx;}
  400. .mltxt{font-weight: bold;font-size: 32rpx;color: #0156FE;}
  401. }
  402. //报修步骤条
  403. .bxlists{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;position: relative;
  404. .bxtop{padding: 30rpx 24rpx;position: relative;
  405. .swiper{width: 100%;height: 280rpx;border-radius: 20rpx;box-sizing: border-box;margin-bottom: 28rpx;overflow: hidden;
  406. image{width: 100%;height: 100%;}
  407. }
  408. .toptit{font-weight: bold;font-size: 28rpx;color: #161616;}
  409. .walist{display: flex;font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 16rpx;
  410. .tit{min-width: 100rpx;text-align-last: justify}
  411. }
  412. .btns{position: absolute;right: 26rpx;bottom: 20rpx;}
  413. .btn{min-width: 120rpx;height: 54rpx;border-radius: 26rpx;font-weight: 500;font-size: 26rpx;text-align: center;line-height: 54rpx;padding: 0 10rpx;box-sizing: border-box; margin-bottom: 14rpx;
  414. &.btna{border: 2rpx solid #FF6969;background: #FFF8F8;color: #FF6969;}
  415. &.btnb{background: #0256FD;color: #FFFFFF;}
  416. }
  417. }
  418. .bxsteps{border-top: 2rpx solid #E6E6E6;padding: 30rpx 0;
  419. .chtop{padding-right: 48rpx;
  420. .line{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
  421. view{font-weight: bold;font-size: 28rpx;color: #272727;}
  422. .upimg{width: 22rpx;height: 14rpx;flex: 0 0 auto;margin-left: 12rpx;transform: rotate(180deg);transition: all 0.3s;}
  423. }
  424. .hfstep{padding: 0 32rpx 30rpx 36rpx;margin-top: 24rpx;
  425. .hfslist{padding-bottom: 20rpx;position: relative;
  426. &:first-child{
  427. .hfstit{color: #0156FE;}
  428. }
  429. &::before{content: '';position: absolute;left: 14rpx;top:14rpx;height: 100%;width: 2rpx;background: #E6E6E6;}
  430. .limg{width: 30rpx;height: 30rpx;margin-right: 22rpx;flex: 0 0 auto;margin-top:3rpx;
  431. .imga{width: 30rpx;height: 30rpx;}
  432. .imgb{width: 18rpx;height: 18rpx;}
  433. }
  434. .hfstit{font-weight: bold;font-size: 30rpx;color: #666666;line-height: 36rpx;margin-bottom: 20rpx;
  435. text{font-size: 26rpx;margin-left: 12rpx;}
  436. }
  437. .hfstxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 20rpx;}
  438. .hfimgs{padding-top: 2rpx;
  439. image{width: 84rpx;height: 84rpx;border-radius: 20rpx;margin-right: 40rpx;margin-bottom: 10rpx;}
  440. }
  441. }
  442. }
  443. }
  444. }
  445. .bxlists /deep/ .uni-swiper-dots-horizontal{left: 26rpx;transform: translate(0);}
  446. .bxlists /deep/ .uni-swiper-dot{width: 10rpx;height: 10rpx;}
  447. .bxlists /deep/ .uni-swiper-dot-active{width: 24rpx;height: 10rpx;}
  448. // 无数据
  449. .nodata{display: flex;flex-direction: column;align-items: center;
  450. image{width: 440rpx;height: 440rpx;}
  451. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  452. }
  453. </style>