index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029
  1. <script setup>
  2. import {
  3. ref,
  4. reactive
  5. } from "vue";
  6. import {
  7. onLoad,
  8. } from "@dcloudio/uni-app";
  9. import {
  10. getJSDDlist,
  11. getXMLXlist,
  12. getHYFLlist,
  13. getZJLYlist,
  14. } from "@/api/work/projectInfo.js";
  15. import {
  16. getXMXZlist,
  17. } from "@/api/home.js";
  18. import {
  19. getIndustyRateValueData,
  20. getIndustyRateAmtData,
  21. getAreaRateData,
  22. getYearRateData
  23. } from "@/api/work/analysis.js";
  24. // 年度
  25. let yearShow = ref(false);
  26. let defaultIndex = ref([0]);
  27. let yearColumns = ref([
  28. ["2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012",
  29. "2013",
  30. "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025", "2026",
  31. "2027", "2028", "2029", "2030", "2031", "2032", "2033"
  32. ]
  33. ])
  34. const yearShowChoose = function() {
  35. yearShow.value = true;
  36. }
  37. const yearClose = function(e) {
  38. if (e) searchInfo.year = e.value[0];
  39. yearShow.value = false;
  40. }
  41. // 建设地点
  42. let jsddFull = [];
  43. let jsddColumns = ref([]);
  44. const getJSDD = function() {
  45. getJSDDlist().then(res => {
  46. jsddFull = res.data.list;
  47. jsddColumns.value = [res.data.list.map(item => item.value)];
  48. })
  49. };
  50. let jsddShow = ref(false);
  51. const jsddShowChoose = function() {
  52. jsddShow.value = true;
  53. }
  54. const jsddClose = function(e) {
  55. if (e) searchInfo.subjectId = e.value[0];
  56. jsddShow.value = false;
  57. }
  58. // 项目类型
  59. let xmlxFull = [];
  60. let xmlxColumns = ref([]);
  61. const getXMLX = function() {
  62. getXMLXlist().then(res => {
  63. xmlxFull = res.data.list;
  64. xmlxColumns.value = [res.data.list.map(item => item.value)];
  65. })
  66. };
  67. let xmlxShow = ref(false);
  68. const xmlxShowChoose = function() {
  69. xmlxShow.value = true;
  70. }
  71. const xmlxClose = function(e) {
  72. if (e) searchInfo.kind = e.value[0];
  73. xmlxShow.value = false;
  74. }
  75. // 项目性质
  76. let xmxzFull = [];
  77. let xmxzColumns = ref([]);
  78. const getXMXZ = () => {
  79. getXMXZlist().then(res => {
  80. xmxzFull = res.data.list;
  81. xmxzFull.unshift({
  82. key: null,
  83. value: "所有性质"
  84. });
  85. xmxzFull = xmxzFull.filter(item => item.value !== "储备项目");
  86. xmxzColumns.value = [xmxzFull.map(item => item.value)];
  87. })
  88. };
  89. let xmxzShow = ref(false);
  90. const xmxzShowChoose = () => {
  91. xmxzShow.value = true;
  92. }
  93. const xmxzClose = e => {
  94. if (e) searchInfo.propKind = e.value[0];
  95. xmxzShow.value = false;
  96. }
  97. // 是否隐藏
  98. let hideFull = [{
  99. key: null,
  100. value: "所有"
  101. }, {
  102. key: 1,
  103. value: "隐藏"
  104. }, {
  105. key: 0,
  106. value: "正常"
  107. }, ];
  108. let hideColumns = ref([
  109. ["所有", "隐藏", "正常"]
  110. ])
  111. let hideShow = ref(false);
  112. const hideShowChoose = function() {
  113. hideShow.value = true;
  114. }
  115. const hideClose = function(e) {
  116. if (e) searchInfo.isHide = e.value[0];
  117. hideShow.value = false;
  118. }
  119. // 行业分类
  120. let hyflFull = []
  121. let hyflColumns = ref([])
  122. const getHYFL = () => {
  123. getHYFLlist().then(res => {
  124. hyflFull = res.data.list;
  125. hyflFull.unshift({
  126. key: null,
  127. value: "所有分类"
  128. });
  129. hyflColumns.value = [res.data.list.map(item => item.value)];
  130. })
  131. }
  132. let hyflShow = ref(false)
  133. const hyflShowChoose = () => {
  134. hyflShow.value = true
  135. }
  136. const hyflClose = e => {
  137. if (e) searchInfo.hyfl = e.value[0];
  138. hyflShow.value = false
  139. }
  140. // 亿元项目
  141. let yTypeFull = [{
  142. key: null,
  143. value: "全部"
  144. },
  145. {
  146. key: 1,
  147. value: "亿元以下"
  148. },
  149. {
  150. key: 2,
  151. value: "1-5亿"
  152. },
  153. {
  154. key: 3,
  155. value: "5-10亿"
  156. },
  157. {
  158. key: 4,
  159. value: "10亿以上"
  160. },
  161. ]
  162. let yTypeColumns = ref([
  163. ["全部", "亿元以下", "1-5亿", "5-10亿", "10亿以上"]
  164. ])
  165. let yTypeShow = ref(false)
  166. const yTypeShowChoose = () => {
  167. yTypeShow.value = true
  168. }
  169. const yTypeClose = e => {
  170. if (e) searchInfo.yType = e.value[0];
  171. yTypeShow.value = false
  172. }
  173. // 取值模式
  174. let modeFull = [{
  175. key: 1,
  176. value: "实际值"
  177. },
  178. {
  179. key: 2,
  180. value: "预测值"
  181. }
  182. ]
  183. let modeColumns = ref([
  184. ["实际值", "预测值"]
  185. ])
  186. let modeShow = ref(false)
  187. const modeShowChoose = () => {
  188. modeShow.value = true
  189. }
  190. const modeClose = e => {
  191. if (e) searchInfo.mode = e.value[0];
  192. modeShow.value = false
  193. }
  194. // 资金来源
  195. let zjlyFull = []
  196. let zjlyColumns = ref([])
  197. const getZJLY = () => {
  198. getZJLYlist().then(res => {
  199. zjlyFull = res.data.list;
  200. zjlyFull.unshift({
  201. key: null,
  202. value: "所有来源"
  203. });
  204. zjlyColumns.value = [res.data.list.map(item => item.value)];
  205. })
  206. }
  207. let zjlyShow = ref(false)
  208. const zjlyShowChoose = () => {
  209. zjlyShow.value = true
  210. }
  211. const zjlyClose = e => {
  212. if (e) searchInfo.zjly = e.value[0];
  213. zjlyShow.value = false
  214. }
  215. // 同比/环比
  216. let yearOnYearFull = [{
  217. key: 1,
  218. value: "同比"
  219. }, {
  220. key: 2,
  221. value: "环比"
  222. }];
  223. let yearOnYearColumns = ref([
  224. ["同比", "环比"]
  225. ])
  226. let yearOnYearShow = ref(false);
  227. const yearOnYearShowChoose = function() {
  228. yearOnYearShow.value = true;
  229. }
  230. const yearOnYearClose = function(e) {
  231. if (e) searchInfo.kindType = e.value[0];
  232. yearOnYearShow.value = false;
  233. }
  234. // 页面主题
  235. let titleMark = null;
  236. let titleText = ref("");
  237. let titleEnum = {
  238. "industyRateValue": {
  239. text: "行业占比分析-数量",
  240. showArray: [{
  241. text: "行业分类",
  242. key: "title",
  243. width: "200rpx"
  244. }, {
  245. text: "项目数量",
  246. key: "num",
  247. width: "100rpx",
  248. through: true,
  249. }, {
  250. text: "占比(%)",
  251. key: "rage",
  252. width: "100rpx"
  253. }],
  254. emitFunction: function(data) {
  255. getIndustryRateValue(data);
  256. }
  257. },
  258. "industyRateAmt": {
  259. text: "行业占比分析-金额",
  260. showArray: [{
  261. text: "行业分类",
  262. key: "title",
  263. width: "200rpx"
  264. }, {
  265. text: "投资金额(万元)",
  266. key: "num",
  267. width: "100rpx",
  268. through: true,
  269. }, {
  270. text: "占比(%)",
  271. key: "rage",
  272. width: "100rpx"
  273. }],
  274. emitFunction: function(data) {
  275. getIndustryAmtValue(data);
  276. }
  277. },
  278. "areaRate": {
  279. text: "区县占比分析",
  280. showArray: [{
  281. text: "建设地点",
  282. key: "jsddName",
  283. width: "150rpx",
  284. through: true,
  285. },
  286. // {
  287. // text: "项目数",
  288. // key: "totalNum",
  289. // width: "150rpx",
  290. // },
  291. {
  292. text: "投资完成率(%)",
  293. key: "amtRate",
  294. width: "180rpx",
  295. through: true,
  296. }, {
  297. text: "开工率(%)",
  298. key: "beginRate",
  299. width: "150rpx",
  300. through: true,
  301. }
  302. ],
  303. emitFunction: function(data) {
  304. getAreaRateValue(data);
  305. }
  306. },
  307. "yearRate": {
  308. text: "年度投资分析",
  309. showArray: [{
  310. text: "月份",
  311. key: "strmonth",
  312. }, {
  313. text: "上年度投资(万元)",
  314. key: "amt_last1",
  315. }, {
  316. text: "本年度投资(万元)",
  317. key: "amt_cur",
  318. }, {
  319. text: "增速(%)",
  320. key: "num_bl",
  321. }],
  322. emitFunction: function(data) {
  323. getYearRateValue(data)
  324. }
  325. },
  326. };
  327. // 展示列表
  328. let showList = ref([]);
  329. const combineshowList = () => {
  330. let chooseList = titleEnum[titleMark].showArray;
  331. if (titleMark === "yearRate") {
  332. if (searchInfo.kindType === "同比") {
  333. chooseList = [{
  334. text: "月份",
  335. key: "strmonth",
  336. width: "100rpx"
  337. }, {
  338. text: "上年度投资(万元)",
  339. key: "amt_last1",
  340. width: "200rpx"
  341. }, {
  342. text: "本年度投资(万元)",
  343. key: "amt_cur",
  344. width: "200rpx"
  345. }, {
  346. text: "增速(%)",
  347. key: "num_bl",
  348. width: "100rpx"
  349. }]
  350. } else { //环比
  351. chooseList = [{
  352. text: "月份",
  353. key: "strmonth",
  354. width: "100rpx"
  355. }, {
  356. text: "上月度投资(万元)",
  357. key: "amt_last1",
  358. width: "200rpx"
  359. }, {
  360. text: "本月度投资(万元)",
  361. key: "amt_cur",
  362. width: "200rpx"
  363. }, {
  364. text: "增速(%)",
  365. key: "num_bl",
  366. width: "100rpx"
  367. }]
  368. }
  369. }
  370. let tempArr = [];
  371. for (let i in chooseList) {
  372. tempArr.push(Object.assign({
  373. value: null
  374. }, chooseList[i]));
  375. }
  376. showList.value = tempArr;
  377. }
  378. // 搜索内容
  379. let listTotal = ref(0);
  380. let itemList = ref([]);
  381. let searchInfo = reactive({
  382. year: null, //年度
  383. subjectId: null, //建设地点
  384. kind: null, //项目类型
  385. propKind: null, //项目性质
  386. isHide: "所有", //是否隐藏,
  387. hyfl: null, //行业分类,
  388. yType: null, //亿元项目
  389. mode: "实际值", //取值模式,
  390. kindType: "同比", //同比/环比
  391. });
  392. const getList = () => {
  393. let params = {
  394. year: searchInfo.year, //年度
  395. subjectId: jsddFull.find(item => item.value === searchInfo.subjectId)?.key, //建设地点
  396. kind: xmlxFull.find(item => item.value === searchInfo.kind)?.key, //项目类型
  397. propKind: xmxzFull.find(item => item.value === searchInfo.propKind)?.key, //项目性质
  398. isHide: hideFull.find(item => item.value === searchInfo.isHide)?.key, //是否隐藏
  399. hyfl: hyflFull.find(item => item.value === searchInfo.hyfl)?.key, //行业分类
  400. yType: yTypeFull.find(item => item.value === searchInfo.yType)?.key, //亿元项目
  401. mode: modeFull.find(item => item.value === searchInfo.mode)?.key, //取值模式
  402. zjly: zjlyFull.find(item => item.value === searchInfo.zjly)?.key, //资金来源
  403. kindType: yearOnYearFull.find(item => item.value === searchInfo.kindType)?.key, //同比/环比
  404. };
  405. if (titleMark === "yearRate") combineshowList()
  406. titleEnum[titleMark].emitFunction(params);
  407. }
  408. // 行业占比分析-数量
  409. const getIndustryRateValue = params => {
  410. getIndustyRateValueData(params).then(res => {
  411. itemList.value = res.data.list;
  412. listTotal.value = res.data.list.length;
  413. createPieData(res.data.list);
  414. })
  415. }
  416. // 行业占比分析-金额
  417. const getIndustryAmtValue = params => {
  418. getIndustyRateAmtData(params).then(res => {
  419. itemList.value = res.data.list;
  420. listTotal.value = res.data.list.length;
  421. createPieData(res.data.list);
  422. })
  423. }
  424. // 区县占比分析
  425. const getAreaRateValue = params => {
  426. getAreaRateData(params).then(res => {
  427. itemList.value = res.data.list;
  428. listTotal.value = res.data.list.length;
  429. createPieData(res.data.list, "jsddName", "totalNum", true);
  430. })
  431. }
  432. // 年度投资分析
  433. const getYearRateValue = params => {
  434. getYearRateData(params).then(res => {
  435. itemList.value = res.data.list;
  436. listTotal.value = res.data.list.length;
  437. createLineData(res.data.list);
  438. })
  439. }
  440. // 穿透
  441. const goToProjectList = (item, keyword) => {
  442. // 判断是否有操作
  443. let chooseList = titleEnum[titleMark].showArray;
  444. let haveThroughOption = chooseList.find(item => item.key === keyword)?.through;
  445. if (!haveThroughOption) return;
  446. let params = {
  447. year: searchInfo.year, //年度
  448. subjectId: jsddFull.find(item => item.value === searchInfo.subjectId)?.key, //建设地点
  449. kind: xmlxFull.find(item => item.value === searchInfo.kind)?.key, //项目类型
  450. propKind: xmxzFull.find(item => item.value === searchInfo.propKind)?.key, //项目性质
  451. isHide: hideFull.find(item => item.value === searchInfo.isHide)?.key, //是否隐藏
  452. zbCheck: 1
  453. };
  454. Object.keys(params).forEach((key) => {
  455. let value = params[key];
  456. if ((value ?? "") === "") delete params[key]
  457. })
  458. if (titleMark === "industyRateValue" || titleMark === "industyRateAmt") {
  459. params.indusKind = item.indusKind;
  460. params.queryType = 0;
  461. }
  462. if (titleMark === "areaRate") {
  463. params.subjectId = item.subjectId;
  464. params.queryType = 0;
  465. }
  466. let url = "/pages/analysis/projectList/index?";
  467. for (let i in params) {
  468. let item = null
  469. if (!((params[i] ?? "") === "")) {
  470. item = `${i}=${params[i]}&`;
  471. } else {
  472. item = `${i}=&`;
  473. }
  474. url = url += item;
  475. };
  476. uni.navigateTo({
  477. url
  478. })
  479. }
  480. // 饼图
  481. let showPie = ref(false);
  482. const pieOpts = {
  483. color: ["#90B5F4", "#6497EE", "#1869F6", "#FF8229", "#FFAC71"],
  484. padding: [0, 5, 0, 5],
  485. enableScroll: false,
  486. legend: {
  487. show: false
  488. },
  489. extra: {
  490. pie: {
  491. activeOpacity: 0.5,
  492. activeRadius: 10,
  493. offsetAngle: 0,
  494. border: false,
  495. offsetAngle: -90
  496. }
  497. }
  498. }
  499. let pieChartData = ref({
  500. series: [{
  501. data: []
  502. }]
  503. })
  504. const createPieData = (list, name = "title", unit = "num", isDoublePie = false) => {
  505. // 饼状图数据
  506. let pieList = []
  507. for (let i in list) {
  508. pieList.push({
  509. "name": list[i][name],
  510. "value": list[i][unit] ?? 0,
  511. "labelShow": false
  512. })
  513. }
  514. pieChartData.value.series[0].data = pieList;
  515. if (isDoublePie) {
  516. createDoublePieData(list);
  517. } else {
  518. showPie.value = true;
  519. }
  520. }
  521. // 双饼
  522. let itemListOrderByAmt = ref([])
  523. let showDoublePie = ref(false);
  524. const pieDoubleOpts = {
  525. color: ["#90B5F4", "#6497EE", "#1869F6", "#FF8229", "#FFAC71"],
  526. padding: [0, 5, 0, 5],
  527. enableScroll: false,
  528. legend: {
  529. show: false
  530. },
  531. extra: {
  532. pie: {
  533. activeOpacity: 0.5,
  534. activeRadius: 10,
  535. offsetAngle: 0,
  536. border: false,
  537. offsetAngle: -90,
  538. customRadius: 50,
  539. }
  540. }
  541. }
  542. let doublePieChartData = ref({
  543. series: [{
  544. data: []
  545. }]
  546. })
  547. const createDoublePieData = list => {
  548. itemListOrderByAmt.value = JSON.parse(JSON.stringify(itemList.value));
  549. itemListOrderByAmt.value.sort(sortByValue('amt', -1));
  550. let pieList = [];
  551. for (let i in itemListOrderByAmt.value) {
  552. pieList.push({
  553. "name": itemListOrderByAmt.value[i].jsddName,
  554. "value": itemListOrderByAmt.value[i].amt ?? 0,
  555. "labelShow": false
  556. })
  557. }
  558. doublePieChartData.value.series[0].data = pieList;
  559. showDoublePie.value = true;
  560. }
  561. const sortByValue = (attr, rev) => {
  562. if (rev == undefined) {
  563. rev = 1
  564. } else {
  565. (rev) ? 1: -1;
  566. }
  567. return function(a, b) {
  568. a = a[attr];
  569. b = b[attr];
  570. if (a < b) {
  571. return rev * -1
  572. }
  573. if (a > b) {
  574. return rev * 1
  575. }
  576. return 0;
  577. }
  578. }
  579. // 折线图
  580. let showLine = ref(false);
  581. const LineOpts = {
  582. color: ["#1869F6", "#000"],
  583. touchMoveLimit: 24,
  584. enableScroll: true,
  585. dataLabel: false,
  586. legend: {
  587. show: false
  588. },
  589. xAxis: {
  590. disableGrid: true,
  591. scrollShow: true,
  592. itemCount: 6,
  593. },
  594. yAxis: {
  595. showTitle: true,
  596. gridType: "dash",
  597. data: [{
  598. title: "增速(%)",
  599. }]
  600. },
  601. extra: {
  602. column: {
  603. type: "group",
  604. width: 14,
  605. barBorderRadius: [12, 12, 12, 12],
  606. activeBgColor: "#000000",
  607. activeBgOpacity: 0.08,
  608. },
  609. line: {
  610. activeType: "none"
  611. },
  612. markLine: {
  613. // type: "dash",
  614. data: [{
  615. value: 0,
  616. // labelText: "0",
  617. lineColor: "#000"
  618. }]
  619. }
  620. }
  621. }
  622. let LineChartData = ref({
  623. categories: [],
  624. series: [{
  625. name: "增速(%)",
  626. data: []
  627. }]
  628. })
  629. const createLineData = list => {
  630. let categoriesList = []
  631. let seriesList = []
  632. for (let i in list) {
  633. categoriesList.push(list[i].strmonth + "月")
  634. seriesList.push(list[i].num_bl)
  635. }
  636. LineChartData.value.categories = categoriesList.length > 0 ? categoriesList : ["无数据"]
  637. LineChartData.value.series[0].data = seriesList;
  638. showLine.value = true;
  639. }
  640. // 取整
  641. const filterInt = value => {
  642. let expectNull = Number(value ?? 0);
  643. return parseInt(expectNull);
  644. }
  645. onLoad(options => {
  646. // 标题
  647. titleMark = options.type;
  648. titleText.value = titleEnum[titleMark].text;
  649. // 列表
  650. combineshowList();
  651. // 年度
  652. let now = new Date();
  653. searchInfo.year = now.getFullYear();
  654. defaultIndex.value = [searchInfo.year - 2000];
  655. // 建设地点
  656. getJSDD();
  657. // 项目类型
  658. getXMLX();
  659. // 项目性质
  660. getXMXZ();
  661. // 页面列表
  662. getList();
  663. if (titleMark === "yearRate") {
  664. // 行业分类
  665. getHYFL();
  666. // 资金来源
  667. getZJLY();
  668. }
  669. })
  670. </script>
  671. <template>
  672. <view class="container">
  673. <page-title>{{titleText}}</page-title>
  674. <view class="cards-list">
  675. <view class="card only-card">
  676. <!-- 年度 -->
  677. <view class="card-item first-card-item" @click="yearShowChoose()">
  678. <view class="card-item-name">年度</view>
  679. <view class="card-item-description">
  680. <view v-if="searchInfo.year">{{searchInfo.year}}</view>
  681. <view v-else class="remind-text">请选择年度</view>
  682. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  683. </view>
  684. </view>
  685. <!-- 建设地点 -->
  686. <view class="card-item" @click="jsddShowChoose()">
  687. <view class="card-item-name">建设地点</view>
  688. <view class="card-item-description">
  689. <view v-if="searchInfo.subjectId">{{searchInfo.subjectId}}</view>
  690. <view v-else class="remind-text">请选择地点</view>
  691. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  692. </view>
  693. </view>
  694. <!-- 项目类型 -->
  695. <view class="card-item" @click="xmlxShowChoose()">
  696. <view class="card-item-name">项目类型</view>
  697. <view class="card-item-description">
  698. <view v-if="searchInfo.kind">{{searchInfo.kind}}</view>
  699. <view v-else class="remind-text">请选择类型</view>
  700. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  701. </view>
  702. </view>
  703. <!-- 项目性质 -->
  704. <view class="card-item" @click="xmxzShowChoose()">
  705. <view class="card-item-name">项目性质</view>
  706. <view class="card-item-description">
  707. <view v-if="searchInfo.propKind">{{searchInfo.propKind}}</view>
  708. <view v-else class="remind-text">请选择性质</view>
  709. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  710. </view>
  711. </view>
  712. <!-- 行业分类 -->
  713. <view class="card-item" v-if="titleMark === 'yearRate'" @click="hyflShowChoose()">
  714. <view class="card-item-name">行业分类</view>
  715. <view class="card-item-description">
  716. <view v-if="searchInfo.hyfl">{{searchInfo.hyfl}}</view>
  717. <view v-else class="remind-text">请选择类型</view>
  718. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  719. </view>
  720. </view>
  721. <!-- 资金来源 -->
  722. <view class="card-item" v-if="titleMark === 'yearRate'" @click="zjlyShowChoose()">
  723. <view class="card-item-name">资金来源</view>
  724. <view class="card-item-description">
  725. <view v-if="searchInfo.zjly">{{searchInfo.zjly}}</view>
  726. <view v-else class="remind-text">请选择来源</view>
  727. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  728. </view>
  729. </view>
  730. <!-- 亿元项目 -->
  731. <view class="card-item" v-if="titleMark === 'yearRate'" @click="yTypeShowChoose()">
  732. <view class="card-item-name">亿元项目</view>
  733. <view class="card-item-description">
  734. <view v-if="searchInfo.yType">{{searchInfo.yType}}</view>
  735. <view v-else class="remind-text">请选择</view>
  736. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  737. </view>
  738. </view>
  739. <!-- 是否隐藏 -->
  740. <view class="card-item" @click="hideShowChoose()">
  741. <view class="card-item-name">是否隐藏</view>
  742. <view class="card-item-description">
  743. <view v-if="searchInfo.isHide">{{searchInfo.isHide}}</view>
  744. <view v-else class="remind-text">请选择</view>
  745. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  746. </view>
  747. </view>
  748. <!-- 取值模式 -->
  749. <view class="card-item" v-if="titleMark === 'yearRate'" @click="modeShowChoose()">
  750. <view class="card-item-name">取值模式</view>
  751. <view class="card-item-description">
  752. <view v-if="searchInfo.mode">{{searchInfo.mode}}</view>
  753. <view v-else class="remind-text">请选择模式</view>
  754. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  755. </view>
  756. </view>
  757. <!-- 同比/环比 -->
  758. <view class="card-item" v-if="titleMark === 'yearRate'" @click="yearOnYearShowChoose()">
  759. <view class="card-item-name">同比/环比</view>
  760. <view class="card-item-description">
  761. <view v-if="searchInfo.kindType">{{searchInfo.kindType}}</view>
  762. <view v-else class="remind-text">请选择模式</view>
  763. <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
  764. </view>
  765. </view>
  766. </view>
  767. <view class="search-btn" @click="getList()">确定</view>
  768. <view class="double-pie" v-if="showDoublePie">
  769. <view class="double-pie-area">
  770. <view class="double-pie-item">
  771. <qiun-data-charts type="pie" :opts="pieDoubleOpts" :chartData="pieChartData" tooltipFormat="tooltipDemo2" />
  772. </view>
  773. <view class="double-pie-item">
  774. <qiun-data-charts type="pie" :opts="pieDoubleOpts" :chartData="doublePieChartData"
  775. tooltipFormat="tooltipDemo3" />
  776. </view>
  777. </view>
  778. <view class="double-pie-description">
  779. <view class="double-pie-descriptionItem">项目数</view>
  780. <view class="double-pie-descriptionItem">实际投资金额</view>
  781. </view>
  782. <view class="double-pie-data">
  783. <view class="double-pie-textArea">
  784. <view class="double-pie-textItem" v-for="(item,index) in itemList" :key="index">
  785. <view class="double-pie-name">{{item.jsddName ?? "--"}}</view>
  786. <view class="double-pie-project">{{item.totalNum ?? "--"}}个</view>
  787. </view>
  788. </view>
  789. <view class="double-pie-textArea">
  790. <view class="double-pie-textItem" v-for="(item,index) in itemListOrderByAmt" :key="index">
  791. <view class="double-pie-name">{{item.jsddName ?? "--"}}</view>
  792. <view class="double-pie-amt">{{filterInt(item.amt)}}万元</view>
  793. </view>
  794. </view>
  795. </view>
  796. </view>
  797. <view class="pie" v-if="showPie">
  798. <qiun-data-charts v-if="titleMark==='industyRateValue' || titleMark==='areaRate'" type="pie" :opts="pieOpts"
  799. :chartData="pieChartData" tooltipFormat="tooltipDemo2" />
  800. <qiun-data-charts v-if="titleMark==='industyRateAmt'" type="pie" :opts="pieOpts" :chartData="pieChartData"
  801. tooltipFormat="tooltipDemo3" />
  802. </view>
  803. <view class="line" v-if="showLine">
  804. <qiun-data-charts type="line" :opts="LineOpts" :ontouch="true" :chartData="LineChartData" />
  805. </view>
  806. <uni-table stripe border emptyText="暂无更多数据">
  807. <uni-tr>
  808. <uni-th align="center" v-for="(showItem,showIndex) in showList" :index="showIndex"
  809. :width="showItem.width">{{showItem.text}}</uni-th>
  810. </uni-tr>
  811. <uni-tr v-for="(item,index) in itemList" :key="index">
  812. <uni-td align="center" v-for="(showItem,showIndex) in showList" :index="showIndex"
  813. @click="goToProjectList(item,showItem.key)">
  814. {{item[showItem.key] ?? "--"}}
  815. </uni-td>
  816. </uni-tr>
  817. </uni-table>
  818. <view class="gap-bottom"></view>
  819. </view>
  820. <!-- 年度选择 -->
  821. <u-picker :show="yearShow" :defaultIndex="defaultIndex" :columns="yearColumns" @confirm="yearClose"
  822. @cancel="yearClose" @close="yearClose" closeOnClickOverlay></u-picker>
  823. <!-- 建设地点 -->
  824. <u-picker :show="jsddShow" :columns="jsddColumns" @confirm="jsddClose" @cancel="jsddClose" @close="jsddClose"
  825. closeOnClickOverlay></u-picker>
  826. <!-- 项目类型 -->
  827. <u-picker :show="xmlxShow" :columns="xmlxColumns" @confirm="xmlxClose" @cancel="xmlxClose" @close="xmlxClose"
  828. closeOnClickOverlay></u-picker>
  829. <!-- 项目性质 -->
  830. <u-picker :show="xmxzShow" :columns="xmxzColumns" @confirm="xmxzClose" @cancel="xmxzClose" @close="xmxzClose"
  831. closeOnClickOverlay></u-picker>
  832. <!-- 是否隐藏 -->
  833. <u-picker :show="hideShow" :columns="hideColumns" @confirm="hideClose" @cancel="hideClose" @close="hideClose"
  834. closeOnClickOverlay></u-picker>
  835. <!-- 行业分类 -->
  836. <u-picker :show="hyflShow" :columns="hyflColumns" @confirm="hyflClose" @cancel="hyflClose" @close="hyflClose"
  837. closeOnClickOverlay></u-picker>
  838. <!-- 亿元项目 -->
  839. <u-picker :show="yTypeShow" :columns="yTypeColumns" @confirm="yTypeClose" @cancel="yTypeClose" @close="yTypeClose"
  840. closeOnClickOverlay></u-picker>
  841. <!-- 取值模式 -->
  842. <u-picker :show="modeShow" :columns="modeColumns" @confirm="modeClose" @cancel="modeClose" @close="modeClose"
  843. closeOnClickOverlay></u-picker>
  844. <!-- 资金来源 -->
  845. <u-picker :show="zjlyShow" :columns="zjlyColumns" @confirm="zjlyClose" @cancel="zjlyClose" @close="zjlyClose"
  846. closeOnClickOverlay></u-picker>
  847. <!-- 同比/环比 -->
  848. <u-picker :show="yearOnYearShow" :columns="yearOnYearColumns" @confirm="yearOnYearClose" @cancel="yearOnYearClose"
  849. @close="yearOnYearClose" closeOnClickOverlay></u-picker>
  850. </view>
  851. </template>
  852. <style lang="scss" scoped>
  853. .search-btn {
  854. width: 98%;
  855. height: 84rpx;
  856. margin: 40rpx auto 26rpx;
  857. line-height: 84rpx;
  858. text-align: center;
  859. color: #FFFFFF;
  860. font-size: 36rpx;
  861. background: #1763E7;
  862. border-radius: 16rpx;
  863. }
  864. .card {
  865. padding-bottom: 60rpx;
  866. }
  867. .pie {
  868. height: 300rpx;
  869. margin: 0 auto 36rpx;
  870. background: #EAF0FA;
  871. border-radius: 40rpx;
  872. }
  873. .double-pie {
  874. min-height: 300rpx;
  875. margin: 0 auto 36rpx;
  876. background: #EAF0FA;
  877. border-radius: 40rpx;
  878. .double-pie-area {
  879. display: flex;
  880. width: 100%;
  881. height: 300rpx;
  882. .double-pie-item {
  883. width: 50%;
  884. height: 300rpx;
  885. }
  886. }
  887. .double-pie-description {
  888. display: flex;
  889. width: 100%;
  890. margin-bottom: 30rpx;
  891. .double-pie-descriptionItem {
  892. width: 50%;
  893. text-align: center;
  894. }
  895. }
  896. .double-pie-data {
  897. display: flex;
  898. width: 100%;
  899. min-height: 100rpx;
  900. padding-bottom: 20rpx;
  901. }
  902. .double-pie-textArea {
  903. width: 50%;
  904. }
  905. .double-pie-textItem {
  906. display: flex;
  907. justify-content: space-between;
  908. width: 100%;
  909. padding: 0 20rpx;
  910. box-sizing: border-box;
  911. font-size: 24rpx;
  912. color: #001643;
  913. .double-pie-project {
  914. flex: 1;
  915. font-weight: 500;
  916. text-align: right;
  917. margin-right: 20rpx;
  918. }
  919. .double-pie-name {
  920. flex: 1;
  921. }
  922. .double-pie-amt {
  923. flex: 1;
  924. font-weight: 500;
  925. text-align: right;
  926. }
  927. }
  928. }
  929. .line {
  930. width: 100%;
  931. height: 400rpx;
  932. margin: 0 auto 36rpx;
  933. background: #FFF;
  934. border-radius: 40rpx;
  935. overflow: hidden;
  936. }
  937. .swiper-item-content {
  938. height: 1200rpx;
  939. }
  940. ::v-deep .uni-table-scroll {
  941. height: auto;
  942. }
  943. ::v-deep .uni-table-th,
  944. .uni-table-td {
  945. padding: 0;
  946. }
  947. </style>