1、右上角新增消息中心提示
2、消息中心新增连接点击打开对应的详情页面 3、页面样式调整,关联附件新增前端分页
This commit is contained in:
parent
dd9940e78e
commit
c567ca9176
@ -75,7 +75,7 @@ body #app .hideSidebar .sidebar-container {
|
||||
width: 65px !important;
|
||||
}
|
||||
body #app .openSidebar .sidebar-container {
|
||||
width:220px !important;
|
||||
width:180px !important;
|
||||
}
|
||||
body #app .sidebar-container .nest-menu .el-sub-menu>.el-sub-menu__title,
|
||||
body #app .sidebar-container .el-sub-menu .el-menu-item {
|
||||
@ -344,7 +344,7 @@ body #app .hideSidebar .main-container {
|
||||
margin-left: 65px;
|
||||
}
|
||||
body #app .main-container {
|
||||
margin-left: 220px;
|
||||
margin-left: 180px;
|
||||
background:#f9fafe;
|
||||
background-size:100%;
|
||||
}
|
||||
@ -440,6 +440,34 @@ body #app .main-container .navbar .right-menu{
|
||||
float: inherit;
|
||||
top: 8px;
|
||||
right: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
body #app .main-container .navbar .right-menu .el-badge{
|
||||
margin: 0 20px 0 0;
|
||||
}
|
||||
body #app .main-container .navbar .right-menu .el-badge .el-badge__content.is-fixed{
|
||||
top: 5px;
|
||||
right: 14px;
|
||||
border: 0;
|
||||
padding: 0 4px;
|
||||
min-width: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
body #app .main-container .navbar .right-menu .el-badge .top-msg{
|
||||
background: rgba(0 64 152 / 6%);
|
||||
color: #004098;
|
||||
font-size: 14px;
|
||||
height: 36px;
|
||||
display: block;
|
||||
padding: 0 12px;
|
||||
line-height: 36px;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
}
|
||||
body #app .main-container .navbar .right-menu .top-version{
|
||||
margin: 0 10px 0 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
body #app .main-container .navbar .right-menu>.el-select{
|
||||
margin-right: 15px;
|
||||
@ -1752,22 +1780,26 @@ body .el-card>.el-card__body .el-tabs--border-card{
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--border-card{
|
||||
border: 0;
|
||||
}
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header{
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header,
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--card>.el-tabs__header{
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
background: transparent;
|
||||
}
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item{
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item,
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--card>.el-tabs__header .el-tabs__item{
|
||||
margin: 0;
|
||||
border: none;
|
||||
}
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active,
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--card>.el-tabs__header .el-tabs__item.is-active{
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #034aac;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
}
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active::after{
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active::after,
|
||||
body .el-card>.el-card__body .search-btn .el-tabs--card>.el-tabs__header .el-tabs__item.is-active::after{
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
@ -2080,7 +2112,7 @@ body .etable1.el-table .el-table__expanded-cell tr>td:nth-child(2){
|
||||
.search .el-form-item>.el-form-item__content>.el-cascader,
|
||||
.search .el-form-item>.el-form-item__content>.el-date-editor.el-range-editor,
|
||||
.search .el-form-item>.el-form-item__content>.el-date-editor.el-date-editor{
|
||||
width: 250px;
|
||||
width: 230px;
|
||||
}
|
||||
.grab .filtrate{
|
||||
display: none;
|
||||
@ -2109,7 +2141,7 @@ body .etable1.el-table .el-table__expanded-cell tr>td:nth-child(2){
|
||||
.filtrate .el-form-item>.el-form-item__content>.el-cascader,
|
||||
.filtrate .el-form-item>.el-form-item__content>.el-date-editor.el-range-editor,
|
||||
.filtrate .el-form-item>.el-form-item__content>.el-date-editor.el-date-editor{
|
||||
width: 250px;
|
||||
width: 230px;
|
||||
}
|
||||
|
||||
/*operate 操作区域*/
|
||||
|
@ -52,3 +52,12 @@ export function allMarkedRead(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取用户统计
|
||||
export function getUserMsgCount(id) {
|
||||
return request({
|
||||
url: '/system/message/user/msg/count/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -5,13 +5,22 @@
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
||||
|
||||
|
||||
<div class="right-menu">
|
||||
<!--<template v-if="device!=='mobile'">
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
<!-- <span @click="toMyCartPage">
|
||||
<el-badge :value="totalCartCount >= 99 ? '99+' : totalCartCount" class="item">
|
||||
<span class="top-msg">消息</span>
|
||||
</el-badge>
|
||||
</span>-->
|
||||
<span class="top-version">v1.0.0</span>
|
||||
<span style="cursor: pointer;" @click="toMyCartPage">
|
||||
<el-badge :value="totalCartCount >= 99 ? '99+' : totalCartCount" class="item">
|
||||
<el-tooltip class="item" effect="light" content="消息通知" placement="bottom">
|
||||
<i class="el-icon-bell"></i>
|
||||
</el-tooltip>
|
||||
</el-badge>
|
||||
</span>
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
|
||||
</template>-->
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<span style="font-size: 16px"><i class="el-icon-user"/> {{nickName}}</span>
|
||||
@ -68,7 +77,10 @@ export default {
|
||||
get() {
|
||||
return this.$store.state.settings.topNav
|
||||
}
|
||||
}
|
||||
},
|
||||
totalCartCount() {
|
||||
return this.$store.state.user.unreadMsgNumber ? this.$store.state.user.unreadMsgNumber : 0
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
toggleSideBar() {
|
||||
@ -84,7 +96,11 @@ export default {
|
||||
location.href = '/index';
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
},
|
||||
// 跳转到购物车
|
||||
toMyCartPage() {
|
||||
this.$router.push({ path: '/message' })
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -11,6 +11,7 @@ const getters = {
|
||||
userInfo: state => state.user.info,
|
||||
name: state => state.user.name,
|
||||
nickName: state => state.user.nickName,
|
||||
unreadMsgNumber: state => state.user.unreadMsgNumber,
|
||||
introduction: state => state.user.introduction,
|
||||
roles: state => state.user.roles,
|
||||
permissions: state => state.user.permissions,
|
||||
|
@ -10,7 +10,8 @@ const user = {
|
||||
info: {},
|
||||
avatar: '',
|
||||
roles: [],
|
||||
permissions: []
|
||||
permissions: [],
|
||||
unreadMsgNumber: 0,
|
||||
},
|
||||
|
||||
mutations: {
|
||||
@ -37,6 +38,9 @@ const user = {
|
||||
},
|
||||
SET_INFO:(state, info) => {
|
||||
state.info = info
|
||||
},
|
||||
SET_UNREAD_MSG_NUMBER:(state, info) => {
|
||||
state.unreadMsgNumber = info
|
||||
}
|
||||
},
|
||||
|
||||
@ -71,6 +75,7 @@ const user = {
|
||||
commit('SET_ROLES', ['ROLE_DEFAULT'])
|
||||
}
|
||||
commit('SET_ID', user.userId)
|
||||
commit('SET_UNREAD_MSG_NUMBER', res.unMsgNumber)
|
||||
commit('SET_NAME', user.userName)
|
||||
commit('SET_NICK_NAME', user.nickName)
|
||||
commit('SET_AVATAR', avatar)
|
||||
|
575
src/views/document/detail.vue
Normal file
575
src/views/document/detail.vue
Normal file
@ -0,0 +1,575 @@
|
||||
<template>
|
||||
<div class="fbox1">
|
||||
<div class="fl" v-loading="detailLoading">
|
||||
<el-tabs v-model="detailActiveName">
|
||||
<el-tab-pane label="基本信息" name="first">
|
||||
<div class="el-form-border">
|
||||
<el-form ref="form" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="24"> <el-form-item label="文件分类">{{form.docCategoryName}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="文档编号">{{form.docCode}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="文档名称">{{form.docName}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="文档类别"><dict-tag :options="dict.type.doc_class" :value="form.docType"/></el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="文档来源"><dict-tag :options="dict.type.doc_source" :value="form.docSource"/></el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="负责人">{{form.docPrincipalsName}}</el-form-item> </el-col>
|
||||
<el-col :span="12"> <el-form-item label="归属单位">{{form.docRespDeptName}}</el-form-item> </el-col>
|
||||
<el-col :span="24"> <el-form-item label="备注">{{form.remark}}</el-form-item> </el-col>
|
||||
</el-row>
|
||||
</el-form><!--el-form-->
|
||||
</div><!--el-form-border 表单-->
|
||||
</el-tab-pane><!--el-tab-pane-->
|
||||
<el-tab-pane label="关联附件" name="second">
|
||||
<el-table :data="attachmentList" style="width: 100%">
|
||||
<el-table-column label="序号" width="60" type="index" align="center"></el-table-column>
|
||||
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="操作" align="center" width="180" v-if="!detailBoolean">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
v-if="previewAuth(scope.row)"
|
||||
@click="handlePreview(scope.row)"
|
||||
>预览</el-button>
|
||||
<el-button type="text" icon="el-icon-download" v-if="isShowOperation(scope.row)"
|
||||
@click="handleDownload(scope.row)" v-loading="loadingDownload">下载</el-button>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
</el-table><!--el-table-->
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getAttachmentList"
|
||||
/>
|
||||
</el-tab-pane><!--el-tab-pane-->
|
||||
</el-tabs><!--el-tabs-->
|
||||
</div><!--fl 左侧页签-->
|
||||
|
||||
<div class="fr" v-if="isComment">
|
||||
<div class="tboper">
|
||||
<div class="tit">评论</div>
|
||||
</div><!--tboper 标题与操作按钮-->
|
||||
<div class="pltextarea">
|
||||
<el-input v-model="discussionContent" type="textarea" placeholder="请输入您的意见" :rows="4" maxlength="1000" show-word-limit></el-input>
|
||||
<div class="plbtn"><el-button @click="handleDiscussions">发布</el-button></div>
|
||||
</div><!--pltextarea-->
|
||||
<div class="pllist">
|
||||
<template v-if="discussionsList && discussionsList.length > 0">
|
||||
<div class="list" v-for="(item,index) in discussionsList" :key="item.id">
|
||||
<div class="luser"><span class="xuser">{{getFirstChar(item.nickName)}}</span></div>
|
||||
<div class="ltext">
|
||||
<div class="nt"><span class="name">{{item.nickName}}</span><span class="time">{{ parseTime(item.createTime, '{y}-{m}-{d} {h}:{i}') }}</span></div>
|
||||
<div class="te">{{item.content}}</div>
|
||||
<div class="hb">
|
||||
<a class="btn" @click="toggleReplyForm(index)">
|
||||
<i class="el-icon-chat-line-round"></i>回复
|
||||
</a>
|
||||
</div>
|
||||
<div class="pltextarea" v-if="showReplyForm[index]">
|
||||
<el-input type="textarea" v-model="replyContent[index]" placeholder="请输入您的意见" :rows="2" maxlength="1000" show-word-limit></el-input>
|
||||
<div class="plbtn">
|
||||
<el-button @click="cancelReply(index)">取消</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-button @click="submitReply(index, item)">发布</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!--第二层级-->
|
||||
<template v-if="item.repliesList && item.repliesList.length > 0">
|
||||
<div class="list" v-for="(repItem,repIdex) in item.repliesList" :key="repItem.id">
|
||||
<div class="luser"><span class="xuser">{{getFirstChar(repItem.nickName)}}</span></div>
|
||||
<div class="ltext">
|
||||
<div class="nt"><span class="name">{{repItem.nickName}}</span><span class="time">{{ parseTime(repItem.createTime, '{y}-{m}-{d} {h}:{i}') }}</span></div>
|
||||
<div class="te">{{repItem.content}}</div>
|
||||
<!-- <div class="hb"><a class="btn" @click="toggleReplyFormSon(index,repIdex)"><i class="el-icon-chat-line-round"></i>回复</a></div>
|
||||
<div class="pltextarea" v-if="item.showReplyFormSon[repIdex]">
|
||||
<el-input type="textarea" v-model="item.replyContentSon[repIdex]" placeholder="请输入您的意见" :rows="2" maxlength="1000" show-word-limit></el-input>
|
||||
<div class="plbtn">
|
||||
<el-button @click="cancelReplySon(index,repIdex)">取消</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-button @click="submitReplySon(index,repIdex, item)">发布</el-button>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div><!--el-form-border 表单-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addDocument, updateDocument, getDocument } from "@/api/document/document";
|
||||
import { deptTreeSelect } from "@/api/system/user";
|
||||
import { documentTree } from "@/api/documentCategory/documentCategory.js";
|
||||
import { listDiscussions, addDiscussions } from "@/api/tool/discussions.js";
|
||||
import { listReplies, addReplies} from "@/api/tool/replies.js";
|
||||
import { listAttachment } from "@/api/attachment/attachment";
|
||||
import { addCount } from "@/api/tool/downloadCount";
|
||||
|
||||
export default {
|
||||
name: 'editDocument',
|
||||
components: {},
|
||||
dicts:['doc_class','doc_source'],
|
||||
props: {
|
||||
tooId: {
|
||||
type: String,
|
||||
default: "",
|
||||
required: false
|
||||
},
|
||||
relatedTool: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
//是否展示下载
|
||||
isDownload: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return true
|
||||
},
|
||||
required: false
|
||||
},
|
||||
//是否展示评论
|
||||
isComment: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return true
|
||||
},
|
||||
required: false
|
||||
},
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
detailActiveName: 'first',
|
||||
templateSelection: '',
|
||||
drawer1: false,
|
||||
checkList: [],
|
||||
// 表单参数
|
||||
form: {
|
||||
docId: undefined,
|
||||
docCategoryId: undefined,
|
||||
docCode: '',
|
||||
docName: '',
|
||||
docType: '',
|
||||
docPrincipals: null,
|
||||
docPrincipalsName: null,
|
||||
docRespDept: this.$store.getters.userInfo.deptId,
|
||||
docSource: '',
|
||||
toolId: '',
|
||||
remark: undefined,
|
||||
docCategoryName: undefined,
|
||||
},
|
||||
fileList: [],
|
||||
progress: 0,
|
||||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
docCategory:[],
|
||||
deptOptions:[],
|
||||
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传文件服务器地址
|
||||
fileData: null,
|
||||
editStatus: true,
|
||||
toolDataInfo: [],
|
||||
dataFile: [],
|
||||
//详情
|
||||
detailBoolean: false,
|
||||
|
||||
discussionContent: null, // 评论内容
|
||||
repliesContent: null, // 回复内容
|
||||
// 评论列表
|
||||
discussionsList: [],
|
||||
// 回复列表
|
||||
repliesList: [],
|
||||
showReplyForm: [],
|
||||
replyContent: [],
|
||||
detailLoading: false,
|
||||
attachmentList: [],
|
||||
attFileType: "zip,rar,7z",
|
||||
isPreviewDisable: false,
|
||||
loadingDownload: false,
|
||||
userInfo: this.$store.getters.userInfo,
|
||||
toolPrincipalsChoose: false,
|
||||
docQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
created(){
|
||||
// this.getDeptTree();
|
||||
this.getDocumentTree();
|
||||
},
|
||||
mounted(){
|
||||
},
|
||||
methods:{
|
||||
chooseToolConfirm(){
|
||||
this.$set(this.form, "toolId", this.templateSelection)
|
||||
this.drawer1 = false;
|
||||
},
|
||||
getCurrentRow(row){
|
||||
// 获取选中数据 row表示选中这一行的数据,可以从里面提取所需要的值
|
||||
},
|
||||
showOpenHandle(){
|
||||
this.reset();
|
||||
this.title = "上传文档";
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
docName: '',
|
||||
docType: '',
|
||||
docPrincipals: '',
|
||||
docRespDept: '',
|
||||
docSource: '',
|
||||
toolId: ''
|
||||
};
|
||||
this.fileList = []
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.drawer1 = false;
|
||||
this.reset();
|
||||
},
|
||||
generateUniqueID() {
|
||||
// 使用时间戳来生成唯一ID
|
||||
const timestamp = new Date().getTime();
|
||||
// 在ID前面添加一个前缀,以防止与其他ID冲突
|
||||
const uniqueID = 'file_' + timestamp;
|
||||
return uniqueID;
|
||||
},
|
||||
/** 查询部门下拉树结构 */
|
||||
getDeptTree() {
|
||||
deptTreeSelect().then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
},
|
||||
/** 查询树形下拉树结构 */
|
||||
getDocumentTree() {
|
||||
documentTree().then(res => {
|
||||
this.docCategory = res.data;
|
||||
});
|
||||
},
|
||||
/**初始化 **/
|
||||
resetForm() {
|
||||
let self = this
|
||||
self.form.docPrincipalsName = null
|
||||
this.$refs.form.resetFields();
|
||||
this.toolDataInfo = []
|
||||
this.fileList = []
|
||||
this.attachmentList = []
|
||||
this.detailBoolean = false
|
||||
this.setAllRequiredTrue(true)
|
||||
this.$nextTick(()=>{
|
||||
if(self.$refs.uploadFile){
|
||||
self.$refs.uploadFile.clearFile();
|
||||
}
|
||||
})
|
||||
},
|
||||
editInit(docId, type){
|
||||
let self = this
|
||||
if(type == "detail"){
|
||||
this.detailBoolean = true
|
||||
self.setAllRequiredTrue(false)
|
||||
}
|
||||
self.$refs.form.resetFields();
|
||||
self.toolDataInfo = []
|
||||
self.$nextTick(()=>{
|
||||
if(self.$refs.uploadFile){
|
||||
self.$refs.uploadFile.clearFile();
|
||||
}
|
||||
|
||||
getDocument(docId).then(res => {
|
||||
self.form = res.data
|
||||
self.toolDataInfo = []
|
||||
let toolInfo = {toolId:self.form.toolId,toolName:self.form.toolName}
|
||||
self.toolDataInfo.push(toolInfo)
|
||||
|
||||
self.dataFile = []
|
||||
/* let fileData = res.data.attachment
|
||||
self.$set(fileData, "name", fileData.fileOldName)
|
||||
self.$set(fileData, "size", fileData.fileSize)
|
||||
self.dataFile.push(fileData) */
|
||||
|
||||
self.getAttachmentList()
|
||||
|
||||
setTimeout(() => {
|
||||
self.$set(self.form, "docCategoryName" , self.findLabelById(self.docCategory, self.form.docCategoryId) )
|
||||
}, 300);
|
||||
|
||||
});
|
||||
})
|
||||
},
|
||||
/** 评论 **/
|
||||
handleDiscussions(){
|
||||
let self = this
|
||||
if (this.discussionContent == '' || this.discussionContent == null || this.discussionContent == undefined) {
|
||||
self.$message({
|
||||
message: '内容不能为空',//提示的信息
|
||||
type:'warning', //类型是成功
|
||||
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||
});
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
businessId: this.form.docId,
|
||||
content: this.discussionContent,
|
||||
type: "doc",
|
||||
}
|
||||
self.$modal.confirm('是否确认发布?').then(()=> {
|
||||
addDiscussions(data).then(res => {
|
||||
this.discussionContent = null
|
||||
self.$message({
|
||||
message: '发布成功',//提示的信息
|
||||
type:'success', //类型是成功
|
||||
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||
});
|
||||
self.getAttachmentList()
|
||||
}).catch(err =>{
|
||||
this.discussionContent = null
|
||||
console.error("handleDiscussions==err==", err)
|
||||
self.$modal.msgError("发布失败");
|
||||
});
|
||||
})
|
||||
},
|
||||
getAttachmentList() {
|
||||
let self = this
|
||||
this.$set(this.queryParams,'del',"0")
|
||||
this.$set(this.queryParams,'businessId',this.form.docId)
|
||||
listAttachment(this.queryParams).then(res => {
|
||||
self.attachmentList = res.rows;
|
||||
self.total = res.total;
|
||||
self.loading = false;
|
||||
});
|
||||
|
||||
},
|
||||
getFirstChar(value) {
|
||||
if(!value){return ''}
|
||||
return value.charAt(0);
|
||||
},
|
||||
toggleReplyForm(index) {
|
||||
this.$set(this.showReplyForm, index, !this.showReplyForm[index]);
|
||||
},
|
||||
cancelReply(index) {
|
||||
this.$set(this.showReplyForm, index, false);
|
||||
this.$set(this.replyContent, index, '');
|
||||
},
|
||||
/** 第二级 **/
|
||||
toggleReplyFormSon(parentIndex, repIndex) {
|
||||
const parentItem = this.discussionsList[parentIndex];
|
||||
this.$set(parentItem.showReplyFormSon, repIndex, !parentItem.showReplyFormSon[repIndex]);
|
||||
// this.$set(this.showReplyFormSon, index, !this.showReplyFormSon[index]);
|
||||
},
|
||||
/** 第二级,取消回复 **/
|
||||
cancelReplySon(parentIndex, repIndex) {
|
||||
const parentItem = this.discussionsList[parentIndex];
|
||||
this.$set(parentItem.showReplyFormSon, repIndex, false);
|
||||
this.$set(parentItem.replyContentSon, repIndex, '');
|
||||
},
|
||||
/** 第二级回复 **/
|
||||
submitReplySon(parentIndex, repIndex, repItem) {
|
||||
let self = this
|
||||
const parentItem = this.discussionsList[parentIndex];
|
||||
const content = parentItem.replyContentSon[repIndex];
|
||||
if (content.trim() == '' || content == null || content == undefined) {
|
||||
self.$message({
|
||||
message: '回复内容不能为空',//提示的信息
|
||||
type:'warning', //类型是成功
|
||||
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||
});
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
"discussionId": repItem.id,
|
||||
"content": content,
|
||||
}
|
||||
|
||||
self.$modal.confirm('是否确认发布?').then(()=> {
|
||||
addReplies(data).then(res => {
|
||||
self.$message({
|
||||
message: '发布成功',//提示的信息
|
||||
type:'success', //类型是成功
|
||||
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||
});
|
||||
self.cancelReplySon(parentIndex, repIndex)
|
||||
self.getAttachmentList()
|
||||
}).catch(err =>{
|
||||
console.error("submitReplySon==err==", err)
|
||||
self.$modal.msgError("发布失败");
|
||||
});
|
||||
})
|
||||
|
||||
// 清空回复内容并隐藏表单
|
||||
this.$set(parentItem.replyContentSon, repIndex, '');
|
||||
this.$set(parentItem.showReplyFormSon, repIndex, false);
|
||||
},
|
||||
/** 回复 **/
|
||||
submitReply(index, item) {
|
||||
let self = this
|
||||
const content = this.replyContent[index];
|
||||
if (content == '' || content == null || content == undefined) {
|
||||
self.$message({
|
||||
message: '回复内容不能为空',//提示的信息
|
||||
type:'warning', //类型是成功
|
||||
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||
});
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
"discussionId": item.id,
|
||||
"content": content,
|
||||
}
|
||||
|
||||
self.$modal.confirm('是否确认发布?').then(()=> {
|
||||
addReplies(data).then(res => {
|
||||
self.$message({
|
||||
message: '发布成功',//提示的信息
|
||||
type:'success', //类型是成功
|
||||
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||
});
|
||||
self.cancelReply(index)
|
||||
self.getAttachmentList()
|
||||
}).catch(err =>{
|
||||
console.error("handleDiscussions==err==", err)
|
||||
self.$modal.msgError("发布失败");
|
||||
});
|
||||
})
|
||||
|
||||
// 清空回复内容并隐藏表单
|
||||
this.replyContent[index] = '';
|
||||
this.showReplyForm[index] = false;
|
||||
},
|
||||
previewAuth(row){
|
||||
if(row.fileUrl == null || row.fileUrl == '' || row.fileUrl == undefined){
|
||||
return false
|
||||
}
|
||||
let extension = this.getExtension(row.fileUrl);
|
||||
const acceptedExtensions = this.attFileType.toLowerCase().split(',');
|
||||
if(acceptedExtensions.includes(extension)){
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
getExtension(filePath) {
|
||||
// 分割字符串,以 '.' 为分隔符
|
||||
const parts = filePath.split('.');
|
||||
// 取最后一个部分作为后缀名
|
||||
const extension = parts.pop();
|
||||
return extension;
|
||||
},
|
||||
handlePreview(row){
|
||||
this.isPreviewDisable = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.previewForm.frontModulePreview(row)
|
||||
})
|
||||
},
|
||||
/** 关闭预览 **/
|
||||
previewClose(){
|
||||
this.isPreviewDisable = false
|
||||
},
|
||||
/**
|
||||
* 处理下载
|
||||
* **/
|
||||
handleDownload(row){
|
||||
let self = this
|
||||
self.loadingDownload = true
|
||||
this.$download.resource(row.fileUrl);
|
||||
|
||||
//保存下载记录
|
||||
if(row.businessId){
|
||||
let formData = {
|
||||
'businessId': row.businessId,
|
||||
'businessType': 'doc',
|
||||
'attId': row.id,
|
||||
'attName': row.fileOldName
|
||||
}
|
||||
addCount(formData).then(res => {
|
||||
});
|
||||
}
|
||||
|
||||
setTimeout(()=>{
|
||||
self.loadingDownload = false
|
||||
},1000)
|
||||
},
|
||||
handleDelete(row){
|
||||
const index = this.attachmentList.findIndex(item => item.fileNewName == row.fileNewName);
|
||||
if (index !== -1) {
|
||||
// 从 attachmentList 中删除数据
|
||||
this.attachmentList.splice(index, 1);
|
||||
// 处理当前页面可能没有数据的情况,跳到上一页
|
||||
if (this.paginatedData.length === 0 && this.currentPage > 1) {
|
||||
this.currentPage--;
|
||||
}
|
||||
}
|
||||
// this.attachmentList.splice(row,1)
|
||||
},
|
||||
handleBeforeClose() {
|
||||
this.viewDialogOpen = false
|
||||
},
|
||||
handleUploadSuccess(res) {
|
||||
this.attachmentList.push(res)
|
||||
// 处理上传成功后的逻辑
|
||||
},
|
||||
handleUploadError(error) {
|
||||
// 处理上传失败后的逻辑
|
||||
},
|
||||
isShowOperation(row){
|
||||
let self = this
|
||||
if(row.businessId == null || row.businessId == undefined || row.businessId == ''){
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
submitPeople(peopleList){
|
||||
this.$set(this.form,'docPrincipals',peopleList[0]['userId'])
|
||||
this.$set(this.form,'docPrincipalsName',peopleList[0]['nickName'])
|
||||
this.toolPrincipalsChoose = false;
|
||||
},
|
||||
setAllRequiredTrue(value) {
|
||||
Object.keys(this.rules).forEach(key => {
|
||||
this.rules[key].forEach(rule => {
|
||||
rule.required = value;
|
||||
});
|
||||
});
|
||||
},
|
||||
handlePageChange(newPage) {
|
||||
this.currentPage = newPage;
|
||||
},
|
||||
// 递归查找方法
|
||||
findLabelById(treeData, id) {
|
||||
for (let i = 0; i < treeData.length; i++) {
|
||||
let item = treeData[i];
|
||||
if (item.id == id) {
|
||||
return item.label;
|
||||
}
|
||||
if (item.children && item.children.length) {
|
||||
const label = this.findLabelById(item.children, id);
|
||||
if (label) {
|
||||
return label;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -23,7 +23,7 @@
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="文档名称" prop="docName">
|
||||
<template v-if="detailBoolean">{{form.docCode}}</template>
|
||||
<template v-if="detailBoolean">{{form.docName}}</template>
|
||||
<template v-else>
|
||||
<el-input v-model="form.docName" placeholder="请输入文档名称" maxlength="200" show-word-limit/>
|
||||
</template>
|
||||
@ -130,10 +130,6 @@
|
||||
</div>
|
||||
<div class="el-form-border">
|
||||
<div class="operate">
|
||||
<!-- <el-form-item label="文件" required>
|
||||
|
||||
</el-form-item>
|
||||
<el-button type="primary" icon="el-icon-upload2" v-if="editStatus" @click="handleDocAdd">上传</el-button>-->
|
||||
<template v-if="editStatus && !detailBoolean">
|
||||
<uploadVue
|
||||
:display="editStatus"
|
||||
@ -150,12 +146,12 @@
|
||||
</template>
|
||||
<!-- <el-button icon="el-icon-delete">删除</el-button>-->
|
||||
</div><!--operate 操作按钮-->
|
||||
<el-table :data="attachmentList" style="width: 100%">
|
||||
<el-table :data="paginatedData" style="width: 100%">
|
||||
<!-- <el-table-column type="selection" width="50" align="center"> </el-table-column>-->
|
||||
<el-table-column label="序号" width="60" type="index"></el-table-column>
|
||||
<el-table-column label="序号" width="60" type="index" align="center"></el-table-column>
|
||||
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
||||
<el-table-column label="操作" align="center" width="180" v-if="!detailBoolean">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@ -167,24 +163,27 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="editStatus && !detailBoolean"
|
||||
v-if="editStatus"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-button type="text" icon="el-icon-download" v-if="isShowOperation(scope.row)" @click="handleDownload(scope.row)" v-loading="loadingDownload">下载</el-button>
|
||||
<el-button type="text" icon="el-icon-download" v-if="isShowOperation(scope.row)"
|
||||
@click="handleDownload(scope.row)" v-loading="loadingDownload">下载</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getAttachmentList"
|
||||
/>
|
||||
</el-table><!--el-table-->
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination
|
||||
v-show="total > 0"
|
||||
:current-page.sync="currentPage"
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@current-change="handlePageChange"
|
||||
layout="total, prev, pager, next"
|
||||
/>
|
||||
</div>
|
||||
</div><!--fl 左侧页签-->
|
||||
|
||||
<div class="fr" v-if="detailBoolean">
|
||||
<div class="fr" v-if="detailBoolean && isComment">
|
||||
<div class="tboper">
|
||||
<div class="tit">评论</div>
|
||||
</div><!--tboper 标题与操作按钮-->
|
||||
@ -274,6 +273,22 @@
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
//是否展示下载
|
||||
isDownload: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return true
|
||||
},
|
||||
required: false
|
||||
},
|
||||
//是否展示评论
|
||||
isComment: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return true
|
||||
},
|
||||
required: false
|
||||
},
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
@ -368,12 +383,25 @@
|
||||
},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pageSize: 99999,
|
||||
},
|
||||
total: 0
|
||||
currentPage: 1, // 当前页
|
||||
pageSize: 10, // 每页显示数量
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 分页后的数据
|
||||
paginatedData() {
|
||||
const start = (this.currentPage - 1) * this.pageSize;
|
||||
const end = this.currentPage * this.pageSize;
|
||||
return this.attachmentList.slice(start, end);
|
||||
},
|
||||
// 总数据条数
|
||||
total() {
|
||||
return this.attachmentList.length;
|
||||
},
|
||||
},
|
||||
created(){
|
||||
this.getDeptTree();
|
||||
this.getDocumentTree();
|
||||
@ -639,9 +667,9 @@
|
||||
let self = this
|
||||
this.$set(this.queryParams,'del',"0")
|
||||
this.$set(this.queryParams,'businessId',this.form.docId)
|
||||
listAttachment({businessId:this.form.docId}).then(res => {
|
||||
listAttachment(this.queryParams).then(res => {
|
||||
self.attachmentList = res.rows;
|
||||
self.total = res.total;
|
||||
// self.total = res.total;
|
||||
self.loading = false;
|
||||
});
|
||||
},
|
||||
@ -794,7 +822,16 @@
|
||||
},1000)
|
||||
},
|
||||
handleDelete(row){
|
||||
this.attachmentList.splice(row,1)
|
||||
const index = this.attachmentList.findIndex(item => item.fileNewName == row.fileNewName);
|
||||
if (index !== -1) {
|
||||
// 从 attachmentList 中删除数据
|
||||
this.attachmentList.splice(index, 1);
|
||||
// 处理当前页面可能没有数据的情况,跳到上一页
|
||||
if (this.paginatedData.length === 0 && this.currentPage > 1) {
|
||||
this.currentPage--;
|
||||
}
|
||||
}
|
||||
// this.attachmentList.splice(row,1)
|
||||
},
|
||||
handleBeforeClose() {
|
||||
this.viewDialogOpen = false
|
||||
@ -824,7 +861,10 @@
|
||||
rule.required = value;
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
handlePageChange(newPage) {
|
||||
this.currentPage = newPage;
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -228,6 +228,7 @@
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!--文档修改-->
|
||||
<el-drawer :visible.sync="open"
|
||||
:modal-append-to-body="false" :show-close="false" :close-on-press-escape="false"
|
||||
size="75%">
|
||||
@ -245,7 +246,21 @@
|
||||
</el-drawer>
|
||||
|
||||
|
||||
<!-- 工具导出对话框 -->
|
||||
<!--文档详情-->
|
||||
<el-drawer :visible.sync="detailDocOpen"
|
||||
:modal-append-to-body="false" :show-close="false" :close-on-press-escape="false"
|
||||
size="75%">
|
||||
<template #title>
|
||||
<span class="title">{{docTitle}}</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button @click="docDetailCancel()">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<doc-detail ref="docDetailRef" @submit="docDetailFormSubmit"/>
|
||||
</el-drawer>
|
||||
|
||||
|
||||
<!-- 文档导出对话框 -->
|
||||
<el-dialog :title="exportTitle" :visible.sync="exportDrawerOpen"
|
||||
:modal-append-to-body="false" :show-close="false" :close-on-press-escape="false"
|
||||
width="980px" append-to-body>
|
||||
@ -288,7 +303,7 @@
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 工具详情对话框 -->
|
||||
<!-- 文档下载对话框 -->
|
||||
<el-drawer :visible.sync="fileDetailDrawerOpen"
|
||||
:modal-append-to-body="false" :show-close="false" :close-on-press-escape="false"
|
||||
size="80%" class="no-padding" @close="handleFileCloseDetail()">
|
||||
@ -302,7 +317,8 @@
|
||||
<download-file-detail ref="downloadFileDetailRef" :docDetail="docDetail"/>
|
||||
</template>
|
||||
</el-drawer><!--el-drawer 详情-抽屉-->
|
||||
<!-- <upload-progress/>-->
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -316,10 +332,12 @@ import uploadProgress from "./uploadProgress";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import { exportDocx } from '@/utils/docUtil/docutil.js';
|
||||
import downloadFileDetail from "./downloadFileDetail.vue";
|
||||
import docDetail from "@/views/document/detail";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
name: "Document",
|
||||
components: { editDocument, uploadProgress, Treeselect, downloadFileDetail},
|
||||
components: { editDocument, uploadProgress, Treeselect, downloadFileDetail, docDetail},
|
||||
dicts:['doc_class','doc_source','doc_upload_status'],
|
||||
data() {
|
||||
return {
|
||||
@ -447,6 +465,8 @@ export default {
|
||||
batchExportFlag: false,
|
||||
//查询
|
||||
selection: undefined,
|
||||
docDetail: {},
|
||||
detailDocOpen: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -523,12 +543,12 @@ export default {
|
||||
})
|
||||
},
|
||||
handleDetail(row){
|
||||
this.docTitle="详情"
|
||||
this.docTitle="文档详情"
|
||||
this.docTipAddOrEdit = 'detail'
|
||||
this.docDetailDisable=false
|
||||
this.open = true
|
||||
this.detailDocOpen = true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.editDocumentRef.editInit(row.docId, "detail");
|
||||
this.$refs.docDetailRef.editInit(row.docId, "detail");
|
||||
})
|
||||
},
|
||||
handlePreview(row){
|
||||
@ -550,6 +570,10 @@ export default {
|
||||
this.open = false;
|
||||
this.getList();
|
||||
},
|
||||
docDetailFormSubmit: function() {
|
||||
this.detailDocOpen = false;
|
||||
this.getList();
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
let self = this
|
||||
@ -648,16 +672,30 @@ export default {
|
||||
},
|
||||
/** 发布操作 */
|
||||
handlePush(row) {
|
||||
let self = this
|
||||
const docIds = row.docId || this.ids;
|
||||
if(docIds == null || docIds == undefined || docIds =='' || docIds.length < 0){
|
||||
this.$modal.msgError(`最少选择一条数据`);
|
||||
return;
|
||||
}
|
||||
//只能删除已上传数据
|
||||
let delFlag = false;
|
||||
for(let item of self.selection){
|
||||
if(!(item.docStatus == 'ysc')){
|
||||
delFlag = true;
|
||||
}
|
||||
}
|
||||
if(delFlag){
|
||||
this.$modal.msgError(`只能发布文档状态为[已上传]数据,请重新选择`);
|
||||
return
|
||||
}
|
||||
|
||||
this.$modal.confirm('是否确认发布?').then(function() {
|
||||
return pushDoc(docIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("发布成功");
|
||||
self.getList();
|
||||
store.commit('SET_UNREAD_MSG_NUMBER', this.$store.state.user.unreadMsgNumber+1);
|
||||
self.$modal.msgSuccess("发布成功");
|
||||
}).catch((err) => {
|
||||
console.error(err)
|
||||
});
|
||||
@ -672,6 +710,10 @@ export default {
|
||||
this.$refs.editDocumentRef.resetForm();
|
||||
this.open = false
|
||||
},
|
||||
docDetailCancel(){
|
||||
this.$refs.docDetailRef.resetForm();
|
||||
this.detailDocOpen = false
|
||||
},
|
||||
previewAuth(row){
|
||||
if(row.docUrl == null || row.docUrl == '' || row.docUrl == undefined){
|
||||
return false
|
||||
|
@ -80,7 +80,7 @@
|
||||
</div>
|
||||
<div class="rt">
|
||||
<el-table v-loading="downLoading" :data="toolDownStatList">
|
||||
<el-table-column type="index" label="序号" width="50" />
|
||||
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||
<el-table-column label="文档编号" align="center" key="docCode" prop="docCode" />
|
||||
<el-table-column label="文档名称" align="center" key="docName" prop="docName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="下载次数" align="center" key="docDownNum" prop="docDownNum" width="120" />
|
||||
|
@ -13,8 +13,19 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="消息类型" prop="businessType">
|
||||
<el-select v-model="queryParams.businessType" placeholder="请选择消息类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.msg_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="状态" prop="states">
|
||||
<el-select v-model="queryParams.states" placeholder="状态" clearable>
|
||||
<el-select v-model="queryParams.states" placeholder="请选择状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.msg_status"
|
||||
:key="dict.value"
|
||||
@ -37,10 +48,24 @@
|
||||
<el-button type="primary" v-if="tableList && tableList.length > 0" @click="setAllMarkedRead" icon="el-icon-check">全部标记已读</el-button>
|
||||
</div><!--operate 操作按钮-->
|
||||
<el-table v-loading="loading" :data="tableList">
|
||||
<el-table-column type="index" label="序号" width="50" />
|
||||
<el-table-column label="消息内容" prop="content" min-width="120" />
|
||||
<el-table-column label="接收时间" prop="createTime" :show-overflow-tooltip="true" min-width="120"/>
|
||||
<el-table-column label="消息状态" prop="states" :show-overflow-tooltip="true" min-width="80" >
|
||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||
<el-table-column label="消息内容" prop="content" min-width="120">
|
||||
<template v-slot="{ row }">
|
||||
<el-link target="_blank" @click="handleDetail(row)">
|
||||
{{ row.content }}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="消息类型" align="center" prop="businessType" width="80px">
|
||||
<template v-slot="{ row }">
|
||||
<template v-for="dict in dict.type.msg_type">
|
||||
<!-- {{ dict }} -->
|
||||
<el-tag :type="dict.raw.listClass" v-if="row.businessType == dict.value" :key="dict.value">{{ dict.label }}</el-tag>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="接收时间" prop="createTime" :show-overflow-tooltip="true" width="160px"/>
|
||||
<el-table-column label="消息状态" prop="states" align="center" :show-overflow-tooltip="true" width="80px" >
|
||||
<template v-slot="{ row }">
|
||||
<template v-for="dict in dict.type.msg_status">
|
||||
<!-- {{ dict }} -->
|
||||
@ -48,7 +73,7 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="100" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="160px" fixed="right">
|
||||
<template v-slot="{ row }">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -69,16 +94,52 @@
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<!-- 工具详情对话框 -->
|
||||
<el-drawer :visible.sync="detailDrawerOpen" :modal-append-to-body="false" :show-close="false"
|
||||
size="80%" class="no-padding" :close-on-press-escape="false" @close="handleCloseDetail()">
|
||||
<template #title>
|
||||
<span>{{toolTitle}}</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button @click="detailDrawerOpen = false">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<template v-if="detailOpen">
|
||||
<tool-detail ref="toolDetailRef" :toolDetail="toolDetail" :isDownload="false" :isComment="false"/>
|
||||
</template>
|
||||
</el-drawer><!--el-drawer 详情-抽屉-->
|
||||
|
||||
|
||||
|
||||
<!--文档详情-->
|
||||
<el-drawer :visible.sync="detailDocOpen"
|
||||
:modal-append-to-body="false" :show-close="false" :close-on-press-escape="false"
|
||||
size="75%">
|
||||
<template #title>
|
||||
<span class="title">{{docTitle}}</span>
|
||||
<div class="drawer-head-btn">
|
||||
<el-button @click="docCancel()">关 闭</el-button>
|
||||
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||
</template>
|
||||
<doc-detail ref="editDocumentRef" @submit="editDocumentSubmit" :isDownload="false" :isComment="false"/>
|
||||
</el-drawer>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMessage, getMessage, delMessage, addMessage, updateMessage,allMarkedRead } from "@/api/message/message"
|
||||
import { listMessage, updateMessage,allMarkedRead } from "@/api/message/message"
|
||||
import { deptTreeSelect } from "@/api/system/user";
|
||||
import docDetail from "@/views/document/detail";
|
||||
import toolDetail from "@/views/tool/toolDetail";
|
||||
import { getUserMsgCount } from "@/api/message/message"
|
||||
|
||||
export default {
|
||||
name: "Document",
|
||||
dicts: ['msg_status'],
|
||||
dicts: ['msg_status', 'msg_type'],
|
||||
components: { docDetail, toolDetail},
|
||||
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@ -120,7 +181,18 @@ export default {
|
||||
pageSize: 10,
|
||||
content: '',
|
||||
states: '',
|
||||
businessType: '',
|
||||
},
|
||||
//工具
|
||||
detailDrawerOpen: false,
|
||||
toolTitle:'',
|
||||
detailOpen: false,
|
||||
toolDetail: {},
|
||||
//文档
|
||||
docTitle: '',
|
||||
detailDocOpen: false,
|
||||
docTipAddOrEdit: null,
|
||||
docDetailDisable: true,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -179,6 +251,9 @@ export default {
|
||||
self.$set(formData, "states", 2)
|
||||
updateMessage(formData).then(response => {
|
||||
self.$modal.msgSuccess(response?.msg || '操作成功')
|
||||
getUserMsgCount(self.$store.getters.userId).then(res => {
|
||||
self.$store.commit("SET_UNREAD_MSG_NUMBER", res.data);
|
||||
});
|
||||
self.getList();
|
||||
})
|
||||
}).catch((err) => {console.error(err)});
|
||||
@ -200,10 +275,48 @@ export default {
|
||||
}
|
||||
allMarkedRead(formData).then(response => {
|
||||
self.$modal.msgSuccess(response?.msg || '操作成功')
|
||||
|
||||
getUserMsgCount(self .$store.getters.userId).then(res => {
|
||||
self.$store.commit("SET_UNREAD_MSG_NUMBER", res.data);
|
||||
});
|
||||
|
||||
self.getList();
|
||||
})
|
||||
}).catch((err) => {console.error(err)});
|
||||
},
|
||||
/** 查看详情 **/
|
||||
handleDetail(row){
|
||||
if(row.businessType == 'tool'){
|
||||
this.detailDrawerOpen = true
|
||||
this.detailOpen = true
|
||||
this.toolDetail = {toolId: row.businessId}
|
||||
this.toolTitle = '工具详情'
|
||||
}else if(row.businessType == 'doc'){
|
||||
this.docTitle="文档详情"
|
||||
this.docTipAddOrEdit = 'detail'
|
||||
this.docDetailDisable=false
|
||||
this.detailDocOpen = true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.editDocumentRef.editInit(row.businessId, "detail");
|
||||
})
|
||||
}
|
||||
},
|
||||
/** 关闭详情 **/
|
||||
handleCloseDetail(){
|
||||
this.detailDrawerOpen = false;
|
||||
this.detailOpen = false;
|
||||
this.$refs.toolDetailRef.$destroy(); // 销毁组件
|
||||
this.$nextTick(() => {
|
||||
this.$refs.toolDetailRef = null; // 清空引用
|
||||
});
|
||||
},
|
||||
docCancel(){
|
||||
this.$refs.editDocumentRef.resetForm();
|
||||
this.detailDocOpen = false
|
||||
},
|
||||
editDocumentSubmit: function() {
|
||||
this.detailDocOpen = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
2
src/views/monitor/cache/list.vue
vendored
2
src/views/monitor/cache/list.vue
vendored
@ -23,6 +23,7 @@
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="60"
|
||||
align="center"
|
||||
type="index"
|
||||
></el-table-column>
|
||||
|
||||
@ -81,6 +82,7 @@
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="60"
|
||||
align="center"
|
||||
type="index"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
|
@ -95,7 +95,7 @@
|
||||
</div>
|
||||
<div class="rt">
|
||||
<el-table v-loading="downLoading" :data="toolDownStatList">
|
||||
<el-table-column type="index" label="序号" width="50" />
|
||||
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||
<el-table-column label="工具编号" align="center" key="toolCode" prop="toolCode" />
|
||||
<el-table-column label="工具名称" align="center" key="toolName" prop="toolName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="下载次数" align="center" key="toolDownNum" prop="toolDownNum" width="120" />
|
||||
|
@ -290,16 +290,15 @@ export default {
|
||||
value: "1",
|
||||
label: "全部数据权限"
|
||||
},
|
||||
/*
|
||||
{
|
||||
value: "2",
|
||||
label: "自定数据权限"
|
||||
},*/
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
label: "本部门数据权限"
|
||||
}
|
||||
/*,
|
||||
,
|
||||
{
|
||||
value: "4",
|
||||
label: "本部门及以下数据权限"
|
||||
@ -307,7 +306,7 @@ export default {
|
||||
{
|
||||
value: "5",
|
||||
label: "仅本人数据权限"
|
||||
}*/
|
||||
}
|
||||
],
|
||||
// 菜单列表
|
||||
menuOptions: [],
|
||||
|
@ -95,16 +95,16 @@
|
||||
</div><!--operate 操作按钮-->
|
||||
<el-table v-loading="loading" :data="toolList" ref="tableRef" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center"/>
|
||||
<el-table-column label="工具编号" key="toolCode" prop="toolCode" v-if="columns[0].visible" />
|
||||
<el-table-column label="工具名称" key="toolName" prop="toolName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="工具类别" key="toolType" prop="toolType" v-if="columns[2].visible" :show-overflow-tooltip="true" >
|
||||
<el-table-column label="工具编号" key="toolCode" prop="toolCode" width="150px"/>
|
||||
<el-table-column label="工具名称" key="toolName" prop="toolName" :show-overflow-tooltip="true" width="150px"/>
|
||||
<el-table-column label="工具类别" key="toolType" prop="toolType" :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.tool_type" :value="scope.row.toolType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="归属单位" key="toolRespDeptName" prop="toolRespDeptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="负责人" key="toolPrincipalsName" prop="toolPrincipalsName" v-if="columns[4].visible" width="120" />
|
||||
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
||||
<el-table-column label="归属单位" key="toolRespDeptName" prop="toolRespDeptName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="负责人" key="toolPrincipalsName" prop="toolPrincipalsName" width="120" />
|
||||
<el-table-column label="状态" align="center" key="status" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.tool_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
@ -146,7 +146,7 @@
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
@ -155,12 +155,12 @@
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
width="270px"
|
||||
width="260px"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- && !scope.row.downloadStatus-->
|
||||
<el-button type="text" icon="el-icon-info" v-if="checkApplyUseBtn(scope.row)" @click="applyUse(scope.row)">申请使用</el-button>
|
||||
<!-- && !scope.row.downloadStatus v-if="checkApplyUseBtn(scope.row)"-->
|
||||
<el-button type="text" icon="el-icon-info" @click="applyUse(scope.row)">申请使用</el-button>
|
||||
<el-button type="text" icon="el-icon-info" @click="handleDetail(scope.row)">详情</el-button>
|
||||
<el-button type="text" icon="el-icon-download" v-if="scope.row.downloadStatus" @click="handleFileDownload(scope.row)">下载</el-button>
|
||||
<el-dropdown size="mini" v-if="selectable(scope.row)" @command="(command) => handleCommand(command, scope.row)">
|
||||
|
@ -29,7 +29,7 @@
|
||||
</el-form><!--el-form-->
|
||||
</div><!--el-form-border 表单-->
|
||||
</el-tab-pane><!--el-tab-pane-->
|
||||
<el-tab-pane label="关联文件" name="second">
|
||||
<el-tab-pane label="关联附件" name="second">
|
||||
<el-table :data="attachmentList" style="width: 100%">
|
||||
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
|
||||
<!-- <el-table-column label="类别" prop="docType" :show-overflow-tooltip="true" width="80" >
|
||||
@ -58,21 +58,21 @@
|
||||
v-if="previewAuth(scope.row)"
|
||||
@click="handlePreview(scope.row)"
|
||||
>预览</el-button>
|
||||
<el-button type="text" icon="el-icon-download" @click="handleDownload(scope.row)" v-loading="loadingDownload">下载</el-button>
|
||||
<el-button type="text" icon="el-icon-download" v-if="isDownload" @click="handleDownload(scope.row)" v-loading="loadingDownload">下载</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table><!--el-table-->
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getAttachmentList"
|
||||
/>
|
||||
</el-tab-pane><!--el-tab-pane-->
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getAttachmentList"
|
||||
/>
|
||||
</el-tabs><!--el-tabs-->
|
||||
</div><!--fl 左侧页签-->
|
||||
<div class="fr">
|
||||
<div class="fr" v-if="isComment">
|
||||
<div class="tboper">
|
||||
<div class="tit">评论</div>
|
||||
</div><!--tboper 标题与操作按钮-->
|
||||
@ -162,7 +162,19 @@
|
||||
type: Object,
|
||||
default: {},
|
||||
required: false
|
||||
}
|
||||
},
|
||||
//是否展示下载
|
||||
isDownload: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
required: false
|
||||
},
|
||||
//是否展示评论
|
||||
isComment: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
required: false
|
||||
},
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
|
@ -244,7 +244,7 @@
|
||||
</template>
|
||||
<!-- <el-button icon="el-icon-delete">删除</el-button>-->
|
||||
</div><!--operate 操作按钮-->
|
||||
<el-table :data="attachmentList" style="width: 100%">
|
||||
<el-table :data="paginatedData" style="width: 100%">
|
||||
<!-- <el-table-column type="selection" width="50" align="center"> </el-table-column>-->
|
||||
<el-table-column label="序号" width="60" align="center" type="index"></el-table-column>
|
||||
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
|
||||
@ -268,6 +268,15 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table><!--el-table-->
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination
|
||||
v-show="total > 0"
|
||||
:current-page.sync="currentPage"
|
||||
:page-size.sync="pageSize"
|
||||
:total="total"
|
||||
@current-change="handlePageChange"
|
||||
layout="total, prev, pager, next"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 流程选择下一环节及人员 开始 -->
|
||||
@ -330,6 +339,7 @@ import ToolSelector from '@/components/tool-selector/index.vue'
|
||||
import uploadVue from '@/components/FileUpload/optimizeToolUpload.vue'
|
||||
import { addCount } from "@/api/tool/downloadCount";
|
||||
import previewUtil from '@/components/PreviewUtil/previewUtil.vue'
|
||||
import store from "@/store";
|
||||
|
||||
// PDF本地文件预览
|
||||
export default {
|
||||
@ -364,10 +374,9 @@ export default {
|
||||
return {
|
||||
toolPrincipalsChoose: false,
|
||||
addDocShow: false,
|
||||
docQueryParams: {
|
||||
attQueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
toolId: ''
|
||||
pageSize: 99999,
|
||||
},
|
||||
defaultStaff: [],
|
||||
yes: 'Y',
|
||||
@ -462,10 +471,23 @@ export default {
|
||||
attachmentList: [],
|
||||
attFileType: "zip,rar,7z",
|
||||
isPreviewDisable: false,
|
||||
title: '工具发布'
|
||||
title: '工具发布',
|
||||
currentPage: 1, // 当前页
|
||||
pageSize: 10, // 每页显示数量
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
computed: {
|
||||
// 分页后的数据
|
||||
paginatedData() {
|
||||
const start = (this.currentPage - 1) * this.pageSize;
|
||||
const end = this.currentPage * this.pageSize;
|
||||
return this.attachmentList.slice(start, end);
|
||||
},
|
||||
// 总数据条数
|
||||
total() {
|
||||
return this.attachmentList.length;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
data (val) {
|
||||
if (val) {
|
||||
@ -524,7 +546,7 @@ export default {
|
||||
// _this.attachmentList = formData.attachmentList
|
||||
formData.association = JSON.parse(res.data.association)
|
||||
_this.form = formData
|
||||
_this.getDocumentList(res.data.toolId)
|
||||
_this.getAttachmentList(res.data.toolId)
|
||||
}).finally(()=>{
|
||||
_this.detailLoading = false
|
||||
});
|
||||
@ -812,6 +834,10 @@ export default {
|
||||
this.$set(formData,'attachmentList',_this.attachmentList)
|
||||
addTool(formData).then((res) => {
|
||||
if (res.code===200) {
|
||||
/* if(formData.recordStatus == 'done'){
|
||||
console.info("2222222222222222", _this.$store.state.user.unreadMsgNumber+1)
|
||||
store.commit('SET_UNREAD_MSG_NUMBER', _this.$store.state.user.unreadMsgNumber+1);
|
||||
} */
|
||||
_this.$message({
|
||||
message: '流程提交成功',//提示的信息
|
||||
type:'success', //类型是成功
|
||||
@ -833,7 +859,15 @@ export default {
|
||||
});
|
||||
},
|
||||
handleDelete(row){
|
||||
this.attachmentList.splice(row,1)
|
||||
const index = this.attachmentList.findIndex(item => item.fileNewName == row.fileNewName);
|
||||
if (index !== -1) {
|
||||
// 从 attachmentList 中删除数据
|
||||
this.attachmentList.splice(index, 1);
|
||||
// 处理当前页面可能没有数据的情况,跳到上一页
|
||||
if (this.paginatedData.length === 0 && this.currentPage > 1) {
|
||||
this.currentPage--;
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 新增上传附件
|
||||
@ -844,13 +878,13 @@ export default {
|
||||
this.$refs.addDocRef.resetForm()
|
||||
})
|
||||
},
|
||||
getDocumentList(toolId) {
|
||||
getAttachmentList(toolId) {
|
||||
this.loading = true
|
||||
this.$set(this.docQueryParams,'del',"0")
|
||||
this.$set(this.docQueryParams,'businessId',toolId)
|
||||
listAttachment(this.docQueryParams).then(res => {
|
||||
this.$set(this.attQueryParams,'del',"0")
|
||||
this.$set(this.attQueryParams,'businessId',toolId)
|
||||
listAttachment(this.attQueryParams).then(res => {
|
||||
this.attachmentList = res.rows;
|
||||
this.total = res.total;
|
||||
// this.total = res.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
@ -978,6 +1012,9 @@ export default {
|
||||
handleUploadError(error) {
|
||||
// 处理上传失败后的逻辑
|
||||
},
|
||||
handlePageChange(newPage) {
|
||||
this.currentPage = newPage;
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
|
@ -185,6 +185,8 @@ import { addApply, getInfoByBpmcId, updateApply } from '@/api/tool/toolApply'
|
||||
import { listItem } from '@/api/tool/userApplyItem'
|
||||
import blUserSelector from '@/components/user-selector/src/user-selector.vue'
|
||||
import { getTool } from "@/api/tool/tool";
|
||||
import store from "@/store";
|
||||
|
||||
// PDF本地文件预览
|
||||
export default {
|
||||
dicts: ['sys_normal_disable','tool_type', 'tool_source', 'tool_status'],
|
||||
@ -619,6 +621,9 @@ export default {
|
||||
formData.editStatus = _this.editStatus
|
||||
addApply(formData).then((res) => {
|
||||
if (res.code===200) {
|
||||
if(formData.recordStatus == 'done'){
|
||||
store.commit('SET_UNREAD_MSG_NUMBER', _this.$store.state.user.unreadMsgNumber+1);
|
||||
}
|
||||
_this.$message({
|
||||
message: '流程提交成功',//提示的信息
|
||||
type:'success', //类型是成功
|
||||
|
@ -120,6 +120,8 @@
|
||||
<script>
|
||||
import { workflowToDoList } from "@/api/my_business/workflow";
|
||||
import DealDrawer from "@/components/DealDrawer";
|
||||
import { getUserMsgCount } from "@/api/message/message"
|
||||
|
||||
export default {
|
||||
name: "Post",
|
||||
dicts: ["sys_normal_disable", "sys_operterType"],
|
||||
@ -269,6 +271,9 @@ export default {
|
||||
// 取消按钮
|
||||
handleCloseChange() {
|
||||
this.dealDrawerShow = false
|
||||
getUserMsgCount(this.$store.getters.userId).then(res => {
|
||||
this.$store.commit("SET_UNREAD_MSG_NUMBER", res.data);
|
||||
});
|
||||
this.getListData();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user