Commit fd7b27de by Lyan

修改

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