Commit 993c6bcc by Lyan

后台修改

parent fd7b27de
...@@ -504,3 +504,6 @@ img { ...@@ -504,3 +504,6 @@ img {
.el-pagination__total{ .el-pagination__total{
color: #000; color: #000;
} }
.el-loading-mask{
z-index: 4000;
}
...@@ -6,7 +6,7 @@ import merge from 'lodash/merge' ...@@ -6,7 +6,7 @@ import merge from 'lodash/merge'
import { clearLoginInfo } from '@/utils' import { clearLoginInfo } from '@/utils'
const http = axios.create({ const http = axios.create({
timeout: 1000 * 30, // timeout: 1000 * 30,
withCredentials: true, withCredentials: true,
headers: { headers: {
'Content-Type': 'application/json; charset=utf-8' 'Content-Type': 'application/json; charset=utf-8'
......
...@@ -205,13 +205,13 @@ export default { ...@@ -205,13 +205,13 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// if (this.dataForm.fileurl === '' || this.dataForm.fileurl === null) { // if (this.dataForm.fileurl === '' || this.dataForm.fileurl === null) {
// this.$message.error('图片未上传,请上传图片!') // this.$message.error('图片未上传,请上传图片!')
// return // return
// } // }
this.loading = true
this.disabled = true this.disabled = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/announce/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/announce/${!this.dataForm.id ? 'save' : 'update'}`),
......
...@@ -306,45 +306,39 @@ export default { ...@@ -306,45 +306,39 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token // 获取token
this.$http({ this.$http({
url: this.$http.adornUrl('/office/token/getToken'), url: this.$http.adornUrl('/office/token/getToken'),
method: 'post' method: 'post'
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
ursStr = `${this.$store.state.config.urls}/News/NoticeArticle?id=${item.id}&token=${data.data}` if (!item.directpath || item.directpath === null) {
this.$set(this.urlsJson, item.title, ursStr) ursStr = `${this.$store.state.config.urls}/News/NoticeArticle?id=${item.id}&token=${data.data}`
this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath + '&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) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
window.open(`${this.$store.state.config.urls}/News/NoticeArticle?id=${item.id}&token=${data.data}`, '_blank') window.open(`${this.$store.state.config.urls}/News/NoticeArticle?id=${item.id}&token=${data.data}`, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
this.$message.error('获取失败')
} else if (/^\//.test(item.directpath)) { }
window.open(this.$store.state.config.urls + item.directpath, '_blank') })
} else {
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id, title) { deleteHandle (id, title) {
......
...@@ -213,8 +213,7 @@ export default { ...@@ -213,8 +213,7 @@ export default {
{ {
label: '小轮播' label: '小轮播'
} }
], ]
disabled: false
} }
}, },
mounted () { mounted () {
...@@ -266,9 +265,9 @@ export default { ...@@ -266,9 +265,9 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.loading = true
this.disabled = true this.disabled = true
if (this.dataForm.picIndexPath === '' || this.dataForm.picIndexPath === null) { if (this.dataForm.picIndexPath === '' || this.dataForm.picIndexPath === null) {
this.$message.error('图片未上传,请上传图片!') this.$message.error('图片未上传,请上传图片!')
......
...@@ -290,7 +290,6 @@ export default { ...@@ -290,7 +290,6 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.disabled = true this.disabled = true
...@@ -298,6 +297,7 @@ export default { ...@@ -298,6 +297,7 @@ export default {
// this.$message.error('图片未上传,请上传图片!') // this.$message.error('图片未上传,请上传图片!')
// return // return
// } // }
this.loading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/news/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/news/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post', method: 'post',
......
...@@ -443,43 +443,38 @@ export default { ...@@ -443,43 +443,38 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { if (data && data.code === 0) {
if (data && data.code === 0) { // if (!item.directpath || item.directpath === null) {
ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr) this.$set(this.urlsJson, item.title, ursStr)
} // } else {
}) // ursStr = item.directpath + '&token=' + data.data
} else if (/^\//.test(item.directpath)) { // this.$set(this.urlsJson, item.title, ursStr)
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) {
// 获取token // 获取token
this.$http({ this.$http({
url: this.$http.adornUrl('/office/token/getToken'), url: this.$http.adornUrl('/office/token/getToken'),
method: 'post' method: 'post'
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (!item.directpath || item.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data, '_blank') window.open(this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
} else if (/^\//.test(item.directpath)) { this.$message.error('获取失败')
window.open(this.$store.state.config.urls + item.directpath, '_blank') }
} else { })
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
......
<template> <template>
<el-dialog <el-dialog
:title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'" :title="!dataForm.id ? '新增' : this.showInfo?'详情':'修改'"
:close-on-click-modal="false" :close-on-click-modal="false"
v-loading="loading"
element-loading-text="正在加载数据"
:visible.sync="visible"> :visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="130px"> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="130px" >
<el-form-item label="原始标题" prop="titleOld"> <el-form-item label="原始标题" prop="titleOld">
<el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo"></el-input> <el-input v-model="dataForm.titleOld" placeholder="请输入原始标题" v-show="!showInfo"></el-input>
</el-form-item> </el-form-item>
...@@ -51,12 +53,12 @@ ...@@ -51,12 +53,12 @@
<p v-show="showInfo">{{dataForm.stdate}}</p> <p v-show="showInfo">{{dataForm.stdate}}</p>
</el-form-item> </el-form-item>
<el-form-item label='语种' prop='clanguage'> <el-form-item label='语种' prop='clanguage'>
<el-select v-model="dataForm.clanguage" placeholder="请输入级别" v-show="!showInfo"> <el-select v-model="dataForm.clanguage" placeholder="请输入语种" v-show="!showInfo">
<el-option <el-option
v-for="item in clanguageList" v-for="item in clanguageList"
:key="item.value" :key="item"
:label="item.name" :label="item"
:value="item.value"> :value="item">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -148,7 +150,7 @@ export default { ...@@ -148,7 +150,7 @@ export default {
longStr: '', longStr: '',
stdate: '', stdate: '',
clanguage: '', clanguage: '',
brief:'', brief: '',
wavname: '', wavname: '',
showtime: '' showtime: ''
}, },
...@@ -204,7 +206,7 @@ export default { ...@@ -204,7 +206,7 @@ export default {
config: {} config: {}
}, },
piclevelList, piclevelList,
clanguageList: ['中文'], clanguageList: ['中文','英文'],
id: [], id: [],
title: '' title: ''
} }
...@@ -250,7 +252,6 @@ export default { ...@@ -250,7 +252,6 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// if (this.dataForm.pic === '' || this.dataForm.pic === null) { // if (this.dataForm.pic === '' || this.dataForm.pic === null) {
...@@ -262,6 +263,7 @@ export default { ...@@ -262,6 +263,7 @@ export default {
// this.$message.error('视频未上传,请上传视频!') // this.$message.error('视频未上传,请上传视频!')
// return // return
// } // }
this.loading = true
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',
...@@ -280,7 +282,7 @@ export default { ...@@ -280,7 +282,7 @@ export default {
'wavname': this.dataForm.wavname, 'wavname': this.dataForm.wavname,
'content': this.dataForm.content, 'content': this.dataForm.content,
'showtime': this.dataForm.showtime, 'showtime': this.dataForm.showtime,
'brief':this.dataForm.brief 'brief': this.dataForm.brief
}) })
}).then(({data}) => { }).then(({data}) => {
this.loading = false this.loading = false
...@@ -351,8 +353,8 @@ export default { ...@@ -351,8 +353,8 @@ export default {
this.$message.error('请上传正确的视频格式') this.$message.error('请上传正确的视频格式')
return false return false
} }
// if (!isLt100M) { // if (!isLt200M) {
// this.$message.error('上传视频大小不能超过100MB哦!') // this.$message.error('上传视频大小不能超过200MB哦!')
// return false // return false
// } // }
if (file) { if (file) {
...@@ -365,6 +367,10 @@ export default { ...@@ -365,6 +367,10 @@ export default {
} }
}, },
UploadVideo () { UploadVideo () {
this.loading = true
var loading = this.$loading({
target: '.el-dialog'
})
this.$http({ this.$http({
url: this.$http.adornUrl('/office/file/uploadFile'), url: this.$http.adornUrl('/office/file/uploadFile'),
method: 'post', method: 'post',
...@@ -374,11 +380,24 @@ export default { ...@@ -374,11 +380,24 @@ export default {
} }
}) })
.then(res => { .then(res => {
console.log(res) if (res.status) {
this.dataForm.wavname = res.data.data loading.close()
this.$message.success('视频上传成功')
console.log(res)
this.dataForm.wavname = res.data.data
} else {
loading.close()
this.dialogVisible2 = false
this.$message.success('视频上传失败')
this.videoUrlStr = ''
}
}).catch(err => { }).catch(err => {
loading.close()
this.$message.success('视频上传失败')
this.videoUrlStr = ''
console.log(err) console.log(err)
}) })
this.loading = false
}, },
clearInp () { clearInp () {
...@@ -412,4 +431,9 @@ export default { ...@@ -412,4 +431,9 @@ export default {
color: red; color: red;
font-size: 10px; font-size: 10px;
} }
</style>
<style scoped>
.el-loading-mask{
z-index: 9999!important;
}
</style> </style>
\ No newline at end of file
...@@ -340,44 +340,39 @@ export default { ...@@ -340,44 +340,39 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' 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 // 获取token
this.$http({ this.$http({
url: this.$http.adornUrl('/office/token/getToken'), url: this.$http.adornUrl('/office/token/getToken'),
method: 'post' method: 'post'
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (!item.directpath || item.directpath === null) {
ursStr = `${this.$store.state.config.urls}/News/msgVideo?id=${item.id}&token=${data.data}` ursStr = `${this.$store.state.config.urls}/News/msgVideo?id=${item.id}&token=${data.data}`
this.$set(this.urlsJson, item.title, ursStr) this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr)
} }
}) }
} })
}, },
showMsg (item) { showMsg (item) {
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
window.open(`${this.$store.state.config.urls}/News/msgVideo?id=${item.id}&token=${data.data}`, '_blank') window.open(`${this.$store.state.config.urls}/News/msgVideo?id=${item.id}&token=${data.data}`, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
} else if (/^\//.test(item.directpath)) { this.$message.error('获取失败')
window.open(this.$store.state.config.urls + item.directpath, '_blank') }
} else { })
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id, title) { deleteHandle (id, title) {
......
...@@ -247,13 +247,13 @@ export default { ...@@ -247,13 +247,13 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// if (this.dataForm.ppath === '' || this.dataForm.ppath === null) { // if (this.dataForm.ppath === '' || this.dataForm.ppath === null) {
// this.$message.error('图片未上传,请上传图片!') // this.$message.error('图片未上传,请上传图片!')
// return // return
// } // }
this.loading = true
this.disabled = true this.disabled = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/newtopic/${!this.dataForm.classid ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/newtopic/${!this.dataForm.classid ? 'save' : 'update'}`),
...@@ -281,7 +281,7 @@ export default { ...@@ -281,7 +281,7 @@ export default {
onClose: () => { onClose: () => {
this.visible = false this.visible = false
this.$emit('refreshDataList') this.$emit('refreshDataList')
this.disabled =false this.disabled = false
} }
}) })
} else { } else {
......
...@@ -260,44 +260,39 @@ export default { ...@@ -260,44 +260,39 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
ursStr = `${this.$store.state.config.urls}/News/viewsub?id=${item.classid}&token=${data.data}` ursStr = `${this.$store.state.config.urls}/News/viewsub?id=${item.classid}&token=${data.data}`
this.$set(this.urlsJson, item.title, ursStr) this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath + '&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) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
window.open(`${this.$store.state.config.urls}/News/viewsub?id=${item.classid}&token=${data.data}`, '_blank') window.open(`${this.$store.state.config.urls}/News/viewsub?id=${item.classid}&token=${data.data}`, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
} else if (/^\//.test(item.directpath)) { this.$message.error('获取失败')
window.open(this.$store.state.config.urls + item.directpath, '_blank') }
} else { })
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id, title) { deleteHandle (id, title) {
......
...@@ -206,7 +206,7 @@ export default { ...@@ -206,7 +206,7 @@ export default {
imgUrl: new FormData(), imgUrl: new FormData(),
imgUrlStr: '', imgUrlStr: '',
dialogVisible: false, dialogVisible: false,
articleId:'' articleId: ''
} }
}, },
created () { created () {
...@@ -263,13 +263,13 @@ export default { ...@@ -263,13 +263,13 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate(valid => { this.$refs['dataForm'].validate(valid => {
if (valid) { if (valid) {
if (this.dataForm.picFile === '' || this.dataForm.picFile === null) { if (this.dataForm.picFile === '' || this.dataForm.picFile === null) {
this.$message.error('图片未上传,请上传图片!') this.$message.error('图片未上传,请上传图片!')
return return
} }
this.loading = true
this.disabled = true this.disabled = true
this.$http({ this.$http({
url: this.$http.adornUrl( url: this.$http.adornUrl(
......
...@@ -227,10 +227,10 @@ ...@@ -227,10 +227,10 @@
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.disabled = true this.disabled = true
this.loading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/logistics/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/logistics/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post', method: 'post',
......
...@@ -210,10 +210,10 @@ ...@@ -210,10 +210,10 @@
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.disabled = true this.disabled = true
this.loading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/medical/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/medical/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post', method: 'post',
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
}) })
} }
}) })
}, },
// 获取医疗管理列表 // 获取医疗管理列表
getMedicalTypeList () { getMedicalTypeList () {
this.$http({ this.$http({
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
width="360px" width="360px"
label="标题"> label="标题">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a> <a :href="urlsJson[scope.row.id]" target="_blank">{{ scope.row.title}}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -241,43 +241,38 @@ export default { ...@@ -241,43 +241,38 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
ursStr = this.$store.state.config.urls + '/News/HealthDetail?id=' + item.id + '&token=' + data.data ursStr = this.$store.state.config.urls + '/News/HealthDetail?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr) this.$set(this.urlsJson, item.id, ursStr)
} else {
ursStr = item.directpath + '&token=' + data.data
this.$set(this.urlsJson, item.id, 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) { this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
window.open(this.$store.state.config.urls + '/News/HealthDetail?id=' + item.id + '&token=' + data.data, '_blank') window.open(this.$store.state.config.urls + '/News/HealthDetail?id=' + item.id + '&token=' + data.data, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
} else if (/^\//.test(item.directpath)) { this.$message.error('获取失败')
window.open(this.$store.state.config.urls + item.directpath, '_blank') }
} else { })
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id, title) { deleteHandle (id, title) {
......
...@@ -201,13 +201,13 @@ export default { ...@@ -201,13 +201,13 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// if (this.dataForm.pic === '' || this.dataForm.pic === null) { // if (this.dataForm.pic === '' || this.dataForm.pic === null) {
// this.$message.error('图片未上传,请上传图片!') // this.$message.error('图片未上传,请上传图片!')
// return // return
// } // }
this.loading = true
this.disabled = true this.disabled = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/center/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/center/${!this.dataForm.id ? 'save' : 'update'}`),
......
...@@ -296,44 +296,39 @@ export default { ...@@ -296,44 +296,39 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr) this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath + '&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) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data, '_blank') window.open(this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
} else if (/^\//.test(item.directpath)) { this.$message.error('获取失败')
window.open(this.$store.state.config.urls + item.directpath, '_blank') }
} else { })
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id, title) { deleteHandle (id, title) {
......
...@@ -199,13 +199,13 @@ export default { ...@@ -199,13 +199,13 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// if (this.dataForm.pic === '' || this.dataForm.pic === null) { // if (this.dataForm.pic === '' || this.dataForm.pic === null) {
// this.$message.error('图片未上传,请上传图片!') // this.$message.error('图片未上传,请上传图片!')
// return // return
// } // }
this.loading = true
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'}`),
......
...@@ -293,44 +293,39 @@ export default { ...@@ -293,44 +293,39 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr) this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath + '&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) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data, '_blank') window.open(this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
} else if (/^\//.test(item.directpath)) { this.$message.error('获取失败')
window.open(this.$store.state.config.urls + item.directpath, '_blank') }
} else { })
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id, title) { deleteHandle (id, title) {
......
...@@ -199,13 +199,13 @@ export default { ...@@ -199,13 +199,13 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// if (this.dataForm.pic === '' || this.dataForm.pic === null) { // if (this.dataForm.pic === '' || this.dataForm.pic === null) {
// this.$message.error('图片未上传,请上传图片!') // this.$message.error('图片未上传,请上传图片!')
// return // return
// } // }
this.loading = true
this.disabled = true this.disabled = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/rules/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/rules/${!this.dataForm.id ? 'save' : 'update'}`),
......
...@@ -295,44 +295,39 @@ export default { ...@@ -295,44 +295,39 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr) this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath + '&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) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data, '_blank') window.open(this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
} else if (/^\//.test(item.directpath)) { this.$message.error('获取失败')
window.open(this.$store.state.config.urls + item.directpath, '_blank') }
} else { })
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id, title) { deleteHandle (id, title) {
......
...@@ -201,13 +201,13 @@ export default { ...@@ -201,13 +201,13 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
// if (this.dataForm.pic === '' || this.dataForm.pic === null) { // if (this.dataForm.pic === '' || this.dataForm.pic === null) {
// this.$message.error('图片未上传,请上传图片!') // this.$message.error('图片未上传,请上传图片!')
// return // return
// } // }
this.loading = true
this.disabled = true this.disabled = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/topicnews/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/topicnews/${!this.dataForm.id ? 'save' : 'update'}`),
...@@ -239,7 +239,7 @@ export default { ...@@ -239,7 +239,7 @@ export default {
onClose: () => { onClose: () => {
this.visible = false this.visible = false
this.$emit('refreshDataList') this.$emit('refreshDataList')
this.disabled= false this.disabled = false
} }
}) })
} else { } else {
......
...@@ -293,44 +293,39 @@ export default { ...@@ -293,44 +293,39 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data ursStr = this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr) this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath + '&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) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
window.open(this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data, '_blank') window.open(this.$store.state.config.urls + '/News/msg?id=' + item.id + '&token=' + data.data, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
} else if (/^\//.test(item.directpath)) { this.$message.error('获取失败')
window.open(this.$store.state.config.urls + item.directpath, '_blank') }
} else { })
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id, title) { deleteHandle (id, title) {
......
...@@ -68,9 +68,9 @@ ...@@ -68,9 +68,9 @@
this.$message.error('请上传附件!') this.$message.error('请上传附件!')
return false return false
} }
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.loading = true
this.disabled = true this.disabled = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/planbranch/batchUpdateStatus`), url: this.$http.adornUrl(`/office/planbranch/batchUpdateStatus`),
......
...@@ -162,10 +162,10 @@ ...@@ -162,10 +162,10 @@
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.disabled = true this.disabled = true
this.loading = true
console.log(this.dataForm.id) console.log(this.dataForm.id)
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/knowledgeinfo/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/knowledgeinfo/${!this.dataForm.id ? 'save' : 'update'}`),
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
width="360px" width="360px"
label="标题"> label="标题">
<template slot-scope="scope"> <template slot-scope="scope">
<a :href="urlsJson[scope.row.title]" target="_blank">{{ scope.row.title}}</a> <a :href="urlsJson[scope.row.knowledgeinfoid]" target="_blank">{{ scope.row.title}}</a>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -276,43 +276,38 @@ export default { ...@@ -276,43 +276,38 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
ursStr = this.$store.state.config.urls + '/Knowledge/article?id=' + item.knowledgeinfoid + '&token=' + data.data ursStr = this.$store.state.config.urls + '/Knowledge/article?id=' + item.knowledgeinfoid + '&token=' + data.data
this.$set(this.urlsJson, item.firmname, ursStr) this.$set(this.urlsJson, item.knowledgeinfoid, ursStr)
} else {
ursStr = item.directpath + '&token=' + data.data
this.$set(this.urlsJson, item.knowledgeinfoid, 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) { this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
window.open(this.$store.state.config.urls + '/Knowledge/article?id=' + item.knowledgeinfoid + '&token=' + data.data, '_blank') window.open(this.$store.state.config.urls + '/Knowledge/article?id=' + item.knowledgeinfoid + '&token=' + data.data, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
} else if (/^\//.test(item.directpath)) { this.$message.error('获取失败')
window.open(this.$store.state.config.urls + item.directpath, '_blank') }
} else { })
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id, title) { deleteHandle (id, title) {
......
...@@ -223,10 +223,10 @@ export default { ...@@ -223,10 +223,10 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.disabled = true this.disabled = true
this.loading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/policy/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/policy/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post', method: 'post',
......
...@@ -297,43 +297,38 @@ export default { ...@@ -297,43 +297,38 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
ursStr = this.$store.state.config.urls + '/Knowledge/Statuteinfo?id=' + item.id + '&token=' + data.data ursStr = this.$store.state.config.urls + '/Knowledge/Statuteinfo?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr) this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath + '&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) { this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
window.open(this.$store.state.config.urls + '/Knowledge/Statuteinfo?id=' + item.id + '&token=' + data.data, '_blank') window.open(this.$store.state.config.urls + '/Knowledge/Statuteinfo?id=' + item.id + '&token=' + data.data, '_blank')
} else { } else {
this.$message.error('获取失败') window.open(item.directpath + '&token=' + data.data, '_blank')
} }
}) } else {
} else if (/^\//.test(item.directpath)) { this.$message.error('获取失败')
window.open(this.$store.state.config.urls + item.directpath, '_blank') }
} else { })
window.open(item.directpath, '_blank')
}
}, },
// 删除 // 删除
deleteHandle (id, title) { deleteHandle (id, title) {
......
...@@ -234,9 +234,9 @@ export default { ...@@ -234,9 +234,9 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate(valid => { this.$refs['dataForm'].validate(valid => {
if (valid) { if (valid) {
this.loading = true
this.disabled = true this.disabled = true
if (this.dataForm.picFile === '' || this.dataForm.picFile === null) { if (this.dataForm.picFile === '' || this.dataForm.picFile === null) {
this.$message.error('图片未上传,请上传图片!') this.$message.error('图片未上传,请上传图片!')
......
...@@ -151,7 +151,6 @@ export default { ...@@ -151,7 +151,6 @@ export default {
}, },
// 表单提交 // 表单提交
dataFormSubmit () { dataFormSubmit () {
this.loading = true
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.disabled = true this.disabled = true
...@@ -159,6 +158,7 @@ export default { ...@@ -159,6 +158,7 @@ export default {
this.$message.error('文件未上传,请上传文件!') this.$message.error('文件未上传,请上传文件!')
return return
} }
this.loading = true
this.$http({ this.$http({
url: this.$http.adornUrl(`/office/doc/${!this.dataForm.id ? 'save' : 'update'}`), url: this.$http.adornUrl(`/office/doc/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post', method: 'post',
......
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
align="left" align="left"
width="360px" width="360px"
label="标题"> label="标题">
<template slot-scope="scope">
<el-button type="text" size="small" @click="downFile(scope.row.docfile)">{{scope.row.title }}</el-button>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="author" prop="author"
......
...@@ -419,49 +419,42 @@ export default { ...@@ -419,49 +419,42 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) { // 获取token
// 获取token this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { if (data && data.code === 0) {
if (data && data.code === 0) { if (!item.directpath || item.directpath === null) {
ursStr = this.$store.state.config.urls + '/Service/Partners/caseMsg?id=' + item.id + '&token=' + data.data ursStr = this.$store.state.config.urls + '/Service/Partners/caseMsg?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.title, ursStr) this.$set(this.urlsJson, item.title, ursStr)
} else {
ursStr = item.directpath + '&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, '预览')
let url let url
if (!info.directpath || info.directpath === null) { this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!info.directpath || info.directpath === null) {
window.open(this.$store.state.config.urls + '/Service/Partners/caseMsg?id=' + info.id + '&token=' + data.data, '_blank') window.open(this.$store.state.config.urls + '/Service/Partners/caseMsg?id=' + info.id + '&token=' + data.data, '_blank')
} else { } else {
this.$message.error('获取失败') url = info.directpath + '&token=' + data.data
window.open(url, '_blank')
} }
}) } else {
} else if (/^\//.test(info.directpath)) { this.$message.error('获取失败')
url = `${this.$store.state.config.urls}${info.directpath}` }
window.open(url, '_blank') })
} else {
url = info.directpath
window.open(url, '_blank')
}
}, },
// 新增 / 修改 // 新增 / 修改
addOrUpdateHandle (id, showInfo) { addOrUpdateHandle (id, showInfo) {
......
...@@ -467,49 +467,42 @@ export default { ...@@ -467,49 +467,42 @@ export default {
}, },
copyUrls (item) { copyUrls (item) {
let ursStr = '' let ursStr = ''
if (!item.directpath || item.directpath === null) {
// 获取token // 获取token
this.$http({ this.$http({
url: this.$http.adornUrl('/office/token/getToken'), url: this.$http.adornUrl('/office/token/getToken'),
method: 'post' method: 'post'
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (!item.directpath || item.directpath === null) {
ursStr = this.$store.state.config.urls + '/Service/Partners/content?id=' + item.id + '&token=' + data.data ursStr = this.$store.state.config.urls + '/Service/Partners/content?id=' + item.id + '&token=' + data.data
this.$set(this.urlsJson, item.firmname, ursStr) this.$set(this.urlsJson, item.firmname, ursStr)
} else {
ursStr = item.directpath + '&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, '预览')
let url let url
if (!info.directpath || info.directpath === null) { this.$http({
this.$http({ url: this.$http.adornUrl('/office/token/getToken'),
url: this.$http.adornUrl('/office/token/getToken'), method: 'post'
method: 'post' }).then(({data}) => {
}).then(({data}) => { console.log(data)
console.log(data) if (data && data.code === 0) {
if (data && data.code === 0) { if (!info.directpath || info.directpath === null) {
window.open(this.$store.state.config.urls + '/Service/Partners/content?id=' + info.id + '&token=' + data.data, '_blank') window.open(this.$store.state.config.urls + '/Service/Partners/content?id=' + info.id + '&token=' + data.data, '_blank')
} else { } else {
this.$message.error('获取失败') url = info.directpath + '&token=' + data.data
window.open(url, '_blank')
} }
}) } else {
} else if (/^\//.test(info.directpath)) { this.$message.error('获取失败')
url = `${this.$store.state.config.urls}${info.directpath}` }
window.open(url, '_blank') })
} else {
url = info.directpath
window.open(url, '_blank')
}
}, },
// 新增 / 修改 // 新增 / 修改
......
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