合并分支 'zhoulingpo' 到 'master'

Zhoulingpo

查看合并请求 faw-report-library/faw-report-library-web!6
This commit is contained in:
李雪涛
2023-05-12 17:06:14 +08:00
36 changed files with 2220 additions and 1142 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;
+1 -8
View File
@@ -9,14 +9,7 @@ export default {
data: data
})
},
// 查询报告如果已经发起了 就不能再发起了
selectReport (data) {
return request({
url: '/api/report/isAct',
method: 'post',
data: data
})
},
deletReport(data){
return request({
url: '/api/report/powerApply/deleteAct',
+39 -2
View File
@@ -90,6 +90,15 @@ export default {
data: data
})
},
// 通用流程提交
completeTaskALL(data){
return request({
url: '/api/batchCompleteTask',
method: 'post',
data: data
})
},
// 通用流程详细信息查询
getProcessDetail( data ){
return request({
@@ -107,7 +116,7 @@ export default {
params: data
})
},
// 停用流程发起
// 流程发起
startProcess(data) {
return request({
url: '/api/startProcess',
@@ -116,6 +125,15 @@ export default {
})
},
// 流程发起
startProcessALL(data) {
return request({
url: '/api/batchStartProcess',
method: 'post',
data: data
})
},
// 保存到草稿
saveProcess(data) {
return request({
@@ -125,6 +143,16 @@ export default {
})
},
// quan保存到草稿
saveProcessALL(data) {
return request({
url: '/api/batchSaveTaskFirst',
method: 'post',
data: data
})
},
// 判断当前人是不是审批人
// /selectTask
jugeProcess(data) {
@@ -134,5 +162,14 @@ export default {
params: data
})
}
},
// 查询报告如果已经发起了 就不能再发起了
selectReport (data) {
return request({
url: '/api/report/isAct',
method: 'post',
data: data
})
},
}
+73 -9
View File
@@ -49,18 +49,18 @@ export default {
params: id
})
},
labelUpdate(data){
return request({
url: 'api/tree-label/update',
method: 'POST',
data
})
},
labelUpdate(data){
return request({
url: 'api/tree-label/update',
method: 'POST',
data
})
},
// 新增或编辑报告
reportAdd (data) {
return request({
url: '/api/report/add',
url: '/api/report/saveOrUpdate',
method: 'POST',
data
})
@@ -76,6 +76,13 @@ labelUpdate(data){
}
})
},
// 获取报告详情
getReportDetail (data){
return request({
url: `/api/report/detail/${data}`,
method: 'GET'
})
},
// 获取报告预览
reportGetReportHtmlId (data) {
return request({
@@ -151,6 +158,63 @@ labelUpdate(data){
method: 'POST',
params: data
})
},
// 点赞
goodLuck (data) {
return request({
url: '/api/reportLogBook/thumbUpOrDown',
method: 'get',
params:data
})
},
//删除评论 {id}
delJuggle (data) {
return request({
url: '/api/report-comment/'+data,
method: 'delete',
})
},
// 添加评论
addJuggle (data) {
return request({
url: '/api/report-comment/add',
method: 'post',
data
})
},
// 获取评论
getJuggle (data) {
return request({
url: '/api/report-comment/page',
method: 'get',
params:data
})
},
//评分
addScore(data) {
return request({
url: '/api/report-rating/rating',
method: 'put',
params:data
})
},
// 获取评分
getScore(data) {
return request({
url: '/api/report-rating/rating',
method: 'get',
params:data
})
},
// 获取点赞
getGood(data){
return request({
url: '/api/reportLogBook/getThumbUpCount',
method: 'get',
params:data
})
}
//
}
+18
View File
@@ -0,0 +1,18 @@
import { instance as request } from '@/utils/request'
export default {
searchFile (data) {
return request({
url: '/api/report/fileName',
method: 'GET',
params:data
})
},
// 判断报告名称是否重复
JggleName(data) {
return request({
url: '/api/report/isReportNameOccupy',
method: 'post',
data:data
})
}
}
+15 -1
View File
@@ -97,6 +97,20 @@
word-break: break-word;
max-height: 300px;
overflow: auto;
}
.no_border{
.el-form-item .el-input__inner {
height: 40px;
line-height: 40px;
font-size: 14px;
border: none;
}
.el-form-item .el-textarea__inner{
border: none;
}
.el-input.is-disabled .el-input__inner,
.el-textarea.is-disabled .el-textarea__inner{
background-color: #fff;
}
}
+7 -7
View File
@@ -5,7 +5,7 @@
<el-dialog
v-if="isOrg"
append-to-body
:title="showTitle"
title="组织机构"
:visible.sync="isVisible"
:close-on-click-modal="false"
class="org-table"
@@ -93,7 +93,7 @@
<el-table-column
label="部门编码"
width="120"
:prop="orgCode"
prop="orgCode"
align="center"
show-overflow-tooltip>
</el-table-column>
@@ -125,7 +125,7 @@
size="medium"
closable
v-for="item in checkedList"
:key="item.usid || item.USID || item.id"
:key="item.usid || item.USID || item.id || item.orgCode"
@close="handleRemove(item)">{{ item.uname || item.USNAME || item.name || item.orgName}}
</el-tag>
<el-button
@@ -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)
@@ -745,7 +745,7 @@ export default {
const selected = selection.length && selection.indexOf(row) !== -1 // 为true时选中,为 0 时(false)未选中
if (selected) {
selection.map(selItem => {
const id = selItem.USID
const id = selItem.USID || selItem.orgCode
if (!this.checkedIdList.includes(id)) {
this.checkedIdList.push(id)
this.checkedList.push(row)
@@ -758,7 +758,7 @@ export default {
selectionRowAll (selection) {
if (selection.length > 0) {
selection.map(selItem => {
const id = selItem.USID
const id = selItem.USID || selItem.orgCode
if (!this.checkedIdList.includes(id)) {
this.checkedIdList.push(id)
this.checkedList.push(selItem)
@@ -948,7 +948,7 @@ export default {
})
if (this.maxSelected == 1) {
// debugger
//
this.tableChecked = this.config.value
this.isShowOrg = false
}
+1 -1
View File
@@ -49,7 +49,7 @@
prop="approvalOpinion"
align="center"
show-overflow-tooltip
label="审意见">
label="审意见">
</el-table-column>
<el-table-column
show-overflow-tooltip
+10 -6
View File
@@ -54,18 +54,17 @@
v-if="showTransfer" round
>转办</el-button>
<el-button
type="primary"
size="large"
class="common-button-primary"
class="common-button-primary bgPink"
@click="handleSubmit('n')"
:loading="btyLoading"
v-if="showNoAgree" round>
不同意
</el-button>
<el-button
type="primary"
size="large"
class="common-button-primary"
class="common-button-primary bgPink"
@click="handleSubmit('y')"
:loading="tyLoading"
v-if="showAgree" round>
@@ -90,9 +89,9 @@
重置
</el-button>
<el-button
type="primary"
size="large"
class="common-button-primary"
class="common-button-primary bgPink"
@click="handleSubmit"
:loading="submitLoading"
v-if="showSubmit" round
@@ -434,4 +433,9 @@ export default {
//background-color:#8400ff;
border: none;
}
.bgPink{
background-color: rgba(132, 0, 255, 1);
border-color: rgba(132, 0, 255, 1);
color: #fff;
}
</style>
+52 -14
View File
@@ -7,23 +7,31 @@
components: {},
data() {
return {
userId: this.$store.getters.userInfo.usid,
userName:this.$store.getters.userInfo.usname,
processTypeList: [
{
label: '下载申请流程',
value: '1'
},
{
label: '预览申请流程',
label: '预览申请',
value: '1'
},
{
label: '预览+下载申请',
value: '2'
},
{
label: '预览+下载申请流程',
label: '下载申请',
value: '3'
},
{
label: '上传审批流程',
label: '上传审批',
value: '4'
},
{
label: '编辑报告',
value: '5'
},
],
formDisableFlag: false,
nowOrder: '',
@@ -106,21 +114,43 @@
// 所有流程的完成任务
completeProcess(obj) {
this.$api.process.completeTask(obj).then(res=>{
if(this.$route.path=='/userCenter/processCenter'){
this.loadData()
}else {
this.$message['success']('提交成功')
this.$router.push({
path: "/userCenter/processCenter",
query: {
id: 'AEHJB8YNJ3'
}
})
}
})
},
// 所有流程的完成任务
completeProcessALL(obj) {
this.$api.process.completeTaskALL(obj).then(res=>{
if(this.$route.path=='/userCenter/processCenter'){
this.reset()
}else{
this.$message['success']('提交成功')
this.$router.push({
path:"/userCenter/processCenter",
query:{
id:'AEHJB8YNJ3'
id:'AEHJB8YNJ3',
}
})
})
},
}
})
},
// 获取流程详细信息
getProcessDetail(){
return new Promise((resolve,reject)=>{
let params={
prcId: this.prcId,
prcType: this.prcType
prcId: this.prcId ,
prcType: this.prcType,
dataId:this.dataId
}
if(this.$route.query.type=='yiban') params.tag=1
else params.tag=0
@@ -145,6 +175,16 @@
})
})
},
//保存到草稿
saveProcessALL(param){
return new Promise((resolve,reject)=> {
this.$api.process.saveProcessALL(param).then(res => {
resolve()
}).catch(()=>{
reject()
})
})
},
// 获取草稿详细信息
getDraftDetail(){
let dataId=this.$store.getters.handleProcess.dataId
@@ -173,8 +213,6 @@
this.$message.warning("您没有当前流程的操作权限")
resolve(false)
}
})
})
}
+1 -1
View File
@@ -1 +1 @@
<svg t="1683517728690" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2927" width="200" height="200"><path d="M64 483.04V872c0 37.216 30.144 67.36 67.36 67.36H192V416.32l-60.64-0.64A67.36 67.36 0 0 0 64 483.04zM857.28 344.992l-267.808 1.696c12.576-44.256 18.944-83.584 18.944-118.208 0-78.56-68.832-155.488-137.568-145.504-60.608 8.8-67.264 61.184-67.264 126.816v59.264c0 76.064-63.84 140.864-137.856 148L256 416.96v522.4h527.552a102.72 102.72 0 0 0 100.928-83.584l73.728-388.96a102.72 102.72 0 0 0-100.928-121.824z" p-id="2928" fill="#13227a"></path></svg>
<svg t="1683623452238" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3732" width="200" height="200"><path d="M64 483.04V872c0 37.216 30.144 67.36 67.36 67.36H192V416.32l-60.64-0.64A67.36 67.36 0 0 0 64 483.04zM857.28 344.992l-267.808 1.696c12.576-44.256 18.944-83.584 18.944-118.208 0-78.56-68.832-155.488-137.568-145.504-60.608 8.8-67.264 61.184-67.264 126.816v59.264c0 76.064-63.84 140.864-137.856 148L256 416.96v522.4h527.552a102.72 102.72 0 0 0 100.928-83.584l73.728-388.96a102.72 102.72 0 0 0-100.928-121.824z" p-id="3733" fill="#d81e06"></path></svg>

Before

Width:  |  Height:  |  Size: 603 B

After

Width:  |  Height:  |  Size: 603 B

+2
View File
@@ -17,6 +17,7 @@ import './assets/css/element-variables.scss'
// ECharts
import 'echarts'
import ECharts from './components/ECharts'
import orgTable from '@/components/OrgTable'
// Api
import Api from './api'
@@ -47,6 +48,7 @@ Vue.use(VXETable)
Vue.use(VueQuillEditor)
Vue.use(ElementUI, { size: 'mini', zIndex: 3000 })
Vue.component('v-chart', ECharts)
Vue.component('orgTable',orgTable)
Vue.use(Api)
Vue.use(Directive)
Vue.use(Filter)
+19 -20
View File
@@ -1,10 +1,11 @@
// 定义枚举
import Esenum from './index.js'
// 权限申请
export const PERMISSION = new Esenum([
{ label: '预览', value: "1" },
{ label: '预览+下载', value: "2" }
])
export const PERMISSION = [
{ label: '预览', value: "1" ,disabled:false},
{ label: '预览+下载', value: "2" ,disabled:false},
{ label: '下载', value: "3",disabled:false },
]
// 基础设置的枚举
// export const basMessage = new Esenum([
@@ -14,10 +15,12 @@ export const basMessage = new Esenum({
mark: {name: "水印前缀", value: "WATERMARK_PREFIX",index:0}
})
export const privacyLevelOptions= new Esenum([
export const privacyLevelOptions= [
{
value:'部公开',
label:'部公开'
value:'公开(内部公开',
label:'公开(内部公开'
},
{
value:'普通商密',
@@ -27,22 +30,18 @@ export const privacyLevelOptions= new Esenum([
value:'核心商密',
label:'核心商密'
},
]
export const confidentialLevelOptions = [
{
value:'内部公开',
label:'内部公开'
value:'不涉及用户隐私',
label:'不涉及用户隐私'
},
{
value:'用户信息',
label:'用户信息'
value:'用户隐私',
label:'用户隐私'
},
{
value:'敏感信息',
label:'敏感信息'
},
])
export const confidentialLevelOptions = new Esenum([
{
value:'一般隐私',
label:'一般隐私'
value:'用户敏感信息',
label:'用户敏感信息'
}
])
]
+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}`;
}
-1
View File
@@ -51,7 +51,6 @@ instance.interceptors.response.use(function (response) {
// Message.error(response.data.message)
// if (response.data.status == 401) {
store.commit('savePathUrl', null)
store.commit('setHandleProcess', null)
// router.push('/login')
Message.error(response.data.message)
// window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self');
+403 -225
View File
@@ -1,101 +1,232 @@
<template>
<div class="content-height report-detail">
<div class="title">
<el-tooltip :content="row.name" placement="top-start">
<span>{{ row.name || '-' }}</span>
</el-tooltip>
</div>
<div class="desc">
<el-row>
<el-col :span="24" class="desc-item">
<label>上传人</label>
<div>{{ row.createUserName }}</div>
</el-col>
<el-col :span="24" class="desc-item">
<label>关键词</label>
<div>{{ getKeyContent(row.keyContent) }}</div>
</el-col>
<el-col :span="24" class="desc-item">
<label>内容摘要</label>
<p>{{ row.mainContent || '-' }}</p>
</el-col>
<el-col :span="24" class="desc-item">
<label>所属部门</label>
<div>{{ row.department || '-' }}</div>
</el-col>
<el-col :span="24" class="desc-item">
<label>报告涉密等级</label>
<div>{{ row.confidentialLevel || '-' }}</div>
</el-col>
<el-col :span="24" class="desc-item">
<label>标签</label>
<div>{{ row.labelList || '-' }}</div>
</el-col>
</el-row>
</div>
<div class="report-download">
<span>报告详情</span>
<!-- <el-button type="primary" @click="downloadRow(row)">报告下载</el-button>-->
</div>
<div class="preview-box" v-watermark="{ text: watermarkText }">
<div class="preview-content" v-html="content"></div>
</div>
<div class="report-jug">
<div class="report-jug-left">
报告满意度:<el-rate allow-half :max="10" v-model="value1" @click="saveScore"></el-rate>
</div>
<div class="pointclick">
<svg-icon v-if="!isShow" icon-class="pointe" @click="isShow=!isShow" class-name="icon" ></svg-icon>
<svg-icon v-else icon-class="pointe_fill" @click="isShow=!isShow" class-name="icon" ></svg-icon>
<div class="content-height report-detail">
<div class="title">
<el-tooltip :content="row.name" placement="top-start">
</div>
<span>{{ row.name || '-' }}</span>
</el-tooltip>
</div>
<div class="desc">
<el-row>
<el-col :span="24" class="desc-item">
<label>上传人</label>
<div>{{ row.uploaderName }}</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24" class="desc-item">
<label>关键词</label>
<div>{{ getKeyContent(row.keyContent) }}</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24" class="desc-item">
<label>内容摘要</label>
<p>{{ row.mainContent || '-' }}</p>
</el-col>
</el-row>
<el-row>
<el-col :span="10" class="desc-item">
<label>所属部门</label>
<div>{{ row.departmentName || '-' }}</div>
</el-col>
<el-col :span="10" :offset="2" class="desc-item">
<label>报告年份</label>
<div>{{ row.year || '-' }}</div>
</el-col>
</el-row>
<el-row>
<el-col :span="10" class="desc-item">
<label>报告涉密等级</label>
<div>{{ row.confidentialLevel || '-' }}</div>
</el-col>
<el-col :span="10" :offset="2" class="desc-item">
<label>报告隐私等级</label>
<div>{{ row.privacyLevel || '-' }}</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24" class="desc-item">
<label>标签</label>
<div>{{ row.labels && row.labels.join(',') || '-' }}</div>
</el-col>
</el-row>
</div>
<div class="report-download">
<span>报告详情</span>
<el-button type="primary" v-if="row.downPower==1" @click="downloadRow(row)">报告下载</el-button>
</div>
<div class="preview-box" v-watermark="{ text: watermarkText }">
<div class="preview-content" v-html="content"></div>
</div>
<div class="report-jug">
<div class="report-jug-left">
<div>报告满意度</div>
<el-rate allow-half :max="5" v-model="userRating" @click.native="saveScore"></el-rate>
</div>
<div class="juggle_box showLimit">
<el-row >
<el-col :span="1">
<span>评论</span>
</el-col>
<el-col :span="21">
<el-input type="textarea" v-model="juggle" maxlength="1000" show-word-limit></el-input>
</el-col>
<el-col :span="2">
<el-button size="medium" type="primary" class="fabiaoBtn" @click="">发表评论</el-button>
</el-col>
</el-row>
<div class="all_juggle">
<div class="juggle_left">sss</div>
<div class="juggle_right">
<div class="content">ssss</div>
<div class="bottom">
<div class="time">time</div>
<el-button class="delbtn" size="medium" plain type="primary" @click="">删除</el-button>
</div>
</div>
</div>
</div>
<div>
<div class="pointclick">
<svg-icon v-if="!isShow" icon-class="pointe" @click="pointZan('y')" style="font-size: 25px"
class-name="icon"></svg-icon>
<svg-icon v-else icon-class="pointe_fill" @click="pointZan('n')" style="font-size: 25px"
class-name="icon"></svg-icon>
{{ pointNum }}
</div>
</div>
<div class="juggle_box showLimit">
<el-row>
<el-col :span="1">
<span>评论</span>
</el-col>
<el-col :span="21">
<el-input type="textarea" v-model="comment" maxlength="1000" show-word-limit></el-input>
</el-col>
<el-col :span="2">
<el-button size="medium" type="primary" class="fabiaoBtn" @click="addJuggle">发表评论</el-button>
</el-col>
</el-row>
<div class="all_juggle" v-for="item in commonList">
<div class="juggle_left">
<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 && 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 v-if="commonList.length>0" @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>
</template>
<script>
import { downloadFile } from '@/utils/downloadFile'
import { formatDate } from '@/utils/date'
import {downloadFile} from '@/utils/downloadFile'
import {formatDate2} from '@/utils/date'
export default {
name: 'ReportDetail',
data () {
data() {
return {
isAdmin: false, //是否是管理员
report: {},
formatDate2,
isShow: false,
value1:'',
userRating: '',
watermarkText: '', // 水印
content: '',
row: {}
row: {},
comment: '',
reportId: '',
commonList: [],
q: {
pageNo: 1,
pageSize: 5,
},
userId: this.$store.getters.userInfo.USID,
userName: this.$store.getters.userInfo.USNAME,
}
},
methods: {
// 获取评分
getScore() {
this.$api.report.getScore({reportId: this.reportId}).then(res => {
this.userRating = res.data / 2
})
},
// 获取点赞数量及其状态
getGood() {
this.$api.report.getGood({reportId: this.reportId}).then(res => {
if (res.data.logId) {
this.isShow = true
} else {
this.isShow = false
}
this.pointNum = res.data.thumbUpCount
})
},
//点赞
pointZan(type) {
this.$api.report.goodLuck({reportId: this.reportId}).then(res => {
this.$message.success("操作成功")
this.getGood()
}).catch(() => {
})
},
//评分
saveScore() {
let userRating = this.userRating * 2
this.$api.report.addScore({userRating: +userRating, reportId: this.reportId}).then(res => {
})
},
addJuggle() {
if (this.comment != '') {
this.$api.report.addJuggle({
comment: this.comment,
reportId: this.reportId,
userId: this.userId,
userName: this.userName
}).then(res => {
this.$message.success("评论成功")
this.comment = ''
this.getComment()
})
} else {
this.$message.warning("请填写评论")
}
},
// 删除评论
delJugg(id) {
this.$confirm('确认删除该条评论?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
confirmButtonClass: 'common-button-primary',
type: 'warning'
}).then(() => {
this.$api.report.delJuggle(id).then(res => {
this.$message.success("删除成功")
this.getComment()
})
})
},
// 单页数据量
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 => {
this.commonList = res.data.records
this.total = res.data.total
})
},
getKeyContent(list) {
if (list) {
let keyContent = []
@@ -114,183 +245,230 @@ 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 }) => {
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) {
downloadRow(row) {
// this.$confirm('此操作将下载所选数据文件, 是否继续?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
this.$api.report.reportDownload({ fileId: row.fileId,repostId:row.id }).then(res => {
this.$api.report.reportDownload({fileId: row.fileId, repostId: row.id}).then(res => {
downloadFile(res)
})
// })
},
saveScore(){
}
// 获取详情
getReportDetail() {
this.$api.report.getReportDetail(this.reportId).then(res => {
this.row = res.data
// 需要给分数/2
this.previewRow()
})
},
},
created () {
this.previewRow()
mounted() {
this.reportId = this.$route.query.reportId
this.isAdmin = this.$store.getters.userInfo.roleIdList.indexOf('35LLRCAQ8D') > -1
// this.previewRow()
this.getComment()
this.getReportDetail()
this.getScore()
this.getGood()
}
}
</script>
<style lang="scss" scoped>
.report-detail {
.title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
border-bottom: 1px solid #EBEEF5;
height: 42px;
line-height: 42px;
margin: 0 18px 0 22px;
text-align: center;
.report-detail {
.title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
border-bottom: 1px solid #EBEEF5;
height: 42px;
line-height: 42px;
margin: 0 18px 0 22px;
text-align: center;
span {
font-size: 16px;
font-weight: 600;
color: #262626;
}
}
.desc{
padding: 11px 26px 6px 48px;
span {
font-size: 16px;
font-weight: 600;
color: #262626;
}
}
.desc-item{
display: flex;
justify-content: flex-start;
align-items: flex-start;
margin-bottom: 12px;
label{
display: inline-block;
height: 19px;
line-height: 19px;
font-size: 14px;
font-weight: 400;
color: #595959;
width: 64px;
border-right: 1px solid #BFBFBF;
margin-right: 9px;
}
div,p{
flex: 1;
font-size: 14px;
font-weight: 400;
color: #434343;
}
p{
line-height: 20px;
text-align: justify;
}
}
}
.desc {
padding: 11px 26px 6px 48px;
.report-download {
height: 40px;
background: #F2F6FC;
border: 1px solid #EBEEF5;
margin: 0 14px 0 13px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 7px 0 9px;
span {
font-size: 16px;
font-weight: 500;
color: #262626;
}
}
.preview-box {
// 定位使水印不溢出元素
position: relative;
// 居中
width: calc(100% - 13px - 14px);
margin-left: 13px;
.preview-content {
//margin: 0 14px 0 13px;
padding-bottom: 11px;
img {
max-width: 100% !important;
}
table{
margin: 0 auto;
}
}
}
.report-jug{
.desc-item {
display: flex;
justify-content: space-between;
padding: 10px;
.report-jug-left{
display: flex;
justify-content: flex-start;
align-items: flex-start;
margin-bottom: 12px;
label {
display: inline-block;
height: 19px;
line-height: 19px;
font-size: 14px;
font-weight: 400;
color: #595959;
width: 85px;
margin-right: 9px;
}
div, p {
flex: 1;
font-size: 14px;
font-weight: 400;
color: #434343;
word-break: break-all;
}
p {
line-height: 20px;
text-align: justify;
}
}
.juggle_box{
padding: 10px;
.all_juggle{
margin-top: 20px;
display: flex;
width: 100%;
border: 1px solid #e6f6fe;
min-height: 150px;
.juggle_left{
width: 15%;
}
.report-download {
height: 40px;
background: #F2F6FC;
border: 1px solid #EBEEF5;
margin: 0 14px 0 13px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 7px 0 9px;
span {
font-size: 16px;
font-weight: 500;
color: #262626;
}
}
.preview-box {
// 定位使水印不溢出元素
position: relative;
// 居中
width: calc(100% - 13px - 14px);
margin-left: 13px;
.preview-content {
//margin: 0 14px 0 13px;
max-height: 500px;
padding-bottom: 11px;
overflow: auto;
img {
max-width: 100% !important;
}
table {
margin: 0 auto;
}
}
}
.report-jug {
display: flex;
justify-content: space-between;
padding: 10px;
.report-jug-left {
display: flex;
&>div{
margin-right: 10px;
}
::v-deep .el-rate__item{
vertical-align: inherit;
}
}
}
.juggle_box {
padding: 10px;
.all_juggle {
margin-top: 20px;
display: flex;
width: 100%;
border: 1px solid #e6f6fe;
min-height: 150px;
.juggle_left {
width: 15%;
text-align: center;
border-right: 1px solid #e6f6fe;
color: #434343;
.nameCir {
background-color: pink;
width: 60px;
height: 60px;
border-radius: 50%;
text-align: center;
border-right: 1px solid #e6f6fe;
margin: 0 auto;
line-height: 60px;
color: #fff;
font-size: 18px;
margin: 20px calc(50% - 30px);
}
.juggle_right{
position: relative;
width: 85%;
padding: 20px;
.content{
width: 100%;
}
.juggle_right {
position: relative;
width: 85%;
padding: 10px 10px 40px;
.content {
width: 100%;
color: #434343;
}
.bottom {
position: absolute;
display: flex;
justify-content: space-between;
width: calc(100% - 40px);
bottom: 10px;
left: 20px;
height: 30px;
color: #434343;
.time {
line-height: 30px;
color: #ccc;
}
.bottom{
position: absolute;
display: flex;
justify-content: space-between;
width: calc(100% - 40px);
bottom: 10px;
left: 20px;
height: 30px;
.time{
line-height: 30px;
color: #ccc;
}
.delbtn{
vertical-align: center;
}
.delbtn {
vertical-align: center;
}
}
}
.fabiaoBtn{
margin-left: 20px;
height: 100%;
}
}
.isBackground{
background-color: pink;
}
}
.pointclick{
cursor: pointer;
.fabiaoBtn {
margin-left: 20px;
height: 100%;
}
}
.isBackground {
background-color: pink;
}
}
.pointclick {
cursor: pointer;
}
</style>
+128 -131
View File
@@ -32,78 +32,16 @@
<el-button type="primary" @click="search">查询</el-button>
<el-button type="default" @click="reset">重置</el-button>
</el-col>
<!-- <el-col :span="24">
<div class="tag-item">
<el-tooltip :content="tagData[1].name" placement="top">
<label class="tag-title">{{ tagData[1].name }}</label>
</el-tooltip>
<div class="tag-show" :class="{'active': tagData[1].tagShow}">
<el-checkbox :indeterminate="tagData[1].isIndeterminate" v-model="tagData[1].checkAll"
@change="(val) => handleCheckAllChange(val, 1)">全部
</el-checkbox>
<el-checkbox-group v-model="q.labelOneId"
@change="(val) => handleCheckedTagsChange(val, 1)">
<template v-for="item in tagData[1].tags">
<el-checkbox :label="item.id" :key="item.id">{{ item.name }}</el-checkbox>
</template>
</el-checkbox-group>
<i @click="switchTagShow(1)"
:class="{'el-icon-arrow-down': !tagData[1].tagShow, 'el-icon-arrow-up': tagData[1].tagShow}"></i>
</div>
</div>
</el-col> -->
<!-- <el-col :span="24">
<div class="tag-item">
<el-tooltip :content="tagData[2].name" placement="top">
<label class="tag-title">{{ tagData[2].name }}</label>
</el-tooltip>
<div class="tag-show" :class="{'active': tagData[2].tagShow}">
<el-checkbox :indeterminate="tagData[2].isIndeterminate" v-model="tagData[2].checkAll"
@change="(val) => handleCheckAllChange(val, 2)">全部
</el-checkbox>
<el-checkbox-group v-model="q.labelTwoId"
@change="(val) => handleCheckedTagsChange(val, 2)">
<template v-for="item in tagData[2].tags">
<el-checkbox :label="item.id" :key="item.id">{{ item.name }}</el-checkbox>
</template>
</el-checkbox-group>
<i @click="switchTagShow(2)"
:class="{'el-icon-arrow-down': !tagData[2].tagShow, 'el-icon-arrow-up': tagData[2].tagShow}"></i>
</div>
</div>
</el-col> -->
<!-- <el-col :span="24">
<div class="tag-item">
<el-tooltip :content="tagData[3].name" placement="top">
<label class="tag-title">{{ tagData[3].name }}</label>
</el-tooltip>
<div class="tag-show" :class="{'active': tagData[3].tagShow}">
<el-checkbox :indeterminate="tagData[3].isIndeterminate" v-model="tagData[3].checkAll"
@change="(val) => handleCheckAllChange(val, 3)">全部
</el-checkbox>
<el-checkbox-group v-model="q.labelThreeId"
@change="(val) => handleCheckedTagsChange(val, 3)">
<template v-for="item in tagData[3].tags">
<el-checkbox :label="item.id" :key="item.id">{{ item.name }}</el-checkbox>
</template>
</el-checkbox-group>
<i @click="switchTagShow(3)"
:class="{'el-icon-arrow-down': !tagData[3].tagShow, 'el-icon-arrow-up': tagData[3].tagShow}"></i>
</div>
</div>
</el-col> -->
</el-row>
</div>
<el-row class="tag-btn">
<el-button @click="permissionApp">权限申请</el-button>
<el-button v-if="!isAdmin" type="primary" @click="permissionApp(false)">申请权限</el-button>
<div class="tag-right">
<el-button @click="">时间</el-button>
<el-button @click="">点击量</el-button>
<el-button @click="">下载量</el-button>
<el-button @click="clickBtn(1)" :class="{'checkClass':isShowbg1}">时间</el-button>
<el-button @click="clickBtn(2)" class="clickNum" :class="{'checkClass':isShowbg2}">点击量</el-button>
<el-button @click="clickBtn(3)" :class="{'checkClass':isShowbg3}">下载量</el-button>
</div>
</el-row>
@@ -121,7 +59,6 @@
default-expand-all
:filter-node-method="filterNode"
ref="tree"
check-strictly
@check="getHalfCheckedNode"
>
@@ -137,7 +74,7 @@
</div>
</el-col>
<el-col :span="19">
<el-col :span="20" style="padding-left: 15px">
<vxe-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe
v-table-min-height="'calc(100vh - 320px)'"
@checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent">
@@ -151,59 +88,42 @@
<template #default="{ row, rowIndex }">
<!-- <label class="row-title" >-->
<!-- <el-tooltip :content="row.name" placement="top-start">-->
<span class="report-name blurcolor" @click="goReportDetail(row)"> {{ row.name }}</span>
<!-- </el-tooltip>-->
<!-- </label>-->
<!-- <div class="row-info">-->
<!-- <img v-if="row.fileType === '3'" class="icon-file-type" src="@/assets/imgs/icon-pdf.png" alt="">-->
<!-- <img v-if="row.fileType === '4'" class="icon-file-type" src="@/assets/imgs/icon-doc.png" alt="">-->
<!-- <img v-if="row.fileType === '1'" class="icon-file-type" src="@/assets/imgs/icon-ppt.png" alt="">-->
<!-- <img v-if="row.fileType === '2'" class="icon-file-type" src="@/assets/imgs/icon-excel.png" alt="">-->
<!-- <div class="row-text">-->
<!-- <label class="row-title" @click="goReportDetail(row)">-->
<!-- <el-tooltip :content="row.name" placement="top-start">-->
<!-- <span>{{row.name}}</span>-->
<!-- </el-tooltip>-->
<!-- </label>-->
<!-- <div class="tag-info">-->
<!-- <span class="icon-tag-item"><img src="@/assets/imgs/icon-time.png"-->
<!-- alt=""><span>{{row?.year}}</span></span>-->
<!-- <span class="icon-tag-item"><img src="@/assets/imgs/icon-tag01.png"-->
<!-- alt=""><span class="keyContent">{{getKeyContent(row?.keyContent)}}</span></span>-->
<!-- &lt;!&ndash; <span class="icon-tag-item"><img src="@/assets/imgs/icon-tag02.png"-->
<!-- alt=""><span>{{row.labelTwoName}}</span></span>-->
<!-- <span class="icon-tag-item"><img src="@/assets/imgs/icon-tag03.png"-->
<!-- alt=""><span>{{row.labelThreeName}}</span></span> &ndash;&gt;-->
<!-- &lt;!&ndash;<span class="icon-tag-item"><span>{{(row.fileSize / 1024 / 1024).toFixed(2) }}MB</span></span>&ndash;&gt;-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<span class="report-name"> {{ row.name }}</span>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="摘要"></vxe-column>
<vxe-column show-overflow show-header-overflow field="mainContent" title="摘要"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="报告年份"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="报告评级">
<vxe-column show-overflow show-header-overflow field="reportRating" title="报告评级">
<template #default="{row}">
<el-rate
v-model="value"
v-model="row.reportRating/2"
disabled
show-score
text-color="#ff9900"
score-template="{value}">
>
</el-rate>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="点赞数"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="点击率"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="下载量"></vxe-column>
<vxe-column show-overflow show-header-overflow field="year" title="上传人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="thumbUp" title="点赞数">
<template #default="{ row }">
{{row.thumbUp || 0}}
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="clicks" title="点击量">
<template #default="{ row }">
{{row.clicks || 0}}
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="download" title="下载量">
<template #default="{ row }">
{{row.download || 0}}
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="uploader" title="上传人"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
<template #default="{ row }">
<el-button type="text" @click="previewRow(row)">预览</el-button>
<el-button type="text" v-if="isAdmin || row.power == 2 || !row.power " @click="downloadRow(row)">下载</el-button>
<el-button type="text" v-if="" @click="permissionApp(row)">申请权限</el-button>
<el-button type="text" v-if="isAdmin ||row.power == 1 ||row.power == 2" @click="goReportDetail(row)">预览</el-button>
<el-button type="text" v-if="isAdmin || row.power == 3 || row.power == 2 " @click="downloadRow(row)">下载</el-button>
<el-button type="text" v-if="!isAdmin && row.power !== 2" @click="permissionApp(row)">申请权限</el-button>
</template>
</vxe-column>
@@ -252,6 +172,9 @@ export default {
name: 'ReportList',
data() {
return {
isShowbg1:true,
isShowbg2:false,
isShowbg3:false,
value:3.7,
watermarkText: '', // 水印
fullscreen: false,
@@ -261,6 +184,9 @@ export default {
name: '',
pageNo: 1,
pageSize: 10,
orderByClicks:0,
orderByDownload:0,
orderByTime:1
},
total: 0,
tableData: [],
@@ -304,6 +230,29 @@ export default {
}
},
methods: {
clickBtn(type){
for(let i= 1;i<4;i++){
this['isShowbg'+i] = false
}
this['isShowbg'+type] = true
if(type==1){
this.q.orderByTime=1
this.q.orderByClicks=0
this.q.orderByDownload=0
}else if(type==2){
this.q.orderByClicks=1
this.q.orderByTime=0
this.q.orderByDownload=0
}else{
this.q.orderByDownload=1
this.q.orderByClicks=0
this.q.orderByTime=0
}
this.q.pageNo=1
this.reportList()
},
getKeyContent(list) {
if (list) {
let keyContent = []
@@ -343,26 +292,50 @@ export default {
return item.id
})
},
permissionApp() {
// if(this.checkList.length <1){
// this.$message.warning("至少选择一条报告进行权限申请")
// return
// }
// // 有预览权限的时候是否还让继续申请
// let temp=this.checkList.filter(item =>{
// if(+item.power == 1 || +item.power == 2){
// return item.name
// }
// })
// if(temp.length>0) {
// this.$message.warning("当前选择的"+temp.toString()+"已经有权限,无须申请!")
// return
// }
permissionApp(row) {
if(row){
if(row.isAct == 0){
this.$message.warning("当前"+row.name+"已经在流程中")
return
}
this.$router.push({
path: '/permission/launch',
query: {id: 'AEHJB8YNJ3', isBegin: 1,ids:row.id}
})
}else{
if(this.checkList.length <1){
this.$message.warning("至少选择一条报告进行权限申请")
return
}
let already=this.checkList.filter(item =>{
if( +item.isAct == 0){
return item
}
})
if(already.length>0) {
let name=already.map(item=>item.name)
this.$message.warning("当前选择的"+name.join(',')+"已经在流程中")
return
}
// 有预览权限的时候是否还让继续申请
let temp=this.checkList.filter(item =>{
if( +item.power == 2){
return item.name
}
})
console.log(temp)
if(temp.length>0) {
let name=temp.map(item=>item.name)
this.$message.warning("当前选择的"+name.join(',')+"已经有权限,无须申请!")
return
}
this.$router.push({
path: '/permission/launch',
query: {id: 'AEHJB8YNJ3', isBegin: 1,ids:this.checkIds.join(',')}
})
}
this.$router.push({
path: '/permission/launch',
query: {id: 'AEHJB8YNJ3', isBegin: 1}
})
},
init() {
this.getTreeLabel()
@@ -464,7 +437,10 @@ export default {
labelTwoId: [],
labelThreeId: [],
pageNo: 1,
pageSize: 10
pageSize: 10,
orderByTime:1,
orderByDownload:0,
orderByClicks:0
}
this.total = 0
this.tableData = []
@@ -490,7 +466,7 @@ export default {
},
// 跳转到详情
goReportDetail(row) {
this.$router.push({path: '/report/detail', query: {id: this.$route.query.id, row: JSON.stringify(row)}})
this.$router.push({path: '/report/detail', query: {id: this.$route.query.id, reportId: row.id}})
}
},
created() {
@@ -513,7 +489,7 @@ export default {
.treeList {
padding: 20px 20px 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
margin-right: 20px;
//margin-right: 20px;
.filter-tree {
margin-top: 20px;
@@ -552,10 +528,31 @@ export default {
}
.tag-btn {
.el-button + .el-button {
margin-left: 0px;
}
padding: 18px 13px 11px;
.tag-right{
float: right;
::v-deep .el-button{
border: 1px solid #3D87CC;
border-radius: 0;
color: #3D87CC;
background-color: #ecf5ff;
}
.clickNum{
border: none;
border-top: 1px solid #3D87CC ;
border-bottom: 1px solid #3D87CC;
}
}
.checkClass{
background-color: rgba(64, 158, 255, 1) !important;
color: #fff !important;
}
}
+51 -61
View File
@@ -41,6 +41,7 @@
</div>
</el-row>
</div>
<div class="table">
<el-row>
<el-col :span="4" class="treeList">
<el-input placeholder="输入关键字进行过滤" v-model="filterText">
@@ -55,8 +56,6 @@
:filter-node-method="filterNode"
ref="tree"
@check="getHalfCheckedNode"
check-strictly
@check-change="setCheckedNodes"
:key="treeKey"
>
<template slot-scope="{node}">
@@ -70,7 +69,7 @@
</el-tree>
</div>
</el-col>
<el-col :span="19 ">
<el-col :span="20" style="padding-left: 15px">
<div class="table">
<vxe-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="'calc(100vh - 320px)'">
<vxe-column show-overflow show-header-overflow type="seq" title="序号" width="77">
@@ -86,7 +85,9 @@
<vxe-column show-overflow show-header-overflow field="labelThreeName"
:title="tagsForm.tags03.name"></vxe-column> -->
<vxe-column show-overflow show-header-overflow field="year" title="报告年份"></vxe-column>
<vxe-column show-overflow show-header-overflow field="createDate" title="上传时间"></vxe-column>
<vxe-column show-overflow show-header-overflow field="confidentialLevel" title="报告涉密等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="privacyLevel" title="报告隐私等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="createDate" title="报告上传时间"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
<template #default="{ row }">
<el-button type="text" @click="openReportModify('modify', row)">编辑</el-button>
@@ -102,7 +103,7 @@
</div>
</el-col>
</el-row>
</div>
<!--操作日志-->
<el-dialog title="操作日志" :visible.sync="dialogLog" width="1100px" :close-on-click-modal="false"
:close-on-press-escape="false" modal-append-to-body append-to-body>
@@ -329,7 +330,6 @@ export default {
doNames: [],
/* =============================================== 标签维护 =============================================== */
dialogTags: false, // 标签维护
filterText: '',
treeData: [
],
filterText:'',
@@ -781,28 +781,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() {
@@ -875,29 +874,17 @@ export default {
},
// 打开报告上传
openReportModify(mode, row) {
this.reportF = {
name: '', // 报告名称
mainContent: '', // 内容摘要
department: '', // 报告所属部门
fileName: '', // 文件上传
fileId: '',
year: '', // 报告年份
privacyLevel: undefined, //报告隐私等级
reportUserIdList: [], // 权限
confidentialLevel:undefined, //涉密等级
labelList:[] //标签
};
this.tags = []
this.mode = mode;
// this.labelList();
let rowData = JSON.parse(JSON.stringify(row));
console.log('rowData',rowData);
this.reportF = rowData;
// this.reportF.tags=JSON.parse(rowData.keyContent)
this.tags=JSON.parse(rowData.keyContent)
if(this.tags == '') this.tags =[]
this.$forceUpdate()
this.dialogReport = true;
if( +row.isAct == 0){
this.$message.warning("当前选择的"+row.name+"已经在流程中")
return
}
this.$router.push({
path:'/reportprocess/launch',
query:{
id:this.$route.query.id,
ids:row.id
}
})
},
// 获取所有用户
sysUserList() {
@@ -949,6 +936,8 @@ export default {
this.q.pageNo = 1;
this.reportList();
}
}).catch(err=>{
this.tableData =[]
})
},
// 日期列表
@@ -970,13 +959,15 @@ export default {
},
// 预览
previewRow(row) {
this.fullscreen = false;
// 更新预览水印的时间戳
this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`;
this.$api.report.reportGetReportHtmlId({ id: row.id }).then(({ data }) => {
this.content = data.content;
this.dialogPreview = true;
})
// this.fullscreen = false;
// // 更新预览水印的时间戳
// this.watermarkText = `${this.$store.state.userInfo.usname} ${formatDate(+new Date(), 'yyyy年MM月dd日 hh:mm:ss')}`;
// this.$api.report.reportGetReportHtmlId({ id: row.id }).then(({ data }) => {
// this.content = data.content;
// this.dialogPreview = true;
// })
this.$router.push({path: '/report/detail', query: {id: this.$route.query.id, reportId: row.id}})
},
// 下载
downloadRow(row) {
@@ -1003,10 +994,9 @@ export default {
<style lang="scss" scoped>
.treeList{
padding: 20px;
margin-left: 13px;
padding: 20px 20px 0;
//margin-left: 13px;
box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04);
margin-right: 20px;
.filter-tree{
margin-top: 20px;
height: calc(100vh - 320px);
+32 -5
View File
@@ -53,7 +53,7 @@
<vxe-column show-overflow show-header-overflow field="ACCOUNT" title="用户名"></vxe-column>
<vxe-column show-overflow show-header-overflow field="CELLPHONE_NUMBER" title="手机号"></vxe-column>
<vxe-column show-overflow show-header-overflow field="CREATEDATE" title="创建时间"></vxe-column>
<vxe-column show-overflow show-header-overflow field="DEPARTMENT" title="部门"></vxe-column>
<vxe-column show-overflow show-header-overflow field="ORGNAME" title="部门"></vxe-column>
<vxe-column show-overflow show-header-overflow field="EMAIL" title="邮箱"></vxe-column>
<vxe-column show-overflow show-header-overflow field="ROLENAME" title="角色"></vxe-column>
<vxe-column show-overflow show-header-overflow field="USNAME" title="姓名"></vxe-column>
@@ -98,7 +98,9 @@
<el-input v-model="form.cellPhoneNumber" placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item label="部门:">
<el-input v-model="form.department" maxlength="50" show-word-limit placeholder="请输入部门"></el-input>
<el-input maxlength="50" readonly v-model="form.orgName" @click.native="handleClick" placeholder="请选择部门"
></el-input>
<!-- <el-input show-word-limit placeholder="请输入部门"></el-input>-->
</el-form-item>
<el-form-item label="邮箱:">
<el-input v-model="form.email" placeholder="请输入邮箱"></el-input>
@@ -119,6 +121,10 @@
</div>
</div>
</el-dialog>
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
value: orgTableVal,
valueName: orgTableValName
}" :workNumFlag="true" :isOrg="true" :maxSelected="100" @confirm="isTreeOk"></orgTable>
</div>
</template>
@@ -129,6 +135,9 @@ export default {
name: 'User',
data () {
return {
visibleOrgTable:false,
orgTableVal:'',
orgTableValName:'',
q: {
account: '', // 用户名
roleName: '', // 角色名称
@@ -142,7 +151,7 @@ export default {
form: {
account: '', // 用户名
cellPhoneNumber: '', // 手机号
department: '', // 部门
orgId: '', // 部门
email: '', // 邮箱
password: '', // 密码
usid: '',
@@ -154,6 +163,23 @@ export default {
}
},
methods: {
isTreeOk(checkedList){
const parts = []
const partsName = []
checkedList.map((item, index) => {
parts.push(item.orgCode)
partsName.push(item.orgName)
})
this.form.orgId = parts.toString()
this.form.orgName = partsName.toString()
},
handleClick(){
this.orgTableVal=this.form.orgId
this.orgTableValName=this.form.orgName
this.visibleOrgTable=true
},
search () {
this.q.pageNo = 1
this.sysUserList()
@@ -200,7 +226,7 @@ export default {
this.form = {
account: '', // 用户名
cellPhoneNumber: '', // 手机号
department: '', // 部门
orgId: '', // 部门
email: '', // 邮箱
password: '', // 密码
usid: '',
@@ -287,7 +313,8 @@ export default {
this.form = {
account: row.ACCOUNT, // 用户名
cellPhoneNumber: row.CELLPHONE_NUMBER, // 手机号
department: row.DEPARTMENT, // 部门
orgId: row.ORGID, // 部门
orgName: row.ORGNAME, // 部门
email: row.EMAIL, // 邮箱
password: '', // 密码
usid: row.USID, // 用户ID
@@ -1,74 +1,79 @@
<template>
<div class="AuditOperationBox">
<el-form
ref="examineForm"
:model="examineForm"
:rules="examineFormRules"
size="medium"
class="label-input-form prc-content-border">
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="9">-->
<!-- <el-form-item label="选择赋权时间:" prop="date"-->
<!-- label-width="132px" class="add-form-item"-->
<!-- :class="{'form-item-disabled': formdisableflag}">-->
<!-- <el-date-picker-->
<!-- v-model="examineForm.date"-->
<!-- type="date"-->
<!-- placeholder="选择赋权时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="审批结果:" prop="flag"
label-width="132px" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-radio-group :disabled="formdisableflag" v-model="examineForm.flag" >
<el-radio :label="'1'">同意</el-radio>
<el-radio :label="'2'">不同意</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
<template slot="label">审批意见:</template>
<el-input :disabled="formdisableflag" :maxlength='1000'
v-model="examineForm.approvalOpinion"
placeholder="请输入审批意见"
:autosize="{ minRows: 2, maxRows: 4}"
type="textarea"
/>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="附件" prop="entStandText" label-width="132px" class="add-form-item"-->
<!-- :class="{'form-item-disabled': formdisableflag}">-->
<!-- <el-button-->
<!-- size="small"-->
<!-- class="form-upload-btn"-->
<!-- icon="el-icon-upload"-->
<!-- @click="clickButtonToUpload('approvalFile')"-->
<!-- >-->
<!-- {{ examineForm.approvalFile === 'null' || examineForm.approvalFile === '' ||-->
<!-- examineForm.approvalFile == null ? '点击上传' : '查看已上传的文件' }}-->
<!-- </el-button>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
<div class="AuditOperationBox">
<el-form
ref="examineForm"
:model="examineForm"
:rules="examineFormRules"
size="medium"
class="label-input-form prc-content-border">
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="9">-->
<!-- <el-form-item label="选择赋权时间:" prop="date"-->
<!-- label-width="132px" class="add-form-item"-->
<!-- :class="{'form-item-disabled': formdisableflag}">-->
<!-- <el-date-picker-->
<!-- v-model="examineForm.date"-->
<!-- type="date"-->
<!-- placeholder="选择赋权时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row :gutter="24">
<el-col :span="24">
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
<template slot="label">审核意见:</template>
<el-input :disabled="formdisableflag" :maxlength='1000'
v-model="examineForm.approvalOpinion"
placeholder="请输入审核意见"
:autosize="{ minRows: 2, maxRows: 4}"
type="textarea"
/>
</el-form-item>
</el-col>
</el-row>
<process-footer
v-if="!isDisable"
showCancel
:show-transfer="isShowTran"
:show-agree="isAgree"
:show-no-agree="isNoAgree"
:btyLoading="isBty"
:tyLoading="isTy"
@transfer="handleTransfer"
@submit="handleSubmit"
></process-footer>
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="附件" prop="entStandText" label-width="132px" class="add-form-item"-->
<!-- :class="{'form-item-disabled': formdisableflag}">-->
<!-- <el-button-->
<!-- size="small"-->
<!-- class="form-upload-btn"-->
<!-- icon="el-icon-upload"-->
<!-- @click="clickButtonToUpload('approvalFile')"-->
<!-- >-->
<!-- {{ examineForm.approvalFile === 'null' || examineForm.approvalFile === '' ||-->
<!-- examineForm.approvalFile == null ? '点击上传' : '查看已上传的文件' }}-->
<!-- </el-button>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
</el-form>
</div>
</div>
</template>
<script>
import processFooter from '@/components/ProcessFooter'
export default {
name: 'AuditOperation',
components:{
processFooter,
},
props: {
isDisable:{
type:Boolean,
@@ -76,11 +81,32 @@ export default {
},
examine:{
type:Object
},
taskId:{
type:String,
default:''
},
prcId:{
type:String,
default:''
},
prcType:{
type:Number,
default:''
}
},
data () {
return {
isBty:false,
isTy:false,
isNoAgree: true,
isAgree: true,
visibleTree: false,
isSubmit: false,
tranLoading: false,
isShowTran: true,
isShowSubmit: true,
examineForm: {
planReasonFile: '',
oldName: '',
@@ -92,7 +118,7 @@ export default {
{ required: true, message: '审核结果不能为空', trigger: 'change' }
],
approvalOpinion: [
{ type: 'string', max: 500, message: '审意见不能超过500个字符', trigger: 'blur' }
{ type: 'string', max: 500, message: '审意见不能超过500个字符', trigger: 'blur' }
]
},
formdisableflag: false
@@ -107,19 +133,44 @@ export default {
}
},
methods: {
handleTransfer(){
if(this.examineForm.approvalOpinion==''){
this.$message.warning("请您填写审核意见")
return
}
this.$emit('handleTransfer',this.examineForm.approvalOpinion)
},
handleSubmit(type) {
if(type=='n'){
// 校验原因是否填写
this.examineForm.flag=2
if(this.examineForm.approvalOpinion==''){
this.$message.warning("请您填写审核意见")
return
}
}else{
this.examineForm.flag=1
}
this.$emit('handleSubmit')
// if (this.$refs.operationRef.submit()) {
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
},
/** 在提交表单的校验 通过继续执行 */
submit () {
this.isSubmit = false
let v
this.$refs.examineForm.validate((valid) => {
v=valid
if (valid) {
this.isSubmit = true
return true
} else {
this.$message.warning('请检查表单是否填写正确')
return false
}
})
return v
}
}
@@ -127,11 +178,11 @@ export default {
</script>
<style scoped>
.AssignButton {
font-size: 18px;
}
.AssignButton {
font-size: 18px;
}
.AssignButton:hover {
cursor: pointer;
}
.AssignButton:hover {
cursor: pointer;
}
</style>
@@ -0,0 +1,244 @@
<template>
<div>
<el-drawer
title="编辑"
:visible.sync="isShow"
size="35%"
class="drawerLog"
:wrapperClosable="false"
@close="handleClose"
>
<el-form ref="applicationFormRef" :model="applicationForm" label-width="150px"
class="label-input-form" size="medium" :rules="applicationFormRule"
>
<el-row>
<el-col :span="22">
<el-form-item label="报告名称:" prop="name">
<el-input disabled v-model="applicationForm.name"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="报告涉密等级:" prop="confidentialLevel">
<el-input disabled v-model="applicationForm.confidentialLevel"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="报告隐私等级:" prop="privacyLevel">
<el-input disabled v-model="applicationForm.privacyLevel"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="审批人:" prop="oneApprove">
<el-input readonly :disabled="formControl" v-model="applicationForm.oneApproveName"
@click.native="handleCheck('spr1')"
placeholder="请选择审批人"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="二级审批人:" prop="twoApprove">
<el-input readonly :disabled="formControl" v-model="applicationForm.twoApproveName"
@click.native="handleCheck('spr2')"
placeholder="请选择二级审批人"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="选择申请权限:" prop="power">
<el-select :disabled="formControl" v-model="applicationForm.power" placeholder="请选择申请权限"
@change="changeType">
<el-option
v-for="item in PERMISSION"
:key="item.value"
:label="item.label"
:disabled="item.disabled"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="申请原因:" prop="applyReason">
<el-input :disabled="formControl" type="textarea" v-model="applicationForm.applyReason"
placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="done">
<el-button type="primary" size="medium" @click.native="savaCheck">确定</el-button>
<el-button type="default" size="medium" @click.native="handleClose">取消</el-button>
</div>
</el-drawer>
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
value: orgTableVal,
valueName: orgTableValName
}" :workNumFlag="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
</div>
</template>
<script>
import {PERMISSION} from '@/utils/Enum/enum'
export default {
name: "reportDrawer",
data() {
return {
isShow: false,
visibleOrgTable: false,
treeType: '',
orgTableVal: '',
orgTableValName: '',
formControl: false,
PERMISSION,
applicationForm: {},
applicationFormRule: {
applyReason: [{
max: 500, message: '申请原因最多填写500字符'
}],
power: [{
required: true,
message: '请选择申请权限'
}],
oneApprove: [{
required: true,
message: '请选择审批人',
trigger: 'change'
}],
twoApprove: [{
required: true,
message: '请选择二级审批人',
trigger: 'change'
}],
},
}
},
props: {
form: {
type: Object,
}
},
methods: {
changeType(i) {
let newItem = this.PERMISSION.filter(item=>{
if(i==item.value){
return item
}
})
this.applicationForm.powerName = newItem[0].label
this.$set( this.applicationForm,'powerName',newItem[0].label )
console.log(this.applicationForm,"报告隐私等级")
},
handleClose() {
this.isShow = false
},
open(form) {
this.isShow = true
let oldPower = form.power
if (!form.twoApprove) {
form.twoApprove = ''
form.twoApproveName = ''
form.applyReason = ''
form.prcType = ''
form.powerName=''
form.power=''
this.PERMISSION = this.PERMISSION.map(item=>{
if(item.value == oldPower){
item.disabled=true
}
return item
})
}
this.applicationForm = JSON.parse(JSON.stringify(form))
this.$nextTick(() => {
this.$refs.applicationFormRef.clearValidate()
})
},
savaCheck() {
this.$refs.applicationFormRef.validate(v => {
if (v) {
this.$emit('update', this.applicationForm)
this.isShow = false
} else {
this.$message.warning("请检查表单")
}
})
},
handleCheck(name) {
if (this.formControl) {
return false
}
this.treeType = name
this.orgTableVal = ''
this.orgTableValName = ''
if (name === 'spr1') {
this.orgTableVal = this.applicationForm.oneApprove ? this.applicationForm.oneApprove : ''
this.orgTableValName = this.applicationForm.oneApproveName ? this.applicationForm.oneApproveName : ''
} else {
this.orgTableVal = this.applicationForm.twoApprove ? this.applicationForm.twoApprove : ''
this.orgTableValName = this.applicationForm.twoApproveName ? this.applicationForm.twoApproveName : ''
}
this.visibleOrgTable = true
},
// 树点击
isTreeOk(checkedList) {
// console.log(checkedList)
const parts = []
const partsName = []
console.log(checkedList, '0009999')
checkedList.map((item, index) => {
parts.push(item.userId || item.USID)
partsName.push(item.uname)
})
if (this.treeType === 'spr1') {
this.applicationForm.oneApprove = parts.toString()
this.applicationForm.oneApproveName = partsName.toString()
} else if (this.treeType === 'spr2') {
this.applicationForm.twoApprove = parts.toString()
this.applicationForm.twoApproveName = partsName.toString()
}
// console.log(this.assignForm.name1Id, this.assignForm.name2Id)
},
}
}
</script>
<style lang="scss" scoped>
.drawerLog {
::v-deep .el-drawer__header {
padding: 10px 15px;
color: #555;
font-size: 18px;
}
.done {
position: fixed;
bottom: 20px;
right: 20px;
}
}
</style>
@@ -1,41 +1,45 @@
<template>
<div class="reportTable">
<el-button v-if="!disabled" class="addbtn" size="small" @click="addReport">添加报告</el-button>
<!-- <el-button v-if="!disabled" class="addbtn" size="small" @click="addReport">添加报告</el-button>-->
<el-button v-if="!disabled" class="delbtn" size="small" @click="deleteAll">批量删除</el-button>
<div class="table">
<vxe-table :data="processTable" :empty-render="{name: 'NotData'}" align="center" border stripe v-table-min-height="500"
<vxe-table :data="processTable" :empty-render="{name: 'NotData'}" align="center" border stripe max-height="280"
ref="xTable" @checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column show-overflow show-header-overflow field="name" title="报告名称"></vxe-column>
<!-- <vxe-column show-overflow show-header-overflow field="labelTwoName" :title="tagsForm.tags02.name"></vxe-column>-->
<!-- <vxe-column show-overflow show-header-overflow field="labelThreeName" :title="tagsForm.tags03.name"></vxe-column>-->
<vxe-column show-overflow show-header-overflow field="year" title="报告年份" width="200" ></vxe-column>
<vxe-column show-overflow show-header-overflow field="department" title="报告部门"></vxe-column>
<vxe-column show-overflow show-header-overflow field="confidentialLevel" title="涉密等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="privacyLevel" title="隐私等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="confidentialLevel" title="报告涉密等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="privacyLevel" title="报告隐私等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="oneApproveName" title="审批人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="twoApproveName" title="二级审批人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="applyReason" title="申请原因"></vxe-column>
<vxe-column show-overflow show-header-overflow field="powerName" title="申请权限"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right" v-if="!disabled">
<template #default="{ row }">
<template #default="{ row,rowIndex }">
<el-button type="text" class="" @click="editTable(row,rowIndex)">编辑</el-button>
<el-button type="text" class="del-btn" @click="reportDelete(row)">删除</el-button>
<!-- <el-button type="text" @click="downloadRow(row)">下载</el-button>-->
</template>
</vxe-column>
</vxe-table>
<el-pagination
class="pagination"
@size-change="handleLogSizeChange"
@current-change="handleLogCurrentChange"
:current-page="qLog.pageNo"
:page-sizes="[5, 10, 20]"
:page-size="qLog.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"/>
<reportDialog ref="reportDialog" :tagsForm="tagsForm" :alreadyData="value" @confirm="addReportList"></reportDialog>
<!-- <el-pagination-->
<!-- class="pagination"-->
<!-- @size-change="handleLogSizeChange"-->
<!-- @current-change="handleLogCurrentChange"-->
<!-- :current-page="qLog.pageNo"-->
<!-- :page-sizes="[5, 10, 20]"-->
<!-- :page-size="qLog.pageSize"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- :total="total"/>-->
<reportDrawer ref="reportDrawer" :isShow="editDialog" :form="form" @close="editDialog=false" @update="updateTable"></reportDrawer>
<!-- <reportDialog ref="reportDialog" :tagsForm="tagsForm" :alreadyData="value" @confirm="addReportList"></reportDialog>-->
</div>
</div>
</template>
<script>
import reportDialog from './reportDialog'
import reportDrawer from './reportDrawer'
export default {
name: 'reportTable',
props: {
@@ -50,10 +54,13 @@ export default {
}
},
components: {
reportDialog
reportDrawer
},
data () {
return {
form:{},
formIndex:0,
editDialog: false,
processTable: [],
total: 0,
qLog: {
@@ -62,50 +69,32 @@ export default {
},
copyTableData: [],
checkIds: [],
tagsForm: {
tags01: {
name: '',
parentId: '0',
type: '1',
id: '',
childList: [
// {name: '无', type: '1', id: '', parentId: ''},
]
},
tags02: {
name: '',
parentId: '0',
type: '2',
id: '',
childList: [
// {name: '无', type: '2', id: '', parentId: ''},
]
},
tags03: {
name: '',
parentId: '0',
type: '3',
id: '',
childList: [
// {name: '无', type: '3', id: '', parentId: ''},
]
}
}
}
},
watch: {
value () {
this.qLog.pageSize = 10
this.qLog.pageNo = 1
this.total = this.value.length
this.processTable = this.value.slice(0, 9)
this.pageChage(1)
// this.qLog.pageSize = 10
// this.qLog.pageNo = 1
// this.total = this.value.length
// this.processTable = this.value.slice(0, 9)
// this.pageChage(1)
this.processTable = this.value
}
},
created () {
// this.copyTableData = JSON.parse(JSON.stringify(this.tableData))
},
methods: {
updateTable(form){
this.$set(this.processTable,this.formIndex,form)
this.$emit('updateTable',this.processTable)
},
editTable(row,index) {
this.form = JSON.parse(JSON.stringify(row))
this.formIndex=index
this.$refs.reportDrawer.open(this.form)
},
addReportList (list) {
this.$nextTick(()=>{
this.$emit('updateTable', [...this.value , ...list])
+80 -72
View File
@@ -1,4 +1,3 @@
<script src="../../api/modules/process.js"></script>
<template>
<!-- 此页面主要展示审核和已完成-->
<div class="process">
@@ -7,67 +6,79 @@
<process-header v-else :title="'已办流程'" :proceesNum="prcNum"></process-header>
<div class="procedure">
<div class="process_content">
<span class="base_title">基础信息</span>
<el-form ref="processFormRef" :model="processForm" label-width="150px"
:rules="processFormRule" class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="流程名称:" prop="prcName">
<el-input readonly :disabled="formControl " v-model="processForm.prcName" @click.native="handleCheck('spr1')"
placeholder="请输入流程名称"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row>
<report-table v-model="tableData" @updateTable="(newValue)=>{tableData=newValue}" :disabled="formControl"></report-table>
</el-row>
<span class="base_title">报告基本信息</span>
<el-row>
<el-form ref="form" :model="applicationForm" label-width="150px"
class="label-input-form" size="medium" :rules="applicationFormRule"
class="label-input-form no_border" size="medium"
:disabled="formControl">
<el-row>
<el-col :span="9">
<el-form-item label="申请原因:" prop="applyReason">
<el-input type="textarea" v-model="applicationForm.applyReason" placeholder="请输入申请原因"></el-input>
<el-form-item label="上传人:" prop="createUserName">
<el-input v-model="applicationForm.createUserName" ></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="选择申请权限:" prop="power">
<el-select v-model="applicationForm.power" placeholder="请选择申请权限">
<el-option
v-for="item in PERMISSION"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="内容摘要:" prop="mainContent">
<el-input v-model="applicationForm.mainContent" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="报告涉密等级:" prop="applyReason">
<el-input v-model="applicationForm.confidentialLevel" ></el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="报告隐私等级:" prop="privacyLevel">
<el-input v-model="applicationForm.privacyLevel" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-row>
</div>
<div class="process_content">
<span class="base_title">报告权限申请信息</span>
<el-row>
<el-form ref="form" :model="applicationForm2" label-width="150px"
class="label-input-form no_border" size="medium"
:disabled="formControl">
<el-row>
<el-col :span="9">
<el-form-item label="申请原因:" prop="applyReason">
<el-input v-model="applicationForm2.applyReason" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="申请权限:" prop="powerName">
<el-input v-model="applicationForm2.powerName" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-row>
</div>
<div class="process_content" v-if="$route.query.type !=='yiban'">
<span class="base_title">审核信息</span>
<audit-operation ref="operationRef" :examine="submitjson" :is-disable="disabled"
:prcId="prcId" :prcType="prcType" :taskId="taskId" @handleSubmit="handleSubmit" @handleTransfer="handleTransfer"></audit-operation>
</div>
<div class="process_content">
<span class="base_title">审批历史</span>
<process-approval-history :prcNum="prcNum"></process-approval-history>
</div>
<!-- v-if="$route.query.type !=='yiban'"-->
<div class="process_content" v-if="$route.query.type !=='yiban'">
<span class="base_title">审核信息</span>
<audit-operation ref="operationRef" :examine="submitjson" :is-disable="disabled"></audit-operation>
</div>
</div>
<process-footer
v-if="!disabled"
showCancel
:show-transfer="isShowTran"
:show-submit="isShowSubmit"
:submitLoading="isSubmit"
:TransferLoading="tranLoading"
@transfer="handleTransfer"
@submit="handleSubmit"
></process-footer>
<!-- <process-choose-tree-->
<!-- dialog-model-->
<!-- :visible.sync="visibleTree"-->
@@ -84,6 +95,7 @@
</template>
<script>
import processHeader from '@/components/ProcessHeader'
import processFooter from '@/components/ProcessFooter'
import processChooseTree from '../../components/OrgTable'
@@ -105,25 +117,10 @@ export default {
},
data () {
return {
applicationFormRule: {
applyReason: [{
max: 500, message: '申请原因最多填写500字符'
}],
power: [{
required: true,
message: '请选择申请权限'
}]
},
processFormRule: {
prcName: [{
required: true,
message: '请输入流程名称',
trigger: 'change'
},{
max: 100,
message: '申请原因最多填写100字符',
trigger: 'change'
}]
PERMISSION,
applicationForm2:{
power:'',
applyReason:''
},
processForm: { prcName : ''},
visibleTree: false,
@@ -143,9 +140,9 @@ export default {
pageSize: 10000,
pageNo: 1
},
PERMISSION,
submitjson:{},
prcType:1
prcType:'',
application:'' //存储转办的意见
}
},
created () {
@@ -153,8 +150,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.$set(this.processForm,'prcName',this.prcName)
this.prcType=this.$store.getters.handleProcess.prcType
let params={
prcId: this.prcId,
prcType: this.prcType
@@ -164,9 +160,18 @@ export default {
}
this.getProcessDetail(params).then(res=>{
this.tableData = JSON.parse(this.processOld.dataJson)
this.$set(this.applicationForm,'power',this.tableData[0].power)
this.$set(this.applicationForm,'applyReason',this.tableData[0].applyReason)
let powerName=''
this.PERMISSION.forEach(item=>{
if(item.value== this.tableData.power ){
powerName=item.label
}
})
this.$set(this.applicationForm2,'powerName',powerName)
this.$set(this.applicationForm2,'applyReason',this.tableData.applyReason)
this.$set(this.applicationForm,'mainContent',this.tableData.mainContent)
this.$set(this.applicationForm,'privacyLevel',this.tableData.privacyLevel)
this.$set(this.applicationForm,'confidentialLevel',this.tableData.confidentialLevel)
this.$set(this.applicationForm,'createUserName',this.tableData.createUserName)
this.disabled=false
this.formControl= true
if(this.$route.query.type=='yiban'){
@@ -187,8 +192,9 @@ export default {
})
},
// 转办
handleTransfer() {
handleTransfer(type) {
this.visibleTree = true
this.application=type
},
// 选择转办
handleDblClick(treeNode) {
@@ -201,7 +207,8 @@ export default {
taskId: this.taskId,
assignee: treeNode[0].USID,
userId: this.$store.getters.userInfo.usid,
pId: this.prcId
pId: this.prcId,
approvalOpinion:this.application
}).then(() => {
this.$message.success('转办成功')
this.$router.push({path: '/userCenter/processCenter', query: {id: this.$route.query.id}})
@@ -228,7 +235,8 @@ export default {
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
prcType: this.prcType,
reportId: JSON.parse(this.processOld.dataJson).reportId
})
}
})
+148 -319
View File
@@ -1,3 +1,5 @@
<script src="../../utils/Enum/index.js"></script>
<script src="../../utils/Enum/enum.js"></script>
<template>
<div class="process">
<div class="process_box">
@@ -7,82 +9,17 @@
<div class="procedure">
<div class="process_content">
<span class="base_title">基础信息</span>
<el-form ref="processFormRef" :model="processForm" label-width="150px"
:rules="processFormRule" class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="流程名称:" prop="prcName">
<el-input :disabled="formControl || formControlname" v-model="processForm.prcName"
placeholder="请输入流程名称"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row>
<report-table v-model="tableData" @updateTable="getV" :disabled="showTableD"></report-table>
</el-row>
<el-row>
<el-form ref="applicationFormRef" :model="applicationForm" label-width="150px"
class="label-input-form" size="medium" :rules="applicationFormRule"
>
<el-row>
<el-col :span="9">
<el-form-item label="申请原因:" prop="applyReason">
<el-input :disabled="formControl" type="textarea" v-model="applicationForm.applyReason"
placeholder="请输入申请原因"></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="选择申请权限:" prop="power">
<el-select :disabled="formControl" v-model="applicationForm.power" placeholder="请选择申请权限">
<el-option
v-for="item in PERMISSION"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-row>
</div>
<div class="process_content" v-if="initShow">
<span class="base_title">审批历史</span>
<process-approval-history :prcNum="prcNum"></process-approval-history>
</div>
<div class="process_content">
<span class="base_title">指派信息</span>
<el-form ref="assignFormRef" :model="assignForm" label-width="150px"
:rules="assignFormRules" class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="选择一级审批人员:" prop="oneApprove">
<el-input readonly :disabled="formControl" v-model="assignForm.oneApproveName"
@click.native="handleCheck('spr1')"
placeholder="请选择一级审批人员"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="选择二级审批人员:" prop="twoApprove">
<el-input readonly :disabled="formControl" v-model="assignForm.twoApproveName"
@click.native="handleCheck('spr2')"
placeholder="请选择二级审批人员"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="说明:" prop="remark">
<el-input type="textarea" :disabled="formControl" v-model="assignForm.remark" placeholder="请输入说明"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
<process-footer
v-if="!formControl"
@@ -94,10 +31,7 @@
@save="handleSave"
@submit="handleSubmit"
></process-footer>
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
value: orgTableVal,
valueName: orgTableValName
}" :workNumFlag="true" :maxSelected="1" @confirm="isTreeOk"></orgTable>
</div>
</div>
</template>
@@ -107,10 +41,10 @@ import processHeader from '@/components/ProcessHeader'
import processFooter from '@/components/ProcessFooter'
import processApprovalHistory from '@/components/ProcessApprovalHistory'
import reportTable from './components/reportTable'
import {PERMISSION} from '@/utils/Enum/enum'
import orgTable from '../../components/OrgTable'
import processMixin from "../../components/ProcessMixin";
import processMixin from "../../components/ProcessMixin";
import { PERMISSION } from '@/utils/Enum/enum'
export default {
name: 'launch',
components: {
@@ -118,11 +52,11 @@ export default {
reportTable,
processFooter,
processApprovalHistory,
orgTable
},
mixins: [processMixin],
data() {
return {
PERMISSION,
delData:[],
showTableD: false,
initShow: false, // 控制审批历史是否显示 只有在不是第一次的时候才是true
@@ -135,7 +69,6 @@ export default {
isShowSave: false,
isShowSubmit: true,
formControl: false,
formControlname: false,
assignForm: {
oneApprove: '',
twoApprove: '',
@@ -152,7 +85,6 @@ export default {
pageSize: 10000,
pageNo: 1
},
PERMISSION,
processForm: {
prcName: ''
},
@@ -167,43 +99,27 @@ export default {
trigger: 'change'
}]
},
applicationFormRule: {
applyReason: [{
max: 500, message: '申请原因最多填写500字符'
}],
power: [{
required: true,
message: '请选择申请权限'
}]
},
assignFormRules: {
oneApprove: [{
required: true,
message: '请选择一级审批人员',
trigger: 'change'
}],
twoApprove: [{
required: true,
message: '请选择二级审批人员',
trigger: 'change'
}],
remark: [{
max: 500, message: '说明最多填写500字符'
}]
},
prcType: 1,
prcName:''
prcType: '',
prcName:'',
params:[] //处理好格式的数据
}
},
async created() {
// 第一次进入此页面 需要清楚校验
if (this.$route.query.isBegin) {
// if (this.$route.query.ids.split(',').length > 0) {
// this.reportList(this.$route.query.ids)
this.reportList(this.$route.query.ids)
// }
this.isShowSave = true
this.$store.commit('setHandleProcess','')
this.handleReset()
}
// 如果是从草稿进入的
if (this.$route.query.isDraft) {
@@ -212,27 +128,22 @@ 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.$set(this.processForm,'prcName', this.prcName)
let tableData = JSON.parse(this.processOld.dataJson)
this.$set(this.applicationForm,'power',tableData[0].power)
this.$set(this.applicationForm,'applyReason',tableData[0].applyReason)
if(tableData[0].reportId){
this.tableData=tableData
this.dataId= this.$store.getters.handleProcess?.dataId
this.prcType= this.$store.getters.handleProcess?.prcType
this.getProcessDetail().then(res => {
let powerName=''
let dataJson=JSON.parse(this.processOld.dataJson)
if(dataJson.power){
this.PERMISSION.forEach(item=>{
if(item.value == dataJson.power){
powerName=item.label
}
})
}
if(this.processOld.submitJson !== '{}'){
let submitJson=JSON.parse(this.processOld.submitJson)
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
}
this.$nextTick(()=>{
this.$refs.processFormRef.clearValidate()
this.$refs.applicationFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate()
})
let submitJson = JSON.parse(this.processOld.submitJson)
// this.applicationForm.applyReason = applyReason.applyReason
this.tableData.push({...dataJson,...submitJson,powerName:powerName})
})
}
@@ -244,33 +155,17 @@ export default {
this.prcName = JSON.stringify(this.prcName)
this.initShow = true
this.formControlname = true
this.$set(this.processForm,'prcName',this.$route.query.prcName)
await this.getProcessDetail()
let powerName=''
this.PERMISSION.forEach(item=>{
if(item.value == JSON.parse(this.processOld.dataJson).power ){
powerName=item.label
}
})
let submitJson = JSON.parse(this.processOld.submitJson)
// this.applicationForm.applyReason = applyReason.applyReason
this.tableData = JSON.parse(this.processOld.dataJson)
if(this.tableData.length>0){
this.$set(this.applicationForm,'power',this.tableData[0].power)
this.$set(this.applicationForm,'applyReason',this.tableData[0].applyReason)
}
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
//指派信息
// ({oneApprove:this.assignForm.oneApprove,oneApproveName:this.assignForm.oneApproveName,twoApprove:this.assignForm.twoApprove,twoApproveName:this.assignForm.twoApproveName,remark:this.assignForm.remark}= JSON.parse(this.processOld.submitJson))
// this.getProcessDetail().then(res => {
// //基础信息
// let applyReason = JSON.parse(res.processOld.dataJson)
// res.tableData = JSON.parse(res.processOld.dataJson)
// res.applicationForm.power = res.tableData[0].power
// debugger
// res.applicationForm.applyReason = applyReason[0]?.applyReason
//
// //指派信息
// ({oneApprove:res.assignForm.oneApprove,oneApproveName:res.assignForm.oneApproveName,twoApprove:res.assignForm.twoApprove,twoApproveName:res.assignForm.twoApproveName,remark:res.assignForm.remark}= JSON.parse(res.processOld.submitJson))
// })
this.tableData.push({...JSON.parse(this.processOld.dataJson),...JSON.parse(this.processOld.submitJson),powerName:powerName})
}
if (this.$route.query.type == 'yiban') {
this.taskId = this.$store.getters.handleProcess.taskId
@@ -280,25 +175,22 @@ export default {
this.formControl = true
this.initShow = true
this.showTableD = true
this.$set(this.processForm,'prcName', this.prcName)
this.getProcessDetail().then((res) => {
let submitJson = JSON.parse(this.processOld.submitJson)
// this.applicationForm.applyReason = applyReason.applyReason
this.tableData = JSON.parse(this.processOld.dataJson)
this.$set(this.applicationForm,'power',this?.tableData[0].power)
this.$set(this.applicationForm,'applyReason',this?.tableData[0].applyReason)
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
await this.getProcessDetail()
let powerName=''
this.PERMISSION.forEach(item=>{
if(item.value == JSON.parse(this.processOld.dataJson).power ){
powerName=item.label
}
})
let submitJson = JSON.parse(this.processOld.submitJson)
// this.applicationForm.applyReason = applyReason.applyReason
this.tableData.push({...JSON.parse(this.processOld.dataJson),...submitJson,powerName:powerName})
}
},
methods: {
getV(newValue,jiaVlue)
{
debugger
if(jiaVlue &&jiaVlue.length > 0){
jiaVlue.forEach(item=>{
this.delData.push({
@@ -313,61 +205,16 @@ export default {
// this.tableData=newValue;
// this.delData=jiaVlue
},
// 真删除接口
delDatas(){
return new Promise((resolve,reject)=>{
this.$api.permissionProcess.deletReport({powerApplyList:this.delData}).then(()=>{
resolve()
})
})
},
handleCheck(name) {
if (this.formControl) {
return false
}
this.treeType = name
this.orgTableVal = ''
this.orgTableValName = ''
if (name === 'spr1') {
this.orgTableVal = this.assignForm.oneApprove ? this.assignForm.oneApprove : ''
this.orgTableValName = this.assignForm.oneApproveName ? this.assignForm.oneApproveName : ''
} else {
this.orgTableVal = this.assignForm.twoApprove ? this.assignForm.twoApprove : ''
this.orgTableValName = this.assignForm.twoApproveName ? this.assignForm.twoApproveName : ''
}
this.visibleOrgTable = true
},
// 树点击
isTreeOk(checkedList) {
// console.log(checkedList)
const parts = []
const partsName = []
console.log(checkedList, '0009999')
checkedList.map((item, index) => {
parts.push(item.userId || item.USID)
partsName.push(item.uname)
})
this.qcrList = checkedList
if (this.treeType === 'spr1') {
this.assignForm.oneApprove = parts.toString()
this.assignForm.oneApproveName = partsName.toString()
} else if (this.treeType === 'spr2') {
this.assignForm.twoApprove = parts.toString()
this.assignForm.twoApproveName = partsName.toString()
}
// console.log(this.assignForm.name1Id, this.assignForm.name2Id)
},
// 获取表格列表 吧查询到的值传给子组件
reportList(ids) {
this.$api.permissionProcess.getReportLisy({
this.$api.report.reportList({
pageSize:1000,
pageNo:1,
ids: ids.split(',')
}).then(({data}) => {
this.tableData = data.records.map(item => {
item.oneApprove = item.createUserId || ''
item.oneApproveName= item.uploader || ''
item.reportId = item['id']
delete item['id']
return item
@@ -375,55 +222,75 @@ export default {
})
},
handleReset() {
this.processForm.prcName = ''
if(this.$route.query.taskDefinitionKey == 'reEdit'){
this.processForm.prcName = this.prcName
}
this.applicationForm = {
applyReason: '',
power: ''
}
this.assignForm = {
oneApprove: '',
twoApprove: ''
}
this.$nextTick(() => {
this.$refs.applicationFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate()
},
//判断表格数据是否完整
JuggleTableAll(){
let list= this.tableData.filter(item=>{
if(!item.twoApprove || item.twoApprove=='' || item.power==''){
return item
}
})
if(list.length>0){
return false
}
return true
},
// 整理数据
organizeData() {
let userId = this.$store.getters.userInfo.usid
this.tableData = this.tableData.map(item => {
item = {...item, ...this.applicationForm, userId: userId}
return item
let newParams=[]
newParams=this.tableData.map(item=>{
let obj={}
obj={
id:'',
prcName:item.name,
prcType:item.power==0?'':item.power,
createUser:this.userId,
createUserName:this.userName,
userId:this.userId,
dataJson:'',
bpnId: this.$store.getters.handleProcess?.id,
reportId: item.reportId,
}
let submitJson={
oneApprove:item.oneApprove,
oneApproveName:item.oneApproveName,
twoApprove:item.twoApprove,
twoApproveName:item.twoApproveName,
userId:this.userId,
}
delete item['oneApprove']
delete item['oneApproveName']
delete item['twoApprove']
delete item['twoApproveName']
let dataJson=item
obj.submitJson=JSON.stringify(submitJson)
obj.dataJson=JSON.stringify({...dataJson, createUser:this.userId, createUserName:this.userName})
return obj
})
if (this.initShow){
newParams[0].taskId=this.taskId
}
this.params=newParams
},
// 保存
handleSave(){
this.saveLoading = true
if(this.tableData.length > 0){
if(this.tableData.length==0){
this.$message.warning('至少需要选择一条报告数据')
return
}
// 处理表格数据
this.organizeData()
}else{
this.tableData=[{...this.applicationForm}]
}
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
let dataJson = JSON.stringify(this.tableData)
let params = {
prcName: this.processForm.prcName,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType,
createUserName: this.$store.getters.userInfo.usname,
createUser: this.$store.getters.userInfo.usid,
submitJson,
dataJson,
id: this.$store.getters.handleProcess?.id
}
this.saveProcess(params).then(
this.organizeData()
this.params=this.params.map(item=>{
item.id = this.$store.getters.handleProcess?.id
return item
})
this.saveProcessALL(this.params).then(
()=>{
this.saveLoading = false
this.$message['success']('保存成功')
@@ -440,69 +307,41 @@ export default {
},
// 提交
handleSubmit() {
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
this.$refs.assignFormRef.validate(v => {
this.$refs.applicationFormRef.validate(m => {
this.$refs.processFormRef.validate(async z => {
if (v && m && z) {
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
// 表格数据没有不能提交 需要提示
if (this.tableData.length == 0) {
this.$message.warning('至少需要选择一条报告数据')
} else {
// 调用流程数据
console.log("发送数据")
// 处理表格数据
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
// 表格数据没有不能提交 需要提示
if (this.tableData.length == 0) {
this.$message.warning('至少需要选择一条报告数据')
} else {
// 调用流程数据
console.log("发送数据")
// 处理表格数据
//如果不是第一次
if (this.initShow) {
let flag=await this.JuggleSub(this.taskId)
if(flag){
console.log(this.delData,"flagflagflagflag")
debugger
if(this.delData){
this.delDatas().then(()=>{
this.organizeData()
let dataJson = JSON.stringify(this.tableData)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
})
})
}else{
this.organizeData()
let dataJson = JSON.stringify(this.tableData)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
})
}
}
} else {
this.isSendDraft().then(()=>{
this.organizeData()
this.startProcess()
})
}
}
} else {
this.$message.warning('请检查表单填写完整')
//如果不是第一次
if (this.initShow) {
let flag= this.JuggleSub(this.taskId)
if(flag){
this.organizeData()
this.completeProcess(this.params[0])
}
})
})
})
},
//修改参数
changeParam() {
} else {
// 先判断数据完整
if(this.JuggleTableAll()){
// 完整判断草稿发起的在不在流程
if(this.$route.query.isDraft){
this.isSendDraft().then((res)=>{
this.organizeData()
this.startProcess()
})
}else{
this.organizeData()
this.startProcess()
}
}else{
this.$message.warning("请把表格数据填写完整")
}
}
}
},
// 草稿发起 需要先调用这个接口
@@ -511,7 +350,7 @@ export default {
return item.reportId
})
return new Promise((resolve,reject)=>{
this.$api.permissionProcess.selectReport({ids:ids}).then((res)=>{
this.$api.process.selectReport({usid:this.userId,ids:ids}).then((res)=>{
if(res.data.length==0){
resolve(true)
}else{
@@ -524,24 +363,14 @@ export default {
},
startProcess() {
//把表单都整合到form中
// dataJson与submitJson需要发到completeProcess
let form = {}
form = {
approveData: {
...this.applicationForm, ...this.processForm, ...this.assignForm,
userId: this.$store.getters.userInfo.usid
}, dataMsg: this.tableData
}
form.approvalOpinion = this.assignForm.remark
form.prcType = this.prcType
form.prcName = this.processForm.prcName
form.userId = this.$store.getters.userInfo.usid
form.bpnId = this.$store.getters.handleProcess?.id
//...this.applicationForm,...this.processForm,
let dataJson = JSON.stringify(this.tableData)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
this.$api.process.startProcess(form).then(({data}) => {
this.completeProcess({dataJson, submitJson, taskId: data.result, userId: form.userId, prcType: this.prcType})
this.$api.process.startProcessALL(this.params).then((res) => {
let data=res.data.result.split(',')
this.params=this.params.map((item,index)=>{
item.taskId=data[index]
return item
})
this.completeProcessALL(this.params)
})
},
//获取流程详细信息
@@ -22,10 +22,10 @@
<el-row :gutter="24">
<el-col :span="24">
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
<template slot="label">意见:</template>
<template slot="label">意见:</template>
<el-input :disabled="formdisableflag" :maxlength='1000'
v-model="examineForm.approvalOpinion"
placeholder="请输入审意见"
placeholder="请输入审意见"
:autosize="{ minRows: 2, maxRows: 4}"
type="textarea"
/>
@@ -91,7 +91,7 @@ export default {
default:''
},
prcType:{
type:String,
type:Number,
default:''
}
},
@@ -118,7 +118,7 @@ export default {
{ required: true, message: '审核结果不能为空', trigger: 'change' }
],
approvalOpinion: [
{ type: 'string', max: 500, message: '审意见不能超过500个字符', trigger: 'blur' }
{ type: 'string', max: 500, message: '审意见不能超过500个字符', trigger: 'blur' }
]
},
formdisableflag: false
@@ -134,16 +134,19 @@ export default {
},
methods: {
handleTransfer(){
debugger
this.$emit('handleTransfer')
if(this.examineForm.approvalOpinion==''){
this.$message.warning("请您填写审核意见")
return
}
this.$emit('handleTransfer',this.examineForm.approvalOpinion)
},
handleSubmit(type) {
debugger
if(type=='n'){
// 校验原因是否填写
this.examineForm.flag=2
if(this.examineForm.approvalOpinion==''){
this.$message.warning("请您填写原因")
this.$message.warning("请您填写审核意见")
return
}
}else{
@@ -3,13 +3,13 @@
<el-form ref="processFormRef" :model="form" label-width="150px"
:rules="processFormRule" class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-col :span="10">
<el-form-item label="报告名称:" prop="name">
<el-input :disabled="formControl" v-model="form.name"
placeholder="请输入报告名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-col :span="10" :offset="4">
<el-form-item label="报告年份:" prop="year">
<el-date-picker :disabled="formControl" v-model="form.year" type="year" value-format="yyyy"
placeholder="请选择报告年份"
@@ -18,17 +18,17 @@
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-col :span="10">
<el-form-item label="报告所属部门:" prop="department">
<el-input readonly :disabled="formControl" v-model="form.departmentName" @click.na.native="handleClick" placeholder="请选择报告所属部门"
<el-input readonly :disabled="formControl" v-model="form.departmentName" @click.native="handleClick" placeholder="请选择报告所属部门"
></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="标签:" prop="department">
<el-col :span="10" :offset="4">
<el-form-item label="标签:" >
<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>
@@ -37,7 +37,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="9" >
<el-col :span="10" >
<el-form-item label="报告涉密等级:" prop="confidentialLevel">
<el-select :disabled="formControl" v-model="form.confidentialLevel" placeholder="请选择报告涉密等级" @change="reportLevel">
<el-option v-for="item in privacyLevelOptions " :key="item.value" :label="item.value"
@@ -46,17 +46,17 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6" v-if="isShowTime">
<el-col :span="10" :offset="4" 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>
<el-row>
<el-col :span="9" >
<el-col :span="10" >
<el-form-item label="报告隐私等级:" prop="privacyLevel">
<el-select :disabled="formControl" v-model="form.privacyLevel" placeholder="请选择报告隐私等级">
<el-option v-for="item in confidentialLevelOptions" :key="item.value" :label="item.value"
@@ -65,7 +65,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-col :span="10" :offset="4">
<el-form-item label="关键词:" prop="tags">
<vue-tags-input :disabled="formControl" :class="{'is-diable':formControl}" placeholder="请输入关键词"
v-model="form.tags" :tags="tags"
@@ -110,9 +110,9 @@
</el-col>
<el-col :span="8">
<span class="uploadFile" v-if="form.fileName">
<span :title="fileList[0].name">{{fileList[0].name}}</span>
<i class="el-icon-cloudy iconstyle"></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,
@@ -234,29 +254,58 @@ export default {
}
},
watch: {
processForm(val) {
this.form = this.processForm
processForm:{
handler(val) {
this.form = this.processForm
console.log("变化了",this.form)
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)
})
}
},
immediate:true
}
},
methods: {
downFile(id){
if(this.formControl) return
this.$api.report.reportDownload({reportId:null,fileId:id}).then(res=>{
downloadFile(res)
})
},
handleClick(){
this.orgTableVal=this.form.department
this.orgTableValName=this.form.departmentName
if(this.form.departmentName){
this.orgTableVal=this.form.departmentId
this.orgTableValName=this.form.departmentName
}
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)
})
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 = '';
@@ -265,8 +314,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 = ''
@@ -492,6 +548,9 @@ export default {
color: #555;
cursor: pointer;
}
.fontColor{
color: #ccc;
}
}
</style>
+11 -7
View File
@@ -74,7 +74,6 @@ export default {
}]
},
processForm: { prcName : ''},
visibleTree: false,
formControl: true,
disabled:false,
@@ -90,15 +89,18 @@ export default {
},
PERMISSION,
submitjson:{},
prcType: 4
prcType: '',
application:'' //存储转办的意见
}
},
created () {
this.taskId=this.$store.getters.handleProcess.taskId
this.prcNum=this.$store.getters.handleProcess.prcNum
this.prcId=this.$store.getters.handleProcess.prcId
this.prcName=this.$store.getters.handleProcess.prcName
this.prcType = this.$store.getters.handleProcess?.prcType
let params={
prcId: this.prcId,
@@ -109,7 +111,6 @@ export default {
}
this.getProcessDetail(params).then(res=>{
this.processForm = JSON.parse(this.processOld.dataJson)
this.$set(this.processForm,'prcName',this.prcName)
this.disabled=false
this.formControl= true
if(this.$route.query.type=='yiban'){
@@ -124,8 +125,9 @@ export default {
},
methods: {
// 转办
handleTransfer() {
handleTransfer(type) {
this.visibleTree = true
this.application = type
},
// 选择转办
handleDblClick(treeNode) {
@@ -138,7 +140,8 @@ export default {
taskId: this.taskId,
assignee: treeNode[0].USID,
userId: this.$store.getters.userInfo.usid,
pId: this.prcId
pId: this.prcId,
approvalOpinion:this.application
}).then(() => {
this.$message.success('转办成功')
this.$router.push({path: '/userCenter/processCenter', query: {id: this.$route.query.id}})
@@ -166,7 +169,8 @@ export default {
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
prcType: this.prcType,
reportId: this.processOld.dataId
})
}
})
+163 -44
View File
@@ -19,7 +19,7 @@
<span class="base_title">审批历史</span>
<process-approval-history :prcNum="prcNum"></process-approval-history>
</div>
<div class="process_content">
<div class="process_content" v-if="isLevel">
<span class="base_title">指派信息</span>
<el-form ref="assignFormRef" :model="assignForm" label-width="150px"
:rules="assignFormRules" class="label-input-form" size="medium">
@@ -31,7 +31,7 @@
</el-form-item>
</el-col>
<el-col :span="9" style="margin-left: 5px">
<el-button size="medium" type="primary" @click="handleCheck('spr1')">选取</el-button>
<el-button size="medium" type="primary" class="checkBtn" @click="handleCheck('spr1')">选取</el-button>
</el-col>
</el-row>
@@ -78,7 +78,8 @@ export default {
mixins: [processMixin],
data() {
return {
isLevel: true,
dataId:'',
showTableD: false,
initShow: false, // 控制审批历史是否显示 只有在不是第一次的时候才是true
treeType: '',
@@ -110,26 +111,22 @@ export default {
trigger: 'change'
}],
},
prcType: 4,
prcName:''
prcType: '',
prcName:'',
ids:''
}
},
async created() {
// if (this.$route.query.isBegin) {
// if (this.$route.query.ids.split(',').length > 0) {
// this.reportList(this.$route.query.ids)
// }
// 如果是从草稿进入的
if (this.$route.query.isDraft) {
this.isShowSave = true
this.dataId= this.$store.getters.handleProcess.dataId
this.taskId = this.$store.getters.handleProcess?.taskId
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.prcType = this.$store.getters.handleProcess?.prcType
this.getProcessDetail().then(res => {
if(this.processOld.submitJson !== '{}'){
let submitJson=JSON.parse(this.processOld.submitJson)
this.processForm=JSON.parse(this.processOld.dataJson)
@@ -137,7 +134,6 @@ export default {
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
}
this.$nextTick(()=>{
this.$refs.processFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate()
})
})
@@ -147,6 +143,7 @@ export default {
this.taskId = this.$store.getters.handleProcess.taskId
this.prcNum = this.$store.getters.handleProcess.prcNum
this.prcId = this.$store.getters.handleProcess.prcId
this.prcType = this.$store.getters.handleProcess?.prcType
this.initShow = true
this.formControlname = true
await this.getProcessDetail()
@@ -161,6 +158,7 @@ export default {
this.taskId = this.$store.getters.handleProcess.taskId
this.prcNum = this.$store.getters.handleProcess.prcNum
this.prcId = this.$store.getters.handleProcess.prcId
this.prcType = this.$store.getters.handleProcess?.prcType
this.formControl = true
this.initShow = true
this.showTableD = true
@@ -172,13 +170,57 @@ export default {
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
})
}else{
// 第一次进入此页面 需要清楚校验
this.isShowSave = true
this.$store.commit('setHandleProcess','')
this.handleReset()
if(this.$store.getters.userInfo.levelId=='0.5'){
this.isShowSave = false
this.isLevel=false
}else{
this.isLevel = true
this.isShowSave = true
}
// 第一次进入此页面 需要依据ids区分是新增还是编辑流程
if(this.$route.query.ids){
this.prcType=5
// 调用接口
this.ids=this.$route.query.ids
// 如果该用户的levelId==5 就直接编辑 并且不显示指派信息
this.getReportDetail()
}else{
this.prcType=4
// 需要给部门带出来
if(this.$store.getters.userInfo.orgEOList.length>0){
let temp=this.$store.getters.userInfo.orgEOList
this.$set(this.processForm,'departmentName',temp[0].orgName)
this.$set(this.processForm,'department',temp[0].orgCode)
console.log(this.processForm,"wowowwoo")
}
}
}
},
methods: {
// 查询文件名称
getFileName(){
this.$api.reportProcess.searchFile({fileId:this.processForm.fileId}).then(res=>{
this.$set(this.processForm,'fileName',res.data)
})
},
// 获取报告详情
getReportDetail(){
this.$api.report.getReportDetail(this.ids).then(res=>{
this.processForm=res.data
this.processForm.reportId=this.processForm.id
if(this.isLevel){
delete this.processForm['id']
if(this.processForm.fileId){
this.getFileName()
}
}
})
},
handleReset() {
this.processForm={
departmentName:'',
@@ -204,7 +246,7 @@ export default {
twoApprove: ''
}
this.$nextTick(() => {
this.$refs.applicationFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate()
})
@@ -227,6 +269,7 @@ export default {
},
// 树点击
isTreeOk(checkedList) {
// console.log(checkedList)
const parts = []
const partsName = []
@@ -246,19 +289,25 @@ export default {
},
// 保存
handleSave(){
this.processForm=this.$refs.basMes.form
if(this.$refs.basMes.tags){
this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags)
}
this.processForm.prcName=this.processForm.name&&this.processForm.name
this.saveLoading = true
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,
createUser: this.$store.getters.userInfo.usid,
submitJson,
dataJson,
id: this.$store.getters.handleProcess?.id
id: this.$store.getters.handleProcess?.id,
reportId: this.processForm.reportId || ''
}
this.saveProcess(params).then(
()=>{
@@ -278,32 +327,100 @@ export default {
// 提交
handleSubmit() {
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.prcName=this.processForm.name
let z=this.$refs.basMes.submit()
if (v && z) {
//如果不是第一次
if (this.initShow) {
let flag=await this.JuggleSub(this.taskId)
if(flag){
let dataJson = JSON.stringify(this.processForm)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
})
}
} else {
this.startProcess()
}
} else {
if(this.isLevel){
this.$refs.assignFormRef.validate( 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) {
console.log(this.processForm,"his.processFormhis.processFormhis.processForm")
// 判断报告名称是否重复
this.$api.reportProcess.JggleName({
id:this.processForm.reportId || '',
name:this.processForm.name
}).then(async res=>{
this.processForm.createUserId=this.userId
//如果不是第一次
if (this.initShow) {
// 判断当前提交人是不是审批人
let flag=await this.JuggleSub(this.taskId)
if(flag){
let dataJson = JSON.stringify(this.processForm)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType,
reportId: this.processForm.reportId|| ''
})
}
} else {
// 如果草稿发起 判断在不在流程中
if(this.$route.query.isDraft && this.prcType==5) {
this.isSendDraft().then((res)=> {
this.startProcess()
})
}else{
this.startProcess()
}
}
})
} else {
this.$message.warning('请检查表单填写完整')
}
})
}else{
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(z){
this.processForm=this.$refs.basMes.form
this.processForm.id=this.processForm.reportId
this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags)
// 先判断名称是不是重复
this.$api.reportProcess.JggleName({
id:this.processForm.reportId || '',
name:this.processForm.name
}).then( res=>{
this.$api.report.reportAdd(this.processForm).then(_ => {
this.$message.success('操作成功');
this.$router.push({
path:"/report/manager",
query:{
id:'AEHJB8YNJ3'
}
})
})
})
}else{
this.$message.warning('请检查表单填写完整')
}
}
},
// 草稿发起 需要先调用这个接口
isSendDraft() {
let ids = this.processForm.reportId || ''
return new Promise((resolve, reject) => {
this.$api.process.selectReport({usid: this.userId, ids: [ids]}).then((res) => {
if (res.data.length == 0) {
resolve(true)
} else {
this.$message.warning("报告" + res.data.join(',') + "已经在流程中")
reject()
}
})
})
},
startProcess() {
@@ -325,7 +442,7 @@ export default {
let dataJson = JSON.stringify(this.processForm)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
this.$api.process.startProcess(form).then(({data}) => {
this.completeProcess({dataJson, submitJson, taskId: data.result, userId: form.userId, prcType: this.prcType})
this.completeProcess({dataJson, submitJson, taskId: data.result, userId: form.userId, prcType: this.prcType, reportId: this.processForm.reportId|| ''})
})
},
//获取流程详细信息
@@ -334,6 +451,8 @@ export default {
}
</script>
<style scoped>
<style lang="scss" scoped>
.checkBtn {
padding: 11px 20px !important;
}
</style>
+137 -8
View File
@@ -9,14 +9,17 @@
<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>
</template>
</el-select>
<label>流程名称</label>
<el-input v-model="form.prcName" placeholder="请输入流程名称"></el-input>
</div>
</el-col>
<el-col :span="4" align="right">
@@ -26,10 +29,39 @@
</div>
</el-col>
</el-row>
</div>
<el-row class="agreeBtn" v-if="isShowbtn">
<el-button size="small" type="primary" @click="allAgree('yes')">批量同意</el-button>
<el-button size="small" type="danger" @click="allAgree('no')">批量不同意</el-button>
</el-row>
<div class="tabs">
<tabs @clearForm="reset"/>
</div>
<el-dialog title="审核意见" width="20%" :visible.sync="dialogVisible"
@close="cancel">
<el-form ref="examineForm"
:model="approveForm"
size="medium"
class="label-input-form prc-content-border approveForm">
<el-form-item label-width="132px" class="add-form-item" prop="approvalOpinion"
:rules="[{required:flag==1?false:true,message:'请输入审核意见',trigger:'change'}]">
<template slot="label">审核意见:</template>
<el-input :maxlength='1000'
v-model="approveForm.approvalOpinion"
placeholder="请输入审核意见"
:autosize="{ minRows: 2, maxRows: 4}"
type="textarea"
/>
</el-form-item>
</el-form>
<div class="done">
<el-button size="medium" @click="cancel" class="btn">取消</el-button>
<el-button size="medium" type="primary" @click="submitForm" class="btn">确定</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -44,30 +76,114 @@ import tabs from '../userCenter/processCenter/tabs.vue'
},
data() {
return {
approveForm:{approvalOpinion:''},
approveFormRules:{
approvalOpinion:[{
required:true,
message:'请填写审核意见'
}]
},
dialogVisible:false,
form: {
prcNum:'',
prcName:''
},
checkList:[],
flag:'',//是不是同意
isShowbtn:this.$store.getters.activeTab =='' || this.$store.getters.activeTab =='first'
}
},
watch:{
// dialogVisible(value){
// if(!value && this.flag){
// this.reset()
// }
// }
},
created () {
},
mounted () {
this.$bus.$on('clearForm',()=>{
this.form={}
});
this.$bus.$on('handleClick',(data)=>{
console.log(data)
this.checkList=data
});
},
methods: {
cancel(){
this.flag = ''
this.dialogVisible=false
},
submitForm(){
this.$refs.examineForm.validate(v=>{
if(v){
this.arrangeData()
this.completeProcessALL(this.checkList)
this.dialogVisible=false
}
})
},
allAgree(type){
this.approveForm.approvalOpinion=''
if(this.checkList.length>0){
//判断选中的有没有重新发起的
let List=this.checkList.filter(item=>{
if(item.taskDefinitionKey == 'reEdit'){
return item
}
})
if(List.length>0){
this.$message("您当前选择的数据存在正处于重新发起节点的流程,请重新选择")
return
}
this.dialogVisible=true
if(type=='no'){
this.flag=2
}else{
this.flag=1
}
this.$nextTick(()=>{
this.$refs.examineForm.clearValidate()
})
}else{
this.$message.warning("请至少选择一条数据")
}
},
// 处理数据
arrangeData() {
this.checkList= this.checkList.map(item=>{
let obj={
prcType:item.prcType,
reportId:item.dataId,
taskId: item.taskId,
userId: this.userId,
submitJson:''
}
let temp=JSON.parse(item.submitJson)
temp.flag = this.flag
temp.approvalOpinion=this.approveForm.approvalOpinion
obj.submitJson =JSON.stringify(temp)
return obj
})
},
//查询
search() {
console.log(this.form)
this.$bus.$emit('getSearchItem',this.form)
this.$bus.$emit('getSearchItem',this.form)
// this.$api.processCenter.search({})
},
//重置
reset(){
reset(name){
if(name=='first'){
this.isShowbtn=true
}else{
this.isShowbtn=false
}
this.form= {
prcNum:'',
prcName:''
@@ -145,9 +261,22 @@ import tabs from '../userCenter/processCenter/tabs.vue'
}
}
.tabs{
margin: 20px 0 0 13px;
margin: 10px 0 0 13px;
}
.agreeBtn{
margin: 20px 20px 0;
}
}
.add-form-item{
margin-top: 20px;
}
.approveForm{
position: relative;
}
.done{
margin: 10px;
text-align: right;
}
</style>
@@ -12,14 +12,9 @@
<div class="blurcolor" @click="view(row)">{{row.prcNum}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="prcType"
title="流程类型">
<template #default="{ row,index }">
<div >{{getPrcName(row.prcType)}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="prcName" title="流程名称">
<vxe-column show-overflow show-header-overflow field="prcName" title="报告名称">
<template #default="{ row,index }">
<div class="blurcolor" @click="view(row)">{{row.prcName}}</div>
</template>
@@ -31,8 +26,14 @@
title="上一处理人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="creatTime" title="创建时间"></vxe-column>
<vxe-column show-overflow show-header-overflow field="endTime"
title="完成时间"></vxe-column>
<vxe-column show-overflow show-header-overflow field="status" title="状态">
title="完成日期"></vxe-column>
<vxe-column show-overflow show-header-overflow field="prcType"
title="流程类型">
<template #default="{ row,index }">
<div >{{getPrcName(row.prcType)}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="status" title="流程状态">
<template #default="{ row }">
<span v-if="row.isEnd === '0'">未完成</span>
<span v-if="row.isEnd === '1'">已完成</span>
@@ -114,6 +115,7 @@ export default {
prcNum: row.prcNum,
prcId: row.prcId,
prcName: row.prcName,
prcType: row.prcType
}
this.$store.commit('setHandleProcess',params)
switch (row.prcType) {
@@ -137,6 +139,46 @@ export default {
}
})
};break;
case '2' :
if (row.taskDefinitionKey == 'start' || row.taskDefinitionKey == 'reEdit') {
this.$router.push({
path: '/permission/launch',
query: {
id: this.$route.query.id,
type:'yiban',
taskDefinitionKey:row.taskDefinitionKey
}
})
}else{
this.$router.push({
path: '/permission/examine',
query: {
id: this.$route.query.id,
type:'yiban',
taskDefinitionKey:row.taskDefinitionKey
}
})
};break;
case '3' :
if (row.taskDefinitionKey == 'start' || row.taskDefinitionKey == 'reEdit') {
this.$router.push({
path: '/permission/launch',
query: {
id: this.$route.query.id,
type:'yiban',
taskDefinitionKey:row.taskDefinitionKey
}
})
}else{
this.$router.push({
path: '/permission/examine',
query: {
id: this.$route.query.id,
type:'yiban',
taskDefinitionKey:row.taskDefinitionKey
}
})
};break;
case '4' :
if (row.taskDefinitionKey == 'start' || row.taskDefinitionKey == 'reEdit') {
this.$router.push({
@@ -157,6 +199,26 @@ export default {
}
})
};break;
case '5' :
if (row.taskDefinitionKey == 'start' || row.taskDefinitionKey == 'reEdit') {
this.$router.push({
path: '/reportprocess/launch',
query: {
id: this.$route.query.id,
type:'yiban',
taskDefinitionKey:row.taskDefinitionKey
}
})
}else{
this.$router.push({
path: '/reportprocess/examine',
query: {
id: this.$route.query.id,
type:'yiban',
taskDefinitionKey:row.taskDefinitionKey
}
})
};break;
}
},
}
@@ -1,7 +1,11 @@
<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-table ref="xTable" :data="tableData" :empty-render="{name: 'NotData'}" align="center"
border stripe v-table-min-height="'calc(100vh - 380px)'"
@checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent">
<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 }}
@@ -13,22 +17,33 @@
<div class="blurcolor" @click="handle(row)">{{row.prcNum}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="prcName" title="报告名称">
<template #default="{ row,index }" >
<div class="blurcolor" @click="handle(row)">{{row.prcName}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="prcType"
title="流程类型">
<template #default="{ row,index }">
<div>{{getPrcName(row.prcType)}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="prcName" title="流程名称">
<template #default="{ row,index }" >
<div class="blurcolor" @click="handle(row)">{{row.prcName}}</div>
</template>
<vxe-column show-overflow show-header-overflow field="confidentialLevel" title="报告涉密等级">
</vxe-column>
<vxe-column show-overflow show-header-overflow field="privacyLevel" title="报告隐私等级">
</vxe-column>
<vxe-column show-overflow show-header-overflow field="creatUserName"
title="发起人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="creatTime" title="创建时间"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
<template #default="{ row }">
<el-button v-if="row.taskDefinitionKey!='reEdit'" @click.native.prevent="handleSubmit(row,'yes')" type="text" size="small">
同意
</el-button>
<el-button v-if="row.taskDefinitionKey!='reEdit'" @click.native.prevent="handleSubmit(row,'no')" type="text" size="small">
不同意
</el-button>
<el-button @click.native.prevent="handle(row)" type="text" size="small">
办理
</el-button>
@@ -39,6 +54,28 @@
:page-sizes="[5, 10, 20]" :page-size="q.size" layout="total, sizes, prev, pager, next, jumper"
:total="total" />
</div>
<el-dialog title="审核意见" width="20%" :visible.sync="dialogVisible" >
<el-form ref="examineForm"
:model="approveForm"
size="medium"
class="label-input-form prc-content-border approveForm">
<el-form-item label-width="132px" class="add-form-item" prop="approvalOpinion"
:rules="[{required:flag==1?false:true,message:'请输入审核意见',trigger:'change'}]">
<template slot="label">审核意见:</template>
<el-input :maxlength='1000'
v-model="approveForm.approvalOpinion"
placeholder="请输入审核意见"
:autosize="{ minRows: 2, maxRows: 4}"
type="textarea"
/>
</el-form-item>
</el-form>
<div class="done">
<el-button size="medium" @click="cancel" class="btn">取消</el-button>
<el-button size="medium" type="primary" @click="submitForm" class="btn">确定</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -49,12 +86,24 @@ export default {
mixins:[ProcessMixin],
data() {
return {
approveForm:{approvalOpinion:''},
approveFormRules:{
approvalOpinion:[{
required:true,
message:'请填写审核意见'
}]
},
dialogVisible:false,
q:{
current:1,
size:10
},
total: 0,
tableData: []
tableData: [],
checkList:[],
checkIds:[],
flag:1,
check:[]
};
},
props:{
@@ -77,6 +126,58 @@ export default {
this.loadData()
},
methods: {
cancel(){
this.dialogVisible=false
},
submitForm(){
this.$refs.examineForm.validate(v=>{
if(v){
let obj={
prcType:this.check.prcType,
reportId:this.check.dataId,
taskId: this.check.taskId,
userId: this.check.userId,
submitJson:''
}
let temp=JSON.parse(this.check.submitJson)
temp.flag = this.flag
temp.approvalOpinion=this.approveForm.approvalOpinion
obj.submitJson =JSON.stringify(temp)
this.completeProcess(obj)
this.dialogVisible=false
}
})
},
handleSubmit(row,flag){
this.approveForm.approvalOpinion=''
this.dialogVisible=true
this.check=row
if(flag=='no'){
this.flag=2
}else{
this.flag=1
}
this.$nextTick(()=>{
this.$refs.examineForm.clearValidate()
})
},
selectAllEvent({checked}) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkList = records
this.checkIds = records.map(item => {
return item.id
})
this.$bus.$emit('handleClick', this.checkList);
},
selectChangeEvent({checked}) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkList = records
this.checkIds = records.map(item => {
return item.id
})
this.$bus.$emit('handleClick', this.checkList);
},
loadData() {
let userId=this.$store.getters.userInfo.usid
this.$api.processCenter.gencyProcessPage({...this.q,...this.form,userId:userId}).then(res=>{
@@ -104,11 +205,51 @@ export default {
prcNum: row.prcNum,
prcId: row.prcId,
prcName: row.prcName,
prcType: row.prcType
}
this.$store.commit('setHandleProcess',params)
switch (row.prcType) {
case '1' :
debugger
if (row.taskDefinitionKey == 'reEdit') {
this.$router.push({
path: '/permission/launch',
query: {
id: this.$route.query.id,
taskDefinitionKey:row.taskDefinitionKey,
prcName: row.prcName
}
})
}else{
this.$router.push({
path: '/permission/examine',
query: {
id: this.$route.query.id,
taskDefinitionKey:row.taskDefinitionKey,
prcName: row.prcName
}
})
};break;
case '2' :
if (row.taskDefinitionKey == 'reEdit') {
this.$router.push({
path: '/permission/launch',
query: {
id: this.$route.query.id,
taskDefinitionKey:row.taskDefinitionKey,
prcName: row.prcName
}
})
}else{
this.$router.push({
path: '/permission/examine',
query: {
id: this.$route.query.id,
taskDefinitionKey:row.taskDefinitionKey,
prcName: row.prcName
}
})
};break;
case '3' :
if (row.taskDefinitionKey == 'reEdit') {
this.$router.push({
path: '/permission/launch',
@@ -148,6 +289,26 @@ export default {
}
})
};break;
case '5' :
if (row.taskDefinitionKey == 'start' || row.taskDefinitionKey == 'reEdit') {
this.$router.push({
path: '/reportprocess/launch',
query: {
id: this.$route.query.id,
prcName: row.prcName,
taskDefinitionKey:row.taskDefinitionKey
}
})
}else{
this.$router.push({
path: '/reportprocess/examine',
query: {
id: this.$route.query.id,
prcName: row.prcName,
taskDefinitionKey:row.taskDefinitionKey
}
})
};break;
}
},
},
@@ -167,4 +328,12 @@ export default {
padding-bottom: 10px;
}
}
.approveForm{
position: relative;
}
.done{
margin: 10px;
text-align: right;
}
</style>
@@ -13,13 +13,8 @@
<div class="blurcolor" @click="view(row)"> {{row.prcNum}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow
title="流程类型">
<template #default="{ row,index }">
<div>{{getPrcName(row.prcType)}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow title="流程名称">
<vxe-column show-overflow show-header-overflow title="报告名称">
<template #default="{ row }" >
<div class="blurcolor" @click="view(row)">{{row.prcName}}</div>
</template>
@@ -31,8 +26,14 @@
title="上一处理人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="creatTime" title="创建时间"></vxe-column>
<vxe-column show-overflow show-header-overflow field="endTime"
title="完成时间"></vxe-column>
<vxe-column show-overflow show-header-overflow field="status" title="状态">
title="完成日期"></vxe-column>
<vxe-column show-overflow show-header-overflow
title="流程类型">
<template #default="{ row,index }">
<div>{{getPrcName(row.prcType)}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="status" title="流程状态">
<template #default="{ row }">
<span v-if="row.isEnd === '0'">未完成</span>
<span v-if="row.isEnd === '1'">已完成</span>
@@ -62,7 +62,7 @@
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="approvalOpinion"
title="审意见"></vxe-column>
title="审意见"></vxe-column>
<vxe-column show-overflow show-header-overflow field="status"
title="状态">
<template #default="{ row }">
@@ -14,14 +14,8 @@
<div class="blurcolor" @click="view(row)">{{row.prcNum}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="prcType"
title="流程类型">
<template #default="{ row,index }">
<div >{{getPrcName(row.prcType)}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="prcName" title="流程名称">
<vxe-column show-overflow show-header-overflow field="prcName" title="报告名称">
<template #default="{ row,index }">
<div class="blurcolor" @click="view(row)">{{row.prcName}}</div>
</template>
@@ -33,8 +27,14 @@
title="上一处理人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="creatTime" title="创建时间"></vxe-column>
<vxe-column show-overflow show-header-overflow field="endTime"
title="完成时间"></vxe-column>
<vxe-column show-overflow show-header-overflow field="status" title="状态">
title="完成日期"></vxe-column>
<vxe-column show-overflow show-header-overflow field="prcType"
title="流程类型">
<template #default="{ row,index }">
<div >{{getPrcName(row.prcType)}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="status" title="流程状态">
<template #default="{ row }">
<span v-if="row.isEnd === '0'">未完成</span>
<span v-if="row.isEnd === '1'">已完成</span>
+1 -1
View File
@@ -59,7 +59,7 @@ export default {
},
methods: {
handleClick(tab, event) {
this.$emit('clearForm')
this.$emit('clearForm',this.activeName)
this.$store.commit('setActiveTabIndex','')
}
},
@@ -19,7 +19,7 @@
<div>{{getPrcName(row.prcType)}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="prcName" title="流程名称">
<vxe-column show-overflow show-header-overflow field="prcName" title="报告名称">
<template #default="{ row,index }" >
<div class="blurcolor" @click="handle(row)">{{row.prcName}}</div>
</template>
@@ -122,9 +122,49 @@ export default {
path: '/permission/launch',
query: {
id: this.$route.query.id,
isDraft: 1
isDraft: 1,
}
})
});break;
case '2' :
this.$router.push({
path: '/permission/launch',
query: {
id: this.$route.query.id,
isDraft: 1,
}
});break;
case '3' :
this.$router.push({
path: '/permission/launch',
query: {
id: this.$route.query.id,
isDraft: 1,
}
});break;
case '4' :
this.$router.push({
path: '/reportprocess/launch',
query: {
id: this.$route.query.id,
isDraft: 1
}
});break;
case '5' :
this.$router.push({
path: '/reportprocess/launch',
query: {
id: this.$route.query.id,
isDraft: 1
}
});break;
default:
this.$router.push({
path: '/permission/launch',
query: {
id: this.$route.query.id,
isDraft: 1,
}
});break;
}
},
},