list.vue 17 KB

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