Commit 2ed280d8 by 严立

LL - 新增日历查看功能

parent d4fb1cf2
......@@ -5,7 +5,7 @@ let output = {
resources: 'http://bid-web.meiqicloud.com',
agentSignIn: 'http://bid-vue.meiqicloud.com/'
// 正式环境
// -正式环境
// base: '/Api/',
// resources: 'https://www.fjbidding.com',
// agentSignIn: 'https://www.fjbidding.com/admin/'
......
......@@ -31,6 +31,7 @@ export default new Router({
children: [
{ path: '/', name: 'bidList', mapText: '招标公告', component: () => import('@/view/public/bid-list.vue') },
{ path: 'notice', name: 'bidNotice', mapText: '公告详情', component: () => import('@/view/public/bid-notice.vue') },
{ path: 'history', name: 'bidHistoricalNotice', mapText: '公告详情', component: () => import('@/view/public/bid-history.vue') },
{ path: 'buy', name: 'buy', mapText: '订单确认', component: () => import('@/view/public/bid-buy.vue') },
{ path: 'buyresult', name: 'buyResult', mapText: '完成报名', component: () => import('@/view/public/bid-buy-result.vue') },
]
......
import iMiment from 'miment'
import iHost from '@/common/js/host.js'
import iRequest from '@/common/js/request/request.js'
let output = function (thisVue, id, type, isPreview) {
let funcRequestDetail
let funcRequestOther
let funcMap = []
let funcProject = {} // 项目数据
// 竞价报价公告
funcMap = [ { text: '招标公告', redirect: '/bid' }, { text: '历史公告', redirect: null }]
let funcParam = {
'id': id
}
// 预览公告独有字段
if (isPreview) funcParam.preview = 1
iRequest.request(iHost.base + 'bid/zTenderNotice/getHistoryNotice', funcParam, 'json', 'post')
.then((funcResponse) => {
console.log(funcResponse)
funcProject = {
'noticeId': id,
'noticeType': type,
'noticeTitle': funcResponse.title,
'contentHtml': funcResponse.content,
'timeRelease': funcResponse.releasetime,
}
console.log(funcProject)
thisVue.$store.commit('componentProject', funcProject)
thisVue.noticeData(funcMap, funcProject)
})
.catch((funcError) => {})
}
export default output
\ No newline at end of file
<template>
<div class="public-bid-details">
<div class="main">
<!-- 页面地图 -->
<div>
<currencyMap :customPath="componentMap"></currencyMap>
</div>
<div class="info-title col">
<span>{{componentProject.noticeTitle}}</span>
<span><i class="el-icon-time"></i>{{'发布时间:' + componentProject.timeRelease}}</span>
</div>
<!-- 具体内容 -->
<div class="info-item">
<div class="title title-decorate row align-c">
<span>公告内容</span>
</div>
<div class="content" v-html="componentProject.contentHtml"></div>
</div>
</div>
</div>
</template>
<script>
// npm
import iMiment from 'miment'
// 工具
import iHost from '@/common/js/host.js'
import iRequest from '@/common/js/request/request.js'
import iRuleAtom from '@/common/js/rule/atom.js'
// 组件
import iCurrencyMap from '@/components/currency-map.vue'
import iNotice from './bid-history.js'
export default {
components: {
currencyMap: iCurrencyMap,
},
data: function () {
return {
projectId: '', // 项目标识
noticeId: 0, // 项目标识
componentMap: [], // 地图路径
componentProject: {}, // 项目数据
isPreview: false,
}
},
watch:{
$route: function () {
this.initKey()
iNotice(this, this.noticeId, '')
}
},
created: function () {
clearInterval(this.quoteTimer)
this.initKey()
iNotice(this, this.noticeId, '', this.isPreview)
},
methods: {
initKey: function () {
this.noticeId = this.$route.query.id
this.isPreview = this.$route.query.preview ? true : false
},
noticeData: function (funcMap, funcProject) {
this.componentMap = funcMap
this.componentProject = funcProject
},
}
}
</script>
<style lang="less">
.public-bid-details {
width: 1200px;
min-height: 490px;
margin: 36px 0;
padding: 32px 32px 0 32px;
background: @colorWhite;
box-shadow:0px 0px 20px 0px rgba(41,41,41,0.05);
.title {
width: 100%;
height: 50px;
margin-bottom: 24px;
border-bottom: 1px #F2F2F2 solid;
span {
font-size: @fontSize04;
}
}
.title-decorate:before{
content: '';
display: inline-block;
width: 4px;
height: 20px;
margin-right: 10px;
overflow: hidden;
background-image: linear-gradient(#CF2F1E 20%, #00468C 20%, #00468C 100%);
}
.info-title {
width: 1140px;
margin-top: 20px;
border-bottom: 1px #F2F2F2 solid;
> span:nth-child(1) {
word-wrap: break-word;
font-weight: 800;
font-size: @fontSize06;
}
> span:nth-child(2) {
margin: 20px 0;
color: @colorGrey40;
font-size: @fontSize01;
}
}
.info-item {
width: 1140px;
margin-bottom: 54px;
// 公告富文本相关默认样式
.content {
overflow: hidden;
line-height: 1.5;
// 对应后台富文本编辑边框样式
table {
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
th {
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
text-align: center;
}
td {
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
padding: 3px 5px;
}
}
p {
line-height: 2;
}
}
}
}
</style>
\ No newline at end of file
......@@ -214,6 +214,7 @@
'time': iMiment(funcResponse.list[i].releaseTime).format('YYYY-MM-DD'),
'title': funcResponse.list[i].title,
'typeId': iDictionary.noticeType.mapping[iDictionary.noticeType.raw.indexOf(Number(funcResponse.list[i].noticeType))],
'isHistoricalData': Boolean(Number(funcResponse.list[i].history))
}
if (funcItem.type === '-') {
......@@ -334,7 +335,12 @@
},
onBidDetails: function (funcItem) {
this.$router.push('/bid/notice?type=' + funcItem.typeId + '&id=' + funcItem.id)
console.log(funcItem)
if (funcItem.isHistoricalData) {
this.$router.push('/bid/history?id=' + funcItem.id)
} else {
this.$router.push('/bid/notice?type=' + funcItem.typeId + '&id=' + funcItem.id)
}
},
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment