修改发起流程
This commit is contained in:
@@ -57,6 +57,30 @@ export default {
|
||||
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'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleRouter (item) {
|
||||
this.$store.commit('setActiveTabIndex','')
|
||||
if (item.belong == 0) {
|
||||
this.$store.commit('saveMenuName', item.label)
|
||||
if (this.$route.path == '/system/401Page') {
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
data() {
|
||||
return {
|
||||
processTypeList: [
|
||||
// {
|
||||
// label: '法规入库流程',
|
||||
// value: '1'
|
||||
// },
|
||||
{
|
||||
label: '权限申请流程',
|
||||
value: '1'
|
||||
},
|
||||
],
|
||||
formDisableFlag: false,
|
||||
pickerOptions: {
|
||||
|
||||
@@ -5,7 +5,7 @@ const routes = [
|
||||
component: () => import('../../views/Layout.vue'),
|
||||
children: [
|
||||
{
|
||||
path: 'step1',
|
||||
path: 'launch',
|
||||
name: 'urlIndex',
|
||||
component: () => import('../../views/permissionApplication/launch'),
|
||||
meta: {
|
||||
@@ -13,15 +13,7 @@ const routes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'step2',
|
||||
name: 'urlIndex',
|
||||
component: () => import('../../views/permissionApplication/examine'),
|
||||
meta: {
|
||||
crumb: ['权限申请']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'step3',
|
||||
path: 'examine',
|
||||
name: 'urlIndex',
|
||||
component: () => import('../../views/permissionApplication/examine'),
|
||||
meta: {
|
||||
|
||||
+6
-1
@@ -11,14 +11,19 @@ export default new Vuex.Store({
|
||||
rememberData: null,
|
||||
menuData: [],
|
||||
pathUrl: '',
|
||||
menuName: ''
|
||||
menuName: '',
|
||||
activeTab: ''
|
||||
},
|
||||
getters: {
|
||||
menuData: (state) => state.menuData,
|
||||
menuName: (state) => state.menuName,
|
||||
userInfo: (state) => state.userInfo,
|
||||
activeTab: (state) =>state.activeTab
|
||||
},
|
||||
mutations: {
|
||||
setActiveTabIndex(state, data){
|
||||
state.activeTab = data
|
||||
},
|
||||
saveUserInfo (state, data) {
|
||||
state.userInfo = data
|
||||
},
|
||||
|
||||
@@ -332,7 +332,7 @@ export default {
|
||||
},
|
||||
permissionApp () {
|
||||
this.$router.push({
|
||||
path: '/permission/step1',
|
||||
path: '/permission/launch',
|
||||
query: { id: 'AEHJB8YNJ3', ids: this.checkIds.toString() }
|
||||
})
|
||||
},
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
:rules="assignFormRules" class="label-input-form" size="medium">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="选择一级审批人员:" prop="name1">
|
||||
<el-input readonly :disabled="formControl" v-model="assignForm.name1" @click.native="handleCheck('spr1')"
|
||||
<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>
|
||||
@@ -53,11 +53,11 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="9" >
|
||||
<el-form-item label="选择二级审批人员:" prop="name2">
|
||||
<el-input readonly :disabled="formControl" v-model="assignForm.name2" @click.native="handleCheck('spr2')"
|
||||
<el-form-item label="选择二级审批人员:" prop="twoApprove">
|
||||
<el-input readonly :disabled="formControl" v-model="assignForm.twoApproveName" @click.native="handleCheck('spr2')"
|
||||
placeholder="请选择二级审批人员"></el-input>
|
||||
<!-- <el-input v-model="assignForm.name2" placeholder="请选择二级审批人员"></el-input>-->
|
||||
<!-- <el-select v-model="assignForm.name2"-->
|
||||
<!-- <el-input v-model="assignForm.twoApprove" placeholder="请选择二级审批人员"></el-input>-->
|
||||
<!-- <el-select v-model="assignForm.twoApprove"-->
|
||||
<!-- class="icon-auth"-->
|
||||
<!-- multiple-->
|
||||
<!-- collapse-tags-->
|
||||
@@ -128,8 +128,8 @@ export default {
|
||||
isShowSubmit: true,
|
||||
formControl: false,
|
||||
assignForm: {
|
||||
name1: '',
|
||||
name2: ''
|
||||
oneApprove: '',
|
||||
twoApprove: ''
|
||||
},
|
||||
tableData: [],
|
||||
applicationForm: {},
|
||||
@@ -148,12 +148,12 @@ export default {
|
||||
}]
|
||||
},
|
||||
assignFormRules: {
|
||||
name1: [{
|
||||
oneApprove: [{
|
||||
required: true,
|
||||
message: '请选择一级审批人员',
|
||||
trigger: 'change'
|
||||
}],
|
||||
name2: [{
|
||||
twoApprove: [{
|
||||
required: true,
|
||||
message: '请选择二级审批人员',
|
||||
trigger: 'change'
|
||||
@@ -179,11 +179,11 @@ export default {
|
||||
this.orgTableVal = ''
|
||||
this.orgTableValName = ''
|
||||
if (name === 'spr1') {
|
||||
this.orgTableVal = this.assignForm.name1Id
|
||||
this.orgTableValName = this.assignForm.name1
|
||||
this.orgTableVal = this.assignForm.Approve
|
||||
this.orgTableValName = this.assignForm.oneApproveName
|
||||
} else {
|
||||
this.orgTableVal = this.assignForm.name2Id
|
||||
this.orgTableValName = this.assignForm.name2
|
||||
this.orgTableVal = this.assignForm.twoApprove
|
||||
this.orgTableValName = this.assignForm.twoApproveName
|
||||
}
|
||||
this.visibleOrgTable = true
|
||||
},
|
||||
@@ -199,13 +199,13 @@ export default {
|
||||
})
|
||||
this.qcrList = checkedList
|
||||
if (this.treeType === 'spr1') {
|
||||
this.assignForm.name1Id = parts.toString()
|
||||
this.assignForm.name1 = partsName.toString()
|
||||
this.assignForm.oneApprove = parts.toString()
|
||||
this.assignForm.oneApproveName = partsName.toString()
|
||||
} else if (this.treeType === 'spr2') {
|
||||
this.assignForm.name2Id = parts.toString()
|
||||
this.assignForm.name2 = partsName.toString()
|
||||
this.assignForm.twoApprove = parts.toString()
|
||||
this.assignForm.twoApproveName = partsName.toString()
|
||||
}
|
||||
console.log(this.assignForm.name1Id, this.assignForm.name2Id)
|
||||
// console.log(this.assignForm.name1Id, this.assignForm.name2Id)
|
||||
},
|
||||
// 获取表格列表 吧查询到的值传给子组件
|
||||
reportList (ids) {
|
||||
@@ -217,8 +217,8 @@ export default {
|
||||
this.applicationForm = {
|
||||
}
|
||||
this.assignForm = {
|
||||
name1: '',
|
||||
name2: ''
|
||||
oneApprove: '',
|
||||
twoApprove: ''
|
||||
}
|
||||
this.$refs.applicationFormRef.clearValidate()
|
||||
this.$refs.assignFormRef.clearValidate()
|
||||
@@ -230,7 +230,7 @@ export default {
|
||||
if (v && m) {
|
||||
// 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
|
||||
// 表格数据没有不能提交 需要提示
|
||||
if (this.tableData.length > 0) {
|
||||
if (this.tableData.length == 0) {
|
||||
this.$message.warning('至少需要选择一条报告数据')
|
||||
} else {
|
||||
// 调用流程数据
|
||||
|
||||
@@ -46,6 +46,7 @@ import tabs from '../userCenter/processCenter/tabs.vue'
|
||||
created () {
|
||||
},
|
||||
mounted () {
|
||||
|
||||
this.$bus.$on('clearForm',()=>{
|
||||
this.form={}
|
||||
});
|
||||
|
||||
@@ -75,8 +75,14 @@ export default {
|
||||
this.q.current = val;
|
||||
this.loadData();
|
||||
},
|
||||
handle() {
|
||||
alert(111);
|
||||
handle(type) {
|
||||
switch (type) {
|
||||
case '1' :
|
||||
this.$router.push({
|
||||
path:'',
|
||||
query:''
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
beforeDestroy(){
|
||||
|
||||
@@ -78,11 +78,14 @@ export default {
|
||||
this.q.current = val;
|
||||
this.loadData();
|
||||
},
|
||||
view() {
|
||||
view(row) {
|
||||
this.$router.push({
|
||||
path: 'monitorViews',
|
||||
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 class="action-bar">
|
||||
<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>
|
||||
<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"-->
|
||||
@@ -77,8 +88,8 @@ export default {
|
||||
processStep: null,
|
||||
// 当前节点
|
||||
taskKey: 0,
|
||||
// 当前流程类型(1待办/2已办)
|
||||
processType: 1,
|
||||
// 当前流程类型
|
||||
prcType: '',
|
||||
// 流程列表
|
||||
detailData: [],
|
||||
taskNames: '',
|
||||
@@ -90,10 +101,93 @@ export default {
|
||||
shunxu: '',
|
||||
paixu: '',
|
||||
checkIds: [],
|
||||
checkList: []
|
||||
checkList: [],
|
||||
tabsName:'',
|
||||
|
||||
}
|
||||
},
|
||||
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 }) {
|
||||
const records = this.$refs.xTable.getCheckboxRecords()
|
||||
this.checkIds = records.map(item => {
|
||||
@@ -126,14 +220,9 @@ export default {
|
||||
}
|
||||
},
|
||||
back () {
|
||||
this.$router.push({
|
||||
path: '/userCenter/processCenter',
|
||||
query: {
|
||||
id:'AEHJB8YNJ3',
|
||||
tabsName: "fourth"
|
||||
}
|
||||
})
|
||||
this.$store.commit('setActiveTabIndex',this.tabsName=='AlreadyProcess'?"third":"fourth" )
|
||||
//要返回上一级
|
||||
this.$router.back(-1)
|
||||
},
|
||||
// 请求转换流程图
|
||||
processNum (row) {
|
||||
@@ -173,6 +262,8 @@ export default {
|
||||
},
|
||||
props: {},
|
||||
mounted () {
|
||||
this.tabsName=this.$route.query.tabsName
|
||||
this.prcType=this.$route.query.prcType
|
||||
this.processNum()
|
||||
this.processTable()
|
||||
}
|
||||
@@ -231,6 +322,9 @@ export default {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.alreadbtn{
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.back{
|
||||
width: 45px;
|
||||
|
||||
@@ -10,7 +10,11 @@
|
||||
</vxe-column>
|
||||
<vxe-column show-overflow show-header-overflow field="prcNum"
|
||||
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"
|
||||
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 title="操作" width="200" fixed="right">
|
||||
<template #default="{ row,index }">
|
||||
<el-button type="text" size="small">
|
||||
<el-button type="text" size="small" @click="view(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button type="text" size="small" @click="withdraw">
|
||||
@@ -67,6 +71,35 @@ export default {
|
||||
this.loadData()
|
||||
},
|
||||
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){
|
||||
this.$confirm('确认强制撤回该条数据?', '强制撤回', {
|
||||
@@ -105,8 +138,16 @@ export default {
|
||||
this.q.current = val;
|
||||
this.loadData();
|
||||
},
|
||||
view() {
|
||||
alert(111);
|
||||
view(row) {
|
||||
this.$router.push({
|
||||
path: 'monitorViews',
|
||||
query: {
|
||||
id: this.$route.query.id,
|
||||
prcNum: row.prcNum,
|
||||
prcType: row.prcType,
|
||||
tabsName: 'AlreadyProcess'
|
||||
}
|
||||
})
|
||||
},
|
||||
back(index, tableData) {
|
||||
console.log('index', index);
|
||||
|
||||
@@ -45,19 +45,18 @@ export default {
|
||||
created () {
|
||||
},
|
||||
mounted () {
|
||||
let tabName=this.$route.query.tabsName?this.$route.query.tabsName:'first'
|
||||
this.activeName=tabName
|
||||
this.activeName=this.$store.getters.activeTab ?this.$store.getters.activeTab:'first'
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
this.$router.push({
|
||||
path: '/userCenter/processCenter',
|
||||
query: {
|
||||
id:'AEHJB8YNJ3',
|
||||
tabsName: this.activeName
|
||||
id:'AEHJB8YNJ3'
|
||||
}
|
||||
})
|
||||
this.$emit('clearForm')
|
||||
this.$store.commit('setActiveTabIndex','')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user