Compare commits

...
12 Commits
7 changed files with 167 additions and 11 deletions
+6 -1
View File
@@ -264,6 +264,9 @@ const queryFileInfoByEditId = (params) => getAction('/onlyOffice/queryById', par
// 获取taskName
const queryTaskNameByTaskId = (params) => getAction('/workCenter/getByTaskId', params)
// 我的消息-详情
const getMsgDetail = (params) => getAction('/sys/sysAnnouncementSend/getDetailsById', params)
export {
queryPermissionsByUser,
getFormDictTreeList,
@@ -390,5 +393,7 @@ export {
queryFileInfoByEditId,
queryTaskNameByTaskId
queryTaskNameByTaskId,
getMsgDetail
}
+2 -1
View File
@@ -18,6 +18,7 @@ import Vue from 'vue'
import { ACCESS_TOKEN } from '../store/mutation-types'
import { getFileAccessHttpUrl } from '../api/manage'
import { previewPdf } from '../utils/previewPdf'
import {dealUrl} from "@/utils/kkFilePreview";
const Base64 = require('js-base64').Base64
@@ -101,7 +102,7 @@ export default {
return
}
// 其余可预览文件仍使用KKFile进行预览
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
const url = dealUrl(fileFullUrl)
window.open(url)
}
}
+5 -4
View File
@@ -1,10 +1,10 @@
<template>
<div class="upload-comp">
<div class="upload-box">
<input type="file" class="upload-box-input" @change="handleUpload" multiple="multiple" />
<input type="file" class="upload-box-input" @change="handleUpload" multiple="multiple"/>
<van-button type="primary" plain>
<template #icon>
<van-icon class="iconfont" class-prefix="icon" name="shangchuan" />
<van-icon class="iconfont" class-prefix="icon" name="shangchuan"/>
</template>
{{ $t('clickToUpload') }}
</van-button>
@@ -13,7 +13,7 @@
<div class="file-list" v-if="fileList && fileList.length > 0">
<div class="file-item" v-for="file in fileList" :key="file.id">
<div class="file-item-name" @click="handlePreview(file)">{{ file.fileName }}</div>
<van-icon name="delete-o" @click="handleDelete(file)" />
<van-icon name="delete-o" @click="handleDelete(file)"/>
</div>
</div>
@@ -31,6 +31,7 @@ import { previewPdf } from '../utils/previewPdf'
import Vue from 'vue'
import { ACCESS_TOKEN } from '../store/mutation-types'
import { getFileAccessHttpUrl } from '../api/manage'
import { dealUrl } from '@/utils/kkFilePreview'
const FILE_TYPE_ALL = 'all'
const FILE_TYPE_IMG = 'image'
@@ -212,7 +213,7 @@ export default {
return
}
// 其余可预览文件仍使用KKFile进行预览
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
const url = dealUrl(fileFullUrl)
window.open(url)
},
handleDelete (file) {
+2 -2
View File
@@ -87,8 +87,8 @@ new Vue({
// })
console.log('store.dispatch(\'DingLogin\')')
store.dispatch('DingLogin').then(() => {
console.log('DingLogin后 跳转到搜索页')
this.$router.push({ path: '/search/generalSearch' })
// console.log('DingLogin后 跳转到搜索页') 错误的 导致钉钉登录成功后跳转的页面有问题
// this.$router.push({ path: '/search/generalSearch' })
}).catch((e) => {
Toast(e.message)
})
+14 -2
View File
@@ -38,6 +38,7 @@ const routes = [
path: '/',
name: 'home',
component: () => import('@/views/Home'),
redirect: '/search/generalSearch',
meta: {
// 是否显示头部导航
hasNavBar: true,
@@ -69,11 +70,22 @@ const routes = [
},
component: () => import('@/views/exception/NoMobile')
},
{ // 消息详情
path: '/messageDetail',
name: 'messageDetail',
component: () => import('@/views/messageDetail/MessageDetail'),
meta: {
hasNavBar: true,
title: '消息详情',
pageTitle: 'messageDetail',
hasBack: true
}
},
...workCenter,
{
path: '*',
redirect: '/'
},
...workCenter
}
]
const originalPush = VueRouter.prototype.push
+136
View File
@@ -0,0 +1,136 @@
<template>
<div class="message-page">
<van-overlay :show="loading" :z-index="99999">
<van-loading />
</van-overlay>
<!-- <div v-if="!isDynamic">-->
<!-- <p class="message-page-title">{{ title }}</p>-->
<!-- <p class="message-page-sub-title">发布时间:{{ model.sendTime }}</p>-->
<!-- <div class="message-page-content" v-html="model.msgContent"></div>-->
<!-- </div>-->
<!-- <div v-else>-->
<div>
<p class="message-page-title">【动态详情】{{ model.dynamicHeading }}</p>
<div class="message-page-sub-title">
<!--浏览量-->
<div>
<van-icon name="eye-o" />
{{ model.readCount }}
</div>
<!--编辑人-->
<div>
<label>编辑人:</label>
<span>{{ model.writer_dictText }}</span>
</div>
<!--发布时间-->
<div>
<label>发布时间:</label>
<span>{{ model.releaseTime }}</span>
</div>
</div>
<div class="message-page-content">
<div v-html="model.dynamicDetails"></div>
<file-display :file-ids="model.dataText" />
</div>
</div>
</div>
</template>
<script>
// import { getMsgDetail } from '@/api/api'
import { getDynamicMessageById } from '@/api/standardRegulationLibraryApi'
import FileDisplay from '@/components/FileDisplay'
export default {
name: 'MessageDetail',
components: { FileDisplay },
data () {
return {
loading: false,
model: {}
// title: '',
// isDynamic: false // 是动态消息
}
},
mounted () {
this.initPage()
},
methods: {
// 获取消息详情
initPage () {
this.loading = true
getDynamicMessageById({ id: this.$route.query.id, type: 'query' }).then(res => {
if (res.success) {
this.model = Object.assign({}, res.result || {})
} else {
this.$message(res.message)
}
}).finally(() => {
this.loading = false
})
}
// initPage () {
// this.loading = true
// getMsgDetail({ id: this.$route.query.id }).then(res => {
// if (res.success) {
// const data = res.result || {}
// if (data.openType === 'url' && data.openPage.includes('/standardRegulationLibrary/DynamicMessageDetail')) {
// this.isDynamic = true
// // 是动态消息,获取动态消息详情
// this.initDynamicDetail(data.openPage)
// } else {
// this.model = data
// this.title = data.titile
// this.loading = false
// }
// } else {
// this.$message(res.message)
// this.loading = false
// }
// })
// },
// 获取动态消息详情
// initDynamicDetail (openPage) {
// const id = openPage.split('=')[1]
// getDynamicMessageById({ id: id, type: 'query' }).then(res => {
// if (res.success) {
// this.model = Object.assign({}, res.result || {})
// } else {
// this.$message(res.message)
// }
// }).finally(() => {
// this.loading = false
// })
// }
}
}
</script>
<style scoped lang="less">
.van-overlay {
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.3);
}
.message-page {
&-title {
text-align: center;
font-size: 0.34rem;
font-weight: 600;
line-height: 0.4rem;
margin: 0.3rem 0.32rem 0.24rem;
}
&-sub-title {
text-align: center;
font-size: 0.26rem;
font-weight: 400;
line-height: 0.4rem;
margin: 0.3rem 0.32rem 0.24rem;
}
&-content {
padding: 0 0.3rem;
}
}
</style>
@@ -180,6 +180,7 @@ import OnlyOnlineEditBaseInfo from '@/views/workCenter/enterpriseStandardRevisio
import ZUpload from '@/components/ZUpload'
import { Base64 } from 'js-base64'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import {dealUrl} from "@/utils/kkFilePreview";
export default {
name: 'EnterpriseStandardRevision',
@@ -528,7 +529,7 @@ export default {
const file = res.result
const filePaths = file.editFilePath.split('/')
const fileName = filePaths[filePaths.length - 1]
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.editFilePath + '&fullfilename=' + fileName))}`
const url = dealUrl(this.documentUrl + file.editFilePath + '&fullfilename=' + fileName)
console.log(this.documentUrl + file.editFilePath + '&fullfilename=' + fileName)
window.open(url, '_blank')
}