|
@@ -5,7 +5,7 @@
|
|
|
<div class="w_1200">
|
|
|
<el-col :span="24" class="one">
|
|
|
<el-row :span="24" class="one_1">
|
|
|
- <el-col :span="22" class="title">{{ info.name || '暂无标题' }}</el-col>
|
|
|
+ <el-col :span="22" class="title">{{ info.company || '暂无标题' }}</el-col>
|
|
|
<el-col :span="2" class="file" @click="toCollection(0)" v-if="info.is_collection">
|
|
|
<el-icon :size="16"><StarFilled /></el-icon>
|
|
|
<span>已收藏</span>
|
|
@@ -18,14 +18,23 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="two">
|
|
|
<a-descriptions bordered>
|
|
|
+ <a-descriptions-item label="发布年份">
|
|
|
+ {{ getDict(info, 'year') }}
|
|
|
+ </a-descriptions-item>
|
|
|
<a-descriptions-item label="行业领域">
|
|
|
- {{ getDict(info.field, 'field') }}
|
|
|
+ {{ getDict(info, 'field') }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="联系人">
|
|
|
+ {{ getDict(info, 'contacts') }}
|
|
|
+ </a-descriptions-item>
|
|
|
+ <a-descriptions-item label="联系电话">
|
|
|
+ {{ getDict(info, 'tel') }}
|
|
|
</a-descriptions-item>
|
|
|
<a-descriptions-item label="需求紧急度">
|
|
|
- {{ getDict(info.urgent, 'urgent') }}
|
|
|
+ {{ getDict(info, 'urgent') }}
|
|
|
</a-descriptions-item>
|
|
|
<a-descriptions-item label="合作方式">
|
|
|
- {{ getDict(info.method, 'method') }}
|
|
|
+ {{ getDict(info, 'method') }}
|
|
|
</a-descriptions-item>
|
|
|
<a-descriptions-item label="有效期">
|
|
|
{{ getTime(info.time) }}
|
|
@@ -39,13 +48,9 @@
|
|
|
<div class="money">
|
|
|
价格:<span> {{ info.money || '面议' }} </span>
|
|
|
</div>
|
|
|
- <a-button v-if="info.status == '1'" type="primary" @click="toDocking">
|
|
|
- 我要对接
|
|
|
- </a-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="pointer" v-if="!user && !user.id">
|
|
|
- 提醒:您还没有登录,登录成功后再对接
|
|
|
+ <a-button v-if="info.status == '1'" type="primary" @click="toDocking"> 我要对接 </a-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="24" class="pointer" v-if="!user && !user.id"> 提醒:您还没有登录,登录成功后再对接 </el-col>
|
|
|
<el-col :span="24" class="thr">
|
|
|
<el-col :span="24" class="thr_1">
|
|
|
<p>单位信息</p>
|
|
@@ -53,11 +58,12 @@
|
|
|
<el-row :span="24" class="thr_2">
|
|
|
<el-col :span="17" class="left">
|
|
|
<el-col :span="24" class="name">
|
|
|
- {{ formatName(userInfo.name) || '暂无单位' }}
|
|
|
+ {{ info.company || '暂无单位' }}
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="other">
|
|
|
<span>联系人</span>
|
|
|
- {{ formatName(userInfo.name) || '暂无联系人' }}
|
|
|
+ {{ info.contacts }} {{ info.tel }}
|
|
|
+ <!-- {{ formatName(userInfo.name) || '暂无联系人' }} -->
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="4" class="right" v-if="info.status == '1'">
|
|
@@ -87,22 +93,15 @@
|
|
|
<el-col :span="24" class="list">
|
|
|
<el-col :span="24" class="name textOver">
|
|
|
<el-tooltip effect="dark" :content="item.name" placement="top">
|
|
|
- {{ item.name || '暂无名称' }}
|
|
|
+ {{ item.company || '暂无名称' }}
|
|
|
</el-tooltip>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" class="two_1">
|
|
|
- <span>行业领域:</span>{{ getDict(item.field, 'field') }}
|
|
|
- </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> {{ formatName(item.userName) || '暂无单位' }}
|
|
|
- </el-col>
|
|
|
+ <el-col :span="24" class="two_1"> <span>行业领域:</span>{{ getDict(item, 'field') }} </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> {{ formatName(item.userName) || '暂无单位' }} </el-col> -->
|
|
|
+ <el-col :span="24" class="two_1"> <span>发布年份:</span> {{ item.year }} </el-col>
|
|
|
<el-col :span="24" class="bottom">
|
|
|
- <a-button size="small" type="primary" @click="toView(item)">
|
|
|
- 查看详情
|
|
|
- </a-button>
|
|
|
+ <a-button size="small" type="primary" @click="toView(item)"> 查看详情 </a-button>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</template>
|
|
@@ -143,6 +142,7 @@ const dictDataStore = DictDataStore()
|
|
|
const collectionStore = CollectionStore()
|
|
|
|
|
|
import { UserStore } from '@/store/user'
|
|
|
+import { watch } from 'vue'
|
|
|
const userStore = UserStore()
|
|
|
const user = computed(() => userStore.user)
|
|
|
// 路由
|
|
@@ -164,12 +164,15 @@ let limit = inject('limit')
|
|
|
const total = ref(0)
|
|
|
// 请求
|
|
|
onMounted(async () => {
|
|
|
+ init()
|
|
|
+})
|
|
|
+const init = async () => {
|
|
|
loading.value = true
|
|
|
await searchOther()
|
|
|
await search()
|
|
|
await searchAchieve({ skip, limit })
|
|
|
loading.value = false
|
|
|
-})
|
|
|
+}
|
|
|
const search = async () => {
|
|
|
let id = route.query.id
|
|
|
if (id) {
|
|
@@ -208,11 +211,12 @@ const searchOther = async () => {
|
|
|
// 字典数据转换
|
|
|
const getDict = (data, model) => {
|
|
|
let res
|
|
|
- if (model == 'method') res = methodList.value.find((f) => f.value == data)
|
|
|
- else if (model == 'urgent') res = urgentList.value.find((f) => f.value == data)
|
|
|
- else if (model == 'field') res = fieldList.value.find((f) => f.value == data)
|
|
|
- else if (model == 'demand') res = demandList.value.find((f) => f.value == data)
|
|
|
- return get(res, 'label')
|
|
|
+ // if (model == 'method') res = methodList.value.find((f) => f.value == data)
|
|
|
+ // else if (model == 'urgent') res = urgentList.value.find((f) => f.value == data)
|
|
|
+ // else if (model == 'field') res = fieldList.value.find((f) => f.value == data)
|
|
|
+ // else if (model == 'demand') res = demandList.value.find((f) => f.value == data)
|
|
|
+ // return get(res, 'label')
|
|
|
+ return get(data, model)
|
|
|
}
|
|
|
// 时间
|
|
|
const getTime = (data) => {
|
|
@@ -266,6 +270,7 @@ const toCollection = async (status) => {
|
|
|
// 查看
|
|
|
const toView = (item) => {
|
|
|
router.push({ path: '/demand/detail', query: { id: item.id || item._id } })
|
|
|
+ init()
|
|
|
}
|
|
|
const formatName = (str) => {
|
|
|
if (str) return str.substr(0, 1) + new Array(str.length).join('*')
|