list.vue 17 KB

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