123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029 |
- <script setup>
- import {
- ref,
- reactive
- } from "vue";
- import {
- onLoad,
- } from "@dcloudio/uni-app";
- import {
- getJSDDlist,
- getXMLXlist,
- getHYFLlist,
- getZJLYlist,
- } from "@/api/work/projectInfo.js";
- import {
- getXMXZlist,
- } from "@/api/home.js";
- import {
- getIndustyRateValueData,
- getIndustyRateAmtData,
- getAreaRateData,
- getYearRateData
- } from "@/api/work/analysis.js";
- // 年度
- let yearShow = ref(false);
- let defaultIndex = ref([0]);
- let yearColumns = ref([
- ["2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012",
- "2013",
- "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025", "2026",
- "2027", "2028", "2029", "2030", "2031", "2032", "2033"
- ]
- ])
- const yearShowChoose = function() {
- yearShow.value = true;
- }
- const yearClose = function(e) {
- if (e) searchInfo.year = e.value[0];
- yearShow.value = false;
- }
- // 建设地点
- let jsddFull = [];
- let jsddColumns = ref([]);
- const getJSDD = function() {
- getJSDDlist().then(res => {
- jsddFull = res.data.list;
- jsddColumns.value = [res.data.list.map(item => item.value)];
- })
- };
- let jsddShow = ref(false);
- const jsddShowChoose = function() {
- jsddShow.value = true;
- }
- const jsddClose = function(e) {
- if (e) searchInfo.subjectId = e.value[0];
- jsddShow.value = false;
- }
- // 项目类型
- let xmlxFull = [];
- let xmlxColumns = ref([]);
- const getXMLX = function() {
- getXMLXlist().then(res => {
- xmlxFull = res.data.list;
- xmlxColumns.value = [res.data.list.map(item => item.value)];
- })
- };
- let xmlxShow = ref(false);
- const xmlxShowChoose = function() {
- xmlxShow.value = true;
- }
- const xmlxClose = function(e) {
- if (e) searchInfo.kind = e.value[0];
- xmlxShow.value = false;
- }
- // 项目性质
- let xmxzFull = [];
- let xmxzColumns = ref([]);
- const getXMXZ = () => {
- getXMXZlist().then(res => {
- xmxzFull = res.data.list;
- xmxzFull.unshift({
- key: null,
- value: "所有性质"
- });
- xmxzFull = xmxzFull.filter(item => item.value !== "储备项目");
- xmxzColumns.value = [xmxzFull.map(item => item.value)];
- })
- };
- let xmxzShow = ref(false);
- const xmxzShowChoose = () => {
- xmxzShow.value = true;
- }
- const xmxzClose = e => {
- if (e) searchInfo.propKind = e.value[0];
- xmxzShow.value = false;
- }
- // 是否隐藏
- let hideFull = [{
- key: null,
- value: "所有"
- }, {
- key: 1,
- value: "隐藏"
- }, {
- key: 0,
- value: "正常"
- }, ];
- let hideColumns = ref([
- ["所有", "隐藏", "正常"]
- ])
- let hideShow = ref(false);
- const hideShowChoose = function() {
- hideShow.value = true;
- }
- const hideClose = function(e) {
- if (e) searchInfo.isHide = e.value[0];
- hideShow.value = false;
- }
- // 行业分类
- let hyflFull = []
- let hyflColumns = ref([])
- const getHYFL = () => {
- getHYFLlist().then(res => {
- hyflFull = res.data.list;
- hyflFull.unshift({
- key: null,
- value: "所有分类"
- });
- hyflColumns.value = [res.data.list.map(item => item.value)];
- })
- }
- let hyflShow = ref(false)
- const hyflShowChoose = () => {
- hyflShow.value = true
- }
- const hyflClose = e => {
- if (e) searchInfo.hyfl = e.value[0];
- hyflShow.value = false
- }
- // 亿元项目
- let yTypeFull = [{
- key: null,
- value: "全部"
- },
- {
- key: 1,
- value: "亿元以下"
- },
- {
- key: 2,
- value: "1-5亿"
- },
- {
- key: 3,
- value: "5-10亿"
- },
- {
- key: 4,
- value: "10亿以上"
- },
- ]
- let yTypeColumns = ref([
- ["全部", "亿元以下", "1-5亿", "5-10亿", "10亿以上"]
- ])
- let yTypeShow = ref(false)
- const yTypeShowChoose = () => {
- yTypeShow.value = true
- }
- const yTypeClose = e => {
- if (e) searchInfo.yType = e.value[0];
- yTypeShow.value = false
- }
- // 取值模式
- let modeFull = [{
- key: 1,
- value: "实际值"
- },
- {
- key: 2,
- value: "预测值"
- }
- ]
- let modeColumns = ref([
- ["实际值", "预测值"]
- ])
- let modeShow = ref(false)
- const modeShowChoose = () => {
- modeShow.value = true
- }
- const modeClose = e => {
- if (e) searchInfo.mode = e.value[0];
- modeShow.value = false
- }
- // 资金来源
- let zjlyFull = []
- let zjlyColumns = ref([])
- const getZJLY = () => {
- getZJLYlist().then(res => {
- zjlyFull = res.data.list;
- zjlyFull.unshift({
- key: null,
- value: "所有来源"
- });
- zjlyColumns.value = [res.data.list.map(item => item.value)];
- })
- }
- let zjlyShow = ref(false)
- const zjlyShowChoose = () => {
- zjlyShow.value = true
- }
- const zjlyClose = e => {
- if (e) searchInfo.zjly = e.value[0];
- zjlyShow.value = false
- }
- // 同比/环比
- let yearOnYearFull = [{
- key: 1,
- value: "同比"
- }, {
- key: 2,
- value: "环比"
- }];
- let yearOnYearColumns = ref([
- ["同比", "环比"]
- ])
- let yearOnYearShow = ref(false);
- const yearOnYearShowChoose = function() {
- yearOnYearShow.value = true;
- }
- const yearOnYearClose = function(e) {
- if (e) searchInfo.kindType = e.value[0];
- yearOnYearShow.value = false;
- }
- // 页面主题
- let titleMark = null;
- let titleText = ref("");
- let titleEnum = {
- "industyRateValue": {
- text: "行业占比分析-数量",
- showArray: [{
- text: "行业分类",
- key: "title",
- width: "200rpx"
- }, {
- text: "项目数量",
- key: "num",
- width: "100rpx",
- through: true,
- }, {
- text: "占比(%)",
- key: "rage",
- width: "100rpx"
- }],
- emitFunction: function(data) {
- getIndustryRateValue(data);
- }
- },
- "industyRateAmt": {
- text: "行业占比分析-金额",
- showArray: [{
- text: "行业分类",
- key: "title",
- width: "200rpx"
- }, {
- text: "投资金额(万元)",
- key: "num",
- width: "100rpx",
- through: true,
- }, {
- text: "占比(%)",
- key: "rage",
- width: "100rpx"
- }],
- emitFunction: function(data) {
- getIndustryAmtValue(data);
- }
- },
- "areaRate": {
- text: "区县占比分析",
- showArray: [{
- text: "建设地点",
- key: "jsddName",
- width: "150rpx",
- through: true,
- },
- // {
- // text: "项目数",
- // key: "totalNum",
- // width: "150rpx",
- // },
- {
- text: "投资完成率(%)",
- key: "amtRate",
- width: "180rpx",
- through: true,
- }, {
- text: "开工率(%)",
- key: "beginRate",
- width: "150rpx",
- through: true,
- }
- ],
- emitFunction: function(data) {
- getAreaRateValue(data);
- }
- },
- "yearRate": {
- text: "年度投资分析",
- showArray: [{
- text: "月份",
- key: "strmonth",
- }, {
- text: "上年度投资(万元)",
- key: "amt_last1",
- }, {
- text: "本年度投资(万元)",
- key: "amt_cur",
- }, {
- text: "增速(%)",
- key: "num_bl",
- }],
- emitFunction: function(data) {
- getYearRateValue(data)
- }
- },
- };
- // 展示列表
- let showList = ref([]);
- const combineshowList = () => {
- let chooseList = titleEnum[titleMark].showArray;
- if (titleMark === "yearRate") {
- if (searchInfo.kindType === "同比") {
- chooseList = [{
- text: "月份",
- key: "strmonth",
- width: "100rpx"
- }, {
- text: "上年度投资(万元)",
- key: "amt_last1",
- width: "200rpx"
- }, {
- text: "本年度投资(万元)",
- key: "amt_cur",
- width: "200rpx"
- }, {
- text: "增速(%)",
- key: "num_bl",
- width: "100rpx"
- }]
- } else { //环比
- chooseList = [{
- text: "月份",
- key: "strmonth",
- width: "100rpx"
- }, {
- text: "上月度投资(万元)",
- key: "amt_last1",
- width: "200rpx"
- }, {
- text: "本月度投资(万元)",
- key: "amt_cur",
- width: "200rpx"
- }, {
- text: "增速(%)",
- key: "num_bl",
- width: "100rpx"
- }]
- }
- }
- let tempArr = [];
- for (let i in chooseList) {
- tempArr.push(Object.assign({
- value: null
- }, chooseList[i]));
- }
- showList.value = tempArr;
- }
- // 搜索内容
- let listTotal = ref(0);
- let itemList = ref([]);
- let searchInfo = reactive({
- year: null, //年度
- subjectId: null, //建设地点
- kind: null, //项目类型
- propKind: null, //项目性质
- isHide: "所有", //是否隐藏,
- hyfl: null, //行业分类,
- yType: null, //亿元项目
- mode: "实际值", //取值模式,
- kindType: "同比", //同比/环比
- });
- const getList = () => {
- let params = {
- year: searchInfo.year, //年度
- subjectId: jsddFull.find(item => item.value === searchInfo.subjectId)?.key, //建设地点
- kind: xmlxFull.find(item => item.value === searchInfo.kind)?.key, //项目类型
- propKind: xmxzFull.find(item => item.value === searchInfo.propKind)?.key, //项目性质
- isHide: hideFull.find(item => item.value === searchInfo.isHide)?.key, //是否隐藏
- hyfl: hyflFull.find(item => item.value === searchInfo.hyfl)?.key, //行业分类
- yType: yTypeFull.find(item => item.value === searchInfo.yType)?.key, //亿元项目
- mode: modeFull.find(item => item.value === searchInfo.mode)?.key, //取值模式
- zjly: zjlyFull.find(item => item.value === searchInfo.zjly)?.key, //资金来源
- kindType: yearOnYearFull.find(item => item.value === searchInfo.kindType)?.key, //同比/环比
- };
- if (titleMark === "yearRate") combineshowList()
- titleEnum[titleMark].emitFunction(params);
- }
- // 行业占比分析-数量
- const getIndustryRateValue = params => {
- getIndustyRateValueData(params).then(res => {
- itemList.value = res.data.list;
- listTotal.value = res.data.list.length;
- createPieData(res.data.list);
- })
- }
- // 行业占比分析-金额
- const getIndustryAmtValue = params => {
- getIndustyRateAmtData(params).then(res => {
- itemList.value = res.data.list;
- listTotal.value = res.data.list.length;
- createPieData(res.data.list);
- })
- }
- // 区县占比分析
- const getAreaRateValue = params => {
- getAreaRateData(params).then(res => {
- itemList.value = res.data.list;
- listTotal.value = res.data.list.length;
- createPieData(res.data.list, "jsddName", "totalNum", true);
- })
- }
- // 年度投资分析
- const getYearRateValue = params => {
- getYearRateData(params).then(res => {
- itemList.value = res.data.list;
- listTotal.value = res.data.list.length;
- createLineData(res.data.list);
- })
- }
- // 穿透
- const goToProjectList = (item, keyword) => {
- // 判断是否有操作
- let chooseList = titleEnum[titleMark].showArray;
- let haveThroughOption = chooseList.find(item => item.key === keyword)?.through;
- if (!haveThroughOption) return;
- let params = {
- year: searchInfo.year, //年度
- subjectId: jsddFull.find(item => item.value === searchInfo.subjectId)?.key, //建设地点
- kind: xmlxFull.find(item => item.value === searchInfo.kind)?.key, //项目类型
- propKind: xmxzFull.find(item => item.value === searchInfo.propKind)?.key, //项目性质
- isHide: hideFull.find(item => item.value === searchInfo.isHide)?.key, //是否隐藏
- zbCheck: 1
- };
- Object.keys(params).forEach((key) => {
- let value = params[key];
- if ((value ?? "") === "") delete params[key]
- })
- if (titleMark === "industyRateValue" || titleMark === "industyRateAmt") {
- params.indusKind = item.indusKind;
- params.queryType = 0;
- }
- if (titleMark === "areaRate") {
- params.subjectId = item.subjectId;
- params.queryType = 0;
- }
- let url = "/pages/analysis/projectList/index?";
- for (let i in params) {
- let item = null
- if (!((params[i] ?? "") === "")) {
- item = `${i}=${params[i]}&`;
- } else {
- item = `${i}=&`;
- }
- url = url += item;
- };
- uni.navigateTo({
- url
- })
- }
- // 饼图
- let showPie = ref(false);
- const pieOpts = {
- color: ["#90B5F4", "#6497EE", "#1869F6", "#FF8229", "#FFAC71"],
- padding: [0, 5, 0, 5],
- enableScroll: false,
- legend: {
- show: false
- },
- extra: {
- pie: {
- activeOpacity: 0.5,
- activeRadius: 10,
- offsetAngle: 0,
- border: false,
- offsetAngle: -90
- }
- }
- }
- let pieChartData = ref({
- series: [{
- data: []
- }]
- })
- const createPieData = (list, name = "title", unit = "num", isDoublePie = false) => {
- // 饼状图数据
- let pieList = []
- for (let i in list) {
- pieList.push({
- "name": list[i][name],
- "value": list[i][unit] ?? 0,
- "labelShow": false
- })
- }
- pieChartData.value.series[0].data = pieList;
- if (isDoublePie) {
- createDoublePieData(list);
- } else {
- showPie.value = true;
- }
- }
- // 双饼
- let itemListOrderByAmt = ref([])
- let showDoublePie = ref(false);
- const pieDoubleOpts = {
- color: ["#90B5F4", "#6497EE", "#1869F6", "#FF8229", "#FFAC71"],
- padding: [0, 5, 0, 5],
- enableScroll: false,
- legend: {
- show: false
- },
- extra: {
- pie: {
- activeOpacity: 0.5,
- activeRadius: 10,
- offsetAngle: 0,
- border: false,
- offsetAngle: -90,
- customRadius: 50,
- }
- }
- }
- let doublePieChartData = ref({
- series: [{
- data: []
- }]
- })
- const createDoublePieData = list => {
- itemListOrderByAmt.value = JSON.parse(JSON.stringify(itemList.value));
- itemListOrderByAmt.value.sort(sortByValue('amt', -1));
- let pieList = [];
- for (let i in itemListOrderByAmt.value) {
- pieList.push({
- "name": itemListOrderByAmt.value[i].jsddName,
- "value": itemListOrderByAmt.value[i].amt ?? 0,
- "labelShow": false
- })
- }
- doublePieChartData.value.series[0].data = pieList;
- showDoublePie.value = true;
- }
- const sortByValue = (attr, rev) => {
- if (rev == undefined) {
- rev = 1
- } else {
- (rev) ? 1: -1;
- }
- return function(a, b) {
- a = a[attr];
- b = b[attr];
- if (a < b) {
- return rev * -1
- }
- if (a > b) {
- return rev * 1
- }
- return 0;
- }
- }
- // 折线图
- let showLine = ref(false);
- const LineOpts = {
- color: ["#1869F6", "#000"],
- touchMoveLimit: 24,
- enableScroll: true,
- dataLabel: false,
- legend: {
- show: false
- },
- xAxis: {
- disableGrid: true,
- scrollShow: true,
- itemCount: 6,
- },
- yAxis: {
- showTitle: true,
- gridType: "dash",
- data: [{
- title: "增速(%)",
- }]
- },
- extra: {
- column: {
- type: "group",
- width: 14,
- barBorderRadius: [12, 12, 12, 12],
- activeBgColor: "#000000",
- activeBgOpacity: 0.08,
- },
- line: {
- activeType: "none"
- },
- markLine: {
- // type: "dash",
- data: [{
- value: 0,
- // labelText: "0",
- lineColor: "#000"
- }]
- }
- }
- }
- let LineChartData = ref({
- categories: [],
- series: [{
- name: "增速(%)",
- data: []
- }]
- })
- const createLineData = list => {
- let categoriesList = []
- let seriesList = []
- for (let i in list) {
- categoriesList.push(list[i].strmonth + "月")
- seriesList.push(list[i].num_bl)
- }
- LineChartData.value.categories = categoriesList.length > 0 ? categoriesList : ["无数据"]
- LineChartData.value.series[0].data = seriesList;
- showLine.value = true;
- }
- // 取整
- const filterInt = value => {
- let expectNull = Number(value ?? 0);
- return parseInt(expectNull);
- }
- onLoad(options => {
- // 标题
- titleMark = options.type;
- titleText.value = titleEnum[titleMark].text;
- // 列表
- combineshowList();
- // 年度
- let now = new Date();
- searchInfo.year = now.getFullYear();
- defaultIndex.value = [searchInfo.year - 2000];
- // 建设地点
- getJSDD();
- // 项目类型
- getXMLX();
- // 项目性质
- getXMXZ();
- // 页面列表
- getList();
- if (titleMark === "yearRate") {
- // 行业分类
- getHYFL();
- // 资金来源
- getZJLY();
- }
- })
- </script>
- <template>
- <view class="container">
- <page-title>{{titleText}}</page-title>
- <view class="cards-list">
- <view class="card only-card">
- <!-- 年度 -->
- <view class="card-item first-card-item" @click="yearShowChoose()">
- <view class="card-item-name">年度</view>
- <view class="card-item-description">
- <view v-if="searchInfo.year">{{searchInfo.year}}</view>
- <view v-else class="remind-text">请选择年度</view>
- <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <!-- 建设地点 -->
- <view class="card-item" @click="jsddShowChoose()">
- <view class="card-item-name">建设地点</view>
- <view class="card-item-description">
- <view v-if="searchInfo.subjectId">{{searchInfo.subjectId}}</view>
- <view v-else class="remind-text">请选择地点</view>
- <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <!-- 项目类型 -->
- <view class="card-item" @click="xmlxShowChoose()">
- <view class="card-item-name">项目类型</view>
- <view class="card-item-description">
- <view v-if="searchInfo.kind">{{searchInfo.kind}}</view>
- <view v-else class="remind-text">请选择类型</view>
- <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <!-- 项目性质 -->
- <view class="card-item" @click="xmxzShowChoose()">
- <view class="card-item-name">项目性质</view>
- <view class="card-item-description">
- <view v-if="searchInfo.propKind">{{searchInfo.propKind}}</view>
- <view v-else class="remind-text">请选择性质</view>
- <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <!-- 行业分类 -->
- <view class="card-item" v-if="titleMark === 'yearRate'" @click="hyflShowChoose()">
- <view class="card-item-name">行业分类</view>
- <view class="card-item-description">
- <view v-if="searchInfo.hyfl">{{searchInfo.hyfl}}</view>
- <view v-else class="remind-text">请选择类型</view>
- <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <!-- 资金来源 -->
- <view class="card-item" v-if="titleMark === 'yearRate'" @click="zjlyShowChoose()">
- <view class="card-item-name">资金来源</view>
- <view class="card-item-description">
- <view v-if="searchInfo.zjly">{{searchInfo.zjly}}</view>
- <view v-else class="remind-text">请选择来源</view>
- <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <!-- 亿元项目 -->
- <view class="card-item" v-if="titleMark === 'yearRate'" @click="yTypeShowChoose()">
- <view class="card-item-name">亿元项目</view>
- <view class="card-item-description">
- <view v-if="searchInfo.yType">{{searchInfo.yType}}</view>
- <view v-else class="remind-text">请选择</view>
- <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <!-- 是否隐藏 -->
- <view class="card-item" @click="hideShowChoose()">
- <view class="card-item-name">是否隐藏</view>
- <view class="card-item-description">
- <view v-if="searchInfo.isHide">{{searchInfo.isHide}}</view>
- <view v-else class="remind-text">请选择</view>
- <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <!-- 取值模式 -->
- <view class="card-item" v-if="titleMark === 'yearRate'" @click="modeShowChoose()">
- <view class="card-item-name">取值模式</view>
- <view class="card-item-description">
- <view v-if="searchInfo.mode">{{searchInfo.mode}}</view>
- <view v-else class="remind-text">请选择模式</view>
- <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <!-- 同比/环比 -->
- <view class="card-item" v-if="titleMark === 'yearRate'" @click="yearOnYearShowChoose()">
- <view class="card-item-name">同比/环比</view>
- <view class="card-item-description">
- <view v-if="searchInfo.kindType">{{searchInfo.kindType}}</view>
- <view v-else class="remind-text">请选择模式</view>
- <u-icon name="arrow-right" color="#343437" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- </view>
- <view class="search-btn" @click="getList()">确定</view>
- <view class="double-pie" v-if="showDoublePie">
- <view class="double-pie-area">
- <view class="double-pie-item">
- <qiun-data-charts type="pie" :opts="pieDoubleOpts" :chartData="pieChartData" tooltipFormat="tooltipDemo2" />
- </view>
- <view class="double-pie-item">
- <qiun-data-charts type="pie" :opts="pieDoubleOpts" :chartData="doublePieChartData"
- tooltipFormat="tooltipDemo3" />
- </view>
- </view>
- <view class="double-pie-description">
- <view class="double-pie-descriptionItem">项目数</view>
- <view class="double-pie-descriptionItem">实际投资金额</view>
- </view>
- <view class="double-pie-data">
- <view class="double-pie-textArea">
- <view class="double-pie-textItem" v-for="(item,index) in itemList" :key="index">
- <view class="double-pie-name">{{item.jsddName ?? "--"}}</view>
- <view class="double-pie-project">{{item.totalNum ?? "--"}}个</view>
- </view>
- </view>
- <view class="double-pie-textArea">
- <view class="double-pie-textItem" v-for="(item,index) in itemListOrderByAmt" :key="index">
- <view class="double-pie-name">{{item.jsddName ?? "--"}}</view>
- <view class="double-pie-amt">{{filterInt(item.amt)}}万元</view>
- </view>
- </view>
- </view>
- </view>
- <view class="pie" v-if="showPie">
- <qiun-data-charts v-if="titleMark==='industyRateValue' || titleMark==='areaRate'" type="pie" :opts="pieOpts"
- :chartData="pieChartData" tooltipFormat="tooltipDemo2" />
- <qiun-data-charts v-if="titleMark==='industyRateAmt'" type="pie" :opts="pieOpts" :chartData="pieChartData"
- tooltipFormat="tooltipDemo3" />
- </view>
- <view class="line" v-if="showLine">
- <qiun-data-charts type="line" :opts="LineOpts" :ontouch="true" :chartData="LineChartData" />
- </view>
- <uni-table stripe border emptyText="暂无更多数据">
- <uni-tr>
- <uni-th align="center" v-for="(showItem,showIndex) in showList" :index="showIndex"
- :width="showItem.width">{{showItem.text}}</uni-th>
- </uni-tr>
- <uni-tr v-for="(item,index) in itemList" :key="index">
- <uni-td align="center" v-for="(showItem,showIndex) in showList" :index="showIndex"
- @click="goToProjectList(item,showItem.key)">
- {{item[showItem.key] ?? "--"}}
- </uni-td>
- </uni-tr>
- </uni-table>
- <view class="gap-bottom"></view>
- </view>
- <!-- 年度选择 -->
- <u-picker :show="yearShow" :defaultIndex="defaultIndex" :columns="yearColumns" @confirm="yearClose"
- @cancel="yearClose" @close="yearClose" closeOnClickOverlay></u-picker>
- <!-- 建设地点 -->
- <u-picker :show="jsddShow" :columns="jsddColumns" @confirm="jsddClose" @cancel="jsddClose" @close="jsddClose"
- closeOnClickOverlay></u-picker>
- <!-- 项目类型 -->
- <u-picker :show="xmlxShow" :columns="xmlxColumns" @confirm="xmlxClose" @cancel="xmlxClose" @close="xmlxClose"
- closeOnClickOverlay></u-picker>
- <!-- 项目性质 -->
- <u-picker :show="xmxzShow" :columns="xmxzColumns" @confirm="xmxzClose" @cancel="xmxzClose" @close="xmxzClose"
- closeOnClickOverlay></u-picker>
- <!-- 是否隐藏 -->
- <u-picker :show="hideShow" :columns="hideColumns" @confirm="hideClose" @cancel="hideClose" @close="hideClose"
- closeOnClickOverlay></u-picker>
- <!-- 行业分类 -->
- <u-picker :show="hyflShow" :columns="hyflColumns" @confirm="hyflClose" @cancel="hyflClose" @close="hyflClose"
- closeOnClickOverlay></u-picker>
- <!-- 亿元项目 -->
- <u-picker :show="yTypeShow" :columns="yTypeColumns" @confirm="yTypeClose" @cancel="yTypeClose" @close="yTypeClose"
- closeOnClickOverlay></u-picker>
- <!-- 取值模式 -->
- <u-picker :show="modeShow" :columns="modeColumns" @confirm="modeClose" @cancel="modeClose" @close="modeClose"
- closeOnClickOverlay></u-picker>
- <!-- 资金来源 -->
- <u-picker :show="zjlyShow" :columns="zjlyColumns" @confirm="zjlyClose" @cancel="zjlyClose" @close="zjlyClose"
- closeOnClickOverlay></u-picker>
- <!-- 同比/环比 -->
- <u-picker :show="yearOnYearShow" :columns="yearOnYearColumns" @confirm="yearOnYearClose" @cancel="yearOnYearClose"
- @close="yearOnYearClose" closeOnClickOverlay></u-picker>
- </view>
- </template>
- <style lang="scss" scoped>
- .search-btn {
- width: 98%;
- height: 84rpx;
- margin: 40rpx auto 26rpx;
- line-height: 84rpx;
- text-align: center;
- color: #FFFFFF;
- font-size: 36rpx;
- background: #1763E7;
- border-radius: 16rpx;
- }
- .card {
- padding-bottom: 60rpx;
- }
- .pie {
- height: 300rpx;
- margin: 0 auto 36rpx;
- background: #EAF0FA;
- border-radius: 40rpx;
- }
- .double-pie {
- min-height: 300rpx;
- margin: 0 auto 36rpx;
- background: #EAF0FA;
- border-radius: 40rpx;
- .double-pie-area {
- display: flex;
- width: 100%;
- height: 300rpx;
- .double-pie-item {
- width: 50%;
- height: 300rpx;
- }
- }
- .double-pie-description {
- display: flex;
- width: 100%;
- margin-bottom: 30rpx;
- .double-pie-descriptionItem {
- width: 50%;
- text-align: center;
- }
- }
- .double-pie-data {
- display: flex;
- width: 100%;
- min-height: 100rpx;
- padding-bottom: 20rpx;
- }
- .double-pie-textArea {
- width: 50%;
- }
- .double-pie-textItem {
- display: flex;
- justify-content: space-between;
- width: 100%;
- padding: 0 20rpx;
- box-sizing: border-box;
- font-size: 24rpx;
- color: #001643;
- .double-pie-project {
- flex: 1;
- font-weight: 500;
- text-align: right;
- margin-right: 20rpx;
- }
- .double-pie-name {
- flex: 1;
- }
- .double-pie-amt {
- flex: 1;
- font-weight: 500;
- text-align: right;
- }
- }
- }
- .line {
- width: 100%;
- height: 400rpx;
- margin: 0 auto 36rpx;
- background: #FFF;
- border-radius: 40rpx;
- overflow: hidden;
- }
- .swiper-item-content {
- height: 1200rpx;
- }
- ::v-deep .uni-table-scroll {
- height: auto;
- }
- ::v-deep .uni-table-th,
- .uni-table-td {
- padding: 0;
- }
- </style>
|