release-v1.0 #1
@ -2495,6 +2495,11 @@ body .login-page .loright .locont .el-form--label-top .el-form-item .el-form-ite
|
|||||||
padding: 16px 32px;
|
padding: 16px 32px;
|
||||||
width: 420px;
|
width: 420px;
|
||||||
}
|
}
|
||||||
|
body .el-drawer .el-drawer__body .fbox1 .fl,
|
||||||
|
body .el-drawer .el-drawer__body .fbox1 .fr{
|
||||||
|
height: calc(100vh - 57px);
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
/*pltextarea 评论框*/
|
/*pltextarea 评论框*/
|
||||||
body .pltextarea{
|
body .pltextarea{
|
||||||
|
44
src/api/tool/discussions.js
Normal file
44
src/api/tool/discussions.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询讨论列表
|
||||||
|
export function listDiscussions(query) {
|
||||||
|
return request({
|
||||||
|
url: '/discussions/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询讨论详细
|
||||||
|
export function getDiscussions(id) {
|
||||||
|
return request({
|
||||||
|
url: '/discussions/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增讨论
|
||||||
|
export function addDiscussions(data) {
|
||||||
|
return request({
|
||||||
|
url: '/discussions',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改讨论
|
||||||
|
export function updateDiscussions(data) {
|
||||||
|
return request({
|
||||||
|
url: '/discussions',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除讨论
|
||||||
|
export function delDiscussions(id) {
|
||||||
|
return request({
|
||||||
|
url: '/discussions/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
44
src/api/tool/replies.js
Normal file
44
src/api/tool/replies.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询回复列表
|
||||||
|
export function listReplies(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/replies/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询回复详细
|
||||||
|
export function getReplies(id) {
|
||||||
|
return request({
|
||||||
|
url: '/replies/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增回复
|
||||||
|
export function addReplies(data) {
|
||||||
|
return request({
|
||||||
|
url: '/replies',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改回复
|
||||||
|
export function updateReplies(data) {
|
||||||
|
return request({
|
||||||
|
url: '/replies',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除回复
|
||||||
|
export function delReplies(id) {
|
||||||
|
return request({
|
||||||
|
url: '/replies/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -1,18 +1,78 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<div class="sl">
|
<div class="sl">
|
||||||
<el-form-item label="文档名称" prop="roleName">
|
<el-form-item label="文档编号" prop="docCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.docCode"
|
||||||
|
placeholder="请输入文档名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="文档名称" prop="docName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.docName"
|
v-model="queryParams.docName"
|
||||||
placeholder="请输入文档名称"
|
placeholder="请输入文档名称"
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px"
|
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="类别" prop="docType">
|
||||||
|
<el-select v-model="queryParams.docType" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.doc_class"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="负责人" prop="docPrincipals">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.docPrincipals"
|
||||||
|
placeholder="请输入负责人"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="归属单位" prop="docRespDept">
|
||||||
|
<treeselect v-model="queryParams.docRespDept" :options="deptOptions"
|
||||||
|
placeholder="请选择归属单位"
|
||||||
|
:show-count="true" style="width: 150px"/>
|
||||||
|
</el-form-item>-->
|
||||||
|
<el-form-item label="来源" prop="docSource">
|
||||||
|
<el-select v-model="queryParams.docSource" placeholder="请选择" >
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.doc_source"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态" prop="docStatus">
|
||||||
|
<el-select v-model="queryParams.docStatus" placeholder="请选择" >
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.doc_upload_status"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dateRange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="sr">
|
<div class="sr">
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
@ -47,9 +107,11 @@
|
|||||||
icon="el-icon-upload2"
|
icon="el-icon-upload2"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['document:add']"
|
||||||
>上传文档</el-button>
|
>上传文档</el-button>
|
||||||
<el-button type="primary" icon="el-icon-position" @click="handlePush">发布</el-button>
|
<el-button type="primary" icon="el-icon-position" @click="handlePush" v-hasPermi="['document:push']">发布</el-button>
|
||||||
<el-button icon="el-icon-delete" @click="handleDelete">批量删除</el-button>
|
<el-button icon="el-icon-delete" @click="handleDelete" v-hasPermi="['document:batch:remove']">批量删除</el-button>
|
||||||
|
<el-button icon="el-icon-download" @click="handleOpenExport()" v-hasPermi="['document:export']">导出</el-button>
|
||||||
</div><!--operate 操作按钮-->
|
</div><!--operate 操作按钮-->
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="docList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="docList" @selection-change="handleSelectionChange">
|
||||||
@ -69,12 +131,17 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="关联工具" align="center" prop="toolName" width="100" />
|
<el-table-column label="关联工具" align="center" prop="toolName" width="100" />
|
||||||
<el-table-column label="上传状态" align="center" prop="docUploadProgress" width="100" >
|
<el-table-column label="上传状态" align="center" prop="docStatus" width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.doc_upload_status" :value="scope.row.docStatus"/>
|
||||||
|
</template>
|
||||||
|
<!--
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag type="info" v-if="scope.row.docStatus == 'ysc'">已上传</el-tag>
|
<el-tag type="info" v-if="scope.row.docStatus == 'ysc'">已上传</el-tag>
|
||||||
<el-tag type="success" v-else-if="scope.row.docStatus == 'yfb'">已发布</el-tag>
|
<el-tag type="success" v-else-if="scope.row.docStatus == 'yfb'">已发布</el-tag>
|
||||||
<el-tag type="warning" v-else-if="scope.row.docStatus == 'shz'">审核中</el-tag>
|
<el-tag type="warning" v-else-if="scope.row.docStatus == 'shz'">审核中</el-tag>
|
||||||
</template>
|
</template>-->
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" :show-overflow-tooltip="true">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -89,6 +156,7 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
v-if="scope.row.docStatus != 'yfb' && scope.row.docStatus != 'shz'"
|
v-if="scope.row.docStatus != 'yfb' && scope.row.docStatus != 'shz'"
|
||||||
@click="handleEdit(scope.row)"
|
@click="handleEdit(scope.row)"
|
||||||
|
v-hasPermi="['document:edit']"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -96,6 +164,7 @@
|
|||||||
icon="el-icon-view"
|
icon="el-icon-view"
|
||||||
v-if="previewAuth(scope.row)"
|
v-if="previewAuth(scope.row)"
|
||||||
@click="handlePreview(scope.row)"
|
@click="handlePreview(scope.row)"
|
||||||
|
v-hasPermi="['document:preview']"
|
||||||
>预览</el-button>
|
>预览</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -103,8 +172,11 @@
|
|||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
v-if="scope.row.docStatus != 'yfb' && scope.row.docStatus != 'shz'"
|
v-if="scope.row.docStatus != 'yfb' && scope.row.docStatus != 'shz'"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['document:remove']"
|
||||||
>删除</el-button>
|
>删除</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" @click="handleDownload(scope.row)"
|
||||||
|
v-hasPermi="['document:batch:remove']"
|
||||||
|
v-loading="loadingDownload">下载</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -156,7 +228,39 @@
|
|||||||
<edit-document ref="editDocumentRef" @submit="editDocumentSubmit"/>
|
<edit-document ref="editDocumentRef" @submit="editDocumentSubmit"/>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
<upload-progress/>
|
|
||||||
|
<!-- 工具导出对话框 -->
|
||||||
|
<el-drawer :visible.sync="exportDrawerOpen" size="75%" :show-close="false">
|
||||||
|
<template #title>
|
||||||
|
<span class="title">导出</span>
|
||||||
|
<div class="drawer-head-btn">
|
||||||
|
<el-button type="primary" @click="handleExport">提交</el-button>
|
||||||
|
<el-button @click="exportDrawerOpen=false">取消</el-button>
|
||||||
|
</div><!--drawer-head-btn 抽屉顶部按钮区域-->
|
||||||
|
</template>
|
||||||
|
<div class="el-form-border">
|
||||||
|
<el-form ref="form" label-width="200px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="选择需要导出的字段信息">
|
||||||
|
<el-checkbox-group v-model="checkList">
|
||||||
|
<el-checkbox label="docCode">文档编号</el-checkbox>
|
||||||
|
<el-checkbox label="docName">文档名称</el-checkbox>
|
||||||
|
<el-checkbox label="docType">类别</el-checkbox>
|
||||||
|
<el-checkbox label="docPrincipals">负责人</el-checkbox>
|
||||||
|
<el-checkbox label="docRespDeptName">归属单位</el-checkbox>
|
||||||
|
<el-checkbox label="docSource">来源</el-checkbox>
|
||||||
|
<el-checkbox label="toolName">关联工具</el-checkbox>
|
||||||
|
<el-checkbox label="docStatus">上传状态</el-checkbox>
|
||||||
|
<el-checkbox label="createTime">创建时间</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form><!--el-form-->
|
||||||
|
</div><!--el-form-border 表单-->
|
||||||
|
</el-drawer><!--el-drawer 导出抽屉-->
|
||||||
|
<!-- <upload-progress/>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -174,7 +278,7 @@ import Treeselect from "@riophae/vue-treeselect";
|
|||||||
export default {
|
export default {
|
||||||
name: "Document",
|
name: "Document",
|
||||||
components: { iFrame, editDocument, uploadProgress, Treeselect},
|
components: { iFrame, editDocument, uploadProgress, Treeselect},
|
||||||
dicts:['doc_class','doc_source'],
|
dicts:['doc_class','doc_source','doc_upload_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -220,7 +324,13 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
docName: undefined
|
docName: '',
|
||||||
|
docCode: '',
|
||||||
|
docType: '',
|
||||||
|
docPrincipals: '',
|
||||||
|
docSource: '',
|
||||||
|
docStatus: '',
|
||||||
|
docCategoryId: '',
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
@ -263,6 +373,10 @@ export default {
|
|||||||
},
|
},
|
||||||
loadingDownload: false,
|
loadingDownload: false,
|
||||||
acceptType: "zip,rar,7z",
|
acceptType: "zip,rar,7z",
|
||||||
|
//导出属性
|
||||||
|
columnList: ['docCode', 'docName', 'docType', 'docPrincipals', 'docRespDeptName', 'docSource', 'toolName', 'docStatus', 'createTime'],
|
||||||
|
checkList: [],
|
||||||
|
exportDrawerOpen: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -290,18 +404,22 @@ export default {
|
|||||||
},
|
},
|
||||||
// 节点单击事件
|
// 节点单击事件
|
||||||
handleNodeClick(data) {
|
handleNodeClick(data) {
|
||||||
this.queryParams.toolRespDept = data.id;
|
this.queryParams.docCategoryId = data.id;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
let self = this
|
||||||
|
self.loading = true;
|
||||||
listDocument(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
listDocument(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||||
this.docList = response.rows;
|
self.docList = response.rows;
|
||||||
this.total = response.total;
|
self.total = response.total;
|
||||||
this.loading = false;
|
self.loading = false;
|
||||||
}
|
}
|
||||||
);
|
).catch(err=>{
|
||||||
|
console.error("getList=======", err)
|
||||||
|
self.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -311,6 +429,7 @@ export default {
|
|||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = [];
|
this.dateRange = [];
|
||||||
|
this.queryParams.docCategoryId = '';
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
@ -350,7 +469,7 @@ export default {
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch((err) => {console.info(err)});
|
}).catch((err) => {console.error(err)});
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleDocCategoryAdd(data) {
|
handleDocCategoryAdd(data) {
|
||||||
@ -370,7 +489,7 @@ export default {
|
|||||||
this.getDocumentTree();
|
this.getDocumentTree();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.info("err============", err)
|
console.error("err============", err)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
@ -460,7 +579,23 @@ export default {
|
|||||||
},
|
},
|
||||||
isSelectable(row) {
|
isSelectable(row) {
|
||||||
return row.docStatus !== 'yfb' && row.docStatus !== 'shz';
|
return row.docStatus !== 'yfb' && row.docStatus !== 'shz';
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleOpenExport() {
|
||||||
|
if (this.checkList.length<1) {
|
||||||
|
this.checkList = JSON.parse(JSON.stringify(this.columnList))
|
||||||
}
|
}
|
||||||
|
this.exportDrawerOpen = true
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
let excludeFields = this.columnList.filter(item=>!this.checkList.includes(item))
|
||||||
|
this.download('/document/export', {
|
||||||
|
...this.queryParams,
|
||||||
|
downloadCheck:false,
|
||||||
|
excludeFields:excludeFields,
|
||||||
|
}, `文档资源信息数据_${new Date().getTime()}.xlsx`)
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-form label-width="80px" ref="queryForm">
|
<el-form :model="queryParams" label-width="80px" ref="queryForm">
|
||||||
<div class="grab" id="add">
|
<div class="grab" id="add">
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<div class="sl">
|
<div class="sl">
|
||||||
@ -50,7 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="sr">
|
<div class="sr">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh-left" @click="reset">重置</el-button>
|
<el-button icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div><!--search 默认查询-->
|
</div><!--search 默认查询-->
|
||||||
</div><!--grab-->
|
</div><!--grab-->
|
||||||
@ -58,7 +58,7 @@
|
|||||||
</el-card><!--el-card-->
|
</el-card><!--el-card-->
|
||||||
|
|
||||||
<el-card class="lrtt">
|
<el-card class="lrtt">
|
||||||
<div class="lt">
|
<div class="lt" v-hasPermi="['tool:org:tree']">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="deptName"
|
v-model="deptName"
|
||||||
placeholder="请输入部门名称"
|
placeholder="请输入部门名称"
|
||||||
@ -87,10 +87,9 @@
|
|||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['system:user:add']"
|
|
||||||
>工具发布</el-button>
|
>工具发布</el-button>
|
||||||
<el-button icon="el-icon-delete" @click="handleDelete(selection)">批量删除</el-button>
|
<el-button icon="el-icon-delete" @click="handleDelete(selection)" v-hasPermi="['tool:batch:remove']">批量删除</el-button>
|
||||||
<el-button icon="el-icon-download" @click="handleOpenExport()">导出</el-button>
|
<el-button icon="el-icon-download" @click="handleOpenExport()" v-hasPermi="['tool:export']">导出</el-button>
|
||||||
</div><!--operate 操作按钮-->
|
</div><!--operate 操作按钮-->
|
||||||
<el-table v-loading="loading" :data="toolList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="toolList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="50" align="center" :selectable="selectable"/>
|
<el-table-column type="selection" width="50" align="center" :selectable="selectable"/>
|
||||||
@ -120,7 +119,7 @@
|
|||||||
class-name="small-padding fixed-width"
|
class-name="small-padding fixed-width"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" icon="el-icon-info" v-if="scope.row.recordStatus==='done'" @click="applyUse(scope.row)">申请使用</el-button>
|
<el-button type="text" icon="el-icon-info" v-if="scope.row.recordStatus=='done'" @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-info" @click="handleDetail(scope.row)">详情</el-button>
|
||||||
<el-button type="text" icon="el-icon-download" v-if="scope.row.downloadStatus">下载</el-button>
|
<el-button type="text" icon="el-icon-download" v-if="scope.row.downloadStatus">下载</el-button>
|
||||||
<el-dropdown size="mini" v-if="selectable(scope.row)" @command="(command) => handleCommand(command, scope.row)">
|
<el-dropdown size="mini" v-if="selectable(scope.row)" @command="(command) => handleCommand(command, scope.row)">
|
||||||
@ -192,11 +191,13 @@
|
|||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
<!-- 工具详情对话框 -->
|
<!-- 工具详情对话框 -->
|
||||||
<el-drawer :visible.sync="detailDrawerOpen" :modal-append-to-body="false" size="85%" class="no-padding">
|
<el-drawer :visible.sync="detailDrawerOpen" :modal-append-to-body="false" size="85%" class="no-padding" @close="handleCloseDetail()">
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>工具名称</span>
|
<span>工具名称</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="detailOpen">
|
||||||
<tool-detail ref="toolDetailRef" :toolDetail="toolDetail"/>
|
<tool-detail ref="toolDetailRef" :toolDetail="toolDetail"/>
|
||||||
|
</template>
|
||||||
</el-drawer><!--el-drawer 详情-抽屉-->
|
</el-drawer><!--el-drawer 详情-抽屉-->
|
||||||
|
|
||||||
</div><!--app-container-->
|
</div><!--app-container-->
|
||||||
@ -251,6 +252,7 @@ export default {
|
|||||||
addDrawerOpen: false,
|
addDrawerOpen: false,
|
||||||
exoportDrawerOpen: false,
|
exoportDrawerOpen: false,
|
||||||
detailDrawerOpen: false,
|
detailDrawerOpen: false,
|
||||||
|
detailOpen: false,
|
||||||
detailActiveName: 'first',
|
detailActiveName: 'first',
|
||||||
// 部门名称
|
// 部门名称
|
||||||
deptName: undefined,
|
deptName: undefined,
|
||||||
@ -436,6 +438,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleDetail(row){
|
handleDetail(row){
|
||||||
this.detailDrawerOpen = true
|
this.detailDrawerOpen = true
|
||||||
|
this.detailOpen = true
|
||||||
this.toolDetail = row
|
this.toolDetail = row
|
||||||
},
|
},
|
||||||
// 更多操作触发
|
// 更多操作触发
|
||||||
@ -482,9 +485,6 @@ export default {
|
|||||||
downloadCheck:false,
|
downloadCheck:false,
|
||||||
excludeFields:excludeFields,
|
excludeFields:excludeFields,
|
||||||
}, `工具信息数据_${new Date().getTime()}.xlsx`)
|
}, `工具信息数据_${new Date().getTime()}.xlsx`)
|
||||||
},
|
|
||||||
handleUseApply(){
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
@ -537,6 +537,16 @@ export default {
|
|||||||
},
|
},
|
||||||
selectable(row,index){
|
selectable(row,index){
|
||||||
return row.recordStatus==='draft'&&row.createBy==this.userInfo.userId
|
return row.recordStatus==='draft'&&row.createBy==this.userInfo.userId
|
||||||
|
},
|
||||||
|
/** 关闭详情 **/
|
||||||
|
handleCloseDetail(){
|
||||||
|
console.info("1111111111")
|
||||||
|
this.detailDrawerOpen = false;
|
||||||
|
this.detailOpen = false;
|
||||||
|
this.$refs.toolDetailRef.$destroy(); // 销毁组件
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.toolDetailRef = null; // 清空引用
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -67,65 +67,53 @@
|
|||||||
<div class="tit">评论</div>
|
<div class="tit">评论</div>
|
||||||
</div><!--tboper 标题与操作按钮-->
|
</div><!--tboper 标题与操作按钮-->
|
||||||
<div class="pltextarea">
|
<div class="pltextarea">
|
||||||
<el-input type="textarea" placeholder="请输入您的意见" :rows="4" maxlength="1000" show-word-limit></el-input>
|
<el-input v-model="discussionContent" type="textarea" placeholder="请输入您的意见" :rows="4" maxlength="1000" show-word-limit></el-input>
|
||||||
<div class="plbtn"><el-button>发布</el-button></div>
|
<div class="plbtn"><el-button @click="handleDiscussions">发布</el-button></div>
|
||||||
</div><!--pltextarea-->
|
</div><!--pltextarea-->
|
||||||
<div class="pllist">
|
<div class="pllist">
|
||||||
<div class="list">
|
<template v-if="discussionsList && discussionsList.length > 0">
|
||||||
<div class="luser"><span class="xuser">张</span></div>
|
<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="ltext">
|
||||||
<div class="nt"><span class="name">张鑫辉</span><span class="time">05/01 12:00</span></div>
|
<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">这个工具可以!</div>
|
<div class="te">{{item.content}}</div>
|
||||||
<div class="hb"><a class="btn"><i class="el-icon-chat-line-round"></i>回复</a></div>
|
<div class="hb">
|
||||||
<div class="pltextarea">
|
<a class="btn" @click="toggleReplyForm(index)">
|
||||||
<el-input type="textarea" placeholder="请输入您的意见" :rows="2" maxlength="1000" show-word-limit></el-input>
|
<i class="el-icon-chat-line-round"></i>回复
|
||||||
<div class="plbtn"><el-button>取消</el-button><el-divider direction="vertical"></el-divider><el-button>发布</el-button></div>
|
</a>
|
||||||
</div><!--pltextarea-->
|
|
||||||
</div>
|
</div>
|
||||||
</div><!--list-->
|
<div class="pltextarea" v-if="showReplyForm[index]">
|
||||||
<div class="list">
|
<el-input type="textarea" v-model="replyContent[index]" placeholder="请输入您的意见" :rows="2" maxlength="1000" show-word-limit></el-input>
|
||||||
<div class="luser"><span class="xuser">钱</span></div>
|
<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="ltext">
|
||||||
<div class="nt"><span class="name">钱多多</span><span class="time">05/01 12:00</span></div>
|
<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">好用!</div>
|
<div class="te">{{repItem.content}}</div>
|
||||||
<div class="hb"><a class="btn"><i class="el-icon-chat-line-round"></i>回复</a></div>
|
<!-- <div class="hb"><a class="btn" @click="toggleReplyFormSon(index,repIdex)"><i class="el-icon-chat-line-round"></i>回复</a></div>
|
||||||
<div class="list">
|
<div class="pltextarea" v-if="item.showReplyFormSon[repIdex]">
|
||||||
<div class="luser"><span class="xuser">赵</span></div>
|
<el-input type="textarea" v-model="item.replyContentSon[repIdex]" placeholder="请输入您的意见" :rows="2" maxlength="1000" show-word-limit></el-input>
|
||||||
<div class="ltext">
|
<div class="plbtn">
|
||||||
<div class="nt"><span class="name">赵宇</span><span class="time">05/01 12:00</span></div>
|
<el-button @click="cancelReplySon(index,repIdex)">取消</el-button>
|
||||||
<div class="te">希望再选代一下,还有待完善的地方。</div>
|
<el-divider direction="vertical"></el-divider>
|
||||||
<div class="hb"><a class="btn"><i class="el-icon-chat-line-round"></i>回复</a></div>
|
<el-button @click="submitReplySon(index,repIdex, item)">发布</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div><!--list-->
|
</div>-->
|
||||||
<div class="list">
|
|
||||||
<div class="luser"><span class="xuser">李</span></div>
|
|
||||||
<div class="ltext">
|
|
||||||
<div class="nt"><span class="name">李志</span><span class="time">05/01 12:00</span></div>
|
|
||||||
<div class="te">很好的解决了我的问题,感谢!</div>
|
|
||||||
<div class="hb"><a class="btn"><i class="el-icon-chat-line-round"></i>回复</a></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div><!--list-->
|
|
||||||
</div>
|
</div>
|
||||||
</div><!--list-->
|
</template>
|
||||||
<div class="list">
|
</div>
|
||||||
<div class="luser"><span class="xuser">赵</span></div>
|
</div>
|
||||||
<div class="ltext">
|
</template>
|
||||||
<div class="nt"><span class="name">赵宇</span><span class="time">05/01 12:00</span></div>
|
|
||||||
<div class="te">希望再选代一下,还有待完善的地方。</div>
|
|
||||||
<div class="hb"><a class="btn"><i class="el-icon-chat-line-round"></i>回复</a></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div><!--list-->
|
|
||||||
<div class="list">
|
|
||||||
<div class="luser"><span class="xuser">李</span></div>
|
|
||||||
<div class="ltext">
|
|
||||||
<div class="nt"><span class="name">李志</span><span class="time">05/01 12:00</span></div>
|
|
||||||
<div class="te">很好的解决了我的问题,感谢!</div>
|
|
||||||
<div class="hb"><a class="btn"><i class="el-icon-chat-line-round"></i>回复</a></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div><!--list-->
|
|
||||||
</div><!--pllist-->
|
|
||||||
</div><!--fl 右侧评论-->
|
|
||||||
|
|
||||||
<el-dialog :title="viewDialogTitle" :visible.sync="viewDialogOpen" fullscreen width="500px" append-to-body>
|
<el-dialog :title="viewDialogTitle" :visible.sync="viewDialogOpen" fullscreen width="500px" append-to-body>
|
||||||
<i-frame :src="previewUrl" />
|
<i-frame :src="previewUrl" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -137,6 +125,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listDocument, getDocument, delDocument, addDocument, updateDocument } from "@/api/document/document";
|
import { listDocument, getDocument, delDocument, addDocument, updateDocument } from "@/api/document/document";
|
||||||
|
import { listDiscussions, addDiscussions } from "@/api/tool/discussions.js";
|
||||||
|
import { listReplies, addReplies} from "@/api/tool/replies.js";
|
||||||
|
|
||||||
import AddDoc from './AddDoc'
|
import AddDoc from './AddDoc'
|
||||||
import editDocument from "../document/editDocument";
|
import editDocument from "../document/editDocument";
|
||||||
import { Base64 } from 'js-base64';
|
import { Base64 } from 'js-base64';
|
||||||
@ -167,10 +158,25 @@
|
|||||||
title: '新增文档',
|
title: '新增文档',
|
||||||
open: false,
|
open: false,
|
||||||
loadingDownload: false,
|
loadingDownload: false,
|
||||||
|
discussionContent: null, // 评论内容
|
||||||
|
repliesContent: null, // 回复内容
|
||||||
|
// 评论列表
|
||||||
|
discussionsList: [],
|
||||||
|
// 回复列表
|
||||||
|
repliesList: [],
|
||||||
|
showReplyForm: [],
|
||||||
|
replyContent: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
this.getDocList()
|
this.getDocList()
|
||||||
|
this.getDiscussionsList()
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
discussionsList(newList) {
|
||||||
|
this.showReplyForm = new Array(newList.length).fill(false);
|
||||||
|
this.replyContent = new Array(newList.length).fill('');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
getDocList() {
|
getDocList() {
|
||||||
@ -216,6 +222,152 @@
|
|||||||
self.loadingDownload = false
|
self.loadingDownload = false
|
||||||
},1000)
|
},1000)
|
||||||
},
|
},
|
||||||
|
getDiscussionsList() {
|
||||||
|
let self = this
|
||||||
|
listDiscussions({businessId:this.toolDetail.toolId}).then(res => {
|
||||||
|
self.discussionsList = res.rows
|
||||||
|
self.discussionsList.forEach(item => {
|
||||||
|
if(item.repliesList && item.repliesList.length > 0){
|
||||||
|
self.$set(item, 'showReplyFormSon', new Array(item.repliesList.length).fill(false))
|
||||||
|
self.$set(item, 'replyContentSon', new Array(item.repliesList.length).fill(''))
|
||||||
|
}else{
|
||||||
|
self.$set(item, 'showReplyFormSon', false)
|
||||||
|
self.$set(item, 'replyContentSon', '')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 评论 **/
|
||||||
|
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.toolDetail.toolId,
|
||||||
|
content: this.discussionContent,
|
||||||
|
type: "tool",
|
||||||
|
}
|
||||||
|
self.$modal.confirm('是否确认发布?').then(()=> {
|
||||||
|
addDiscussions(data).then(res => {
|
||||||
|
this.discussionContent = null
|
||||||
|
self.$message({
|
||||||
|
message: '发布成功',//提示的信息
|
||||||
|
type:'success', //类型是成功
|
||||||
|
duration:1200, //显示时间, 毫秒。设为 0 则不会自动关闭,建议1200
|
||||||
|
});
|
||||||
|
self.getDiscussionsList()
|
||||||
|
}).catch(err =>{
|
||||||
|
this.discussionContent = null
|
||||||
|
console.error("handleDiscussions==err==", err)
|
||||||
|
self.$modal.msgError("发布失败");
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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, '');
|
||||||
|
},
|
||||||
|
/** 回复 **/
|
||||||
|
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.getDiscussionsList()
|
||||||
|
}).catch(err =>{
|
||||||
|
console.error("handleDiscussions==err==", err)
|
||||||
|
self.$modal.msgError("发布失败");
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
// 清空回复内容并隐藏表单
|
||||||
|
this.replyContent[index] = '';
|
||||||
|
this.showReplyForm[index] = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** 第二级 **/
|
||||||
|
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.getDiscussionsList()
|
||||||
|
}).catch(err =>{
|
||||||
|
console.error("submitReplySon==err==", err)
|
||||||
|
self.$modal.msgError("发布失败");
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
// 清空回复内容并隐藏表单
|
||||||
|
this.$set(parentItem.replyContentSon, repIndex, '');
|
||||||
|
this.$set(parentItem.showReplyFormSon, repIndex, false);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user