projectDetail.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. <template>
  2. <custom-layout class="main">
  3. <el-col :span="24" class="one">
  4. <div class="w_1300">
  5. <div class="info_1"></div>
  6. <div class="info_2">
  7. <div class="info_left">
  8. <div class="inose_top">
  9. <div class="img">
  10. <el-image class="image" :src="biao_1" fit="fill"></el-image>
  11. </div>
  12. <div class="ba_tile">
  13. 项目来源:
  14. <span class="hui_text textMore">{{ info.source || '暂无' }}</span>
  15. </div>
  16. <div class="ba_tile">
  17. 所属产业:
  18. <span class="hui_text textMore">{{ info.industry || '暂无' }}</span>
  19. </div>
  20. <div class="ba_tile">
  21. 跟踪支持单位:
  22. <span class="hui_text textMore">{{ info.track_unit || '暂无' }}</span>
  23. </div>
  24. <div class="ba_tile">
  25. 项目主体:
  26. <span class="hui_text textMore">{{ info.main || '暂无' }}</span>
  27. </div>
  28. <div class="ba_tile">
  29. 项目进展:
  30. <span class="hui_text textMore">{{ info.progress || '暂无' }}</span>
  31. </div>
  32. </div>
  33. <div class="inose_top">
  34. <div class="img">
  35. <el-image class="image" :src="biao_2" fit="fill"></el-image>
  36. </div>
  37. <div class="other_1">
  38. <div class="name">{{ info.person || '暂无' }}</div>
  39. <div class="button">预约对接</div>
  40. </div>
  41. </div>
  42. <div class="inose_top">
  43. <div class="img">
  44. <el-image class="image" :src="biao_3" fit="fill"></el-image>
  45. </div>
  46. <div class="wenbe_text">
  47. <span v-if="is_show">{{ info.brief || '暂无' }}</span>
  48. <span v-else>{{ truncateString(info.brief, 100) }}</span>
  49. <span v-if="info.brief && info.brief.length > 100">
  50. <span v-if="!is_show" class="anniu_btn" @click="is_show = true">《点击查看更多》</span>
  51. <span v-else class="anniu_btn" @click="is_show = false">《点击收起更多》</span>
  52. </span>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="info_right">
  57. <div class="right_title">
  58. <div class="type">{{ info.progress || '暂无' }}</div>
  59. <div class="title textOne">项目商业计划书</div>
  60. </div>
  61. <div class="pdf_item" :class="['image' + num]">
  62. <div class="pdf_type textOne">{{ info.industry || '暂无' }}</div>
  63. <div class="title">
  64. <p class="ellipsis-3">{{ info.name || '暂无' }}</p>
  65. </div>
  66. <div class="address">
  67. <el-icon color="#595959"><Location /></el-icon>
  68. <span class="textOne">{{ info.main || '暂无' }}</span>
  69. </div>
  70. <div class="biaoqian textOne">
  71. <span v-if="info.technology">{{ info.technology }}</span>
  72. <span v-if="info.sell">{{ info.sell }}</span>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. <div class="info_3">
  78. <div class="right_1">
  79. <div class="title">
  80. <div class="title_1">专家推荐</div>
  81. <div class="title_2" @click="toMore('0')">更多></div>
  82. </div>
  83. <div class="content_2">
  84. <div class="list" v-for="(item, index) in expertList" :key="index" @click="toView(item, '0')">
  85. <div class="name">
  86. <el-image class="image" :src="liIcon" fit="fill"></el-image>
  87. <span>{{ item.name || '暂无' }}</span>
  88. </div>
  89. <span>{{ item.title || '暂无' }}</span>
  90. <span>{{ item.industry || '暂无' }}</span>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="right_1">
  95. <div class="title">
  96. <div class="title_1">项目推荐</div>
  97. <div class="title_2" @click="toMore('1')">更多></div>
  98. </div>
  99. <div class="content_2">
  100. <div class="list" v-for="(item, index) in projectList" :key="index" @click="toView(item, '1')">
  101. <div class="name">
  102. <el-image class="image" :src="liIcon" fit="fill"></el-image>
  103. <span>{{ item.name || '暂无' }}</span>
  104. </div>
  105. <span>{{ item.source || '暂无' }}</span>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </div>
  111. </el-col>
  112. </custom-layout>
  113. </template>
  114. <script setup>
  115. import liIcon from '/images/li-icon.png'
  116. import biao_1 from '/images/biao_1.png'
  117. import biao_2 from '/images/biao_2.png'
  118. import biao_3 from '/images/biao_3.png'
  119. // 接口
  120. import { ProjectStore } from '@/store/api/platform/project'
  121. import { ExpertStore } from '@/store/api/user/expert'
  122. const store = ProjectStore()
  123. const expertStore = ExpertStore()
  124. import { UserStore } from '@/store/user'
  125. const userStore = UserStore()
  126. const user = computed(() => userStore.user)
  127. // 加载中
  128. const loading = ref(false)
  129. const is_show = ref(false)
  130. const num = ref(Math.floor(Math.random() * 8))
  131. // 路由
  132. const route = useRoute()
  133. const router = useRouter()
  134. const info = ref({})
  135. const expertList = ref([])
  136. const projectList = ref([])
  137. // 请求
  138. onMounted(async () => {
  139. loading.value = true
  140. await search()
  141. await searchExpert()
  142. await searchAchieve()
  143. loading.value = false
  144. })
  145. const search = async () => {
  146. let id = route.query.id
  147. if (id) {
  148. let res = await store.detail(id)
  149. if (res.errcode == '0') info.value = res.data
  150. }
  151. }
  152. const searchAchieve = async () => {
  153. const data = {
  154. skip: 0,
  155. limit: 3,
  156. is_use: '0',
  157. status: '1',
  158. industry: info.value.industry
  159. }
  160. const res = await store.list(data)
  161. if (res.errcode == '0') projectList.value = res.data
  162. }
  163. const searchExpert = async () => {
  164. const data = {
  165. skip: 0,
  166. limit: 3,
  167. is_use: '0',
  168. status: '1'
  169. }
  170. const res = await expertStore.query(data)
  171. if (res.errcode == '0') expertList.value = res.data
  172. }
  173. // 查看
  174. const truncateString = (str, length) => {
  175. if (!str) return '暂无'
  176. if (str.length <= length) {
  177. return str // 如果字符串长度小于等于所需长度,直接返回
  178. } else {
  179. return str.substring(0, length) + '...' // 否则返回前length个字符并加上省略号
  180. }
  181. }
  182. // 查看详情
  183. const toView = (item, type) => {
  184. if (type == '0') router.push({ path: '/expert/detail', query: { id: item.id || item._id } })
  185. else if (type == '1')
  186. router.push({ path: '/project/detail', query: { id: item.id || item._id } }).then(() => {
  187. // 重新刷新页面
  188. location.reload()
  189. })
  190. }
  191. // 查看更多
  192. const toMore = (type) => {
  193. if (type == '0') router.push({ path: '/expert' })
  194. else if (type == '1') router.push({ path: '/project' })
  195. }
  196. </script>
  197. <style scoped lang="scss">
  198. .main {
  199. .one {
  200. padding-bottom: 40px;
  201. background: #f9faff url(/images/bg-gjsxm.jpg) center top no-repeat;
  202. .info_1 {
  203. padding: 30px 0;
  204. }
  205. .info_2 {
  206. display: flex;
  207. border-radius: 5px;
  208. padding-right: 30px;
  209. padding: 50px;
  210. background: #fff;
  211. .info_left {
  212. width: 390px;
  213. .inose_top {
  214. font-size: $global-font-size-16;
  215. line-height: 30px;
  216. color: #3e3e3e;
  217. margin-bottom: 35px;
  218. .img {
  219. display: flex;
  220. justify-content: center;
  221. align-items: center;
  222. }
  223. .ba_tile {
  224. display: flex;
  225. .hui_text {
  226. color: #8a91b0;
  227. width: 268px;
  228. margin-left: 10px;
  229. }
  230. }
  231. .anniu_btn {
  232. font-size: $global-font-size-16;
  233. color: #2171f6;
  234. cursor: pointer;
  235. }
  236. .other_1 {
  237. display: flex;
  238. align-items: center;
  239. flex-direction: column;
  240. .name {
  241. font-size: $global-font-size-18;
  242. }
  243. .button {
  244. margin-top: 20px;
  245. justify-content: center;
  246. display: flex;
  247. align-items: center;
  248. width: 136px;
  249. height: 44px;
  250. color: #fff;
  251. font-size: $global-font-size-16;
  252. background-image: linear-gradient(90deg, #0455da 0%, #378cff 100%), linear-gradient(#0455da, #0455da);
  253. background-blend-mode: normal, normal;
  254. border-radius: 4px;
  255. }
  256. }
  257. .wenbe_text {
  258. font-size: $global-font-size-16;
  259. line-height: 26px;
  260. color: #8a91b0;
  261. }
  262. }
  263. }
  264. .info_right {
  265. text-align: center;
  266. min-width: 770px;
  267. margin-left: 35px;
  268. min-height: 417px;
  269. position: relative;
  270. .right_title {
  271. font-size: 20px;
  272. line-height: 45px;
  273. color: #303030;
  274. max-width: 530px;
  275. margin: 0 auto;
  276. .type {
  277. position: absolute;
  278. left: 0;
  279. top: 9px;
  280. width: 83px;
  281. height: 30px;
  282. background-image: linear-gradient(#fff 0%, #fff9e7 100%), linear-gradient(#fff 0%, #fff9e7 100%);
  283. border: 1px solid #ff6600;
  284. font-size: 16px;
  285. line-height: 30px;
  286. color: #ff6600;
  287. text-align: center;
  288. }
  289. }
  290. .pdf_item {
  291. position: relative;
  292. width: 770px;
  293. height: 464px;
  294. margin: 10px 0 0 0;
  295. .pdf_type {
  296. text-align: left;
  297. font-size: 23px;
  298. line-height: 44px;
  299. color: #414141;
  300. padding-left: 78px;
  301. padding-top: 34px;
  302. }
  303. .title {
  304. padding: 0px 66px 0 88px;
  305. height: 74px;
  306. font-size: 30px;
  307. font-weight: bold;
  308. line-height: 38px;
  309. letter-spacing: 0px;
  310. color: #ffffff;
  311. margin-top: 68px;
  312. .ellipsis-3 {
  313. display: -webkit-box;
  314. -webkit-box-orient: vertical;
  315. overflow: hidden;
  316. -webkit-line-clamp: 3;
  317. }
  318. }
  319. .address {
  320. margin-top: 138px;
  321. padding: 0 65px 0 0;
  322. font-size: 26px;
  323. color: #282828;
  324. display: flex;
  325. align-items: center;
  326. justify-content: flex-end;
  327. }
  328. .biaoqian {
  329. padding: 20px 70px 0 5px;
  330. text-align: right;
  331. overflow: hidden;
  332. span {
  333. padding: 0 5px;
  334. background-color: #f5f8ff;
  335. border-radius: 3px;
  336. border: solid 1px #d2daec;
  337. font-size: $global-font-size-18;
  338. line-height: 26px;
  339. color: #7d8aaa;
  340. margin-right: 2px;
  341. }
  342. }
  343. }
  344. .image0 {
  345. background: url(/images/project/item_1.jpg) no-repeat;
  346. }
  347. .image1 {
  348. background: url(/images/project/item_2.jpg) no-repeat;
  349. }
  350. .image2 {
  351. background: url(/images/project/item_3.jpg) no-repeat;
  352. }
  353. .image3 {
  354. background: url(/images/project/item_4.jpg) no-repeat;
  355. }
  356. .image4 {
  357. background: url(/images/project/item_5.jpg) no-repeat;
  358. }
  359. .image5 {
  360. background: url(/images/project/item_6.jpg) no-repeat;
  361. }
  362. .image6 {
  363. background: url(/images/project/item_7.jpg) no-repeat;
  364. }
  365. .image7 {
  366. background: url(/images/project/item_9.jpg) no-repeat;
  367. }
  368. }
  369. }
  370. .info_3 {
  371. display: flex;
  372. justify-content: space-between;
  373. margin-top: 50px;
  374. .right_1 {
  375. width: 50%;
  376. background-color: #ffffff;
  377. box-shadow: 0px 0px 16px 0px rgba(14, 5, 10, 0.11);
  378. border: solid 1px #e1e6f0;
  379. border-radius: 5px;
  380. .title {
  381. padding: 0 28px 0 24px;
  382. height: 52px;
  383. line-height: 52px;
  384. background-image: linear-gradient(90deg, #2070f6 0%, #629bf5 100%), linear-gradient(#1e6fff, #1e6fff);
  385. background-blend-mode: normal, normal;
  386. color: #fff;
  387. border-top-left-radius: 5px;
  388. border-top-right-radius: 5px;
  389. .title_1 {
  390. float: left;
  391. font-size: $global-font-size-16;
  392. }
  393. .title_2 {
  394. float: right;
  395. font-size: $global-font-size-14;
  396. }
  397. }
  398. .content_2 {
  399. margin: 10px 0;
  400. .list {
  401. display: flex;
  402. align-items: center;
  403. justify-content: space-between;
  404. padding: 10px;
  405. margin: 10px 12px;
  406. padding: 12px 10px;
  407. border-bottom: 1px solid #e1e6f0;
  408. transition: 0.3s ease-in-out;
  409. font-size: $global-font-size-16;
  410. .name {
  411. display: flex;
  412. align-items: center;
  413. .image {
  414. margin: 6px 5px 0 0;
  415. }
  416. }
  417. }
  418. .list:hover {
  419. box-shadow: 0 0 10px rgb(186, 196, 240); /* 阴影效果 */
  420. }
  421. }
  422. }
  423. .right_1:last-child {
  424. margin-left: 35px !important;
  425. }
  426. }
  427. }
  428. }
  429. </style>