【修改】修改传参

This commit is contained in:
zhoulingpo
2023-04-25 14:57:36 +08:00
parent 21f68b0bd8
commit fc43422f22
12 changed files with 157 additions and 88 deletions
+1 -2
View File
@@ -76,7 +76,7 @@ export default {
// 导出
exportStandard(data) {
return request({
url: '/api/historyExport',
url: '/api/task/historyExport',
method: 'get',
params: data ,
responseType:'blob'
@@ -92,7 +92,6 @@ export default {
},
// 通用流程详细信息查询
getProcessDetail( data ){
console.log(data,"datdtatdtatdatdtat")
return request({
url: '/api/queryDetail',
method: 'get',
+7 -2
View File
@@ -57,6 +57,7 @@ export default {
methods: {
handleRouter (item) {
this.$store.commit('setActiveTabIndex','')
console.log("我点击的",item)
if (item.belong == 0) {
this.$store.commit('saveMenuName', item.label)
if (this.$route.path == '/system/401Page') {
@@ -78,12 +79,16 @@ export default {
})
} else {
this.$store.commit('saveMenuName', item.label)
this.$router.push({ name: 'urlIndex', query: param })
this.$router.push({ name: 'urlIndex', query: {
id:param.id
} })
}
} else {
if (this.$route.path === item.href) return
// delete(this.$route.query.itemHref)
this.$router.push({ path: item.href, query: this.$route.query })
this.$router.push({ path: item.href, query: {
id:this.$route.query.id
} })
}
}
},
+11 -4
View File
@@ -28,7 +28,10 @@
taskId: '',
userId: '',
},
processOld:{} //存储流程的就信息
processOld:{} , //存储流程的就信息
prcId: '',
prcNum: '',
prcName:''
}
},
methods: {
@@ -101,11 +104,15 @@
})
},
// 获取流程详细信息
getProcessDetail(params){
getProcessDetail(){
return new Promise((resolve,reject)=>{
this.$api.process.getProcessDetail(params).then(res=>{
this.$api.process.getProcessDetail({
prcId: this.prcId,
prcType: this.prcType
}).then(res=>{
let data=res.data
this.processOld=data.data
this.processOld=data
console.log( this.processOld,"processOld")
resolve()
}).catch(err=>{
reject()
+2 -2
View File
@@ -2,8 +2,8 @@
import Esenum from './index.js'
// 权限申请
export const PERMISSION = new Esenum([
{ label: '预览', value: 1 },
{ label: '预览+下载', value: 2 }
{ label: '预览', value: "1" },
{ label: '预览+下载', value: "2" }
])
// 流程状态
export const PROCESSSTATE = new Esenum(
+20
View File
@@ -87,6 +87,26 @@ instance.interceptors.response.use(function (response) {
// 登录过期
if (error.response.status === 401) {
store.commit('saveUserInfo', null)
store.commit('saveUserInfo', null)
store.commit('savePathUrl', null)
store.commit('saveMenuName', null)
store.commit('saveMenuData', null)
router.push('/login')
Message.error('登录超时过期')
// window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self');
// var url = 'http://192.168.144.22:9966/login?loginType=1'
// // var url = 'http://10.64.23.30:7766/home'
//
// return window.open('http://192.168.144.29:9090/cas/login?service='+url, '_self');
// // return window.open('https://caddmuat.changan.com.cn/cas/login?service='+url, '_self');
}
// 登录过期
if (error.response.status === 500) {
store.commit('saveUserInfo', null)
store.commit('saveUserInfo', null)
store.commit('savePathUrl', null)
store.commit('saveMenuName', null)
store.commit('saveMenuData', null)
router.push('/login')
Message.error('登录超时过期')
// window.open(BASE_URL.BASE_CHANGAN + "/logout?service=" + BASE_URL.BASE_LOCAL + "/login?loginType=1", '_self');
@@ -48,8 +48,9 @@
<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="year" title="报告年份"></vxe-column>
<vxe-column show-overflow show-header-overflow field="createDate" 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="confidentialLevel" title="涉密等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="privacyLevel" title="隐私等级"></vxe-column>
</vxe-table>
<el-pagination
class="pagination"
@@ -10,12 +10,12 @@
<!-- <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="year" title="报告部门"></vxe-column>
<vxe-column show-overflow show-header-overflow field="createDate" 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="confidentialLevel" title="涉密等级"></vxe-column>
<vxe-column show-overflow show-header-overflow field="privacyLevel" title="隐私等级"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right" v-if="!disabled">
<template #default="{ row }">
<el-button type="text" class="del-btn" @click="reportDelete(row.id)">删除</el-button>
<el-button type="text" class="del-btn" @click="reportDelete(row.reportId)">删除</el-button>
<!-- <el-button type="text" @click="downloadRow(row)">下载</el-button>-->
</template>
</vxe-column>
@@ -136,13 +136,13 @@ export default {
selectAllEvent ({ checked }) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkIds = records.map(item => {
return item.id
return item.reportId
})
},
selectChangeEvent ({ checked }) {
const records = this.$refs.xTable.getCheckboxRecords()
this.checkIds = records.map(item => {
return item.id
return item.reportId
})
},
addReport () {
@@ -159,7 +159,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('updateTable', this.value.filter(item => item.id !== id))
this.$emit('updateTable', this.value.filter(item => item.reportId !== id))
})
} else {
if (Array.isArray(id)) {
@@ -168,7 +168,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('updateTable', this.value.filter(item => id.indexOf(item.id) === -1))
this.$emit('updateTable', this.value.filter(item => id.indexOf(item.reportId) === -1))
})
}
}
+43 -32
View File
@@ -56,6 +56,7 @@
</div>
</div>
<process-footer
v-if="!disabled"
showCancel
:show-transfer="isShowTran"
:show-submit="isShowSubmit"
@@ -127,32 +128,36 @@ export default {
disabled:false,
assignForm: {},
tableData: [],
applicationForm: {},
applicationForm: {
power:'',
applyReason:''
},
q: {
pageSize: 10000,
pageNo: 1
},
PERMISSION,
submitjson:{},
taskId:'',
prcNum:''
prcType:1
}
},
created () {
this.taskId=this.$route.query.taskId
this.prcNum=this.$route.query.prcNum
this.prcId=this.$route.query.prcId
this.prcName=this.$route.query.prcName
let params={
taskId: this.taskId,
prcType: 1
prcId: this.prcId,
prcType: this.prcType
}
if(this.$route.query.type=='yiban'){
this.disabled=true
}
this.getProcessDetail(params).then(res=>{
this.applicationForm.name = JSON.parse(this.processOld.dataJson).name
this.applicationForm.send = JSON.parse(this.processOld.dataJson).send
this.tableData = JSON.parse(this.processOld.dataJson).dataMsg
this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName
this.tableData = JSON.parse(this.processOld.dataJson)
this.applicationForm.power = this.tableData[0].power
this.applicationForm.applyReason = this.tableData[0].applyReason
this.processForm.prcName = this.prcName
this.disabled=false
this.formControl= true
if(this.$route.query.type=='yiban'){
@@ -167,41 +172,47 @@ export default {
},
methods: {
// 获取表格列表 吧查询到的值传给子组件
reportList (ids) {
this.$api.report.reportList({ id: ids }).then(({ data }) => {
reportList(ids) {
this.$api.report.reportList({id: ids}).then(({data}) => {
this.tableData = data.records
})
},
// 转办
handleTransfer () {
handleTransfer() {
this.visibleTree = true
},
// 选择转办
handleDblClick (treeNode) {
handleDblClick(treeNode) {
// taskId: this.$store.getters.getHandleInfo.taskId, // 任务id
// assignee: treeNode[0].userId, // 转办人
// userId: this.$store.getters.userInfo.userId, // dangqian人
// pId: this.$store.getters.getHandleInfo.prcId // 流程实例
this.$api.process.changeAssignee({
taskId:this.processOld.taskId,
assignee: treeNode[0].USID,
userId: this.$store.getters.userInfo.usid,
pId:this.processOld.pId
}).then(()=>{
this.$message.success('转办成功')
this.$router.push({path:'/processCenter',query:{id:this.$route.query.id}})
this.visibleTree = false
})
this.$api.process.changeAssignee({
taskId: this.processOld.taskId,
assignee: treeNode[0].USID,
userId: this.$store.getters.userInfo.usid,
pId: this.processOld.pId
}).then(() => {
this.$message.success('转办成功')
this.$router.push({path: '/processCenter', query: {id: this.$route.query.id}})
this.visibleTree = false
})
},
handleSubmit () {
if (this.$refs.operationRef.submit()) {
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
let submit= JSON.parse(this.processOld.submitJson)
let dataJson= JSON.parse(this.processOld.dataJson)
let submitJson= {...data , ...this.$refs.operationRef.examineForm}
this.completeProcess(dataJson,submitJson)
}
}
handleSubmit() {
// if (this.$refs.operationRef.submit()) {
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
let submit = JSON.parse(this.processOld.submitJson)
let dataJson = this.processOld.dataJson
let submitJson = JSON.stringify({...submit, ...this.$refs.operationRef.examineForm})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
})
}
}
}
</script>
+19 -14
View File
@@ -95,6 +95,7 @@
</div>
</div>
<process-footer
v-if="!formControl"
showCancel
:show-reset="isShowReset"
:show-submit="isShowSubmit"
@@ -196,8 +197,7 @@ export default {
max: 1000, message: '说明最多填写1000字符'
}]
},
taskId:'',
prcNum:''
prcType:1
}
},
created () {
@@ -210,17 +210,15 @@ export default {
}
if(this.$route.query.taskDefinitionKey == 'aid4'){
this.taskId=this.$route.query.taskId
this.prcNum=this.$route.query.prcNum
this.prcNum = this.$route.query.prcNum
this.prcId = this.$route.query.prcId
this.initShow = true
this.formControlname=true
this.getProcessDetail({
taskId: this.taskId,
prcType: 1
}).then(res =>{
this.getProcessDetail().then(res =>{
//基础信息
this.applicationForm.applyReason = JSON.parse(this.processOld.dataJson).applyReason
this.applicationForm.power = JSON.parse(this.processOld.dataJson).power
this.tableData = JSON.parse(this.processOld.dataJson).dataMsg
this.tableData = JSON.parse(this.processOld.dataJson)
this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName
//指派信息
this.assignForm=JSON.parse(this.processOld.submitJson)
@@ -228,6 +226,9 @@ export default {
}
if(this.$route.query.type=='yiban'){
this.taskId=this.$route.query.taskId
this.prcNum = this.$route.query.prcNum
this.prcId = this.$route.query.prcId
this.formControl = true
this.getProcessDetail().then(()=>{
this.applicationForm.applyReason = JSON.parse(this.processOld.dataJson).applyReason
this.applicationForm.power = JSON.parse(this.processOld.dataJson).power
@@ -330,7 +331,7 @@ export default {
if(this.initShow){
let dataJson=JSON.stringify({...this.applicationForm,...this.processForm,dataMsg:this.tableData})
let submitJson=JSON.stringify(this.assignForm)
this.completeProcess({dataJson,submitJson,taskId:this.taskId,userId:form.userId})
this.completeProcess({dataJson,submitJson,taskId:this.taskId,userId:this.$store.getters.userInfo.usid,prcType:this.prcType})
}else{
this.startProcess()
}
@@ -347,15 +348,19 @@ export default {
},
startProcess() {
//把表单都整合到form中
// dataJson与submitJson需要发到completeProcess
let form = {}
form={...this.assignForm,approveData:{...this.applicationForm,...this.processForm},dataMsg:this.tableData}
form.prcType= '1'
form={approveData:{...this.applicationForm,...this.processForm,...this.assignForm,userId:this.$store.getters.userInfo.usid},dataMsg:this.tableData}
form.prcType= this.prcType
form.prcName= this.processForm.prcName
form.userId= this.$store.getters.userInfo.usid
let dataJson=JSON.stringify({...this.applicationForm,...this.processForm,dataMsg:this.tableData})
let submitJson=JSON.stringify(this.assignForm)
//...this.applicationForm,...this.processForm,
let dataJson=JSON.stringify(this.tableData)
let submitJson=JSON.stringify({...this.assignForm,userId:this.$store.getters.userInfo.usid})
this.$api.process.startProcess(form).then( ({data}) =>{
this.completeProcess({dataJson,submitJson,taskId:data.result,userId:form.userId})
this.completeProcess({dataJson,submitJson,taskId:data.result,userId:form.userId,prcType: this.prcType})
})
},
//获取流程详细信息
@@ -24,7 +24,7 @@
<div class="blurcolor" @click="view(row)">{{row.prcName}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="creatUser"
<vxe-column show-overflow show-header-overflow field="creatUserName"
title="发起人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="taskAssignee" title="当前处理人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="taskBackAssignee"
@@ -112,6 +112,8 @@ export default {
type:'yiban',
taskDefinitionKey: row.taskDefinitionKey,
prcNum: row.prcNum,
prcId: row.prcId,
prcName: row.prcName
}
})
}else{
@@ -123,6 +125,8 @@ export default {
type:'yiban',
taskDefinitionKey: row.taskDefinitionKey,
prcNum: row.prcNum,
prcId: row.prcId ,
prcName: row.prcName
}
})
}
@@ -98,13 +98,15 @@ export default {
handle(row) {
switch (row.prcType) {
case '1' :
if (row.taskDefinitionKey == 'aid3') {
if (row.taskDefinitionKey == 'aid4') {
this.$router.push({
path: '/permission/launch',
query: {
id: 'AEHJB8YNJ3',
taskId:row.taskId,
prcNum: row.prcNum,
prcId: row.prcId,
prcName: row.prcName
}
})
}else{
@@ -114,6 +116,8 @@ export default {
id: 'AEHJB8YNJ3',
taskId:row.taskId,
prcNum: row.prcNum,
prcId: row.prcId,
prcName: row.prcName
}
})
}
@@ -8,7 +8,7 @@
</div>
<!-- <span class="flow-chart-title">{{ $route.params.processNumber }} {{ $route.params.processTypeName }} 流程图</span>-->
</div>
<div v-loading="imgLoading" class="flow-group" style="margin-top: 30px;overflow: auto;">
<div v-loading="imgLoading" class="flow-group" style="overflow: auto;">
<img :src="processStep" class="process-img">
</div>
</div>
@@ -18,16 +18,16 @@
v-if="tabsName !=='AlreadyProcess'">
调整处理人
</el-button>
<div v-if="tabsName=='AlreadyProcess'" class="alreadbtn">
<el-button
type="primary" class="inner-btn"
@click="urgeRow"
>催办</el-button>
<el-button
type="primary" class="inner-btn"
@click="exportStandard"
>导出</el-button>
</div>
<!-- <div v-if="tabsName=='AlreadyProcess'" class="alreadbtn">-->
<!-- <el-button-->
<!-- type="primary" class="inner-btn"-->
<!-- @click="urgeRow"-->
<!-- >催办</el-button>-->
<!-- <el-button-->
<!-- type="primary" class="inner-btn"-->
<!-- @click="exportStandard"-->
<!-- >导出</el-button>-->
<!-- </div>-->
</div>
<!-- <el-button-->
<!-- v-if="urgeRowFlag"-->
@@ -47,19 +47,27 @@
v-table-min-height="'calc(100% - 50px)'" max-height="95%"
@checkbox-all="selectAllEvent" @checkbox-change="selectChangeEvent">
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column show-overflow show-header-overflow field="taskId"
<vxe-column show-overflow show-header-overflow field="name"
title="任务步骤"></vxe-column>
<vxe-column show-overflow show-header-overflow field="assignee" title="任务受理人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="createTime"
title="创建时间"></vxe-column>
<vxe-column show-overflow show-header-overflow field="endTime" title="完成时间"></vxe-column>
title="创建时间">
<template #default="{ row,index }" >
{{formatDate(row.createTime,"yyyy-mm-dd hh:mm:ss")}}
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="endTime" title="完成时间">
<template #default="{ row,index }" >
{{formatDate(row.endTime?row.endTime:'',"yyyy-mm-dd hh:mm:ss")}}
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="approvalOpinion"
title="审批意见"></vxe-column>
<vxe-column show-overflow show-header-overflow field="status"
title="状态"></vxe-column>
</vxe-table>
</div>
<monitorModal ref="monitorModal"></monitorModal>
<monitorModal ref="monitorModal" :prcId="prcId"></monitorModal>
</div>
</template>
@@ -67,12 +75,14 @@
import {PROCESSSTATE} from '@/utils/Enum/enum'
import monitorModal from './monitorModal.vue'
import ProcessMixin from "@/components/ProcessMixin";
import { formatDate } from '@/utils/date'
export default {
name: 'processDetail',
mixins: [ProcessMixin],
data () {
return {
formatDate,
PROCESSSTATE,
assigneeNewLoading: false, // 调整处理人确定loading
loginPeople: '',
@@ -203,8 +213,9 @@ export default {
this.checkList = records
},
showDialog() {
if(this.checkList.length < 0){
if(this.checkList.length < 1){
this.$message.warning("至少选择一条数据")
return
}else{
let check=[]
check = this.checkList.filter(item=>{
@@ -215,7 +226,7 @@ export default {
if(check.length > 0){
this.$message.warning("请选择状态为未完成的数据")
}else{
this.$refs.monitorModal.open(this.checkIds)
this.$refs.monitorModal.open(this.checkIds,this.checkList[0].id)
}
}
},
@@ -252,7 +263,7 @@ export default {
sortWord: this.shunxu ? this.paixu : '',
shunxu: this.shunxu
}).then(res=>{
this.detailData = [{name:1,state:'1'},{name:1},{name:1},]
this.detailData = res.data
// res[res.length - 1].endTime ? this.urgeRowFlag = false : this.urgeRowFlag = true
})
},
@@ -302,8 +313,10 @@ export default {
width: 100%;
height: calc(100% - 30px);
.process-img{
//width: 100%;
//height: 100%;
height: auto;
overflow: auto;
max-width: 100%;
object-fit: none;
}
}
}