【修改】 修改上传报告 修改流程中心(没完成)

This commit is contained in:
zhoulingpo
2023-05-09 15:31:50 +08:00
parent d76713dbac
commit 6c01b7f587
14 changed files with 191 additions and 72 deletions
+3 -3
View File
@@ -110,9 +110,9 @@ export default {
z-index: 7777 !important; z-index: 7777 !important;
} }
.el-cascader__tags .el-tag { //.el-cascader__tags .el-tag {
max-width: 40px !important; // max-width: 40px !important;
} //}
.el-cascader .el-input .el-input__inner { .el-cascader .el-input .el-input__inner {
height: 24px !important; height: 24px !important;
+8 -1
View File
@@ -76,6 +76,13 @@ export default {
} }
}) })
}, },
// 获取报告详情
getReportDetail (data){
return request({
url: `/api/report/detail/${data}`,
method: 'GET'
})
},
// 获取报告预览 // 获取报告预览
reportGetReportHtmlId (data) { reportGetReportHtmlId (data) {
return request({ return request({
@@ -197,6 +204,6 @@ export default {
params:data params:data
}) })
}, },
// 获取
} }
+1 -1
View File
@@ -2,7 +2,7 @@ import { instance as request } from '@/utils/request'
export default { export default {
downFile (data) { downFile (data) {
return request({ return request({
url: '/api/sys/file/'+data, url: '/api/sys/file/'+data+'/download',
method: 'GET', method: 'GET',
}) })
}, },
+2 -2
View File
@@ -93,7 +93,7 @@
<el-table-column <el-table-column
label="部门编码" label="部门编码"
width="120" width="120"
:prop="orgCode" prop="orgCode"
align="center" align="center"
show-overflow-tooltip> show-overflow-tooltip>
</el-table-column> </el-table-column>
@@ -595,7 +595,7 @@ export default {
} else { } else {
const dataItem = this.checkedList[0] const dataItem = this.checkedList[0]
this.checkedName = dataItem.uname || dataItem.USNAME || dataItem.orgName this.checkedName = dataItem.uname || dataItem.USNAME || dataItem.orgName
const id = dataItem.id || dataItem.USID || dataItem.usid const id = dataItem.id || dataItem.USID || dataItem.usid || dataItem.orgCode
this.$emit('input', id) this.$emit('input', id)
this.$emit('on-checked', this.checkedName) this.$emit('on-checked', this.checkedName)
this.$emit('on-dept', dataItem.pOrgId, dataItem.pOrgName) this.$emit('on-dept', dataItem.pOrgId, dataItem.pOrgName)
+11
View File
@@ -33,3 +33,14 @@ export function formatDate (value, fmt) {
return value.substr(0, fmt.length) return value.substr(0, fmt.length)
} }
} }
export function formatDate2 (value, fmt) {
let dateObject = new Date(value);
let year = dateObject.getFullYear();
let month = dateObject.getMonth() + 1;
let day = dateObject.getDate();
let hours = dateObject.getHours();
let minutes = dateObject.getMinutes();
let seconds = dateObject.getSeconds();
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
+55 -20
View File
@@ -2,6 +2,7 @@
<div class="content-height report-detail"> <div class="content-height report-detail">
<div class="title"> <div class="title">
<el-tooltip :content="row.name" placement="top-start"> <el-tooltip :content="row.name" placement="top-start">
<span>{{ row.name || '-' }}</span> <span>{{ row.name || '-' }}</span>
</el-tooltip> </el-tooltip>
</div> </div>
@@ -9,7 +10,7 @@
<el-row> <el-row>
<el-col :span="24" class="desc-item"> <el-col :span="24" class="desc-item">
<label>上传人</label> <label>上传人</label>
<div>{{ row.createUserName }}</div> <div>{{ row.uploaderName }}</div>
</el-col> </el-col>
<el-col :span="24" class="desc-item"> <el-col :span="24" class="desc-item">
<label>关键词</label> <label>关键词</label>
@@ -29,7 +30,7 @@
</el-col> </el-col>
<el-col :span="24" class="desc-item"> <el-col :span="24" class="desc-item">
<label>标签</label> <label>标签</label>
<div>{{ row.labelList || '-' }}</div> <div>{{ row.labelList&&row.labelList.join(',') || '-' }}</div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@@ -67,16 +68,23 @@
<div class="nameCir"> <div class="nameCir">
{{item.userName.slice(0,1)}} {{item.userName.slice(0,1)}}
</div> </div>
<div class="name">
{{item.orgName+"【"+item.userName+"】"}}
</div>
</div> </div>
<div class="juggle_right"> <div class="juggle_right">
<div class="content">{{ item.comment }}</div> <div class="content">{{ item.comment }}</div>
<div class="bottom"> <div class="bottom">
<div class="time">{{ item.createTime }}</div> <div class="time">{{ item.createTime && formatDate2(item.createTime) }}</div>
<el-button class="delbtn" size="medium" plain type="primary" @click="delJugg(item.id)">删除</el-button> <el-button class="delbtn" size="medium" plain type="primary" v-if="item.userId==userId || isAdmin"
@click="delJugg(item.id)">删除</el-button>
</div> </div>
</div> </div>
</div> </div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="q.pageNo"
:page-sizes="[5, 10, 20]" :page-size="q.pageSize" layout="total, sizes, prev, pager, next, jumper"
:total="total" />
</div> </div>
<div> <div>
@@ -86,12 +94,15 @@
<script> <script>
import { downloadFile } from '@/utils/downloadFile' import { downloadFile } from '@/utils/downloadFile'
import { formatDate } from '@/utils/date' import { formatDate2 } from '@/utils/date'
export default { export default {
name: 'ReportDetail', name: 'ReportDetail',
data () { data () {
return { return {
isAdmin: false, //是否是管理员
report:{},
formatDate2,
isShow: false, isShow: false,
userRating:'', userRating:'',
watermarkText: '', // 水印 watermarkText: '', // 水印
@@ -130,7 +141,8 @@ export default {
}, },
//评分 //评分
saveScore(){ saveScore(){
this.$api.report.addScore({userRating:+this.userRating,reportId:this.reportId}).then(res=>{ let userRating = this.userRating*2
this.$api.report.addScore({userRating:+userRating,reportId:this.reportId}).then(res=>{
}) })
}, },
@@ -165,6 +177,17 @@ export default {
}) })
}) })
}, },
// 单页数据量
handleSizeChange(val) {
this.q.pageSize = val;
this.q.pageNo = 1;
this.getComment();
},
// 第几页
handleCurrentChange(val) {
this.q.pageNo = val;
this.getComment();
},
// 获取评论 // 获取评论
getComment(){ getComment(){
this.$api.report.getJuggle({...this.q,reportId:this.reportId}).then(res=>{ this.$api.report.getJuggle({...this.q,reportId:this.reportId}).then(res=>{
@@ -190,17 +213,13 @@ export default {
} }
}, },
// 预览 // 预览
// previewRow () { previewRow () {
// if (!this.$route.query.row) {
// this.$router.push({ path: '/report/list', query: { id: this.$route.query.id } })
// return
// }
// this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}` // this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`
// this.row = JSON.parse(this.$route.query.row) // this.row = JSON.parse(this.$route.query.row)
// this.$api.report.reportGetReportHtmlId({ id: this.row.id }).then(({ data }) => { this.$api.report.reportGetReportHtmlId({ id: this.row.id }).then(({ data }) => {
// this.content = data.content this.content = data.content
// }) })
// }, },
// 下载 // 下载
downloadRow (row) { downloadRow (row) {
// this.$confirm('此操作将下载所选数据文件, 是否继续?', '提示', { // this.$confirm('此操作将下载所选数据文件, 是否继续?', '提示', {
@@ -213,11 +232,22 @@ export default {
}) })
// }) // })
}, },
// 获取详情
getReportDetail(){
this.$api.report.getReportDetail(this.reportId).then(res=>{
this.row = res.data
// 需要给分数/2
this.$set(this,'report',res.data)
this.previewRow()
})
}, },
created () { },
mounted () {
this.reportId=this.$route.query.reportId this.reportId=this.$route.query.reportId
this.isAdmin = this.$store.getters.userInfo.roleIdList.indexOf('35LLRCAQ8D') > -1
// this.previewRow() // this.previewRow()
this.getComment() this.getComment()
this.getReportDetail()
} }
} }
</script> </script>
@@ -255,7 +285,7 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #595959; color: #595959;
width: 64px; width: 85px;
border-right: 1px solid #BFBFBF; border-right: 1px solid #BFBFBF;
margin-right: 9px; margin-right: 9px;
} }
@@ -329,12 +359,17 @@ export default {
width: 15%; width: 15%;
text-align: center; text-align: center;
border-right: 1px solid #e6f6fe; border-right: 1px solid #e6f6fe;
margin: 0 auto;
.nameCir{ .nameCir{
background-color: pink; background-color: pink;
width: 50px; width: 60px;
height: 50px; height: 60px;
border-radius: 50%; border-radius: 50%;
text-align: center;
line-height: 60px;
color:#fff;
font-size: 18px;
margin: 20px calc(50% - 30px);
} }
} }
.juggle_right{ .juggle_right{
-1
View File
@@ -121,7 +121,6 @@
default-expand-all default-expand-all
:filter-node-method="filterNode" :filter-node-method="filterNode"
ref="tree" ref="tree"
check-strictly
@check="getHalfCheckedNode" @check="getHalfCheckedNode"
> >
+21 -24
View File
@@ -55,8 +55,6 @@
:filter-node-method="filterNode" :filter-node-method="filterNode"
ref="tree" ref="tree"
@check="getHalfCheckedNode" @check="getHalfCheckedNode"
check-strictly
@check-change="setCheckedNodes"
:key="treeKey" :key="treeKey"
> >
<template slot-scope="{node}"> <template slot-scope="{node}">
@@ -781,28 +779,27 @@ export default {
/* =============================================== 报告上传 =============================================== */ /* =============================================== 报告上传 =============================================== */
// 打开报告上传 // 打开报告上传
openReportAdd() { openReportAdd() {
this.mode = 'add'; // this.mode = 'add';
this.reportF = { // this.reportF = {
name: '', // 报告名称 // name: '', // 报告名称
mainContent: '', // 内容摘要 // mainContent: '', // 内容摘要
department: '', // 报告所属部门 // department: '', // 报告所属部门
fileName: '', // 文件上传 // fileName: '', // 文件上传
fileId: '', // fileId: '',
year: '', // 报告年份 // year: '', // 报告年份
privacyLevel: undefined, //报告隐私等级 // privacyLevel: undefined, //报告隐私等级
reportUserIdList: [], // 权限 // reportUserIdList: [], // 权限
confidentialLevel:undefined, //涉密等级 // confidentialLevel:undefined, //涉密等级
labelList:[] //标签 // labelList:[] //标签
}; // };
this.tags = [] // 关键词 // this.tags = [] // 关键词
this.dialogReport = true; // this.dialogReport = true;
// this.$router.push({ this.$router.push({
// path:'/reportprocess/launch', path:'/reportprocess/launch',
// query:{ query:{
// id:this.$route.query.id, id:this.$route.query.id,
// isBegin:1 }
// } })
// })
}, },
// 必填项 // 必填项
checkReportF() { checkReportF() {
@@ -91,7 +91,7 @@ export default {
default:'' default:''
}, },
prcType:{ prcType:{
type:String, type:Number,
default:'' default:''
} }
}, },
@@ -27,8 +27,8 @@
<el-col :span="9" :offset="6"> <el-col :span="9" :offset="6">
<el-form-item label="标签:" prop="department"> <el-form-item label="标签:" prop="department">
<el-cascader :disabled="formControl" width="100%" v-model="form.labelList" :options="cascaderOptions" <el-cascader :disabled="formControl" width="100%" v-model="form.labelList" :options="cascaderOptions"
filterable filterable collapse-tags
:props="{ checkStrictly: true }" clearable placeholder="请选择标签"> :props="{ checkStrictly: true ,multiple: true }" clearable placeholder="请选择标签">
<template slot-scope="{ node, data }"> <template slot-scope="{ node, data }">
<span :title="data.label">{{ data.label }}</span> <span :title="data.label">{{ data.label }}</span>
</template> </template>
@@ -48,9 +48,9 @@
</el-col> </el-col>
<el-col :span="9" :offset="6" v-if="isShowTime"> <el-col :span="9" :offset="6" v-if="isShowTime">
<el-form-item label="保密到期日期:" prop="secrecyLast"> <el-form-item label="保密到期日期:" prop="secrecyLast">
<el-date-picker :disabled="formControl" v-model="form.secrecyLast" type="year" value-format="yyyy" <el-date-picker :disabled="formControl" v-model="form.secrecyLast" type="date" value-format="yyyy-mm-dd"
placeholder="请选择保密到期日期" placeholder="请选择保密到期日期"
prefix-icon="null" :picker-options="proOptions"/> prefix-icon="null" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -110,9 +110,9 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<span class="uploadFile" v-if="form.fileName"> <span class="uploadFile" v-if="form.fileName">
<span :title="form.fileName">{{form.fileName}}</span> <span :class="{'fontColor':formControl}" :title="form.fileName">{{form.fileName}}</span>
<i class="el-icon-cloudy iconstyle" @click="downFile(form.fileId)"></i> <i :class="{'fontColor':formControl}" class="el-icon-cloudy iconstyle" @click="downFile(form.fileId)"></i>
<i class="el-icon-delete iconstyle" @click="delFile"></i> <i :class="{'fontColor':formControl}" class="el-icon-delete iconstyle" @click="delFile"></i>
</span> </span>
</el-col> </el-col>
</el-row> </el-row>
@@ -130,6 +130,7 @@ import newTranslate from "../../../components/newTranslate";
import VueTagsInput from '@johmun/vue-tags-input'; import VueTagsInput from '@johmun/vue-tags-input';
import orgTable from '@/components/OrgTable' import orgTable from '@/components/OrgTable'
import {privacyLevelOptions,confidentialLevelOptions} from '@/utils/Enum/enum' import {privacyLevelOptions,confidentialLevelOptions} from '@/utils/Enum/enum'
import { downloadFile } from '@/utils/downloadFile'
export default { export default {
dicts: ['classified_level', 'privacy_level'], dicts: ['classified_level', 'privacy_level'],
components: { components: {
@@ -223,8 +224,27 @@ export default {
message: "报告文件不能为空", trigger: 'change' message: "报告文件不能为空", trigger: 'change'
} }
],
privacyLevel:[
{
required: true,
message: "报告隐私等级不能为空", trigger: 'change'
}
],
confidentialLevel:[
{
required: true,
message: "报告涉密等级不能为空", trigger: 'change'
}
],
secrecyLast:[
{
required: true,
message: "保密到期日期不能为空", trigger: 'change'
}
] ]
}, },
q: { q: {
pageNo: 1, pageNo: 1,
@@ -236,12 +256,28 @@ export default {
watch: { watch: {
processForm(val) { processForm(val) {
this.form = this.processForm this.form = this.processForm
if(this.form.secrecyLast){
this.isShowTime=true
this.form.secrecyLast=new Date(this.form.secrecyLast)
}
if(this.processForm.keyContent){
this.tags=JSON.parse(this.processForm.keyContent)
}
if(this.processForm.labelList && typeof this.processForm.labelList[0]=='string'){
this.form.labelList= this.processForm.labelList.map(item=>{
return JSON.parse(item)
})
}
} }
}, },
methods: { methods: {
downFile(id){ downFile(id){
this.$api.reportProcess.downFile(id).then(res=>{ if(this.formControl) return
this.$api.report.reportDownload({reportId:'',fileId:id}).then(res=>{
downloadFile(res)
}) })
}, },
handleClick(){ handleClick(){
@@ -250,18 +286,21 @@ export default {
this.visibleOrgTable=true this.visibleOrgTable=true
}, },
isTreeOk(checkedList){ isTreeOk(checkedList){
const parts = [] const parts = []
const partsName = [] const partsName = []
checkedList.map((item, index) => { checkedList.map((item, index) => {
parts.push(item.id) parts.push(item.orgCode)
partsName.push(item.orgName) partsName.push(item.orgName)
}) })
debugger
this.qcrList = checkedList this.qcrList = checkedList
this.form.department = parts.toString() this.form.department = parts.toString()
this.form.departmentName = partsName.toString() this.form.departmentName = partsName.toString()
}, },
delFile() { delFile() {
if(this.formControl) return
this.fileList=[] this.fileList=[]
this.form.fileName = ''; this.form.fileName = '';
this.form.fileId = ''; this.form.fileId = '';
@@ -270,8 +309,15 @@ export default {
let imList=['普通商密','核心商密'] let imList=['普通商密','核心商密']
if( imList.indexOf(this.form.confidentialLevel)>-1){ if( imList.indexOf(this.form.confidentialLevel)>-1){
let currentDate=new Date()
let futureDate
if(item=='普通商密')
futureDate= new Date(currentDate.getFullYear() + 5, currentDate.getMonth(), currentDate.getDate());
else
futureDate = new Date(currentDate.getFullYear() + 10, currentDate.getMonth(), currentDate.getDate());
this.isShowTime=true this.isShowTime=true
this.form.secrecyLast = '' this.form.secrecyLast = futureDate
}else{ }else{
this.isShowTime=false this.isShowTime=false
this.form.secrecyLast = '' this.form.secrecyLast = ''
@@ -497,6 +543,9 @@ export default {
color: #555; color: #555;
cursor: pointer; cursor: pointer;
} }
.fontColor{
color: #ccc;
}
} }
</style> </style>
+2 -1
View File
@@ -164,7 +164,8 @@ export default {
submitJson, submitJson,
taskId: this.taskId, taskId: this.taskId,
userId: this.$store.getters.userInfo.usid, userId: this.$store.getters.userInfo.usid,
prcType: this.prcType prcType: this.prcType,
reportId: this.processOld.dataId
}) })
} }
}) })
+8 -3
View File
@@ -129,7 +129,7 @@ export default {
this.prcNum = this.$store.getters.handleProcess?.prcNum this.prcNum = this.$store.getters.handleProcess?.prcNum
this.prcId = this.$store.getters.handleProcess?.prcId this.prcId = this.$store.getters.handleProcess?.prcId
this.prcName = this.$store.getters.handleProcess?.prcName this.prcName = this.$store.getters.handleProcess?.prcName
this.getDraftDetail().then(res => { this.getProcessDetail().then(res => {
if(this.processOld.submitJson !== '{}'){ if(this.processOld.submitJson !== '{}'){
let submitJson=JSON.parse(this.processOld.submitJson) let submitJson=JSON.parse(this.processOld.submitJson)
this.processForm=JSON.parse(this.processOld.dataJson) this.processForm=JSON.parse(this.processOld.dataJson)
@@ -227,6 +227,7 @@ export default {
}, },
// 树点击 // 树点击
isTreeOk(checkedList) { isTreeOk(checkedList) {
// console.log(checkedList) // console.log(checkedList)
const parts = [] const parts = []
const partsName = [] const partsName = []
@@ -251,7 +252,7 @@ export default {
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid}) let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
let dataJson = JSON.stringify(this.processForm) let dataJson = JSON.stringify(this.processForm)
let params = { let params = {
prcName: this.processForm.prcName, prcName: this.processForm.name,
userId: this.$store.getters.userInfo.usid, userId: this.$store.getters.userInfo.usid,
prcType: this.prcType, prcType: this.prcType,
createUserName: this.$store.getters.userInfo.usname, createUserName: this.$store.getters.userInfo.usname,
@@ -280,7 +281,10 @@ export default {
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID") console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
this.$refs.assignFormRef.validate(async v => { this.$refs.assignFormRef.validate(async v => {
this.processForm=this.$refs.basMes.form this.processForm=this.$refs.basMes.form
this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags)
this.processForm.prcName=this.processForm.name this.processForm.prcName=this.processForm.name
// this.processForm.labelList= JSON.stringify(this.processForm.labelList)
let z=this.$refs.basMes.submit() let z=this.$refs.basMes.submit()
if (v && z) { if (v && z) {
//如果不是第一次 //如果不是第一次
@@ -294,7 +298,8 @@ export default {
submitJson, submitJson,
taskId: this.taskId, taskId: this.taskId,
userId: this.$store.getters.userInfo.usid, userId: this.$store.getters.userInfo.usid,
prcType: this.prcType prcType: this.prcType,
reportId:''
}) })
} }
} else { } else {
+14 -1
View File
@@ -9,6 +9,10 @@
<div class="search-box-left"> <div class="search-box-left">
<label>流程编号</label> <label>流程编号</label>
<el-input v-model="form.prcNum" placeholder="请输入流程编号"></el-input> <el-input v-model="form.prcNum" placeholder="请输入流程编号"></el-input>
<label>发起人</label>
<el-input v-model="form.creatUserName" placeholder="请输入发起人"></el-input>
<label>报告名称</label>
<el-input v-model="form.prcName" placeholder="请输入报告名称"></el-input>
<label>流程类型</label> <label>流程类型</label>
<el-select v-model="form.prcType" collapse-tags placeholder="请选择流程类型"> <el-select v-model="form.prcType" collapse-tags placeholder="请选择流程类型">
<template v-for="item in processTypeList"> <template v-for="item in processTypeList">
@@ -26,7 +30,13 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
<el-row class="agreeBtn">
<el-button @click="permissionApp">批量同意</el-button>
<el-button @click="permissionApp">批量不同意</el-button>
</el-row>
<div class="tabs"> <div class="tabs">
<tabs @clearForm="reset"/> <tabs @clearForm="reset"/>
</div> </div>
@@ -145,7 +155,10 @@ import tabs from '../userCenter/processCenter/tabs.vue'
} }
} }
.tabs{ .tabs{
margin: 20px 0 0 13px; margin: 10px 0 0 13px;
}
.agreeBtn{
margin: 10px 20px 0;
} }
} }
@@ -1,7 +1,9 @@
<template> <template>
<div> <div>
<div class="table"> <div class="table">
<vxe-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 380px)'"> <vxe-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 380px)'">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column show-overflow show-header-overflow type="seq" title="序号" width="77"> <vxe-column show-overflow show-header-overflow type="seq" title="序号" width="77">
<template #default="{ row, rowIndex }"> <template #default="{ row, rowIndex }">
{{ rowIndex + (q.current - 1) * q.size + 1 }} {{ rowIndex + (q.current - 1) * q.size + 1 }}