list.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view>
  3. <view v-if="datalist.length>0">
  4. <!-- 代办提醒 -->
  5. <block v-if="type=='dbtx'">
  6. <view class="watlist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite)">
  7. <view class="tit flex1 over">{{ite.remindTitle}}</view>
  8. <view class="txt flex0">{{ite.remindTime}}</view>
  9. </view>
  10. </block>
  11. <!-- 系统通知 -->
  12. <block v-if="type=='xttz'">
  13. <view class="cards" v-for="(ite,idx) in datalist" :key="idx" @click="getDetail(ite.noticeId)">
  14. <view class="top flexc">
  15. <view class="cir bga"></view>
  16. <view class="tit">系统通知</view>
  17. <view class="time">{{ite.createTime}}</view>
  18. </view>
  19. <view class="ctxt">
  20. <view>{{ite.noticeContent}}</view>
  21. <view class="tzhu">祝您生活愉快!</view>
  22. </view>
  23. </view>
  24. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  25. </block>
  26. <!-- 代办通知 -->
  27. <block v-if="type=='dbtz'">
  28. <view class="cards" v-for="(ite,idx) in datalist" :key="idx" @click="getDetail(ite.remindId)">
  29. <view class="top flexc">
  30. <view class="cir bgb"></view>
  31. <view class="tit">待办通知</view>
  32. <view class="time">{{ite.remindTime}}</view>
  33. </view>
  34. <view class="ctxt">
  35. <view>
  36. {{ite.remindContent}}
  37. <!-- 您有<text class="cof6">1</text>条来自【潜山弘立新型建材有限公司】的申报信 息,请您前往审核。 -->
  38. </view>
  39. <view class="tzhu">祝您生活愉快!</view>
  40. <view class="tzhu tctip" @click.stop="getHandle(ite)">点击此处去处理</view>
  41. </view>
  42. </view>
  43. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  44. </block>
  45. </view>
  46. <block v-else>
  47. <no-data></no-data>
  48. </block>
  49. </view>
  50. </template>
  51. <script>
  52. import { selectDictValue } 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. },
  75. components:{
  76. noData
  77. },
  78. data(){
  79. return{
  80. }
  81. },
  82. onLoad: function() {
  83. },
  84. methods:{
  85. kaType(data, list) {
  86. return selectDictValue(list, data);
  87. },
  88. getDelFn(id){
  89. var that=this;
  90. uni.showModal({
  91. title: '确认删除',
  92. content: "是否确认删除该预约",
  93. cancelText: '取消',
  94. confirmText: '确认',
  95. success: function(res) {
  96. if (res.confirm) {
  97. that.$emit("getDelFn",id)
  98. } else if (res.cancel) {
  99. // console.log('用户点击取消');
  100. }
  101. }
  102. });
  103. },
  104. getDetail(e){
  105. this.$emit('getDetail',e)
  106. },
  107. getHandle(e){
  108. this.$emit('getHandle',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. .watlist{display: flex;align-items: center;padding: 20rpx 34rpx;
  128. .tit{font-weight: 500;font-size: 28rpx;color: #222327;line-height: 40rpx;}
  129. .txt{font-weight: 500;font-size: 24rpx;color: #AAAAAA;margin-left: 20rpx;}
  130. }
  131. .cards{width: 702rpx;background: #FFFFFF;border-radius: 10rpx;margin: 0 auto 24rpx;
  132. .top{padding: 26rpx 34rpx;
  133. .cir{width: 20rpx;height: 20rpx;flex: 0 0 auto;margin-right: 20rpx;border-radius: 20rpx;
  134. &.bga{background: #28C529;}
  135. &.bgb{background: #FF6969;}
  136. }
  137. .tit{flex: 1;font-weight: bold;font-size: 26rpx;color: #343434;line-height: 36rpx;}
  138. .time{font-weight: 500;font-size: 26rpx;flex: 0 0 auto;margin-right: 20rpx;color: #222327;}
  139. }
  140. .ctxt{font-weight: 500;font-size: 26rpx;color: #666666;border-top: 2rpx solid #E5E5E5;padding: 34rpx;
  141. view{line-height: 36rpx;}
  142. .tzhu{margin-top: 28rpx;}
  143. .tctip{color: #00A9F0;text-decoration: underline;}
  144. }
  145. }
  146. </style>