index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650
  1. <script setup>
  2. import {
  3. ref
  4. } from 'vue'
  5. import {
  6. onLoad,
  7. onPageScroll
  8. } from "@dcloudio/uni-app"
  9. import {
  10. getProjectInfoDetail,
  11. } from "@/api/work/projectInfo.js"
  12. import {
  13. getProjectPreFlow,
  14. } from "@/api/work/preFlow.js"
  15. let projectName = ref("项目信息")
  16. function backToBefore() {
  17. uni.navigateBack({})
  18. };
  19. let scrollTop = ref(0)
  20. let backBtnShow = ref(false)
  21. let popupShow = ref(false)
  22. let popupTitle = ref(null)
  23. let callShow = ref(false)
  24. // 展示弹窗
  25. function showPopup(type, text) {
  26. let callShowList = ['tel', 'tel_lead']
  27. if (callShowList.includes(type)) {
  28. callShow.value = true
  29. }
  30. popupTitle.value = text
  31. popupShow.value = true
  32. }
  33. // 关闭弹窗
  34. function hidePopup() {
  35. popupShow.value = false
  36. callShow.value = false
  37. }
  38. // 复制该项
  39. function pasteItem() {
  40. uni.setClipboardData({
  41. data: popupTitle.value
  42. });
  43. }
  44. // 拨打电话
  45. function callItem() {
  46. plus.device.dial(popupTitle.value, true);
  47. }
  48. let fileShowFlag = ref(false)
  49. let fileAddre = ref(null)
  50. function showFile(type, filePath) {
  51. uni.navigateTo({
  52. url: `/pages/projectInfo/media/index?type=${type}&filePath=${filePath}`
  53. })
  54. }
  55. // 基本信息
  56. let baseInfoList = ref([{
  57. description: '项目名称',
  58. key: "sub_name",
  59. value: ''
  60. }, {
  61. description: '申请单位',
  62. key: "unitName",
  63. value: ''
  64. }, {
  65. description: '主体单位',
  66. key: "mainName",
  67. value: ''
  68. }, {
  69. description: '监管单位',
  70. key: "manageName",
  71. value: ''
  72. }, {
  73. description: '审批单位',
  74. key: "approveName",
  75. value: ''
  76. }, {
  77. description: '建设性质',
  78. key: "propKindName",
  79. value: ''
  80. }, {
  81. description: '行业分类',
  82. key: "indusName",
  83. value: ''
  84. }, {
  85. description: '项目类型',
  86. key: 'kindName',
  87. value: ''
  88. }, {
  89. description: '责任主体',
  90. key: 'subjectName',
  91. value: ''
  92. }, {
  93. description: '隐藏状态',
  94. key: 'isHideName',
  95. value: ''
  96. }])
  97. // 资金信息
  98. let sourceInfoList = ref([{
  99. description: '投资性质',
  100. key: "kindNature",
  101. value: ""
  102. }, {
  103. description: '总投资金额(万元)',
  104. key: "amt_total",
  105. value: ""
  106. },
  107. {
  108. description: '到位资金(万元)',
  109. key: "amt_comptotal",
  110. value: ""
  111. },
  112. {
  113. description: '年度计划投资-发改委(万元)',
  114. key: "amt_year",
  115. value: ""
  116. },
  117. {
  118. description: '年度计划投资-申报单位(万元)',
  119. key: "sumYearAmt",
  120. value: ""
  121. },
  122. {
  123. description: '年度实际投资(万元)',
  124. key: "sumYearAmtSj",
  125. value: ""
  126. },
  127. ])
  128. let fundSource = ref({})
  129. // 资金来源
  130. let subSourceInfoList = ref([]);
  131. function filterData(data) {
  132. let baseInfoData = data.projectsInfo
  133. for (let i in baseInfoList.value) {
  134. baseInfoList.value[i].value = baseInfoData[baseInfoList.value[i].key] || "--"
  135. }
  136. // 资金信息
  137. for (let i in sourceInfoList.value) {
  138. sourceInfoList.value[i].value = baseInfoData[sourceInfoList.value[i].key] != null ? baseInfoData[sourceInfoList
  139. .value[i].key] : "--";
  140. }
  141. fundSource.value = data.projectsInfo
  142. // 年度计划投资-申报单位(万元)
  143. let sumYearAmt = sourceInfoList.value.find(item => item.key === "sumYearAmt");
  144. sumYearAmt.value = data.sumYearAmt;
  145. //年度实际投资(万元)
  146. let sumYearAmtSj = sourceInfoList.value.find(item => item.key === "sumYearAmtSj");
  147. sumYearAmtSj.value = data.sumYearAmtSj;
  148. // 资金来源
  149. for (let i in data.subSource) {
  150. subSourceInfoList.value.push({
  151. description: data.subSource[i].sourceName + "(万元)",
  152. value: data.subSource[i].amt
  153. })
  154. }
  155. }
  156. let preFlowList = ref([]);
  157. onLoad((option) => {
  158. projectName.value = option.subName
  159. getProjectInfoDetail({
  160. subId: option.id
  161. }).then(res => {
  162. filterData(res.data)
  163. })
  164. getProjectPreFlow({
  165. subId: option.id
  166. }).then(res => {
  167. let obj = {
  168. "0": "未开始办理",
  169. "1": "开始办理",
  170. "2": "办理完成",
  171. "3": "退回"
  172. }
  173. res.data.list.forEach(item => {
  174. item.statusConf = obj[item.statusConf]
  175. })
  176. preFlowList.value = res.data.list;
  177. })
  178. })
  179. onPageScroll((e) => {
  180. scrollTop.value = e.scrollTop
  181. // backBtnShow.value = e.scrollTop > 90
  182. })
  183. </script>
  184. <template>
  185. <view class="container">
  186. <page-title>项目详情</page-title>
  187. <!-- 基本信息 -->
  188. <view class="item-card base-info">
  189. <view class="item-title">
  190. <view class="item-title-pic">
  191. <view class="item-title-center item-title-baseInfo">
  192. <view class="item-title-icon">
  193. <image src="@/static/icon-baseInfo.png" mode=""></image>
  194. </view>
  195. <view class="item-title-text">基本信息</view>
  196. </view>
  197. </view>
  198. <view class="item-title-empty"></view>
  199. </view>
  200. <view class="item-info" v-for="item in baseInfoList">
  201. <view class="item-info-description">{{item.description}}</view>
  202. <view class="item-info-name" @click="showPopup(item.key,item.value)">{{item.value}}</view>
  203. </view>
  204. <view class="item-info">
  205. <view class="item-info-description">计划开工时间</view>
  206. <view class="item-info-name" @click="showPopup('beginTime',fundSource.begin_date)">
  207. {{fundSource.begin_date || "--"}}
  208. </view>
  209. </view>
  210. <view class="item-info">
  211. <view class="item-info-description">计划完工时间</view>
  212. <view class="item-info-name" @click="showPopup('endTime',fundSource.end_date)">
  213. {{fundSource.end_date || "--"}}
  214. </view>
  215. </view>
  216. <view class="item-info item-info-half item-info-start">
  217. <view class="item-info-description">负责人</view>
  218. <view class="item-info-name" @click="showPopup('nameZrr',fundSource.name_zrr)">
  219. {{fundSource.name_zrr || "--"}}
  220. </view>
  221. </view>
  222. <view class="item-info item-info-half item-info-start">
  223. <view class="item-info-description item-info-icon">
  224. <u-icon name="phone" color="#343437" size="20"></u-icon>
  225. </view>
  226. <view class="item-info-name number" @click="showPopup('tel',fundSource.tel)">{{fundSource.tel || "--"}}</view>
  227. </view>
  228. <view class="item-info item-info-half item-info-start">
  229. <view class="item-info-description">总负责人</view>
  230. <view class="item-info-name" @click="showPopup('name_lead',fundSource.name_lead)">
  231. {{fundSource.name_lead || "--"}}
  232. </view>
  233. </view>
  234. <view class="item-info item-info-half item-info-start">
  235. <view class="item-info-description item-info-icon">
  236. <u-icon name="phone" color="#343437" size="20"></u-icon>
  237. </view>
  238. <view class="item-info-name number" @click="showPopup('tel_lead',fundSource.tel_lead)">
  239. {{fundSource.tel_lead || "--"}}
  240. </view>
  241. </view>
  242. <view class="item-info">
  243. <view class="item-info-description">建设内容及规模</view>
  244. </view>
  245. <view class="item-info-content" @click="showPopup('content',fundSource.content)">{{fundSource.content}}</view>
  246. </view>
  247. <!-- 问题状态 -->
  248. <view class="item-card fund-source">
  249. <view class="item-title">
  250. <view class="item-title-pic">
  251. <view class="item-title-center item-title-question">
  252. <view class="item-title-icon">
  253. <image src="@/static/icon-question.png" mode=""></image>
  254. </view>
  255. <view class="item-title-text">问题状态</view>
  256. </view>
  257. </view>
  258. <view class="item-title-empty"></view>
  259. </view>
  260. <view class="item-info lamp-info">
  261. <view class="item-info-description">红黄灯</view>
  262. <view class="item-info-name">
  263. <view class="lamp" v-if="!fundSource.status_fgw">
  264. <image src="@/static/lamp-green.svg" alt=""></image>
  265. <text style="color: #05A22F;">绿灯</text>
  266. </view>
  267. <view class="lamp" v-if="fundSource.status_fgw === '1'">
  268. <image src="@/static/lamp-yellow.svg" alt=""></image>
  269. <text style="color: #E47907;">黄灯</text>
  270. </view>
  271. <view class="lamp" v-if="fundSource.status_fgw === '2'">
  272. <image src="@/static/lamp-red.svg" alt=""></image>
  273. <text style="color: #F91818;">红灯</text>
  274. </view>
  275. </view>
  276. </view>
  277. <view class="item-info">
  278. <view class="item-info-description">问题原因</view>
  279. </view>
  280. <view class="item-info-content" @click="showPopup('colorReason',fundSource.colorReason)">
  281. {{fundSource.colorReason ?? "无"}}
  282. </view>
  283. </view>
  284. <!-- 资金信息 -->
  285. <view class="item-card fund-source">
  286. <view class="item-title">
  287. <view class="item-title-pic">
  288. <view class="item-title-center item-title-fundSource">
  289. <view class="item-title-icon">
  290. <image src="@/static/icon-fundSource.png" mode=""></image>
  291. </view>
  292. <view class="item-title-text">资金信息</view>
  293. </view>
  294. </view>
  295. <view class="item-title-empty"></view>
  296. </view>
  297. <view class="item-info" v-for="item in sourceInfoList">
  298. <view class="item-info-description">{{item.description}}</view>
  299. <view class="item-info-name money" @click="showPopup(item.key,item.value)">{{item.value}}</view>
  300. </view>
  301. </view>
  302. <!-- 资金来源 -->
  303. <view class="item-card fund-source">
  304. <view class="item-title">
  305. <view class="item-title-pic">
  306. <view class="item-title-center item-title-subSource">
  307. <view class="item-title-icon">
  308. <image src="@/static/icon-subSource.svg" mode=""></image>
  309. </view>
  310. <view class="item-title-text">资金来源</view>
  311. </view>
  312. </view>
  313. <view class="item-title-empty"></view>
  314. </view>
  315. <view class="item-info" v-for="item in subSourceInfoList">
  316. <view class="item-info-description">{{item.description}}</view>
  317. <view class="item-info-name money" @click="showPopup(item.key,item.value)">{{item.value}}</view>
  318. </view>
  319. </view>
  320. <view class="gap-bottom"></view>
  321. <u-back-top :scroll-top="scrollTop"></u-back-top>
  322. <u-popup :show="popupShow" @close="hidePopup()" mode="bottom" :round="20" closeOnClickOverlay>
  323. <view class="popup-content">
  324. <view class="popup-item popup-title">{{popupTitle}}</view>
  325. <view class="popup-item" @click="pasteItem()">复制</view>
  326. <view class="popup-item" v-show="callShow" @click="callItem()">拨打</view>
  327. <view class="popup-item popup-close" @click="hidePopup()">关闭</view>
  328. </view>
  329. </u-popup>
  330. </view>
  331. </template>
  332. <style lang="scss" scoped>
  333. @font-face {
  334. font-family: TITLETEXT;
  335. src: url('@/font/RuiZiAoYunJingShenPinBoJianMianFei-Shan(REEJI-PinboGB-Flash)-2.ttf');
  336. }
  337. .container {
  338. position: relative;
  339. width: 100%;
  340. height: 100%;
  341. padding: 130rpx 0 50rpx 0;
  342. background: linear-gradient(180deg, #1869F6 0%, #EAF0FA 64%, #EAF0FA 100%);
  343. }
  344. .item-card {
  345. position: relative;
  346. width: 92%;
  347. left: 4%;
  348. min-height: 200rpx;
  349. padding: 16rpx 28rpx 40rpx;
  350. background-color: #fff;
  351. border-radius: 24rpx 0 24rpx 24rpx;
  352. .item-title {
  353. position: absolute;
  354. top: -62rpx;
  355. left: 0;
  356. display: flex;
  357. align-items: flex-end;
  358. height: 64rpx;
  359. width: calc(100% - 30rpx);
  360. margin-left: 30rpx;
  361. box-sizing: border-box;
  362. border-radius: 40rpx 40rpx 0 0;
  363. line-height: 50rpx;
  364. .item-title-pic {
  365. flex: 3;
  366. height: 54rpx;
  367. margin-right: -2rpx;
  368. background-color: #fff;
  369. border-radius: 24rpx 0 0 0;
  370. }
  371. .item-title-center {
  372. display: flex;
  373. width: 100%;
  374. height: 98%;
  375. padding-left: 30rpx;
  376. border-radius: 24rpx 0 24rpx 0;
  377. box-shadow: inset 0 -8rpx 14rpx 0rpx rgba(0, 22, 59, 0.49);
  378. .item-title-icon {
  379. display: flex;
  380. flex-direction: column;
  381. justify-content: center;
  382. image {
  383. width: 32rpx;
  384. height: 32rpx;
  385. }
  386. }
  387. .item-title-text {
  388. flex: 1;
  389. margin-left: 18rpx;
  390. font-size: 32rpx;
  391. font-family: TITLETEXT;
  392. color: #fff;
  393. }
  394. }
  395. .item-title-baseInfo {
  396. background: linear-gradient(120deg, #005CFF 40%, #FFFFFF 100%);
  397. }
  398. .item-title-question {
  399. background: linear-gradient(120deg, #FF0000 20%, #FFFFFF 100%);
  400. }
  401. .item-title-fundSource {
  402. background: linear-gradient(120deg, #FF530F 20%, #FFFFFF 98%);
  403. }
  404. .item-title-subSource {
  405. background: linear-gradient(120deg, #FFAA00 12%, #FFFFFF 100%);
  406. }
  407. .item-title-constructStep {
  408. background: linear-gradient(120deg, #04A201 40%, #FFFFFF 100%);
  409. }
  410. .item-title-startData {
  411. background: linear-gradient(120deg, #6201A2 40%, #FFFFFF 100%);
  412. }
  413. .item-title-empty {
  414. flex: 4;
  415. height: 64rpx;
  416. border-radius: 24rpx 24rpx 0 0;
  417. background-color: #fff;
  418. }
  419. }
  420. .item-info {
  421. display: flex;
  422. justify-content: space-between;
  423. align-items: flex-start;
  424. width: 100%;
  425. min-height: 80rpx;
  426. .item-info-description {
  427. display: flex;
  428. flex-direction: column;
  429. justify-content: center;
  430. min-width: 160rpx;
  431. font-size: 32rpx;
  432. color: #9E9E9E;
  433. }
  434. .item-info-icon {
  435. min-width: 0;
  436. }
  437. .item-info-name {
  438. display: flex;
  439. flex-direction: column;
  440. justify-content: center;
  441. font-size: 32rpx;
  442. color: #343437;
  443. image {
  444. width: 32rpx;
  445. height: 32rpx;
  446. }
  447. }
  448. .money {
  449. color: #FF530F;
  450. }
  451. .number {
  452. color: #1869F6;
  453. }
  454. .new {
  455. color: #1869F6;
  456. }
  457. .wait {
  458. color: #FF813E;
  459. }
  460. .done {
  461. color: #06BC43;
  462. }
  463. }
  464. .item-info-half {
  465. width: 50%;
  466. padding-right: 4%;
  467. }
  468. .item-info-start {
  469. justify-content: start;
  470. .item-info-name {
  471. margin-left: 32rpx;
  472. }
  473. }
  474. .item-info-content {
  475. width: 100%;
  476. min-height: 168rpx;
  477. padding: 20rpx;
  478. margin-top: 30rpx;
  479. box-sizing: border-box;
  480. background: #EAF0FA;
  481. border-radius: 20rpx;
  482. }
  483. .item-table {
  484. width: 100%;
  485. padding-bottom: 40rpx;
  486. border-bottom: 2rpx solid #EAF0FA;
  487. }
  488. .item-table-bottom {
  489. padding-bottom: 0;
  490. border-bottom: none;
  491. }
  492. .item-empty {
  493. width: 100%;
  494. height: 200rpx;
  495. }
  496. }
  497. .base-info {
  498. margin-top: 164rpx;
  499. display: flex;
  500. flex-wrap: wrap;
  501. }
  502. .fund-source {
  503. margin-top: 96rpx;
  504. display: flex;
  505. flex-wrap: wrap;
  506. }
  507. .construct-step {
  508. margin-top: 96rpx;
  509. }
  510. .record-data {
  511. margin-top: 96rpx;
  512. }
  513. .start-data {
  514. margin-top: 96rpx;
  515. }
  516. .popup-content {
  517. text-align: center;
  518. border-radius: 20rpx 20rpx 0 0;
  519. background-color: #f3f3f3;
  520. .popup-item {
  521. // display: flex;
  522. // flex-direction: column;
  523. // justify-content: center;
  524. min-height: 100rpx;
  525. line-height: 100rpx;
  526. color: #343437;
  527. font-size: 32rpx;
  528. background-color: #fff;
  529. border-bottom: 2rpx solid #EAF0FA;
  530. }
  531. .popup-title {
  532. color: #9E9E9E;
  533. border-radius: 20rpx 20rpx 0 0;
  534. }
  535. .popup-close {
  536. margin-top: 20rpx;
  537. border-top: 2rpx solid #EAF0FA;
  538. }
  539. }
  540. .gap-bottom {
  541. width: 100%;
  542. height: 60rpx;
  543. }
  544. .lamp-info {
  545. align-items: center !important;
  546. }
  547. .lamp {
  548. display: flex;
  549. justify-content: center;
  550. align-items: center;
  551. image {
  552. width: 104rpx !important;
  553. height: 104rpx !important;
  554. margin-right: 20rpx;
  555. }
  556. text {
  557. font-size: 32rpx;
  558. }
  559. }
  560. </style>