list.vue 17 KB

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