list.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. <template>
  2. <view>
  3. <!-- 第一种样式 人员管理-->
  4. <block v-if="datainfo.length>0">
  5. <!-- 社区资讯 -->
  6. <block v-if="type=='newssq'">
  7. <view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.communityId)">
  8. <view class="watop">
  9. <view class="watit">
  10. <view class="tit">{{ite.communityTitle}}<text class="cir" v-if="ite.isInteraction=='Y'"></text></view>
  11. </view>
  12. <view class="wacoma overtwo"><rich-text v-if="ite.communityContent" :nodes="ite.communityContent"></rich-text></view>
  13. <view class="wacomb">{{ite.publishTime}}</view>
  14. </view>
  15. <view class="wabtn">
  16. <view>查看详情</view>
  17. <image :src="rimg"></image>
  18. </view>
  19. </view>
  20. </block>
  21. <!-- 新版投诉建议 @click="getDetail(ite.suggestionId)"-->
  22. <block v-if="type=='complaint'">
  23. <!-- @click.stop="getDetail(ite.repairId)" -->
  24. <view class="bxlists" v-for="(ite,idx) in datainfo" :key="ite.suggestionId">
  25. <view class="bxtop">
  26. <swiper v-if="ite.images" class="swiper" circular :indicator-color="incolorh" :indicator-active-color="activecolorh" :indicator-dots="indicatorDotsh" :autoplay="autoplay">
  27. <!-- datainfo.images -->
  28. <swiper-item v-for="(aite,aidx) in ite.images" :key="aidx">
  29. <image :src="baseUrl+aite" @click="getPreviewImage(ite.images,aidx)"></image>
  30. </swiper-item>
  31. </swiper>
  32. <view class="toptit mb10">{{ite.content}}</view>
  33. <view class="walist"><view class="tit">提交时间</view>:{{ite.createTime}}</view>
  34. <view class="btns">
  35. <view class="btn btna" v-if="checkPermi(['wuYe:suggestion:remove'])" @click.stop="getDelFn(ite.suggestionId)">删除</view>
  36. <!-- <view class="btn btnb" v-if="checkPermi(['wuYe:suggestion:edit'])&&ite.status==1">回复</view> -->
  37. </view>
  38. </view>
  39. <view class="bxsteps">
  40. <uni-collapse ref="collapse" v-model="value">
  41. <uni-collapse-item title-border="none">
  42. <template v-slot:title>
  43. <view class="chtop flexc" >
  44. <view class="line"></view>
  45. <view>交流记录</view>
  46. <view class="flex1"></view>
  47. </view>
  48. </template>
  49. <view class="hfstep">
  50. <view class="hfslist flex" v-if="ite.status==2">
  51. <view class="limg flexccc">
  52. <image :src="cira" class="imga"></image>
  53. </view>
  54. <view class="flex1">
  55. <view class="hfstit co01">已回复 <text>回复时间</text></view>
  56. <view class="hfstxt">{{ite.replyContent}}</view>
  57. <!-- 附件 -->
  58. <block v-if="ite.suggestionFjList">
  59. <view class="fjlists" v-for="(fite,fidx) in ite.suggestionFjList" :key='fidx'>
  60. <view class="flext" @click="getDownloader(fite.url)">
  61. <view class="imgl"><image :src="filico" ></image></view>
  62. <view class="tit">{{fite.name}}</view>
  63. </view>
  64. </view>
  65. </block>
  66. <!-- <view class="hfimgs flexcw">
  67. <image :src="cira"></image>
  68. </view> -->
  69. </view>
  70. </view>
  71. <view class="hfslist flex" >
  72. <view class="limg flexccc">
  73. <image :src="cira" class="imga" v-if="ite.status==1"></image>
  74. <image :src="cirb" class="imgb" v-else></image>
  75. </view>
  76. <view class="flex1">
  77. <view class="hfstit">已提交 <text>{{ite.createTime}}</text></view>
  78. <view class="hfstxt">您的投诉建议已提交,请耐心等待</view>
  79. </view>
  80. </view>
  81. </view>
  82. </uni-collapse-item>
  83. </uni-collapse>
  84. </view>
  85. </view>
  86. </block>
  87. <block v-if="type=='bylcomplaint'">
  88. <view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.suggestionId)"
  89. :data-idx="idx"
  90. @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
  91. >
  92. <view class="watop watopcom">
  93. <view class="watit">
  94. <view class="tit">{{ite.title}}</view>
  95. <view class="txt" :class="ite.status==1?'co01':'coa'">{{kaType(ite.status,tsjyList)}}</view>
  96. </view>
  97. <view class="wacoma overtwo">{{ite.content}}</view>
  98. <view class="wacomb">{{ite.createTime}}</view>
  99. </view>
  100. <!-- -->
  101. <view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:suggestion:remove'])" @click.stop="getDelFn(ite.suggestionId)">删除</view>
  102. </view>
  103. <!-- checkPermi(['system:menuFood:remove'])&& -->
  104. </block>
  105. <!-- 党建资讯 -->
  106. <block v-if="type=='newsdj'">
  107. <view class="newlists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.partyId)"
  108. >
  109. <view class="tit">{{ite.partyTitle}}</view>
  110. <view class="txt overtwo"><rich-text v-if="ite.partyContent" :nodes="ite.partyContent"></rich-text></view>
  111. <view class="stabox flexc">
  112. <view class="time flex1">{{ite.publishTime}}</view>
  113. <view class="btns flexc" @click.stop="getScFn(ite,idx)">
  114. <image :src="star" class="imga" v-if="ite.isStars=='Y'"></image>
  115. <image :src="stara" class="imga" v-else></image>{{ite.starsCount||0}}
  116. </view>
  117. <view class="btns flexc">
  118. <image :src="eye" class="imgb"></image>{{ite.viewCount||0}}
  119. </view>
  120. </view>
  121. </view>
  122. <!-- checkPermi(['system:menuFood:remove'])&& -->
  123. </block>
  124. <!-- 评论信息 -->
  125. <block v-if="type=='comment'">
  126. <view class="pllist flex" v-for="(ite,idx) in datainfo" :key="`yj${idx}`">
  127. <image :src="ite.commentUser.avatar?baseUrl+ite.commentUser.avatar:head" class="head"></image>
  128. <view class="flex1 overh">
  129. <view class="flexat mb9 ">
  130. <view class="plname flex1 over">{{ite.commentUser.nickName}}</view>
  131. <view class="plrbtn flexc flex0" @click="getDzFn(ite.id,'2',ite.content,idx)">
  132. <image :src="nicond" v-if="ite.isLike=='Y'"></image>
  133. <image :src="niconb" class="imga" v-else></image>{{ite.likeCount}}
  134. <!-- <view>点赞</view> -->
  135. </view>
  136. <!-- <view class="plrbtn flexc flex0" @touchend.prevent="getHfFn('yjhf',ite,ite.id)">
  137. <image :src="niconf" class="imgd"></image>
  138. <image :src="niconb" class="imge"></image>2
  139. </view> -->
  140. <!-- <view class="plrbtn flexc flex0" @touchend.prevent="getHfFn('yjhf',ite,ite.id)">
  141. <image :src="nicone" class="imgb"></image>
  142. <view>回复</view>
  143. </view> -->
  144. <view class="plrbtn flexc flex0" @click="getDelFn(ite.id)" v-if="checkPermi(['wuYe:commentIndex:remove'])&&ite.isMyself=='Y'">
  145. <image :src="del" class="imgc"></image>
  146. <view class="cof4">删除</view>
  147. </view>
  148. </view>
  149. <view class="infotxt">
  150. <rich-text v-if="ite.content" :nodes="analyzeEmoji(ite.content)"></rich-text>
  151. <view class="flexc mt10">
  152. <view class="inforeply" @touchend.prevent="getHfFn('yjhf',ite,ite.id)">回复</view>
  153. <view class="infotime">{{formatTimeDiff(ite.createTime)}}</view></view>
  154. </view>
  155. <!-- <view class="infotime">{{ite.createDate}}</view></view> -->
  156. <!-- 新二级回复 -->
  157. <view class="pllista" v-if="ite.childrenList&&ite.childrenList.length">
  158. <view class="flexat ptb3" v-for="(aite,aidx) in ite.childrenList" :key="`ej${aidx}`">
  159. <view class="plnamea flexcw flex1" @touchend.prevent="getHfFn('ejhf',aite,ite.id)">
  160. <view class="over namea">{{aite.commentUser.nickName}}</view>
  161. <block v-if="aite.toRoot=='Y'">
  162. <view class="plrep">回复</view>
  163. <view class="over namea">{{aite.targetUser.nickName}}</view>
  164. </block>:
  165. <rich-text v-if="aite.content" :nodes="analyzeEmoji(aite.content)"></rich-text>
  166. </view>
  167. <view class="plrbtn flexc flex0" @click="getDelFn(aite.id)" v-if="checkPermi(['wuYe:commentIndex:remove'])&&aite.isMyself=='Y'">
  168. <image :src="del" class="imgc"></image>
  169. <view class="cof4">删除</view>
  170. </view>
  171. </view>
  172. </view>
  173. <!-- 二级回复 -->
  174. <!-- <view class="pllist flex" v-for="(aite,aidx) in ite.childrenList" :key="`ej${aidx}`">
  175. <image :src="aite.commentUser.avatar?baseUrl+aite.commentUser.avatar:head" class="head"></image>
  176. <view class="flex1 overh">
  177. <view class="flexat mb14 ">
  178. <view class="plname flex1 over flexc">
  179. <view class="over">{{aite.commentUser.nickName}}</view>
  180. <block v-if="aite.toRoot=='Y'">
  181. <image :src="rimg" class="rimg"></image>
  182. <view class="over">{{aite.targetUser.nickName}}</view>
  183. </block>
  184. </view>
  185. <view class="plrbtn flexc flex0" @click="getDzFn(aite.id,'2',aite.content,idx,aidx,'ejdz')">
  186. <image :src="nicond" v-if="aite.isLike=='Y'"></image>
  187. <image :src="niconb" class="imga" v-else></image>
  188. <view>点赞</view>
  189. </view>
  190. <view class="plrbtn flexc flex0" @touchend.prevent="getHfFn('ejhf',aite,ite.id)">
  191. <image :src="nicone" class="imgb"></image>
  192. <view>回复</view>
  193. </view>
  194. <view class="plrbtn flexc flex0" @click="getDelFn(aite.id)" v-if="checkPermi(['wuYe:commentIndex:remove'])&&aite.isMyself=='Y'">
  195. <image :src="del" class="imgc"></image>
  196. <view class="cof4">删除</view>
  197. </view>
  198. </view>
  199. <view class="infotxt">
  200. <rich-text v-if="aite.content" :nodes="analyzeEmoji(aite.content)"></rich-text>
  201. <view class="infotime">{{aite.createDate}}</view></view>
  202. </view>
  203. </view> -->
  204. <view class="flexc" v-if="ite.childrenListCount>0">
  205. <view class="zhanbox flexc" v-if="ite.reachflag" @click.stop="getZhanFn(ite,idx)">
  206. <block v-if="ite.childrenList&&ite.childrenList.length">展开更多</block>
  207. <block v-else>展开{{ite.childrenListCount}}条回复</block>
  208. <image :src="upimg" class="zhan"></image>
  209. </view>
  210. <view v-if="ite.childrenList&&ite.childrenList.length" class="zhanbox flexc ml10" @click.stop="getShouFn(idx)">收起<image :src="upimg"></view>
  211. </view>
  212. <!-- <view style="height: 16rpx;" v-else></view> -->
  213. </view>
  214. </view>
  215. </block>
  216. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  217. </block>
  218. <!-- 无数据 -->
  219. <view class="nodata" v-else>
  220. <image :src="noiconpimg"></image>
  221. <view>
  222. 暂无数据
  223. </view>
  224. </view>
  225. </view>
  226. </template>
  227. <script>
  228. import {selectDictValue} from "@/utils/common.js"
  229. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  230. import config from '@/config'
  231. export default{
  232. props:{
  233. datainfo: {
  234. type: Array,
  235. default () {
  236. return []
  237. }
  238. },
  239. wtdt:{
  240. type:String,
  241. default () {
  242. return ''
  243. }
  244. },
  245. type:{
  246. type:String,
  247. default () {
  248. return 0
  249. }
  250. },
  251. tsjyList:{
  252. type:Array,
  253. default () {
  254. return []
  255. }
  256. }
  257. },
  258. data(){
  259. return{
  260. noiconpimg:require("@/static/images/nodata.png"),
  261. rimg:require('@/static/images/rimg.png'),
  262. stara:require('@/news/static/news/stara.png'),
  263. star:require('@/news/static/news/starb.png'),
  264. eye:require('@/news/static/news/eye.png'),
  265. nicona:require('@/news/static/news/nicona.png'),
  266. niconb:require('@/news/static/news/niconb.png'),
  267. niconc:require('@/news/static/news/niconc.png'),
  268. nicond:require('@/news/static/news/nicond.png'),
  269. nicone:require('@/news/static/news/nicone.png'),
  270. niconf:require('@/news/static/news/niconf.png'),
  271. cira:require('@/news/static/complaint/cira.png'),
  272. cirb:require('@/news/static/complaint/cirb.png'),
  273. del:require('@/news/static/news/delb.png'),
  274. head:require('@/news/static/news/head.png'),
  275. upimg:require('@/mine/static/house/up.png'),
  276. filico:require('@/news/static/complaint/filico.png'),
  277. baseUrl:config.baseUrl,
  278. delBtnWidth:66,//左滑默认宽度
  279. userId:this.$store.state.user.userId,
  280. value:[],
  281. autoplay:false,
  282. incolorh:'#C0C3C3',
  283. activecolorh:'#FFFFFF',
  284. indicatorDotsh: true,
  285. OwOlist: [
  286. //表情包和表情路径
  287. { title: "微笑", url: "weixiao.gif" },
  288. { title: "嘻嘻", url: "xixi.gif" },
  289. { title: "哈哈", url: "haha.gif" },
  290. { title: "可爱", url: "keai.gif" },
  291. { title: "可怜", url: "kelian.gif" },
  292. { title: "挖鼻", url: "wabi.gif" },
  293. { title: "吃惊", url: "chijing.gif" },
  294. { title: "害羞", url: "haixiu.gif" },
  295. { title: "挤眼", url: "jiyan.gif" },
  296. { title: "闭嘴", url: "bizui.gif" },
  297. { title: "鄙视", url: "bishi.gif" },
  298. { title: "爱你", url: "aini.gif" },
  299. { title: "泪", url: "lei.gif" },
  300. { title: "偷笑", url: "touxiao.gif" },
  301. { title: "亲亲", url: "qinqin.gif" },
  302. { title: "生病", url: "shengbing.gif" },
  303. { title: "太开心", url: "taikaixin.gif" },
  304. { title: "白眼", url: "baiyan.gif" },
  305. { title: "右哼哼", url: "youhengheng.gif" },
  306. { title: "左哼哼", url: "zuohengheng.gif" },
  307. { title: "嘘", url: "xu.gif" },
  308. { title: "衰", url: "shuai.gif" },
  309. { title: "吐", url: "tu.gif" },
  310. { title: "哈欠", url: "haqian.gif" },
  311. { title: "抱抱", url: "baobao.gif" },
  312. { title: "怒", url: "nu.gif" },
  313. { title: "疑问", url: "yiwen.gif" },
  314. { title: "馋嘴", url: "chanzui.gif" },
  315. { title: "拜拜", url: "baibai.gif" },
  316. { title: "思考", url: "sikao.gif" },
  317. { title: "汗", url: "han.gif" },
  318. { title: "困", url: "kun.gif" },
  319. { title: "睡", url: "shui.gif" },
  320. { title: "钱", url: "qian.gif" },
  321. { title: "失望", url: "shiwang.gif" },
  322. { title: "酷", url: "ku.gif" },
  323. { title: "色", url: "se.gif" },
  324. { title: "哼", url: "heng.gif" },
  325. { title: "鼓掌", url: "guzhang.gif" },
  326. { title: "晕", url: "yun.gif" },
  327. { title: "悲伤", url: "beishang.gif" },
  328. { title: "抓狂", url: "zhuakuang.gif" },
  329. { title: "黑线", url: "heixian.gif" },
  330. { title: "阴险", url: "yinxian.gif" },
  331. { title: "怒骂", url: "numa.gif" },
  332. { title: "互粉", url: "hufen.gif" },
  333. { title: "书呆子", url: "shudaizi.gif" },
  334. { title: "愤怒", url: "fennu.gif" },
  335. { title: "感冒", url: "ganmao.gif" },
  336. { title: "心", url: "xin.gif" },
  337. { title: "伤心", url: "shangxin.gif" },
  338. { title: "猪", url: "zhu.gif" },
  339. { title: "熊猫", url: "xiongmao.gif" },
  340. { title: "兔子", url: "tuzi.gif" },
  341. { title: "喔克", url: "ok.gif" },
  342. { title: "耶", url: "ye.gif" },
  343. { title: "棒棒", url: "good.gif" },
  344. { title: "不", url: "no.gif" },
  345. { title: "赞", url: "zan.gif" },
  346. { title: "来", url: "lai.gif" },
  347. { title: "弱", url: "ruo.gif" },
  348. { title: "草泥马", url: "caonima.gif" },
  349. { title: "神马", url: "shenma.gif" },
  350. { title: "囧", url: "jiong.gif" },
  351. { title: "浮云", url: "fuyun.gif" },
  352. { title: "给力", url: "geili.gif" },
  353. { title: "围观", url: "weiguan.gif" },
  354. { title: "威武", url: "weiwu.gif" },
  355. { title: "话筒", url: "huatong.gif" },
  356. { title: "蜡烛", url: "lazhu.gif" },
  357. { title: "蛋糕", url: "dangao.gif" },
  358. { title: "发红包", url: "fahongbao.gif" },
  359. ],
  360. }
  361. },
  362. mounted() {
  363. },
  364. methods:{
  365. checkPermi, checkRole,
  366. kaType(data, list) {
  367. return selectDictValue(list, data);
  368. },
  369. getDetail(e){
  370. this.$emit('getDetail',e)
  371. },
  372. // 格式时间
  373. formatTimeDiff(targetStr) {
  374. const targetDate = new Date(targetStr);
  375. const now = new Date();
  376. const diffInSeconds = Math.floor((now - targetDate) / 1000);
  377. if (diffInSeconds < 60) {
  378. return "刚刚";
  379. } else if (diffInSeconds < 3600) {
  380. const minutes = Math.floor(diffInSeconds / 60);
  381. return `${minutes}分钟前`;
  382. } else if (diffInSeconds < 86400) {
  383. const hours = Math.floor(diffInSeconds / 3600);
  384. return `${hours}小时前`;
  385. } else {
  386. return targetDate.toISOString().slice(0, 16).replace("T", " ");
  387. }
  388. },
  389. analyzeEmoji(cont){
  390. //编译表情替换成图片展示出来
  391. var pattern1 = /\[[\u4e00-\u9fa5]+\]/g;
  392. var pattern2 = /\[[\u4e00-\u9fa5]+\]/;
  393. var content = cont.match(pattern1);
  394. var str = cont;
  395. if (content) {
  396. for (var i = 0; i < content.length; i++) {
  397. for (var j = 0; j < this.OwOlist.length; j++) {
  398. if ("[" + this.OwOlist[j].title + "]" == content[i]) {
  399. var src = this.OwOlist[j].url;
  400. break;
  401. }
  402. }
  403. var s = require("./img/face/" + src);
  404. var imoj = "<img src='" + s + "'/>";
  405. str = str.replace(pattern2, imoj);
  406. }
  407. }
  408. return str;
  409. },
  410. getZhanFn(ite,idx){
  411. var obj={
  412. ite:ite,
  413. idx:idx
  414. }
  415. this.$emit("getZhanFn",obj)
  416. },
  417. getDzFn(id,type,content,idx,aidx,atype){
  418. var obj={
  419. id:id,
  420. type:type,
  421. content:content,
  422. idx:idx,
  423. aidx:aidx,
  424. atype:atype
  425. }
  426. this.$emit("getDzFn",obj)
  427. },
  428. getScFn(ite,idx){
  429. var obj={
  430. ite:ite,
  431. idx:idx
  432. }
  433. this.$emit("getScFn",obj)
  434. },
  435. getHfFn(type,ite,id){
  436. var cuser=JSON.parse(JSON.stringify(ite.commentUser))
  437. var obj={
  438. parentId:id,
  439. toUserId:cuser.id,
  440. toNickName:cuser.nickName,
  441. toAvatar:cuser.avatar,
  442. type:type||""
  443. }
  444. this.$emit("getHfFn",obj)
  445. },
  446. getShouFn(idx){
  447. this.$emit("getShouFn",idx)
  448. },
  449. getDelFn(id){
  450. var that=this;
  451. uni.showModal({
  452. title: '确认删除',
  453. content: "是否确认删除",
  454. cancelText: '取消',
  455. confirmText: '确认',
  456. success: function(res) {
  457. if (res.confirm) {
  458. that.$emit('getDelFn',id)
  459. } else if (res.cancel) {
  460. }
  461. }
  462. });
  463. },
  464. getPreviewImage(arr,idx){
  465. var newArr=[];
  466. arr.forEach(ite=>{
  467. var ds=this.baseUrl+ite
  468. newArr.push(ds)
  469. })
  470. uni.previewImage({
  471. urls: newArr,
  472. current:idx,
  473. success: function(data) {
  474. },
  475. fail: function(err) {
  476. }
  477. });
  478. },
  479. getDownloader(e){
  480. uni.showLoading({
  481. title: '加载中'
  482. });
  483. var url=this.baseUrl+e;
  484. let index1 = e.lastIndexOf("."); // 得到一个索引值
  485. let index2 = e.length;
  486. let type = e.substring(index1, index2);
  487. if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
  488. uni.previewImage({
  489. current: 0,
  490. urls: [url],
  491. // background: '#ffffff'
  492. });
  493. uni.hideLoading();
  494. } else {
  495. uni.downloadFile({
  496. url: url,//文件的下载路径
  497. success(result) {
  498. uni.hideLoading()
  499. var filePath = result.tempFilePath;
  500. uni.openDocument({
  501. filePath: filePath,
  502. showMenu: true,
  503. success: function (res) {
  504. // console.log('打开文档成功');
  505. }
  506. });
  507. },
  508. fail(res) {uni.hideLoading()}
  509. })
  510. }
  511. },
  512. //开始触摸滑动
  513. drawStart(e) {
  514. // console.log("开始触发");
  515. var touch = e.touches[0];
  516. this.startX = touch.clientX;
  517. },
  518. //触摸滑动
  519. drawMove(e) {
  520. // console.log("滑动");
  521. for (var index in this.datainfo) {
  522. // this.csListArrl[index].right=0
  523. this.$set(this.datainfo[index],'right',0);
  524. }
  525. var idx=e.currentTarget.dataset.idx
  526. var touch = e.touches[0];
  527. var item = this.datainfo[idx];
  528. var disX = this.startX - touch.clientX;
  529. if (disX >= 20) {
  530. if (disX > this.delBtnWidth) {
  531. disX = this.delBtnWidth;
  532. }
  533. // this.csListArrl[idx].right=disX
  534. this.$set(this.datainfo[idx],'right',disX);
  535. } else {
  536. // this.csListArrl[idx].right=0
  537. this.$set(this.datainfo[idx],'right',0);
  538. }
  539. },
  540. //触摸滑动结束
  541. drawEnd(e) {
  542. // console.log("滑动结束");
  543. var idx=e.currentTarget.dataset.idx
  544. var item = this.datainfo[idx];
  545. if (item.right >= this.delBtnWidth / 2) {
  546. // this.datainfo[idx].right=this.delBtnWidth
  547. this.$set(this.datainfo[idx],'right',this.delBtnWidth);
  548. } else {
  549. this.datainfo[idx].right=0
  550. }
  551. },
  552. }
  553. }
  554. </script>
  555. <style lang="scss" scoped>
  556. .flex{display: flex;}
  557. .flexc{display: flex;align-items: center;}
  558. .mb10{margin-bottom: 20rpx;}
  559. // 社区
  560. .walists{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx; position: relative;
  561. .watop{
  562. padding: 0 36rpx 30rpx 38rpx;
  563. .watit{padding: 24rpx 0;margin-bottom: 4rpx;display: flex;
  564. .tit{font-weight: bold;font-size: 28rpx;color: #272727;flex: 1;
  565. .cir{width: 14rpx;margin-left: 8rpx;margin-bottom: 10rpx;height: 14rpx;display: inline-block;background: #FF6969;border-radius: 8rpx;}
  566. }
  567. .txt{font-weight: bold;font-size: 26rpx;flex: 0 0 auto;
  568. }
  569. }
  570. .wacoma{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 24rpx;}
  571. .wacomb{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  572. }
  573. .watopcom{background-color: #ffffff;border-radius: 20rpx;position: relative;z-index: 1;}
  574. .wabtn{display: flex;align-items: center;justify-content: space-between;border-top: 2rpx solid #E5E5E5;height: 80rpx;padding: 0 38rpx;
  575. view{font-weight: 500;font-size: 24rpx;color: #666666;}
  576. image{width: 16rpx;height: 28rpx;}
  577. }
  578. }
  579. .rimg{width: 16rpx;height: 28rpx;margin: 0 10rpx;flex: 0 0 auto;}
  580. .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;}
  581. //资讯
  582. .newlists{
  583. background: #FFFFFF;padding: 22rpx 24rpx;margin-bottom: 24rpx;
  584. border-radius: 20rpx;
  585. .tit{font-size: 32rpx;font-weight: bold;color: #272727;line-height: 48rpx;margin-bottom:16rpx;}
  586. .txt{font-size: 24rpx;color: #666666;line-height: 36rpx;margin-bottom: 32rpx;}
  587. .stabox{
  588. .time{font-weight: 500;font-size: 24rpx;color: #AAAAAA;line-height: 36rpx;}
  589. .btns{font-weight: 500;font-size: 22rpx;color: #666666;line-height: 36rpx;min-width: 100rpx;box-sizing: border-box;margin-left: 20rpx;
  590. .imga{width: 24rpx;height: 22rpx;margin-right: 8rpx;}
  591. .imgb{width: 24rpx;height: 18rpx;margin-right: 10rpx;}
  592. .imgc{width: 26rpx;height: 26rpx;margin-right: 10rpx;}
  593. }
  594. }
  595. }
  596. //评论
  597. .pllist{margin-bottom: 40rpx;
  598. &:last-child{margin-bottom: 0;}
  599. .head{width: 40rpx;height: 40rpx;margin-right: 18rpx;flex: 0 0 auto;border-radius: 50%;}
  600. .plname{font-size: 30rpx;color: #161616;font-weight: bold;
  601. }
  602. .plrbtn{margin-left: 36rpx;
  603. image{width: 26rpx;height: 24rpx;margin-right: 16rpx;
  604. &.imga{width: 26rpx;height: 26rpx;}
  605. &.imgb{width: 26rpx;height: 22rpx;}
  606. &.imgd{width: 26rpx;height: 24rpx;margin-right: 10rpx;}
  607. &.imge{width: 26rpx;height: 26rpx;transform: rotate(180deg);}
  608. }
  609. view{font-weight: bold;font-size: 24rpx;color: #314081;}
  610. }
  611. // margin-bottom: 30rpx;
  612. .infotxt{font-weight: 500;font-size: 26rpx;color: #161616;line-height: 40rpx;
  613. &:before {content: "";float: right;width: 0;height: calc(100% - 16px);background: red;}
  614. .inforeply{min-width: 86rpx;height: 42rpx;background: #F8F8F8;border-radius: 20rpx; margin-right: 22rpx;font-weight: 500;
  615. font-size: 24rpx;text-align: center;padding: 0 8rpx;box-sizing: border-box;line-height: 42rpx;display: inline-block;
  616. color: #161616;}
  617. .infotime{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  618. // .infotime{font-weight: 500;font-size: 24rpx;color: #666666; float: right;clear: both;}
  619. image{width: 44rpx;height: 44rpx;}
  620. }
  621. .pllista{background: #F8F8F8;padding:12rpx 24rpx;border-radius: 10rpx;margin-top: 40rpx;
  622. .plnamea{font-size: 26rpx;color: #161616;line-height: 40rpx;
  623. .namea{font-weight: bold;max-width: 160rpx;}
  624. .plrep{color: #AAAAAA;margin: 0 10rpx;}
  625. }
  626. }
  627. .zhanbox{font-weight: 500;font-size: 24rpx;color: #AAAAAA;padding-bottom: 16rpx;margin-top: 16rpx;
  628. image{width: 20rpx;height: 12rpx;margin-left: 18rpx;transition: all 0.3s;
  629. &.zhan{transform: rotate(-180deg);}
  630. }
  631. }
  632. }
  633. //投诉建议
  634. .bxlists{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;position: relative;
  635. .bxtop{padding: 30rpx 24rpx;position: relative;
  636. .swiper{width: 100%;height: 280rpx;border-radius: 20rpx;box-sizing: border-box;margin-bottom: 28rpx;overflow: hidden;
  637. image{width: 100%;height: 100%;}
  638. }
  639. .toptit{font-weight: bold;font-size: 28rpx;color: #161616;}
  640. .walist{display: flex;font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 16rpx;
  641. .tit{min-width: 100rpx;text-align-last: justify}
  642. }
  643. .btns{position: absolute;right: 26rpx;bottom: 20rpx;}
  644. .btn{min-width: 120rpx;height: 54rpx;border-radius: 26rpx;font-weight: 500;font-size: 26rpx;text-align: center;line-height: 54rpx;padding: 0 10rpx;box-sizing: border-box; margin-bottom: 14rpx;
  645. &.btna{border: 2rpx solid #FF6969;background: #FFF8F8;color: #FF6969;}
  646. &.btnb{background: #0256FD;color: #FFFFFF;}
  647. }
  648. }
  649. .bxsteps{border-top: 2rpx solid #E6E6E6;padding: 30rpx 0;
  650. .chtop{padding-right: 48rpx;
  651. .line{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
  652. view{font-weight: bold;font-size: 28rpx;color: #272727;}
  653. .upimg{width: 22rpx;height: 14rpx;flex: 0 0 auto;margin-left: 12rpx;transform: rotate(180deg);transition: all 0.3s;}
  654. }
  655. .fjlists {display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 20rpx;
  656. &:last-child{margin-bottom: 0;}
  657. .imgl{width: 40rpx;height: 40rpx;display: flex;align-items: center;flex: 0 0 auto;
  658. image{width: 26rpx;height: 24rpx;}
  659. }
  660. .tit{font-size: 26rpx;color: #222327;font-weight: 500;margin-top: 4rpx;word-break: break-all;}
  661. }
  662. .hfstep{padding: 0 32rpx 30rpx 36rpx;margin-top: 24rpx;
  663. .hfslist{padding-bottom: 20rpx;position: relative;
  664. &:first-child{
  665. .hfstit{color: #0156FE;}
  666. }
  667. &::before{content: '';position: absolute;left: 14rpx;top:14rpx;height: 100%;width: 2rpx;background: #E6E6E6;}
  668. .limg{width: 30rpx;height: 30rpx;margin-right: 22rpx;flex: 0 0 auto;margin-top:3rpx;
  669. .imga{width: 30rpx;height: 30rpx;}
  670. .imgb{width: 18rpx;height: 18rpx;}
  671. }
  672. .hfstit{font-weight: bold;font-size: 30rpx;color: #666666;line-height: 36rpx;margin-bottom: 20rpx;
  673. text{font-size: 26rpx;margin-left: 12rpx;}
  674. }
  675. .hfstxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 20rpx;}
  676. .hfimgs{padding-top: 2rpx;
  677. image{width: 84rpx;height: 84rpx;border-radius: 20rpx;margin-right: 40rpx;margin-bottom: 10rpx;}
  678. }
  679. }
  680. }
  681. }
  682. }
  683. .bxlists /deep/ .uni-swiper-dots-horizontal{left: 26rpx;transform: translate(0);}
  684. .bxlists /deep/ .uni-swiper-dot{width: 10rpx;height: 10rpx;}
  685. .bxlists /deep/ .uni-swiper-dot-active{width: 24rpx;height: 10rpx;}
  686. // 无数据
  687. .nodata{display: flex;flex-direction: column;align-items: center;
  688. image{width: 440rpx;height: 440rpx;}
  689. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  690. }
  691. </style>