list.vue 17 KB

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