List.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. <script setup name="ReportEnList">
  2. import {nextTick, reactive,ref} from 'vue'
  3. import apiReportEn from '@/api/reportEn'
  4. import moment from 'moment'
  5. import ListClassify from './components/ListClassify.vue'
  6. import { showToast,showDialog,Dialog } from 'vant';
  7. import { useRouter } from 'vue-router';
  8. import { OnLongPress } from '@vueuse/components'
  9. import { useWindowSize } from '@vueuse/core'
  10. import {useCachedViewsStore} from '@/store/modules/cachedViews'
  11. const cachedViewsStore=useCachedViewsStore()
  12. const { width, height } = useWindowSize()
  13. const router=useRouter()
  14. // 分类弹窗
  15. const showClassify=ref(false)
  16. const listState = reactive({
  17. MsgIsSend:'',
  18. Frequency:'',
  19. ClassifyNameFirst:'',
  20. ClassifyNameSecond:'',
  21. StartDate:'',
  22. EndDate:'',
  23. list:[],
  24. page:0,
  25. pageSize:20,
  26. finished:false,
  27. loading:false
  28. })
  29. async function getList(){
  30. const res=await apiReportEn.getList({
  31. CurrentIndex:listState.page,
  32. PageSize:listState.pageSize,
  33. StartDate:listState.StartDate,
  34. EndDate:listState.EndDate,
  35. ClassifyNameFirst:listState.ClassifyNameFirst,
  36. ClassifyNameSecond:listState.ClassifyNameSecond,
  37. Frequency:listState.Frequency,
  38. EmailState:listState.MsgIsSend
  39. })
  40. if(res.Ret===200){
  41. listState.loading=false
  42. if(!res.Data){
  43. listState.finished=true
  44. return
  45. }
  46. listState.finished=res.Data.Paging.IsEnd
  47. const arr=res.Data.List||[]
  48. listState.list=[...listState.list,...arr]
  49. }
  50. }
  51. function onLoad(){
  52. listState.page++
  53. getList()
  54. }
  55. function refreshList(){
  56. listState.page=1
  57. listState.list=[]
  58. listState.finished=false
  59. getList()
  60. }
  61. // 删除报告
  62. function handleReportDel(item){
  63. showDialog({
  64. title: '提示',
  65. message: '删除操作不可恢复,确认删除吗?',
  66. showCancelButton:true
  67. }).then(() => {
  68. // on close
  69. apiReportEn.reportDel({ReportIds:item.Id}).then(res=>{
  70. if(res.Ret===200){
  71. showToast('删除成功')
  72. refreshList()
  73. showReportItemOpt.value=false
  74. }
  75. })
  76. }).catch(()=>{})
  77. }
  78. // 发布报告
  79. async function handleReportPublish(item){
  80. apiReportEn.reportPublish({
  81. ReportIds:item.Id.toString()
  82. }).then(res=>{
  83. if(res.Ret===200){
  84. showToast('发布成功')
  85. showReportItemOpt.value=false
  86. refreshList()
  87. }
  88. })
  89. }
  90. // 取消发布
  91. function handleReportPublishCancle(item){
  92. showDialog({
  93. title: '提示',
  94. message: `是否确认取消发布?`,
  95. showCancelButton:true
  96. }).then(()=>{
  97. apiReportEn.reportPublishCancle({ReportIds:Number(item.Id)}).then(res=>{
  98. if(res.Ret===200){
  99. refreshList()
  100. showReportItemOpt.value=false
  101. }
  102. })
  103. })
  104. }
  105. // 日期筛选
  106. const calendarMinDate=new Date(2010,0,1)
  107. const showCalendar=ref(false)
  108. function handleCalendarChange(e){
  109. listState.StartDate=moment(e[0]).format('YYYY-MM-DD')
  110. listState.EndDate=moment(e[1]).format('YYYY-MM-DD')
  111. refreshList()
  112. showCalendar.value=false
  113. }
  114. // 分类筛选
  115. function handleConfirmClassify({firstClassify,secondClassify}){
  116. listState.ClassifyNameFirst=firstClassify
  117. listState.ClassifyNameSecond=secondClassify
  118. refreshList()
  119. showClassify.value=false
  120. }
  121. // 跳转详情
  122. function goDetail(item){
  123. router.push({
  124. path:"/reportEn/detail",
  125. query:{
  126. id:item.Id
  127. }
  128. })
  129. }
  130. // 长按弹出操作
  131. let activeItem=ref(null)
  132. const showReportItemOpt=ref(false)
  133. function onLongPressItem(e){
  134. activeItem.value=e
  135. showReportItemOpt.value=true
  136. }
  137. // 更多操作
  138. const frequencyDropMenuIns=ref(null)
  139. const statusDropMenuIns=ref(null)
  140. const showMoreFilter=ref(false)
  141. const frequencyOpt=[
  142. {
  143. label:'年度',
  144. value:'年度'
  145. },
  146. {
  147. label:'半年度',
  148. value:'半年度'
  149. },
  150. {
  151. label:'季度',
  152. value:'季度'
  153. },
  154. {
  155. label:'月度',
  156. value:'月度'
  157. },
  158. {
  159. label:'双周度',
  160. value:'双周度'
  161. },
  162. {
  163. label:'周度',
  164. value:'周度'
  165. },
  166. {
  167. label:'日度',
  168. value:'日度'
  169. },
  170. {
  171. label:'不定时',
  172. value:'不定时'
  173. },
  174. ]//频度筛选项
  175. const reportStatusOpt=[
  176. {
  177. label:'已群发邮件',
  178. value:2
  179. },
  180. {
  181. label:'未群发邮件',
  182. value:1
  183. }
  184. ]
  185. function handleShowFilter(){
  186. showMoreFilter.value=true
  187. nextTick(()=>{
  188. setTimeout(() => {
  189. frequencyDropMenuIns.value?.toggle(true);
  190. }, 100);
  191. })
  192. }
  193. function handleConfirmFrequency(){
  194. refreshList()
  195. showMoreFilter.value=false
  196. }
  197. function handleConfirmStatus(){
  198. refreshList()
  199. showMoreFilter.value=false
  200. }
  201. function goSearch(){
  202. // 删除报告搜索页的缓存
  203. cachedViewsStore.removeCaches('ReportEnSearchList')
  204. router.push('/reportEn/search')
  205. }
  206. </script>
  207. <template>
  208. <div class="report-list-page">
  209. <div class="sticky-box">
  210. <div class="top-box">
  211. <van-search
  212. style="flex:1"
  213. shape="round"
  214. readonly
  215. placeholder="请输入报告标题或作者"
  216. @click="goSearch"
  217. />
  218. <div :class="['menu-icon',showClassify?'active':'']" @click="showClassify=true">
  219. <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
  220. <path d="M33.75 5.25C38.7206 5.25 42.75 9.27944 42.75 14.25C42.75 19.2206 38.7206 23.25 33.75 23.25C28.7794 23.25 24.75 19.2206 24.75 14.25C24.75 9.27944 28.7794 5.25 33.75 5.25ZM27.75 14.25C27.75 17.5637 30.4363 20.25 33.75 20.25C37.0637 20.25 39.75 17.5637 39.75 14.25C39.75 10.9363 37.0637 8.25 33.75 8.25C30.4363 8.25 27.75 10.9363 27.75 14.25Z" fill="currentColor"/>
  221. <path d="M6 9C6 7.34315 7.34315 6 9 6H19.5C21.1569 6 22.5 7.34315 22.5 9V19.5C22.5 21.1569 21.1569 22.5 19.5 22.5H9C7.34315 22.5 6 21.1569 6 19.5V9ZM9 9V19.5H19.5V9H9Z" fill="currentColor"/>
  222. <path d="M6 28.5C6 26.8431 7.34315 25.5 9 25.5H19.5C21.1569 25.5 22.5 26.8431 22.5 28.5V39C22.5 40.6569 21.1569 42 19.5 42H9C7.34315 42 6 40.6569 6 39V28.5ZM9 28.5V39H19.5V28.5H9Z" fill="currentColor"/>
  223. <path d="M25.5 28.5C25.5 26.8431 26.8431 25.5 28.5 25.5H39C40.6569 25.5 42 26.8431 42 28.5V39C42 40.6569 40.6569 42 39 42H28.5C26.8431 42 25.5 40.6569 25.5 39V28.5ZM28.5 39H39V28.5H28.5V39Z" fill="currentColor"/>
  224. </svg>
  225. </div>
  226. <div :class="['menu-icon',showCalendar?'active':'']" @click="showCalendar=true">
  227. <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
  228. <path d="M37.5718 42.5667H10.4282C9.52087 42.5605 8.65247 42.1973 8.01089 41.5558C7.36931 40.9142 7.00615 40.0458 7 39.1385V11.9948C7.00615 11.0875 7.36931 10.2191 8.01089 9.57754C8.65247 8.93596 9.52087 8.5728 10.4282 8.56665H37.5718C38.4791 8.5728 39.3475 8.93596 39.9891 9.57754C40.6307 10.2191 40.9939 11.0875 41 11.9948V39.1385C40.9939 40.0458 40.6307 40.9142 39.9891 41.5558C39.3475 42.1973 38.4791 42.5605 37.5718 42.5667ZM10.4282 10.7269C10.0919 10.7269 9.76938 10.8605 9.5316 11.0982C9.29381 11.336 9.16022 11.6585 9.16022 11.9948V39.1385C9.16022 39.4748 9.29381 39.7973 9.5316 40.0351C9.76938 40.2728 10.0919 40.4064 10.4282 40.4064H37.5718C37.9081 40.4064 38.2306 40.2728 38.4684 40.0351C38.7062 39.7973 38.8398 39.4748 38.8398 39.1385V11.9948C38.8398 11.6585 38.7062 11.336 38.4684 11.0982C38.2306 10.8605 37.9081 10.7269 37.5718 10.7269H10.4282Z" fill="currentColor" stroke="currentColor" stroke-width="0.5"/>
  229. <path d="M39.4972 19.7435H8.50274C8.21628 19.7435 7.94155 19.6297 7.73899 19.4271C7.53643 19.2246 7.42263 18.9498 7.42263 18.6634C7.41942 18.5207 7.44517 18.3788 7.49831 18.2463C7.55146 18.1138 7.6309 17.9934 7.73184 17.8925C7.83279 17.7915 7.95314 17.7121 8.08563 17.6589C8.21813 17.6058 8.36002 17.5801 8.50274 17.5833H39.4972C39.6399 17.5801 39.7818 17.6058 39.9143 17.6589C40.0468 17.7121 40.1672 17.7915 40.2681 17.8925C40.3691 17.9934 40.4485 18.1138 40.5016 18.2463C40.5548 18.3788 40.5805 18.5207 40.5773 18.6634C40.5773 18.8052 40.5494 18.9457 40.4951 19.0767C40.4408 19.2078 40.3613 19.3268 40.261 19.4271C40.1607 19.5274 40.0416 19.607 39.9106 19.6613C39.7795 19.7155 39.6391 19.7435 39.4972 19.7435ZM17.7306 15.0473C17.4442 15.0473 17.1694 14.9336 16.9669 14.731C16.7643 14.5284 16.6505 14.2537 16.6505 13.9672V6.45342C16.6505 6.16696 16.7643 5.89223 16.9669 5.68967C17.1694 5.48711 17.4442 5.37331 17.7306 5.37331C17.8734 5.37011 18.0153 5.39585 18.1477 5.449C18.2802 5.50214 18.4006 5.58158 18.5015 5.68253C18.6025 5.78347 18.6819 5.90382 18.7351 6.03632C18.7882 6.16881 18.814 6.3107 18.8108 6.45342V13.9672C18.814 14.11 18.7882 14.2518 18.7351 14.3843C18.6819 14.5168 18.6025 14.6372 18.5015 14.7381C18.4006 14.8391 18.2802 14.9185 18.1477 14.9717C18.0153 15.0248 17.8734 15.0506 17.7306 15.0473ZM30.2458 15.0473C30.104 15.0473 29.9635 15.0194 29.8325 14.9651C29.7015 14.9108 29.5824 14.8313 29.4821 14.731C29.3818 14.6307 29.3022 14.5116 29.2479 14.3806C29.1937 14.2495 29.1657 14.1091 29.1657 13.9672V6.45342C29.1657 6.31158 29.1937 6.17113 29.2479 6.04008C29.3022 5.90904 29.3818 5.78997 29.4821 5.68967C29.5824 5.58937 29.7015 5.50981 29.8325 5.45553C29.9635 5.40125 30.104 5.37331 30.2458 5.37331C30.3886 5.37011 30.5304 5.39585 30.6629 5.449C30.7954 5.50214 30.9158 5.58158 31.0167 5.68253C31.1177 5.78347 31.1971 5.90382 31.2503 6.03632C31.3034 6.16881 31.3292 6.3107 31.3259 6.45342V13.9672C31.3292 14.11 31.3034 14.2518 31.2503 14.3843C31.1971 14.5168 31.1177 14.6372 31.0167 14.7381C30.9158 14.8391 30.7954 14.9185 30.6629 14.9717C30.5304 15.0248 30.3886 15.0506 30.2458 15.0473Z" fill="currentColor" stroke="currentColor" stroke-width="0.5"/>
  230. <path d="M30.8799 26.0128C30.8799 26.2996 30.9364 26.5835 31.0461 26.8485C31.1558 27.1134 31.3167 27.3541 31.5195 27.5569C31.7222 27.7597 31.963 27.9205 32.2279 28.0303C32.4929 28.14 32.7768 28.1965 33.0636 28.1965C33.3504 28.1965 33.6343 28.14 33.8993 28.0303C34.1642 27.9205 34.4049 27.7597 34.6077 27.5569C34.8105 27.3541 34.9713 27.1134 35.0811 26.8485C35.1908 26.5835 35.2473 26.2996 35.2473 26.0128C35.2473 25.726 35.1908 25.4421 35.0811 25.1771C34.9713 24.9122 34.8105 24.6715 34.6077 24.4687C34.4049 24.2659 34.1642 24.1051 33.8993 23.9953C33.6343 23.8856 33.3504 23.8291 33.0636 23.8291C32.7768 23.8291 32.4929 23.8856 32.2279 23.9953C31.963 24.1051 31.7222 24.2659 31.5195 24.4687C31.3167 24.6715 31.1558 24.9122 31.0461 25.1771C30.9364 25.4421 30.8799 25.726 30.8799 26.0128Z" fill="currentColor" stroke="currentColor" stroke-width="0.5"/>
  231. <path d="M21.8163 26.0128C21.8163 26.592 22.0464 27.1474 22.4559 27.5569C22.8654 27.9664 23.4208 28.1965 24 28.1965C24.5791 28.1965 25.1346 27.9664 25.5441 27.5569C25.9536 27.1474 26.1837 26.592 26.1837 26.0128C26.1837 25.4336 25.9536 24.8782 25.5441 24.4687C25.1346 24.0592 24.5791 23.8291 24 23.8291C23.4208 23.8291 22.8654 24.0592 22.4559 24.4687C22.0464 24.8782 21.8163 25.4336 21.8163 26.0128Z" fill="currentColor" stroke="currentColor" stroke-width="0.5"/>
  232. <path d="M12.7528 26.0128C12.7528 26.2996 12.8093 26.5835 12.919 26.8485C13.0288 27.1134 13.1896 27.3541 13.3924 27.5569C13.5952 27.7597 13.8359 27.9205 14.1008 28.0303C14.3658 28.14 14.6497 28.1965 14.9365 28.1965C15.2233 28.1965 15.5072 28.14 15.7722 28.0303C16.0371 27.9205 16.2778 27.7597 16.4806 27.5569C16.6834 27.3541 16.8442 27.1134 16.954 26.8485C17.0637 26.5835 17.1202 26.2996 17.1202 26.0128C17.1202 25.726 17.0637 25.4421 16.954 25.1771C16.8442 24.9122 16.6834 24.6715 16.4806 24.4687C16.2778 24.2659 16.0371 24.1051 15.7722 23.9953C15.5072 23.8856 15.2233 23.8291 14.9365 23.8291C14.6497 23.8291 14.3658 23.8856 14.1008 23.9953C13.8359 24.1051 13.5952 24.2659 13.3924 24.4687C13.1896 24.6715 13.0288 24.9122 12.919 25.1771C12.8093 25.4421 12.7528 25.726 12.7528 26.0128Z" fill="currentColor" stroke="currentColor" stroke-width="0.5"/>
  233. <path d="M21.8163 34.0668C21.8163 34.6459 22.0464 35.2013 22.4559 35.6109C22.8654 36.0204 23.4208 36.2505 24 36.2505C24.5791 36.2505 25.1346 36.0204 25.5441 35.6109C25.9536 35.2013 26.1837 34.6459 26.1837 34.0668C26.1837 33.4876 25.9536 32.9322 25.5441 32.5226C25.1346 32.1131 24.5791 31.8831 24 31.8831C23.4208 31.8831 22.8654 32.1131 22.4559 32.5226C22.0464 32.9322 21.8163 33.4876 21.8163 34.0668Z" fill="currentColor" stroke="currentColor" stroke-width="0.5"/>
  234. <path d="M12.7528 34.0668C12.7528 34.3535 12.8093 34.6375 12.919 34.9024C13.0288 35.1674 13.1896 35.4081 13.3924 35.6109C13.5952 35.8136 13.8359 35.9745 14.1008 36.0842C14.3658 36.194 14.6497 36.2505 14.9365 36.2505C15.2233 36.2505 15.5072 36.194 15.7722 36.0842C16.0371 35.9745 16.2778 35.8136 16.4806 35.6109C16.6834 35.4081 16.8442 35.1674 16.954 34.9024C17.0637 34.6375 17.1202 34.3535 17.1202 34.0668C17.1202 33.78 17.0637 33.496 16.954 33.2311C16.8442 32.9662 16.6834 32.7254 16.4806 32.5226C16.2778 32.3199 16.0371 32.159 15.7722 32.0493C15.5072 31.9395 15.2233 31.8831 14.9365 31.8831C14.6497 31.8831 14.3658 31.9395 14.1008 32.0493C13.8359 32.159 13.5952 32.3199 13.3924 32.5226C13.1896 32.7254 13.0288 32.9662 12.919 33.2311C12.8093 33.496 12.7528 33.78 12.7528 34.0668Z" fill="currentColor" stroke="currentColor" stroke-width="0.5"/>
  235. </svg>
  236. </div>
  237. <div :class="['menu-icon',showMoreFilter?'active':'']" @click="handleShowFilter">
  238. <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
  239. <path d="M30.283 23.977L40.824 9.5685C41.3719 8.81954 41.6002 7.88381 41.459 6.96667C41.3177 6.04952 40.8184 5.22589 40.0705 4.6765C39.4715 4.23699 38.7479 4 38.005 4H9.995C8.065 4 6.5 5.567 6.5 7.5C6.5 8.244 6.7365 8.9685 7.1755 9.5685L17.717 23.977V42.5C17.717 43.3285 18.3875 44 19.215 44C19.6125 43.9996 19.9935 43.8414 20.2743 43.5601C20.5552 43.2788 20.7128 42.8975 20.7125 42.5V23.486C20.7125 23.1675 20.611 22.857 20.423 22.5995L9.592 7.7955C9.53761 7.72096 9.50489 7.63283 9.49745 7.54085C9.49001 7.44887 9.50814 7.35663 9.54984 7.27431C9.59155 7.192 9.65519 7.12281 9.73375 7.0744C9.81231 7.02599 9.90272 7.00024 9.995 7H38.005C38.0973 7.00015 38.1878 7.02586 38.2664 7.07427C38.345 7.12268 38.4086 7.1919 38.4503 7.27426C38.492 7.35663 38.51 7.44892 38.5025 7.54092C38.4949 7.63292 38.4621 7.72104 38.4075 7.7955L27.5765 22.5995C27.3884 22.8568 27.287 23.1673 27.287 23.486V38.271C27.287 39.0995 27.9575 39.771 28.785 39.771C28.9819 39.7709 29.1768 39.732 29.3586 39.6565C29.5404 39.5811 29.7056 39.4705 29.8447 39.3312C29.9838 39.192 30.0941 39.0266 30.1693 38.8447C30.2445 38.6628 30.2831 38.4678 30.283 38.271V23.977Z" fill="currentColor"/>
  240. </svg>
  241. </div>
  242. </div>
  243. <template v-if="showMoreFilter">
  244. <van-dropdown-menu :close-on-click-overlay="false" :close-on-click-outside="false">
  245. <van-dropdown-item title="选择频度" ref="frequencyDropMenuIns">
  246. <div class="frequency-opt-box">
  247. <ul>
  248. <li
  249. :class="['item',listState.Frequency==item.value?'item-active':'']"
  250. v-for="item in frequencyOpt"
  251. :key="item.value"
  252. @click="listState.Frequency=item.value"
  253. >{{item.label}}</li>
  254. <li class="item" style="height:0"></li>
  255. </ul>
  256. <div class="bot-btn-box">
  257. <div class="btn cancel-btn" @click="showMoreFilter=false">取消</div>
  258. <div class="btn confirm-btn" @click="handleConfirmFrequency">确定</div>
  259. </div>
  260. </div>
  261. </van-dropdown-item>
  262. <van-dropdown-item title="报告状态" ref="statusDropMenuIns">
  263. <div class="report-status-box">
  264. <ul>
  265. <li
  266. :class="['status-item',listState.MsgIsSend===item.value?'active':'']"
  267. v-for="item in reportStatusOpt"
  268. :key="item.value"
  269. @click="listState.MsgIsSend=item.value"
  270. >{{item.label}}</li>
  271. </ul>
  272. <div class="bot-btn-box">
  273. <div class="btn cancel-btn" @click="showMoreFilter=false">取消</div>
  274. <div class="btn confirm-btn" @click="handleConfirmStatus">确定</div>
  275. </div>
  276. </div>
  277. </van-dropdown-item>
  278. </van-dropdown-menu>
  279. </template>
  280. </div>
  281. <van-list
  282. v-model:loading="listState.loading"
  283. :finished="listState.finished"
  284. :finished-text="listState.list.length>0?'没有更多了':'暂无相关报告'"
  285. @load="onLoad"
  286. >
  287. <img v-if="listState.list.length==0&&listState.finished" class="list-empty-img" src="https://hzstatic.hzinsights.com/static/ETA_mobile/empty_img.png" alt="">
  288. <ul class="list-wrap">
  289. <OnLongPress
  290. v-for="item in listState.list"
  291. :key="item.Id"
  292. @trigger="onLongPressItem(item)"
  293. >
  294. <li
  295. class="item"
  296. @click="goDetail(item)"
  297. >
  298. <h2 :class="['van-ellipsis title',item.Title.startsWith('【')?'inline-title':'']">{{item.Title}}</h2>
  299. <p class="van-multi-ellipsis--l2 des">{{item.Abstract}}</p>
  300. <div class="bot-info">
  301. <div>
  302. <span style="margin-right:10px">{{moment(item.ModifyTime).format('YYYY-MM-DD')}}</span>
  303. <span>{{item.AdminRealName}}</span>
  304. </div>
  305. <div>
  306. <span v-if="item.State===1">未发布</span>
  307. <span v-if="item.State===2" class="active-status">已发布</span>
  308. </div>
  309. </div>
  310. </li>
  311. </OnLongPress>
  312. </ul>
  313. </van-list>
  314. </div>
  315. <!-- 报告item操作 -->
  316. <van-action-sheet
  317. v-model:show="showReportItemOpt"
  318. :title="activeItem?.Title"
  319. cancel-text="取消"
  320. >
  321. <div class="report-item-action-box" v-if="activeItem">
  322. <template v-if="activeItem.State==1">
  323. <div class="item" style="color:#C54322" @click="handleReportDel(activeItem)">删除</div>
  324. <div class="item" style="color:#0052D9" @click="handleReportPublish(activeItem)">发布</div>
  325. </template>
  326. <template v-if="activeItem.State==2">
  327. <div class="item" @click="handleReportPublishCancle(activeItem)">取消发布</div>
  328. </template>
  329. </div>
  330. </van-action-sheet>
  331. <!-- 分类弹窗 -->
  332. <van-popup
  333. v-model:show="showClassify"
  334. :position="width>650?'center':'bottom'"
  335. :style="width>650?{ width: '400px'}:''"
  336. round
  337. >
  338. <ListClassify @close="showClassify=false" @confirm="handleConfirmClassify"/>
  339. </van-popup>
  340. <!-- 日期筛选 -->
  341. <van-popup
  342. v-model:show="showCalendar"
  343. :position="width>650?'center':'bottom'"
  344. :style="width>650?{ width: '400px'}:''"
  345. round
  346. >
  347. <van-calendar
  348. :poppable="false"
  349. type="range"
  350. allow-same-day
  351. :min-date="calendarMinDate"
  352. @confirm="handleCalendarChange"
  353. :style="{ height: '500px' }"
  354. />
  355. </van-popup>
  356. </template>
  357. <style lang="scss" scoped>
  358. .sticky-box{
  359. position: sticky;
  360. top: 0;
  361. z-index: 99;
  362. :deep(.van-dropdown-menu__bar){
  363. box-shadow: none;
  364. border-bottom: 1px solid $border-color;
  365. }
  366. .bot-btn-box{
  367. border-top: 1px solid $border-color;
  368. padding: 32px;
  369. display: flex;
  370. justify-content: space-between;
  371. .btn{
  372. width: 327px;
  373. height: 80px;
  374. display: flex;
  375. justify-content: center;
  376. align-items: center;
  377. border-radius: 12px;
  378. font-size: 32px;
  379. font-weight: 600;
  380. }
  381. .cancel-btn{
  382. background-color: #F2F3FF;
  383. color: $theme-color;
  384. }
  385. .confirm-btn{
  386. background-color: $theme-color;
  387. color: #fff;
  388. }
  389. }
  390. .frequency-opt-box{
  391. ul{
  392. display: flex;
  393. flex-wrap: wrap;
  394. padding: 32px;
  395. }
  396. .item{
  397. width: 200px;
  398. height: 80px;
  399. display: flex;
  400. align-items: center;
  401. justify-content: center;
  402. color: rgba(0, 0, 0, 0.9);
  403. margin-left: 12px;
  404. margin-right: 12px;
  405. margin-bottom: 24px;
  406. background-color: #F3F3F3;
  407. border-radius: 12px;
  408. }
  409. .item-active{
  410. background-color: #F2F3FF;
  411. color: $theme-color;
  412. }
  413. }
  414. .report-status-box{
  415. ul{
  416. padding: 32px;
  417. }
  418. .status-item{
  419. line-height: 80px;
  420. border-radius: 12px;
  421. background-color: #F3F3F3;
  422. text-align: center;
  423. margin-bottom: 24px;
  424. &.active{
  425. background-color: #F2F3FF;
  426. color: $theme-color;
  427. }
  428. }
  429. }
  430. }
  431. .top-box{
  432. padding: 30px 34px;
  433. background-color: #fff;
  434. display: flex;
  435. align-items: center;
  436. .menu-icon{
  437. width: 70px;
  438. height: 70px;
  439. display: flex;
  440. align-items: center;
  441. justify-content: center;
  442. background-color: #F2F6FA;
  443. margin-left: 20px;
  444. border-radius: 50%;
  445. &.active{
  446. color: $theme-color;
  447. }
  448. svg{
  449. width: 48px;
  450. height: 48px;
  451. }
  452. }
  453. :deep(.van-search){
  454. padding: 0;
  455. }
  456. }
  457. .list-wrap{
  458. padding: 30px 34px;
  459. .item{
  460. padding: 20px;
  461. margin-bottom: 20px;
  462. border: 1px solid $border-color;
  463. box-shadow: 0px 3px 12px rgba(52, 75, 120, 0.08);
  464. border-radius: 8px;
  465. .title{
  466. font-size: 32px;
  467. line-height: 44px;
  468. margin: 0;
  469. }
  470. .inline-title{
  471. margin-left: -14px;
  472. }
  473. .des{
  474. margin-top: 10px;
  475. margin-bottom: 20px;
  476. font-size: 28px;
  477. color: $font-grey;
  478. min-height: 60px;
  479. }
  480. .bot-info{
  481. display: flex;
  482. justify-content: space-between;
  483. color: $font-grey;
  484. font-size: 28px;
  485. .active-status{
  486. color: $font-success;
  487. }
  488. }
  489. }
  490. }
  491. .report-item-action-box{
  492. .item{
  493. text-align: center;
  494. line-height: 48PX;
  495. font-size: 32px;
  496. border-top: 1px solid $border-color;
  497. }
  498. }
  499. .publish-report-pop-box{
  500. padding: 48px;
  501. .title{
  502. font-size: 36px;
  503. text-align: center;
  504. margin-bottom: 32px;
  505. }
  506. .tips{
  507. color: $font-grey;
  508. margin-bottom: 48px;
  509. }
  510. .btns{
  511. .btn{
  512. line-height: 96px;
  513. border-radius: 12px;
  514. text-align: center;
  515. font-size: 32px;
  516. font-weight: 600;
  517. margin-bottom: 24px;
  518. background-color: #F2F3FF;
  519. color: $theme-color;
  520. }
  521. .blue{
  522. background-color: $theme-color;
  523. color: #fff;
  524. }
  525. }
  526. }
  527. @media screen and (min-width:$media-width){
  528. .sticky-box{
  529. top: 60px;
  530. .bot-btn-box{
  531. padding: 32px;
  532. justify-content: flex-end;
  533. .btn{
  534. width: 120px;
  535. height: 40px;
  536. border-radius: 6px;
  537. font-size: 16px;
  538. margin-left: 20px;
  539. }
  540. }
  541. .frequency-opt-box{
  542. ul{
  543. padding: 32px;
  544. }
  545. .item{
  546. width: 100px;
  547. height: 40px;
  548. margin-left: 6px;
  549. margin-right: 6px;
  550. margin-bottom: 12px;
  551. border-radius: 6px;
  552. }
  553. }
  554. .report-status-box{
  555. ul{
  556. padding: 32px;
  557. }
  558. .status-item{
  559. line-height: 40px;
  560. border-radius: 6px;
  561. margin-bottom: 12px;
  562. }
  563. }
  564. }
  565. .top-box{
  566. padding: 30px;
  567. .menu-icon{
  568. width: 40px;
  569. height: 40px;
  570. svg{
  571. width: 28px;
  572. height: 28px;
  573. }
  574. }
  575. }
  576. .list-wrap{
  577. padding: 30px;
  578. .item{
  579. padding: 20px;
  580. margin-bottom: 20px;
  581. border-radius: 4px;
  582. .title{
  583. font-size: 16px;
  584. line-height: 22px;
  585. }
  586. .inline-title{
  587. margin-left: -14px;
  588. }
  589. .des{
  590. margin-top: 5px;
  591. margin-bottom: 10px;
  592. font-size: 14px;
  593. min-height: 30px;
  594. }
  595. .bot-info{
  596. font-size: 14px;
  597. }
  598. }
  599. }
  600. .report-item-action-box{
  601. .item{
  602. font-size: 16px;
  603. }
  604. }
  605. }
  606. </style>