|
@@ -23,36 +23,42 @@
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="two">
|
|
|
- <el-col
|
|
|
- :span="24"
|
|
|
- class="list"
|
|
|
- v-for="(item, index) in list"
|
|
|
- :key="index"
|
|
|
- @click="toView(item)"
|
|
|
- >
|
|
|
- <el-col :span="24" class="name">
|
|
|
- <el-tooltip effect="dark" :content="item.name" placement="top">
|
|
|
- {{ item.name || '暂无需求名称' }}
|
|
|
- </el-tooltip>
|
|
|
- </el-col>
|
|
|
- <el-row class="other">
|
|
|
- <el-col :span="8" class="other_1">
|
|
|
- <span>技术领域:</span>
|
|
|
- {{ getDict(item.field || '暂无技术领域', 'field') }}
|
|
|
- </el-col>
|
|
|
- <el-col :span="8" class="other_1">
|
|
|
- <span>需求地区:</span>
|
|
|
- {{ getArea(item.area || '暂无需求地区') }}
|
|
|
- </el-col>
|
|
|
- <el-col :span="8" class="other_1">
|
|
|
- <span>单位:</span>
|
|
|
- {{ item.user || '暂无单位' }}
|
|
|
+ <a-list :loading="loading" :grid="{ gutter: 14, column: 4 }" :data-source="list">
|
|
|
+ <template #renderItem="{ item }">
|
|
|
+ <el-col :span="24" class="list" @click="toView(item)">
|
|
|
+ <el-col :span="24" class="name textOver">
|
|
|
+ <el-tooltip effect="dark" :content="item.name" placement="top">
|
|
|
+ {{ item.name || '暂无姓名' }}
|
|
|
+ </el-tooltip>
|
|
|
+ <div class="tags">
|
|
|
+ <el-tag type="primary" v-if="item.title">{{
|
|
|
+ getDict(item.title || '暂无', 'title')
|
|
|
+ }}</el-tag>
|
|
|
+ <el-tag type="success" v-if="item.education">{{
|
|
|
+ getDict(item.education || '暂无', 'education')
|
|
|
+ }}</el-tag>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="two_1">
|
|
|
+ <span>所在地区:</span>
|
|
|
+ {{ getArea(item.area || '暂无地区') }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="two_1">
|
|
|
+ <span>技术领域:</span>
|
|
|
+ {{ getDict(item.field || '暂无', 'field') }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="two_1 textOver">
|
|
|
+ <span>研究方向:</span>
|
|
|
+ {{ item.direction || '暂无' }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="bottom">
|
|
|
+ <el-button @click="toChat(item)" type="primary" size="small">
|
|
|
+ 联络专家
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-col :span="24" class="brief textOver">
|
|
|
- {{ item.brief || '没有更多需求简介' }}
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
+ </template>
|
|
|
+ </a-list>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="thr">
|
|
|
<el-pagination
|
|
@@ -77,9 +83,9 @@
|
|
|
const $checkRes = inject('$checkRes')
|
|
|
import { get } from 'lodash-es'
|
|
|
// 接口
|
|
|
-import { DemandStore } from '@/store/api/platform/demand'
|
|
|
+// import { DemandStore } from '@/store/api/platform/demand'
|
|
|
import { DictDataStore } from '@/store/api/system/dictData'
|
|
|
-const store = DemandStore()
|
|
|
+// const store = DemandStore()
|
|
|
const dictDataStore = DictDataStore()
|
|
|
// 图片引入
|
|
|
import demand from '@/assets/innovation.png'
|
|
@@ -89,12 +95,33 @@ const router = useRouter()
|
|
|
const loading = ref(false)
|
|
|
const searchForm = ref({})
|
|
|
// 列表
|
|
|
-const list = ref([])
|
|
|
+const list = ref([
|
|
|
+ {
|
|
|
+ brief: '简介',
|
|
|
+ name: '徐教授',
|
|
|
+ title: '0',
|
|
|
+ education: '0',
|
|
|
+ area: ['吉林省', '长春市'],
|
|
|
+ field: '0',
|
|
|
+ direction: '主要研究方向为渔业资源评估和管理、渔业海洋学,主要从事渔业采样'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ brief: '简介',
|
|
|
+ name: '徐教授',
|
|
|
+ title: '0',
|
|
|
+ education: '0',
|
|
|
+ area: ['吉林省', '长春市'],
|
|
|
+ field: '0',
|
|
|
+ direction: '主要研究方向为渔业资源评估和管理、渔业海洋学,主要从事渔业采样'
|
|
|
+ }
|
|
|
+])
|
|
|
let skip = 0
|
|
|
let limit = inject('limit')
|
|
|
-const total = ref(20)
|
|
|
+const total = ref(0)
|
|
|
// 字典表
|
|
|
+const educationList = ref([])
|
|
|
const fieldList = ref([])
|
|
|
+const titleList = ref([])
|
|
|
const searchList = ref([
|
|
|
{
|
|
|
title: '技术领域',
|
|
@@ -114,17 +141,14 @@ const searchList = ref([
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- title: '合作方式',
|
|
|
+ title: '职称',
|
|
|
list: [
|
|
|
- { value: '0', label: '全部' },
|
|
|
- { value: '1', label: '技术开发' },
|
|
|
- { value: '2', label: '技术咨询' },
|
|
|
- { value: '3', label: '技术服务' },
|
|
|
- { value: '4', label: '许可转让' },
|
|
|
- { value: '4', label: '完全转让' },
|
|
|
- { value: '4', label: '技术入股' },
|
|
|
- { value: '4', label: '合作开发' },
|
|
|
- { value: '4', label: '其他' }
|
|
|
+ { value: '0', label: '高级工程师' },
|
|
|
+ { value: '1', label: '副教授' },
|
|
|
+ { value: '2', label: '教授' },
|
|
|
+ { value: '3', label: '副研究员' },
|
|
|
+ { value: '4', label: '研究员' },
|
|
|
+ { value: '5', label: '讲师' }
|
|
|
]
|
|
|
},
|
|
|
{
|
|
@@ -157,17 +181,18 @@ const searchList = ref([
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- title: '需求状态',
|
|
|
+ title: '学历',
|
|
|
list: [
|
|
|
- { value: '0', label: '全部' },
|
|
|
- { value: '1', label: '洽谈中' },
|
|
|
- { value: '2', label: '已结束' }
|
|
|
+ { value: '0', label: '本科' },
|
|
|
+ { value: '1', label: '博士' },
|
|
|
+ { value: '2', label: '硕士' },
|
|
|
+ { value: '3', label: '研究生' }
|
|
|
]
|
|
|
}
|
|
|
])
|
|
|
// 查看
|
|
|
const toView = (item) => {
|
|
|
- router.push({ path: '/demand/detail', query: { id: item.id || item._id } })
|
|
|
+ router.push({ path: '/expert/detail', query: { id: item.id || item._id } })
|
|
|
}
|
|
|
// 请求
|
|
|
onMounted(async () => {
|
|
@@ -178,28 +203,36 @@ onMounted(async () => {
|
|
|
})
|
|
|
const searchOther = async () => {
|
|
|
let result
|
|
|
+ // 学历
|
|
|
+ result = await dictDataStore.query({ code: 'education', is_use: '0' })
|
|
|
+ if ($checkRes(result)) educationList.value = result.data
|
|
|
// 技术领域
|
|
|
result = await dictDataStore.query({ code: 'field', is_use: '0' })
|
|
|
if ($checkRes(result)) fieldList.value = result.data
|
|
|
+ // 职称
|
|
|
+ result = await dictDataStore.query({ code: 'title', is_use: '0' })
|
|
|
+ if ($checkRes(result)) titleList.value = result.data
|
|
|
}
|
|
|
const search = async (query = { skip: 0, limit }) => {
|
|
|
- const info = {
|
|
|
- skip: query.skip,
|
|
|
- limit: query.limit,
|
|
|
- ...searchForm.value,
|
|
|
- is_use: '0',
|
|
|
- status: '1'
|
|
|
- }
|
|
|
- const res = await store.query(info)
|
|
|
- if (res.errcode == '0') {
|
|
|
- list.value = res.data
|
|
|
- total.value = res.total
|
|
|
- }
|
|
|
+ // const info = {
|
|
|
+ // skip: query.skip,
|
|
|
+ // limit: query.limit,
|
|
|
+ // ...searchForm.value,
|
|
|
+ // is_use: '0',
|
|
|
+ // status: '1'
|
|
|
+ // }
|
|
|
+ // const res = await store.query(info)
|
|
|
+ // if (res.errcode == '0') {
|
|
|
+ // list.value = res.data
|
|
|
+ // total.value = res.total
|
|
|
+ // }
|
|
|
}
|
|
|
// 字典数据转换
|
|
|
const getDict = (data, model) => {
|
|
|
let res
|
|
|
+ if (model == 'education') res = educationList.value.find((f) => f.value == data)
|
|
|
if (model == 'field') res = fieldList.value.find((f) => f.value == data)
|
|
|
+ if (model == 'title') res = titleList.value.find((f) => f.value == data)
|
|
|
return get(res, 'label')
|
|
|
}
|
|
|
// 地区显示
|
|
@@ -241,7 +274,7 @@ const sizeChange = (limits) => {
|
|
|
border-bottom: #9d9898 1px dashed;
|
|
|
|
|
|
.left {
|
|
|
- background: #778cb3;
|
|
|
+ background: #2280ff;
|
|
|
border-radius: 15px;
|
|
|
line-height: 26px;
|
|
|
color: #fff;
|
|
@@ -271,48 +304,71 @@ const sizeChange = (limits) => {
|
|
|
}
|
|
|
|
|
|
.two {
|
|
|
- margin-top: 20px;
|
|
|
- background: #ffffff;
|
|
|
- border-radius: 10px;
|
|
|
- padding: 15px;
|
|
|
-
|
|
|
+ margin: 15px;
|
|
|
.list {
|
|
|
- margin-bottom: 30px;
|
|
|
- border-bottom: 1px solid #ebebeb;
|
|
|
- padding-bottom: 10px;
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.03);
|
|
|
+ border-radius: 2px;
|
|
|
+ width: 285px;
|
|
|
+ height: 195px;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.3s;
|
|
|
+ padding: 20px;
|
|
|
|
|
|
.name {
|
|
|
- color: #337ab7;
|
|
|
- font-size: 18px;
|
|
|
- font-weight: bold;
|
|
|
- display: inline-block;
|
|
|
- margin: 10px 0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #121834;
|
|
|
+ font-weight: 500;
|
|
|
+ margin: 5px 0 0 0;
|
|
|
+ .tags {
|
|
|
+ grid-gap: 0.5rem;
|
|
|
+ gap: 0.5rem;
|
|
|
+ display: flex;
|
|
|
+ margin: 0 0 0 10px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.name:hover {
|
|
|
color: #2374ff;
|
|
|
}
|
|
|
|
|
|
- .other {
|
|
|
- padding: 5px 0;
|
|
|
+ .two_1 {
|
|
|
+ font-size: 12px;
|
|
|
+ text-align: justify;
|
|
|
+ line-height: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ letter-spacing: 0;
|
|
|
+ color: #8f97a3;
|
|
|
+ margin-top: 10px;
|
|
|
|
|
|
- .other_1 {
|
|
|
- font-family: 'PingFangSC-Light', 'Microsoft YaHei', 'WenQuanYi Micro Hei', arial,
|
|
|
- sans-serif;
|
|
|
- font-size: 12px;
|
|
|
- font-weight: normal;
|
|
|
+ span:last-child {
|
|
|
+ color: #525a68;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .other_1:hover {
|
|
|
- color: #2374ff;
|
|
|
+ .bottom {
|
|
|
+ margin: 20px 10px;
|
|
|
+ text-align: right;
|
|
|
+ .button {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 12px;
|
|
|
+ font-weight: 500;
|
|
|
+ padding: 5px 12px;
|
|
|
+ background: #2374ff;
|
|
|
+ box-shadow: 0 3px 6px 0 rgba(35, 116, 255, 0.1);
|
|
|
+ border-radius: 2px;
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .brief {
|
|
|
- line-height: 30px;
|
|
|
- color: #666;
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
+ .list:hover {
|
|
|
+ background: #f0f7ff;
|
|
|
+ box-shadow: 0 0 16px rgba(205, 205, 205, 0.6);
|
|
|
}
|
|
|
}
|
|
|
|