list.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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,sqtajdlist)}}</view>
  36. </view>
  37. <view class="txt flexcj">
  38. <view class="flex0 label">主题类型</view>
  39. <view class="txts">{{kaType(ite.topicType,ztlxlist)}}</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. sqtajdlist:{
  81. type: Array,
  82. default () {
  83. return []
  84. }
  85. },
  86. ztlxlist:{
  87. type: Array,
  88. default () {
  89. return []
  90. }
  91. }
  92. },
  93. components:{
  94. noData
  95. },
  96. data(){
  97. return{
  98. topbg:require("@/static/images/home/topbg.png"),
  99. }
  100. },
  101. onLoad: function() {
  102. },
  103. methods:{
  104. kaType(ite,list){
  105. return selectValue(list, ite);
  106. },
  107. getDetail(e){
  108. this.$emit('getDetail',e)
  109. },
  110. typeFn(data){
  111. if(data){
  112. var newArr=[]
  113. var astr=data.split('-')
  114. astr.forEach(ite=>{
  115. var a=ite.substring(0,5);
  116. newArr.push(a)
  117. })
  118. return newArr.join('-')
  119. }else{
  120. return ''
  121. }
  122. },
  123. },
  124. }
  125. </script>
  126. <style lang="scss" scoped>
  127. .nlist{
  128. position: relative;padding: 34rpx 0 30rpx;border-bottom: 2rpx solid #E6E6E6;
  129. &:last-child{border: none;}
  130. .nrbox{position: absolute;right: 0;top: 34rpx;z-index: 1;
  131. image{width: 112rpx;height: 52rpx;}
  132. 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;}
  133. }
  134. .titimg{width: 100%;height: 258rpx;margin-bottom: 26rpx;}
  135. .tit{font-weight: bold;font-size: 32rpx;color: #222327;margin-bottom: 24rpx;line-height: 44rpx;}
  136. .txt{font-weight: 500;font-size: 26rpx;color: #AAAAAA;
  137. text{margin:0 12rpx;}
  138. .label{width: 104rpx;text-align-last: justify;margin-right: 16rpx;}
  139. .txts{color: #222327; flex: 1;}
  140. .btns{min-width: 110rpx;height: 40rpx;
  141. background: #FFECE3;border-radius: 10rpx;font-weight: 500;line-height: 40rpx;
  142. font-size: 24rpx;text-align: center;padding: 0 16rpx;box-sizing: border-box;
  143. color: #FF4E00;
  144. }
  145. }
  146. }
  147. </style>