Преглед на файлове

修改孵化器详情列表

zs преди 9 месеца
родител
ревизия
92f4a7cded
променени са 1 файла, в които са добавени 24 реда и са изтрити 0 реда
  1. 24 0
      src/views/detail/baseDetail.vue

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

@@ -48,6 +48,20 @@
               <div v-if="info.brief" v-html="info.brief"></div>
             </div>
           </div>
+          <div class="center">
+            <div class="title">合作企业</div>
+            <div class="content">
+              <el-table :data="cirelationList" stripe style="width: 100%" :header-cell-style="{ backgroundColor: 'rgba(194, 209, 225, 0.5)', color: '#ffffff', fontSize: '16px', textAlign: 'center' }" :cell-style="{ fontSize: '16px', textAlign: 'center' }" :row-style="{ fontSize: '16px', textAlign: 'center' }">
+                <el-table-column prop="company_name" label="企业名称" />
+                <el-table-column prop="time" label="申请时间" />
+                <el-table-column prop="time" label="查看详情">
+                  <template #default="scope">
+                    <el-button type="primary" @click="toCompany(scope.row)">查看详情</el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+          </div>
           <div class="bottom">
             <div class="title">相关孵化基地</div>
             <div class="content">
@@ -85,8 +99,10 @@ const $checkRes = inject('$checkRes')
 import { get } from 'lodash-es'
 // 接口
 import { IncubatorStore } from '@/store/api/user/incubator'
+import { CirelationStore } from '@/store/api/user/cirelation'
 import { DictDataStore } from '@/store/api/system/dictData'
 const store = IncubatorStore()
+const cirelationStore = CirelationStore()
 const dictDataStore = DictDataStore()
 import { UserStore } from '@/store/user'
 const userStore = UserStore()
@@ -107,6 +123,7 @@ const info = ref({})
 // 列表
 const list = ref([])
 const isUseList = ref([])
+const cirelationList = ref([])
 // 请求
 onMounted(async () => {
   loading.value = true
@@ -128,12 +145,19 @@ const search = async () => {
   if (id) {
     let res = await store.detail(id)
     if (res.errcode == '0') info.value = res.data
+    const data = { skip: 0, limit: 6, incubator: res.data.id, status: '1' }
+    res = await cirelationStore.list(data)
+    if (res.errcode == '0') cirelationList.value = res.data
   }
 }
 // 查看
 const toView = (item) => {
   router.push({ path: '/base/detail', query: { id: item.id || item._id } })
 }
+// 查看企业详情
+const toCompany = (item) => {
+  router.push({ path: `/company/detail`, query: { id: item.company } })
+}
 const getUrl = (item) => {
   if (item) return `${import.meta.env.VITE_APP_HOST}${item}`
 }