123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650 |
- <script setup>
- import {
- ref
- } from 'vue'
- import {
- onLoad,
- onPageScroll
- } from "@dcloudio/uni-app"
- import {
- getProjectInfoDetail,
- } from "@/api/work/projectInfo.js"
- import {
- getProjectPreFlow,
- } from "@/api/work/preFlow.js"
- let projectName = ref("项目信息")
- function backToBefore() {
- uni.navigateBack({})
- };
- let scrollTop = ref(0)
- let backBtnShow = ref(false)
- let popupShow = ref(false)
- let popupTitle = ref(null)
- let callShow = ref(false)
- // 展示弹窗
- function showPopup(type, text) {
- let callShowList = ['tel', 'tel_lead']
- if (callShowList.includes(type)) {
- callShow.value = true
- }
- popupTitle.value = text
- popupShow.value = true
- }
- // 关闭弹窗
- function hidePopup() {
- popupShow.value = false
- callShow.value = false
- }
- // 复制该项
- function pasteItem() {
- uni.setClipboardData({
- data: popupTitle.value
- });
- }
- // 拨打电话
- function callItem() {
- plus.device.dial(popupTitle.value, true);
- }
- let fileShowFlag = ref(false)
- let fileAddre = ref(null)
- function showFile(type, filePath) {
- uni.navigateTo({
- url: `/pages/projectInfo/media/index?type=${type}&filePath=${filePath}`
- })
- }
- // 基本信息
- let baseInfoList = ref([{
- description: '项目名称',
- key: "sub_name",
- value: ''
- }, {
- description: '申请单位',
- key: "unitName",
- value: ''
- }, {
- description: '主体单位',
- key: "mainName",
- value: ''
- }, {
- description: '监管单位',
- key: "manageName",
- value: ''
- }, {
- description: '审批单位',
- key: "approveName",
- value: ''
- }, {
- description: '建设性质',
- key: "propKindName",
- value: ''
- }, {
- description: '行业分类',
- key: "indusName",
- value: ''
- }, {
- description: '项目类型',
- key: 'kindName',
- value: ''
- }, {
- description: '责任主体',
- key: 'subjectName',
- value: ''
- }, {
- description: '隐藏状态',
- key: 'isHideName',
- value: ''
- }])
- // 资金信息
- let sourceInfoList = ref([{
- description: '投资性质',
- key: "kindNature",
- value: ""
- }, {
- description: '总投资金额(万元)',
- key: "amt_total",
- value: ""
- },
- {
- description: '到位资金(万元)',
- key: "amt_comptotal",
- value: ""
- },
- {
- description: '年度计划投资-发改委(万元)',
- key: "amt_year",
- value: ""
- },
- {
- description: '年度计划投资-申报单位(万元)',
- key: "sumYearAmt",
- value: ""
- },
- {
- description: '年度实际投资(万元)',
- key: "sumYearAmtSj",
- value: ""
- },
- ])
- let fundSource = ref({})
- // 资金来源
- let subSourceInfoList = ref([]);
- function filterData(data) {
- let baseInfoData = data.projectsInfo
- for (let i in baseInfoList.value) {
- baseInfoList.value[i].value = baseInfoData[baseInfoList.value[i].key] || "--"
- }
- // 资金信息
- for (let i in sourceInfoList.value) {
- sourceInfoList.value[i].value = baseInfoData[sourceInfoList.value[i].key] != null ? baseInfoData[sourceInfoList
- .value[i].key] : "--";
- }
- fundSource.value = data.projectsInfo
- // 年度计划投资-申报单位(万元)
- let sumYearAmt = sourceInfoList.value.find(item => item.key === "sumYearAmt");
- sumYearAmt.value = data.sumYearAmt;
- //年度实际投资(万元)
- let sumYearAmtSj = sourceInfoList.value.find(item => item.key === "sumYearAmtSj");
- sumYearAmtSj.value = data.sumYearAmtSj;
- // 资金来源
- for (let i in data.subSource) {
- subSourceInfoList.value.push({
- description: data.subSource[i].sourceName + "(万元)",
- value: data.subSource[i].amt
- })
- }
- }
- let preFlowList = ref([]);
- onLoad((option) => {
- projectName.value = option.subName
- getProjectInfoDetail({
- subId: option.id
- }).then(res => {
- filterData(res.data)
- })
- getProjectPreFlow({
- subId: option.id
- }).then(res => {
- let obj = {
- "0": "未开始办理",
- "1": "开始办理",
- "2": "办理完成",
- "3": "退回"
- }
- res.data.list.forEach(item => {
- item.statusConf = obj[item.statusConf]
- })
- preFlowList.value = res.data.list;
- })
- })
- onPageScroll((e) => {
- scrollTop.value = e.scrollTop
- // backBtnShow.value = e.scrollTop > 90
- })
- </script>
- <template>
- <view class="container">
- <page-title>项目详情</page-title>
- <!-- 基本信息 -->
- <view class="item-card base-info">
- <view class="item-title">
- <view class="item-title-pic">
- <view class="item-title-center item-title-baseInfo">
- <view class="item-title-icon">
- <image src="@/static/icon-baseInfo.png" mode=""></image>
- </view>
- <view class="item-title-text">基本信息</view>
- </view>
- </view>
- <view class="item-title-empty"></view>
- </view>
- <view class="item-info" v-for="item in baseInfoList">
- <view class="item-info-description">{{item.description}}</view>
- <view class="item-info-name" @click="showPopup(item.key,item.value)">{{item.value}}</view>
- </view>
- <view class="item-info">
- <view class="item-info-description">计划开工时间</view>
- <view class="item-info-name" @click="showPopup('beginTime',fundSource.begin_date)">
- {{fundSource.begin_date || "--"}}
- </view>
- </view>
- <view class="item-info">
- <view class="item-info-description">计划完工时间</view>
- <view class="item-info-name" @click="showPopup('endTime',fundSource.end_date)">
- {{fundSource.end_date || "--"}}
- </view>
- </view>
- <view class="item-info item-info-half item-info-start">
- <view class="item-info-description">负责人</view>
- <view class="item-info-name" @click="showPopup('nameZrr',fundSource.name_zrr)">
- {{fundSource.name_zrr || "--"}}
- </view>
- </view>
- <view class="item-info item-info-half item-info-start">
- <view class="item-info-description item-info-icon">
- <u-icon name="phone" color="#343437" size="20"></u-icon>
- </view>
- <view class="item-info-name number" @click="showPopup('tel',fundSource.tel)">{{fundSource.tel || "--"}}</view>
- </view>
- <view class="item-info item-info-half item-info-start">
- <view class="item-info-description">总负责人</view>
- <view class="item-info-name" @click="showPopup('name_lead',fundSource.name_lead)">
- {{fundSource.name_lead || "--"}}
- </view>
- </view>
- <view class="item-info item-info-half item-info-start">
- <view class="item-info-description item-info-icon">
- <u-icon name="phone" color="#343437" size="20"></u-icon>
- </view>
- <view class="item-info-name number" @click="showPopup('tel_lead',fundSource.tel_lead)">
- {{fundSource.tel_lead || "--"}}
- </view>
- </view>
- <view class="item-info">
- <view class="item-info-description">建设内容及规模</view>
- </view>
- <view class="item-info-content" @click="showPopup('content',fundSource.content)">{{fundSource.content}}</view>
- </view>
- <!-- 问题状态 -->
- <view class="item-card fund-source">
- <view class="item-title">
- <view class="item-title-pic">
- <view class="item-title-center item-title-question">
- <view class="item-title-icon">
- <image src="@/static/icon-question.png" mode=""></image>
- </view>
- <view class="item-title-text">问题状态</view>
- </view>
- </view>
- <view class="item-title-empty"></view>
- </view>
- <view class="item-info lamp-info">
- <view class="item-info-description">红黄灯</view>
- <view class="item-info-name">
- <view class="lamp" v-if="!fundSource.status_fgw">
- <image src="@/static/lamp-green.svg" alt=""></image>
- <text style="color: #05A22F;">绿灯</text>
- </view>
- <view class="lamp" v-if="fundSource.status_fgw === '1'">
- <image src="@/static/lamp-yellow.svg" alt=""></image>
- <text style="color: #E47907;">黄灯</text>
- </view>
- <view class="lamp" v-if="fundSource.status_fgw === '2'">
- <image src="@/static/lamp-red.svg" alt=""></image>
- <text style="color: #F91818;">红灯</text>
- </view>
- </view>
- </view>
- <view class="item-info">
- <view class="item-info-description">问题原因</view>
- </view>
- <view class="item-info-content" @click="showPopup('colorReason',fundSource.colorReason)">
- {{fundSource.colorReason ?? "无"}}
- </view>
- </view>
- <!-- 资金信息 -->
- <view class="item-card fund-source">
- <view class="item-title">
- <view class="item-title-pic">
- <view class="item-title-center item-title-fundSource">
- <view class="item-title-icon">
- <image src="@/static/icon-fundSource.png" mode=""></image>
- </view>
- <view class="item-title-text">资金信息</view>
- </view>
- </view>
- <view class="item-title-empty"></view>
- </view>
- <view class="item-info" v-for="item in sourceInfoList">
- <view class="item-info-description">{{item.description}}</view>
- <view class="item-info-name money" @click="showPopup(item.key,item.value)">{{item.value}}</view>
- </view>
- </view>
- <!-- 资金来源 -->
- <view class="item-card fund-source">
- <view class="item-title">
- <view class="item-title-pic">
- <view class="item-title-center item-title-subSource">
- <view class="item-title-icon">
- <image src="@/static/icon-subSource.svg" mode=""></image>
- </view>
- <view class="item-title-text">资金来源</view>
- </view>
- </view>
- <view class="item-title-empty"></view>
- </view>
- <view class="item-info" v-for="item in subSourceInfoList">
- <view class="item-info-description">{{item.description}}</view>
- <view class="item-info-name money" @click="showPopup(item.key,item.value)">{{item.value}}</view>
- </view>
- </view>
- <view class="gap-bottom"></view>
- <u-back-top :scroll-top="scrollTop"></u-back-top>
- <u-popup :show="popupShow" @close="hidePopup()" mode="bottom" :round="20" closeOnClickOverlay>
- <view class="popup-content">
- <view class="popup-item popup-title">{{popupTitle}}</view>
- <view class="popup-item" @click="pasteItem()">复制</view>
- <view class="popup-item" v-show="callShow" @click="callItem()">拨打</view>
- <view class="popup-item popup-close" @click="hidePopup()">关闭</view>
- </view>
- </u-popup>
- </view>
- </template>
- <style lang="scss" scoped>
- @font-face {
- font-family: TITLETEXT;
- src: url('@/font/RuiZiAoYunJingShenPinBoJianMianFei-Shan(REEJI-PinboGB-Flash)-2.ttf');
- }
- .container {
- position: relative;
- width: 100%;
- height: 100%;
- padding: 130rpx 0 50rpx 0;
- background: linear-gradient(180deg, #1869F6 0%, #EAF0FA 64%, #EAF0FA 100%);
- }
- .item-card {
- position: relative;
- width: 92%;
- left: 4%;
- min-height: 200rpx;
- padding: 16rpx 28rpx 40rpx;
- background-color: #fff;
- border-radius: 24rpx 0 24rpx 24rpx;
- .item-title {
- position: absolute;
- top: -62rpx;
- left: 0;
- display: flex;
- align-items: flex-end;
- height: 64rpx;
- width: calc(100% - 30rpx);
- margin-left: 30rpx;
- box-sizing: border-box;
- border-radius: 40rpx 40rpx 0 0;
- line-height: 50rpx;
- .item-title-pic {
- flex: 3;
- height: 54rpx;
- margin-right: -2rpx;
- background-color: #fff;
- border-radius: 24rpx 0 0 0;
- }
- .item-title-center {
- display: flex;
- width: 100%;
- height: 98%;
- padding-left: 30rpx;
- border-radius: 24rpx 0 24rpx 0;
- box-shadow: inset 0 -8rpx 14rpx 0rpx rgba(0, 22, 59, 0.49);
- .item-title-icon {
- display: flex;
- flex-direction: column;
- justify-content: center;
- image {
- width: 32rpx;
- height: 32rpx;
- }
- }
- .item-title-text {
- flex: 1;
- margin-left: 18rpx;
- font-size: 32rpx;
- font-family: TITLETEXT;
- color: #fff;
- }
- }
- .item-title-baseInfo {
- background: linear-gradient(120deg, #005CFF 40%, #FFFFFF 100%);
- }
- .item-title-question {
- background: linear-gradient(120deg, #FF0000 20%, #FFFFFF 100%);
- }
- .item-title-fundSource {
- background: linear-gradient(120deg, #FF530F 20%, #FFFFFF 98%);
- }
- .item-title-subSource {
- background: linear-gradient(120deg, #FFAA00 12%, #FFFFFF 100%);
- }
- .item-title-constructStep {
- background: linear-gradient(120deg, #04A201 40%, #FFFFFF 100%);
- }
- .item-title-startData {
- background: linear-gradient(120deg, #6201A2 40%, #FFFFFF 100%);
- }
- .item-title-empty {
- flex: 4;
- height: 64rpx;
- border-radius: 24rpx 24rpx 0 0;
- background-color: #fff;
- }
- }
- .item-info {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- width: 100%;
- min-height: 80rpx;
- .item-info-description {
- display: flex;
- flex-direction: column;
- justify-content: center;
- min-width: 160rpx;
- font-size: 32rpx;
- color: #9E9E9E;
- }
- .item-info-icon {
- min-width: 0;
- }
- .item-info-name {
- display: flex;
- flex-direction: column;
- justify-content: center;
- font-size: 32rpx;
- color: #343437;
- image {
- width: 32rpx;
- height: 32rpx;
- }
- }
- .money {
- color: #FF530F;
- }
- .number {
- color: #1869F6;
- }
- .new {
- color: #1869F6;
- }
- .wait {
- color: #FF813E;
- }
- .done {
- color: #06BC43;
- }
- }
- .item-info-half {
- width: 50%;
- padding-right: 4%;
- }
- .item-info-start {
- justify-content: start;
- .item-info-name {
- margin-left: 32rpx;
- }
- }
- .item-info-content {
- width: 100%;
- min-height: 168rpx;
- padding: 20rpx;
- margin-top: 30rpx;
- box-sizing: border-box;
- background: #EAF0FA;
- border-radius: 20rpx;
- }
- .item-table {
- width: 100%;
- padding-bottom: 40rpx;
- border-bottom: 2rpx solid #EAF0FA;
- }
- .item-table-bottom {
- padding-bottom: 0;
- border-bottom: none;
- }
- .item-empty {
- width: 100%;
- height: 200rpx;
- }
- }
- .base-info {
- margin-top: 164rpx;
- display: flex;
- flex-wrap: wrap;
- }
- .fund-source {
- margin-top: 96rpx;
- display: flex;
- flex-wrap: wrap;
- }
- .construct-step {
- margin-top: 96rpx;
- }
- .record-data {
- margin-top: 96rpx;
- }
- .start-data {
- margin-top: 96rpx;
- }
- .popup-content {
- text-align: center;
- border-radius: 20rpx 20rpx 0 0;
- background-color: #f3f3f3;
- .popup-item {
- // display: flex;
- // flex-direction: column;
- // justify-content: center;
- min-height: 100rpx;
- line-height: 100rpx;
- color: #343437;
- font-size: 32rpx;
- background-color: #fff;
- border-bottom: 2rpx solid #EAF0FA;
- }
- .popup-title {
- color: #9E9E9E;
- border-radius: 20rpx 20rpx 0 0;
- }
- .popup-close {
- margin-top: 20rpx;
- border-top: 2rpx solid #EAF0FA;
- }
- }
- .gap-bottom {
- width: 100%;
- height: 60rpx;
- }
- .lamp-info {
- align-items: center !important;
- }
- .lamp {
- display: flex;
- justify-content: center;
- align-items: center;
- image {
- width: 104rpx !important;
- height: 104rpx !important;
- margin-right: 20rpx;
- }
- text {
- font-size: 32rpx;
- }
- }
- </style>
|