Commit 96907cf9 authored by 吴冠's avatar 吴冠

详情页处理

parent 617bb851
...@@ -312,6 +312,9 @@ h1 { ...@@ -312,6 +312,9 @@ h1 {
.link-style { .link-style {
cursor: pointer; cursor: pointer;
} }
.el-menu-item.is-active{
color: #ff5203;
}
</style> </style>
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
this.itemTitle = data.title this.itemTitle = data.title
this.itemCode = data.projectId this.itemCode = data.projectId
this.contentList = data.content this.contentList = data.content
this.itemTime = data.createTime this.itemTime = data.createTime.slice(0,10)
} }
} }
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div class="time">{{getTimer(item.createTime)}}</div> <div class="time">{{getTimer(item.createTime)}}</div>
<div class="price-item"> <div class="price-item">
<div class="t1" style="font-weight: bold;"> <div class="t1" style="font-weight: bold;">
<span class="state-red">{{item.noticeType}}</span> <span class="state-red">[{{getchinese(item.noticeType)}}]</span>
<span>{{item.title}}</span> <span>{{item.title}}</span>
</div> </div>
<div class="flex-between"> <div class="flex-between">
...@@ -158,6 +158,32 @@ import Cookies from 'js-cookie' ...@@ -158,6 +158,32 @@ import Cookies from 'js-cookie'
} }
}, },
methods: { methods: {
//将英文转中文
getchinese(str){
switch(str){
case 'ENQUIRY':
return '询价公告'
break;
case 'BIDDING':
return '招标公告'
break;
case 'WIN':
return '中标公告'
break;
case 'CADIDATE':
return '中标候选人公示'
break;
case 'CHANGE':
return '变更公告'
break;
case 'CLARIFIES':
return '澄清公告'
break;
case 'ABORTIVE':
return '流标公告'
break;
}
},
//将类型转为小写 //将类型转为小写
getLowerText(noticeType,noticeId){ getLowerText(noticeType,noticeId){
let url="" let url=""
......
...@@ -60,6 +60,7 @@ export default { ...@@ -60,6 +60,7 @@ export default {
code:'', code:'',
date:'', date:'',
contentList:'', contentList:'',
fileList:[]
} }
}, },
methods:{ methods:{
......
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
const {data} = await getCadidateDetails(id) const {data} = await getCadidateDetails(id)
this.itemTitle = data.title this.itemTitle = data.title
this.itemCode = data.projectId this.itemCode = data.projectId
this.itemTime = data.createTime this.itemTime = data.createTime.slice(0,10)
this.contentList = data.content this.contentList = data.content
console.log(data) console.log(data)
} }
......
...@@ -36,15 +36,6 @@ export default { ...@@ -36,15 +36,6 @@ export default {
this.getChangeDetails(id) this.getChangeDetails(id)
}, },
methods:{ methods:{
getTimer(dateStr){
var date = new Date(dateStr);
var Month = date.getMonth() + 1;
var Day = date.getDate();
var Y = date.getFullYear() + '-';
var M = Month < 10 ? '0' + Month + '-' : Month + '-';
var D = Day + 1 < 10 ? '0' + Day : Day;
return Y + M + D;
},
prev() { prev() {
window.history.go(-1) window.history.go(-1)
}, },
...@@ -53,7 +44,7 @@ export default { ...@@ -53,7 +44,7 @@ export default {
this.itemTitle = data.title this.itemTitle = data.title
this.itemCode = data.projectId this.itemCode = data.projectId
this.contentList = data.content this.contentList = data.content
this.itemTime = data.createTime this.itemTime = data.createTime.slice(0,10)
} }
}, },
} }
......
...@@ -36,15 +36,6 @@ export default { ...@@ -36,15 +36,6 @@ export default {
}, },
methods:{ methods:{
getTimer(dateStr){
var date = new Date(dateStr);
var Month = date.getMonth() + 1;
var Day = date.getDate();
var Y = date.getFullYear() + '-';
var M = Month < 10 ? '0' + Month + '-' : Month + '-';
var D = Day + 1 < 10 ? '0' + Day : Day;
return Y + M + D;
},
prev() { prev() {
window.history.go(-1) window.history.go(-1)
}, },
...@@ -54,7 +45,7 @@ export default { ...@@ -54,7 +45,7 @@ export default {
this.itemTitle = data.title this.itemTitle = data.title
this.itemCode = data.projectId this.itemCode = data.projectId
this.contentList = data.content this.contentList = data.content
this.itemTime = data.createTime this.itemTime = data.createTime.slice(0,10)
} }
} }
} }
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
const {data} = await getWindetails(id) const {data} = await getWindetails(id)
this.itemTitle = data.title this.itemTitle = data.title
this.itemCode = data.projectId this.itemCode = data.projectId
this.itemTime = data.createTime this.itemTime = data.createTime.slice(0,10)
this.contentList = data.content this.contentList = data.content
console.log(id) console.log(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 to comment