list.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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.proposalId)">
  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.title}}</view>
  16. <view class="txt flexcj mb10">
  17. <view class="flex0 label">案号</view>
  18. <view class="txts">{{ite.proposalNumber}}</view>
  19. <view class="btns">{{kaType(ite.proposalProgress,tajdlist)}}</view>
  20. </view>
  21. <view class="txt flexcj">
  22. <view class="flex0 label">提案类别</view>
  23. <view class="txts">{{ite.categoryName}}</view>
  24. <view class="flex0 ml6">{{ite.createTime}}</view>
  25. </view>
  26. </view>
  27. </block>
  28. <!-- -->
  29. <block v-if="type==2">
  30. <view class="nlist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.sqmyId)">
  31. <view class="tit overtwo">{{ite.title}}</view>
  32. <view class="txt flexcj mb10">
  33. <view class="flex0 label">编号</view>
  34. <view class="txts">{{ite.sqmyNumber}}</view>
  35. <view class="btns">{{kaType(ite.sqmyProgress,tajdlist)}}</view>
  36. </view>
  37. <view class="txt flexcj">
  38. <view class="flex0 label">主题类型</view>
  39. <view class="txts">{{kaType(ite.topicType,tajdlist)}}</view>
  40. <view class="flex0 ml6">{{ite.time}}</view>
  41. </view>
  42. </view>
  43. </block>
  44. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  45. </view>
  46. <block v-else>
  47. <no-data></no-data>
  48. </block>
  49. </view>
  50. </template>
  51. <script>
  52. import { selectValue } from '@/utils/common.js';
  53. import noData from "@/components/nodata/nodata.vue"
  54. export default {
  55. props:{
  56. datalist: {
  57. type: Array,
  58. default () {
  59. return []
  60. }
  61. },
  62. wtdt:{
  63. type: String,
  64. default () {
  65. return ''
  66. }
  67. },
  68. type:{
  69. type: [String,Number],
  70. default () {
  71. return ''
  72. }
  73. },
  74. tajdlist:{
  75. type: Array,
  76. default () {
  77. return []
  78. }
  79. },
  80. ztlxlist:{
  81. type: Array,
  82. default () {
  83. return []
  84. }
  85. }
  86. },
  87. components:{
  88. noData
  89. },
  90. data(){
  91. return{
  92. topbg:require("@/static/images/home/topbg.png"),
  93. }
  94. },
  95. onLoad: function() {
  96. },
  97. methods:{
  98. kaType(ite,list){
  99. return selectValue(list, ite);
  100. },
  101. getDetail(e){
  102. this.$emit('getDetail',e)
  103. },
  104. typeFn(data){
  105. if(data){
  106. var newArr=[]
  107. var astr=data.split('-')
  108. astr.forEach(ite=>{
  109. var a=ite.substring(0,5);
  110. newArr.push(a)
  111. })
  112. return newArr.join('-')
  113. }else{
  114. return ''
  115. }
  116. },
  117. },
  118. }
  119. </script>
  120. <style lang="scss" scoped>
  121. .nlist{
  122. position: relative;padding: 34rpx 0 30rpx;border-bottom: 2rpx solid #E6E6E6;
  123. &:last-child{border: none;}
  124. .nrbox{position: absolute;right: 0;top: 34rpx;z-index: 1;
  125. image{width: 112rpx;height: 52rpx;}
  126. 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;}
  127. }
  128. .titimg{width: 100%;height: 258rpx;margin-bottom: 26rpx;}
  129. .tit{font-weight: bold;font-size: 32rpx;color: #222327;margin-bottom: 24rpx;line-height: 44rpx;}
  130. .txt{font-weight: 500;font-size: 26rpx;color: #AAAAAA;
  131. text{margin:0 12rpx;}
  132. .label{width: 104rpx;text-align-last: justify;margin-right: 16rpx;}
  133. .txts{color: #222327; flex: 1;}
  134. .btns{min-width: 110rpx;height: 40rpx;
  135. background: #FFECE3;border-radius: 10rpx;font-weight: 500;line-height: 40rpx;
  136. font-size: 24rpx;text-align: center;padding: 0 16rpx;box-sizing: border-box;
  137. color: #FF4E00;
  138. }
  139. }
  140. }
  141. </style>