index.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164
  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. getProjectInfoList,
  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. getProjectInfoList(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. zjly: 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.zjly = 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.zjly)?.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 = `${options?.year}/01/01`;
  506. searchInfo.value.beginDateEnd = `${options?.year}/12/31`
  507. console.log(searchInfo.value);
  508. getList();
  509. } else if (options?.type !== 'all') {
  510. seachFalg.value = false
  511. searchInfo.value = Object.assign(searchInfo.value, options)
  512. searchInfo.value.beginDateStart = `${options?.year}/01/01`;
  513. searchInfo.value.beginDateEnd = `${options?.year}/12/31`;
  514. console.log(searchInfo.value, '获取项目台账');
  515. getList();
  516. } else {
  517. let year = new Date().getFullYear();
  518. searchInfo.value.beginDateStart = `${year}/01/01`;
  519. searchInfo.value.beginDateEnd = `${year}/12/31`;
  520. pageForm.value.beginDateStart = `${year}/01/01`;
  521. pageForm.value.beginDateEnd = `${year}/12/31`;
  522. searchInfo.value.queryType = 0;
  523. uni.$on('projectInfoSearch', resolve => {
  524. searchInfo.value = Object.assign(searchInfo.value, resolve);
  525. searchInfo.value.pageNo = 1;
  526. projectList.value = [];
  527. listTotal.value = 0;
  528. moreListFlag = true;
  529. getList();
  530. });
  531. console.log(searchInfo.value, '获取参数');
  532. getList();
  533. }
  534. });
  535. onReachBottom(() => {
  536. if (!moreListFlag) {
  537. return uni.showToast({
  538. title: "已经到底了。",
  539. icon: "none",
  540. duration: 2000
  541. })
  542. }
  543. searchInfo.value.pageNo++;
  544. getList();
  545. })
  546. </script>
  547. <template>
  548. <view class="container">
  549. <page-title @searchClick='searchClick'>{{title}}({{listTotal}})</page-title>
  550. <view class="stats-layer-next">
  551. <view class="condition-btn">
  552. <view class="text">
  553. 查询条件
  554. </view>
  555. <image src="../../static/images/interArrow.svg" mode="" :class="isUnfold ? 'open-btn':''"
  556. @click="isUnfold = !isUnfold">
  557. </image>
  558. </view>
  559. <view class="condition-from" :style="isUnfold ? {height:'880rpx'} :''">
  560. <view class="item" style="margin-top: 60rpx;">
  561. <view class="item-label">开始日期</view>
  562. <view class="item-text" @click="showBeginTimeChoose()">
  563. <view v-if="pageForm.beginDateStart">{{pageForm.beginDateStart}}</view>
  564. <view v-else class="text">请选择开始日期</view>
  565. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  566. </view>
  567. </view>
  568. <view class="item">
  569. <view class="item-label">结束日期</view>
  570. <view class="item-text" @click="showEndTimeChoose()">
  571. <view v-if="pageForm.beginDateEnd">{{pageForm.beginDateEnd}}</view>
  572. <view v-else class="text">请选择结束日期</view>
  573. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  574. </view>
  575. </view>
  576. <!-- <view class="item">
  577. <view class="item-label">项目类型</view>
  578. <view class="item-text" @click="showKindChoose()">
  579. <view v-if="pageForm.kind">{{pageForm.kind}}</view>
  580. <view v-else class="text">请选择类型</view>
  581. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  582. </view>
  583. </view> -->
  584. <view class="item">
  585. <view class="item-label">资金来源</view>
  586. <view class="item-text" @click="showKindChoose()">
  587. <view v-if="pageForm.zjly">{{pageForm.zjly}}</view>
  588. <view v-else class="text">请选择</view>
  589. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  590. </view>
  591. </view>
  592. <view class="item" v-if="seachFalg">
  593. <view class="item-label">项目性质</view>
  594. <view class="item-text" @click="showXmxzChoose()">
  595. <view v-if="pageForm.propKind">{{pageForm.propKind}}</view>
  596. <view v-else class="text">请选择行业分类</view>
  597. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  598. </view>
  599. </view>
  600. <view class="item">
  601. <view class="item-label">建设地点</view>
  602. <view class="item-text" @click="showAreaChoose()">
  603. <view v-if="pageForm.subjectId">{{pageForm.subjectId}}</view>
  604. <view v-else class="text">请选择建设地点</view>
  605. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  606. </view>
  607. </view>
  608. <view class="item">
  609. <view class="item-label">行业分类</view>
  610. <view class="item-text" @click="showIndustKindChoose()">
  611. <view v-if="pageForm.indusKind">{{pageForm.indusKind}}</view>
  612. <view v-else class="text">请选择行业分类</view>
  613. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  614. </view>
  615. </view>
  616. <view class="item" v-if="seachFalg">
  617. <view class="item-label">状态</view>
  618. <view class="item-text" @click="showStatusChoose()">
  619. <view v-if="pageForm.status">{{pageForm.status}}</view>
  620. <view v-else class="text">请选择状态</view>
  621. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  622. </view>
  623. </view>
  624. <view class="item">
  625. <view class="item-label">是否重点库</view>
  626. <view class="item-text" @click="showIsHideNameChoose()">
  627. <view v-if="pageForm.isHideName">{{pageForm.isHideName}}</view>
  628. <view v-else class="text">请选择是否重点库</view>
  629. <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
  630. </view>
  631. </view>
  632. <view class="item">
  633. <view class="item-label">金额范围</view>
  634. <view class="card-item-range">
  635. <input v-model="pageForm.startAmt" class="card-item-input center-input" placeholder="最小值"
  636. placeholder-style="color: #D8D8D8;font-size:28rpx;" maxlength="20" type="number" />
  637. ~
  638. <input v-model="pageForm.endAmt" class="card-item-input center-input" placeholder="最大值"
  639. placeholder-style="color: #D8D8D8;font-size:28rpx;" maxlength="20" type="number" />
  640. </view>
  641. </view>
  642. <view class="item">
  643. <view class="item-label">项目名称</view>
  644. <view class="card-item-range">&nbsp;
  645. <input v-model="pageForm.subName" class="card-item-input center-input"
  646. placeholder="请输入项目名称&nbsp;&nbsp;&nbsp;&nbsp;"
  647. placeholder-style="color: #D8D8D8;font-size:28rpx;text-align:right;" maxlength="20" />
  648. </view>
  649. </view>
  650. <!-- 红黄绿灯 -->
  651. <view style="margin-top: 20rpx;">
  652. <u-checkbox-group v-model="pageForm.light" style="width: 500rpx">
  653. <u-checkbox :customStyle="{display:'flex',justifyContent:'space-evenly',width:'32%'}"
  654. label-size="28rpx" iconColor='#fff' activeColor='#002F69' v-for="(item, index) in lightList"
  655. :key="index" :label="item.name" :name="item.name">
  656. </u-checkbox>
  657. </u-checkbox-group>
  658. </view>
  659. <view class="form-confrom" style="margin-top: 20rpx;" @click="confirmParams()">
  660. 确定
  661. </view>
  662. </view>
  663. </view>
  664. <view class="cards-list" :style="isUnfold ? {marginTop:'30rpx'} :''">
  665. <view v-for="(item,index) in projectList" :key="index">
  666. <view class="card" :style="!item.isOpen ? '' :{paddingBottom:'0rpx !important'}">
  667. <view class="project-layer" :style="!item.isOpen ? {border:'none'}:''">
  668. <text class="card-name-num">{{(index+1<10?'0'+(index+1):index+1)}}</text>
  669. <view class="name">
  670. {{item.subName ?? "--"}}
  671. </view>
  672. <view class="card-status" @click="onChangeCard(index)">
  673. <image class="status-light" src="../../static/images/red.svg" mode=""
  674. v-if="item.status_fgw=='2'"></image>
  675. <image class="status-light" src="../../static/images/green.svg" mode=""
  676. v-if="item.status_fgw=='0'||item.status_fgw==null"></image>
  677. <image class="status-light" src="../../static/images/yellow.svg" mode=""
  678. v-if="item.status_fgw=='1'">
  679. </image>
  680. <view class="status-name">
  681. {{item.status ?? "--"}}
  682. </view>
  683. <image class="status-switch" src="../../static/images/liaghtUp.svg" mode=""
  684. :class="item.isOpen ?'card-status-icon-change' :''">
  685. </image>
  686. </view>
  687. </view>
  688. <view class="card-content-box" :style="item.isOpen ? {height:'300rpx'} :''">
  689. <view class="line">
  690. </view>
  691. <view class="card-item" style="margin-top: 5rpx;">
  692. <view class="card-item-name">总 投 资 金 额</view>
  693. <view class="card-item-content">{{item.amtTotal ?? "--"}}万</view>
  694. </view>
  695. <!-- 年度计划投资-申报单位(万元) -->
  696. <view class="card-item">
  697. <view class="card-item-name">年度计划投资</view>
  698. <view class="card-item-content">{{item.yearAmt ?? "--"}}万</view>
  699. </view>
  700. <!-- 已完成投资(万元)-->
  701. <view class="card-item">
  702. <view class="card-item-name">年度完成投资</view>
  703. <view class="card-item-content">{{item.yearAmtSj ?? "--"}}万</view>
  704. </view>
  705. <!-- 当前状态 -->
  706. <view class="card-item">
  707. <view class="card-item-name">项目状态</view>
  708. <view class="card-item-content content-red">{{item.status ?? "--"}}</view>
  709. </view>
  710. <view class="card-btn-list">
  711. <view class="button" @click="goToReport('weekly',item)">
  712. 周报
  713. </view>
  714. <view class="button" @click="goToReport('monthly',item)">
  715. 月报
  716. </view>
  717. <view class="button" v-if="!item.isAttention"
  718. @click="changeFocus(item.id,item.isAttention)">
  719. 关注
  720. </view>
  721. <view class="button" @click="changeFocus(item.id,item.isAttention)" v-else>
  722. 取消关注
  723. </view>
  724. <view class="button" v-if="item.usersub == 1" @click="goToDetail(item.id,item.subName)">
  725. 项目详情
  726. </view>
  727. <view class="button" v-else @click="goToDetail(item.id,item.subName)">
  728. 项目详情
  729. </view>
  730. <view class="button" @click="goToReport('more',item)">
  731. 更多
  732. </view>
  733. </view>
  734. </view>
  735. </view>
  736. </view>
  737. <view class="no-list" v-if="projectList.length===0">
  738. <image src="@/static/text-nocontent.png" mode=""></image>
  739. <text>未搜索到相关内容</text>
  740. </view>
  741. </view>
  742. <u-back-top :scroll-top="scrollTop"></u-back-top>
  743. <u-loading-page :loading="loading"></u-loading-page>
  744. <!-- 开始时间 -->
  745. <u-datetime-picker :show="beginTimeShow" @confirm="beginTimeClose" @cancel="beginTimeClose"
  746. @close="beginTimeClose" v-model="beginDateStart" mode="date" closeOnClickOverlay></u-datetime-picker>
  747. <!-- 结束时间 -->
  748. <u-datetime-picker :show="endTimeShow" @confirm="endTimeClose" @cancel="endTimeClose" @close="endTimeClose"
  749. v-model="beginDateEnd" mode="date" closeOnClickOverlay></u-datetime-picker>
  750. <!-- 行业分类 -->
  751. <u-picker :show="IndustKindShow" :columns="IndustKindList" @confirm="IndustKindClose" @cancel="IndustKindClose"
  752. @close="IndustKindClose" closeOnClickOverlay></u-picker>
  753. <!-- 行业状态 -->
  754. <u-picker :show="statusShow" :columns="statusList" @confirm="statusClose" @cancel="statusClose"
  755. @close="statusClose" closeOnClickOverlay></u-picker>
  756. <!-- 地点选择 -->
  757. <u-picker :show="areaShow" :columns="areaColumns" @confirm="areaClose" @cancel="areaClose" @close="areaClose"
  758. closeOnClickOverlay></u-picker>
  759. <!-- 性质选择 -->
  760. <u-picker :show="xmxzShow" :columns="xmxzColumns" @confirm="xmxzClose" @cancel="xmxzClose" @close="xmxzClose"
  761. closeOnClickOverlay></u-picker>
  762. <!-- 项目类型 -->
  763. <u-picker :show="kindShow" :columns="kindColumns" @confirm="kindClose" @cancel="kindClose" @close="kindClose"
  764. closeOnClickOverlay></u-picker>
  765. <!-- 隐藏状态 -->
  766. <u-picker :show="isHideNameShow" :columns="isHideNameList" @confirm="isHideNameClose" @cancel="isHideNameClose"
  767. @close="isHideNameClose" closeOnClickOverlay></u-picker>
  768. </view>
  769. </template>
  770. <style lang="scss" scoped>
  771. .open-btn {
  772. transform: rotate(-180deg);
  773. }
  774. .line {
  775. width: 100%;
  776. height: 0px;
  777. border-top: 2rpx dashed #DDDDDD;
  778. margin: 10rpx auto;
  779. }
  780. .count-value {
  781. display: flex;
  782. flex-wrap: wrap;
  783. width: 100%;
  784. height: 200rpx;
  785. margin-bottom: 20rpx;
  786. background: linear-gradient(180deg, #FFFFFF 2%, #A5C6FF 100%);
  787. border-radius: 40rpx 40rpx 40rpx 40rpx;
  788. opacity: 1;
  789. border: 4rpx solid #fff;
  790. .count-item {
  791. display: flex;
  792. flex-direction: column;
  793. justify-content: center;
  794. width: 50%;
  795. height: 50%;
  796. text-align: center;
  797. .count-item-value {
  798. margin-bottom: 8rpx;
  799. font-size: 34rpx;
  800. font-weight: 500;
  801. color: #FF4000;
  802. }
  803. .count-special-value {
  804. color: #330DDF;
  805. }
  806. .count-item-description {
  807. font-size: 24rpx;
  808. color: #343437;
  809. }
  810. }
  811. }
  812. .order-by {
  813. display: flex;
  814. align-items: center;
  815. justify-content: space-between;
  816. width: 100%;
  817. height: 106rpx;
  818. margin-bottom: 34rpx;
  819. padding: 0 40rpx;
  820. border-radius: 40rpx;
  821. background: #FFF;
  822. .order-by-item {
  823. flex: 1;
  824. display: flex;
  825. justify-content: center;
  826. align-items: center;
  827. font-size: 32rpx;
  828. color: #343437;
  829. .order-by-icon {
  830. width: 22rpx;
  831. height: 46rpx;
  832. margin-left: 24rpx;
  833. background-image: url("@/static/orderBy-none.png");
  834. background-size: 100% 100%;
  835. }
  836. .desc {
  837. background-image: url("@/static/orderBy-desc.png");
  838. }
  839. .asc {
  840. background-image: url("@/static/orderBy-asc.png");
  841. }
  842. }
  843. }
  844. .card-box {
  845. padding: 0 36rpx 36rpx 36rpx;
  846. border-radius: 28rpx 28rpx 28rpx 28rpx;
  847. border: 2rpx solid #C2C9D4;
  848. }
  849. .project-btn {
  850. width: 48% !important;
  851. background: #1869F6;
  852. }
  853. .focus-btn {
  854. width: 48% !important;
  855. background-color: #fff;
  856. border-radius: 16rpx 16rpx 16rpx 16rpx;
  857. border: 3rpx solid #1869F6;
  858. color: #1869F6;
  859. }
  860. .focus-btn-no {
  861. width: 48% !important;
  862. background-color: #fff;
  863. border-radius: 16rpx 16rpx 16rpx 16rpx;
  864. border: 3rpx solid #FF2D2D;
  865. color: #FF2D2D;
  866. }
  867. .lamp {
  868. display: flex;
  869. justify-content: center;
  870. align-items: center;
  871. image {
  872. width: 72rpx;
  873. height: 72rpx;
  874. margin-right: 20rpx;
  875. }
  876. text {
  877. font-size: 32rpx;
  878. }
  879. }
  880. .card-box2 {
  881. padding: 0 0 36rpx 0;
  882. border-radius: 28rpx 28rpx 28rpx 28rpx;
  883. }
  884. .focusText {
  885. font-size: 12rpx;
  886. margin-right: 12rpx;
  887. }
  888. .card {
  889. padding-top: 0;
  890. // overflow: hidden;
  891. }
  892. .light-item {
  893. margin-bottom: 32rpx;
  894. }
  895. .card-light {
  896. display: flex;
  897. align-items: center;
  898. justify-content: center;
  899. }
  900. .card-light-bottom {
  901. width: 122rpx;
  902. height: 44rpx;
  903. margin: auto 0;
  904. background-size: 100% 100%;
  905. }
  906. .light-red {
  907. background-image: url('@/static/icon-light-red.png');
  908. }
  909. .light-yellow {
  910. background-image: url('@/static/icon-light-yellow.png');
  911. }
  912. .light-green {
  913. background-image: url('@/static/icon-light-green.png');
  914. }
  915. .focus {
  916. width: 46rpx;
  917. height: 40rpx;
  918. background-image: url("@/static/focus-off.png");
  919. background-size: 100% 100%;
  920. }
  921. .focus-on {
  922. background-image: url("@/static/focus-on.png");
  923. }
  924. .more-btn {
  925. background-color: #fff;
  926. color: #1869F6;
  927. font-size: 32rpx;
  928. }
  929. .special-btn {
  930. width: 48% !important;
  931. background: linear-gradient(225deg, #2428F1 0%, #12C8C2 94%);
  932. }
  933. .bottom-item {
  934. display: flex;
  935. flex-wrap: wrap;
  936. justify-content: space-between;
  937. align-content: flex-start;
  938. row-gap: 20rpx;
  939. margin-bottom: 64rpx;
  940. }
  941. .card-value {
  942. position: absolute;
  943. bottom: 0;
  944. right: 50%;
  945. transform: translate(50%);
  946. width: 255rpx;
  947. height: 68rpx;
  948. padding-right: 22rpx;
  949. text-align: center;
  950. line-height: 68rpx;
  951. color: #1869F6;
  952. font-size: 32rpx;
  953. background: linear-gradient(90deg, rgba(211, 227, 255, 0) 0%, rgba(178, 206, 255, 0.5548) 54%, rgba(219, 232, 255, 0) 100%);
  954. }
  955. .card-fold {
  956. position: relative;
  957. width: 100%;
  958. min-height: 152rpx;
  959. margin-bottom: 20rpx;
  960. padding: 24rpx 30rpx 52rpx;
  961. box-sizing: border-box;
  962. background: #FFFFFF;
  963. border-radius: 40rpx;
  964. overflow: hidden;
  965. }
  966. .card-fold-option {
  967. position: absolute;
  968. display: flex;
  969. justify-content: space-between;
  970. align-items: center;
  971. left: 0;
  972. bottom: 0;
  973. width: 100%;
  974. height: 38rpx;
  975. padding: 0 40rpx;
  976. box-sizing: border-box;
  977. background: linear-gradient(270deg, #CADDFF 4%, rgba(219, 232, 255, 0) 100%);
  978. z-index: 999;
  979. .card-fold-count {
  980. flex: 1;
  981. font-size: 28rpx;
  982. color: #1869F6;
  983. }
  984. .card-fold-center {
  985. flex: 1;
  986. .card-fold-btn {
  987. width: 32rpx;
  988. height: 20rpx;
  989. margin: 0 auto;
  990. background-image: url("@/static/icon-fold.png");
  991. background-size: 100% 100%;
  992. }
  993. .card-unfold-btn {
  994. transform: rotate(180deg);
  995. }
  996. }
  997. .card-fold-chaos {
  998. flex: 1;
  999. }
  1000. }
  1001. .card-fold-red {
  1002. background: linear-gradient(270deg, #FF8080 0%, rgba(219, 232, 255, 0) 100%);
  1003. .card-fold-count {
  1004. color: #FF0000;
  1005. }
  1006. .card-fold-center {
  1007. .card-fold-btn {
  1008. background-image: url("@/static/icon-fold-red.png");
  1009. }
  1010. }
  1011. }
  1012. .card-fold-yellow {
  1013. background: linear-gradient(270deg, #FFAA00 4%, rgba(219, 232, 255, 0) 100%);
  1014. .card-fold-count {
  1015. color: #E19703;
  1016. }
  1017. .card-fold-center {
  1018. .card-fold-btn {
  1019. background-image: url("@/static/icon-fold-yellow.png");
  1020. }
  1021. }
  1022. }
  1023. </style>