companyHome.vue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473
  1. <script setup>
  2. import {
  3. ref,
  4. reactive,
  5. nextTick
  6. } from "vue"
  7. import {
  8. onLoad,
  9. onShow,
  10. onTabItemTap,
  11. onReachBottom
  12. } from "@dcloudio/uni-app"
  13. import {
  14. getOverdueNum
  15. } from "@/api/work/overdue.js"
  16. import {
  17. getannouncementList,
  18. getUnwriteReportList,
  19. getHomeStats,
  20. getBanner,
  21. getHomeStaticsEnter,
  22. } from "@/api/home.js"
  23. import {
  24. getJSDDlist,
  25. getZJLYlist,
  26. getHYFLlist,
  27. } from "@/api/work/projectInfo.js";
  28. import {
  29. getProjectInfoList
  30. } from "@/api/work/projectInfo.js";
  31. import store from '@/store'
  32. import {
  33. setAmt
  34. } from '@/utils/common.js'
  35. import {
  36. checkRoleById
  37. } from "@/utils/permission.js"
  38. import {
  39. addFocus,
  40. cancelFocus
  41. } from "@/api/work/focus.js";
  42. import iconEnterpriseInfo from "@/static/func/enterpriseInfos.svg";
  43. import yjtxIcon from '@/static/images/homeIcon/yjtx-icon.svg'
  44. import tzggIcon from '@/static/images/homeIcon/tzgg-icon.svg'
  45. import bslcIcon from '@/static/images/homeIcon/bslc-icon.svg'
  46. import wtdbIcon from '@/static/images/homeIcon/wtdb-icon.svg'
  47. import zcwjIcon from '@/static/images/homeIcon/zcwj-icon.svg'
  48. import zwzxIcon from '@/static/images/homeIcon/xwzx-icon.svg'
  49. import zjxmIcon from '@/static/images/homeIcon/zjxm-icon.svg'
  50. import zbIcon from '@/static/images/homeIcon/zb-icon.svg'
  51. import ybIcon from '@/static/images/homeIcon/yb-icon.svg'
  52. import zjfwIcon from '@/static/images/homeIcon/zjfw-icon.svg'
  53. import {
  54. getMessageNum
  55. } from "@/api/work/message.js"
  56. // 项目信息
  57. let projectYear = ref(2023);
  58. // 选择年
  59. let yearShow = ref(false);
  60. let defaultIndex = ref([0]);
  61. let yearColumns = ref([
  62. ["2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012",
  63. "2013",
  64. "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025", "2026",
  65. "2027", "2028", "2029", "2030", "2031", "2032", "2033"
  66. ]
  67. ])
  68. const yearShowChoose = function() {
  69. yearShow.value = true;
  70. }
  71. const yearClose = function(e) {
  72. if (e) {
  73. projectYear.value = e.value[0];
  74. // 获取最新数据
  75. getProjectInfo();
  76. onclearList()
  77. }
  78. yearShow.value = false;
  79. }
  80. // 选择分类
  81. let projectKind = ref(null);
  82. let projectKindId = null;
  83. let kindShow = ref(false);
  84. let kindColumns = ref([]);
  85. const kindShowChoose = function() {
  86. kindShow.value = true;
  87. }
  88. const kindClose = function(e) {
  89. if (e) {
  90. projectKind.value = e.value[0];
  91. projectKindId = hyflFull.find(item => item.value === projectKind.value).key;
  92. // 获取最新数据
  93. getProjectInfo();
  94. onclearList()
  95. }
  96. kindShow.value = false;
  97. }
  98. let hyflFull = [];
  99. const getHYFL = function() {
  100. getHYFLlist().then(res => {
  101. hyflFull = res.data.list;
  102. hyflFull.push({
  103. key: null,
  104. value: "所有分类"
  105. });
  106. kindColumns.value = [res.data.list.map(item => item.value)];
  107. kindColumns.value[0].unshift("所有分类");
  108. })
  109. };
  110. // 选择地点
  111. let projectArea = ref(null);
  112. let projectAreaId = null;
  113. let areaShow = ref(false);
  114. let areaColumns = ref([]);
  115. const areaShowChoose = function() {
  116. areaShow.value = true;
  117. }
  118. const areaClose = function(e) {
  119. if (e) {
  120. projectArea.value = e.value[0];
  121. projectAreaId = jsddFull.find(item => item.value === projectArea.value).key;
  122. // 获取最新数据
  123. getProjectInfo();
  124. onclearList()
  125. }
  126. areaShow.value = false;
  127. }
  128. let jsddFull = [];
  129. const getJSDD = function() {
  130. getJSDDlist().then(res => {
  131. jsddFull = res.data.list;
  132. jsddFull.push({
  133. key: null,
  134. value: "所有地区"
  135. });
  136. areaColumns.value = [res.data.list.map(item => item.value)];
  137. areaColumns.value[0].unshift("所有地区");
  138. })
  139. };
  140. // 资金来源
  141. let projectAmt = ref(null);
  142. let projectAmtId = null;
  143. let zjlyShow = ref(false);
  144. let zjlyColumns = ref([]);
  145. const zjlyShowChoose = () => {
  146. zjlyShow.value = true
  147. }
  148. const zjlyClose = e => {
  149. if (e) {
  150. projectAmt.value = e.value[0];
  151. projectAmtId = zjlyFull.find(item => item.value === projectAmt.value).key;
  152. // 获取最新数据
  153. getProjectInfo();
  154. onclearList()
  155. }
  156. zjlyShow.value = false
  157. }
  158. let zjlyFull = []
  159. const getZJLY = () => {
  160. getZJLYlist().then(res => {
  161. zjlyFull = res.data.list;
  162. zjlyFull.unshift({
  163. key: null,
  164. value: "所有来源"
  165. });
  166. zjlyColumns.value = [res.data.list.map(item => item.value)];
  167. })
  168. }
  169. function goToPage(url, permissionCode, type) {
  170. // if (permissionCode) {
  171. // let havePermission = checkRoleById([permissionCode])
  172. // if (!havePermission) return
  173. // }
  174. uni.$u.route({
  175. url: url,
  176. params: {
  177. type: type || null
  178. }
  179. })
  180. }
  181. //轮播图
  182. let bannerList = ref([])
  183. async function getBannerList() {
  184. getBanner().then(res => {
  185. bannerList.value = res.data.pictureList
  186. })
  187. }
  188. function bannerClick(e) {
  189. let result = {}
  190. for (let i = 0; i < bannerList.value.length; i++) {
  191. if (i == e) {
  192. result = bannerList.value[i]
  193. }
  194. }
  195. nextTick(() => {
  196. // uni.navigateTo({
  197. // url: `/pages/policy/detail/index?title=${result.title}&id=${result.id}`
  198. // })
  199. uni.$u.route({
  200. url: '/pages/policy/detail/index',
  201. params: {
  202. title: result.title,
  203. id: result.id
  204. }
  205. })
  206. })
  207. }
  208. // 功能列表
  209. let functionList = ref([{
  210. name: '办事流程',
  211. url: '/pages/process/index',
  212. icon: bslcIcon,
  213. type: 'jbxx',
  214. permissionCode: '711'
  215. }, {
  216. name: '问题督办',
  217. url: '/pages/morePage/wtdb/wtdbMorePage',
  218. icon: wtdbIcon,
  219. type: 'wtdb',
  220. permissionCode: '711'
  221. }, {
  222. name: '政策文件',
  223. url: '/pages/policy/search/index',
  224. icon: zcwjIcon,
  225. type: 'zcwj',
  226. permissionCode: '711'
  227. }, {
  228. name: '新闻资讯',
  229. url: '/pages/policy/search/index',
  230. icon: zwzxIcon,
  231. type: 'xwzx',
  232. permissionCode: '711'
  233. }, {
  234. name: '在建项目',
  235. url: '/pages/projectInfo/index',
  236. icon: zjxmIcon,
  237. type: 'all',
  238. permissionCode: '711'
  239. }, {
  240. name: '周报',
  241. url: '/pages/weekly/index',
  242. icon: zbIcon,
  243. type: 'jbxx',
  244. permissionCode: '711'
  245. }, {
  246. name: '月报',
  247. url: '/pages/monthly/index',
  248. icon: ybIcon,
  249. type: 'jbxx',
  250. permissionCode: '711'
  251. }, {
  252. name: '产业链共享服务',
  253. url: '/pages/intermediaryService/search/index',
  254. icon: zjfwIcon,
  255. type: 'jbxx',
  256. permissionCode: '711'
  257. }])
  258. //建设进度
  259. let fullPercents = ref(30);
  260. //获取项目列表
  261. let listPage = ref({
  262. pageNo: 1,
  263. pageSize: 10,
  264. })
  265. let projectList = ref([])
  266. let moreListFlag = ref(true)
  267. function getProjectList() {
  268. let params = {
  269. year: projectYear.value,
  270. indusKind: projectKindId,
  271. buildAddre: projectAreaId,
  272. zjly: projectAmtId
  273. }
  274. let info = {
  275. ...listPage.value,
  276. ...params
  277. }
  278. console.log(info, '项目列表');
  279. getProjectInfoList(info).then(res => {
  280. if (listPage.value.pageNo <= res.data.totalPage) {
  281. projectList.value = projectList.value.concat(res.data.list)
  282. } else if (listPage.value.pageNo >= res.data.totalPage || res.data.totalPage == 0) {
  283. moreListFlag.value = false
  284. }
  285. }).catch(() => {})
  286. }
  287. let cardCurrut = ref(0)
  288. function onChangeCard(e) {
  289. if (cardCurrut.value == e) {
  290. projectList.value[cardCurrut.value].isOpen = !projectList.value[cardCurrut.value].isOpen
  291. } else {
  292. projectList.value[cardCurrut.value].isOpen = false
  293. projectList.value[e].isOpen = true
  294. cardCurrut.value = e
  295. }
  296. }
  297. //重置列表
  298. function onclearList() {
  299. listPage.value.pageNo = 1;
  300. projectList.value = []
  301. getProjectList()
  302. }
  303. function goToDetail(id, subName) {
  304. uni.navigateTo({
  305. url: `/pages/projectInfo/detail/index?id=${id}&subName=${subName}`
  306. })
  307. }
  308. // 收藏/取消
  309. function changeFocus(id, status) {
  310. let item = projectList.value.find(item => item.id === id);
  311. if (status) {
  312. cancelFocus({
  313. subId: id
  314. }).then(res => {
  315. if (res.code === 200) {
  316. item.isAttention = 0;
  317. }
  318. }).catch(() => {
  319. uni.showToast({
  320. title: "更改收藏状态失败。",
  321. icon: "none",
  322. duration: 2000
  323. })
  324. })
  325. } else {
  326. addFocus({
  327. subId: id
  328. }).then(res => {
  329. if (res.code === 200) {
  330. item.isAttention = 1;
  331. }
  332. }).catch(() => {
  333. uni.showToast({
  334. title: "更改收藏状态失败。",
  335. icon: "none",
  336. duration: 2000
  337. })
  338. })
  339. }
  340. }
  341. function goToReport(type, subId, subName) {
  342. if (type === 'wtdb') {
  343. uni.navigateTo({
  344. url: `/pages/problemSupervision/index?type=${type}&subId=${subId}&subName=${subName}`
  345. })
  346. } else if (type === 'qtldjbm') {
  347. uni.navigateTo({
  348. url: `/pages/leadersList/index?type=${type}&subId=${subId}&subName=${subName}`
  349. })
  350. } else if (type === 'xcyx') {
  351. uni.navigateTo({
  352. url: `/pages/projectImageAndVideo/index?type=${type}&subId=${subId}&subName=${subName}`
  353. })
  354. } else if (type === 'more') {
  355. uni.navigateTo({
  356. url: `/pages/morePage/index?type=${type}&subId=${subId}&subName=${subName}`
  357. })
  358. } else {
  359. uni.navigateTo({
  360. url: `/pages/projectInfo/report/index?type=${type}&subId=${subId}&subName=${subName}`
  361. })
  362. }
  363. }
  364. //获取项目数据
  365. let WKG = ref(0)
  366. let YKG = ref(0)
  367. let YWG = ref(0)
  368. let YYQ = ref(0)
  369. let amtRate = ref(0)
  370. let amtTotal = ref(0)
  371. let endRate = ref(0)
  372. let openRate = ref(0)
  373. let yearAmt = ref(0)
  374. let yearAmtSj = ref(0)
  375. let totalNum = ref(0)
  376. function getProjectInfo() {
  377. console.log({
  378. year: projectYear.value,
  379. indusKind: projectKindId,
  380. buildAddre: projectAreaId,
  381. zjly: projectAmtId
  382. });
  383. getHomeStaticsEnter({
  384. year: projectYear.value,
  385. indusKind: projectKindId,
  386. buildAddre: projectAreaId,
  387. zjly: projectAmtId
  388. }).then(res => {
  389. WKG.value = res.data.WKG
  390. YKG.value = res.data.YKG
  391. YWG.value = res.data.YWG
  392. YYQ.value = res.data.YYQ
  393. amtRate.value = res.data.amtRate
  394. amtTotal.value = res.data.amtTotal
  395. endRate.value = res.data.endRate
  396. openRate.value = res.data.openRate
  397. yearAmt.value = res.data.yearAmt
  398. yearAmtSj.value = res.data.yearAmtSj
  399. totalNum.value = res.data.totalNum
  400. })
  401. }
  402. function amtgoto(e) {
  403. let params = {
  404. indusKind: projectKindId,
  405. subjectId: projectAreaId,
  406. zjly: projectAmtId,
  407. isCurrMonth: null,
  408. year: null,
  409. key: null
  410. }
  411. if (e.key == 'amtJh') {
  412. params.year = projectYear.value
  413. params.key = 'year'
  414. params.name = '年度计划投资'
  415. uni.$u.route({
  416. url: '/pages/countAnalysis/through/index',
  417. params: params
  418. })
  419. } else if (e.key == 'amtSj') {
  420. params.year = projectYear.value
  421. params.key = 'ndjh'
  422. params.name = '年度实际投资'
  423. uni.$u.route({
  424. url: '/pages/countAnalysis/through/index',
  425. params: params
  426. })
  427. }
  428. }
  429. function newProjectClick(e, num) {
  430. if (num != 0) {
  431. let throughObj = {
  432. year: projectYear.value,
  433. indusKind: projectKindId,
  434. subjectId: projectAreaId,
  435. zjly: projectAmtId,
  436. queryTimeType: '4',
  437. queryType: 1,
  438. }
  439. let obj = {
  440. xmzs: {
  441. name: '项目总数'
  442. },
  443. wkg: {
  444. name: '未开工',
  445. otherStatus: '1,6'
  446. },
  447. ykg: {
  448. name: '已开工',
  449. otherStatus: '7'
  450. },
  451. ywg: {
  452. name: '已竣工',
  453. otherStatus: 'A'
  454. },
  455. ztz: {
  456. name: '总投资'
  457. },
  458. ndjhtz: {
  459. name: '年度计划投资'
  460. },
  461. ndsjtz: {
  462. name: '年度实际投资'
  463. }
  464. }
  465. throughObj = {
  466. ...throughObj,
  467. ...obj[e]
  468. }
  469. let url = "/pages/projectInfo/index?type=home&";
  470. for (let i in throughObj) {
  471. let item = null;
  472. item = ((throughObj[i] ?? "") === "") ? `${i}=&` : `${i}=${throughObj[i]}&`;
  473. url = url += item;
  474. }
  475. url = url.substr(0, url.length - 1);
  476. uni.navigateTo({
  477. url
  478. })
  479. } else {
  480. uni.showToast({
  481. icon: 'none',
  482. title: '无该项数据'
  483. })
  484. }
  485. }
  486. function gotoLateProject() {
  487. let throughObj = {
  488. year: projectYear.value,
  489. indusKind: projectKindId,
  490. buildAddre: projectAreaId,
  491. zjly: projectAmtId,
  492. queryType: ''
  493. }
  494. let url = "/pages/overdue/overdued/index?type=home&";
  495. for (let i in throughObj) {
  496. let item = null;
  497. item = ((throughObj[i] ?? "") === "") ? `${i}=&` : `${i}=${throughObj[i]}&`;
  498. url = url += item;
  499. }
  500. url = url.substr(0, url.length - 1);
  501. uni.navigateTo({
  502. url
  503. })
  504. }
  505. let overdueWill = ref(0);
  506. let overdued = ref(0);
  507. //获取数量
  508. function getHomeNum() {
  509. getOverdueNum().then(res => {
  510. let text = '99+'
  511. if (res.data.isOver > 99) {
  512. overdueWill.value = text
  513. } else {
  514. overdueWill.value = res.data.isOver
  515. }
  516. })
  517. }
  518. onLoad(() => {
  519. let kind = uni.getStorageSync('userKind')
  520. let list = [{
  521. index: 0,
  522. "pagePath": "pages/home/headHome",
  523. "iconPath": "../../static/images/tabbar/home.png",
  524. "selectedIconPath": "../../static/images/tabbar/home_.png",
  525. "visible": false,
  526. "text": "首页"
  527. }, {
  528. index: 1,
  529. "pagePath": "pages/home/oversawHome",
  530. "iconPath": "../../static/images/tabbar/home.png",
  531. "selectedIconPath": "../../static/images/tabbar/home_.png",
  532. "visible": false,
  533. "text": "首页"
  534. }, {
  535. index: 2,
  536. "pagePath": "pages/home/companyHome",
  537. "iconPath": "../../static/images/tabbar/home.png",
  538. "selectedIconPath": "../../static/images/tabbar/home_.png",
  539. "visible": false,
  540. "text": "首页"
  541. }, {
  542. index: 3,
  543. "pagePath": "pages/message/index",
  544. "iconPath": "../../static/images/tabbar/message.png",
  545. "selectedIconPath": "../../static/images/tabbar/message_.png",
  546. "text": "消息"
  547. }, {
  548. index: 4,
  549. "pagePath": "pages/mine/index",
  550. "iconPath": "../../static/images/tabbar/mine.png",
  551. "selectedIconPath": "../../static/images/tabbar/mine_.png",
  552. "text": "我的"
  553. }]
  554. //kind 1 监管单位, 2公司端 , 3 领导端
  555. if (kind == '2') {
  556. list[0].visible = false
  557. list[1].visible = false
  558. list[2].visible = true
  559. for (let i = 0; i < list.length; i++) {
  560. uni.setTabBarItem(list[i])
  561. }
  562. } else {
  563. list[0].visible = false
  564. list[1].visible = false
  565. list[2].visible = false
  566. for (let i = 0; i < list.length; i++) {
  567. uni.setTabBarItem(list[i])
  568. }
  569. }
  570. if (kind == '2') {
  571. setTimeout(() => {
  572. let now = new Date();
  573. projectYear.value = now.getFullYear();
  574. defaultIndex.value = [projectYear.value - 2000];
  575. // // judgeFuncList(); //判断权限
  576. // getAnnounceMent(); //获取公告
  577. getHYFL(); //获取行业分类
  578. getJSDD(); //获取建设地点
  579. getZJLY(); // 获取资金来源
  580. getProjectInfo();
  581. // getOverdue(); //获取逾期数量
  582. // // getUnwirteList(); //获取未填写周报月报信息
  583. // getMessageCount(); //获取未读消息数量
  584. getProjectList()
  585. }, 1000)
  586. }
  587. });
  588. onShow(() => {
  589. getHomeNum()
  590. getBannerList(); //获取轮播图数据
  591. })
  592. onReachBottom((e) => {
  593. if (!moreListFlag.value) {
  594. // uni.showToast({
  595. // title: "已经到底了。",
  596. // icon: "none",
  597. // duration: 2000
  598. // })
  599. } else {
  600. listPage.value.pageNo++;
  601. getProjectList()
  602. }
  603. })
  604. </script>
  605. <template>
  606. <view class="container">
  607. <view class="top-back-pie">
  608. </view>
  609. <view class="content-layer">
  610. <view class="top-layer">
  611. <view class="project-title">
  612. 哈密市项目管理智慧平台
  613. </view>
  614. <view class="search-layer">
  615. <view class="search-input">
  616. <view class="search-icon"></view>
  617. <input @click="goToPage('/pages/search/index')" placeholder="项目、领导电话..."
  618. placeholder-style="color: #343434;font-size:28rpx;" />
  619. </view>
  620. <view class="search-line">
  621. </view>
  622. <view class="search-focus" @click="goToPage('/pages/focus/index')">
  623. <view class="search-focus-icon"></view>
  624. <text class="text">关注</text>
  625. </view>
  626. </view>
  627. </view>
  628. <view class="banner-box">
  629. <u-swiper :list="bannerList" indicator indicatorMode="line" keyName='coverImg' circular radius='20rpx'
  630. height="254rpx" @click="bannerClick"></u-swiper>
  631. </view>
  632. <view class="prompt-layer">
  633. <view class="item" @click="goToPage('/pages/overdue/index')">
  634. <view class="item-text">
  635. 预警提醒
  636. </view>
  637. <view class="item-image">
  638. <image :src="yjtxIcon" mode=""></image>
  639. <view class="sign">
  640. {{overdueWill}}
  641. </view>
  642. </view>
  643. </view>
  644. <view class="item" @click="goToPage('/pages/announcement/list/index')">
  645. <view class="item-text">
  646. 通知公告
  647. </view>
  648. <view class="item-image">
  649. <image :src="tzggIcon" mode=""></image>
  650. </view>
  651. </view>
  652. </view>
  653. <view class="button-layer">
  654. <view class="btn-item" v-for="(item,index) in functionList" :key="index"
  655. @click='goToPage(item.url,null,item.type)'>
  656. <image :src="item.icon" class="item-icon" mode=""></image>
  657. <view class="item-text">
  658. {{item.name}}
  659. </view>
  660. </view>
  661. </view>
  662. <view class="project-info-select">
  663. <view class="choose-year" @click="yearShowChoose()">
  664. {{projectYear??"年度"}}
  665. <image src="../../static/home-choose-iocn.svg" mode=""></image>
  666. </view>
  667. <view class="choose-year " @click="kindShowChoose()">
  668. {{projectKind ??"行业分类"}}
  669. <image src="../../static/home-choose-iocn.svg" mode=""></image>
  670. </view>
  671. <view class="choose-year " @click="areaShowChoose()">
  672. {{projectArea ??"建设地点"}}
  673. <image src="../../static/home-choose-iocn.svg" mode=""></image>
  674. </view>
  675. <view class="choose-year " @click="zjlyShowChoose()">
  676. <view class="choose-year-text">{{projectAmt ??"资金来源"}}</view>
  677. <image src="../../static/home-choose-iocn.svg" mode=""></image>
  678. </view>
  679. </view>
  680. <view class="stats-layer">
  681. <view class="bar-layer">
  682. <view class="bar-item">
  683. <view class="item-text">
  684. <view class="text-name">
  685. 总建设开工率
  686. </view>
  687. <view class="text-rote">
  688. {{openRate}}%
  689. </view>
  690. </view>
  691. <view class="line-progress">
  692. <u-line-progress :percentage="openRate" inactiveColor="#E9F2FF" activeColor="#6EAAF7" :showText="false"
  693. height="16rpx"></u-line-progress>
  694. </view>
  695. </view>
  696. <view class="bar-item">
  697. <view class="item-text">
  698. <view class="text-name">
  699. 总建设竣工率
  700. </view>
  701. <view class="text-rote">
  702. {{endRate}}%
  703. </view>
  704. </view>
  705. <view class="line-progress">
  706. <u-line-progress :percentage="endRate" inactiveColor="#E9F2FF" activeColor="#6EAAF7" :showText="false"
  707. height="16rpx"></u-line-progress>
  708. </view>
  709. </view>
  710. </view>
  711. <view class="stats-list">
  712. <view class="stats-item" @click="newProjectClick('xmzs',totalNum)">
  713. <view class="item-num">
  714. <text class="number">{{totalNum}}</text>
  715. <text class="unit">个</text>
  716. </view>
  717. <view class="item-name">
  718. 项目总数
  719. </view>
  720. </view>
  721. <view class="line">
  722. </view>
  723. <view class="stats-item" @click="newProjectClick('wkg',WKG)">
  724. <view class="item-num">
  725. <text class="number">{{WKG}}</text>
  726. <text class="unit">个</text>
  727. </view>
  728. <view class="item-name">
  729. 未开工
  730. </view>
  731. </view>
  732. <view class="line">
  733. </view>
  734. <view class="stats-item" @click="newProjectClick('ykg',YKG)">
  735. <view class="item-num">
  736. <text class="number">{{YKG}}</text>
  737. <text class="unit">个</text>
  738. </view>
  739. <view class="item-name">
  740. 已开工
  741. </view>
  742. </view>
  743. <view class="line">
  744. </view>
  745. <view class="stats-item" @click="newProjectClick('ywg',YWG)">
  746. <view class="item-num">
  747. <text class="number">{{YWG}}</text>
  748. <text class="unit">个</text>
  749. </view>
  750. <view class="item-name">
  751. 已竣工
  752. </view>
  753. </view>
  754. </view>
  755. </view>
  756. <view class="stats-layer-next">
  757. <view class="bar-layer">
  758. <view class="bar-name">
  759. 年度投资完成率
  760. </view>
  761. <view class="" style="width: 16rpx;">
  762. </view>
  763. <view class="line-progress">
  764. <u-line-progress :percentage="amtRate" inactiveColor="#E9F2FF" activeColor="#6EAAF7" :showText="false"
  765. height="16rpx"></u-line-progress>
  766. </view>
  767. <view class="" style="width: 12rpx;">
  768. </view>
  769. <view class="bar-rote">
  770. {{amtRate}}%
  771. </view>
  772. </view>
  773. <view class="stats-list">
  774. <view class="stats-item" @click="newProjectClick('ztz',amtTotal)">
  775. <view class="item-num">
  776. <text class="number">{{setAmt(amtTotal*10000)[0]}} </text>
  777. <text class="unit">{{setAmt(amtTotal*10000)[1]}}{{setAmt(amtTotal*10000)[2]}}</text>
  778. </view>
  779. <view class="item-name">
  780. 总投资
  781. </view>
  782. </view>
  783. <view class="line">
  784. </view>
  785. <view class="stats-item" @click="newProjectClick('ndjhtz',yearAmt)">
  786. <view class="item-num">
  787. <text class="number">{{setAmt(yearAmt*10000)[0]}}</text>
  788. <text class="unit">{{setAmt(yearAmt*10000)[1]}}{{setAmt(yearAmt*10000)[2]}}</text>
  789. </view>
  790. <view class="item-name">
  791. 年度计划投资
  792. </view>
  793. </view>
  794. <view class="line">
  795. </view>
  796. <view class="stats-item" @click="newProjectClick('ndsjtz',yearAmtSj)">
  797. <view class="item-num">
  798. <text class="number">{{setAmt(yearAmtSj*10000)[0]}}</text>
  799. <text class="unit">{{setAmt(yearAmtSj*10000)[1]}}{{setAmt(yearAmtSj*10000)[2]}}</text>
  800. </view>
  801. <view class="item-name">
  802. 年度实际投资
  803. </view>
  804. </view>
  805. </view>
  806. </view>
  807. <view class="cards-list">
  808. <view v-for="(item,index) in projectList" :key="index">
  809. <view class="card">
  810. <view class="project-layer" :style="!item.isOpen ? {border:'none'}:''">
  811. <text class="card-name-num">{{(index+1<10?'0'+(index+1):index+1)}}</text>
  812. <view class="name">
  813. {{item.subName ?? "--"}}
  814. </view>
  815. <view class="card-status" @click="onChangeCard(index)">
  816. <image class="status-light" src="../../static/images/red.svg" mode="" v-if="item.status_fgw=='2'">
  817. </image>
  818. <image class="status-light" src="../../static/images/green.svg" mode=""
  819. v-if="item.status_fgw=='0'||item.status_fgw==null"></image>
  820. <image class="status-light" src="../../static/images/yellow.svg" mode="" v-if="item.status_fgw=='1'">
  821. </image>
  822. <view class="status-name">
  823. {{item.status ?? "--"}}
  824. </view>
  825. <image class="status-switch" src="../../static/images/liaghtUp.svg" mode=""
  826. :class="item.isOpen ?'card-status-icon-change' :''">
  827. </image>
  828. </view>
  829. </view>
  830. <view class="card-content-box" :style="item.isOpen ? {height:'266rpx'} :''">
  831. <view class="line">
  832. </view>
  833. <view class="card-item" style="margin-top: 10rpx;">
  834. <view class="card-item-name">总 投 资 金 额</view>
  835. <view class="card-item-content">{{item.amtTotal ?? "--"}}</view>
  836. </view>
  837. <!-- 年度计划投资-申报单位(万元) -->
  838. <view class="card-item">
  839. <view class="card-item-name">年度计划投资</view>
  840. <view class="card-item-content">{{item.yearAmt ?? "--"}}</view>
  841. </view>
  842. <!-- 已完成投资(万元)-->
  843. <view class="card-item">
  844. <view class="card-item-name">年度完成投资</view>
  845. <view class="card-item-content">{{item.yearAmtSj ?? "--"}}</view>
  846. </view>
  847. <!-- 当前状态 -->
  848. <view class="card-item">
  849. <view class="card-item-name">项目状态</view>
  850. <view class="card-item-content">{{item.status ?? "--"}}</view>
  851. </view>
  852. <view class="card-btn-list">
  853. <view class="button" @click="goToReport('weekly',item.id,item.subName)">
  854. 周报
  855. </view>
  856. <view class="button" @click="goToReport('monthly',item.id,item.subName)">
  857. 月报
  858. </view>
  859. <view class="button" v-if="!item.isAttention" @click="changeFocus(item.id,item.isAttention)">
  860. 关注
  861. </view>
  862. <view class="button" @click="changeFocus(item.id,item.isAttention)" v-else>
  863. 取消关注
  864. </view>
  865. <view class="button" v-if="item.usersub == 1" @click="goToDetail(item.id,item.subName)">
  866. 项目详情
  867. </view>
  868. <view class="button" v-else @click="goToDetail(item.id,item.subName)">
  869. 项目详情
  870. </view>
  871. <view class="button" @click="goToReport('more',item.id,item.subName)">
  872. 更多
  873. </view>
  874. </view>
  875. </view>
  876. </view>
  877. </view>
  878. </view>
  879. <view class="bottom-size" v-if="!moreListFlag.value">
  880. 到底了~
  881. </view>
  882. </view>
  883. <!-- 年度选择 -->
  884. <u-picker :show="yearShow" :defaultIndex="defaultIndex" :columns="yearColumns" @confirm="yearClose"
  885. @cancel="yearClose" @close="yearClose" closeOnClickOverlay></u-picker>
  886. <!-- 行业选择 -->
  887. <u-picker :show="kindShow" :columns="kindColumns" @confirm="kindClose" @cancel="kindClose" @close="kindClose"
  888. closeOnClickOverlay></u-picker>
  889. <!-- 地点选择 -->
  890. <u-picker :show="areaShow" :columns="areaColumns" @confirm="areaClose" @cancel="areaClose" @close="areaClose"
  891. closeOnClickOverlay></u-picker>
  892. <!-- 资金来源 -->
  893. <u-picker :show="zjlyShow" :columns="zjlyColumns" @confirm="zjlyClose" @cancel="zjlyClose" @close="zjlyClose"
  894. closeOnClickOverlay></u-picker>
  895. </view>
  896. </template>
  897. <style lang="scss" scoped>
  898. $card-width: calc(100% - 58rpx);
  899. // .card .card-status {
  900. // // top: 32rpx;
  901. // height: 64rpx;
  902. // background: #F2F7FF;
  903. // font-weight: 500;
  904. // font-size: 12px;
  905. // color: #98B7DC;
  906. // }
  907. .bottom-size {
  908. margin-top: 30rpx;
  909. width: 100%;
  910. display: flex;
  911. justify-content: center;
  912. align-items: center;
  913. font-size: 29rpx;
  914. font-weight: 300;
  915. color: #B5B5B5;
  916. }
  917. .card .project-layer {
  918. justify-content: flex-start;
  919. // padding-bottom: 20rpx !important;
  920. .name {
  921. flex-grow: 1;
  922. font-weight: 500;
  923. font-size: 28rpx;
  924. color: #222222;
  925. }
  926. }
  927. .container {
  928. padding-top: 0 !important;
  929. width: 100%;
  930. min-height: 100vh;
  931. .top-back-pie {
  932. position: absolute;
  933. top: -2050rpx;
  934. left: 50%;
  935. transform: translate(-50%, 0);
  936. width: 2500rpx;
  937. height: 2500rpx;
  938. border-radius: 50%;
  939. background-color: #002F69;
  940. z-index: 0;
  941. }
  942. .content-layer {
  943. position: relative;
  944. position: absolute;
  945. z-index: 10;
  946. display: flex;
  947. flex-direction: column;
  948. align-items: center;
  949. justify-content: flex-start;
  950. width: 100%;
  951. padding-bottom: calc(var(--window-bottom) + 38rpx);
  952. .top-layer {
  953. position: fixed;
  954. z-index: 10000;
  955. display: flex;
  956. flex-direction: column;
  957. align-items: center;
  958. justify-content: flex-start;
  959. width: 100%;
  960. background-color: #002F69;
  961. padding-bottom: 20rpx;
  962. .project-title {
  963. display: flex;
  964. justify-content: center;
  965. align-items: center;
  966. margin-top: var(--status-bar-height);
  967. width: 100%;
  968. height: 88rpx;
  969. font-size: 36rpx;
  970. font-weight: 600;
  971. color: #FFF;
  972. }
  973. .search-layer {
  974. margin-top: 24rpx;
  975. display: flex;
  976. justify-content: space-between;
  977. align-items: center;
  978. width: 90%;
  979. background-color: #fff;
  980. border-radius: 16rpx;
  981. .search-input {
  982. display: flex;
  983. align-items: center;
  984. width: 78%;
  985. height: 72rpx;
  986. padding: 0 20rpx;
  987. box-sizing: border-box;
  988. text-align: left;
  989. .search-icon {
  990. width: 40rpx;
  991. height: 40rpx;
  992. margin-right: 26rpx;
  993. background-image: url('@/static/home-search-icon.svg');
  994. background-size: 100% 100%;
  995. }
  996. }
  997. .search-line {
  998. width: 0;
  999. height: 28rpx;
  1000. border-left: 1rpx solid rgba(0, 47, 105, 0.5);
  1001. }
  1002. .search-focus {
  1003. display: flex;
  1004. align-items: center;
  1005. justify-content: flex-end;
  1006. gap: 10rpx;
  1007. width: 22%;
  1008. .search-focus-icon {
  1009. width: 40rpx;
  1010. height: 40rpx;
  1011. background-image: url('@/static/focus.svg');
  1012. background-size: 100% 100%;
  1013. }
  1014. .text {
  1015. margin-right: 20rpx;
  1016. font-size: 28rpx;
  1017. font-weight: 600;
  1018. white-space: nowrap;
  1019. color: #06356D;
  1020. }
  1021. }
  1022. }
  1023. }
  1024. .banner-box {
  1025. margin-top: calc(var(--status-bar-height) + 210rpx);
  1026. width: $card-width;
  1027. }
  1028. .prompt-layer {
  1029. margin-top: 40rpx;
  1030. display: flex;
  1031. justify-content: space-between;
  1032. align-items: center;
  1033. width: $card-width;
  1034. .item {
  1035. display: flex;
  1036. justify-content: center;
  1037. align-items: center;
  1038. gap: 24rpx;
  1039. width: 338rpx;
  1040. height: 120rpx;
  1041. background-color: #fff;
  1042. box-shadow: 0rpx 0rpx 8rpx 0rpx #D8EEFF, inset 0rpx 0rpx 6rpx 0rpx #D8EEFF, inset 2rpx 2rpx 0rpx 0rpx #FFFFFF;
  1043. border-radius: 12rpx;
  1044. .item-text {
  1045. font-size: 28rpx;
  1046. font-weight: 500;
  1047. color: #222222;
  1048. }
  1049. .item-image {
  1050. position: relative;
  1051. image {
  1052. width: 80rpx;
  1053. height: 80rpx;
  1054. border-radius: 50%;
  1055. }
  1056. .sign {
  1057. position: absolute;
  1058. left: 64rpx;
  1059. top: 0;
  1060. padding: 0 10rpx 0 10rpx;
  1061. font-size: 12rpx;
  1062. background-color: #FC5E74;
  1063. color: #fff;
  1064. border-radius: 16rpx;
  1065. border: 2px solid #fff;
  1066. }
  1067. }
  1068. }
  1069. }
  1070. .button-layer {
  1071. margin-top: 30rpx;
  1072. display: flex;
  1073. flex-wrap: wrap;
  1074. justify-content: space-between;
  1075. align-content: space-between;
  1076. row-gap: 32rpx;
  1077. width: $card-width;
  1078. .btn-item {
  1079. display: flex;
  1080. flex-direction: column;
  1081. justify-content: center;
  1082. align-items: center;
  1083. gap: 14rpx;
  1084. width: 160rpx;
  1085. height: 160rpx;
  1086. border-radius: 12rpx;
  1087. background-color: #fff;
  1088. box-shadow: 0rpx 0rpx 8rpx 0rpx #D8EEFF;
  1089. .item-icon {
  1090. width: 80rpx;
  1091. height: 80rpx;
  1092. }
  1093. .item-text {
  1094. font-size: 28rpx;
  1095. font-weight: 500;
  1096. color: #222222;
  1097. line-height: 28rpx;
  1098. text-align: center;
  1099. }
  1100. }
  1101. }
  1102. .sub-title {
  1103. display: flex;
  1104. justify-content: center;
  1105. width: $card-width;
  1106. font-size: 36rpx;
  1107. font-weight: 500;
  1108. color: #222222;
  1109. }
  1110. .project-info-select {
  1111. margin: auto;
  1112. margin-top: 40rpx;
  1113. display: flex;
  1114. justify-content: center;
  1115. align-items: center;
  1116. gap: 32rpx;
  1117. width: $card-width;
  1118. height: 88rpx;
  1119. background: #F5F5F5;
  1120. border-radius: 56rpx 56rpx 0rpx 0rpx;
  1121. .choose-year {
  1122. display: flex;
  1123. align-items: center;
  1124. justify-content: center;
  1125. gap: 2rpx;
  1126. font-size: 24rpx;
  1127. font-weight: 500;
  1128. color: #999999;
  1129. .choose-year-text {
  1130. overflow: hidden;
  1131. text-overflow: ellipsis;
  1132. white-space: nowrap;
  1133. }
  1134. image {
  1135. width: 32rpx;
  1136. height: 32rpx;
  1137. }
  1138. }
  1139. }
  1140. .stats-layer {
  1141. display: flex;
  1142. flex-direction: column;
  1143. justify-content: center;
  1144. align-items: center;
  1145. justify-content: center;
  1146. gap: 50rpx;
  1147. width: $card-width;
  1148. background-color: #FFF;
  1149. border-radius: 10rpx;
  1150. padding: 48rpx 0 44rpx 0;
  1151. .bar-layer {
  1152. display: flex;
  1153. justify-content: center;
  1154. gap: 72rpx;
  1155. width: 100%;
  1156. .bar-item {
  1157. display: flex;
  1158. flex-direction: column;
  1159. align-items: flex-start;
  1160. gap: 24rpx;
  1161. width: 40%;
  1162. .item-text {
  1163. display: flex;
  1164. justify-content: center;
  1165. align-items: center;
  1166. gap: 10rpx;
  1167. .text-name {
  1168. font-size: 28rpx;
  1169. font-weight: 500;
  1170. color: #666666;
  1171. }
  1172. .text-rote {
  1173. font-size: 28rpx;
  1174. font-weight: 700;
  1175. color: #C44E00;
  1176. }
  1177. }
  1178. .line-progress {
  1179. width: 100%;
  1180. }
  1181. }
  1182. }
  1183. .stats-list {
  1184. display: flex;
  1185. justify-content: center;
  1186. align-items: center;
  1187. width: calc(100% - 88rpx);
  1188. .line {
  1189. margin-top: 40rpx;
  1190. height: 24rpx;
  1191. width: 0;
  1192. border: none;
  1193. border-right: 2rpx solid #EBEBEB;
  1194. }
  1195. .stats-item {
  1196. width: 25%;
  1197. display: flex;
  1198. flex-direction: column;
  1199. align-items: center;
  1200. justify-content: center;
  1201. .item-num {
  1202. display: flex;
  1203. justify-content: center;
  1204. align-items: flex-end;
  1205. gap: 5rpx;
  1206. color: #0033A8;
  1207. .number {
  1208. font-size: 35rpx;
  1209. font-weight: 800;
  1210. }
  1211. .unit {
  1212. font-size: 20rpx;
  1213. }
  1214. }
  1215. .item-name {
  1216. font-size: 25rpx;
  1217. }
  1218. }
  1219. }
  1220. }
  1221. .stats-layer-next {
  1222. margin-top: 30rpx;
  1223. display: flex;
  1224. flex-direction: column;
  1225. justify-content: center;
  1226. align-items: center;
  1227. justify-content: center;
  1228. gap: 46rpx;
  1229. width: $card-width;
  1230. background-color: #FFF;
  1231. border-radius: 10rpx;
  1232. padding: 48rpx 0 44rpx 0;
  1233. .bar-layer {
  1234. display: flex;
  1235. justify-content: center;
  1236. align-items: center;
  1237. width: calc(100% - 88rpx);
  1238. .bar-name {
  1239. font-size: 28rpx;
  1240. font-weight: 500;
  1241. font-size: 28rpx;
  1242. }
  1243. .line-progress {
  1244. flex-grow: 1;
  1245. }
  1246. .bar-rote {
  1247. font-size: 30rpx;
  1248. font-weight: 600;
  1249. color: #C44E00;
  1250. }
  1251. }
  1252. .stats-list {
  1253. width: calc(100% - 88rpx);
  1254. display: flex;
  1255. justify-content: space-between;
  1256. align-items: center;
  1257. .line {
  1258. margin-top: 49rpx;
  1259. width: 0;
  1260. height: 24rpx;
  1261. border: none;
  1262. border-right: 2rpx solid #EBEBEB;
  1263. }
  1264. .stats-item {
  1265. display: flex;
  1266. flex-direction: column;
  1267. align-items: center;
  1268. justify-content: center;
  1269. gap: 14rpx;
  1270. width: 33%;
  1271. .item-num {
  1272. display: flex;
  1273. justify-content: center;
  1274. align-items: flex-end;
  1275. gap: 5rpx;
  1276. color: #0035A9;
  1277. .number {
  1278. font-size: 36rpx;
  1279. font-weight: 600;
  1280. line-height: 36rpx;
  1281. white-space: nowrap;
  1282. }
  1283. .unit {
  1284. font-size: 20rpx;
  1285. }
  1286. }
  1287. .item-name {
  1288. font-size: 24rpx;
  1289. white-space: nowrap;
  1290. }
  1291. }
  1292. }
  1293. }
  1294. }
  1295. }
  1296. </style>