list.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. <template>
  2. <view>
  3. <!-- 第一种样式 人员管理-->
  4. <block v-if="datainfo.length>0">
  5. <!-- 报修管理 -->
  6. <block v-if="type=='warranty'">
  7. <view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getPut(ite.repairId,ite.repairStatus)"
  8. :data-idx="idx"
  9. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
  10. >
  11. <view class="delleft">
  12. <view class="watop ">
  13. <view class="watit">
  14. <view class="tit">{{ite.repairTitle}}</view>
  15. <view class="txt co01":class="{'co01':ite.repairStatus=='1','coa':ite.repairStatus=='3','co28':ite.repairStatus=='3'}">{{kaType(ite.repairStatus,bxztList)}}</view>
  16. <!-- <view class="txt co01" v-if="ite.type==1">待分派</view>
  17. <view class="txt coa" v-if="ite.type==3">已完成</view>
  18. <view class="txt co28" v-if="ite.type==2">处理中</view> -->
  19. </view>
  20. <!-- <view class="walist"><view class="tit">小区名称</view>:{{ite.communityName}}</view> -->
  21. <view class="walist"><view class="tit">项目</view>:{{kaType(ite.maintenanceCategory,bxlbList)}}</view>
  22. <view class="walist"><view class="tit">报修门户</view>:{{ite.houseAddress}}</view>
  23. <view class="walist"><view class="tit">报修时间</view>:{{ite.repairTime}}</view>
  24. <view class="walist" v-if="ite.type==3"><view class="tit" >完成时间</view>:{{ite.completionTime}}</view>
  25. </view>
  26. <view class="wabtn" @click.stop="getDetail(ite.repairId)">
  27. <view>查看详情</view>
  28. <image :src="rimg"></image>
  29. </view>
  30. </view>
  31. <view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:repair:remove'])&&ite.repairStatus<4" @click.stop="getDelFn(ite.repairId)">撤销</view>
  32. </view>
  33. </block>
  34. <!-- 访客 -->
  35. <block v-if="type=='visitor'">
  36. <view class="pr mb12" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.reservRecordId)" :data-idx="idx"
  37. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'">
  38. <view class="vislist pr" style="z-index: 1;margin-bottom: 0;">
  39. <view class="vistop flexc mb12">
  40. <view class="tit flex0">{{ite.name}}</view>
  41. <view class="btns flex0" v-if="ite.isCar=='Y'">驾车</view>
  42. <view class="flex1"></view>
  43. <view class="txt flex0" :class="{'co01':ite.status==1,'coa':ite.status==2,'cof4':ite.status==3,}">{{kaType(ite.status,fkztList)}}</view>
  44. </view>
  45. <view class="vlist flexcw">
  46. <view>来访人数:{{ite.num}}人</view>
  47. <view>来访事由:{{ite.reason}}</view>
  48. <view>车牌号码:{{ite.plateNumber}}</view>
  49. <view>手机号码:{{ite.mobileNumber}}</view>
  50. <view>来访时间:{{ite.visitorTime}}</view>
  51. </view>
  52. </view>
  53. <view class="spdel" v-if="ite.right>0" @click.stop="getDelFn(ite.reservRecordId)">删除</view>
  54. </view>
  55. </block>
  56. <!-- 历史账单 -->
  57. <block v-if="type=='moneybill'">
  58. <view class="carlist peolist" v-for="(ite,idx) in datainfo" :key="idx">
  59. <view class="ctop flexc" style="padding: 26rpx 24rpx 24rpx;">
  60. <image :src="time" class="imgs"></image>
  61. <view class="tit">2024/01 -2024/12</view>
  62. <view class="btn btnbgb" v-if="ite.type==1">已缴费</view>
  63. <view class="btn btnbgc" v-else>未缴费</view>
  64. <view class="flex1"></view>
  65. <view class="txta">1号楼3单元1102</view>
  66. </view>
  67. <view class="clists flexc">
  68. <view class="mlistl">
  69. <view class="mltit">应缴总额 /元</view>
  70. <view class="mltxt">4307.20</view>
  71. </view>
  72. <view class="mlistr">
  73. <view class="clist"><view class="tit">物业费用:</view>3247.20元</view>
  74. <view class="clist"><view class="tit">车位费用:</view>960.00元</view>
  75. <view class="clist"><view class="tit">能耗费用:</view>100.00元</view>
  76. </view>
  77. </view>
  78. </view>
  79. </block>
  80. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  81. </block>
  82. <!-- 无数据 -->
  83. <view class="nodata" v-else>
  84. <image :src="noiconpimg"></image>
  85. <view>
  86. 暂无数据
  87. </view>
  88. </view>
  89. </view>
  90. </template>
  91. <script>
  92. import config from '@/config'
  93. import {selectDictValue} from "@/utils/common.js"
  94. import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
  95. export default{
  96. props:{
  97. datainfo: {
  98. type: Array,
  99. default () {
  100. return []
  101. }
  102. },
  103. wtdt:{
  104. type:String,
  105. default () {
  106. return ''
  107. }
  108. },
  109. type:{
  110. type:String,
  111. default () {
  112. return 0
  113. }
  114. },
  115. bxztList:{
  116. type:Array,
  117. default () {
  118. return []
  119. }
  120. },
  121. fkztList:{
  122. type:Array,
  123. default () {
  124. return []
  125. }
  126. },
  127. bxlbList:{
  128. type:Array,
  129. default () {
  130. return []
  131. }
  132. }
  133. },
  134. data(){
  135. return{
  136. noiconpimg:require("@/static/images/nodata.png"),
  137. rimg:require('@/static/images/rimg.png'),
  138. baseUrl:config.baseUrl,
  139. delBtnWidth:66,//左滑默认宽度
  140. }
  141. },
  142. mounted() {
  143. },
  144. methods:{
  145. checkPermi,checkRole,
  146. kaType(data, list) {
  147. return selectDictValue(list, data);
  148. },
  149. getDetail(e){
  150. this.$emit('getDetail',e)
  151. },
  152. getPut(e,type){
  153. if(type>1){
  154. this.$emit('getDetail',e)
  155. }else{
  156. this.$emit('getPut',e)
  157. }
  158. },
  159. getDelFn(id){
  160. var that=this;
  161. uni.showModal({
  162. title: '确认删除',
  163. content: "是否确认删除",
  164. cancelText: '取消',
  165. confirmText: '确认',
  166. success: function(res) {
  167. if (res.confirm) {
  168. that.$emit('getDelFn',id)
  169. } else if (res.cancel) {
  170. }
  171. }
  172. });
  173. },
  174. getPreview(idx,arr) {
  175. var newArr=[];
  176. arr.forEach(ite=>{
  177. var ds=this.baseUrl+ite
  178. newArr.push(ds)
  179. })
  180. uni.previewImage({
  181. urls: newArr,
  182. current:idx,
  183. success: function(data) {},
  184. fail: function(err) {}
  185. });
  186. },
  187. //开始触摸滑动
  188. drawStart(e) {
  189. // console.log("开始触发");
  190. var touch = e.touches[0];
  191. this.startX = touch.clientX;
  192. },
  193. //触摸滑动
  194. drawMove(e) {
  195. // console.log("滑动");
  196. for (var index in this.datainfo) {
  197. // this.csListArrl[index].right=0
  198. this.$set(this.datainfo[index],'right',0);
  199. }
  200. var idx=e.currentTarget.dataset.idx
  201. var touch = e.touches[0];
  202. var item = this.datainfo[idx];
  203. var disX = this.startX - touch.clientX;
  204. if (disX >= 20) {
  205. if (disX > this.delBtnWidth) {
  206. disX = this.delBtnWidth;
  207. }
  208. // this.csListArrl[idx].right=disX
  209. this.$set(this.datainfo[idx],'right',disX);
  210. } else {
  211. // this.csListArrl[idx].right=0
  212. this.$set(this.datainfo[idx],'right',0);
  213. }
  214. },
  215. //触摸滑动结束
  216. drawEnd(e) {
  217. // console.log("滑动结束");
  218. var idx=e.currentTarget.dataset.idx
  219. var item = this.datainfo[idx];
  220. if (item.right >= this.delBtnWidth / 2) {
  221. // this.datainfo[idx].right=this.delBtnWidth
  222. this.$set(this.datainfo[idx],'right',this.delBtnWidth);
  223. } else {
  224. this.datainfo[idx].right=0
  225. }
  226. },
  227. }
  228. }
  229. </script>
  230. <style lang="scss" scoped>
  231. .flex{display: flex;}
  232. .flexc{display: flex;align-items: center;}
  233. .mb10{margin-bottom: 20rpx;}
  234. // 报修
  235. .walists{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx; position: relative;
  236. .watop{
  237. padding: 0 36rpx 8rpx 38rpx;
  238. .watit{padding: 24rpx 0;margin-bottom: 4rpx;display: flex;
  239. .tit{font-weight: bold;font-size: 28rpx;color: #272727;flex: 1;
  240. .cir{width: 14rpx;margin-left: 8rpx;margin-bottom: 10rpx;height: 14rpx;display: inline-block;background: #FF6969;border-radius: 8rpx;}
  241. }
  242. .txt{font-weight: bold;font-size: 26rpx;flex: 0 0 auto;
  243. }
  244. }
  245. }
  246. .walist{display: flex;font-weight: 500;font-size: 24rpx;color: #666666;margin-bottom: 16rpx;
  247. .tit{min-width: 100rpx;text-align-last: justify}
  248. }
  249. .wabtn{display: flex;align-items: center;justify-content: space-between;border-top: 2rpx solid #E5E5E5;height: 80rpx;padding: 0 38rpx;
  250. view{font-weight: 500;font-size: 24rpx;color: #666666;}
  251. image{width: 16rpx;height: 28rpx;}
  252. }
  253. }
  254. .vislist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;padding: 26rpx 38rpx 12rpx;
  255. .vistop{
  256. .tit{font-size: 28rpx;color: #272727;font-weight: bold;}
  257. .btns{min-width: 70rpx;font-weight: 500;
  258. 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;}
  259. .txt{font-weight: bold;font-size: 26rpx;margin-left: 18rpx;}
  260. }
  261. .vlist{
  262. view{font-weight: 500;font-size: 24rpx;color: #666666;margin-bottom: 16rpx;flex: 0 1 auto;min-width: 50%;}
  263. }
  264. }
  265. .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  266. .carltop{min-height: 154rpx;border-bottom: 2rpx solid #E5E5E5;
  267. .tit{font-weight: bold;font-size: 32rpx;}
  268. .txt{font-weight: 500;font-size: 26rpx;color: #272727;}
  269. .txtbtn{min-width: 82rpx;
  270. height: 32rpx;font-weight: 500;font-size: 20rpx;color: #45CB99;
  271. border-radius: 16rpx;border: 1px solid #45CB99;margin-left: 12rpx;}
  272. .cara{flex: 0 0 auto;width: 232rpx;height: 74rpx;margin-right: 40rpx;}
  273. .carb{flex: 0 0 auto;width: 278rpx;height: 130rpx;}
  274. }
  275. .carlf{padding:26rpx 0 10rpx;
  276. .clflist{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 16rpx;}
  277. }
  278. .ctop{border-bottom: 2rpx solid #E5E5E5;padding:26rpx 24rpx;
  279. .imgs{width: 40rpx;height: 42rpx;margin-right: 30rpx;}
  280. .tit{font-size: 32rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}
  281. .txt{font-weight: 500;font-size: 26rpx;
  282. &.ca{color: #3565ED;}
  283. &.cb{color: #FE5A0E;}
  284. &.cc{color: #28C529;}
  285. }
  286. .txta{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  287. .num{font-size: 24rpx;color: #AAAAAA;}
  288. }
  289. .btn{height: 34rpx;border-radius: 18rpx;display: flex;align-items: center;justify-content: center;padding: 0 10rpx;font-size: 22rpx;margin-right: 24rpx;
  290. &.btna{border: 2rpx solid #06C770;color: #06C770;}
  291. &.btnb{border: 2rpx solid #3565ED;color: #3565ED;}
  292. &.btnc{border: 2rpx solid #FE5A0E;color: #FE5A0E;}
  293. &.btnbga{border: 1px solid #0156FE;color: #3565ED;background: #DFEAFF;height: 36rpx;}
  294. &.btnbgb{border: 1px solid #C1C1C1;color: #666666;background: #F1F1F1;height: 36rpx;}
  295. &.btnbgc{border: 1px solid #FE5A0E;color:#FE5A0E;background:#FFEEE6;height: 36rpx;}
  296. }
  297. .clists{padding: 24rpx 24rpx 8rpx;
  298. .clist{font-weight: 500;margin-bottom: 16rpx;
  299. font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
  300. .tit{font-size: 26rpx;color: #AAAAAA;flex: 0 0 auto;margin-right: 16rpx;min-width: 108rpx;text-align-last: justify;}
  301. .imgas{display: flex;align-items: center;flex-wrap: wrap;
  302. image{width: 142rpx;height: 142rpx;margin-right: 30rpx;margin-top: 8rpx;}
  303. }
  304. }
  305. .w50{
  306. .clist{width: 50%;}
  307. }
  308. }
  309. }
  310. // 物业费
  311. .mlistl{width: 40%;display: flex;flex-direction: column;align-items: center;flex: 0 0 auto;
  312. .mltit{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 18rpx;}
  313. .mltxt{font-weight: bold;font-size: 32rpx;color: #0156FE;}
  314. }
  315. // 无数据
  316. .nodata{display: flex;flex-direction: column;align-items: center;
  317. image{width: 440rpx;height: 440rpx;}
  318. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  319. }
  320. </style>