index.vue 32 KB

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