zs 7 mesi fa
parent
commit
462beb6314

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

@@ -5,7 +5,7 @@
         <el-col :span="24" class="one">认证入驻 </el-col>
         <el-col :span="24" class="two">
           <el-select v-model="activeName" placeholder="请选择认证角色类型" size="large" style="width: 240px">
-            <el-option v-for="item in roleList" :key="item.code" :label="item.name" :value="item.code" />
+            <el-option v-for="item in roleList" :key="item.code" :label="item.title" :value="item.code" />
           </el-select>
         </el-col>
         <el-col :span="24" class="thr">

+ 6 - 2
src/views/detail/newsDetail.vue

@@ -177,8 +177,12 @@ const toMore = (type) => {
 // 查看详情
 const toView = (item, type) => {
   if (type == '0') router.push({ path: '/match/detail', query: { id: item.id || item._id } })
-  else if (type == '1') router.push({ path: '/expert/detail', query: { id: item.id || item._id } })
-  else if (type == '2') router.push({ path: '/project/detail', query: { id: item.id || item._id } })
+  else {
+    if (user.value.id) {
+      if (type == '1') router.push({ path: '/expert/detail', query: { id: item.id || item._id } })
+      else if (type == '2') router.push({ path: '/project/detail', query: { id: item.id || item._id } })
+    } else ElMessage({ message: '未登录!', type: 'error' })
+  }
 }
 const toCollect = async () => {
   if (user.value.id) {

+ 1 - 1
src/views/login/index.vue

@@ -62,7 +62,7 @@ const searchOther = async () => {
   if ($checkRes(result)) typeList.value = result.data
   // 用户角色
   result = await roleStore.query({ is_use: '0', is_admin_role: '0' })
-  if ($checkRes(result)) roleList.value = result.data
+  if ($checkRes(result)) roleList.value = result.data.filter((f) => f.code !== 'Competition')
   // 基础设置
   result = await designStore.query({})
   if ($checkRes(result)) configInfo.value = result.data[0] || {}

+ 8 - 2
src/views/search/parts/achievement.vue

@@ -153,7 +153,7 @@
             <div class="box">
               <p class="name textMore">{{ item.name || '暂无' }}</p>
             </div>
-            <div class="list_2">
+            <div class="list_2" v-if="user && user.id">
               <div class="other">
                 <el-image class="image" :src="one" fit="fill" />
                 <div class="text textOne">{{ item.field || '暂无' }}</div>
@@ -202,6 +202,10 @@ const esStore = EsStore()
 const dictDataStore = DictDataStore()
 const regionStore = RegionStore()
 const sectorStore = SectorStore()
+// 用户信息
+import { UserStore } from '@/store/user'
+const userStore = UserStore()
+const user = computed(() => userStore.user)
 // 路由
 const router = useRouter()
 
@@ -289,7 +293,9 @@ const toSearchInfo = async () => {
 }
 // 查看详情
 const toView = async (item) => {
-  router.push({ path: '/achievement/detail', query: { id: item.id || item._id } })
+  if (user.value.id) {
+    router.push({ path: '/achievement/detail', query: { id: item.id || item._id } })
+  } else ElMessage({ message: '未登录!', type: 'error' })
 }
 const currentPage = ref(1)
 // 分页

+ 11 - 5
src/views/search/parts/company.vue

@@ -90,7 +90,7 @@
                 </template>
               </el-image>
             </div>
-            <div class="other_2">
+            <div class="other_2" v-if="user && user.id">
               <span class="text"><em>企业类型:</em>{{ getDict(item.pattern, 'pattern') || '暂无' }}</span>
               <span class="text"><em>员工人数:</em>{{ item.person || '暂无' }}人</span>
               <span class="text"><em>地址:</em>{{ getArea(item.area) || '暂无' }}</span>
@@ -120,6 +120,10 @@ const esStore = EsStore()
 const regionStore = RegionStore()
 const sectorStore = SectorStore()
 const dictDataStore = DictDataStore()
+// 用户信息
+import { UserStore } from '@/store/user'
+const userStore = UserStore()
+const user = computed(() => userStore.user)
 // 加载中
 const loading = ref(false)
 
@@ -165,9 +169,9 @@ const searchOther = async () => {
   result = await dictDataStore.query({ code: 'companyType', is_use: '0' })
   if ($checkRes(result)) patternList.value = result.data
   patternList.value.unshift({ id: '-1', value: '-1', label: '不限', is_active: true })
-  // // 企业规模
-  // result = await dictDataStore.query({ code: 'companyScale', is_use: '0' })
-  // if ($checkRes(result)) scaleList.value = result.data
+  // 企业规模
+  result = await dictDataStore.query({ code: 'companyScale', is_use: '0' })
+  if ($checkRes(result)) scaleList.value = result.data
   // // 企业所属行业
   // result = await dictDataStore.query({ code: 'companyIndustry', is_use: '0' })
   // if ($checkRes(result)) IndustryList.value = result.data
@@ -209,7 +213,9 @@ const toSearchInfo = async () => {
 }
 // 查看
 const toView = (item) => {
-  router.push({ path: `/company/detail`, query: { id: item.id || item._id } })
+  if (user.value.id) {
+    router.push({ path: `/company/detail`, query: { id: item.id || item._id } })
+  } else ElMessage({ message: '未登录!', type: 'error' })
 }
 const getUrl = (item) => {
   if (item && item.length > 0) return `${import.meta.env.VITE_APP_HOST}${item[0].uri}`

+ 9 - 3
src/views/search/parts/project.vue

@@ -72,11 +72,11 @@
               <div class="title">
                 <p class="ellipsis-3">{{ item.name || '暂无' }}</p>
               </div>
-              <div class="address">
+              <div class="address" v-if="user && user.id">
                 <el-icon color="#595959"><Location /></el-icon>
                 <span class="textOne">{{ item.main || '暂无' }}</span>
               </div>
-              <div class="biaoqian textOne">
+              <div class="biaoqian textOne" v-if="user && user.id">
                 <span v-if="item.technology">{{ item.technology }}</span>
                 <span v-if="item.sell">{{ item.sell }}</span>
               </div>
@@ -103,6 +103,10 @@ const esStore = EsStore()
 const dictDataStore = DictDataStore()
 const regionStore = RegionStore()
 const sectorStore = SectorStore()
+// 用户信息
+import { UserStore } from '@/store/user'
+const userStore = UserStore()
+const user = computed(() => userStore.user)
 // 路由
 const router = useRouter()
 
@@ -174,7 +178,9 @@ const toSearchInfo = async () => {
 }
 // 查看
 const toView = (item) => {
-  router.push({ path: `/project/detail`, query: { id: item.id || item._id } })
+  if (user.value.id) {
+    router.push({ path: `/project/detail`, query: { id: item.id || item._id } })
+  } else ElMessage({ message: '未登录!', type: 'error' })
 }
 const currentPage = ref(1)
 // 分页