Commit fd7b27de by Lyan

修改

parent 023a6dd5
...@@ -92,6 +92,9 @@ ...@@ -92,6 +92,9 @@
align="left" align="left"
width="360px" width="360px"
label="文章标题"> label="文章标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="author" prop="author"
...@@ -236,7 +239,8 @@ export default { ...@@ -236,7 +239,8 @@ export default {
updateDate: [], updateDate: [],
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
...@@ -292,6 +296,9 @@ export default { ...@@ -292,6 +296,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.dataList = [] this.dataList = []
this.totalPage = 0 this.totalPage = 0
...@@ -314,6 +321,27 @@ export default { ...@@ -314,6 +321,27 @@ export default {
selectionChangeHandle (val) { selectionChangeHandle (val) {
this.dataListSelections = val this.dataListSelections = val
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = `${this.$store.state.config.urls}/News/msg?id=${item.id}&token=${data.data}`
this.$set(this.urlsJson, item.title, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
}
},
// 预览 // 预览
previewHandle (info) { previewHandle (info) {
console.log(info, '预览') console.log(info, '预览')
......
...@@ -78,6 +78,9 @@ ...@@ -78,6 +78,9 @@
align="left" align="left"
width="360px" width="360px"
label="标题"> label="标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="announcetype" prop="announcetype"
...@@ -231,7 +234,8 @@ export default { ...@@ -231,7 +234,8 @@ export default {
piclevelList, piclevelList,
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
...@@ -267,6 +271,9 @@ export default { ...@@ -267,6 +271,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -297,6 +304,27 @@ export default { ...@@ -297,6 +304,27 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = `${this.$store.state.config.urls}/News/NoticeArticle?id=${item.id}&token=${data.data}`
this.$set(this.urlsJson, item.title, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
}
},
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { if (!item.directpath || item.directpath === null) {
// 获取token // 获取token
......
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
align="left" align="left"
width="360px" width="360px"
label="标题"> label="标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="classnum" prop="classnum"
...@@ -256,7 +259,8 @@ export default { ...@@ -256,7 +259,8 @@ export default {
lunboList: [], lunboList: [],
typeLevel: '', typeLevel: '',
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
activated () { activated () {
...@@ -290,6 +294,9 @@ export default { ...@@ -290,6 +294,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -321,6 +328,23 @@ export default { ...@@ -321,6 +328,23 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
console.log(data)
if (data && data.code === 0) {
ursStr = `${this.$store.state.config.urls}?indexCarouselManageId=${item.id}&token=${data.data}`
this.$set(this.urlsJson, item.title, ursStr)
} else {
this.$message.error('获取失败')
}
})
},
showMsg (item) { showMsg (item) {
// 获取token // 获取token
this.$http({ this.$http({
......
...@@ -395,13 +395,13 @@ export default { ...@@ -395,13 +395,13 @@ export default {
'classId': this.dataForm.classid, 'classId': this.dataForm.classid,
'cclassId': this.dataForm.cclassid, 'cclassId': this.dataForm.cclassid,
'content': this.dataForm.content, 'content': this.dataForm.content,
'ishead': this.dataForm.ishead 'ishead': this.dataForm.ishead == 0 ? '' : 1
}) })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach( item => { this.dataList.forEach(item => {
this.copyUrls(item) this.copyUrls(item)
}) })
} else { } else {
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p> <p v-show="showInfo"><img :src="imgUrlStr" class="avatar2"></p>
<p class="mark">注:推荐新闻(列表中第一条新闻)需上传此图,级别选择"2",尺寸为"260*200"</p> <p class="mark">注:推荐新闻(列表中第一条新闻)需上传此图,级别选择"2",尺寸为"260*200"</p>
</el-form-item> </el-form-item>
<el-form-item label="MP4文件" prop="video" class="pic"> <el-form-item label="MP4文件" prop="video" >
<el-upload <el-upload
class="avatar-uploader avatar2" class="avatar-uploader avatar2"
action="" action=""
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<p v-show="showInfo"><video :src="videoUrlStr" class="avatar2"></video></p> <p v-show="showInfo"><video :src="videoUrlStr" class="avatar2"></video></p>
<p class="mark">注:视频为MP4格式,视频编码推荐h.264,音频格式AAC,不超过100M</p> <p class="mark">注:视频为MP4格式,视频编码推荐h.264,音频格式AAC</p>
</el-form-item> </el-form-item>
<!-- <el-form-item label="说明" prop="content" > <!-- <el-form-item label="说明" prop="content" >
...@@ -258,10 +258,10 @@ export default { ...@@ -258,10 +258,10 @@ export default {
// return // return
// } else // } else
this.disabled = true this.disabled = true
if (this.dataForm.wavname === '' || this.dataForm.wavname === null) { // if (this.dataForm.wavname === '' || this.dataForm.wavname === null) {
this.$message.error('视频未上传,请上传视频!') // this.$message.error('视频未上传,请上传视频!')
return // return
} // }
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/newsmovie/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/newsmovie/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post', method: 'post',
...@@ -346,15 +346,15 @@ export default { ...@@ -346,15 +346,15 @@ export default {
beforeUploadVideo (file) { beforeUploadVideo (file) {
this.videoUrl = new FormData() this.videoUrl = new FormData()
const isLt100M = file.size / 1024 / 1024 < 10 // const isLt100M = file.size / 1024 / 1024 < 10
if (['video/mp4'].indexOf(file.type) === -1) { if (['video/mp4'].indexOf(file.type) === -1) {
this.$message.error('请上传正确的视频格式') this.$message.error('请上传正确的视频格式')
return false return false
} }
if (!isLt100M) { // if (!isLt100M) {
this.$message.error('上传视频大小不能超过100MB哦!') // this.$message.error('上传视频大小不能超过100MB哦!')
return false // return false
} // }
if (file) { if (file) {
var windowURL = window.URL || window.webkitURL var windowURL = window.URL || window.webkitURL
this.videoUrlStr = windowURL.createObjectURL(file) this.videoUrlStr = windowURL.createObjectURL(file)
......
...@@ -95,6 +95,9 @@ ...@@ -95,6 +95,9 @@
align="left" align="left"
width="360px" width="360px"
label="显示标题"> label="显示标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<!-- <el-table-column <!-- <el-table-column
prop="keyword" prop="keyword"
...@@ -262,7 +265,8 @@ export default { ...@@ -262,7 +265,8 @@ export default {
updateDate: [], updateDate: [],
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
activated () { activated () {
...@@ -301,6 +305,9 @@ export default { ...@@ -301,6 +305,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -331,6 +338,27 @@ export default { ...@@ -331,6 +338,27 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
if (item.directpath && item.directpath !== "" && item.directpath.length > 0) {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = `${this.$store.state.config.urls}/News/msgVideo?id=${item.id}&token=${data.data}`
this.$set(this.urlsJson, item.title, ursStr)
}
})
}
},
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { if (!item.directpath || item.directpath === null) {
// 获取token // 获取token
......
...@@ -63,6 +63,9 @@ ...@@ -63,6 +63,9 @@
align="left" align="left"
width="360px" width="360px"
label="专题标题"> label="专题标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<!-- <el-table-column <!-- <el-table-column
prop="categoryName" prop="categoryName"
...@@ -188,7 +191,8 @@ export default { ...@@ -188,7 +191,8 @@ export default {
piclevelList, piclevelList,
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson:{}
} }
}, },
activated () { activated () {
...@@ -220,6 +224,9 @@ export default { ...@@ -220,6 +224,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -251,6 +258,27 @@ export default { ...@@ -251,6 +258,27 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = `${this.$store.state.config.urls}/News/viewsub?id=${item.classid}&token=${data.data}`
this.$set(this.urlsJson, item.title, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
}
},
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { if (!item.directpath || item.directpath === null) {
// 获取token // 获取token
......
...@@ -70,11 +70,9 @@ ...@@ -70,11 +70,9 @@
<el-table-column prop="piclevel" header-align="center" align="center" label="级别"> </el-table-column> <el-table-column prop="piclevel" header-align="center" align="center" label="级别"> </el-table-column>
<el-table-column prop="title" header-align="center" align="left" label="标题" width="360px"> <el-table-column prop="title" header-align="center" align="left" label="标题" width="360px">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
{{scope.row.title}} </template>
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="pictureType" header-align="center" align="center" label="分类"> </el-table-column> <el-table-column prop="pictureType" header-align="center" align="center" label="分类"> </el-table-column>
<el-table-column prop="showtime" header-align="center" align="center" sortable='custom' label="显示时间" width="120px"> </el-table-column> <el-table-column prop="showtime" header-align="center" align="center" sortable='custom' label="显示时间" width="120px"> </el-table-column>
...@@ -178,7 +176,8 @@ export default { ...@@ -178,7 +176,8 @@ export default {
], ],
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
components: { components: {
...@@ -217,6 +216,9 @@ export default { ...@@ -217,6 +216,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -247,6 +249,22 @@ export default { ...@@ -247,6 +249,22 @@ export default {
this.$refs.addOrUpdate.init(pictureid, showInfo) this.$refs.addOrUpdate.init(pictureid, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
console.log(data)
if (data && data.code === 0) {
ursStr = `${this.$store.state.config.urls}?pictureId=${item.pictureid}&token=${data.data}`
this.$set(this.urlsJson, item.title, ursStr)
} else {
this.$message.error('获取失败')
}
})
},
showMsg (item) { showMsg (item) {
// 获取token // 获取token
this.$http({ this.$http({
......
...@@ -58,6 +58,9 @@ ...@@ -58,6 +58,9 @@
align="left" align="left"
width="360px" width="360px"
label="标题"> label="标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="editor" prop="editor"
...@@ -168,7 +171,8 @@ export default { ...@@ -168,7 +171,8 @@ export default {
typeList: [], typeList: [],
piclevelList, piclevelList,
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
activated () { activated () {
...@@ -200,6 +204,10 @@ export default { ...@@ -200,6 +204,10 @@ export default {
console.log(this.dataList) console.log(this.dataList)
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
item.directpath = item.jumppath
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -231,6 +239,27 @@ export default { ...@@ -231,6 +239,27 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/News/HealthDetail?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
}
},
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { if (!item.directpath || item.directpath === null) {
this.$http({ this.$http({
......
...@@ -82,6 +82,9 @@ ...@@ -82,6 +82,9 @@
align="left" align="left"
width="360px" width="360px"
label="新闻标题"> label="新闻标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="author" prop="author"
...@@ -219,7 +222,8 @@ export default { ...@@ -219,7 +222,8 @@ export default {
updateDate: [], updateDate: [],
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
activated () { activated () {
...@@ -256,6 +260,9 @@ export default { ...@@ -256,6 +260,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -287,6 +294,27 @@ export default { ...@@ -287,6 +294,27 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
}
},
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { if (!item.directpath || item.directpath === null) {
// 获取token // 获取token
......
...@@ -157,7 +157,8 @@ export default { ...@@ -157,7 +157,8 @@ export default {
}, },
levelList: piclevelList, levelList: piclevelList,
id: [], id: [],
title: '' title: '',
urlsJson: {}
} }
}, },
watch: { watch: {
...@@ -205,7 +206,7 @@ export default { ...@@ -205,7 +206,7 @@ export default {
// this.$message.error('图片未上传,请上传图片!') // this.$message.error('图片未上传,请上传图片!')
// return // return
// } // }
this.disabled = true this.disabled = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/hotFlow/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/hotFlow/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post', method: 'post',
......
...@@ -80,6 +80,9 @@ ...@@ -80,6 +80,9 @@
align="left" align="left"
width="360px" width="360px"
label="新闻标题"> label="新闻标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="author" prop="author"
...@@ -217,7 +220,8 @@ export default { ...@@ -217,7 +220,8 @@ export default {
updateDate: [], updateDate: [],
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
activated () { activated () {
...@@ -254,6 +258,9 @@ export default { ...@@ -254,6 +258,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -284,6 +291,27 @@ export default { ...@@ -284,6 +291,27 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
}
},
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { if (!item.directpath || item.directpath === null) {
// 获取token // 获取token
......
...@@ -82,6 +82,9 @@ ...@@ -82,6 +82,9 @@
align="left" align="left"
width="360px" width="360px"
label="新闻标题"> label="新闻标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="author" prop="author"
...@@ -219,7 +222,8 @@ export default { ...@@ -219,7 +222,8 @@ export default {
updateDate: [], updateDate: [],
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
activated () { activated () {
...@@ -256,6 +260,9 @@ export default { ...@@ -256,6 +260,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -286,6 +293,27 @@ export default { ...@@ -286,6 +293,27 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
}
},
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { if (!item.directpath || item.directpath === null) {
// 获取token // 获取token
......
...@@ -80,6 +80,9 @@ ...@@ -80,6 +80,9 @@
align="left" align="left"
width="360px" width="360px"
label="新闻标题"> label="新闻标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="author" prop="author"
...@@ -217,7 +220,8 @@ export default { ...@@ -217,7 +220,8 @@ export default {
updateDate: [], updateDate: [],
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
activated () { activated () {
...@@ -254,6 +258,9 @@ export default { ...@@ -254,6 +258,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -284,6 +291,27 @@ export default { ...@@ -284,6 +291,27 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
}
},
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { if (!item.directpath || item.directpath === null) {
// 获取token // 获取token
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
prop="titleEn" prop="titleEn"
header-align="center" header-align="center"
align="center" align="center"
width="260px"
label="英文标题" label="英文标题"
> >
</el-table-column> </el-table-column>
...@@ -57,7 +56,6 @@ ...@@ -57,7 +56,6 @@
prop="titleCn" prop="titleCn"
header-align="center" header-align="center"
align="center" align="center"
width="260px"
label="中文标题" label="中文标题"
> >
</el-table-column> </el-table-column>
...@@ -65,7 +63,6 @@ ...@@ -65,7 +63,6 @@
prop="keyword" prop="keyword"
header-align="center" header-align="center"
align="center" align="center"
width="260px"
label="关键字" label="关键字"
> >
</el-table-column> </el-table-column>
...@@ -81,6 +78,7 @@ ...@@ -81,6 +78,7 @@
prop="editor" prop="editor"
header-align="center" header-align="center"
align="center" align="center"
width="120px"
label="编辑" label="编辑"
> >
</el-table-column> </el-table-column>
......
...@@ -81,6 +81,9 @@ ...@@ -81,6 +81,9 @@
align="left" align="left"
width="360px" width="360px"
label="标题"> label="标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="parentCategoryName" prop="parentCategoryName"
...@@ -198,7 +201,8 @@ export default { ...@@ -198,7 +201,8 @@ export default {
value: -1 value: -1
}], }],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
activated () { activated () {
...@@ -235,6 +239,9 @@ export default { ...@@ -235,6 +239,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.data.list this.dataList = data.data.list
this.totalPage = data.data.totalCount this.totalPage = data.data.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -267,6 +274,27 @@ export default { ...@@ -267,6 +274,27 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/Knowledge/article?id=' + item.knowledgeinfoid + '&token=' + data.data
this.$set(this.urlsJson, item.firmname, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.firmname, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.firmname, ursStr)
}
},
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { if (!item.directpath || item.directpath === null) {
this.$http({ this.$http({
......
...@@ -65,6 +65,9 @@ ...@@ -65,6 +65,9 @@
width="260px" width="260px"
label="商品名称" label="商品名称"
> >
<template slot-scope="scope">
<a :href="urlsJson[scope.row.prename]" target="_blank">{{ scope.row.prename}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -180,7 +183,8 @@ export default { ...@@ -180,7 +183,8 @@ export default {
dataListSelections: [], dataListSelections: [],
addOrUpdateVisible: false, addOrUpdateVisible: false,
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
components: { components: {
...@@ -215,6 +219,7 @@ export default { ...@@ -215,6 +219,7 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.categoryIdList = data.list this.categoryIdList = data.list
} else { } else {
this.categoryIdList = [] this.categoryIdList = []
} }
...@@ -242,6 +247,9 @@ export default { ...@@ -242,6 +247,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.dataList = [] this.dataList = []
this.totalPage = 0 this.totalPage = 0
...@@ -271,6 +279,21 @@ export default { ...@@ -271,6 +279,21 @@ export default {
this.$refs.addOrUpdate.init(id) this.$refs.addOrUpdate.init(id)
}) })
}, },
copyUrls (item) {
let ursStr = ''
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
console.log(data)
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/Service/Book?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.prename, ursStr)
} else {
this.$message.error('获取失败')
}
})
},
showMsg (item) { showMsg (item) {
this.$http({ this.$http({
url: this.$http.adornUrl('/office/token/getToken'), url: this.$http.adornUrl('/office/token/getToken'),
......
...@@ -84,6 +84,9 @@ ...@@ -84,6 +84,9 @@
align="left" align="left"
width="360px" width="360px"
label="标题"> label="标题">
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="editor" prop="editor"
...@@ -220,7 +223,8 @@ export default { ...@@ -220,7 +223,8 @@ export default {
} }
], ],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
activated () { activated () {
...@@ -258,6 +262,9 @@ export default { ...@@ -258,6 +262,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -288,6 +295,27 @@ export default { ...@@ -288,6 +295,27 @@ export default {
this.$refs.addOrUpdate.init(id, showInfo) this.$refs.addOrUpdate.init(id, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/Knowledge/Statuteinfo?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
}
},
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { if (!item.directpath || item.directpath === null) {
this.$http({ this.$http({
......
...@@ -70,11 +70,9 @@ ...@@ -70,11 +70,9 @@
<el-table-column prop="piclevel" header-align="center" align="center" label="级别"> </el-table-column> <el-table-column prop="piclevel" header-align="center" align="center" label="级别"> </el-table-column>
<el-table-column prop="title" header-align="center" align="left" label="标题" width="360px"> <el-table-column prop="title" header-align="center" align="left" label="标题" width="360px">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
{{scope.row.title}} </template>
</div>
</template>
</el-table-column> </el-table-column>
<el-table-column prop="pictureType" header-align="center" align="center" label="分类"> </el-table-column> <el-table-column prop="pictureType" header-align="center" align="center" label="分类"> </el-table-column>
<el-table-column prop="showtime" header-align="center" align="center" sortable='custom' label="显示时间" width="120px"> </el-table-column> <el-table-column prop="showtime" header-align="center" align="center" sortable='custom' label="显示时间" width="120px"> </el-table-column>
...@@ -178,7 +176,8 @@ export default { ...@@ -178,7 +176,8 @@ export default {
], ],
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
components: { components: {
...@@ -217,6 +216,9 @@ export default { ...@@ -217,6 +216,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.$message.error(data.msg) this.$message.error(data.msg)
this.dataList = [] this.dataList = []
...@@ -247,6 +249,21 @@ export default { ...@@ -247,6 +249,21 @@ export default {
this.$refs.addOrUpdate.init(pictureid, showInfo) this.$refs.addOrUpdate.init(pictureid, showInfo)
}) })
}, },
copyUrls (item) {
let ursStr = ''
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
console.log(data)
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/News/Retail?retailPictureId=' + item.pictureid + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr)
} else {
this.$message.error('获取失败')
}
})
},
showMsg (item) { showMsg (item) {
this.$http({ this.$http({
url: this.$http.adornUrl('/office/token/getToken'), url: this.$http.adornUrl('/office/token/getToken'),
......
...@@ -116,6 +116,9 @@ ...@@ -116,6 +116,9 @@
width="360px" width="360px"
label="标题" label="标题"
> >
<template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="service" prop="service"
...@@ -349,7 +352,8 @@ export default { ...@@ -349,7 +352,8 @@ export default {
updateDate: [], updateDate: [],
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
...@@ -388,6 +392,9 @@ export default { ...@@ -388,6 +392,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.dataList = [] this.dataList = []
this.totalPage = 0 this.totalPage = 0
...@@ -410,6 +417,27 @@ export default { ...@@ -410,6 +417,27 @@ export default {
selectionChangeHandle (val) { selectionChangeHandle (val) {
this.dataListSelections = val this.dataListSelections = val
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/Service/Partners/caseMsg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.title, ursStr)
}
},
// 预览 // 预览
previewHandle (info) { previewHandle (info) {
console.log(info, '预览') console.log(info, '预览')
......
...@@ -132,6 +132,9 @@ ...@@ -132,6 +132,9 @@
width="260px" width="260px"
label="企业名称" label="企业名称"
> >
<template slot-scope="scope">
<a :href="urlsJson[scope.row.firmname]" target="_blank">{{ scope.row.firmname}}</a>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="technology" prop="technology"
...@@ -396,7 +399,8 @@ export default { ...@@ -396,7 +399,8 @@ export default {
updateDate: [], updateDate: [],
releaseDate: [], releaseDate: [],
order: '', order: '',
sidx: '' sidx: '',
urlsJson: {}
} }
}, },
...@@ -436,6 +440,9 @@ export default { ...@@ -436,6 +440,9 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.dataList.forEach(item => {
this.copyUrls(item)
})
} else { } else {
this.dataList = [] this.dataList = []
this.totalPage = 0 this.totalPage = 0
...@@ -458,6 +465,27 @@ export default { ...@@ -458,6 +465,27 @@ export default {
selectionChangeHandle (val) { selectionChangeHandle (val) {
this.dataListSelections = val this.dataListSelections = val
}, },
copyUrls (item) {
let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token
this.$http({
url: this.$http.adornUrl('/office/token/getToken'),
method: 'post'
}).then(({data}) => {
if (data && data.code === 0) {
ursStr = this.$store.state.config.urls + '/Service/Partners/content?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.firmname, ursStr)
}
})
} else if (/^\//.test(item.directpath)) {
ursStr = this.$store.state.config.urls + item.directpath
this.$set(this.urlsJson, item.firmname, ursStr)
} else {
ursStr = item.directpath
this.$set(this.urlsJson, item.firmname, ursStr)
}
},
// 预览 // 预览
previewHandle (info) { previewHandle (info) {
console.log(info, '预览') console.log(info, '预览')
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
//, theme:'default' //, theme:'default'
//, themePath:URL +"themes/" //, themePath:URL +"themes/"
zIndex: 210, // 编辑器层级的基数,默认是900 zIndex: 3300, // 编辑器层级的基数,默认是900
// 针对getAllHtml方法,会在对应的head标签中增加该编码设置。 // 针对getAllHtml方法,会在对应的head标签中增加该编码设置。
//, charset:"utf-8" //, charset:"utf-8"
......
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