修改发起流程

This commit is contained in:
zhoulingpo
2023-04-23 14:04:52 +08:00
parent 399ef76577
commit ee5a84368d
13 changed files with 228 additions and 62 deletions
+25 -1
View File
@@ -57,6 +57,30 @@ export default {
params: data params: data
}) })
}, },
// 获取一般的数据
getAlreadData(data) {
return request({
url: '/api/haveFinishedFlowDetail',
method: 'get',
params: data
})
},
// 催办
urgePerson(data) {
return request({
url: '/api/person/personMsg/saveNew',
method: 'post',
data: data
})
},
// 导出
exportStandard(data) {
return request({
url: '/api/historyExport',
method: 'post',
params: data ,
responseType:'blob'
})
}
} }
+1
View File
@@ -56,6 +56,7 @@ export default {
}, },
methods: { methods: {
handleRouter (item) { handleRouter (item) {
this.$store.commit('setActiveTabIndex','')
if (item.belong == 0) { if (item.belong == 0) {
this.$store.commit('saveMenuName', item.label) this.$store.commit('saveMenuName', item.label)
if (this.$route.path == '/system/401Page') { if (this.$route.path == '/system/401Page') {
+4 -4
View File
@@ -8,10 +8,10 @@
data() { data() {
return { return {
processTypeList: [ processTypeList: [
// { {
// label: '法规入库流程', label: '权限申请流程',
// value: '1' value: '1'
// }, },
], ],
formDisableFlag: false, formDisableFlag: false,
pickerOptions: { pickerOptions: {
+2 -10
View File
@@ -5,7 +5,7 @@ const routes = [
component: () => import('../../views/Layout.vue'), component: () => import('../../views/Layout.vue'),
children: [ children: [
{ {
path: 'step1', path: 'launch',
name: 'urlIndex', name: 'urlIndex',
component: () => import('../../views/permissionApplication/launch'), component: () => import('../../views/permissionApplication/launch'),
meta: { meta: {
@@ -13,15 +13,7 @@ const routes = [
} }
}, },
{ {
path: 'step2', path: 'examine',
name: 'urlIndex',
component: () => import('../../views/permissionApplication/examine'),
meta: {
crumb: ['权限申请']
}
},
{
path: 'step3',
name: 'urlIndex', name: 'urlIndex',
component: () => import('../../views/permissionApplication/examine'), component: () => import('../../views/permissionApplication/examine'),
meta: { meta: {
+6 -1
View File
@@ -11,14 +11,19 @@ export default new Vuex.Store({
rememberData: null, rememberData: null,
menuData: [], menuData: [],
pathUrl: '', pathUrl: '',
menuName: '' menuName: '',
activeTab: ''
}, },
getters: { getters: {
menuData: (state) => state.menuData, menuData: (state) => state.menuData,
menuName: (state) => state.menuName, menuName: (state) => state.menuName,
userInfo: (state) => state.userInfo, userInfo: (state) => state.userInfo,
activeTab: (state) =>state.activeTab
}, },
mutations: { mutations: {
setActiveTabIndex(state, data){
state.activeTab = data
},
saveUserInfo (state, data) { saveUserInfo (state, data) {
state.userInfo = data state.userInfo = data
}, },
+1 -1
View File
@@ -332,7 +332,7 @@ export default {
}, },
permissionApp () { permissionApp () {
this.$router.push({ this.$router.push({
path: '/permission/step1', path: '/permission/launch',
query: { id: 'AEHJB8YNJ3', ids: this.checkIds.toString() } query: { id: 'AEHJB8YNJ3', ids: this.checkIds.toString() }
}) })
}, },
+22 -22
View File
@@ -44,8 +44,8 @@
:rules="assignFormRules" class="label-input-form" size="medium"> :rules="assignFormRules" class="label-input-form" size="medium">
<el-row> <el-row>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="选择一级审批人员:" prop="name1"> <el-form-item label="选择一级审批人员:" prop="oneApprove">
<el-input readonly :disabled="formControl" v-model="assignForm.name1" @click.native="handleCheck('spr1')" <el-input readonly :disabled="formControl" v-model="assignForm.oneApproveName" @click.native="handleCheck('spr1')"
placeholder="请选择一级审批人员"></el-input> placeholder="请选择一级审批人员"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -53,11 +53,11 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="9" > <el-col :span="9" >
<el-form-item label="选择二级审批人员:" prop="name2"> <el-form-item label="选择二级审批人员:" prop="twoApprove">
<el-input readonly :disabled="formControl" v-model="assignForm.name2" @click.native="handleCheck('spr2')" <el-input readonly :disabled="formControl" v-model="assignForm.twoApproveName" @click.native="handleCheck('spr2')"
placeholder="请选择二级审批人员"></el-input> placeholder="请选择二级审批人员"></el-input>
<!-- <el-input v-model="assignForm.name2" placeholder="请选择二级审批人员"></el-input>--> <!-- <el-input v-model="assignForm.twoApprove" placeholder="请选择二级审批人员"></el-input>-->
<!-- <el-select v-model="assignForm.name2"--> <!-- <el-select v-model="assignForm.twoApprove"-->
<!-- class="icon-auth"--> <!-- class="icon-auth"-->
<!-- multiple--> <!-- multiple-->
<!-- collapse-tags--> <!-- collapse-tags-->
@@ -128,8 +128,8 @@ export default {
isShowSubmit: true, isShowSubmit: true,
formControl: false, formControl: false,
assignForm: { assignForm: {
name1: '', oneApprove: '',
name2: '' twoApprove: ''
}, },
tableData: [], tableData: [],
applicationForm: {}, applicationForm: {},
@@ -148,12 +148,12 @@ export default {
}] }]
}, },
assignFormRules: { assignFormRules: {
name1: [{ oneApprove: [{
required: true, required: true,
message: '请选择一级审批人员', message: '请选择一级审批人员',
trigger: 'change' trigger: 'change'
}], }],
name2: [{ twoApprove: [{
required: true, required: true,
message: '请选择二级审批人员', message: '请选择二级审批人员',
trigger: 'change' trigger: 'change'
@@ -179,11 +179,11 @@ export default {
this.orgTableVal = '' this.orgTableVal = ''
this.orgTableValName = '' this.orgTableValName = ''
if (name === 'spr1') { if (name === 'spr1') {
this.orgTableVal = this.assignForm.name1Id this.orgTableVal = this.assignForm.Approve
this.orgTableValName = this.assignForm.name1 this.orgTableValName = this.assignForm.oneApproveName
} else { } else {
this.orgTableVal = this.assignForm.name2Id this.orgTableVal = this.assignForm.twoApprove
this.orgTableValName = this.assignForm.name2 this.orgTableValName = this.assignForm.twoApproveName
} }
this.visibleOrgTable = true this.visibleOrgTable = true
}, },
@@ -199,13 +199,13 @@ export default {
}) })
this.qcrList = checkedList this.qcrList = checkedList
if (this.treeType === 'spr1') { if (this.treeType === 'spr1') {
this.assignForm.name1Id = parts.toString() this.assignForm.oneApprove = parts.toString()
this.assignForm.name1 = partsName.toString() this.assignForm.oneApproveName = partsName.toString()
} else if (this.treeType === 'spr2') { } else if (this.treeType === 'spr2') {
this.assignForm.name2Id = parts.toString() this.assignForm.twoApprove = parts.toString()
this.assignForm.name2 = partsName.toString() this.assignForm.twoApproveName = partsName.toString()
} }
console.log(this.assignForm.name1Id, this.assignForm.name2Id) // console.log(this.assignForm.name1Id, this.assignForm.name2Id)
}, },
// 获取表格列表 吧查询到的值传给子组件 // 获取表格列表 吧查询到的值传给子组件
reportList (ids) { reportList (ids) {
@@ -217,8 +217,8 @@ export default {
this.applicationForm = { this.applicationForm = {
} }
this.assignForm = { this.assignForm = {
name1: '', oneApprove: '',
name2: '' twoApprove: ''
} }
this.$refs.applicationFormRef.clearValidate() this.$refs.applicationFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate() this.$refs.assignFormRef.clearValidate()
@@ -230,7 +230,7 @@ export default {
if (v && m) { if (v && m) {
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm // 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
// 表格数据没有不能提交 需要提示 // 表格数据没有不能提交 需要提示
if (this.tableData.length > 0) { if (this.tableData.length == 0) {
this.$message.warning('至少需要选择一条报告数据') this.$message.warning('至少需要选择一条报告数据')
} else { } else {
// 调用流程数据 // 调用流程数据
+1
View File
@@ -46,6 +46,7 @@ import tabs from '../userCenter/processCenter/tabs.vue'
created () { created () {
}, },
mounted () { mounted () {
this.$bus.$on('clearForm',()=>{ this.$bus.$on('clearForm',()=>{
this.form={} this.form={}
}); });
@@ -75,8 +75,14 @@ export default {
this.q.current = val; this.q.current = val;
this.loadData(); this.loadData();
}, },
handle() { handle(type) {
alert(111); switch (type) {
case '1' :
this.$router.push({
path:'',
query:''
})
}
}, },
}, },
beforeDestroy(){ beforeDestroy(){
@@ -78,11 +78,14 @@ export default {
this.q.current = val; this.q.current = val;
this.loadData(); this.loadData();
}, },
view() { view(row) {
this.$router.push({ this.$router.push({
path: 'monitorViews', path: 'monitorViews',
query:{ query:{
id: this.$route.query.id id: this.$route.query.id,
prcNum: row.prcNum,
prcType: row.prcType,
tabsName: 'MonitorProcess'
} }
}) })
} }
@@ -14,9 +14,20 @@
</div> </div>
<div class="action-bar"> <div class="action-bar">
<div class="btn"> <div class="btn">
<el-button type="primary" class="inner-btn" @click="showDialog"> <el-button type="primary" class="inner-btn" @click="showDialog"
v-if="tabsName !=='AlreadyProcess'">
调整处理人 调整处理人
</el-button> </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> </div>
<!-- <el-button--> <!-- <el-button-->
<!-- v-if="urgeRowFlag"--> <!-- v-if="urgeRowFlag"-->
@@ -77,8 +88,8 @@ export default {
processStep: null, processStep: null,
// 当前节点 // 当前节点
taskKey: 0, taskKey: 0,
// 当前流程类型(1待办/2已办) // 当前流程类型
processType: 1, prcType: '',
// 流程列表 // 流程列表
detailData: [], detailData: [],
taskNames: '', taskNames: '',
@@ -90,10 +101,93 @@ export default {
shunxu: '', shunxu: '',
paixu: '', paixu: '',
checkIds: [], checkIds: [],
checkList: [] checkList: [],
tabsName:'',
} }
}, },
methods: { methods: {
exportStandard (){
let exportName=''
let pramas={prcNum: this.$route.query.prcNum,
sortWord: this.shunxu ? this.paixu : '',
shunxu: this.shunxu,
exportName: exportName}
this.processTypeList.some(item=>{
if(item.value == this.prcType){
exportName=item.label
}
})
this.$api.process.exportStandard(pramas,data=>{
const disposition = data.headers['content-disposition'];
let fileName = disposition.substring(disposition.indexOf('fileName=') + 9, disposition.length);
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
var isOpera = userAgent.indexOf("Opera") > -1;
//判断是否IE浏览器
if (userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera) {
fileName = decodeUtf8(fileName)
} else {
// iso8859-1的字符转换成中文
fileName = decodeURI(escape(fileName));
// 去掉双引号
fileName = fileName.replace(/\"/g, "");
}
// console.log(fileName, 666)
function decodeUtf8(bytes) {
var encoded = "";
for (var i = 0; i < bytes.length; i++) {
encoded += '%' + bytes[i].toString(16);
}
return decodeURIComponent(encoded);
}
if (!data.data || data.data.size === 0) {
this.$message.warning("文件下载失败")
return
}
if (typeof window.navigator.msSaveBlob !== 'undefined') {
window.navigator.msSaveBlob(new Blob([data.data], {type: 'application/zip'}), fileName)
} else {
let url = window.URL.createObjectURL(new Blob([data.data], {type: 'application/zip'}))
let link = document.createElement('a')
link.style.display = 'none'
link.href = url
link.setAttribute('download', fileName)
document.body.appendChild(link)
link.click()
document.body.removeChild(link) //下载完成移除元素
window.URL.revokeObjectURL(url) //释放掉blob对象
}
})
},
urgeRow (){
if (this.checkList.length === 1 && !this.checkList[0].endTime) {
this.$confirm('您确认要催办该任务吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
}).then(() => {
this.urge(this.checkList[0])
})
} else {
this.$message.warning('请选择一条未完成的数据')
}
},
urge (row) {
let params= {
msgContent: '流程编号为' + row.prcNum + '的流程,请尽快办理。',
msgTitle: '流程编号' + row.prcNum,
userId: row.assigneeId,
msgType: 'TEXT'
}
this.$api.process.urgePerson(params,
res => {
this.processTable()
this.$message.success('催办成功')
}, e => {
})
},
selectAllEvent ({ checked }) { selectAllEvent ({ checked }) {
const records = this.$refs.xTable.getCheckboxRecords() const records = this.$refs.xTable.getCheckboxRecords()
this.checkIds = records.map(item => { this.checkIds = records.map(item => {
@@ -126,14 +220,9 @@ export default {
} }
}, },
back () { back () {
this.$router.push({ this.$store.commit('setActiveTabIndex',this.tabsName=='AlreadyProcess'?"third":"fourth" )
path: '/userCenter/processCenter',
query: {
id:'AEHJB8YNJ3',
tabsName: "fourth"
}
})
//要返回上一级 //要返回上一级
this.$router.back(-1)
}, },
// 请求转换流程图 // 请求转换流程图
processNum (row) { processNum (row) {
@@ -173,6 +262,8 @@ export default {
}, },
props: {}, props: {},
mounted () { mounted () {
this.tabsName=this.$route.query.tabsName
this.prcType=this.$route.query.prcType
this.processNum() this.processNum()
this.processTable() this.processTable()
} }
@@ -231,6 +322,9 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.alreadbtn{
display: flex;
}
} }
.back{ .back{
width: 45px; width: 45px;
@@ -10,7 +10,11 @@
</vxe-column> </vxe-column>
<vxe-column show-overflow show-header-overflow field="prcNum" <vxe-column show-overflow show-header-overflow field="prcNum"
title="流程编号"></vxe-column> title="流程编号"></vxe-column>
<vxe-column show-overflow show-header-overflow field="prcName" title="流程名称"></vxe-column> <vxe-column show-overflow show-header-overflow field="prcName" title="流程名称">
<template #default="{ row,index }">
<div @click="viewDetails(row)">{{prcName}}</div>
</template>
</vxe-column>
<vxe-column show-overflow show-header-overflow field="creatUserName" <vxe-column show-overflow show-header-overflow field="creatUserName"
title="发起人"></vxe-column> title="发起人"></vxe-column>
<vxe-column show-overflow show-header-overflow field="taskAssignee" title="当前处理人"></vxe-column> <vxe-column show-overflow show-header-overflow field="taskAssignee" title="当前处理人"></vxe-column>
@@ -22,7 +26,7 @@
<vxe-column show-overflow show-header-overflow field="status" title="状态"></vxe-column> <vxe-column show-overflow show-header-overflow field="status" title="状态"></vxe-column>
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right"> <vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
<template #default="{ row,index }"> <template #default="{ row,index }">
<el-button type="text" size="small"> <el-button type="text" size="small" @click="view(row)">
查看 查看
</el-button> </el-button>
<el-button type="text" size="small" @click="withdraw"> <el-button type="text" size="small" @click="withdraw">
@@ -67,6 +71,35 @@ export default {
this.loadData() this.loadData()
}, },
methods: { methods: {
viewDetails(row) {
const prcType = row.prcType
console.log(prcType);
this.loading = true
this.$api.getAlreadData({taskIds:row.taskIds})
.then(res=>{
switch (prcType) {
case '1':
res.isViewDetails = 1
res.prcType = prcType
res.prcNum = row.prcNum
if (res.taskDefinitionKey == 'aid1' ||
res.taskDefinitionKey == 'aid4' ) {
this.$router.push({
path: '/permission/launch',
query: res,
})
return
}
else{
this.$router.push({
path: '/permission/examine',
query: res,
})
}
}
})
},
//撤回 //撤回
withdraw(row){ withdraw(row){
this.$confirm('确认强制撤回该条数据?', '强制撤回', { this.$confirm('确认强制撤回该条数据?', '强制撤回', {
@@ -105,8 +138,16 @@ export default {
this.q.current = val; this.q.current = val;
this.loadData(); this.loadData();
}, },
view() { view(row) {
alert(111); this.$router.push({
path: 'monitorViews',
query: {
id: this.$route.query.id,
prcNum: row.prcNum,
prcType: row.prcType,
tabsName: 'AlreadyProcess'
}
})
}, },
back(index, tableData) { back(index, tableData) {
console.log('index', index); console.log('index', index);
+3 -4
View File
@@ -45,19 +45,18 @@ export default {
created () { created () {
}, },
mounted () { mounted () {
let tabName=this.$route.query.tabsName?this.$route.query.tabsName:'first' this.activeName=this.$store.getters.activeTab ?this.$store.getters.activeTab:'first'
this.activeName=tabName
}, },
methods: { methods: {
handleClick(tab, event) { handleClick(tab, event) {
this.$router.push({ this.$router.push({
path: '/userCenter/processCenter', path: '/userCenter/processCenter',
query: { query: {
id:'AEHJB8YNJ3', id:'AEHJB8YNJ3'
tabsName: this.activeName
} }
}) })
this.$emit('clearForm') this.$emit('clearForm')
this.$store.commit('setActiveTabIndex','')
} }
} }
} }