This commit is contained in:
cxc
2022-10-31 17:46:09 +08:00
parent 652ce4c9d3
commit c2327f30cb
63 changed files with 1698 additions and 479 deletions

View File

@ -63,8 +63,10 @@ const queryParams = reactive({
query: route.query.keyword,
});
function handleQuery(keyword) {
queryParams.query = keyword;
function handleQuery(state) {
// state.keyword = keyword;
queryParams.query = state.currentKeyword;
queryParams.queryType = state.queryType;
getDataList();
}

View File

@ -23,19 +23,19 @@
<div>{{ state.expertDetail.introduce }}</div>
</template>
</achievementItem>
<div class="btns">
<!-- <div class="btns">
<div class="order">预约对接</div>
<div class="share">一键分享</div>
</div>
</div> -->
<div class="detail">
<div style="padding: 20px 0">
<!-- <div style="padding: 20px 0">
<div class="pointTit">技术视频</div>
</div>
</div> -->
<div style="padding: 20px 0">
<div class="pointTit">产品详情</div>
<div class="pointTit">成果简介</div>
</div>
<div class="html" v-html="state.expertDetail.introduce"></div>
<div class="html" v-html="state.expertDetail.description"></div>
</div>
</div>
<div class="r">
@ -56,6 +56,7 @@ import request from "@/utils/request";
import searchContainer from "./components/searchContainer.vue";
import wordcloud from "./components/wordcloud.vue";
import productItem from "./components/productItem.vue";
import { searchAchievementDetail } from "../../../api/website/home";
import { useRoute, useRouter } from "vue-router";
import { reactive, ref } from "vue";
@ -123,19 +124,23 @@ function handleDetail(id) {
}
function handleList(mode, keyword) {
router.push({ path: `/searchList/${mode}`, query: { keyword } });
router.push({
path: `/searchList/${mode}`,
query: { keyword, queryType: route.query.queryType },
});
}
// 首次加载数据,其后跳转页面
let flag = true;
function handleQuery(keyword) {
state.keyword = keyword;
function handleQuery(state) {
// queryParams.query = state.currentKeyword;
// queryParams.queryType = state.queryType;
if (flag) {
getDataList();
flag = false;
} else {
handleList(0, keyword);
handleList("achievement", state.currentKeyword);
}
}
@ -143,14 +148,15 @@ function getDataList() {
loading.value = true;
let id = route.params.id;
if (!id) return;
// achievementDetail(id)
// .then((res) => {
// if (200 == res.code) {
// console.log(res.data);
// state.expertDetail = res.data;
// loading.value = false;
// }
// })
searchAchievementDetail(id)
// achievementDetail(id)
.then((res) => {
// if (200 == res.code) {
console.log(res.data);
state.expertDetail = res.data;
loading.value = false;
// }
});
// .catch(() => {
// loading.value = false;
// });

View File

@ -29,7 +29,7 @@
<div class="keywords">
<wordcloud
v-if="data.keywords"
:data="createdData(data.customers ?? [])"
:data="createdData(data.keywords ?? [])"
></wordcloud>
</div>
<!-- <collectAndVisit
@ -49,7 +49,8 @@
import wordcloud from "./wordcloud.vue";
// import collectAndVisit from "./collectAndVisit.vue";
import { maturityOptions } from "@/utils/parameter.js";
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();
const props = defineProps({
@ -62,8 +63,13 @@ const props = defineProps({
function handleDetail(id) {
let routeData = router.resolve({
path: `/searchList/achievement/detail/${id}`,
query: {
keyword: route.query.keyword,
queryType: route.query.queryType,
},
});
window.open(routeData.href, "_blank");
router.push(routeData);
// window.open(routeData.href, "_blank");
}
function createdData(arr) {

View File

@ -39,7 +39,7 @@
</el-col>
</div>
<div class="line">
研究方向
研究信息
<span>{{ data.research }}</span>
</div>
<div
@ -66,9 +66,10 @@
<script setup name="ExpertItem">
import wordcloud from "./wordcloud.vue";
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
// import collectAndVisit from "./collectAndVisit.vue";
const route = useRoute();
const router = useRouter();
const props = defineProps({
data: {
@ -78,8 +79,15 @@ const props = defineProps({
});
function handleDetail(id) {
let routeData = router.resolve({ path: `/searchList/expert/detail/${id}` });
window.open(routeData.href, "_blank");
let routeData = router.resolve({
path: `/searchList/expert/detail/${id}`,
query: {
keyword: route.query.keyword,
queryType: route.query.queryType,
},
});
router.push(routeData);
// window.open(routeData.href, "_blank");
}
function createdData(arr) {

View File

@ -48,7 +48,8 @@
import { maturityOptions } from "@/utils/parameter";
import wordcloud from "./wordcloud.vue";
import collectAndVisit from "./collectAndVisit.vue";
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
const route = useRoute();
const router = useRouter();
const props = defineProps({
data: {
@ -58,8 +59,15 @@ const props = defineProps({
});
function handleDetail(id) {
let routeData = router.resolve({ path: `/searchList/patent/detail/${id}` });
window.open(routeData.href, "_blank");
let routeData = router.resolve({
path: `/searchList/patent/detail/${id}`,
query: {
keyword: route.query.keyword,
queryType: route.query.queryType,
},
});
// window.open(routeData.href, "_blank");
router.push(routeData);
}
function createdData(arr) {

View File

@ -8,14 +8,37 @@
>
<div class="conter1000">
<div class="tit">{{ title }}</div>
<el-input
v-model.trim="state.currentKeyword"
placeholder="请输入检索词"
>
<template #append>
<el-button icon="Search" @click="handleQuery">搜索</el-button>
</template>
</el-input>
<el-form :model="state" :rules="queryRules" ref="queryRef">
<el-input
v-model.trim="state.currentKeyword"
placeholder="请输入检索词"
>
<template #suffix>
<el-form-item prop="queryType">
<el-select
v-model="state.queryType"
placeholder="请选择搜索类型"
class="search-type-select"
>
<el-option
v-for="item in queryTypeList[route.meta.searchType - 1]"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</template>
<template #append>
<el-button
:disabled="!state.currentKeyword"
icon="Search"
@click="handleQuery"
>搜索</el-button
>
</template>
</el-input>
</el-form>
</div>
</div>
<div class="conter1000">
@ -30,12 +53,25 @@ import webFooter from "@/components/webFooter/index.vue";
import { banner } from "@/api/website/home/index";
import { useRoute, useRouter } from "vue-router";
import { reactive, ref } from "vue";
import router from "../../../../router";
const route = useRoute();
// console.log(route.query.queryType);
// const queryType = route.query.queryType;
const loading = ref(true);
const state = reactive({
currentKeyword: "",
queryType: route.query.queryType,
});
// state.queryType = route.query.queryType;
// state.queryType = queryType;
const queryRules = reactive({
queryType: [{ required: true, trigger: "change", message: "请选择搜索类型" }],
keyword: [{ required: true, trigger: "blur", message: "请选择搜索关键词" }],
});
const queryRef = ref();
const props = defineProps({
title: {
type: String,
@ -49,8 +85,46 @@ const props = defineProps({
});
const emit = defineEmits();
function handleQuery() {
emit("handleQuery", state.currentKeyword);
const queryTypeList = [
[
{ value: "1", label: "通过企业名称搜索" },
{ value: "2", label: "通过企业简介搜索" },
{ value: "3", label: "通过关键词搜索" },
{ value: "4", label: "通过生产方向搜索" },
{ value: "5", label: "通过产品搜索" },
],
[
{
value: "1",
label: "通过成果名称搜索",
},
],
[],
[
{ value: "1", label: "通过标题搜索" },
{ value: "2", label: "通过摘要搜索" },
{ value: "3", label: "通过主权项搜索" },
],
[
{ value: "1", label: "通过专家名称搜索" },
{ value: "2", label: "通过个人简介搜索" },
{ value: "3", label: "通过关键词搜索" },
],
[{ value: "1", label: "通过标题搜索" }],
[{ value: "1", label: "通过标题搜索" }],
];
async function handleQuery() {
// state.queryType = route.query.queryType;
// await queryRef.value.validate();
router.replace({
path: route.path,
query: {
...route.query,
keyword: state.currentKeyword,
queryType: state.queryType,
},
});
emit("handleQuery", state);
}
onMounted(() => {
@ -67,6 +141,9 @@ onMounted(() => {
});
</script>
<style lang="scss" scoped>
:deep(.search-type-select) {
box-sizing: 0 0 0 0;
}
.searchContainer {
width: 100%;
min-height: 100%;

View File

@ -48,8 +48,9 @@
import { maturityOptions } from "@/utils/parameter";
import wordcloud from "./wordcloud.vue";
import collectAndVisit from "./collectAndVisit.vue";
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const route = useRoute();
const props = defineProps({
data: {
type: Object,
@ -60,8 +61,13 @@ const props = defineProps({
function handleDetail(id) {
let routeData = router.resolve({
path: `/searchList/serviceDemand/detail/${id}`,
query: {
keyword: route.query.keyword,
queryType: route.query.queryType,
},
});
window.open(routeData.href, "_blank");
// window.open(routeData.href, "_blank");
router.push(routeData);
}
function createdData(arr) {

View File

@ -48,8 +48,9 @@
import { maturityOptions } from "@/utils/parameter";
import wordcloud from "./wordcloud.vue";
import collectAndVisit from "./collectAndVisit.vue";
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const route = useRoute();
const props = defineProps({
data: {
type: Object,
@ -60,8 +61,12 @@ const props = defineProps({
function handleDetail(id) {
let routeData = router.resolve({
path: `/searchList/technologyDemand/detail/${id}`,
query: {
keyword: route.query.keyword,
queryType: route.query.queryType,
},
});
window.open(routeData.href, "_blank");
router.push(routeData);
}
function createdData(arr) {

View File

@ -18,7 +18,8 @@
<div class="item" v-for="item in searchResults" :key="item.id">
<el-row type="flex" style="padding: 40px 20px">
<div class="img">
<img :src="item.image" alt />
<!-- <img :src="item.image" alt /> -->
<el-image :src="item.image"></el-image>
</div>
<div class="content">
<div class="tit" @click="handleDetail(item.id)">
@ -34,7 +35,10 @@
</div>
<div class="line">
企业规模
<span>{{ item.kind_title || "后台暂没提供" }}</span>
<span>{{
enterpriseOptions.find((el) => el.key == item.kind)
?.value ?? "后台暂没提供"
}}</span>
</div>
<div class="line">
核心产品及应用场景 <span>{{ item.product }}</span>
@ -76,6 +80,7 @@
<script setup>
import WebContact from "@/components/webContact/index.vue";
import request from "@/utils/request";
import { enterpriseOptions } from "@/utils/parameter";
import { search } from "@/api/website/home/index";
import { onMounted } from "vue";
import searchContainer from "./components/searchContainer.vue";
@ -98,9 +103,9 @@ const queryParams = reactive({
function handleDetail(id) {
let routeData = router.resolve({
path: `/searchList/enterprise/detail/${id}`,
query: { keyword: queryParams.query },
query: { keyword: queryParams.query, queryType: route.query.queryType },
});
window.open(routeData.href, "_blank");
router.push(routeData);
}
const loading = ref(true);
@ -160,9 +165,10 @@ function createdData(arr) {
// });
// }
function handleQuery(keyword) {
function handleQuery(state) {
// state.keyword = keyword;
queryParams.query = keyword;
queryParams.query = state.currentKeyword;
queryParams.queryType = state.queryType;
getDataList();
}
function industryChange(industry) {
@ -224,7 +230,7 @@ const getDataList = async () => {
display: flex;
align-items: center;
justify-content: center;
img {
:deep(.el-image) {
width: 90px;
height: 90px;
border-radius: 50%;

View File

@ -21,11 +21,12 @@
<div class="item">
<el-row type="flex" style="padding: 40px 20px">
<div class="img">
<img :src="state.companyDetail.image" alt />
<el-image :src="state.companyDetail.image"></el-image>
<!-- <img :src="state.companyDetail.image" alt /> -->
</div>
<div class="content">
<div class="tit">
<div style="float: right">
<div style="float: right; visibility: hidden">
<span>匹配度</span>
<el-rate
style="display: inline-block"
@ -39,7 +40,11 @@
</div>
<div class="line">
企业规模:
<span>{{ state.companyDetail.kind_title }}</span>
<span>{{
enterpriseOptions.find(
(el) => el.key == state.companyDetail.kind
)?.value ?? "后台暂未提供"
}}</span>
</div>
<div class="line">
核心产品及应用场景:
@ -58,10 +63,10 @@
:data="createdData(state.companyDetail.keywords)"
></wordcloud>
</div>
<div class="btns">
<!-- <div class="btns">
<div class="order">预约对接</div>
<div class="share">一键分享</div>
</div>
</div> -->
</el-row>
</div>
@ -99,7 +104,8 @@
<div class="item" v-for="item in state.list" :key="item.id">
<el-row type="flex" style="padding: 40px 20px">
<div class="img">
<img :src="item.image" alt />
<!-- <img :src="item.image" alt /> -->
<el-image :src="item.image" />
</div>
<div class="content">
<div class="tit" @click="handleDetail(item.id)">
@ -117,7 +123,14 @@
</div>
<div class="line">
企业规模
<span>{{ item.kind_title || "后台暂没提供" }}</span>
<span>{{
enterpriseOptions.find((el) => el.key == item.kind)
?.value ?? "后台暂未提供"
}}</span>
<!-- <span>{{
enterpriseOptions.find((el) => el.key == item.kind)
.value || "后台暂没提供"
}}</span> -->
</div>
<div class="line">
核心产品及应用场景
@ -148,11 +161,13 @@
import webContact from "@/components/webContact/index.vue";
import request from "@/utils/request";
import { searchEnterpriseDetail } from "@/api/website/home";
import { enterpriseOptions } from "@/utils/parameter";
import { onMounted, reactive, ref } from "vue";
import searchContainer from "./components/searchContainer.vue";
import wordcloud from "./components/wordcloud.vue";
import productItem from "./components/productItem.vue";
import { useRoute, useRouter } from "vue-router";
import { search } from "../../../api/website/home";
const router = useRouter();
const route = useRoute();
const loading = ref(true);
@ -217,26 +232,30 @@ function createdData(arr) {
function handleDetail(id) {
let routeData = router.resolve({
path: `/searchList/0/detail/${id}`,
query: { keyword: state.keyword },
path: `/searchList/enterprise/detail/${id}`,
query: { keyword: state.keyword, queryType: route.query.queryType },
});
window.open(routeData.href, "_blank");
// window.open(routeData.href, "_blank");
router.push(routeData);
}
function handleList(mode, keyword) {
router.push({ path: `/searchList/${mode}`, query: { keyword } });
router.push({
path: `/searchList/${mode}`,
query: { keyword, queryType: route.query.queryType },
});
}
// 首次加载数据,其后跳转页面
let flag = true;
function handleQuery(keyword) {
state.keyword = keyword;
function handleQuery(state) {
state.keyword = state.currentKeyword;
if (flag) {
getDataList();
flag = false;
} else {
handleList(0, keyword);
handleList("enterprise", state.currentKeyword);
}
}
@ -261,6 +280,17 @@ function getDataList() {
console.log(err);
loading.value = false;
});
search({
query: route.query.keyword,
searchType: 1,
queryType: route.query.queryType,
}).then((resp) => {
const recommendList = resp.list.filter(
(el) => el.id != state.companyDetail.id
);
state.list = recommendList;
state.total = resp.total;
});
// companyProduct(id).then((res) => {
// if (200 == res.code) {
// state.companyProduct = res.data.data;
@ -367,7 +397,7 @@ function getDataList() {
display: flex;
align-items: center;
justify-content: center;
img {
:deep(.el-image) {
width: 90px;
height: 90px;
border-radius: 50%;

View File

@ -92,8 +92,10 @@ const queryParams = reactive({
// return l;
// }
function handleQuery(keyword) {
queryParams.query = keyword;
function handleQuery(state) {
// state.keyword = keyword;
queryParams.query = state.currentKeyword;
queryParams.queryType = state.queryType;
getDataList();
}

View File

@ -19,10 +19,10 @@
<el-row type="flex" style="padding-bottom: 20px">
<div style="flex: 1">
<expertItem :data="state.expertDetail"></expertItem>
<div class="btns">
<!-- <div class="btns">
<div class="order">预约对接</div>
<div class="share">一键分享</div>
</div>
</div> -->
<div class="detail">
<div style="padding: 20px 0">
@ -32,17 +32,21 @@
<div style="padding: 20px 0">
<div class="pointTit">研究方向</div>
</div>
<section v-if="state.expertDetail.researchs">
<section v-if="state.expertDetail.research">
<div
v-for="item in state.expertDetail.researchs"
v-for="item in state.expertDetail.research?.split(',') ?? []"
class="describe"
>
{{ item }}
</div>
</section>
<div style="padding: 20px 0">
<div class="pointTit">专家视频</div>
<!-- <div style="padding: 20px 0">
<div class="pointTit">联系方式</div>
</div>
<div>{{ state.expertDetail.mobile }}</div> -->
<!-- <div style="padding: 20px 0">
<div class="pointTit">专家视频</div>
</div> -->
</div>
<div v-if="state.expertDetail.id" style="padding: 20px 0">
<el-tabs v-model="state.activeName">
@ -306,14 +310,14 @@
</el-tabs>
</div>
<div style="padding: 20px 0">
<!-- <div style="padding: 20px 0">
<div class="pointTit">专家推荐</div>
</div>
<div>
<section v-for="item in state.list" :key="item.id">
<expertItem :data="item"></expertItem>
</section>
</div>
</div> -->
</div>
<div class="r">
<webContact />
@ -454,22 +458,25 @@ function handleDetail(id) {
window.open(routeData.href, "_blank");
}
function handleList(mode, keyword) {
router.push({ path: `/searchList/${mode}`, query: { keyword } });
function handleList(mode, query) {
router.push({
path: `/searchList/${mode}`,
query: { query, queryType: route.query.queryType },
});
}
// 首次加载数据,其后跳转页面
let flag = true;
function handleQuery(keyword) {
function handleQuery(state) {
// loading.value = false;
// return;
state.keyword = keyword;
state.keyword = state.currentKeyword;
if (flag) {
getDataList();
flag = false;
} else {
handleList(0, keyword);
handleList("expert", state.currentKeyword);
}
}

View File

@ -87,9 +87,10 @@ const getSearchResult = async () => {
const resp = await search(queryParams);
console.log(resp);
};
function handleQuery(keyword) {
function handleQuery(state) {
// state.keyword = keyword;
queryParams.query = keyword;
queryParams.query = state.currentKeyword;
queryParams.queryType = state.queryType;
getDataList();
}
function industryChange(industry) {

View File

@ -58,10 +58,10 @@
:data="createdData(state.patentDetail.keywords)"
></wordcloud>
</div>
<div class="btns">
<!-- <div class="btns">
<div class="order">预约对接</div>
<div class="share">一键分享</div>
</div>
</div> -->
</el-row>
</div>
@ -178,7 +178,9 @@ const state = reactive({
},
],
});
const queryParams = reactive({
query: "1313",
});
// 建议 列表前4条
function recommend() {
return request({
@ -228,19 +230,22 @@ function handleDetail(id) {
}
function handleList(mode, keyword) {
router.push({ path: `/searchList/${mode}`, query: { keyword } });
router.push({
path: `/searchList/${mode}`,
query: { keyword, queryType: route.query.queryType },
});
}
// 首次加载数据,其后跳转页面
let flag = true;
function handleQuery(keyword) {
state.keyword = keyword;
function handleQuery(state) {
state.keyword = state.currentKeyword;
if (flag) {
getDataList();
flag = false;
} else {
handleList(0, keyword);
handleList("patent", state.currentKeyword);
}
}

View File

@ -64,8 +64,10 @@ const queryParams = reactive({
query: route.query.keyword,
});
function handleQuery(keyword) {
queryParams.query = keyword;
function handleQuery(state) {
// state.keyword = keyword;
queryParams.query = state.currentKeyword;
queryParams.queryType = state.queryType;
getDataList();
}

View File

@ -62,10 +62,10 @@
:data="createdData(state.demandDetail.keywords)"
></wordcloud>
</div>
<div class="btns">
<!-- <div class="btns">
<div class="order">预约对接</div>
<div class="share">一键分享</div>
</div>
</div> -->
</el-row>
</div>
@ -194,19 +194,22 @@ function createdData(arr) {
}
function handleList(mode, keyword) {
router.push({ path: `/searchList/${mode}`, query: { keyword } });
router.push({
path: `/searchList/${mode}`,
query: { keyword, queryType: route.query.queryType },
});
}
// 首次加载数据,其后跳转页面
let flag = true;
function handleQuery(keyword) {
state.keyword = keyword;
function handleQuery(state) {
state.keyword = state.currentKeyword;
if (flag) {
getDataList();
flag = false;
} else {
handleList(0, keyword);
handleList("serviceDemand", state.currentKeyword);
}
}

View File

@ -63,8 +63,10 @@ const queryParams = reactive({
query: route.query.keyword,
});
function handleQuery(keyword) {
queryParams.value = keyword;
function handleQuery(state) {
// state.keyword = keyword;
queryParams.query = state.currentKeyword;
queryParams.queryType = state.queryType;
getDataList();
}

View File

@ -62,10 +62,10 @@
:data="createdData(state.demandDetail.keywords)"
></wordcloud>
</div>
<div class="btns">
<!-- <div class="btns">
<div class="order">预约对接</div>
<div class="share">一键分享</div>
</div>
</div> -->
</el-row>
</div>
@ -129,19 +129,22 @@ function createdData(arr) {
}
function handleList(mode, keyword) {
router.push({ path: `/searchList/${mode}`, query: { keyword } });
router.push({
path: `/searchList/${mode}`,
query: { keyword, queryType: route.query.queryType },
});
}
// 首次加载数据,其后跳转页面
let flag = true;
function handleQuery(keyword) {
state.keyword = keyword;
function handleQuery(state) {
state.keyword = state.currentKeyword;
if (flag) {
getDataList();
flag = false;
} else {
handleList(0, keyword);
handleList("technologyDemand", state.currentKeyword);
}
}