|
@ -1,4 +1,4 @@ |
|
|
<template xmlns=""> |
|
|
<template> |
|
|
<div class="app-container"> |
|
|
<div class="app-container"> |
|
|
<div class="tab-header webtop"> |
|
|
<div class="tab-header webtop"> |
|
|
<div style="text-align: right"> |
|
|
<div style="text-align: right"> |
|
@ -13,13 +13,9 @@ |
|
|
<el-input v-model="listQuery.params.proDefName" placeholder="流程名称" clearable></el-input> |
|
|
<el-input v-model="listQuery.params.proDefName" placeholder="流程名称" clearable></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="申请日期"> |
|
|
<el-form-item label="申请日期"> |
|
|
<el-date-picker v-model="listQuery.params.startDate" type="date" placeholder="选择日期" |
|
|
<el-date-picker v-model="listQuery.params.startDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker> |
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
|
format="yyyy-MM-dd"></el-date-picker> |
|
|
|
|
|
<label>至</label> |
|
|
<label>至</label> |
|
|
<el-date-picker v-model="listQuery.params.endDate" type="date" placeholder="选择日期" |
|
|
<el-date-picker v-model="listQuery.params.endDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker> |
|
|
value-format="yyyy-MM-dd" |
|
|
|
|
|
format="yyyy-MM-dd"></el-date-picker> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-button type="primary" @click="handleFilter">查询</el-button> |
|
|
<el-button type="primary" @click="handleFilter">查询</el-button> |
|
|
</el-form> |
|
|
</el-form> |
|
@ -27,12 +23,10 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="listtop"> |
|
|
<div class="listtop"> |
|
|
<div class="tit">已办任务列表</div> |
|
|
<div class="tit">已办任务列表</div> |
|
|
<pageye v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|
|
<pageye v-show="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
class="pagination" @pagination="getList"/> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<div class="listcon"> |
|
|
<div class="listcon"> |
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width:100%" |
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width:100%" @selection-change="handleSelectionChange"> |
|
|
@selection-change="handleSelectionChange"> |
|
|
|
|
|
<el-table-column width="60px" label="序号" type="index" :index="tableKey+1" align="center"/> |
|
|
<el-table-column width="60px" label="序号" type="index" :index="tableKey+1" align="center"/> |
|
|
<el-table-column width="150px" label="操作" align="center"> |
|
|
<el-table-column width="150px" label="操作" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
@ -86,9 +80,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="pages"> |
|
|
<div class="pages"> |
|
|
<div class="tit"/> |
|
|
<div class="tit"/> |
|
|
<pagination v-show="total>0" :total="total" |
|
|
<pagination v-show="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
:page.sync="listQuery.current" :limit.sync="listQuery.size" |
|
|
|
|
|
class="pagination" @pagination="getList"/> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<!-- Start查看页面 --> |
|
|
<!-- Start查看页面 --> |
|
|
<el-dialog |
|
|
<el-dialog |
|
@ -116,10 +108,10 @@ |
|
|
import flowRecords from '@/components/flow/flowRecord' |
|
|
import flowRecords from '@/components/flow/flowRecord' |
|
|
import Pagination from '@/components/pagination' |
|
|
import Pagination from '@/components/pagination' |
|
|
import pageye from '@/components/pagination/pageye' |
|
|
import pageye from '@/components/pagination/pageye' |
|
|
import {getStorage} from "@/utils/auth"; |
|
|
import { getStorage } from '@/utils/auth' |
|
|
import { revokeTask, getList, selectUrl, readXml, getFlowViewer } from '@/api/flow/todo' |
|
|
import { revokeTask, getList, selectUrl, readXml, getFlowViewer } from '@/api/flow/todo' |
|
|
import {flowRecord, revokeProcess} from "@/api/workflow/finished"; |
|
|
import { flowRecord, revokeProcess } from "@/api/workflow/finished" |
|
|
import {loginDetails} from "@/api/user" |
|
|
import { loginDetails } from '@/api/user' |
|
|
// import flow from "@/views/flow/flow"; |
|
|
// import flow from "@/views/flow/flow"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
@ -130,7 +122,7 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
taskList: [], |
|
|
taskList: [], |
|
|
xmlData: "", |
|
|
xmlData: '', |
|
|
dialogHeight: '80%', |
|
|
dialogHeight: '80%', |
|
|
isDialogVisible: false, // 撤回弹窗 |
|
|
isDialogVisible: false, // 撤回弹窗 |
|
|
centerDialogVisible: false, // 弹框 |
|
|
centerDialogVisible: false, // 弹框 |
|
@ -143,7 +135,7 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
taskName_now: '', |
|
|
taskName_now: '', |
|
|
url: '', |
|
|
url: '', |
|
|
loginInfo: { |
|
|
loginInfo: { |
|
|
userSid: '', |
|
|
userSid: '' |
|
|
}, |
|
|
}, |
|
|
// 撤回 |
|
|
// 撤回 |
|
|
revokeList: { |
|
|
revokeList: { |
|
@ -153,7 +145,7 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
userSid: '' |
|
|
userSid: '' |
|
|
}, |
|
|
}, |
|
|
dialogList: { |
|
|
dialogList: { |
|
|
comment: '', |
|
|
comment: '' |
|
|
}, |
|
|
}, |
|
|
selectUrl_list: { |
|
|
selectUrl_list: { |
|
|
proc_def_id: '', // 流程定义id |
|
|
proc_def_id: '', // 流程定义id |
|
@ -164,9 +156,9 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
current: 1, |
|
|
current: 1, |
|
|
size: 10, |
|
|
size: 10, |
|
|
params: { |
|
|
params: { |
|
|
proDefName: "", |
|
|
proDefName: '', |
|
|
startDate: "", |
|
|
startDate: '', |
|
|
endDate: "", |
|
|
endDate: '', |
|
|
userSid: '' |
|
|
userSid: '' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -183,25 +175,25 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
}, |
|
|
}, |
|
|
filters: { |
|
|
filters: { |
|
|
formatTimer: function(value) { |
|
|
formatTimer: function(value) { |
|
|
let date = new Date(value); |
|
|
let date = new Date(value) |
|
|
let y = date.getFullYear(); |
|
|
let y = date.getFullYear() |
|
|
let MM = date.getMonth() + 1; |
|
|
let MM = date.getMonth() + 1 |
|
|
MM = MM < 10 ? "0" + MM : MM; |
|
|
MM = MM < 10 ? '0' + MM : MM |
|
|
let d = date.getDate(); |
|
|
let d = date.getDate() |
|
|
d = d < 10 ? "0" + d : d; |
|
|
d = d < 10 ? '0' + d : d |
|
|
let h = date.getHours(); |
|
|
let h = date.getHours() |
|
|
h = h < 10 ? "0" + h : h; |
|
|
h = h < 10 ? '0' + h : h |
|
|
let m = date.getMinutes(); |
|
|
let m = date.getMinutes() |
|
|
m = m < 10 ? "0" + m : m; |
|
|
m = m < 10 ? '0' + m : m |
|
|
let s = date.getSeconds(); |
|
|
let s = date.getSeconds() |
|
|
s = s < 10 ? "0" + s : s; |
|
|
s = s < 10 ? '0' + s : s |
|
|
return y + "-" + MM + "-" + d //+ " " + h + ":" + m; |
|
|
return y + '-' + MM + '-' + d // + " " + h + ":" + m; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
/** xml 文件 */ |
|
|
/** xml 文件 */ |
|
|
getModelDetail(deployId) { |
|
|
getModelDetail(deployId) { |
|
|
var token = getStorage(); |
|
|
var token = getStorage() |
|
|
// 发送请求,获取xml |
|
|
// 发送请求,获取xml |
|
|
readXml(deployId, token).then(res => { |
|
|
readXml(deployId, token).then(res => { |
|
|
this.xmlData = res.data |
|
|
this.xmlData = res.data |
|
@ -209,22 +201,22 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
}, |
|
|
}, |
|
|
//已办环节的节点 |
|
|
//已办环节的节点 |
|
|
getFlowViewer(procInsId) { |
|
|
getFlowViewer(procInsId) { |
|
|
var token = getStorage(); |
|
|
var token = getStorage() |
|
|
getFlowViewer(procInsId, token).then(res => { |
|
|
getFlowViewer(procInsId, token).then(res => { |
|
|
this.taskList = res.data |
|
|
this.taskList = res.data |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
setIframeHeight(iframe) { |
|
|
setIframeHeight(iframe) { |
|
|
iframe.height = this.dialogHeight;//iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight; |
|
|
iframe.height = this.dialogHeight // iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight; |
|
|
}, |
|
|
}, |
|
|
async handleMessage(event) { |
|
|
async handleMessage(event) { |
|
|
var code= event.data.params.code; |
|
|
var code = event.data.params.code |
|
|
if (code == 1) { |
|
|
if (code == 1) { |
|
|
this.init() |
|
|
this.init() |
|
|
this.centerDialogVisible = false |
|
|
this.centerDialogVisible = false |
|
|
} else if (code == 2) { |
|
|
} else if (code == 2) { |
|
|
this.dialogHeight = event.data.params.data |
|
|
this.dialogHeight = event.data.params.data |
|
|
this.setIframeHeight(document.getElementById('iframe_done')); |
|
|
this.setIframeHeight(document.getElementById('iframe_done')) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
init() { |
|
|
init() { |
|
@ -249,20 +241,26 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
taskId: row.taskId, |
|
|
taskId: row.taskId, |
|
|
taskDefKey: row.taskDefKey, |
|
|
taskDefKey: row.taskDefKey, |
|
|
taskName: row.taskName, |
|
|
taskName: row.taskName, |
|
|
deployId: row.deployId, |
|
|
deployId: row.deployId |
|
|
transactState: '01', // 已办任务状态 |
|
|
|
|
|
} |
|
|
} |
|
|
selectUrl(this.selectUrl_list).then((response) => { |
|
|
selectUrl(this.selectUrl_list).then((response) => { |
|
|
if (response.code === '200') { |
|
|
if (response.success && response.data.url !== '') { |
|
|
// this.url = 'http://127.0.0.1:9531' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list))) |
|
|
// this.url = 'http://127.0.0.1:9531' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list))) |
|
|
this.url = 'http://anrui.yyundong.com' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list))) |
|
|
this.url = 'http://anrui.yyundong.com' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list))) |
|
|
// this.url = 'http://120.46.172.184' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list))) |
|
|
// this.url = 'http://120.46.172.184' + response.data.url + '?token=' + getStorage() + '&data=' + encodeURI((JSON.stringify(parameter_list))) |
|
|
|
|
|
} else if (response.success && response.data.url === '') { |
|
|
|
|
|
this.$notify({ |
|
|
|
|
|
title: '提示', |
|
|
|
|
|
message: '请在手机端进行审核', |
|
|
|
|
|
type: 'error', |
|
|
|
|
|
duration: 2000 |
|
|
|
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
this.$notify({ |
|
|
this.$notify({ |
|
|
title: '提示', |
|
|
title: '提示', |
|
|
message: '执行失败', |
|
|
message: '执行失败', |
|
|
type: 'error', |
|
|
type: 'error', |
|
|
duration: 2000, |
|
|
duration: 2000 |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -271,7 +269,7 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
this.revokeList.businessSid = row.processVariables.businessSid |
|
|
this.revokeList.businessSid = row.processVariables.businessSid |
|
|
this.revokeList.instanceId = row.procInsId |
|
|
this.revokeList.instanceId = row.procInsId |
|
|
this.revokeList.taskId = row.taskId |
|
|
this.revokeList.taskId = row.taskId |
|
|
this.getFlowRecordList(row.procInsId, row.deployId); |
|
|
this.getFlowRecordList(row.procInsId, row.deployId) |
|
|
this.centerDialogVisible = true |
|
|
this.centerDialogVisible = true |
|
|
// this.$router.push({path: '/todo' + '?token=' + getStorage()}) |
|
|
// this.$router.push({path: '/todo' + '?token=' + getStorage()}) |
|
|
}, |
|
|
}, |
|
@ -291,8 +289,8 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
type: 'info', |
|
|
type: 'info', |
|
|
message: '已取消删除' |
|
|
message: '已取消删除' |
|
|
}); |
|
|
}) |
|
|
}); |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** 撤回任务 */ |
|
|
/** 撤回任务 */ |
|
|
handleRevoke() { |
|
|
handleRevoke() { |
|
@ -303,7 +301,7 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
title: '提示', |
|
|
title: '提示', |
|
|
message: '执行成功', |
|
|
message: '执行成功', |
|
|
type: 'success', |
|
|
type: 'success', |
|
|
duration: 2000, |
|
|
duration: 2000 |
|
|
}) |
|
|
}) |
|
|
// this.getList(); |
|
|
// this.getList(); |
|
|
} else { |
|
|
} else { |
|
@ -311,7 +309,7 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
title: '提示', |
|
|
title: '提示', |
|
|
message: '执行失败', |
|
|
message: '执行失败', |
|
|
type: 'error', |
|
|
type: 'error', |
|
|
duration: 2000, |
|
|
duration: 2000 |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -329,22 +327,22 @@ import flowRecords from '@/components/flow/flowRecord' |
|
|
handleFlowRecord(row) { |
|
|
handleFlowRecord(row) { |
|
|
this.getModelDetail(row.deployId) |
|
|
this.getModelDetail(row.deployId) |
|
|
this.getFlowViewer(row.procInsId) |
|
|
this.getFlowViewer(row.procInsId) |
|
|
this.getFlowRecordList(row.procInsId, row.deployId); |
|
|
this.getFlowRecordList(row.procInsId, row.deployId) |
|
|
this.editDialog = true; |
|
|
this.editDialog = true |
|
|
}, |
|
|
}, |
|
|
/** 流程流转记录 */ |
|
|
/** 流程流转记录 */ |
|
|
getFlowRecordList(procInsId, deployId) { |
|
|
getFlowRecordList(procInsId, deployId) { |
|
|
var token = getStorage(); |
|
|
var token = getStorage() |
|
|
const params = { procInsId: procInsId, deployId: deployId, token: token } |
|
|
const params = { procInsId: procInsId, deployId: deployId, token: token } |
|
|
flowRecord(params).then(res => { |
|
|
flowRecord(params).then(res => { |
|
|
this.flowRecordList = res.data.flowList; |
|
|
this.flowRecordList = res.data.flowList |
|
|
// 流程过程中不存在初始化表单 直接读取的流程变量中存储的表单值 |
|
|
// 流程过程中不存在初始化表单 直接读取的流程变量中存储的表单值 |
|
|
if (res.data.formData) { |
|
|
if (res.data.formData) { |
|
|
this.formConf = res.data.formData; |
|
|
this.formConf = res.data.formData |
|
|
this.formConfOpen = true |
|
|
this.formConfOpen = true |
|
|
} |
|
|
} |
|
|
}).catch(res => { |
|
|
}).catch(res => { |
|
|
this.getList(); |
|
|
this.getList() |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getList() { |
|
|
getList() { |
|
|