list.vue 16 KB

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