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

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