【修改bug】回显关键字
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" class="desc-item">
|
<el-col :span="24" class="desc-item">
|
||||||
<label>关键词</label>
|
<label>关键词</label>
|
||||||
<div>{{ row.keyContent || '-' }}</div>
|
<div>{{ getKeyContent(row.keyContent) }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" class="desc-item">
|
<el-col :span="24" class="desc-item">
|
||||||
<label>内容摘要</label>
|
<label>内容摘要</label>
|
||||||
@@ -45,6 +45,23 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getKeyContent(list) {
|
||||||
|
if (list) {
|
||||||
|
let keyContent = []
|
||||||
|
list = JSON.parse(list)
|
||||||
|
list.forEach(item => {
|
||||||
|
keyContent.push(item.text)
|
||||||
|
})
|
||||||
|
keyContent = keyContent.toString().replace(/,/g, '/');
|
||||||
|
if (keyContent == '') keyContent = '---'
|
||||||
|
// if(keyContent.length>15){
|
||||||
|
// keyContent=keyContent.slice(0,15) +'...'
|
||||||
|
// }
|
||||||
|
return keyContent
|
||||||
|
} else {
|
||||||
|
return '-'
|
||||||
|
}
|
||||||
|
},
|
||||||
// 预览
|
// 预览
|
||||||
previewRow () {
|
previewRow () {
|
||||||
if (!this.$route.query.row) {
|
if (!this.$route.query.row) {
|
||||||
|
|||||||
Reference in New Issue
Block a user