12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340 |
- <script setup>
- import {
- ref
- } from 'vue';
- import {
- onLoad,
- onPullDownRefresh,
- onReachBottom,
- onPageScroll
- } from "@dcloudio/uni-app";
- import {
- getProjectInfoList,
- getAmtCount
- } from "@/api/work/projectInfo.js";
- import {
- addFocus,
- cancelFocus
- } from "@/api/work/focus.js";
- import {
- getInfo,
- } from "@/api/login.js"
- import {
- getJSDDlist,
- getXMLXlist,
- getHYFLlist,
- } from "@/api/work/projectInfo.js"
- import {
- getXMXZlist,
- } from "@/api/home.js"
- import store from '@/store'
- import {
- timeFormat
- } from "@/utils/timeFormatter.js"
- function backToBefore() {
- uni.reLaunch({
- url: "/pages/index"
- });
- };
- let scrollTop = ref(0)
- let loading = ref(true)
- // 参数
- let searchInfo = ref({
- pageNo: 1,
- pageSize: 10,
- beginDateStart: null,
- beginDateEnd: null,
- light: ''
- })
- // tabs
- let tabsCurrent = ref(0);
- let lightList = [{
- name: "红灯项目"
- }, {
- name: "黄灯项目"
- }]
- const lightChange = e => {
- if (e.name === "黄灯项目") {
- searchInfo.value.light = 1;
- defaultCurrent.value = 1;
- } else {
- searchInfo.value.light = 2;
- defaultCurrent.value = 0;
- };
- }
- // swiper
- let defaultCurrent = ref(0);
- const chgangeSwiperItem = function(e) {
- tabsCurrent.value = e.detail.current;
- searchInfo.value.light = e.detail.current === 0 ? 2 : 1;
- searchInfo.value.pageNo = 1;
- projectList.value = [];
- moreListFlag = true;
- firstGetCount = true;
- getList();
- }
- const ReachBottom = e => {
- if (!moreListFlag) {
- return uni.showToast({
- title: "已经到底了。",
- icon: "none",
- duration: 2000
- })
- }
- searchInfo.value.pageNo++;
- getList();
- }
- // 触底加载flag
- let moreListFlag = true
- // 获取列表
- let projectList = ref([]);
- let listTotal = ref(0);
- let redTotal = ref(0);
- let greenTotal = ref(0);
- let yellowTotal = ref(0);
- function getList(params) {
- if (searchInfo.value.pageNo == 1) loading.value = true;
- if (firstGetCount) getAmtCountValue(searchInfo.value);
- getProjectInfoList(searchInfo.value).then(res => {
- console.log(res);
- loading.value = false
- projectList.value = projectList.value.concat(res.data.list);
- listTotal.value = res.data.total;
- redTotal.value = res.data.redNum;
- greenTotal.value = res.data.greenNum;
- yellowTotal.value = res.data.yellowNum;
- if (res.data.total == searchInfo.value.pageNo * searchInfo.value.pageSize - (10 - res.data.list
- .length)) {
- moreListFlag = false;
- }
- console.log();
- }).catch(() => {
- loading.value = false
- })
- }
- function goToDetail(id, subName) {
- uni.navigateTo({
- url: `/pages/projectInfo/detail/index?id=${id}&subName=${subName}`
- })
- }
- function goToPage(url) {
- uni.navigateTo({
- url
- })
- }
- function goToReport(type, subId, subName) {
- if (type === 'wtdb') {
- uni.navigateTo({
- url: `/pages/problemSupervision/index?type=${type}&subId=${subId}&subName=${subName}`
- })
- } else if (type === 'qtldjbm') {
- uni.navigateTo({
- url: `/pages/leadersList/index?type=${type}&subId=${subId}&subName=${subName}`
- })
- } else if (type === 'xcyx') {
- uni.navigateTo({
- url: `/pages/projectImageAndVideo/index?type=${type}&subId=${subId}&subName=${subName}`
- })
- } else if (type === 'more') {
- uni.navigateTo({
- url: `/pages/morePage/index?type=${type}&subId=${subId}&subName=${subName}`
- })
- } else {
- uni.navigateTo({
- url: `/pages/projectInfo/report/index?type=${type}&subId=${subId}&subName=${subName}`
- })
- }
- }
- // 折叠/展开
- const changeFoldItem = (status, id) => {
- let item = projectList.value.find(item => item.id === id);
- item.unfold = status;
- }
- // 收藏/取消
- function changeFocus(id, status) {
- let item = projectList.value.find(item => item.id === id);
- if (status) {
- cancelFocus({
- subId: id
- }).then(res => {
- if (res.code === 200) {
- item.isAttention = 0;
- }
- }).catch(() => {
- uni.showToast({
- title: "更改收藏状态失败。",
- icon: "none",
- duration: 2000
- })
- })
- } else {
- addFocus({
- subId: id
- }).then(res => {
- if (res.code === 200) {
- item.isAttention = 1;
- }
- }).catch(() => {
- uni.showToast({
- title: "更改收藏状态失败。",
- icon: "none",
- duration: 2000
- })
- })
- }
- }
- // 选择年
- let projectYear = ref(null);
- 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) {
- projectYear.value = e.value[0];
- searchInfo.value.beginDateStart = projectYear.value + "/01/01";
- searchInfo.value.beginDateEnd = projectYear.value + "/12/31";
- // 获取最新数据
- searchInfo.value.pageNo = 1;
- projectList.value = [];
- moreListFlag = true;
- getList();
- }
- yearShow.value = false;
- }
- let seachFalg = ref(true)
- // 统计
- let countList = ref([{
- title: "年度计划投资(万元)",
- key: "sumYearAmt",
- value: 0,
- color: ""
- }, {
- title: "全年占比",
- key: "yearRt",
- value: 0,
- color: "",
- isRate: true,
- }, {
- title: "当月完成金额(万元)",
- key: "sumMonthAmtSj",
- value: 0,
- color: "count-special-value"
- }, {
- title: "当月占比",
- key: "monthRt",
- value: 0,
- color: "count-special-value",
- isRate: true,
- }]);
- let firstGetCount = true;
- const getAmtCountValue = paramsOrginal => {
- getAmtCount(paramsOrginal).then(res => {
- firstGetCount = false
- for (let i in countList.value) {
- countList.value[i].value = res.data[countList.value[i].key] ?? 0;
- }
- })
- };
- //是否展开筛选条件
- let isUnfold = ref(false)
- //投资分析帅选条件
- let investmentAnalysisFrom = ref({
- kind: ''
- })
- let cardCurrut = ref(0)
- function onChangeCard(e) {
- if (cardCurrut.value == e) {
- projectList.value[cardCurrut.value].isOpen = !projectList.value[cardCurrut.value].isOpen
- } else {
- projectList.value[cardCurrut.value].isOpen = false
- projectList.value[e].isOpen = true
- cardCurrut.value = e
- }
- }
- let pageForm = ref({
- beginDateStart: null,
- beginDateEnd: null,
- kind: null,
- indusKind: null,
- propKind: null,
- subjectId: null,
- status: null,
- subName: null,
- startAmt: null,
- endAmt: null,
- isHide: null,
- light: ['红灯项目', '黄灯项目'],
- })
- // ====================================选择开始时间
- let beginDateStart = ref(null)
- let beginTimeShow = ref(false)
- function showBeginTimeChoose() {
- beginTimeShow.value = true
- }
- function beginTimeClose(e) {
- if (e) {
- let time = timeFormat(e.value)
- pageForm.value.beginDateStart = time
- }
- beginTimeShow.value = false
- }
- // ====================================选择结束时间
- let beginDateEnd = ref(null)
- let endTimeShow = ref(false)
- function showEndTimeChoose() {
- endTimeShow.value = true
- }
- function endTimeClose(e) {
- if (e) {
- let time = timeFormat(e.value)
- pageForm.value.beginDateEnd = time
- }
- endTimeShow.value = false
- }
- // ====================================选择项目类型
- let kindShow = ref(false);
- let kindColumns = ref([]);
- function showKindChoose() {
- kindShow.value = true
- }
- function kindClose(e) {
- if (e) pageForm.value.kind = e.value[0];
- kindShow.value = false;
- }
- let kindFull = [];
- const getXMLX = function() {
- getXMLXlist().then(res => {
- kindFull = res.data.list;
- kindFull.unshift({
- key: null,
- value: "所有类型"
- });
- kindColumns.value = [res.data.list.map(item => item.value)];
- })
- };
- // ====================================选择行业分类
- let industKindOrgin = []
- let IndustKindList = ref([])
- let IndustKindShow = ref(false)
- function showIndustKindChoose() {
- IndustKindShow.value = true
- }
- function IndustKindClose(e) {
- if (e) pageForm.value.indusKind = e.value[0];
- IndustKindShow.value = false
- }
- // ====================================选择行业状态
- // let statusList = ref([
- // ["请选择", "暂存", "项目申报", "待审批", "审批中", "核准备案中", "计划编制", "待开工", "施工中", "年度竣工", "不同意", "已竣工"]
- // ])
- let statusList = ref([
- ["请选择", "暂存", "项目前期", "待开工", "施工中", "暂停施工", "已竣工"]
- ])
- let statusShow = ref(false)
- function showStatusChoose() {
- statusShow.value = true
- }
- function statusClose(e) {
- if (e) pageForm.value.status = e.value[0];
- statusShow.value = false;
- }
- // ====================================选择隐藏状态
- let isHideNameList = ref([
- ["请选择",
- "正常",
- "隐藏"
- ]
- ])
- let isHideNameShow = ref(false)
- function showIsHideNameChoose() {
- isHideNameShow.value = true
- }
- function isHideNameClose(e) {
- if (e) pageForm.value.isHideName = e.value[0];
- isHideNameShow.value = false;
- }
- // =====================================地点
- let areaShow = ref(false);
- let areaColumns = ref([]);
- const showAreaChoose = function() {
- areaShow.value = true;
- }
- const areaClose = function(e) {
- if (e) pageForm.value.subjectId = e.value[0];
- areaShow.value = false;
- }
- let jsddFull = [];
- const getJSDD = function() {
- getJSDDlist().then(res => {
- jsddFull = res.data.list;
- jsddFull.push({
- key: null,
- value: "所有地区"
- });
- areaColumns.value = [res.data.list.map(item => item.value)];
- areaColumns.value[0].unshift("所有地区");
- })
- };
- // =====================================性质
- let xmxzShow = ref(false);
- let xmxzColumns = ref([]);
- const showXmxzChoose = function() {
- xmxzShow.value = true;
- }
- const xmxzClose = function(e) {
- if (e) pageForm.value.propKind = e.value[0];
- xmxzShow.value = false;
- }
- let xmxzFull = [];
- const getXMXZ = function() {
- getXMXZlist().then(res => {
- xmxzFull = res.data.list;
- xmxzFull.unshift({
- key: null,
- value: "所有性质"
- });
- xmxzColumns.value = [res.data.list.map(item => item.value)];
- })
- };
- // =====================================灯
- let lightShow = ref(false);
- const kindUnit = store.getters && store.getters.kindUnit;
- function judgeLightShow() {
- if ((kindUnit ?? '') === '') {
- // 为空就请求一下
- getInfo().then(res => {
- lightShow.value = res?.data?.user?.kindUnit === "1";
- })
- } else {
- lightShow.value = kindUnit === "1";
- }
- }
- function confirmParams() {
- // let statusObj = {
- // "请选择": "",
- // "暂存": "0",
- // "项目申报": "1",
- // "待审批": "2",
- // "审批中": "3",
- // "核准备案中": "4",
- // "计划编制": "5",
- // "待开工": "6",
- // "施工中": "7",
- // "不同意": "8",
- // "年度竣工": "9",
- // "已竣工": "A"
- // }
- let statusObj = {
- "请选择": "",
- "暂存": "0",
- "项目前期": "1",
- "待开工": "6",
- "施工中": "7",
- "暂停施工": "8",
- //"年度竣工": "9",
- "已竣工": "A"
- }
- let isHideNameObj = {
- "请选择": "",
- "正常": "0",
- "隐藏": "1",
- }
- let lightObj = {
- "绿灯项目": "0",
- "黄灯项目": "1",
- "红灯项目": "2"
- }
- let lightText = ""
- for (let i in pageForm.value.light) {
- lightText += lightObj[pageForm.value.light[i]] + ","
- }
- if (lightText.length > 0) lightText = lightText.substr(0, lightText.length - 1);
- let paramsData = {
- "beginDateStart": pageForm.value.beginDateStart,
- "beginDateEnd": pageForm.value.beginDateEnd,
- "kind": kindFull.find(item => item.value === pageForm.value.kind)?.key,
- "indusKind": industKindOrgin.find(item => item.value === pageForm.value.indusKind)?.key,
- "subjectId": jsddFull.find(item => item.value === pageForm.value.subjectId)?.key,
- "propKind": xmxzFull.find(item => item.value === pageForm.value.propKind)?.key,
- "status": statusObj[pageForm.value.status],
- "subName": pageForm.value.subName,
- "startAmt": pageForm.value.startAmt,
- "endAmt": pageForm.value.endAmt,
- "isHide": isHideNameObj[pageForm.value.isHideName],
- "light": lightText
- }
- searchInfo.value = Object.assign(searchInfo.value, paramsData);
- searchInfo.value.pageNo = 1;
- projectList.value = [];
- listTotal.value = 0;
- moreListFlag = true;
- console.log(searchInfo.value, '请求参数');
- getList();
- }
- onLoad(async () => {
- let now = new Date();
- let year = now.getFullYear();
- // 开始时间
- searchInfo.value.beginDateStart = beginDateStart.value = pageForm.value.beginDateStart = year +
- "/01/01";
- // 结束时间
- searchInfo.value.beginDateEnd = beginDateEnd.value = pageForm.value.beginDateEnd = year + "/12/31";
- // 行业分类列表
- const res = await getHYFLlist()
- industKindOrgin = res.data.list
- let titleList = res.data.list.map(item => item.value)
- titleList.unshift("请选择")
- IndustKindList.value = [titleList]
- getJSDD(); // 建设地点列表
- getXMXZ(); // 项目性质列表
- getXMLX(); // 项目类型列表
- judgeLightShow()
- console.log(searchInfo.value);
- confirmParams()
- });
- onPageScroll((e) => {
- scrollTop.value = e.scrollTop
- })
- onPullDownRefresh(() => {
- let year = projectYear.value = new Date().getFullYear();
- searchInfo.value.beginDateStart = year + "/01/01";
- searchInfo.value.beginDateEnd = year + "/12/31";
- searchInfo.value.pageNo = 1;
- projectList.value = [];
- moreListFlag = true;
- firstGetCount = true;
- try {
- getList();
- } finally {
- uni.stopPullDownRefresh()
- }
- })
- function searchClick() {
- goToPage('/pages/projectInfo/search/index')
- }
- onReachBottom(() => {
- if (!moreListFlag) {
- return uni.showToast({
- title: "已经到底了。",
- icon: "none",
- duration: 2000
- })
- }
- searchInfo.value.pageNo++;
- getList();
- })
- </script>
- <template>
- <view class="container">
- <page-title @searchClick='searchClick'>红黄灯项目({{listTotal}})</page-title>
- <view class="stats-layer-next">
- <view class="condition-btn">
- <view class="text">
- 2024
- </view>
- <image src="../../static/images/interArrow.svg" mode="" :class="isUnfold ? 'open-btn':''"
- @click="isUnfold = !isUnfold">
- </image>
- </view>
- <view class="condition-from" :style="isUnfold ? {height:'800rpx'} :''">
- <view class="item">
- <view class="item-label">开始日期</view>
- <view class="item-text" @click="showBeginTimeChoose()">
- <view v-if="pageForm.beginDateStart">{{pageForm.beginDateStart}}</view>
- <view v-else class="text">请选择开始日期</view>
- <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <view class="item">
- <view class="item-label">结束日期</view>
- <view class="item-text" @click="showEndTimeChoose()">
- <view v-if="pageForm.beginDateEnd">{{pageForm.beginDateEnd}}</view>
- <view v-else class="text">请选择结束日期</view>
- <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <view class="item">
- <view class="item-label">项目类型</view>
- <view class="item-text" @click="showKindChoose()">
- <view v-if="pageForm.kind">{{pageForm.kind}}</view>
- <view v-else class="text">请选择类型</view>
- <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <view class="item">
- <view class="item-label">项目性质</view>
- <view class="item-text" @click="showXmxzChoose()">
- <view v-if="pageForm.propKind">{{pageForm.propKind}}</view>
- <view v-else class="text">请选择行业分类</view>
- <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <view class="item">
- <view class="item-label">建设地点</view>
- <view class="item-text" @click="showAreaChoose()">
- <view v-if="pageForm.subjectId">{{pageForm.subjectId}}</view>
- <view v-else class="text">请选择建设地点</view>
- <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <view class="item">
- <view class="item-label">行业分类</view>
- <view class="item-text" @click="showIndustKindChoose()">
- <view v-if="pageForm.indusKind">{{pageForm.indusKind}}</view>
- <view v-else class="text">请选择行业分类</view>
- <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <view class="item">
- <view class="item-label">状态</view>
- <view class="item-text" @click="showStatusChoose()">
- <view v-if="pageForm.status">{{pageForm.status}}</view>
- <view v-else class="text">请选择状态</view>
- <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <view class="item">
- <view class="item-label">隐藏状态</view>
- <view class="item-text" @click="showIsHideNameChoose()">
- <view v-if="pageForm.isHideName">{{pageForm.isHideName}}</view>
- <view v-else class="text">请选择隐藏状态</view>
- <u-icon name="arrow-right" color="#DDDDDD" size="16" customStyle="margin-left:10rpx"></u-icon>
- </view>
- </view>
- <view class="item">
- <view class="item-label">金额范围</view>
- <view class="card-item-range">
- <input v-model="pageForm.startAmt" class="card-item-input center-input" placeholder="最小值"
- placeholder-style="color: #D8D8D8" maxlength="20" type="number" />
- ~
- <input v-model="pageForm.endAmt" class="card-item-input center-input" placeholder="最大值"
- placeholder-style="color: #D8D8D8" maxlength="20" type="number" />
- </view>
- </view>
- <view class="item">
- <view class="item-label">项目名称</view>
- <view class="card-item-range">
- <input v-model="pageForm.subName" class="card-item-input center-input" placeholder="请输入项目名称"
- placeholder-style="color: #D8D8D8" maxlength="20" type="number" />
- </view>
- </view>
- <!-- 红黄绿灯 -->
- <view style="margin-top: 20rpx;">
- <u-checkbox-group v-model="pageForm.light" style="width: 500rpx">
- <u-checkbox :customStyle="{display:'flex',justifyContent:'space-evenly',width:'50%'}"
- label-size="16px" iconColor='#fff' activeColor='#002F69' v-for="(item, index) in lightList"
- :key="index" :label="item.name" :name="item.name">
- </u-checkbox>
- </u-checkbox-group>
- </view>
- <view class="form-confrom" style="margin-top: 20rpx;" @click="confirmParams()">
- 确定
- </view>
- </view>
- </view>
- <view class="cards-list" :style="isUnfold ? {marginTop:'30rpx'} :''">
- <view class="count-value" style="display: flex;flex-direction: row;"
- :style="isUnfold ? {paddingTop:'30rpx'} :''">
- <view class="status-fgw">
- <image class="status-fgw-light" src="../../static/images/red.svg" mode=""></image>
- <view class="status-num">
- <view class="number">
- {{redTotal}} <text class="dw">个</text>
- </view>
- <view class="number-palin">
- 红灯项目
- </view>
- </view>
- </view>
- <view class="status-fgw">
- <image class="status-fgw-light" src="../../static/images/yellow.svg" mode=""></image>
- <view class="status-num">
- <view class="number" style="color:#E6AA00;">
- {{yellowTotal}} <text class="dw" style="color:#E6AA00;">个</text>
- </view>
- <view class="number-palin">
- 黄灯项目
- </view>
- </view>
- </view>
- <view class="status-fgw">
- <image class="status-fgw-light" src="../../static/images/green.svg" mode=""></image>
- <view class="status-num">
- <view class="number" style="color:#327002;">
- {{greenTotal}} <text class="dw" style="color:#327002;">个</text>
- </view>
- <view class="number-palin">
- 绿灯项目
- </view>
- </view>
- </view>
- </view>
- <view class="cards-list" style="marginTop:30rpx;width: 100%">
- <view class="count-value" style="paddingTop:30rpx;border-radius: 12rpx;">
- <view class="stats-list">
- <view class="stats-item">
- <view class="item-num">
- <text class="number">{{countList[0].value}}</text>
- <text class="unit">万</text>
- </view>
- <view class="item-name">
- 年度计划投资
- </view>
- </view>
- <view class="line">
- </view>
- <view class="stats-item">
- <view class="item-num">
- <text class="number">{{countList[2].value}}</text>
- <text class="unit">万</text>
- </view>
- <view class="item-name">
- 当月完成金额
- </view>
- </view>
- </view>
- <view class="bar-layer">
- <view class="bar-item">
- <view class="line-progress">
- <u-line-progress :percentage="countList[1].value" inactiveColor="#E9F2FF"
- activeColor="#6EAAF7" :showText="false" height="10"></u-line-progress>
- </view>
- <view class="item-text">
- <view class="text-name">
- 年度占比
- </view>
- <view class="text-rote">
- {{countList[1].value + '%'}}
- </view>
- </view>
- </view>
- <view class="bar-item">
- <view class="line-progress">
- <u-line-progress :percentage="countList[3].value" inactiveColor="#E9F2FF"
- activeColor="#6EAAF7" :showText="false" height="10"></u-line-progress>
- </view>
- <view class="item-text">
- <view class="text-name">
- 当月占比
- </view>
- <view class="text-rote">
- {{countList[3].value + '%'}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view v-for="(item,index) in projectList" :key="index">
- <view class="card" :style="!item.isOpen ? '' :{paddingBottom:'0 !important'}">
- <view class="project-layer" :style="!item.isOpen ? {border:'none'}:''">
- <text class="card-name-num">{{(index+1<10?'0'+(index+1):index+1)}}</text>
- <view class="name">
- {{item.subName ?? "--"}}
- </view>
- <view class="card-status" @click="onChangeCard(index)">
- <image class="status-light" src="../../static/images/red.svg" mode=""
- v-if="item.status_fgw=='2'"></image>
- <image class="status-light" src="../../static/images/green.svg" mode=""
- v-if="item.status_fgw=='0'||item.status_fgw==null"></image>
- <image class="status-light" src="../../static/images/yellow.svg" mode=""
- v-if="item.status_fgw=='1'">
- </image>
- <view class="status-name">
- {{item.status ?? "--"}}
- </view>
- <image class="status-switch" src="../../static/images/liaghtUp.svg" mode=""
- :class="item.isOpen ?'card-status-icon-change' :''">
- </image>
- </view>
- </view>
- <view class="card-content-box" :style="item.isOpen ? {height:'286rpx'} :''">
- <view class="line">
- </view>
- <view class="card-item" style="margin-top: 5rpx;">
- <view class="card-item-name">总 投 资 金 额</view>
- <view class="card-item-content">{{item.amtTotal ?? "--"}}万</view>
- </view>
- <!-- 年度计划投资-申报单位(万元) -->
- <view class="card-item">
- <view class="card-item-name">年度计划投资</view>
- <view class="card-item-content">{{item.yearAmt ?? "--"}}万</view>
- </view>
- <!-- 已完成投资(万元)-->
- <view class="card-item">
- <view class="card-item-name">年度完成投资</view>
- <view class="card-item-content">{{item.yearAmtSj ?? "--"}}万</view>
- </view>
- <!-- 当前状态 -->
- <view class="card-item">
- <view class="card-item-name">项目状态</view>
- <view class="card-item-content content-red">{{item.status ?? "--"}}</view>
- </view>
- <view class="card-btn-list">
- <view class="button" @click="goToReport('weekly',item.id,item.subName)">
- 周报
- </view>
- <view class="button" @click="goToReport('monthly',item.id,item.subName)">
- 月报
- </view>
- <view class="button" v-if="!item.isAttention"
- @click="changeFocus(item.id,item.isAttention)">
- 关注
- </view>
- <view class="button" @click="changeFocus(item.id,item.isAttention)" v-else>
- 取消关注
- </view>
- <view class="button" v-if="item.usersub == 1" @click="goToDetail(item.id,item.subName)">
- 项目详情
- </view>
- <view class="button" v-else @click="goToDetail(item.id,item.subName)">
- 项目详情
- </view>
- <view class="button" @click="goToReport('more',item.id,item.subName)">
- 更多
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="no-list" v-if="projectList.length===0">
- <image src="@/static/text-nocontent.png" mode=""></image>
- <text>未搜索到相关内容</text>
- </view>
- </view>
- <u-back-top :scroll-top="scrollTop"></u-back-top>
- <u-loading-page :loading="loading"></u-loading-page>
- <!-- 年度选择 -->
- <u-picker :show="yearShow" :defaultIndex="defaultIndex" :columns="yearColumns" @confirm="yearClose"
- @cancel="yearClose" @close="yearClose" closeOnClickOverlay></u-picker>
- <!-- 开始时间 -->
- <u-datetime-picker :show="beginTimeShow" @confirm="beginTimeClose" @cancel="beginTimeClose"
- @close="beginTimeClose" v-model="beginDateStart" mode="date" closeOnClickOverlay></u-datetime-picker>
- <!-- 结束时间 -->
- <u-datetime-picker :show="endTimeShow" @confirm="endTimeClose" @cancel="endTimeClose" @close="endTimeClose"
- v-model="beginDateEnd" mode="date" closeOnClickOverlay></u-datetime-picker>
- <!-- 行业分类 -->
- <u-picker :show="IndustKindShow" :columns="IndustKindList" @confirm="IndustKindClose" @cancel="IndustKindClose"
- @close="IndustKindClose" closeOnClickOverlay></u-picker>
- <!-- 行业状态 -->
- <u-picker :show="statusShow" :columns="statusList" @confirm="statusClose" @cancel="statusClose"
- @close="statusClose" closeOnClickOverlay></u-picker>
- <!-- 地点选择 -->
- <u-picker :show="areaShow" :columns="areaColumns" @confirm="areaClose" @cancel="areaClose" @close="areaClose"
- closeOnClickOverlay></u-picker>
- <!-- 性质选择 -->
- <u-picker :show="xmxzShow" :columns="xmxzColumns" @confirm="xmxzClose" @cancel="xmxzClose" @close="xmxzClose"
- closeOnClickOverlay></u-picker>
- <!-- 项目类型 -->
- <u-picker :show="kindShow" :columns="kindColumns" @confirm="kindClose" @cancel="kindClose" @close="kindClose"
- closeOnClickOverlay></u-picker>
- <!-- 隐藏状态 -->
- <u-picker :show="isHideNameShow" :columns="isHideNameList" @confirm="isHideNameClose" @cancel="isHideNameClose"
- @close="isHideNameClose" closeOnClickOverlay></u-picker>
- </view>
- </template>
- <style lang="scss" scoped>
- .stats-layer-next{
- margin-top: 20rpx;
- padding-top: 60rpx;
- }
- .tabs {
- width: 100%;
- height: 90rpx;
- margin: 0 auto 20rpx;
- border-radius: 28rpx;
- background: #FFF;
- }
- .choose-year {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- font-size: 24rpx;
- font-weight: 500;
- color: #fff;
- }
- .count-value {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding-bottom: 38rpx;
- gap: 44rpx;
- width: 100%;
- background-color: #fff;
- .bar-layer {
- display: flex;
- justify-content: center;
- gap: 10%;
- width: 100%;
- .bar-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 10rpx;
- width: 200rpx;
- .item-text {
- display: flex;
- justify-content: center;
- align-items: center;
- gap: 10rpx;
- .text-name {
- font-size: 28rpx;
- font-weight: 500;
- color: #000;
- white-space: nowrap;
- }
- .text-rote {
- font-size: 28rpx;
- font-weight: 500;
- color: #C44E00;
- }
- }
- .line-progress {
- width: 100%;
- }
- }
- }
- .stats-list {
- display: flex;
- justify-content: center;
- align-items: center;
- gap: 35rpx;
- .line {
- height: 50rpx;
- border-right: 2rpx solid #EBEBEB;
- border-top: none;
- }
- .stats-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- .item-num {
- display: flex;
- justify-content: center;
- align-items: flex-end;
- gap: 10rpx;
- color: #0033A8;
- .number {
- font-size: 36rpx;
- font-weight: 800;
- color: #C44E00;
- }
- .unit {
- font-size: 28rpx;
- font-weight: 500;
- color: #C44E00;
- }
- }
- .item-name {
- font-size: 25rpx;
- white-space: nowrap;
- }
- }
- }
- }
- .swiper {
- width: 100%;
- height: calc(100vh - 268rpx);
- .swiper-item-content {
- height: 100%;
- padding: 20rpx 0 30rpx;
- }
- }
- .card-box {
- padding: 0 36rpx 36rpx 36rpx;
- border-radius: 28rpx 28rpx 28rpx 28rpx;
- border: 2rpx solid #C2C9D4;
- }
- .project-btn {
- width: 48% !important;
- background: #1869F6;
- }
- .focus-btn {
- width: 48% !important;
- background-color: #fff;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- border: 3rpx solid #1869F6;
- color: #1869F6;
- }
- .focus-btn-no {
- width: 48% !important;
- background-color: #fff;
- border-radius: 16rpx 16rpx 16rpx 16rpx;
- border: 3rpx solid #FF2D2D;
- color: #FF2D2D;
- }
- .lamp {
- display: flex;
- justify-content: center;
- align-items: center;
- image {
- width: 72rpx;
- height: 72rpx;
- margin-right: 20rpx;
- }
- text {
- font-size: 32rpx;
- }
- }
- .card-box2 {
- padding: 0 0 36rpx 0;
- border-radius: 28rpx 28rpx 28rpx 28rpx;
- }
- .focusText {
- font-size: 12rpx;
- margin-right: 12rpx;
- }
- .light-item {
- margin-bottom: 32rpx;
- }
- .card-light {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .card-light-bottom {
- width: 122rpx;
- height: 44rpx;
- margin: auto 0;
- background-size: 100% 100%;
- }
- .light-red {
- background-image: url('@/static/icon-light-red.png');
- }
- .light-yellow {
- background-image: url('@/static/icon-light-yellow.png');
- }
- .light-green {
- background-image: url('@/static/icon-light-green.png');
- }
- .focus {
- width: 46rpx;
- height: 40rpx;
- background-image: url("@/static/focus-off.png");
- background-size: 100% 100%;
- }
- .focus-on {
- background-image: url("@/static/focus-on.png");
- }
- .more-btn {
- background-color: #fff;
- color: #1869F6;
- font-size: 32rpx;
- }
- .special-btn {
- width: 48% !important;
- background: linear-gradient(225deg, #2428F1 0%, #12C8C2 94%);
- }
- .bottom-item {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- align-content: flex-start;
- row-gap: 20rpx;
- margin-bottom: 64rpx;
- }
- .card-value {
- position: absolute;
- bottom: 0;
- right: 50%;
- transform: translate(50%);
- width: 255rpx;
- height: 68rpx;
- padding-right: 22rpx;
- text-align: center;
- line-height: 68rpx;
- color: #1869F6;
- font-size: 32rpx;
- background: linear-gradient(90deg, rgba(211, 227, 255, 0) 0%, rgba(178, 206, 255, 0.5548) 54%, rgba(219, 232, 255, 0) 100%);
- }
- .card-fold {
- position: relative;
- width: 100%;
- min-height: 152rpx;
- margin-bottom: 20rpx;
- padding: 24rpx 30rpx 52rpx;
- box-sizing: border-box;
- background: #FFFFFF;
- border-radius: 40rpx;
- overflow: hidden;
- }
- .card-fold-option {
- position: absolute;
- display: flex;
- justify-content: space-between;
- align-items: center;
- left: 0;
- bottom: 0;
- width: 100%;
- height: 38rpx;
- padding: 0 40rpx;
- box-sizing: border-box;
- background: linear-gradient(270deg, #CADDFF 4%, rgba(219, 232, 255, 0) 100%);
- z-index: 999;
- .card-fold-count {
- flex: 1;
- font-size: 28rpx;
- color: #1869F6;
- }
- .card-fold-center {
- flex: 1;
- .card-fold-btn {
- width: 32rpx;
- height: 20rpx;
- margin: 0 auto;
- background-image: url("@/static/icon-fold.png");
- background-size: 100% 100%;
- }
- .card-unfold-btn {
- transform: rotate(180deg);
- }
- }
- .card-fold-chaos {
- flex: 1;
- }
- }
- .card-fold-red {
- background: linear-gradient(270deg, #FF8080 0%, rgba(219, 232, 255, 0) 100%);
- .card-fold-count {
- color: #FF0000;
- }
- .card-fold-center {
- .card-fold-btn {
- background-image: url("@/static/icon-fold-red.png");
- }
- }
- }
- .card-fold-yellow {
- background: linear-gradient(270deg, #FFAA00 4%, rgba(219, 232, 255, 0) 100%);
- .card-fold-count {
- color: #E19703;
- }
- .card-fold-center {
- .card-fold-btn {
- background-image: url("@/static/icon-fold-yellow.png");
- }
- }
- }
- .gap-bottom {
- width: 100%;
- height: 60rpx;
- }
- .count-value {
- display: flex;
- .status-fgw {
- display: flex;
- .status-fgw-light {
- width: 72rpx;
- height: 72rpx;
- }
- .status-num {
- .number {
- font-size: 36rpx;
- color: #E02020;
- display: flex;
- justify-content: center;
- align-items: flex-end;
- font-weight: 500;
- .dw {
- font-size: 20rpx;
- color: #E02020;
- font-weight: 500;
- }
- }
- .number-palin {
- font-weight: 500;
- font-size: 24rpx;
- color: #444444;
- }
- }
- }
- }
- </style>
|