list.vue 16 KB

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