index.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <template>
  2. <view class="container">
  3. <page-title>更多(问题督办)</page-title>
  4. <!-- <view class="list-tip">
  5. <view class="tip-item">
  6. <image src="@/static/images/yearPlan.svg" mode=""></image>
  7. <text>年度计划</text>
  8. </view>
  9. <view class="tip-item">
  10. <image src="@/static/images/problem.svg" mode=""></image>
  11. <text class="light">问题督办</text>
  12. <view class="saniao">
  13. </view>
  14. </view>
  15. <view class="tip-item">
  16. <image src="@/static/images/qianqi.svg" mode=""></image>
  17. <text>前期手续</text>
  18. </view>
  19. <view class="tip-item">
  20. <image src="@/static/images/leaderAndDepart.svg" mode=""></image>
  21. <text>领导及部门</text>
  22. </view>
  23. <view class="tip-item">
  24. <image src="@/static/images/videoImage.svg" mode=""></image>
  25. <text>现场影像</text>
  26. </view>
  27. </view> -->
  28. <view class="cards-list">
  29. <view class="card" v-for="(item,index) in projectList" :key="index">
  30. <!-- <view>
  31. <view style="height:20rpx"></view>
  32. <view class="special-item">
  33. <view class="card-name">
  34. <view class="card-name-title">
  35. <text class="card-name-description">项目名称</text>
  36. </view>
  37. <text class="card-name-text">{{item.subName || "--"}}</text>
  38. </view>
  39. </view>
  40. </view> -->
  41. <!-- <card-title :numerator="index+1" :denominator="listTotal" isSpecial></card-title> -->
  42. <view class="card-name card-top">
  43. <view class="card-name-title card-top-left">
  44. <text class="">项目<br />名称</text>
  45. </view>
  46. <text class="card-name-text card-top-right">
  47. <view class="card-item">
  48. <view class="card-item-content">{{item.sub_name || "--"}}</view>
  49. </view>
  50. </text>
  51. </view>
  52. <view class="line"></view>
  53. <view class="card-item">
  54. <view class="card-item-name">申报单位</view>
  55. <view class="card-item-content">{{item.unitTitle || "--"}}</view>
  56. </view>
  57. <view class="card-item">
  58. <view class="card-item-name">当前状态</view>
  59. <view class="card-item-content">{{item.status || "--"}}</view>
  60. </view>
  61. <view class="card-item">
  62. <view class="card-item-name">问题描述</view>
  63. <view class="card-item-content">{{item.title || "--"}}</view>
  64. </view>
  65. <view class="line"></view>
  66. <view class="card-item">
  67. <view class="card-item-name">要求解决日期</view>
  68. <view class="card-item-content">{{item.date_conf || "--"}}</view>
  69. </view>
  70. </view>
  71. </view>
  72. <empty-show v-if="projectList.length===0"></empty-show>
  73. <u-loading-page :loading="loading"></u-loading-page>
  74. </view>
  75. </template>
  76. <script setup>
  77. import {
  78. ref
  79. } from 'vue';
  80. import {
  81. onLoad,
  82. onUnload,
  83. onPullDownRefresh,
  84. onReachBottom,
  85. onPageScroll
  86. } from "@dcloudio/uni-app";
  87. import {
  88. getOverseeListBySubId,
  89. } from "@/api/work/oversee.js"
  90. import {
  91. addFocus,
  92. cancelFocus
  93. } from "@/api/work/focus.js";
  94. function backToBefore() {
  95. uni.reLaunch({
  96. url: "/pages/index"
  97. });
  98. };
  99. let scrollTop = ref(0)
  100. let loading = ref(true)
  101. // 参数
  102. let searchInfo = ref({
  103. pageNo: 1,
  104. pageSize: 10,
  105. subId: ''
  106. })
  107. // 触底加载flag
  108. let moreListFlag = true
  109. // 获取列表
  110. let projectList = ref([]);
  111. let listTotal = ref(0);
  112. function getList() {
  113. if (searchInfo.value.pageNo == 1) {
  114. loading.value = true
  115. }
  116. getOverseeListBySubId(searchInfo.value).then(res => {
  117. loading.value = false
  118. projectList.value = projectList.value.concat(res.data.list);
  119. listTotal.value = res.data.total;
  120. if (res.data.total == searchInfo.value.pageNo * searchInfo.value.pageSize - (10 - res.data.list
  121. .length)) moreListFlag = false;
  122. }).catch(() => {
  123. loading.value = false
  124. })
  125. }
  126. // function goToDetail(id, subName) {
  127. // uni.navigateTo({
  128. // url: `/pages/projectInfo/detail/index?id=${id}&subName=${subName}`
  129. // })
  130. // }
  131. // function goToPage(url) {
  132. // uni.navigateTo({
  133. // url
  134. // })
  135. // }
  136. // function goToReport(type, subId, subName) {
  137. // uni.navigateTo({
  138. // url: `/pages/projectInfo/report/index?type=${type}&subId=${subId}&subName=${subName}`
  139. // })
  140. // }
  141. onLoad((options) => {
  142. // uni.$on('projectInfoSearch', resolve => {
  143. // searchInfo.value = Object.assign(searchInfo.value, resolve);
  144. // searchInfo.value.pageNo = 1;
  145. // projectList.value = [];
  146. // listTotal.value = 0;
  147. // moreListFlag = true;
  148. // getList();
  149. // });
  150. console.log(options);
  151. searchInfo.value.subId = options.subId
  152. getList();
  153. });
  154. onUnload(() => {
  155. // uni.$off('projectInfoSearch');
  156. })
  157. onPageScroll((e) => {
  158. scrollTop.value = e.scrollTop
  159. })
  160. onPullDownRefresh(() => {
  161. searchInfo.value.pageNo = 1;
  162. projectList.value = [];
  163. moreListFlag = true;
  164. try {
  165. getList();
  166. } finally {
  167. uni.stopPullDownRefresh()
  168. }
  169. })
  170. onReachBottom(() => {
  171. if (!moreListFlag) {
  172. return uni.showToast({
  173. title: "已经到底了。",
  174. icon: "none",
  175. duration: 2000
  176. })
  177. }
  178. searchInfo.value.pageNo++;
  179. getList();
  180. })
  181. </script>
  182. <style lang="scss" scoped>
  183. .list-tip {
  184. width: 750rpx;
  185. height: 164rpx;
  186. background: #FFFFFF;
  187. box-shadow: 0px 4rpx 8rpx 0px #D8EEFF;
  188. display: flex;
  189. flex-direction: row;
  190. justify-content: space-around;
  191. align-items: center;
  192. .tip-item {
  193. display: flex;
  194. flex-direction: column;
  195. align-items: center;
  196. position: relative;
  197. image {
  198. width: 72rpx;
  199. height: 72rpx;
  200. }
  201. text {
  202. font-weight: 300;
  203. font-size: 24rpx;
  204. color: #666666;
  205. }
  206. .light {
  207. font-weight: 500;
  208. color: #222222 !important;
  209. }
  210. .saniao {
  211. position: absolute;
  212. bottom: -34px;
  213. left: 15px;
  214. width: 0;
  215. height: 0;
  216. border: 10px solid #FFFFFF;
  217. border-bottom-color: transparent;
  218. border-left-color: transparent;
  219. border-right-color: transparent;
  220. }
  221. }
  222. }
  223. .card {
  224. padding-top: 0 !important;
  225. padding-bottom: 32rpx !important;
  226. .card-item {
  227. .card-item-content {
  228. line-height: 44rpx;
  229. // font-weight: 500;
  230. // font-size: 24rpx;
  231. // color: #333333;
  232. }
  233. }
  234. .line {
  235. width: 100%;
  236. height: 1px;
  237. border-top: 1px dashed #DDDDDD;
  238. }
  239. }
  240. .card .card-name {
  241. padding: 0;
  242. }
  243. .card-top {
  244. display: flex;
  245. .card-top-left {
  246. width: 112rpx;
  247. height: 112rpx;
  248. background: #D6ECFF;
  249. border-radius: 0px 0px 16rpx 16rpx;
  250. font-weight: 500 !important;
  251. font-size: 28rpx !important;
  252. color: #002F69 !important;
  253. display: flex !important;
  254. justify-content: center;
  255. align-items: center;
  256. margin-right: 24rpx;
  257. line-height: 40rpx;
  258. }
  259. .card-top-right {
  260. display: flex !important;
  261. justify-content: flex-start;
  262. align-items: center;
  263. height: 120rpx;
  264. .card-item {
  265. // margin-top: 22rpx;
  266. // line-height: 44rpx;
  267. .card-item-content {
  268. font-weight: 500;
  269. font-size: 28rpx;
  270. color: #222222;
  271. display: -webkit-box;
  272. -webkit-box-orient: vertical;
  273. overflow: hidden;
  274. text-overflow: ellipsis;
  275. -webkit-line-clamp: 2;
  276. }
  277. }
  278. .tysh {
  279. width: 488rpx;
  280. height: 56rpx;
  281. border-radius: 30rpx;
  282. border: 2rpx solid #EBEBEB;
  283. display: flex;
  284. align-items: center;
  285. padding-left: 32rpx;
  286. margin-top: 18rpx;
  287. margin-bottom: 26rpx;
  288. .card-item-name,
  289. .card-item-content {
  290. width: auto;
  291. font-weight: 500;
  292. font-size: 24rpx;
  293. color: #7A85E0;
  294. }
  295. }
  296. }
  297. }
  298. .container {
  299. padding-top: calc(var(--status-bar-height) + 50px);
  300. }
  301. </style>