zs 9 mēneši atpakaļ
vecāks
revīzija
09eab03488

+ 6 - 0
src/router/index.js

@@ -204,6 +204,12 @@ const router = createRouter({
       meta: { title: '产学研用协同创新数字化平台-行研产研详情' },
       component: () => import('@/views/detail/studyDetail.vue')
     },
+    {
+      path: '/friend/detail',
+      name: 'friendDetail',
+      meta: { title: '产学研用协同创新数字化平台-合作伙伴' },
+      component: () => import('@/views/detail/friendDetail.vue')
+    },
     {
       path: '/chat',
       meta: { title: '产学研用协同创新数字化平台-消息' },

+ 10 - 0
src/styles/variables.scss

@@ -139,3 +139,13 @@ $global-color-595: #595959;
 .el-checkbox__label {
   font-size: 16px !important; /* 设置复选框内部文字的字体大小 */
 }
+.el-collapse-item__header {
+  font-size: $global-font-size-20 !important;
+  height: 60px !important;
+}
+.el-collapse-item__content {
+  font-size: $global-font-size-18 !important;
+}
+.el-descriptions--large .el-descriptions__body .el-descriptions__table .el-descriptions__cell {
+  font-size: $global-font-size-18 !important;
+}

+ 1 - 1
src/views/center/demand.vue

@@ -71,7 +71,7 @@
         </el-col>
         <!-- 加载界面 -->
         <transition name="why">
-          <el-col :span="24" v-if="dialog.type == '2'" class="dialog" v-loading="isLoading" element-loading-text="数据加载中..." :element-loading-svg="svg" element-loading-svg-view-box="-10,-10,50,50">
+          <el-col :span="24" v-if="dialog.type == '2'" class="dialog" v-loading="isLoading" element-loading-text="智能推荐中..." :element-loading-svg="svg" element-loading-svg-view-box="-10,-10,50,50">
             <div class="list" v-for="(item, index) in supplyList" :key="index" @click="toView(item)">
               <h2 class="name textMore">
                 <span>{{ item.name || '暂无' }}</span>

+ 1 - 1
src/views/center/project.vue

@@ -78,7 +78,7 @@
           </custom-form>
         </el-col>
         <transition name="why">
-          <el-col :span="24" v-if="dialog.type == '2'" class="dialog" v-loading="isLoading" element-loading-text="数据加载中..." :element-loading-svg="svg" element-loading-svg-view-box="-10,-10,50,50">
+          <el-col :span="24" v-if="dialog.type == '2'" class="dialog" v-loading="isLoading" element-loading-text="智能推荐中..." :element-loading-svg="svg" element-loading-svg-view-box="-10,-10,50,50">
             <div class="list" v-for="(item, index) in demandList" :key="index" @click="toView(item)">
               <h2 class="name textMore">
                 <span>{{ item.name || '暂无' }}</span>

+ 1 - 1
src/views/center/supply.vue

@@ -70,7 +70,7 @@
           </custom-form>
         </el-col>
         <transition name="why">
-          <el-col :span="24" v-if="dialog.type == '2'" class="dialog" v-loading="isLoading" element-loading-text="数据加载中..." :element-loading-svg="svg" element-loading-svg-view-box="-10,-10,50,50">
+          <el-col :span="24" v-if="dialog.type == '2'" class="dialog" v-loading="isLoading" element-loading-text="智能推荐中..." :element-loading-svg="svg" element-loading-svg-view-box="-10,-10,50,50">
             <div class="list" v-for="(item, index) in demandList" :key="index" @click="toView(item)">
               <h2 class="name textMore">
                 <span>{{ item.name || '暂无' }}</span>

+ 4 - 0
src/views/detail/baseDetail.vue

@@ -28,6 +28,10 @@
                 <span>负责人姓名:</span>
                 {{ info.person || '暂无' }}
               </el-col>
+              <el-col :span="24" class="other_1">
+                <span>负责人联系电话:</span>
+                {{ info.person_phone || '暂无' }}
+              </el-col>
               <el-col :span="24" class="other_1">
                 <span>是否和平台合作标识:</span>
                 {{ getDict(info.cooperate, 'cooperate') || '暂无' }}

+ 114 - 0
src/views/detail/friendDetail.vue

@@ -0,0 +1,114 @@
+<template>
+  <custom-layout class="main">
+    <el-col :span="24" class="elimage">
+      <el-image class="image" :src="lists" fit="fill" />
+    </el-col>
+    <div class="w_1300">
+      <el-col :span="24" class="one">
+        <el-descriptions size="large" border>
+          <el-descriptions-item align="center" label="名称">{{ info.name || '暂无' }}</el-descriptions-item>
+          <el-descriptions-item align="center" label="LOGO">
+            <el-image class="image" :src="getUrl(info.file)" fit="fill" />
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-col>
+      <el-col :span="24" class="two">
+        <div class="title">上级合作伙伴简介</div>
+        <div class="content">
+          <div v-if="info.brief" v-html="info.brief"></div>
+        </div>
+      </el-col>
+      <el-col :span="24" class="thr">
+        <el-collapse v-model="activeName" @change="handleChange" accordion>
+          <el-collapse-item :title="item.name" :name="item.id" v-for="(item, index) in list" :key="index">
+            <div v-if="info.brief" v-html="item.brief"></div>
+          </el-collapse-item>
+        </el-collapse>
+      </el-col>
+    </div>
+  </custom-layout>
+</template>
+
+<script setup>
+// 图片引入
+import lists from '/images/company.png'
+// 接口
+import { FriendStore } from '@/store/api/platform/friend'
+const friendStore = FriendStore()
+import { UserStore } from '@/store/user'
+const userStore = UserStore()
+const user = computed(() => userStore.user)
+// 加载中
+const loading = ref(false)
+// 路由
+const route = useRoute()
+
+const list = ref([])
+const info = ref({})
+// 请求
+onMounted(async () => {
+  loading.value = true
+  await search()
+  await searchOther()
+  loading.value = false
+})
+const search = async () => {
+  if (route.query.code) {
+    const data = { skip: 0, limit: 5, is_use: '0', code: route.query.code }
+    const res = await friendStore.list(data)
+    if (res.errcode == '0') info.value = res.data[0]
+  }
+}
+const searchOther = async () => {
+  const info = { is_use: '0', parent_code: route.query.code }
+  const res = await friendStore.list(info)
+  if (res.errcode == '0') {
+    list.value = res.data
+    activeName.value = res.data[0].id
+  }
+}
+const getUrl = (item) => {
+  if (item) return `${import.meta.env.VITE_APP_HOST}${item[0].uri}`
+}
+const activeName = ref('1')
+const handleChange = (val) => {
+  console.log(val)
+}
+</script>
+<style scoped lang="scss">
+.main {
+  .elimage {
+    .image {
+      width: 100%;
+      height: 350px;
+    }
+  }
+  .one {
+    margin: 30px 0;
+    .image {
+      width: 200px;
+      height: 140px;
+    }
+  }
+  .two {
+    margin: 20px 0 0 0;
+    .title {
+      color: #000;
+      display: inline-block;
+      margin-right: 80px;
+      padding-bottom: 20px;
+      font-size: $global-font-size-20;
+      color: #000000;
+      border-bottom: 5px solid #378cff;
+      cursor: pointer;
+    }
+    .content {
+      padding: 20px;
+      font-size: $global-font-size-18;
+    }
+  }
+  .thr {
+    margin: 30px 0;
+  }
+}
+</style>

+ 5 - 1
src/views/one/index.vue

@@ -123,7 +123,7 @@
         <div class="title">合作伙伴</div>
       </div>
       <div class="four_2">
-        <div class="list" v-for="(item, index) in friendList" :key="index">
+        <div class="list" v-for="(item, index) in friendList" :key="index" @click="toFriend(item)">
           <el-image class="image" :src="getUrl(item.file, 'array')" fit="fill"></el-image>
         </div>
       </div>
@@ -244,6 +244,10 @@ const toComon = (route, type) => {
     router.push({ path: '/login', query: { status: '1' } })
   }
 }
+// 查看合作伙伴下级
+const toFriend = (item) => {
+  router.push({ path: '/friend/detail', query: { code: item.code } })
+}
 const removeHtmlStyle = (html) => {
   let relStyle = /style\s*?=\s*?([‘"])[\s\S]*?\1/g //去除样式
   let relTag = /<.+?>/g //去除标签