Browse Source

Merge branch 'master' of http://git.cc-lotus.info/Information/cxyy-web

lrf 7 tháng trước cách đây
mục cha
commit
bbf9d42b7a

+ 15 - 2
src/components/custom/custom-layout.vue

@@ -42,14 +42,23 @@
       <div class="header_3" v-if="is_carousel">
         <el-carousel height="300px">
           <el-carousel-item v-for="(item, index) in carouselList" :key="index">
-            <el-image class="image" :src="getUrlFile(item)" fit="fill" />
+            <el-image class="image" :src="getUrlFile(item)" fit="fill" @click="toRedirect(item)" />
           </el-carousel-item>
         </el-carousel>
       </div>
       <el-col :span="24" class="header_2">
         <div class="list_1300">
           <el-col :span="24" class="list">
-            <div class="text" v-for="(item, index) in data" @click="selectMenu(item.route)" :class="[item.hover == '1' ? 'menuTrue' : '']" :style="{ padding: isIncubator ? '0 37px' : hasbrain ? '0 37px' : '0 52px' }" :key="index" @mouseover="handleMouseOver(index)" @mouseout="handleMousOut(index)">
+            <div
+              class="text"
+              v-for="(item, index) in data"
+              @click="selectMenu(item.route)"
+              :class="[item.hover == '1' ? 'menuTrue' : '']"
+              :style="{ padding: isIncubator ? '0 37px' : hasbrain ? '0 37px' : '0 52px' }"
+              :key="index"
+              @mouseover="handleMouseOver(index)"
+              @mouseout="handleMousOut(index)"
+            >
               {{ item.title }}
             </div>
           </el-col>
@@ -220,6 +229,10 @@ const toOut = () => {
   userStore.logOut()
   router.push({ path: '/login', query: { status: '1' } })
 }
+const toRedirect = (data) => {
+  const to = get(data, 'to')
+  if (to) window.open(to)
+}
 </script>
 
 <style lang="scss" scoped>

+ 2 - 1
src/layout/index.vue

@@ -96,7 +96,8 @@ const toActive = async (item) => {
 // 退出登录
 const toOut = () => {
   userStore.logOut()
-  router.push({ path: '/login', query: { status: '1' } })
+  // router.push({ path: '/login', query: { status: '1' } })
+  location.replace(`${import.meta.VITE_BASE_URL}/login?status=1`)
 }
 // 返回首页
 const toHome = () => {

+ 1 - 1
src/router/index.js

@@ -340,7 +340,7 @@ router.beforeEach(async (to, from, next) => {
       next()
       return
     }
-    next('/login')
+    next('/login?status=1')
   }
 })
 router.afterEach(() => {

+ 12 - 6
src/store/api/user/incubator.js

@@ -21,12 +21,16 @@ export const IncubatorStore = defineStore('incubator', () => {
     const res = await axios.$get(`${url}/list`, cond)
     return res
   }
-  const all = async ({ skip = 0, limit = undefined, ...info } = {}) => {
-    let cond = {}
-    if (skip) cond.skip = skip
-    if (limit) cond.limit = limit
-    cond = { ...cond, ...info }
-    const res = await axios.$get(`${url}/allList`, cond)
+  const all = async (payload) => {
+    const res = await axios.$get(`${url}/allList`, payload)
+    return res
+  }
+  const field = async (payload) => {
+    const res = await axios.$get(`${url}/field`, payload)
+    return res
+  }
+  const cfield = async (payload) => {
+    const res = await axios.$get(`${url}/cfield`, payload)
     return res
   }
   const statistics = async (payload) => {
@@ -58,6 +62,8 @@ export const IncubatorStore = defineStore('incubator', () => {
     query,
     list,
     all,
+    field,
+    cfield,
     statistics,
     detail,
     fetch,

+ 25 - 10
src/views/center/basic.vue

@@ -3,10 +3,7 @@
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
         <div class="thr" v-if="companyInfo && companyInfo.id">
-          <el-select size="large" style="width: 350px" clearable v-model="incubator_id" filterable remote reserve-keyword placeholder="请输入想要选择的孵化器" :remote-method="remoteMethod" :loading="searchLoading">
-            <el-option v-for="item in searchList" :key="item.id" :label="item.name" :value="item.id" />
-          </el-select>
-          <el-button class="button" size="large" @click="toSave" type="primary">确定</el-button>
+          <el-button class="button" size="large" @click="toJoin" type="primary">入驻孵化器</el-button>
         </div>
         <el-col :span="24" class="one">基本信息 </el-col>
         <el-col :span="24" class="two">
@@ -64,6 +61,16 @@
         </el-col>
       </el-col>
     </el-row>
+    <el-dialog v-model="dialog.show" :title="dialog.title" :destroy-on-close="false" @close="toClose">
+      <el-row>
+        <el-col :span="24" v-if="dialog.type == '1'" class="dialog_one">
+          <el-select size="large" style="width: 350px" clearable v-model="incubator_id" filterable remote reserve-keyword placeholder="请输入想要选择的孵化器" :remote-method="remoteMethod" :loading="searchLoading">
+            <el-option v-for="item in searchList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
+          <el-button class="button" size="large" @click="toSave" type="primary">确定</el-button>
+        </el-col>
+      </el-row>
+    </el-dialog>
   </div>
 </template>
 
@@ -120,6 +127,7 @@ const loading = ref(false)
 // 字典
 const genderList = ref([])
 const plateList = ref([])
+const dialog = ref({ type: '1', show: false, title: '入驻孵化器' })
 // 请求
 onMounted(async () => {
   loading.value = true
@@ -200,6 +208,10 @@ const toSave = () => {
     })
     .catch(() => {})
 }
+// 入驻孵化器
+const toJoin = () => {
+  dialog.value = { type: '1', show: true, title: '入驻孵化器' }
+}
 </script>
 <style scoped lang="scss">
 .main {
@@ -215,12 +227,15 @@ const toSave = () => {
     }
   }
   .thr {
-    display: flex;
-    align-items: center;
-    margin: 0 0 10px 0;
-    .button {
-      margin: 0 0 0 5px;
-    }
+    margin: 10px 0;
+  }
+}
+.dialog_one {
+  display: flex;
+  align-items: center;
+  margin: 0 0 10px 0;
+  .button {
+    margin: 0 0 0 5px;
   }
 }
 </style>

+ 1 - 1
src/views/detail/expert.vue

@@ -31,7 +31,7 @@
 
 <script setup>
 // 图片引入
-import lists from '/images/expert.png'
+import lists from '/images/bg-xqk.jpg'
 const $checkRes = inject('$checkRes')
 // 接口
 import { ExpertStore } from '@/store/api/user/expert'

+ 1 - 1
src/views/detail/expertDetail.vue

@@ -202,7 +202,7 @@ const toCollect = async () => {
         justify-content: center;
         .other_1 {
           margin: 0 0 0 10px;
-
+          width: 20%;
           .info_title {
             display: flex;
             justify-content: space-between;

+ 6 - 1
src/views/detail/matchDetail.vue

@@ -39,12 +39,17 @@
               <div v-else>暂无简介</div>
             </div>
             <!-- 封面 -->
-            <div class="image">
+            <!-- <div class="image">
               <el-image class="images" :src="getUrl(info.file, 'array')" fit="fill">
                 <template v-slot:error>
                   <el-image class="image" :src="match_3" fit="fill" />
                 </template>
               </el-image>
+            </div> -->
+            <div class="image" v-if="info.video">
+              <template v-for="i in info.video" :key="i.uri">
+                <video :src="i.uri" style="width: 331px; height: 182px" muted="muted" autoplay="autoplay" loop></video>
+              </template>
             </div>
           </div>
         </div>

+ 7 - 3
src/views/detail/news.vue

@@ -3,8 +3,8 @@
     <el-col :span="24" class="one" v-loading="loading">
       <div class="w_1300">
         <el-col :span="24" class="one_1">
-          <h2 class="name">双高新闻资讯</h2>
-          <h5 class="remark">跟紧政策指引方向 &nbsp;&nbsp;&nbsp; 抓牢各地双高机遇</h5>
+          <!-- <h2 class="name">双高新闻资讯</h2> -->
+          <!-- <h5 class="remark">跟紧政策指引方向 &nbsp;&nbsp;&nbsp; 抓牢各地双高机遇</h5> -->
           <div class="search">
             <el-input v-model="searchForm.title" size="large" placeholder="请输入关键字" :suffix-icon="Search">
               <template #append>
@@ -38,7 +38,7 @@
                     <div v-html="removeHtmlStyle(item.content)"></div>
                   </el-col>
                   <el-col :span="24" class="right_3">
-                    {{ item.time || '暂无' }}
+                    {{ getDate(item.time) || '暂无' }}
                   </el-col>
                 </el-col>
               </el-col>
@@ -91,6 +91,7 @@
 
 <script setup>
 // 接口
+import moment from 'moment'
 import { NewsStore } from '@/store/api/platform/news'
 import { AchievementStore } from '@/store/api/platform/achievement'
 import { ProjectStore } from '@/store/api/platform/project'
@@ -196,6 +197,9 @@ const sizeChange = (limits) => {
 const getUrl = (item) => {
   if (item && item.length > 0) return `${import.meta.env.VITE_APP_HOST}${item[0].uri}`
 }
+const getDate = (item) => {
+  if (item && moment(item).isValid()) return moment(item).format('YYYY-MM-DD')
+}
 </script>
 <style scoped lang="scss">
 .main {

+ 8 - 0
src/views/detail/serviceDetail.vue

@@ -32,6 +32,14 @@
                 <span>登记时间:</span>
                 {{ info.time || '暂无运营主体' }}
               </el-col>
+              <el-col :span="24" class="other_1">
+                <span>联系人:</span>
+                {{ info.contacts || '暂无联系人' }}
+              </el-col>
+              <el-col :span="24" class="other_1">
+                <span>联系电话:</span>
+                {{ info.phone || '暂无联系电话' }}
+              </el-col>
             </div>
           </div>
           <div class="center">

+ 61 - 10
src/views/elevenHatch/index.vue

@@ -21,9 +21,23 @@
                     </div>
                   </div>
                 </div>
-                <div class="boxall">
+                <div class="boxall" v-show="is_show">
                   <div class="alltitle">行业领域占比情况</div>
-                  <echarts1></echarts1>
+                  <echarts1 :info_3="info_3" @dataChange="dataChange"></echarts1>
+                </div>
+                <div class="boxall" v-if="!is_show">
+                  <div class="alltitle">
+                    <div>企业信息</div>
+                    <button class="button type1" @click="toBack2">返回</button>
+                  </div>
+                  <div class="wraptit"><span>企业名称</span></div>
+                  <div class="one">
+                    <vue3-seamless-scroll :list="oneList" :hover="true" :step="0.2" :wheel="true" :isWatch="true" class="scroll">
+                      <div class="wrap" v-for="(item, index) in oneList" :key="index" @click="toCView(item)">
+                        <div class="other">{{ item.name || '暂无名称' }}</div>
+                      </div>
+                    </vue3-seamless-scroll>
+                  </div>
                 </div>
               </div>
             </el-col>
@@ -161,8 +175,10 @@ import video_4 from '/images/video_4.jpg'
 import loadingUrl from '../elevenHatch/images/loading.gif'
 const twoList = ref([{ url: video_1 }, { url: video_2 }, { url: video_3 }, { url: video_4 }])
 const thrList = ref([])
+const is_show = ref(true)
 const info = ref({ show: true })
-const info_2 = ref()
+const info_2 = ref({})
+const info_3 = ref({})
 const yearInfo = ref({})
 const year1 = ref('2023')
 const year2 = ref('2023')
@@ -177,6 +193,7 @@ const column = ref([
 ])
 // 列表
 const list_1 = ref([])
+const oneList = ref([])
 let skip = 0
 let limit = 10
 const total = ref(0)
@@ -188,6 +205,7 @@ onMounted(async () => {
   await searchYear()
   await searchcYear()
   await updateTime()
+  await searchField()
   loading.value = false
 })
 const searchOther = async () => {
@@ -239,6 +257,26 @@ const searchcYear = async () => {
   }
 }
 
+const searchField = async () => {
+  if (info.value.id) {
+    const data = { is_use: '0', incubator: info.value.id, status: '1' }
+    const res = await incubatorStore.field(data)
+    if (res.errcode == '0') info_3.value = res.data
+  }
+}
+
+const searchcField = async (name) => {
+  if (info.value.id) {
+    const data = {
+      incubator: info.value.id,
+      industry: name,
+      status: '1'
+    }
+    const res = await incubatorStore.cfield(data)
+    if (res.errcode == '0') oneList.value = res.data
+  }
+}
+
 // 创建一个函数来格式化时间并更新状态
 const updateTime = () => {
   const now = new Date()
@@ -283,7 +321,7 @@ const toYear1 = (e) => {
 //孵化基地企业产业占比
 const toYear2 = (e) => {
   year2.value = e
-  console.log(e)
+  searchcYear()
 }
 // 孵化基地汇总
 const toNum = (item) => {
@@ -292,11 +330,23 @@ const toNum = (item) => {
 // 返回
 const toBack = async () => {
   info.value.show = true
+  is_show.value = true
+  skip = 0
+  limit = 10
   await search()
 }
+// 返回
+const toBack2 = async () => {
+  is_show.value = true
+}
 // 查看企业信息
 const toCView = (item) => {
-  router.push({ path: `/company/detail`, query: { id: item.company } })
+  router.push({ path: `/company/detail`, query: { id: item.company || item.id } })
+}
+// 点击饼图
+const dataChange = async (name) => {
+  await searchcField(name)
+  is_show.value = false
 }
 const currentPage = ref(1)
 // 分页
@@ -406,6 +456,10 @@ const sizeChange = (limits) => {
         position: relative;
         margin-bottom: 10px;
         z-index: 10;
+        .compField {
+          height: 296px;
+          width: 100%;
+        }
         .center_list {
           display: flex;
           flex-wrap: wrap;
@@ -709,7 +763,7 @@ const sizeChange = (limits) => {
         letter-spacing: 2px;
       }
       .one {
-        height: 72px;
+        height: 240px;
         overflow: hidden;
         .scroll {
           width: 100%;
@@ -719,11 +773,8 @@ const sizeChange = (limits) => {
             border: 1px solid rgba(25, 186, 139, 0.17);
             padding: 10px;
             margin: 0 0 10px 0;
-            .other:first-child {
-              width: 40%;
-            }
             .other {
-              width: 30%;
+              width: 100%;
               color: rgba(255, 255, 255, 0.6);
               text-align: center;
               text-overflow: ellipsis;

+ 19 - 29
src/views/elevenHatch/path/echarts1.vue

@@ -10,9 +10,11 @@
 <script setup>
 import * as echarts from 'echarts'
 const echarts1 = ref()
-onMounted(() => {
-  echarts1View()
+const props = defineProps({
+  info_3: { type: Object, default: () => {} }
 })
+const { info_3 } = toRefs(props)
+const emits = defineEmits(['dataChange'])
 function echarts1View() {
   const myChart1 = echarts.init(echarts1.value)
   const option1 = {
@@ -32,7 +34,7 @@ function echarts1View() {
         fontSize: 12
       },
       orient: 'vertical',
-      data: ['生物医药', '化工新材料', '先进装备制造', '高端服务', '光电子', '电子信息']
+      data: info_3.value.nameList
     },
     calculable: true,
     series: [
@@ -59,32 +61,7 @@ function echarts1View() {
             show: true
           }
         },
-        data: [
-          {
-            value: 10,
-            name: '生物医药'
-          },
-          {
-            value: 5,
-            name: '化工新材料'
-          },
-          {
-            value: 15,
-            name: '先进装备制造'
-          },
-          {
-            value: 25,
-            name: '高端服务'
-          },
-          {
-            value: 20,
-            name: '光电子'
-          },
-          {
-            value: 20,
-            name: '电子信息'
-          }
-        ]
+        data: info_3.value.list
       }
     ]
   }
@@ -92,5 +69,18 @@ function echarts1View() {
   window.addEventListener('resize', function () {
     myChart1.resize()
   })
+  // 饼图点击跳转到指定页面
+  myChart1.on('click', function (param) {
+    emits('dataChange', param.name)
+  })
 }
+watch(
+  info_3,
+  () => {
+    echarts1View()
+  },
+  {
+    deep: true
+  }
+)
 </script>

+ 2 - 2
src/views/one/index.vue

@@ -26,7 +26,7 @@
         <div class="two_1" @click="toComon('/thr', '1')">
           <el-image class="image" :src="bg_4" fit="fill" />
           <div class="content">
-            <div class="name">需库</div>
+            <div class="name">需库</div>
             <div class="english">DEMAND LIBRARY</div>
           </div>
         </div>
@@ -38,7 +38,7 @@
         </div>
         <div class="center_2">
           <vue3-seamless-scroll :list="newsList" :hover="true" :step="0.5" :wheel="true" :isWatch="true">
-            <div class="center_list" v-for="(item, index) in newsList" :key="index">
+            <div class="center_list" v-for="(item, index) in newsList" :key="index" @click="toView(item, '0')">
               <div class="center_left textOne">{{ item.title || '暂无' }}</div>
               <div class="center_right">{{ moment(item.time).format('YYYY-MM-DD') || '暂无' }}</div>
             </div>