list.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view>
  3. <view v-if="datalist.length>0">
  4. <!-- 新闻 -->
  5. <block v-if="type==1">
  6. <view class="nlist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.reservatId)">
  7. <!-- 置顶 -->
  8. <!-- <block v-if="ite.isTop">
  9. <view class="nrbox">
  10. <image :src="topbg"></image>
  11. <view>置顶</view>
  12. </view>
  13. <image :src="ite.img" class="titimg"></image>
  14. </block> -->
  15. <view class="tit overtwo">{{ite.tit}}</view>
  16. <view class="txt flexcj mb10">
  17. <view class="flex0 label">案号</view>
  18. <view class="txts">22</view>
  19. <view class="btns">已立案</view>
  20. </view>
  21. <view class="txt flexcj">
  22. <view class="flex0 label">提案类别</view>
  23. <view class="txts">社会建设类/教育事业</view>
  24. <view class="flex0 ml6">{{ite.time}}</view>
  25. </view>
  26. </view>
  27. </block>
  28. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  29. </view>
  30. <block v-else>
  31. <no-data></no-data>
  32. </block>
  33. </view>
  34. </template>
  35. <script>
  36. import { selectDictValue } from '@/utils/common.js';
  37. import noData from "@/components/nodata/nodata.vue"
  38. export default {
  39. props:{
  40. datalist: {
  41. type: Array,
  42. default () {
  43. return []
  44. }
  45. },
  46. wtdt:{
  47. type: String,
  48. default () {
  49. return ''
  50. }
  51. },
  52. type:{
  53. type: [String,Number],
  54. default () {
  55. return ''
  56. }
  57. },
  58. },
  59. components:{
  60. noData
  61. },
  62. data(){
  63. return{
  64. topbg:require("@/static/images/home/topbg.png"),
  65. }
  66. },
  67. onLoad: function() {
  68. },
  69. methods:{
  70. getDetail(e){
  71. this.$emit('getDetail',e)
  72. },
  73. typeFn(data){
  74. if(data){
  75. var newArr=[]
  76. var astr=data.split('-')
  77. astr.forEach(ite=>{
  78. var a=ite.substring(0,5);
  79. newArr.push(a)
  80. })
  81. return newArr.join('-')
  82. }else{
  83. return ''
  84. }
  85. },
  86. },
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. .nlist{
  91. position: relative;padding: 34rpx 0 30rpx;border-bottom: 2rpx solid #E6E6E6;
  92. &:last-child{border: none;}
  93. .nrbox{position: absolute;right: 0;top: 34rpx;z-index: 1;
  94. image{width: 112rpx;height: 52rpx;}
  95. view{position: absolute;right: 0;top: 0;left: 0;bottom: 0;font-weight: bold;font-size: 24rpx;color: #FFFFFF;line-height: 52rpx;padding-left: 40rpx;box-sizing: border-box;}
  96. }
  97. .titimg{width: 100%;height: 258rpx;margin-bottom: 26rpx;}
  98. .tit{font-weight: bold;font-size: 32rpx;color: #222327;margin-bottom: 24rpx;line-height: 44rpx;}
  99. .txt{font-weight: 500;font-size: 26rpx;color: #AAAAAA;
  100. text{margin:0 12rpx;}
  101. .label{width: 104rpx;text-align-last: justify;margin-right: 16rpx;}
  102. .txts{color: #222327; flex: 1;}
  103. .btns{min-width: 110rpx;height: 40rpx;
  104. background: #FFECE3;border-radius: 10rpx;font-weight: 500;line-height: 40rpx;
  105. font-size: 24rpx;text-align: center;padding: 0 16rpx;box-sizing: border-box;
  106. color: #FF4E00;
  107. }
  108. }
  109. }
  110. </style>