Browse Source

完善待办工作、已办工作

master
yunuo970428 2 years ago
parent
commit
de555fb592
  1. 132
      anrui-system-ui/src/views/flow/doneList.vue
  2. 149
      anrui-system-ui/src/views/flow/todoList.vue

132
anrui-system-ui/src/views/flow/doneList.vue

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

149
anrui-system-ui/src/views/flow/todoList.vue

@ -97,10 +97,7 @@
height="1%"
:before-close="closeIt"
center>
<iframe frameborder="0" id="iframe"
style="width:100%;"
:src="this.centerDialogVisible === true ? url :''"
></iframe>
<iframe frameborder="0" id="iframe" style="width:100%;" :src="this.centerDialogVisible === true ? url :''"></iframe>
</el-dialog>
<!-- End办理页面-->
@ -115,20 +112,20 @@
import flowRecords from '@/components/flow/flowRecord'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import {getFlowViewer, readXml,breakTask, businessAgree, pagerList, rejectTask, selectUrl} from '@/api/flow/todo'
import {getStorage} from "@/utils/auth";
import {flowRecord} from "@/api/workflow/finished";
import {loginDetails} from "@/api/user"
import { getFlowViewer, readXml, breakTask, businessAgree, pagerList, rejectTask, selectUrl } from '@/api/flow/todo'
import { getStorage } from '@/utils/auth'
import { flowRecord } from '@/api/workflow/finished'
import { loginDetails } from '@/api/user'
export default {
name: "",
name: '',
components: {
pageye, Pagination, flowRecords
},
data() {
return {
taskList: [],
xmlData: "",
xmlData: '',
dialogHeight: '80%',
centerDialogVisible: false, //
editDialog: false,
@ -141,9 +138,9 @@ export default {
url: '',
taskName_now: '',
loginInfo: {
userSid: '',
userSid: ''
},
agreeList: { //
agreeList: { //
businessSid: '',
comment: '',
instanceId: '',
@ -156,14 +153,14 @@ export default {
comment: '',
instanceId: '',
taskId: '',
userSid: '',
userSid: ''
},
stopList: { //
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: '',
userSid: ''
},
selectUrl_list: {
proc_def_id: '', // id
@ -174,9 +171,9 @@ export default {
current: 1,
size: 10,
params: {
proDefName: "",
startDate: "",
endDate: "",
proDefName: '',
startDate: '',
endDate: '',
userSid: ''
}
}
@ -186,72 +183,71 @@ export default {
// vuewindowpostMessagehandleMessage
window.addEventListener('message', this.handleMessage)
},
created() {
//
// this.getList()
this.init();
//
this.init()
//
},
filters: {
formatTimer: function (value) {
let date = new Date(value);
let y = date.getFullYear();
let MM = date.getMonth() + 1;
MM = MM < 10 ? "0" + MM : MM;
let d = date.getDate();
d = d < 10 ? "0" + d : d;
let h = date.getHours();
h = h < 10 ? "0" + h : h;
let m = date.getMinutes();
m = m < 10 ? "0" + m : m;
let s = date.getSeconds();
s = s < 10 ? "0" + s : s;
return y + "-" + MM + "-" + d //+ " " + h + ":" + m;
formatTimer: function(value) {
let date = new Date(value)
let y = date.getFullYear()
let MM = date.getMonth() + 1
MM = MM < 10 ? '0' + MM : MM
let d = date.getDate()
d = d < 10 ? '0' + d : d
let h = date.getHours()
h = h < 10 ? '0' + h : h
let m = date.getMinutes()
m = m < 10 ? '0' + m : m
let s = date.getSeconds()
s = s < 10 ? '0' + s : s
return y + '-' + MM + '-' + d // + " " + h + ":" + m;
}
},
methods: {
/** xml 文件 */
getModelDetail(deployId) {
var token = getStorage();
var token = getStorage()
// xml
readXml(deployId,token).then(res =>{
readXml(deployId, token).then(res => {
this.xmlData = res.data
})
},
//
getFlowViewer(procInsId){
var token = getStorage();
getFlowViewer(procInsId,token).then(res =>{
//
getFlowViewer(procInsId) {
var token = getStorage()
getFlowViewer(procInsId,token).then(res => {
this.taskList = res.data
})
},
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) {
var code= event.data.params.code;
if(code==1){
async handleMessage(event) {
var code = event.data.params.code
if (code == 1) {
this.init()
this.centerDialogVisible=false
}else if(code==2){
this.centerDialogVisible = false
} else if (code == 2) {
this.dialogHeight = event.data.params.data
this.setIframeHeight(document.getElementById('iframe'));
this.setIframeHeight(document.getElementById('iframe'))
}
},
init() {
var token = getStorage();
var token = getStorage()
loginDetails(token).then((response) => {
if (response.code === '200') {
this.loginInfo = response.data;
this.loginInfo = response.data
this.agreeList.userSid = this.loginInfo.sid
this.regectList.userSid = this.loginInfo.sid
this.stopList.userSid = this.loginInfo.sid
this.listQuery.params.userSid = this.loginInfo.sid
this.getList()
}
});
})
},
//
handleCheck(row) {
@ -280,21 +276,27 @@ export default {
taskId: row.taskId,
taskName: row.taskName,
deployId: row.deployId,
taskDefKey: row.taskDefKey,
transactState: '00', //
taskDefKey: row.taskDefKey
}
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://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)))
console.log('已办拼接url:',this.url)
console.log('已办拼接url:', this.url)
} else if (response.success && response.data.url === '') {
this.$notify({
title: '提示',
message: '请在手机端进行审核',
type: 'error',
duration: 2000
})
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000,
duration: 2000
})
}
})
@ -316,8 +318,8 @@ export default {
this.$message({
type: 'info',
message: '已取消同意'
});
});
})
})
},
//
openReject() {
@ -331,8 +333,8 @@ export default {
this.$message({
type: 'info',
message: '已取消驳回'
});
});
})
})
},
//
openStop() {
@ -346,22 +348,22 @@ export default {
this.$message({
type: 'info',
message: '已取消终止'
});
});
})
})
},
/** 同意任务 */
handleAgree() {
this.agreeList.comment = this.dialogList.comment
businessAgree(this.agreeList).then((response) => {
if (response.code === '200') {
alert("操作成功!");
alert('操作成功!')
this.refreshIt()
} else {
this.$notify({
title: '提示',
message: '操作失败',
type: 'error',
duration: 2000,
duration: 2000
})
}
})
@ -375,7 +377,7 @@ export default {
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000,
duration: 2000
})
this.refreshIt()
} else {
@ -383,7 +385,7 @@ export default {
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000,
duration: 2000
})
}
})
@ -397,7 +399,7 @@ export default {
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000,
duration: 2000
})
this.refreshIt()
} else {
@ -405,7 +407,7 @@ export default {
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000,
duration: 2000
})
}
})
@ -421,21 +423,21 @@ export default {
this.getModelDetail(row.deployId)
this.getFlowViewer(row.procInsId)
this.getFlowRecordList(row.procInsId,row.deployId)
this.editDialog = true;
this.editDialog = true
},
/** 流程流转记录 */
getFlowRecordList(procInsId, deployId) {
var token = getStorage();
var token = getStorage()
const params = {procInsId: procInsId, deployId: deployId,token: token }
flowRecord(params).then(res => {
this.flowRecordList = res.data.flowList;
this.flowRecordList = res.data.flowList
//
if (res.data.formData) {
this.formConf = res.data.formData;
this.formConf = res.data.formData
this.formConfOpen = true
}
}).catch(res => {
this.getList();
this.getList()
})
},
getList() {
@ -462,7 +464,6 @@ export default {
handleSelectionChange() {
},
indexMethod() {
return 0;
},
@ -472,7 +473,6 @@ export default {
} else {
return "el-icon-time";
}
},
setColor(val) {
if (val) {
@ -480,7 +480,6 @@ export default {
} else {
return "#b3bdbb";
}
}
}
}

Loading…
Cancel
Save