list.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <template>
  2. <view>
  3. <!-- 第一种样式 人员管理-->
  4. <block v-if="datainfo.length>0">
  5. <!-- 巡更地点patrol -->
  6. <block v-if="type=='patrol'">
  7. <view class="patlist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
  8. <view class="pattop flexc">
  9. <image :src="home" class="imgs"></image>
  10. <view class="tit">幸福小区1栋2单元电梯间</view>
  11. <view class="flex1"></view>
  12. <view class="txt cd" v-if="ite.type==1">未巡更</view>
  13. <view class="txt cc" v-if="ite.type==2">已巡更</view>
  14. </view>
  15. <view class="patlistr">
  16. <view class="clist"><view class="tit">巡检类型</view>:设备维修</view>
  17. <view class="clist"><view class="tit">巡检时间</view>:2024-11-27 10:00</view>
  18. <view class="clist"><view class="tit">巡检人</view>:刘兵琦</view>
  19. </view>
  20. <view class="patbtns">
  21. <view class="btna" @click.stop="getDetail">查看</view>
  22. <view class="btnb" @click.stop="getAddFn">去巡更</view>
  23. </view>
  24. </view>
  25. </block>
  26. <!-- 报修管理 -->
  27. <block v-if="type=='warranty'">
  28. <view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
  29. <view class="watop ">
  30. <view class="watit">
  31. <view class="tit">一号楼3单元12楼楼梯间灯不亮</view>
  32. <view class="txt co01" v-if="ite.type==1">待分派</view>
  33. <view class="txt coa" v-if="ite.type==3">已完成</view>
  34. <view class="txt co28" v-if="ite.type==2">处理中</view>
  35. </view>
  36. <view class="walist"><view class="tit">小区名称</view>:幸福小区</view>
  37. <view class="walist"><view class="tit">报修门户</view>:3号楼1单元406</view>
  38. <view class="walist"><view class="tit">报修时间</view>:2024-11-14 17:16:31</view>
  39. <view class="walist" v-if="ite.type==3"><view class="tit" >完成时间</view>:2024-11-14 18:16:31</view>
  40. </view>
  41. <view class="wabtn">
  42. <view>查看详情</view>
  43. <image :src="rimg"></image>
  44. </view>
  45. </view>
  46. </block>
  47. <!-- 投诉建议 -->
  48. <block v-if="type=='complaint'">
  49. <view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail"
  50. :data-idx="idx"
  51. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
  52. >
  53. <view class="watop watopcom">
  54. <view class="watit">
  55. <view class="tit">小区电梯老化</view>
  56. <view class="txt co01" v-if="ite.type==1">待回复</view>
  57. <view class="txt coa" v-if="ite.type==2">已回复</view>
  58. </view>
  59. <view class="watopcoma overtwo">小区电梯时常发生问题,请物业派维修人员进行安全检 查,若无法排除问题,建议更换小区的电梯设备,避…</view>
  60. <view class="watopcomb">2024-11-18 08:16:54</view>
  61. </view>
  62. <!-- -->
  63. <view class="spdel" v-if="ite.right>0" @click.stop="getDelFn()">删除</view>
  64. </view>
  65. <!-- checkPermi(['system:menuFood:remove'])&& -->
  66. </block>
  67. <view class="shax">{{wtdt}}</view>
  68. </block>
  69. <!-- 无数据 -->
  70. <view class="nodata" v-else>
  71. <image :src="noiconpimg"></image>
  72. <view>
  73. 暂无数据
  74. </view>
  75. </view>
  76. </view>
  77. </template>
  78. <script>
  79. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  80. import config from '@/config'
  81. export default{
  82. props:{
  83. datainfo: {
  84. type: Array,
  85. default () {
  86. return []
  87. }
  88. },
  89. wtdt:{
  90. type:String,
  91. default () {
  92. return ''
  93. }
  94. },
  95. type:{
  96. type:String,
  97. default () {
  98. return 0
  99. }
  100. },
  101. topval:{
  102. type:String,
  103. default () {
  104. return ''
  105. }
  106. }
  107. },
  108. data(){
  109. return{
  110. noiconpimg:require("@/static/nodata.png"),
  111. car:require("@/car/static/car/car.png"),
  112. cara:require("@/car/static/car/cara.png"),
  113. carb:require("@/car/static/car/carb.png"),
  114. hicoa:require("@/people/static/people/hicoa.png"),
  115. hicob:require("@/people/static/people/hicob.png"),
  116. man:require("@/people/static/people/man.png"),
  117. woman:require("@/people/static/people/woman.png"),
  118. rimg:require("@/people/static/people/rimg.png"),
  119. pdel:require("@/people/static/people/pdel.png"),
  120. gzlx:require("@/people/static/people/gzlx.png"),
  121. mphone:require("@/people/static/people/mphone.png"),
  122. sfz:require("@/people/static/people/sfz.png"),
  123. eye:require("@/people/static/people/eye.png"),
  124. neye:require("@/people/static/people/neye.png"),
  125. time:require("@/work/static/manage/time.png"),
  126. house:require("@/work/static/manage/house.png"),
  127. housea:require("@/work/static/manage/housea.png"),
  128. home:require("@/service/static/service/home.png"),
  129. upimg:require("@/static/images/home/up.png"),
  130. star:require('@/manage/static/community/star.png'),
  131. stara:require('@/manage/static/community/stara.png'),
  132. baseUrl:config.baseUrl,
  133. delBtnWidth:66,//左滑默认宽度
  134. }
  135. },
  136. mounted() {
  137. },
  138. methods:{
  139. checkPermi, checkRole,
  140. getDetail(e){
  141. this.$emit('getDetail',e)
  142. },
  143. getAddFn(e){
  144. this.$emit('getAddFn',e)
  145. },
  146. getReadlist(e){
  147. this.$emit('getReadlist',e)
  148. },
  149. getZhan(idx){
  150. // var obj=JSON.parse(JSON.stringify(this.datainfo))[idx]
  151. // obj.zhanflag=!obj.zhanflag;
  152. // this.datainfo.splice(idx,1,obj);
  153. this.datainfo[idx].zhanflag=!this.datainfo[idx].zhanflag
  154. },
  155. getHideFn(idx){
  156. this.datainfo[idx].hideflag=!this.datainfo[idx].hideflag
  157. },
  158. getPreview(idx,arr) {
  159. var newArr=[];
  160. arr.forEach(ite=>{
  161. var ds=this.baseUrl+ite
  162. newArr.push(ds)
  163. })
  164. uni.previewImage({
  165. urls: newArr,
  166. current:idx,
  167. success: function(data) {},
  168. fail: function(err) {}
  169. });
  170. },
  171. //开始触摸滑动
  172. drawStart(e) {
  173. // console.log("开始触发");
  174. var touch = e.touches[0];
  175. this.startX = touch.clientX;
  176. },
  177. //触摸滑动
  178. drawMove(e) {
  179. // console.log("滑动");
  180. for (var index in this.datainfo) {
  181. // this.csListArrl[index].right=0
  182. this.$set(this.datainfo[index],'right',0);
  183. }
  184. var idx=e.currentTarget.dataset.idx
  185. var touch = e.touches[0];
  186. var item = this.datainfo[idx];
  187. var disX = this.startX - touch.clientX;
  188. if (disX >= 20) {
  189. if (disX > this.delBtnWidth) {
  190. disX = this.delBtnWidth;
  191. }
  192. // this.csListArrl[idx].right=disX
  193. this.$set(this.datainfo[idx],'right',disX);
  194. } else {
  195. // this.csListArrl[idx].right=0
  196. this.$set(this.datainfo[idx],'right',0);
  197. }
  198. },
  199. //触摸滑动结束
  200. drawEnd(e) {
  201. // console.log("滑动结束");
  202. var idx=e.currentTarget.dataset.idx
  203. var item = this.datainfo[idx];
  204. if (item.right >= this.delBtnWidth / 2) {
  205. // this.datainfo[idx].right=this.delBtnWidth
  206. this.$set(this.datainfo[idx],'right',this.delBtnWidth);
  207. } else {
  208. this.datainfo[idx].right=0
  209. }
  210. },
  211. }
  212. }
  213. </script>
  214. <style lang="scss" scoped>
  215. .flex{display: flex;}
  216. .flexc{display: flex;align-items: center;}
  217. .mb10{margin-bottom: 20rpx;}
  218. .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  219. .ctop{border-bottom: 2rpx solid #E5E5E5;padding:26rpx 24rpx;
  220. .imgs{width: 40rpx;height: 42rpx;margin-right: 30rpx;}
  221. .tit{font-size: 32rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}
  222. .txt{font-weight: 500;font-size: 26rpx;
  223. &.ca{color: #3565ED;}
  224. &.cb{color: #FE5A0E;}
  225. &.cc{color: #28C529;}
  226. }
  227. .txta{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  228. .num{font-size: 24rpx;color: #AAAAAA;}
  229. }
  230. .btn{height: 34rpx;border-radius: 18rpx;display: flex;align-items: center;justify-content: center;padding: 0 10rpx;font-size: 22rpx;margin-right: 24rpx;
  231. &.btna{border: 2rpx solid #06C770;color: #06C770;}
  232. &.btnb{border: 2rpx solid #3565ED;color: #3565ED;}
  233. &.btnc{border: 2rpx solid #FE5A0E;color: #FE5A0E;}
  234. &.btnbga{border: 1px solid #0156FE;color: #3565ED;background: #DFEAFF;height: 36rpx;}
  235. &.btnbgb{border: 1px solid #C1C1C1;color: #666666;background: #F1F1F1;height: 36rpx;}
  236. &.btnbgc{border: 1px solid #FE5A0E;color:#FE5A0E;background:#FFEEE6;height: 36rpx;}
  237. }
  238. .clists{padding: 24rpx 24rpx 8rpx;
  239. .clist{font-weight: 500;margin-bottom: 16rpx;
  240. font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
  241. .tit{font-size: 26rpx;color: #AAAAAA;flex: 0 0 auto;margin-right: 16rpx;min-width: 108rpx;text-align-last: justify;}
  242. .imgas{display: flex;align-items: center;flex-wrap: wrap;
  243. image{width: 142rpx;height: 142rpx;margin-right: 30rpx;margin-top: 8rpx;}
  244. }
  245. }
  246. .w50{
  247. .clist{width: 50%;}
  248. }
  249. }
  250. }
  251. // 人员
  252. .peolist{
  253. .ctop{padding: 24rpx 24rpx 22rpx;}
  254. .imgs{margin-right: 16rpx !important;}
  255. .tit{font-size: 28rpx !important;}
  256. .plists{padding: 30rpx 24rpx 6rpx;
  257. .plist{background: linear-gradient(-90deg, #F2F5FF 0%, #FBFDFF 100%);border-radius: 20rpx;border: 2rpx solid #E6E6E6;margin-bottom: 24rpx;padding: 18rpx 26rpx 4rpx;
  258. .head{width: 96rpx;height: 98rpx;margin-right: 32rpx;flex: 0 0 auto;}
  259. .ptit{font-weight: bold;font-size: 30rpx;color: #272727;display: flex;align-items: center;margin-bottom: 14rpx;}
  260. .ptxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 14rpx;min-width: 176rpx;}
  261. }
  262. }
  263. .upimg{width: 26rpx;height: 22rpx;display: block;transform: rotate(180deg);transition: all 0.3s;margin: 0 auto 18rpx;
  264. &.act{transform: rotate(0deg);}
  265. }
  266. }
  267. // 物业费
  268. .mlistl{width: 40%;display: flex;flex-direction: column;align-items: center;flex: 0 0 auto;
  269. .mltit{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 18rpx;}
  270. .mltxt{font-weight: bold;font-size: 32rpx;color: #0156FE;}
  271. }
  272. .houselist{
  273. .clists{padding-bottom: 2rpx !important;}
  274. .clist{margin-bottom: 22rpx !important;}
  275. }
  276. // 巡更地点
  277. .patlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;padding: 0 24rpx 30rpx;
  278. .pattop{padding:22rpx 30rpx;margin-bottom: 2rpx;
  279. .imgs{width: 28rpx;height: 28rpx;margin-right: 12rpx;}
  280. .tit{font-size: 30rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}
  281. .txt{font-weight: 500;font-size:24rpx;
  282. &.ca{color: #3565ED;}
  283. &.cb{color: #FE5A0E;}
  284. &.cc{color: #28C529;}
  285. &.cd{color: #FF6969;}
  286. }
  287. }
  288. .patlistr{background: #EFF4FF;border-radius: 20rpx;padding: 20rpx 32rpx;
  289. .clist{font-weight: 500;font-size: 26rpx;color: #272727;display: flex;line-height: 50rpx;
  290. .tit{font-size: 26rpx;flex: 0 0 auto;min-width: 108rpx;text-align-last: justify;font-weight: bold;}
  291. }
  292. }
  293. .patbtns{display: flex;justify-content: flex-end;align-items: center;flex-wrap: wrap;
  294. view{min-width: 156rpx;height: 52rpx;font-weight: 500;font-size: 26rpx;background: #FFFFFF;border-radius: 20rpx;box-sizing: border-box;display: flex;align-items: center;justify-content: center;padding: 0 10rpx;margin-left: 24rpx;margin-top: 24rpx;
  295. &.btna{border: 2rpx solid #0256FD;color: #0256FD;}
  296. &.btnb{background: #0256FD;color: #ffffff;}
  297. }
  298. }
  299. }
  300. // 报修
  301. .walists{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx; position: relative;
  302. .watop{
  303. padding: 0 36rpx 8rpx 38rpx;
  304. .watit{padding: 24rpx 0;margin-bottom: 4rpx;display: flex;
  305. .tit{font-weight: bold;font-size: 28rpx;color: #272727;flex: 1;
  306. .cir{width: 14rpx;margin-left: 8rpx;margin-bottom: 10rpx;height: 14rpx;display: inline-block;background: #FF6969;border-radius: 8rpx;}
  307. }
  308. .txt{font-weight: bold;font-size: 26rpx;flex: 0 0 auto;
  309. }
  310. }
  311. }
  312. .walist{display: flex;font-weight: 500;font-size: 24rpx;color: #666666;margin-bottom: 16rpx;
  313. .tit{min-width: 100rpx;text-align-last: justify}
  314. }
  315. .wabtn{display: flex;align-items: center;justify-content: space-between;border-top: 2rpx solid #E5E5E5;height: 80rpx;padding: 0 38rpx;
  316. view{font-weight: 500;font-size: 24rpx;color: #666666;}
  317. image{width: 16rpx;height: 28rpx;}
  318. }
  319. }
  320. // 维修人员
  321. .stafflist{width: 344rpx;min-height: 256rpx;background: #FFFFFF;border-radius: 20rpx;margin:0 12rpx 24rpx 12rpx;padding-bottom: 20rpx;box-sizing: border-box;
  322. // &:nth-of-type(2n){margin-right: 0;}
  323. .statop{border-bottom: 2rpx solid #E5E5E5;display: flex;padding: 24rpx 24rpx 22rpx;
  324. .head{width: 80rpx;height: 82rpx;margin-right: 24rpx;flex: 0 0 auto;}
  325. .stadel{width: 30rpx;height: 30rpx;flex: 0 0 auto;margin-left: 12rpx;}
  326. .statit{font-weight: bold;font-size: 30rpx;color: #272727;margin-bottom: 4rpx;}
  327. .statxt{font-weight: 500;font-size: 26rpx;
  328. .cir{width: 10rpx;height: 10rpx;border-radius: 50%;margin-right: 14rpx;display: inline-block;
  329. &.bga{background: #06C770;}
  330. &.bgb{background: #FF6969;}
  331. }
  332. }
  333. }
  334. .stalist{font-weight: 500;font-size: 26rpx;color: #272727;display: flex;align-items: center;padding: 20rpx 24rpx 0;
  335. .imgs{width: 24rpx;height: 30rpx;margin-right: 22rpx;flex: 0 0 auto;display: flex;align-items: center;justify-content: center;
  336. .gzlximg{width: 24rpx;height: 28rpx;}
  337. .mphone{width: 18rpx;height: 30rpx;}
  338. .sfz{width: 20rpx;height: 18rpx;}
  339. }
  340. .eyes{width: 34rpx;height: 34rpx;
  341. .eye{width: 22rpx;height: 15rpx;}
  342. .neye{width: 24rpx;height: 24rpx;}
  343. }
  344. }
  345. }
  346. .watopcom{background-color: #ffffff;border-radius: 20rpx;position: relative;z-index: 1;padding-bottom: 30rpx !important;
  347. .watopcoma{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 24rpx;}
  348. .watopcomb{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  349. }
  350. //资讯
  351. .newlists{
  352. background: #FFFFFF;padding: 22rpx 24rpx;margin-bottom: 24rpx;
  353. border-radius: 20rpx;
  354. .tit{font-size: 32rpx;font-weight: bold;color: #272727;line-height: 48rpx;margin-bottom:16rpx;}
  355. .txt{font-size: 24rpx;color: #666666;line-height: 36rpx;margin-bottom: 32rpx;}
  356. .stabox{
  357. .time{font-weight: 500;font-size: 24rpx;color: #AAAAAA;line-height: 36rpx;}
  358. .btns{font-weight: 500;font-size: 22rpx;color: #666666;line-height: 36rpx;min-width: 100rpx;box-sizing: border-box;margin-left: 20rpx;
  359. .imga{width: 24rpx;height: 22rpx;margin-right: 8rpx;}
  360. .imgb{width: 24rpx;height: 18rpx;margin-right: 10rpx;}
  361. }
  362. }
  363. }
  364. // 视频
  365. .videolists{
  366. background: #FFFFFF;margin-bottom: 24rpx;border-radius: 20rpx;
  367. .titbox{padding-top: 16rpx;padding-right: 38rpx;}
  368. .videos{width: 260rpx;height: 180rpx;}
  369. .tit{font-weight: bold;font-size: 14px;color: #272727;text-align: left;margin-bottom: 10rpx;}
  370. .num{font-weight: 500;font-size: 20rpx;color: #666666;min-width: 68rpx;padding: 0 8rpx;box-sizing: border-box;
  371. height: 28rpx;background: #E6E6E6;border-radius: 14rpx;line-height: 28rpx;text-align: center;}
  372. .time{font-weight: 500;font-size: 24rpx;color: #AAAAAA;margin-top: 44rpx;}
  373. }
  374. // 名单
  375. .readlist{background: #FFFFFF;border-radius: 20rpx;border: 2rpx solid #E6E6E6;margin-bottom: 24rpx;padding: 24rpx;display: flex;align-items: center;box-sizing: border-box;
  376. .head{width: 96rpx;height: 96rpx;margin-right: 28rpx;flex: 0 0 auto;}
  377. .tit{font-weight: bold;font-size: 30rpx;color: #272727;margin-bottom: 12rpx;}
  378. .time{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;
  379. text{margin-right: 12rpx;display: inline-block;}
  380. }
  381. }
  382. .spdel{width: 164rpx;background: #EA2D2D;font-weight: bold;font-size: 26rpx;color: #FFFFFF;display: flex;align-items: center;justify-content: center;position: absolute;right: -146rpx;top: 0;bottom: 0;padding-left: 14rpx;}
  383. // 无数据
  384. .nodata{display: flex;flex-direction: column;align-items: center;
  385. image{width: 440rpx;height: 440rpx;}
  386. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  387. }
  388. </style>