|
@@ -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}`
|