list.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. <template>
  2. <view>
  3. <!-- 第一种样式 人员管理-->
  4. <block v-if="datainfo.length>0">
  5. <block v-if="type=='mycar'">
  6. <view class="carlist pr" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.carId)"
  7. :data-idx="idx"
  8. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
  9. >
  10. <view class="delleft" style="padding: 0 24rpx;">
  11. <view class="carltop flexc">
  12. <view class="flex1">
  13. <view class="tit mb6 flexc" :class="ite.vehicleEnergy=='新能源'?'co16':'co01'">{{ite.plateNumber}}
  14. <text class="cir"></text>
  15. <text v-if="ite.vehicleColour">{{ite.vehicleColour}}</text>
  16. </view>
  17. <view class="txt flexc">
  18. {{ite.vehicleBrand}}
  19. <view class="txtbtn flexcc" v-if="ite.vehicleEnergy=='新能源'">{{ite.vehicleEnergy}}</view>
  20. <!-- <view class="txtbtn flexcc" v-if="ite.vehicleType==2">新能源</view> -->
  21. </view>
  22. </view>
  23. <image :src="carb" class="carb" v-if="ite.vehicleEnergy=='新能源'"></image>
  24. <image :src="cara" class="cara" v-else></image>
  25. </view>
  26. <view class="carlf">
  27. <view class="clflist">发动机号码 :{{ite.engineNumber}}</view>
  28. <view class="clflist">车辆识别代号:{{ite.identificationNumber}}</view>
  29. <view class="flexc">
  30. <view class="clflist w50">注册日期:{{ite.registrationDate}}</view>
  31. <view class="clflist w50">发证日期:{{ite.issueDate}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:car:remove'])" @click.stop="getDelFn(ite.carId)">删除</view>
  36. </view>
  37. </block>
  38. <!-- 地址 -->
  39. <block v-if="type=='address'">
  40. <view class="adrlist flexc" :class="ite.isdefault?'act':''" v-for="(ite,idx) in datainfo" :key="idx">
  41. <view class="adrl flex1">
  42. <view class="tit mb5">安徽省 合肥市 蜀山区 高新技术产业开发区</view>
  43. <view class="txt mb5">幸福大街88号幸福小区12#1304</view>
  44. <view class="txts flexc">袁玥 <text class="ml8">18305687768</text>
  45. <text class="ml8 btns" v-if="ite.isdefault">默认</text>
  46. <text class="ml8 btns" v-if="ite.isuser">最近使用</text>
  47. </view>
  48. </view>
  49. <view class="adrr flexcc">
  50. <image :src="edit"></image>
  51. </view>
  52. </view>
  53. </block>
  54. <!-- 快递 -->
  55. <block v-if="type=='delivery'">
  56. <view class="kdlists flex" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
  57. <image :src="noiconpimg" class="kdll"></image>
  58. <view class="kdlr over flex1">
  59. <view class="over tit">已发货</view>
  60. <view class="over tits">包裹正在等待揽收</view>
  61. <view class="over txt">淘宝 | 白色晚礼服平时可穿毕业洋装小白裙…</view>
  62. </view>
  63. </view>
  64. </block>
  65. <!-- 步骤条 -->
  66. <block v-if="type=='kdstep'">
  67. <view class="hfstep">
  68. <view class="hfslist flex">
  69. <view class="limg flexccc">
  70. <image :src="cira" class="imga"></image>
  71. </view>
  72. <view class="flex1">
  73. <view class="hfstit co01">运输中 11-25 12:24</view>
  74. <view class="hfstxt co27">【合肥市】快件已到达 合肥蜀山新产业园</view>
  75. </view>
  76. </view>
  77. <view class="hfslist flex">
  78. <view class="limg flexccc">
  79. <image :src="cirb" class="imgb"></image>
  80. </view>
  81. <view class="flex1">
  82. <view class="hfstit">11-25 07:23</view>
  83. <view class="hfstxt">【合肥市】快件已发往 合肥蜀山新产业园</view>
  84. </view>
  85. </view>
  86. <view class="hfslist flex">
  87. <view class="limg flexccc">
  88. <image :src="cirb" class="imgb"></image>
  89. </view>
  90. <view class="flex1">
  91. <view class="hfstit">11-25 07:20</view>
  92. <view class="hfstxt">【合肥市】快件已到达 合肥转运中心</view>
  93. </view>
  94. </view>
  95. </view>
  96. </block>
  97. <!-- 房屋管理 -->
  98. <block v-if="type=='comehouse'">
  99. <view class="carlist houselist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.houseId)">
  100. <view class="ctop flexc">
  101. <image :src="house" class="imgs" v-if="ite.houseStatus==1"></image>
  102. <image :src="housea" class="imgs" v-if="ite.houseStatus==4"></image>
  103. <image :src="houseb" class="imgs" v-if="ite.houseStatus==2"></image>
  104. <image :src="housec" class="imgs" v-if="ite.houseStatus==3"></image>
  105. <view class="tit">{{ite.communityName}}{{ite.detailedAddress}}</view>
  106. <!-- view class="btn btnbga">预约</view>
  107. <view class="btn btnbgb">已来访</view>
  108. <view class="btn btnbgc">待来访</view> -->
  109. <image :src="hedit" class="hedit"></image>
  110. <view class="flex1"></view>
  111. <view class="txt ca" v-if="ite.houseStatus==1">自住</view>
  112. <view class="txt cb" v-if="ite.houseStatus==4">出租</view>
  113. <view class="txt cc" v-if="ite.houseStatus==2">空闲</view>
  114. <view class="txt co6" v-if="ite.houseStatus==3">代售</view>
  115. </view>
  116. <view class="clists">
  117. <view class="clist"><view class="tit">房屋坐落</view>{{ite.location}}</view>
  118. <view class="flexc">
  119. <view class="clist w50"><view class="tit">房屋所属</view>{{ite.ownerName}}</view>
  120. <view class="clist w50"><view class="tit">建筑面积</view>{{ite.area}}m²</view>
  121. </view>
  122. <view class="flexc">
  123. <view class="clist w50"><view class="tit">有无车位</view>{{ite.hasParkingSpace=='Y'?'有':'无'}}</view>
  124. </view>
  125. <image :src="sha" class="shimg"></image>
  126. <!-- <image :src="shb" class="shimg"></image> -->
  127. </view>
  128. </view>
  129. </block>
  130. <!-- 居住人员 -->
  131. <block v-if="type=='authen'">
  132. <view class="carlist houselist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.residentId)">
  133. <view class="ctop flexc">
  134. <!-- <image :src="house" class="imgs" v-if="ite.houseStatus==1"></image>
  135. <image :src="housea" class="imgs" v-if="ite.houseStatus==4"></image>
  136. <image :src="houseb" class="imgs" v-if="ite.houseStatus==2"></image>
  137. <image :src="housec" class="imgs" v-if="ite.houseStatus==3"></image> -->
  138. <view class="tit">{{kaType(ite.tenantId,voList)}}</view>
  139. <!-- view class="btn btnbga">预约</view>
  140. <view class="btn btnbgb">已来访</view>
  141. <view class="btn btnbgc">待来访</view> -->
  142. <image :src="hedit" class="hedit"></image>
  143. <image :src="hdel" class="hdel" v-if="ite.examine!=2&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(ite)"></image>
  144. <view class="flex1"></view>
  145. <view class="txt ca" >{{kaType(ite.residentType,rylxList)}}</view>
  146. <!-- <view class="txt cb" v-if="ite.houseStatus==4">出租</view>
  147. <view class="txt cc" v-if="ite.houseStatus==2">空闲</view>
  148. <view class="txt co6" v-if="ite.houseStatus==3">代售</view> -->
  149. </view>
  150. <view class="clists">
  151. <view class="clist"><view class="tit">姓名</view>{{ite.residentName}}</view>
  152. <view class="clist"><view class="tit">联系方式</view>{{ite.residentPhone}}</view>
  153. <block v-if="ite.residentType!=3">
  154. <image :src="sha" class="shimg" v-if="ite.examine==1"></image>
  155. <image :src="shb" class="shimg" v-if="ite.examine==3"></image>
  156. </block>
  157. </view>
  158. </view>
  159. </block>
  160. <!-- 人员管理 -->
  161. <block v-if="type=='people'">
  162. <view class="carlist peolist" v-for="(ite,idx) in datainfo" :key="idx">
  163. <view class="ctop flexc">
  164. <image :src="house" class="imgs" v-if="ite.houseStatus==1"></image>
  165. <image :src="housea" class="imgs" v-if="ite.houseStatus==4"></image>
  166. <image :src="houseb" class="imgs" v-if="ite.houseStatus==2"></image>
  167. <image :src="housec" class="imgs" v-if="ite.houseStatus==3"></image>
  168. <view class="tit">{{ite.detailedAddress}}</view>
  169. <view class="flex1"></view>
  170. <view class="txt ca" v-if="ite.houseStatus==1">自住</view>
  171. <view class="txt cb" v-if="ite.houseStatus==4">出租</view>
  172. <view class="txt cc" v-if="ite.houseStatus==2">空闲</view>
  173. <view class="txt co6" v-if="ite.houseStatus==3">代售</view>
  174. </view>
  175. <view class="plists">
  176. <block v-for="(aite,aidx) in ite.residentInfoList">
  177. <view class="flexc pr mb12" :key="`peo${aidx}`" v-if="aidx==0" @click="getDetail(aite.residentId)"
  178. :data-idx="idx" :data-aidx="aidx" data-type="peo"
  179. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+aite.right+'px'"
  180. >
  181. <view class="plist flexc">
  182. <image :src="man" class="head" v-if="aite.residentGender==1"></image>
  183. <image :src="woman" class="head" v-else></image>
  184. <view class="flex1">
  185. <view class="ptit">{{aite.residentName}}
  186. <view class="btn btnc ml10" v-if="aite.isHouseholder=='Y'">户主</view>
  187. </view>
  188. <view class="ptxt">身份证号 | {{aite.residentIdCard}}</view>
  189. <view class="flexc">
  190. <view class="ptxt">性别 | {{aite.residentGender==1?'男':'女'}}</view>
  191. <view class="ptxt">年龄 | {{getAgeFromID(aite.residentIdCard)}}岁</view>
  192. </view>
  193. <view class="flexc" v-if="aite.residentAppearance">
  194. <view class="ptxt">人员面貌 | {{kaType(aite.residentAppearance,rymmList)}}</view>
  195. </view>
  196. </view>
  197. </view>
  198. <view class="spdel" v-if="aite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(aite.residentId)">删除</view>
  199. </view>
  200. <view class="flexc pr mb12" :key="`peo${aidx}`" v-if="aidx>0&&ite.zhanflag" @click="getDetail(aite.residentId)"
  201. :data-idx="idx"
  202. :data-aidx="aidx" data-type="peo"
  203. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+aite.right+'px'"
  204. >
  205. <view class="plist flexc">
  206. <image :src="man" class="head" v-if="aite.residentGender==1"></image>
  207. <image :src="woman" class="head" v-else></image>
  208. <view class="flex1">
  209. <view class="ptit">{{aite.residentName}}
  210. <view class="btn btnc ml10" v-if="aite.isHouseholder=='Y'">户主</view>
  211. </view>
  212. <view class="ptxt">身份证号 | {{aite.residentIdCard}}</view>
  213. <view class="flexc">
  214. <view class="ptxt">性别 | {{aite.residentGender==1?'男':'女'}}</view>
  215. <view class="ptxt">年龄 | {{getAgeFromID(aite.residentIdCard)}}岁</view>
  216. </view>
  217. <view class="flexc" v-if="aite.residentAppearance">
  218. <view class="ptxt">人员面貌 | {{kaType(aite.residentAppearance,rymmList)}}</view>
  219. </view>
  220. </view>
  221. </view>
  222. <view class="spdel" v-if="aite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(aite.residentId)">删除</view>
  223. </view>
  224. </block>
  225. <image :src="upimg" v-if="ite.residentInfoList.length>1" :class="ite.zhanflag?'act':''" class="upimg" @click="getZhan(idx)"></image>
  226. </view>
  227. </view>
  228. </block>
  229. <!-- 我的互动 -->
  230. <block v-if="type=='myhd'">
  231. <view class="mb12 pr" v-for="(ite,idx) in datainfo" :key="idx">
  232. <view class="hdlist pd12 flex">
  233. <image :src="man" class="mhead flex0"></image>
  234. <view class="flex1 overh">
  235. <view class="flexc mb6">
  236. <view class="name flex1 over">{{ite.nickName}}</view>
  237. <view class="tit flex0 ml10">
  238. <block v-if="ite.targetType==1">评论了你的文章</block>
  239. <block v-if="ite.targetType==2">点赞了你的文章</block>
  240. <block v-if="ite.targetType==3">收藏了你的文章</block>
  241. <block v-if="ite.targetType==4">回复了你的评论</block>
  242. <block v-if="ite.targetType==5">点赞了你的评论</block>
  243. </view>
  244. <view class="time flex0 ml10">{{ite.createTime}}</view>
  245. </view>
  246. <view class="flexc overh mb4">
  247. <view class="line bga"></view>
  248. <view class="txt over flex1">{{ite.targetTitle}}</view>
  249. <image :src="rimg" class="rimg ml10"></image>
  250. </view>
  251. </view>
  252. </view>
  253. </view>
  254. </block>
  255. <block v-if="type=='plsh'">
  256. <view class="mb12 pr" v-for="(ite,idx) in datainfo" :key="idx"
  257. :data-idx="idx"
  258. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
  259. >
  260. <view class="hdlist ">
  261. <view class="pd12 flex">
  262. <image :src="ite.avatar&&ite.avatar.avatar.indexOf('/static/img/profile')==-1?baseUrl+ite.avatar:man" class="mhead flex0"></image>
  263. <view class="flex1 overh">
  264. <view class="flexc mb6">
  265. <view class="name flex1 over">{{ite.nickName}}</view>
  266. <view class="time flex0 ml10">02-26</view>
  267. </view>
  268. <view class="txt mb8">{{ite.commentContent}}</view>
  269. <view class="flexc overh mb2">
  270. <view class="line bgd"></view>
  271. <view class="txta over flex1">{{ite.communityTitle}}</view>
  272. <image :src="rimg" class="rimg ml10"></image>
  273. </view>
  274. </view>
  275. </view>
  276. <view class="shbtns flexc pd12" >
  277. <view class="btn bga" @click="getSh('4',ite)">不予展示</view>
  278. <view class="flex1"></view>
  279. <view class="btn bgb" @click="getSh('3',ite)">不通过</view>
  280. <view class="btn bgc" @click="getSh('2',ite)">通过</view>
  281. </view>
  282. </view>
  283. <view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(ite.residentId)">删除</view>
  284. </view>
  285. </block>
  286. <!-- 我的点赞,收藏,评论 :data-idx="idx"
  287. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"-->
  288. <block v-if="type=='wdhd'">
  289. <view class="mb12 pr" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite)">
  290. <view class="hdlist ">
  291. <view class="pd12 flex">
  292. <image :src="ite.avatar&&ite.avatar.indexOf('/static/img/profile')==-1?baseUrl+ite.avatar:man" class="mhead flex0"></image>
  293. <view class="flex1 overh">
  294. <view class="flexc mb6">
  295. <view class="name flex1 over">{{ite.nickName}}</view>
  296. <view class="time flex0 ml10">{{ite.createTime}}</view>
  297. </view>
  298. <view class="txt mb8">{{ite.commentContent}}</view>
  299. <view class="flexc overh mb2">
  300. <view class="line bgd"></view>
  301. <view class="txta over flex1" v-if="tabval=='mypl'">{{ite.communityTitle}}</view>
  302. <view class="txta over flex1" v-else>{{ite.targetTitle}}</view>
  303. <image :src="rimg" class="rimg ml10"></image>
  304. </view>
  305. </view>
  306. </view>
  307. </view>
  308. <!-- <view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(ite.residentId)">删除</view> -->
  309. </view>
  310. </block>
  311. <!-- 车辆违规 -->
  312. <block v-if="type=='carpark'">
  313. <view class="carlist pr" v-for="(ite,idx) in datainfo" :key="ite.illegalParkingId" @click="getDetail(ite.illegalParkingId)"
  314. :data-idx="idx"
  315. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="checkPermi(['wuYe:illegalParking:remove'])?'right:'+ite.right+'px':''"
  316. >
  317. <view class="delleft">
  318. <view class="ctop flexc">
  319. <image :src="caraa" class="imgs" v-if="ite.carType==1"></image>
  320. <image :src="carbb" class="imgs" v-if="ite.carType==2"></image>
  321. <view class="tit">{{ite.plateNumber}}</view>
  322. <view class="num coff" v-if="ite.isBlack=='Y'">(已登黑名单)</view>
  323. <view class="flex1"></view>
  324. <block v-if="ite.carType">
  325. <view class="txt " :class="ite.carType==1?'ca':'cb'">{{kaType(ite.carType,carType)}}</view>
  326. </block>
  327. <!-- <view class="txt cb" v-if="ite.type==2">外来车辆</view> -->
  328. </view>
  329. <view class="clists">
  330. <block v-if="ite.carType==1">
  331. <view class="clist"><view class="tit">关联房号</view>{{ite.visitPortal}}</view>
  332. <view class="clist"><view class="tit">手机号码</view>{{ite.mobileNumber}}</view>
  333. </block>
  334. <view class="clist"><view class="tit">登记时间</view>{{ite.createTime}}</view>
  335. <view class="clist"><view class="tit">违停拍照</view>
  336. <view class="imgas" v-if="ite.illegalPhoto">
  337. <image :src="baseUrl+aite" v-for="(aite,aidx) in kaPhoto(ite.illegalPhoto)" :key="aidx" @click.stop="getPreview(aidx,ite.illegalPhoto)"></image>
  338. </view>
  339. </view>
  340. </view>
  341. </view>
  342. <view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:illegalParking:remove'])" @click.stop="getDelFn(ite.illegalParkingId)">删除</view>
  343. </view>
  344. </block>
  345. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  346. </block>
  347. <!-- 无数据 -->
  348. <view class="nodata" v-else>
  349. <image :src="noiconpimg"></image>
  350. <view>
  351. 暂无数据
  352. </view>
  353. </view>
  354. </view>
  355. </template>
  356. <script>
  357. import {selectDictValue} from "@/utils/common.js"
  358. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  359. import config from '@/config'
  360. export default{
  361. props:{
  362. datainfo: {
  363. type: Array,
  364. default () {
  365. return []
  366. }
  367. },
  368. wtdt:{
  369. type:String,
  370. default () {
  371. return ''
  372. }
  373. },
  374. type:{
  375. type:String,
  376. default () {
  377. return 0
  378. }
  379. },
  380. clcxList:{
  381. type: Array,
  382. default () {
  383. return []
  384. }
  385. },
  386. rymmList:{
  387. type: Array,
  388. default () {
  389. return []
  390. }
  391. },
  392. carType:{
  393. type: Array,
  394. default () {
  395. return []
  396. }
  397. },
  398. rylxList:{
  399. type: Array,
  400. default () {
  401. return []
  402. }
  403. },
  404. voList:{
  405. type: Array,
  406. default () {
  407. return []
  408. }
  409. },
  410. tabval:{
  411. type:String,
  412. default () {
  413. return ''
  414. }
  415. }
  416. },
  417. data(){
  418. return{
  419. house:require("@/health/static/house.png"),
  420. housea:require("@/health/static/housea.png"),
  421. houseb:require("@/health/static/houseb.png"),
  422. housec:require("@/health/static/housec.png"),
  423. noiconpimg:require("@/static/images/nodata.png"),
  424. upimg:require("@/mine/static/house/up.png"),
  425. cara:require("@/mine/static/house/cara.png"),
  426. carb:require("@/mine/static/house/carb.png"),
  427. caraa:require("@/mine/static/house/caraa.png"),
  428. carbb:require("@/mine/static/house/carbb.png"),
  429. hedit:require("@/mine/static/house/hedit.png"),
  430. hdel:require("@/mine/static/house/del.png"),
  431. sha:require("@/mine/static/house/sha.png"),
  432. shb:require("@/mine/static/house/shb.png"),
  433. edit:require("@/mine/static/edit.png"),
  434. cira:require('@/news/static/complaint/cira.png'),
  435. cirb:require('@/news/static/complaint/cirb.png'),
  436. man:require("@/health/static/man.png"),
  437. woman:require("@/health/static/woman.png"),
  438. rimg:require("@/static/images/rimga.png"),
  439. baseUrl:config.baseUrl,
  440. delBtnWidth:66,//左滑默认宽度
  441. }
  442. },
  443. mounted() {
  444. },
  445. methods:{
  446. checkPermi, checkRole,
  447. kaType(data, list) {
  448. return selectDictValue(list, data);
  449. },
  450. kaPhoto(data){
  451. return data.split(',');
  452. },
  453. getDetail(e){
  454. this.$emit('getDetail',e)
  455. },
  456. getDelFn(e){
  457. var that=this;
  458. uni.showModal({
  459. title: '确认删除',
  460. content: "是否确认删除",
  461. cancelText: '取消',
  462. confirmText: '确认',
  463. success: function(res) {
  464. if (res.confirm) {
  465. that.$emit('getDelFn',e)
  466. } else if (res.cancel) {
  467. }
  468. }
  469. });
  470. },
  471. getSh(type,ite){
  472. var that=this;
  473. var str="";
  474. if(type=='2'){
  475. str="通过"
  476. }else if(type=='3'){
  477. str="不通过"
  478. }else if(type=='4'){
  479. str="下架"
  480. }
  481. uni.showModal({
  482. title: '确认'+str,
  483. content: "是否确认"+str,
  484. cancelText: '取消',
  485. confirmText: '确认',
  486. success: function(res) {
  487. if (res.confirm) {
  488. var obj={
  489. status:type,
  490. contentId:ite.contentId,
  491. commentId:ite.commentId,
  492. }
  493. that.$emit('getSh',obj)
  494. } else if (res.cancel) {
  495. }
  496. }
  497. });
  498. },
  499. getZhan(idx){
  500. // var obj=JSON.parse(JSON.stringify(this.datainfo))[idx]
  501. // obj.zhanflag=!obj.zhanflag;
  502. // this.datainfo.splice(idx,1,obj);
  503. this.datainfo[idx].zhanflag=!this.datainfo[idx].zhanflag
  504. },
  505. getDelFn(id){
  506. var that=this;
  507. uni.showModal({
  508. title: '确认删除',
  509. content: "是否确认删除",
  510. cancelText: '取消',
  511. confirmText: '确认',
  512. success: function(res) {
  513. if (res.confirm) {
  514. that.$emit('getDelFn',id)
  515. } else if (res.cancel) {
  516. }
  517. }
  518. });
  519. },
  520. getAgeFromID(idNumber) {
  521. if(idNumber){
  522. const birthDateStr = idNumber.substring(6, 14);
  523. const birthYear = parseInt(birthDateStr.substring(0, 4));
  524. const birthMonth = parseInt(birthDateStr.substring(4, 6));
  525. const birthDay = parseInt(birthDateStr.substring(6, 8));
  526. const today = new Date();
  527. const currentYear = today.getFullYear();
  528. const currentMonth = today.getMonth() + 1;
  529. const currentDay = today.getDate();
  530. let age = currentYear - birthYear;
  531. if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
  532. age--;
  533. }
  534. return age;
  535. }
  536. },
  537. getPreview(idx,arr) {
  538. var newArr=[];
  539. var list=arr.split(',')
  540. list.forEach(ite=>{
  541. var ds=this.baseUrl+ite
  542. newArr.push(ds)
  543. })
  544. uni.previewImage({
  545. urls: newArr,
  546. current:idx,
  547. success: function(data) {},
  548. fail: function(err) {}
  549. });
  550. },
  551. //开始触摸滑动
  552. drawStart(e) {
  553. // console.log("开始触发");
  554. var touch = e.touches[0];
  555. this.startX = touch.clientX;
  556. },
  557. //触摸滑动
  558. drawMove(e) {
  559. var idx=e.currentTarget.dataset.idx
  560. var aidx=e.currentTarget.dataset.aidx
  561. var type=e.currentTarget.dataset.type;
  562. for (var index in this.datainfo) {
  563. if(type&&type=='peo'){
  564. for(var i in this.datainfo[idx].residentInfoList){
  565. this.$set(this.datainfo[idx].residentInfoList[i],'right',0);
  566. }
  567. }else{
  568. this.$set(this.datainfo[index],'right',0);
  569. }
  570. }
  571. var touch = e.touches[0];
  572. var item = this.datainfo[idx];
  573. var disX = this.startX - touch.clientX;
  574. if (disX >= 20) {
  575. if (disX > this.delBtnWidth) {
  576. disX = this.delBtnWidth;
  577. }
  578. if(type&&type=='peo'){
  579. this.$set(this.datainfo[idx].residentInfoList[aidx],'right',disX);
  580. }else{
  581. this.$set(this.datainfo[idx],'right',disX);
  582. }
  583. // this.csListArrl[idx].right=disX
  584. } else {
  585. // this.csListArrl[idx].right=0
  586. this.$set(this.datainfo[idx],'right',0);
  587. }
  588. },
  589. //触摸滑动结束
  590. drawEnd(e) {
  591. // console.log("滑动结束");
  592. var idx=e.currentTarget.dataset.idx
  593. var item = this.datainfo[idx];
  594. if (item.right >= this.delBtnWidth / 2) {
  595. // this.datainfo[idx].right=this.delBtnWidth
  596. // this.$set(this.datainfo[idx],'right',this.delBtnWidth);
  597. } else {
  598. this.datainfo[idx].right=0
  599. }
  600. },
  601. }
  602. }
  603. </script>
  604. <style lang="scss" scoped>
  605. .flex{display: flex;}
  606. .flexc{display: flex;align-items: center;}
  607. .mb10{margin-bottom: 20rpx;}
  608. .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  609. .carltop{min-height: 154rpx;border-bottom: 2rpx solid #E5E5E5;
  610. .cir{width: 8rpx;height: 8rpx;border-radius: 50%;margin: 0 8rpx;display: inline-block;}
  611. .co16{
  612. .cir{background: #16BE7F;}
  613. }
  614. .co01{
  615. .cir{background: #0156FE;}
  616. }
  617. .tit{font-weight: bold;font-size: 32rpx;}
  618. .txt{font-weight: 500;font-size: 26rpx;color: #272727;}
  619. .txtbtn{min-width: 82rpx;
  620. height: 32rpx;font-weight: 500;font-size: 20rpx;color: #45CB99;
  621. border-radius: 16rpx;border: 1px solid #45CB99;margin-left: 12rpx;}
  622. .cara{flex: 0 0 auto;width: 232rpx;height: 74rpx;margin-right: 40rpx;}
  623. .carb{flex: 0 0 auto;width: 278rpx;height: 130rpx;}
  624. }
  625. .carlf{padding:26rpx 0 10rpx;
  626. .clflist{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 16rpx;}
  627. }
  628. }
  629. .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  630. .ctop{border-bottom: 2rpx solid #E5E5E5;padding:26rpx 24rpx;
  631. .imgs{width: 40rpx;height: 42rpx;margin-right: 30rpx;}
  632. .tit{font-size: 32rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}
  633. .txt{font-weight: 500;font-size: 26rpx;
  634. &.ca{color: #3565ED;}
  635. &.cb{color: #FE5A0E;}
  636. &.cc{color: #28C529;}
  637. }
  638. .txta{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  639. .num{font-size: 24rpx;color: #AAAAAA;}
  640. }
  641. .btn{height: 34rpx;border-radius: 18rpx;display: flex;align-items: center;justify-content: center;padding: 0 10rpx;font-size: 22rpx;margin-right: 24rpx;
  642. &.btna{border: 2rpx solid #06C770;color: #06C770;}
  643. &.btnb{border: 2rpx solid #3565ED;color: #3565ED;}
  644. &.btnc{border: 2rpx solid #FE5A0E;color: #FE5A0E;}
  645. &.btnbga{border: 1px solid #0156FE;color: #3565ED;background: #DFEAFF;height: 36rpx;}
  646. &.btnbgb{border: 1px solid #C1C1C1;color: #666666;background: #F1F1F1;height: 36rpx;}
  647. &.btnbgc{border: 1px solid #FE5A0E;color:#FE5A0E;background:#FFEEE6;height: 36rpx;}
  648. }
  649. .clists{padding: 24rpx 24rpx 8rpx;
  650. .clist{font-weight: 500;margin-bottom: 16rpx;
  651. font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
  652. .tit{font-size: 26rpx;color: #AAAAAA;flex: 0 0 auto;margin-right: 16rpx;min-width: 108rpx;text-align-last: justify;}
  653. .imgas{display: flex;align-items: center;flex-wrap: wrap;
  654. image{width: 142rpx;height: 142rpx;margin-right: 30rpx;margin-top: 8rpx;}
  655. }
  656. }
  657. .w50{
  658. .clist{width: 50%;}
  659. }
  660. }
  661. }
  662. // 收货地址
  663. .adrlist{border-bottom: 2rpx solid #E5E5E5;padding: 34rpx 0 34rpx 8rpx;
  664. .tit{font-weight: 500;font-size: 22rpx;color: #666666;}
  665. .txt{font-size: 28rpx;color: #272727;font-weight: bold;}
  666. .txts{font-weight: 500;font-size: 26rpx;color: #272727;}
  667. .btns{font-weight: 500;font-size: 22rpx;color: #0256FD;padding: 2rpx 14rpx;display:inline-block;background: #C9DBFF;
  668. border-radius: 10rpx;}
  669. .adrr{width: 40rpx;height: 40rpx;flex: 0 0 auto;margin-left: 12rpx;
  670. image{width: 22rpx;height: 22rpx;}
  671. }
  672. &.act{
  673. .tit{color: #0256FD;}
  674. .txt{color: #0256FD;}
  675. .txts{color: #0256FD;}
  676. }
  677. }
  678. // 快递
  679. .kdlists{padding: 24rpx 26rpx;background-color: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  680. .kdll{width: 140rpx;height: 140rpx;border-radius: 10rpx;margin-right: 32rpx;flex: 0 0 auto;}
  681. .kdlr{
  682. .tit{font-size: 30rpx;color: #272727;font-weight: bold;margin-bottom: 18rpx;margin-top: 4rpx;}
  683. .tits{font-size: 24rpx;color: #272727;font-weight: 500;margin-bottom: 14rpx;}
  684. .txt{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  685. }
  686. }
  687. // 快递步骤条
  688. .hfstep{padding: 0 32rpx 44rpx 32rpx;
  689. .hfslist{padding-bottom: 44rpx;position: relative;
  690. &::before{content: '';position: absolute;left: 14rpx;top:14rpx;height: 100%;width: 2rpx;background: #E6E6E6;}
  691. .limg{width: 30rpx;height: 30rpx;margin-right: 22rpx;flex: 0 0 auto;margin-top:3rpx;
  692. .imga{width: 30rpx;height: 30rpx;}
  693. .imgb{width: 18rpx;height: 18rpx;}
  694. }
  695. .hfstit{font-weight: bold;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 24rpx;}
  696. .hfstxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;padding-left: 8rpx;}
  697. }
  698. }
  699. .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  700. .ctop{border-bottom: 2rpx solid #E5E5E5;padding:26rpx 24rpx;
  701. .imgs{width: 40rpx;height: 42rpx;margin-right: 30rpx;}
  702. .tit{font-size: 32rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}
  703. .txt{font-weight: 500;font-size: 26rpx;
  704. &.ca{color: #3565ED;}
  705. &.cb{color: #FE5A0E;}
  706. &.cc{color: #28C529;}
  707. }
  708. .txta{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  709. .num{font-size: 24rpx;color: #AAAAAA;}
  710. }
  711. .btn{height: 34rpx;border-radius: 18rpx;display: flex;align-items: center;justify-content: center;padding: 0 10rpx;font-size: 22rpx;margin-right: 24rpx;
  712. &.btna{border: 2rpx solid #06C770;color: #06C770;}
  713. &.btnb{border: 2rpx solid #3565ED;color: #3565ED;}
  714. &.btnc{border: 2rpx solid #FE5A0E;color: #FE5A0E;}
  715. &.btnbga{border: 1px solid #0156FE;color: #3565ED;background: #DFEAFF;height: 36rpx;}
  716. &.btnbgb{border: 1px solid #C1C1C1;color: #666666;background: #F1F1F1;height: 36rpx;}
  717. &.btnbgc{border: 1px solid #FE5A0E;color:#FE5A0E;background:#FFEEE6;height: 36rpx;}
  718. }
  719. }
  720. // 人员
  721. .peolist{
  722. .ctop{padding: 24rpx 24rpx 22rpx;}
  723. .imgs{margin-right: 16rpx !important;}
  724. .tit{font-size: 28rpx !important;}
  725. .plists{padding: 30rpx 24rpx 6rpx;
  726. .plist{background: linear-gradient(-90deg, #F2F5FF 0%, #FBFDFF 100%);border-radius: 20rpx;border: 2rpx solid #E6E6E6;padding: 18rpx 26rpx 4rpx;width: 100%;z-index: 1;
  727. .head{width: 96rpx;height: 98rpx;margin-right: 32rpx;flex: 0 0 auto;}
  728. .ptit{font-weight: bold;font-size: 30rpx;color: #272727;display: flex;align-items: center;margin-bottom: 14rpx;}
  729. .ptxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 14rpx;min-width: 176rpx;}
  730. }
  731. }
  732. .upimg{width: 26rpx;height: 22rpx;display: block;transform: rotate(180deg);transition: all 0.3s;margin: 0 auto 18rpx;
  733. &.act{transform: rotate(0deg);}
  734. }
  735. }
  736. // 房屋管理
  737. .houselist{position: relative;
  738. .clists{padding-bottom: 2rpx !important;}
  739. .clist{margin-bottom: 22rpx !important;}
  740. .hedit{width: 22rpx;height: 22rpx;flex: 0 0 auto;margin-left:16rpx;}
  741. .hdel{width: 26rpx;height: 26rpx;flex: 0 0 auto;margin-left:16rpx;}
  742. .shimg{width: 117rpx;height: 78rpx;position: absolute;right: 26rpx;bottom: 20rpx;}
  743. // .btns{justify-content: flex-end;
  744. // view{min-width: 156rpx;font-weight: 500;font-size: 26rpx;margin-right: 24rpx;border-radius: 20rpx;padding: 6rpx 8rpx;box-sizing: border-box;text-align: center;margin-bottom: 26rpx;
  745. // &.bga{border: 2rpx solid #FE5A0E;background: #FFF8F5;color: #FE5A0E;}
  746. // &.bgb{border: 2rpx solid #0256FD;background: #F1F5FC;color: #0256FD;}
  747. // &.bgc{border: 2rpx solid #06C770;background: #EEF8F4;color: #06C770;}
  748. // }
  749. // }
  750. }
  751. // 互动
  752. .pd12{padding: 24rpx;}
  753. .hdlist{background: #FFFFFF;border-radius: 20rpx;position: relative;z-index: 1;
  754. .mhead{width: 56rpx;height: 56rpx;margin-right: 20rpx;border-radius: 50%}
  755. .name{font-size: 28rpx;font-weight: bold;color: #272727;height: 56rpx;line-height: 56rpx;}
  756. .tit{font-weight: 500;font-size: 22rpx;color: #666666;}
  757. .time{font-weight: 500;font-size: 22rpx;color: #666666;}
  758. .line{width: 6rpx;height: 28rpx;border-radius: 4rpx;margin-right: 12rpx;
  759. &.bga{background: #FACA7D;}
  760. &.bgb{background: #86AFFF;}
  761. &.bgc{background: #93E9C2;}
  762. &.bgd{background: #DADADA;}
  763. }
  764. .txt{font-weight: 500;font-size: 26rpx;color: #272727;line-height: 36rpx;}
  765. .txta{font-weight: 500;font-size: 26rpx;color: #666666;}
  766. .rimg{width: 12rpx;height: 22rpx;}
  767. .shbtns{border-top: 2rpx solid #DADADA;
  768. .btn{border-radius: 20rpx;min-width: 110rpx;box-sizing: border-box;padding: 0 16rpx;
  769. height: 52rpx;display: flex;align-items: center;justify-content: center;flex:0 0 auto;margin-left: 20rpx;
  770. &.bga{border: 2rpx solid #06C770;background: #DAEFE6;color: #06C770;margin-left: 0;}
  771. &.bgb{border: 2rpx solid #FF6969;;background: #FFE7E7;color: #FF6969;}
  772. &.bgc{background: #0256FD;color: #FFFFFF;}
  773. }
  774. }
  775. }
  776. // 无数据
  777. .nodata{display: flex;flex-direction: column;align-items: center;
  778. image{width: 440rpx;height: 440rpx;}
  779. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  780. }
  781. </style>