index.vue 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340
  1. <script setup>
  2. import {
  3. ref
  4. } from 'vue';
  5. import {
  6. onLoad,
  7. onPullDownRefresh,
  8. onReachBottom,
  9. onPageScroll
  10. } from "@dcloudio/uni-app";
  11. import {
  12. getProjectInfoList,
  13. getAmtCount
  14. } from "@/api/work/projectInfo.js";
  15. import {
  16. addFocus,
  17. cancelFocus
  18. } from "@/api/work/focus.js";
  19. import {
  20. getInfo,
  21. } from "@/api/login.js"
  22. import {
  23. getJSDDlist,
  24. getXMLXlist,
  25. getHYFLlist,
  26. } from "@/api/work/projectInfo.js"
  27. import {
  28. getXMXZlist,
  29. } from "@/api/home.js"
  30. import store from '@/store'
  31. import {
  32. timeFormat
  33. } from "@/utils/timeFormatter.js"
  34. function backToBefore() {
  35. uni.reLaunch({
  36. url: "/pages/index"
  37. });
  38. };
  39. let scrollTop = ref(0)
  40. let loading = ref(true)
  41. // 参数
  42. let searchInfo = ref({
  43. pageNo: 1,
  44. pageSize: 10,
  45. beginDateStart: null,
  46. beginDateEnd: null,
  47. light: ''
  48. })
  49. // tabs
  50. let tabsCurrent = ref(0);
  51. let lightList = [{
  52. name: "红灯项目"
  53. }, {
  54. name: "黄灯项目"
  55. }]
  56. const lightChange = e => {
  57. if (e.name === "黄灯项目") {
  58. searchInfo.value.light = 1;
  59. defaultCurrent.value = 1;
  60. } else {
  61. searchInfo.value.light = 2;
  62. defaultCurrent.value = 0;
  63. };
  64. }
  65. // swiper
  66. let defaultCurrent = ref(0);
  67. const chgangeSwiperItem = function(e) {
  68. tabsCurrent.value = e.detail.current;
  69. searchInfo.value.light = e.detail.current === 0 ? 2 : 1;
  70. searchInfo.value.pageNo = 1;
  71. projectList.value = [];
  72. moreListFlag = true;
  73. firstGetCount = true;
  74. getList();
  75. }
  76. const ReachBottom = e => {
  77. if (!moreListFlag) {
  78. return uni.showToast({
  79. title: "已经到底了。",
  80. icon: "none",
  81. duration: 2000
  82. })
  83. }
  84. searchInfo.value.pageNo++;
  85. getList();
  86. }
  87. // 触底加载flag
  88. let moreListFlag = true
  89. // 获取列表
  90. let projectList = ref([]);
  91. let listTotal = ref(0);
  92. let redTotal = ref(0);
  93. let greenTotal = ref(0);
  94. let yellowTotal = ref(0);
  95. function getList(params) {
  96. if (searchInfo.value.pageNo == 1) loading.value = true;
  97. if (firstGetCount) getAmtCountValue(searchInfo.value);
  98. getProjectInfoList(searchInfo.value).then(res => {
  99. console.log(res);
  100. loading.value = false
  101. projectList.value = projectList.value.concat(res.data.list);
  102. listTotal.value = res.data.total;
  103. redTotal.value = res.data.redNum;
  104. greenTotal.value = res.data.greenNum;
  105. yellowTotal.value = res.data.yellowNum;
  106. if (res.data.total == searchInfo.value.pageNo * searchInfo.value.pageSize - (10 - res.data.list
  107. .length)) {
  108. moreListFlag = false;
  109. }
  110. console.log();
  111. }).catch(() => {
  112. loading.value = false
  113. })
  114. }
  115. function goToDetail(id, subName) {
  116. uni.navigateTo({
  117. url: `/pages/projectInfo/detail/index?id=${id}&subName=${subName}`
  118. })
  119. }
  120. function goToPage(url) {
  121. uni.navigateTo({
  122. url
  123. })
  124. }
  125. function goToReport(type, subId, subName) {
  126. if (type === 'wtdb') {
  127. uni.navigateTo({
  128. url: `/pages/problemSupervision/index?type=${type}&subId=${subId}&subName=${subName}`
  129. })
  130. } else if (type === 'qtldjbm') {
  131. uni.navigateTo({
  132. url: `/pages/leadersList/index?type=${type}&subId=${subId}&subName=${subName}`
  133. })
  134. } else if (type === 'xcyx') {
  135. uni.navigateTo({
  136. url: `/pages/projectImageAndVideo/index?type=${type}&subId=${subId}&subName=${subName}`
  137. })
  138. } else if (type === 'more') {
  139. uni.navigateTo({
  140. url: `/pages/morePage/index?type=${type}&subId=${subId}&subName=${subName}`
  141. })
  142. } else {
  143. uni.navigateTo({
  144. url: `/pages/projectInfo/report/index?type=${type}&subId=${subId}&subName=${subName}`
  145. })
  146. }
  147. }
  148. // 折叠/展开
  149. const changeFoldItem = (status, id) => {
  150. let item = projectList.value.find(item => item.id === id);
  151. item.unfold = status;
  152. }
  153. // 收藏/取消
  154. function changeFocus(id, status) {
  155. let item = projectList.value.find(item => item.id === id);
  156. if (status) {
  157. cancelFocus({
  158. subId: id
  159. }).then(res => {
  160. if (res.code === 200) {
  161. item.isAttention = 0;
  162. }
  163. }).catch(() => {
  164. uni.showToast({
  165. title: "更改收藏状态失败。",
  166. icon: "none",
  167. duration: 2000
  168. })
  169. })
  170. } else {
  171. addFocus({
  172. subId: id
  173. }).then(res => {
  174. if (res.code === 200) {
  175. item.isAttention = 1;
  176. }
  177. }).catch(() => {
  178. uni.showToast({
  179. title: "更改收藏状态失败。",
  180. icon: "none",
  181. duration: 2000
  182. })
  183. })
  184. }
  185. }
  186. // 选择年
  187. let projectYear = ref(null);
  188. let yearShow = ref(false);
  189. let defaultIndex = ref([0]);
  190. let yearColumns = ref([
  191. ["2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012",
  192. "2013",
  193. "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025", "2026",
  194. "2027", "2028", "2029", "2030", "2031", "2032", "2033"
  195. ]
  196. ])
  197. const yearShowChoose = function() {
  198. yearShow.value = true;
  199. }
  200. const yearClose = function(e) {
  201. if (e) {
  202. projectYear.value = e.value[0];
  203. searchInfo.value.beginDateStart = projectYear.value + "/01/01";
  204. searchInfo.value.beginDateEnd = projectYear.value + "/12/31";
  205. // 获取最新数据
  206. searchInfo.value.pageNo = 1;
  207. projectList.value = [];
  208. moreListFlag = true;
  209. getList();
  210. }
  211. yearShow.value = false;
  212. }
  213. let seachFalg = ref(true)
  214. // 统计
  215. let countList = ref([{
  216. title: "年度计划投资(万元)",
  217. key: "sumYearAmt",
  218. value: 0,
  219. color: ""
  220. }, {
  221. title: "全年占比",
  222. key: "yearRt",
  223. value: 0,
  224. color: "",
  225. isRate: true,
  226. }, {
  227. title: "当月完成金额(万元)",
  228. key: "sumMonthAmtSj",
  229. value: 0,
  230. color: "count-special-value"
  231. }, {
  232. title: "当月占比",
  233. key: "monthRt",
  234. value: 0,
  235. color: "count-special-value",
  236. isRate: true,
  237. }]);
  238. let firstGetCount = true;
  239. const getAmtCountValue = paramsOrginal => {
  240. getAmtCount(paramsOrginal).then(res => {
  241. firstGetCount = false
  242. for (let i in countList.value) {
  243. countList.value[i].value = res.data[countList.value[i].key] ?? 0;
  244. }
  245. })
  246. };
  247. //是否展开筛选条件
  248. let isUnfold = ref(false)
  249. //投资分析帅选条件
  250. let investmentAnalysisFrom = ref({
  251. kind: ''
  252. })
  253. let cardCurrut = ref(0)
  254. function onChangeCard(e) {
  255. if (cardCurrut.value == e) {
  256. projectList.value[cardCurrut.value].isOpen = !projectList.value[cardCurrut.value].isOpen
  257. } else {
  258. projectList.value[cardCurrut.value].isOpen = false
  259. projectList.value[e].isOpen = true
  260. cardCurrut.value = e
  261. }
  262. }
  263. let pageForm = ref({
  264. beginDateStart: null,
  265. beginDateEnd: null,
  266. kind: null,
  267. indusKind: null,
  268. propKind: null,
  269. subjectId: null,
  270. status: null,
  271. subName: null,
  272. startAmt: null,
  273. endAmt: null,
  274. isHide: null,
  275. light: ['红灯项目', '黄灯项目'],
  276. })
  277. // ====================================选择开始时间
  278. let beginDateStart = ref(null)
  279. let beginTimeShow = ref(false)
  280. function showBeginTimeChoose() {
  281. beginTimeShow.value = true
  282. }
  283. function beginTimeClose(e) {
  284. if (e) {
  285. let time = timeFormat(e.value)
  286. pageForm.value.beginDateStart = time
  287. }
  288. beginTimeShow.value = false
  289. }
  290. // ====================================选择结束时间
  291. let beginDateEnd = ref(null)
  292. let endTimeShow = ref(false)
  293. function showEndTimeChoose() {
  294. endTimeShow.value = true
  295. }
  296. function endTimeClose(e) {
  297. if (e) {
  298. let time = timeFormat(e.value)
  299. pageForm.value.beginDateEnd = time
  300. }
  301. endTimeShow.value = false
  302. }
  303. // ====================================选择项目类型
  304. let kindShow = ref(false);
  305. let kindColumns = ref([]);
  306. function showKindChoose() {
  307. kindShow.value = true
  308. }
  309. function kindClose(e) {
  310. if (e) pageForm.value.kind = e.value[0];
  311. kindShow.value = false;
  312. }
  313. let kindFull = [];
  314. const getXMLX = function() {
  315. getXMLXlist().then(res => {
  316. kindFull = res.data.list;
  317. kindFull.unshift({
  318. key: null,
  319. value: "所有类型"
  320. });
  321. kindColumns.value = [res.data.list.map(item => item.value)];
  322. })
  323. };
  324. // ====================================选择行业分类
  325. let industKindOrgin = []
  326. let IndustKindList = ref([])
  327. let IndustKindShow = ref(false)
  328. function showIndustKindChoose() {
  329. IndustKindShow.value = true
  330. }
  331. function IndustKindClose(e) {
  332. if (e) pageForm.value.indusKind = e.value[0];
  333. IndustKindShow.value = false
  334. }
  335. // ====================================选择行业状态
  336. // let statusList = ref([
  337. // ["请选择", "暂存", "项目申报", "待审批", "审批中", "核准备案中", "计划编制", "待开工", "施工中", "年度竣工", "不同意", "已竣工"]
  338. // ])
  339. let statusList = ref([
  340. ["请选择", "暂存", "项目前期", "待开工", "施工中", "暂停施工", "已竣工"]
  341. ])
  342. let statusShow = ref(false)
  343. function showStatusChoose() {
  344. statusShow.value = true
  345. }
  346. function statusClose(e) {
  347. if (e) pageForm.value.status = e.value[0];
  348. statusShow.value = false;
  349. }
  350. // ====================================选择隐藏状态
  351. let isHideNameList = ref([
  352. ["请选择",
  353. "正常",
  354. "隐藏"
  355. ]
  356. ])
  357. let isHideNameShow = ref(false)
  358. function showIsHideNameChoose() {
  359. isHideNameShow.value = true
  360. }
  361. function isHideNameClose(e) {
  362. if (e) pageForm.value.isHideName = e.value[0];
  363. isHideNameShow.value = false;
  364. }
  365. // =====================================地点
  366. let areaShow = ref(false);
  367. let areaColumns = ref([]);
  368. const showAreaChoose = function() {
  369. areaShow.value = true;
  370. }
  371. const areaClose = function(e) {
  372. if (e) pageForm.value.subjectId = e.value[0];
  373. areaShow.value = false;
  374. }
  375. let jsddFull = [];
  376. const getJSDD = function() {
  377. getJSDDlist().then(res => {
  378. jsddFull = res.data.list;
  379. jsddFull.push({
  380. key: null,
  381. value: "所有地区"
  382. });
  383. areaColumns.value = [res.data.list.map(item => item.value)];
  384. areaColumns.value[0].unshift("所有地区");
  385. })
  386. };
  387. // =====================================性质
  388. let xmxzShow = ref(false);
  389. let xmxzColumns = ref([]);
  390. const showXmxzChoose = function() {
  391. xmxzShow.value = true;
  392. }
  393. const xmxzClose = function(e) {
  394. if (e) pageForm.value.propKind = e.value[0];
  395. xmxzShow.value = false;
  396. }
  397. let xmxzFull = [];
  398. const getXMXZ = function() {
  399. getXMXZlist().then(res => {
  400. xmxzFull = res.data.list;
  401. xmxzFull.unshift({
  402. key: null,
  403. value: "所有性质"
  404. });
  405. xmxzColumns.value = [res.data.list.map(item => item.value)];
  406. })
  407. };
  408. // =====================================灯
  409. let lightShow = ref(false);
  410. const kindUnit = store.getters && store.getters.kindUnit;
  411. function judgeLightShow() {
  412. if ((kindUnit ?? '') === '') {
  413. // 为空就请求一下
  414. getInfo().then(res => {
  415. lightShow.value = res?.data?.user?.kindUnit === "1";
  416. })
  417. } else {
  418. lightShow.value = kindUnit === "1";
  419. }
  420. }
  421. function confirmParams() {
  422. // let statusObj = {
  423. // "请选择": "",
  424. // "暂存": "0",
  425. // "项目申报": "1",
  426. // "待审批": "2",
  427. // "审批中": "3",
  428. // "核准备案中": "4",
  429. // "计划编制": "5",
  430. // "待开工": "6",
  431. // "施工中": "7",
  432. // "不同意": "8",
  433. // "年度竣工": "9",
  434. // "已竣工": "A"
  435. // }
  436. let statusObj = {
  437. "请选择": "",
  438. "暂存": "0",
  439. "项目前期": "1",
  440. "待开工": "6",
  441. "施工中": "7",
  442. "暂停施工": "8",
  443. //"年度竣工": "9",
  444. "已竣工": "A"
  445. }
  446. let isHideNameObj = {
  447. "请选择": "",
  448. "正常": "0",
  449. "隐藏": "1",
  450. }
  451. let lightObj = {
  452. "绿灯项目": "0",
  453. "黄灯项目": "1",
  454. "红灯项目": "2"
  455. }
  456. let lightText = ""
  457. for (let i in pageForm.value.light) {
  458. lightText += lightObj[pageForm.value.light[i]] + ","
  459. }
  460. if (lightText.length > 0) lightText = lightText.substr(0, lightText.length - 1);
  461. let paramsData = {
  462. "beginDateStart": pageForm.value.beginDateStart,
  463. "beginDateEnd": pageForm.value.beginDateEnd,
  464. "kind": kindFull.find(item => item.value === pageForm.value.kind)?.key,
  465. "indusKind": industKindOrgin.find(item => item.value === pageForm.value.indusKind)?.key,
  466. "subjectId": jsddFull.find(item => item.value === pageForm.value.subjectId)?.key,
  467. "propKind": xmxzFull.find(item => item.value === pageForm.value.propKind)?.key,
  468. "status": statusObj[pageForm.value.status],
  469. "subName": pageForm.value.subName,
  470. "startAmt": pageForm.value.startAmt,
  471. "endAmt": pageForm.value.endAmt,
  472. "isHide": isHideNameObj[pageForm.value.isHideName],
  473. "light": lightText
  474. }
  475. searchInfo.value = Object.assign(searchInfo.value, paramsData);
  476. searchInfo.value.pageNo = 1;
  477. projectList.value = [];
  478. listTotal.value = 0;
  479. moreListFlag = true;
  480. console.log(searchInfo.value, '请求参数');
  481. getList();
  482. }
  483. onLoad(async () => {
  484. let now = new Date();
  485. let year = now.getFullYear();
  486. // 开始时间
  487. searchInfo.value.beginDateStart = beginDateStart.value = pageForm.value.beginDateStart = year +
  488. "/01/01";
  489. // 结束时间
  490. searchInfo.value.beginDateEnd = beginDateEnd.value = pageForm.value.beginDateEnd = year + "/12/31";
  491. // 行业分类列表
  492. const res = await getHYFLlist()
  493. industKindOrgin = res.data.list
  494. let titleList = res.data.list.map(item => item.value)
  495. titleList.unshift("请选择")
  496. IndustKindList.value = [titleList]
  497. getJSDD(); // 建设地点列表
  498. getXMXZ(); // 项目性质列表
  499. getXMLX(); // 项目类型列表
  500. judgeLightShow()
  501. console.log(searchInfo.value);
  502. confirmParams()
  503. });
  504. onPageScroll((e) => {
  505. scrollTop.value = e.scrollTop
  506. })
  507. onPullDownRefresh(() => {
  508. let year = projectYear.value = new Date().getFullYear();
  509. searchInfo.value.beginDateStart = year + "/01/01";
  510. searchInfo.value.beginDateEnd = year + "/12/31";
  511. searchInfo.value.pageNo = 1;
  512. projectList.value = [];
  513. moreListFlag = true;
  514. firstGetCount = true;
  515. try {
  516. getList();
  517. } finally {
  518. uni.stopPullDownRefresh()
  519. }
  520. })
  521. function searchClick() {
  522. goToPage('/pages/projectInfo/search/index')
  523. }
  524. onReachBottom(() => {
  525. if (!moreListFlag) {
  526. return uni.showToast({
  527. title: "已经到底了。",
  528. icon: "none",
  529. duration: 2000
  530. })
  531. }
  532. searchInfo.value.pageNo++;
  533. getList();
  534. })
  535. </script>
  536. <template>
  537. <view class="container">
  538. <page-title @searchClick='searchClick'>红黄灯项目({{listTotal}})</page-title>
  539. <view class="stats-layer-next">
  540. <view class="condition-btn">
  541. <view class="text">
  542. 2024
  543. </view>
  544. <image src="../../static/images/interArrow.svg" mode="" :class="isUnfold ? 'open-btn':''"
  545. @click="isUnfold = !isUnfold">
  546. </image>
  547. </view>
  548. <view class="condition-from" :style="isUnfold ? {height:'800rpx'} :''">
  549. <view class="item">
  550. <view class="item-label">开始日期</view>
  551. <view class="item-text" @click="showBeginTimeChoose()">
  552. <view v-if="pageForm.beginDateStart">{{pageForm.beginDateStart}}</view>
  553. <view v-else class="text">请选择开始日期</view>
  554. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  555. </view>
  556. </view>
  557. <view class="item">
  558. <view class="item-label">结束日期</view>
  559. <view class="item-text" @click="showEndTimeChoose()">
  560. <view v-if="pageForm.beginDateEnd">{{pageForm.beginDateEnd}}</view>
  561. <view v-else class="text">请选择结束日期</view>
  562. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  563. </view>
  564. </view>
  565. <view class="item">
  566. <view class="item-label">项目类型</view>
  567. <view class="item-text" @click="showKindChoose()">
  568. <view v-if="pageForm.kind">{{pageForm.kind}}</view>
  569. <view v-else class="text">请选择类型</view>
  570. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  571. </view>
  572. </view>
  573. <view class="item">
  574. <view class="item-label">项目性质</view>
  575. <view class="item-text" @click="showXmxzChoose()">
  576. <view v-if="pageForm.propKind">{{pageForm.propKind}}</view>
  577. <view v-else class="text">请选择行业分类</view>
  578. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  579. </view>
  580. </view>
  581. <view class="item">
  582. <view class="item-label">建设地点</view>
  583. <view class="item-text" @click="showAreaChoose()">
  584. <view v-if="pageForm.subjectId">{{pageForm.subjectId}}</view>
  585. <view v-else class="text">请选择建设地点</view>
  586. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  587. </view>
  588. </view>
  589. <view class="item">
  590. <view class="item-label">行业分类</view>
  591. <view class="item-text" @click="showIndustKindChoose()">
  592. <view v-if="pageForm.indusKind">{{pageForm.indusKind}}</view>
  593. <view v-else class="text">请选择行业分类</view>
  594. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  595. </view>
  596. </view>
  597. <view class="item">
  598. <view class="item-label">状态</view>
  599. <view class="item-text" @click="showStatusChoose()">
  600. <view v-if="pageForm.status">{{pageForm.status}}</view>
  601. <view v-else class="text">请选择状态</view>
  602. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  603. </view>
  604. </view>
  605. <view class="item">
  606. <view class="item-label">隐藏状态</view>
  607. <view class="item-text" @click="showIsHideNameChoose()">
  608. <view v-if="pageForm.isHideName">{{pageForm.isHideName}}</view>
  609. <view v-else class="text">请选择隐藏状态</view>
  610. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  611. </view>
  612. </view>
  613. <view class="item">
  614. <view class="item-label">金额范围</view>
  615. <view class="card-item-range">
  616. <input v-model="pageForm.startAmt" class="card-item-input center-input" placeholder="最小值"
  617. placeholder-style="color: #D8D8D8" maxlength="20" type="number" />
  618. ~
  619. <input v-model="pageForm.endAmt" class="card-item-input center-input" placeholder="最大值"
  620. placeholder-style="color: #D8D8D8" maxlength="20" type="number" />
  621. </view>
  622. </view>
  623. <view class="item">
  624. <view class="item-label">项目名称</view>
  625. <view class="card-item-range">
  626. <input v-model="pageForm.subName" class="card-item-input center-input" placeholder="请输入项目名称"
  627. placeholder-style="color: #D8D8D8" maxlength="20" type="number" />
  628. </view>
  629. </view>
  630. <!-- 红黄绿灯 -->
  631. <view style="margin-top: 20rpx;">
  632. <u-checkbox-group v-model="pageForm.light" style="width: 500rpx">
  633. <u-checkbox :customStyle="{display:'flex',justifyContent:'space-evenly',width:'50%'}"
  634. label-size="16px" iconColor='#fff' activeColor='#002F69' v-for="(item, index) in lightList"
  635. :key="index" :label="item.name" :name="item.name">
  636. </u-checkbox>
  637. </u-checkbox-group>
  638. </view>
  639. <view class="form-confrom" style="margin-top: 20rpx;" @click="confirmParams()">
  640. 确定
  641. </view>
  642. </view>
  643. </view>
  644. <view class="cards-list" :style="isUnfold ? {marginTop:'30rpx'} :''">
  645. <view class="count-value" style="display: flex;flex-direction: row;"
  646. :style="isUnfold ? {paddingTop:'30rpx'} :''">
  647. <view class="status-fgw">
  648. <image class="status-fgw-light" src="../../static/images/red.svg" mode=""></image>
  649. <view class="status-num">
  650. <view class="number">
  651. {{redTotal}} <text class="dw">个</text>
  652. </view>
  653. <view class="number-palin">
  654. 红灯项目
  655. </view>
  656. </view>
  657. </view>
  658. <view class="status-fgw">
  659. <image class="status-fgw-light" src="../../static/images/yellow.svg" mode=""></image>
  660. <view class="status-num">
  661. <view class="number" style="color:#E6AA00;">
  662. {{yellowTotal}} <text class="dw" style="color:#E6AA00;">个</text>
  663. </view>
  664. <view class="number-palin">
  665. 黄灯项目
  666. </view>
  667. </view>
  668. </view>
  669. <view class="status-fgw">
  670. <image class="status-fgw-light" src="../../static/images/green.svg" mode=""></image>
  671. <view class="status-num">
  672. <view class="number" style="color:#327002;">
  673. {{greenTotal}} <text class="dw" style="color:#327002;">个</text>
  674. </view>
  675. <view class="number-palin">
  676. 绿灯项目
  677. </view>
  678. </view>
  679. </view>
  680. </view>
  681. <view class="cards-list" style="marginTop:30rpx;width: 100%">
  682. <view class="count-value" style="paddingTop:30rpx;border-radius: 12rpx;">
  683. <view class="stats-list">
  684. <view class="stats-item">
  685. <view class="item-num">
  686. <text class="number">{{countList[0].value}}</text>
  687. <text class="unit">万</text>
  688. </view>
  689. <view class="item-name">
  690. 年度计划投资
  691. </view>
  692. </view>
  693. <view class="line">
  694. </view>
  695. <view class="stats-item">
  696. <view class="item-num">
  697. <text class="number">{{countList[2].value}}</text>
  698. <text class="unit">万</text>
  699. </view>
  700. <view class="item-name">
  701. 当月完成金额
  702. </view>
  703. </view>
  704. </view>
  705. <view class="bar-layer">
  706. <view class="bar-item">
  707. <view class="line-progress">
  708. <u-line-progress :percentage="countList[1].value" inactiveColor="#E9F2FF"
  709. activeColor="#6EAAF7" :showText="false" height="10"></u-line-progress>
  710. </view>
  711. <view class="item-text">
  712. <view class="text-name">
  713. 年度占比
  714. </view>
  715. <view class="text-rote">
  716. {{countList[1].value + '%'}}
  717. </view>
  718. </view>
  719. </view>
  720. <view class="bar-item">
  721. <view class="line-progress">
  722. <u-line-progress :percentage="countList[3].value" inactiveColor="#E9F2FF"
  723. activeColor="#6EAAF7" :showText="false" height="10"></u-line-progress>
  724. </view>
  725. <view class="item-text">
  726. <view class="text-name">
  727. 当月占比
  728. </view>
  729. <view class="text-rote">
  730. {{countList[3].value + '%'}}
  731. </view>
  732. </view>
  733. </view>
  734. </view>
  735. </view>
  736. </view>
  737. <view v-for="(item,index) in projectList" :key="index">
  738. <view class="card" :style="!item.isOpen ? '' :{paddingBottom:'0 !important'}">
  739. <view class="project-layer" :style="!item.isOpen ? {border:'none'}:''">
  740. <text class="card-name-num">{{(index+1<10?'0'+(index+1):index+1)}}</text>
  741. <view class="name">
  742. {{item.subName ?? "--"}}
  743. </view>
  744. <view class="card-status" @click="onChangeCard(index)">
  745. <image class="status-light" src="../../static/images/red.svg" mode=""
  746. v-if="item.status_fgw=='2'"></image>
  747. <image class="status-light" src="../../static/images/green.svg" mode=""
  748. v-if="item.status_fgw=='0'||item.status_fgw==null"></image>
  749. <image class="status-light" src="../../static/images/yellow.svg" mode=""
  750. v-if="item.status_fgw=='1'">
  751. </image>
  752. <view class="status-name">
  753. {{item.status ?? "--"}}
  754. </view>
  755. <image class="status-switch" src="../../static/images/liaghtUp.svg" mode=""
  756. :class="item.isOpen ?'card-status-icon-change' :''">
  757. </image>
  758. </view>
  759. </view>
  760. <view class="card-content-box" :style="item.isOpen ? {height:'286rpx'} :''">
  761. <view class="line">
  762. </view>
  763. <view class="card-item" style="margin-top: 5rpx;">
  764. <view class="card-item-name">总 投 资 金 额</view>
  765. <view class="card-item-content">{{item.amtTotal ?? "--"}}万</view>
  766. </view>
  767. <!-- 年度计划投资-申报单位(万元) -->
  768. <view class="card-item">
  769. <view class="card-item-name">年度计划投资</view>
  770. <view class="card-item-content">{{item.yearAmt ?? "--"}}万</view>
  771. </view>
  772. <!-- 已完成投资(万元)-->
  773. <view class="card-item">
  774. <view class="card-item-name">年度完成投资</view>
  775. <view class="card-item-content">{{item.yearAmtSj ?? "--"}}万</view>
  776. </view>
  777. <!-- 当前状态 -->
  778. <view class="card-item">
  779. <view class="card-item-name">项目状态</view>
  780. <view class="card-item-content content-red">{{item.status ?? "--"}}</view>
  781. </view>
  782. <view class="card-btn-list">
  783. <view class="button" @click="goToReport('weekly',item.id,item.subName)">
  784. 周报
  785. </view>
  786. <view class="button" @click="goToReport('monthly',item.id,item.subName)">
  787. 月报
  788. </view>
  789. <view class="button" v-if="!item.isAttention"
  790. @click="changeFocus(item.id,item.isAttention)">
  791. 关注
  792. </view>
  793. <view class="button" @click="changeFocus(item.id,item.isAttention)" v-else>
  794. 取消关注
  795. </view>
  796. <view class="button" v-if="item.usersub == 1" @click="goToDetail(item.id,item.subName)">
  797. 项目详情
  798. </view>
  799. <view class="button" v-else @click="goToDetail(item.id,item.subName)">
  800. 项目详情
  801. </view>
  802. <view class="button" @click="goToReport('more',item.id,item.subName)">
  803. 更多
  804. </view>
  805. </view>
  806. </view>
  807. </view>
  808. </view>
  809. <view class="no-list" v-if="projectList.length===0">
  810. <image src="@/static/text-nocontent.png" mode=""></image>
  811. <text>未搜索到相关内容</text>
  812. </view>
  813. </view>
  814. <u-back-top :scroll-top="scrollTop"></u-back-top>
  815. <u-loading-page :loading="loading"></u-loading-page>
  816. <!-- 年度选择 -->
  817. <u-picker :show="yearShow" :defaultIndex="defaultIndex" :columns="yearColumns" @confirm="yearClose"
  818. @cancel="yearClose" @close="yearClose" closeOnClickOverlay></u-picker>
  819. <!-- 开始时间 -->
  820. <u-datetime-picker :show="beginTimeShow" @confirm="beginTimeClose" @cancel="beginTimeClose"
  821. @close="beginTimeClose" v-model="beginDateStart" mode="date" closeOnClickOverlay></u-datetime-picker>
  822. <!-- 结束时间 -->
  823. <u-datetime-picker :show="endTimeShow" @confirm="endTimeClose" @cancel="endTimeClose" @close="endTimeClose"
  824. v-model="beginDateEnd" mode="date" closeOnClickOverlay></u-datetime-picker>
  825. <!-- 行业分类 -->
  826. <u-picker :show="IndustKindShow" :columns="IndustKindList" @confirm="IndustKindClose" @cancel="IndustKindClose"
  827. @close="IndustKindClose" closeOnClickOverlay></u-picker>
  828. <!-- 行业状态 -->
  829. <u-picker :show="statusShow" :columns="statusList" @confirm="statusClose" @cancel="statusClose"
  830. @close="statusClose" closeOnClickOverlay></u-picker>
  831. <!-- 地点选择 -->
  832. <u-picker :show="areaShow" :columns="areaColumns" @confirm="areaClose" @cancel="areaClose" @close="areaClose"
  833. closeOnClickOverlay></u-picker>
  834. <!-- 性质选择 -->
  835. <u-picker :show="xmxzShow" :columns="xmxzColumns" @confirm="xmxzClose" @cancel="xmxzClose" @close="xmxzClose"
  836. closeOnClickOverlay></u-picker>
  837. <!-- 项目类型 -->
  838. <u-picker :show="kindShow" :columns="kindColumns" @confirm="kindClose" @cancel="kindClose" @close="kindClose"
  839. closeOnClickOverlay></u-picker>
  840. <!-- 隐藏状态 -->
  841. <u-picker :show="isHideNameShow" :columns="isHideNameList" @confirm="isHideNameClose" @cancel="isHideNameClose"
  842. @close="isHideNameClose" closeOnClickOverlay></u-picker>
  843. </view>
  844. </template>
  845. <style lang="scss" scoped>
  846. .stats-layer-next{
  847. margin-top: 20rpx;
  848. padding-top: 60rpx;
  849. }
  850. .tabs {
  851. width: 100%;
  852. height: 90rpx;
  853. margin: 0 auto 20rpx;
  854. border-radius: 28rpx;
  855. background: #FFF;
  856. }
  857. .choose-year {
  858. display: flex;
  859. align-items: center;
  860. justify-content: flex-end;
  861. font-size: 24rpx;
  862. font-weight: 500;
  863. color: #fff;
  864. }
  865. .count-value {
  866. display: flex;
  867. flex-direction: column;
  868. align-items: center;
  869. justify-content: center;
  870. padding-bottom: 38rpx;
  871. gap: 44rpx;
  872. width: 100%;
  873. background-color: #fff;
  874. .bar-layer {
  875. display: flex;
  876. justify-content: center;
  877. gap: 10%;
  878. width: 100%;
  879. .bar-item {
  880. display: flex;
  881. flex-direction: column;
  882. align-items: center;
  883. gap: 10rpx;
  884. width: 200rpx;
  885. .item-text {
  886. display: flex;
  887. justify-content: center;
  888. align-items: center;
  889. gap: 10rpx;
  890. .text-name {
  891. font-size: 28rpx;
  892. font-weight: 500;
  893. color: #000;
  894. white-space: nowrap;
  895. }
  896. .text-rote {
  897. font-size: 28rpx;
  898. font-weight: 500;
  899. color: #C44E00;
  900. }
  901. }
  902. .line-progress {
  903. width: 100%;
  904. }
  905. }
  906. }
  907. .stats-list {
  908. display: flex;
  909. justify-content: center;
  910. align-items: center;
  911. gap: 35rpx;
  912. .line {
  913. height: 50rpx;
  914. border-right: 2rpx solid #EBEBEB;
  915. border-top: none;
  916. }
  917. .stats-item {
  918. display: flex;
  919. flex-direction: column;
  920. align-items: center;
  921. justify-content: center;
  922. .item-num {
  923. display: flex;
  924. justify-content: center;
  925. align-items: flex-end;
  926. gap: 10rpx;
  927. color: #0033A8;
  928. .number {
  929. font-size: 36rpx;
  930. font-weight: 800;
  931. color: #C44E00;
  932. }
  933. .unit {
  934. font-size: 28rpx;
  935. font-weight: 500;
  936. color: #C44E00;
  937. }
  938. }
  939. .item-name {
  940. font-size: 25rpx;
  941. white-space: nowrap;
  942. }
  943. }
  944. }
  945. }
  946. .swiper {
  947. width: 100%;
  948. height: calc(100vh - 268rpx);
  949. .swiper-item-content {
  950. height: 100%;
  951. padding: 20rpx 0 30rpx;
  952. }
  953. }
  954. .card-box {
  955. padding: 0 36rpx 36rpx 36rpx;
  956. border-radius: 28rpx 28rpx 28rpx 28rpx;
  957. border: 2rpx solid #C2C9D4;
  958. }
  959. .project-btn {
  960. width: 48% !important;
  961. background: #1869F6;
  962. }
  963. .focus-btn {
  964. width: 48% !important;
  965. background-color: #fff;
  966. border-radius: 16rpx 16rpx 16rpx 16rpx;
  967. border: 3rpx solid #1869F6;
  968. color: #1869F6;
  969. }
  970. .focus-btn-no {
  971. width: 48% !important;
  972. background-color: #fff;
  973. border-radius: 16rpx 16rpx 16rpx 16rpx;
  974. border: 3rpx solid #FF2D2D;
  975. color: #FF2D2D;
  976. }
  977. .lamp {
  978. display: flex;
  979. justify-content: center;
  980. align-items: center;
  981. image {
  982. width: 72rpx;
  983. height: 72rpx;
  984. margin-right: 20rpx;
  985. }
  986. text {
  987. font-size: 32rpx;
  988. }
  989. }
  990. .card-box2 {
  991. padding: 0 0 36rpx 0;
  992. border-radius: 28rpx 28rpx 28rpx 28rpx;
  993. }
  994. .focusText {
  995. font-size: 12rpx;
  996. margin-right: 12rpx;
  997. }
  998. .light-item {
  999. margin-bottom: 32rpx;
  1000. }
  1001. .card-light {
  1002. display: flex;
  1003. align-items: center;
  1004. justify-content: center;
  1005. }
  1006. .card-light-bottom {
  1007. width: 122rpx;
  1008. height: 44rpx;
  1009. margin: auto 0;
  1010. background-size: 100% 100%;
  1011. }
  1012. .light-red {
  1013. background-image: url('@/static/icon-light-red.png');
  1014. }
  1015. .light-yellow {
  1016. background-image: url('@/static/icon-light-yellow.png');
  1017. }
  1018. .light-green {
  1019. background-image: url('@/static/icon-light-green.png');
  1020. }
  1021. .focus {
  1022. width: 46rpx;
  1023. height: 40rpx;
  1024. background-image: url("@/static/focus-off.png");
  1025. background-size: 100% 100%;
  1026. }
  1027. .focus-on {
  1028. background-image: url("@/static/focus-on.png");
  1029. }
  1030. .more-btn {
  1031. background-color: #fff;
  1032. color: #1869F6;
  1033. font-size: 32rpx;
  1034. }
  1035. .special-btn {
  1036. width: 48% !important;
  1037. background: linear-gradient(225deg, #2428F1 0%, #12C8C2 94%);
  1038. }
  1039. .bottom-item {
  1040. display: flex;
  1041. flex-wrap: wrap;
  1042. justify-content: space-between;
  1043. align-content: flex-start;
  1044. row-gap: 20rpx;
  1045. margin-bottom: 64rpx;
  1046. }
  1047. .card-value {
  1048. position: absolute;
  1049. bottom: 0;
  1050. right: 50%;
  1051. transform: translate(50%);
  1052. width: 255rpx;
  1053. height: 68rpx;
  1054. padding-right: 22rpx;
  1055. text-align: center;
  1056. line-height: 68rpx;
  1057. color: #1869F6;
  1058. font-size: 32rpx;
  1059. background: linear-gradient(90deg, rgba(211, 227, 255, 0) 0%, rgba(178, 206, 255, 0.5548) 54%, rgba(219, 232, 255, 0) 100%);
  1060. }
  1061. .card-fold {
  1062. position: relative;
  1063. width: 100%;
  1064. min-height: 152rpx;
  1065. margin-bottom: 20rpx;
  1066. padding: 24rpx 30rpx 52rpx;
  1067. box-sizing: border-box;
  1068. background: #FFFFFF;
  1069. border-radius: 40rpx;
  1070. overflow: hidden;
  1071. }
  1072. .card-fold-option {
  1073. position: absolute;
  1074. display: flex;
  1075. justify-content: space-between;
  1076. align-items: center;
  1077. left: 0;
  1078. bottom: 0;
  1079. width: 100%;
  1080. height: 38rpx;
  1081. padding: 0 40rpx;
  1082. box-sizing: border-box;
  1083. background: linear-gradient(270deg, #CADDFF 4%, rgba(219, 232, 255, 0) 100%);
  1084. z-index: 999;
  1085. .card-fold-count {
  1086. flex: 1;
  1087. font-size: 28rpx;
  1088. color: #1869F6;
  1089. }
  1090. .card-fold-center {
  1091. flex: 1;
  1092. .card-fold-btn {
  1093. width: 32rpx;
  1094. height: 20rpx;
  1095. margin: 0 auto;
  1096. background-image: url("@/static/icon-fold.png");
  1097. background-size: 100% 100%;
  1098. }
  1099. .card-unfold-btn {
  1100. transform: rotate(180deg);
  1101. }
  1102. }
  1103. .card-fold-chaos {
  1104. flex: 1;
  1105. }
  1106. }
  1107. .card-fold-red {
  1108. background: linear-gradient(270deg, #FF8080 0%, rgba(219, 232, 255, 0) 100%);
  1109. .card-fold-count {
  1110. color: #FF0000;
  1111. }
  1112. .card-fold-center {
  1113. .card-fold-btn {
  1114. background-image: url("@/static/icon-fold-red.png");
  1115. }
  1116. }
  1117. }
  1118. .card-fold-yellow {
  1119. background: linear-gradient(270deg, #FFAA00 4%, rgba(219, 232, 255, 0) 100%);
  1120. .card-fold-count {
  1121. color: #E19703;
  1122. }
  1123. .card-fold-center {
  1124. .card-fold-btn {
  1125. background-image: url("@/static/icon-fold-yellow.png");
  1126. }
  1127. }
  1128. }
  1129. .gap-bottom {
  1130. width: 100%;
  1131. height: 60rpx;
  1132. }
  1133. .count-value {
  1134. display: flex;
  1135. .status-fgw {
  1136. display: flex;
  1137. .status-fgw-light {
  1138. width: 72rpx;
  1139. height: 72rpx;
  1140. }
  1141. .status-num {
  1142. .number {
  1143. font-size: 36rpx;
  1144. color: #E02020;
  1145. display: flex;
  1146. justify-content: center;
  1147. align-items: flex-end;
  1148. font-weight: 500;
  1149. .dw {
  1150. font-size: 20rpx;
  1151. color: #E02020;
  1152. font-weight: 500;
  1153. }
  1154. }
  1155. .number-palin {
  1156. font-weight: 500;
  1157. font-size: 24rpx;
  1158. color: #444444;
  1159. }
  1160. }
  1161. }
  1162. }
  1163. </style>