Commit 993c6bcc by Lyan

后台修改

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