修改流程

This commit is contained in:
qq787203167
2022-03-07 17:10:29 +08:00
parent 9d68982eca
commit 4434cf6384
5 changed files with 455 additions and 202 deletions
+2 -1
View File
@@ -498,5 +498,6 @@ module.exports = {
ProcessingTime:'Processing time',
cutoffTime:'cut-off time',
ProcessStatus:'Process status',
CompletionTime:'Completion time'
CompletionTime:'Completion time',
draft:'draft',
}
+1
View File
@@ -503,4 +503,5 @@ module.exports = {
cutoffTime:'截止时间',
ProcessStatus:'流程状态',
CompletionTime:'完成时间',
draft:'草稿',
}
@@ -16,14 +16,15 @@
import AlreadyProcess from './tabComponents/alreadyProcess'
import AlreadySend from './tabComponents/alreadySend'
import MonitorProcess from './tabComponents/monitorProcess'
import TaskDraft from './tabComponents/taskDraft'
export default {
name: 'index',
components: {
ProcessCenter,
AlreadyProcess,
AlreadySend,
MonitorProcess
MonitorProcess,
TaskDraft
},
data() {
return {
@@ -44,7 +45,12 @@
{
title: this.$t('monitoringProcess'),
name: 'MonitorProcess'
}]
},
{
title: this.$t('draft'),
name: 'TaskDraft'
},
]
}
},
mounted() {
@@ -1,213 +1,190 @@
<!--监控流程-->
<template>
<div>3333</div>
<div class="box">
<a-table
class="table"
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
>
</a-table>
<div class="page" v-if="dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
</template>
<script>
export default {
name: 'MonitorProcess',
data() {
return {
searchForm: {},
total: 0,
pageNo: 1,
rows: 10,
loading: false,
formLabelWidth: '80px',
tableHeight: null,
// 列表数据
processList: [],
// 流程类型
processTypeList: {
'1': '点检流程',
'2': '法规更新流程',
'3': '企标立项流程',
'4': '子公司立项流程',
'5': '企业标准制修订实施流程',
'6': '子公司制修订实施流程',
'7': '文件评估流程',
},
// 流程状态
processStateList: [
{
label: '待发起',
value: '0'
},
{
label: '审批中',
value: '1'
},
{
label: '已完成',
value: '2'
}
]
}
},
methods: {
// 新建流程跳转
createProcess() {
this.$store.commit('setDetailMap', this.$route.path)
this.$router.push({
path: '/newProcess'
})
},
rejectTaskToStart(row) {
this.$confirm(this.$t('m.ThisOperationWillBeForcedToWithdraw'), this.$t('m.prompt'), {
confirmButtonText: this.$t('m.determine'),
cancelButtonText: this.$t('m.cancel'),
type: 'warning'
}).then(() => {
this.$http.post('activiti/busProcess/processRevocation', {processId: row.id, flag: 1}
, {
_this: this
}, res => {
if (res.ok) {
this.$message({
type: 'success',
message: this.$t('m.WithdrawalSuccessful')
})
}
this.queryProcess()
}, e => {
})
}).catch(() => {
this.$message({
type: 'info',
message: this.$t('m.MandatoryWithdrawalCancelled')
})
})
},
getFlowByUser() {
this.$http.get('activiti/busProcess/FlowByUser', {}
, {
_this: this
}, res => {
this.userTypeList = res.data
}, e => {
})
},
reset() {
this.$refs['processSearch'].resetFields()
this.queryProcess()
},
queryProcess() {
this.loading = true
let parmes = JSON.parse(JSON.stringify(this.searchForm))
parmes.current = this.pageNo
parmes.size = this.$store.getters.userInfo.configContent
this.$http.postData('allProcess',
parmes,
{
loading: 'queryProcessLoading',
_this: this
}, res => {
this.processList = res.list
this.total = res.count
this.loading = false
}, e => {
this.loading = false
})
},
// 搜索按钮
selectProcessBtn() {
this.pageNo = 1
this.queryProcess()
},
handleSelectionChange(val) {
},
// 页码改变
pageChange(pageNo) {
this.pageNo = pageNo
this.queryProcess()
},
// 长度改变
pageSizeChange(pageSize) {
// this.pageSize = pageSize
this.queryProcess()
},
// 清空条件查询
resetSelect() {
this.$refs['processSearch'].resetFields()
this.searchForm = {}
this.queryProcess()
},
// 打开查看
classAdd(row) {
console.log('this.$route.path', this.$route.path)
this.$store.commit('setDetailMap', this.$route.path)
this.$router.push({
path: '/ProcessDetail',
query: {
prcNum: row.prcNum,
// id: row.id,
// processType: row.processType,
// processTypeName: row.processTypeName,
// processStatus: row.processStatus
}
})
// let routeUrl = this.$router.resolve({ // eslint-disable-line
// name: 'ProcessDetail',
// params: {
// processNumber: row.processNumber,
// id: row.id,
// processType: row.processType,
// processTypeName: row.processTypeName,
// processStatus: row.processStatus
// }
// })
// window.open(routeUrl.href, '_blank')
}
},
mounted() {
// this.queryProcess()
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { mapGetters } from 'vuex'
}
export default {
name: 'MonitorProcess',
data() {
return {
searchForm: {},
total: 0,
pageNo: 1,
pageSize: 10,
selectedRowKeys: [],
columns: [
{
title: this.$t('ProcessType'),
dataIndex: 'prcType',
align: 'center',
ellipsis: true
},
{
title: this.$t('Sponsor'),
dataIndex: 'creatUserName',
align: 'center',
ellipsis: true
},
{
title: this.$t('CurrentProcessor'),
dataIndex: 'taskAssignee',
align: 'center',
ellipsis: true
},
{
title: this.$t('LastProcessor'),
dataIndex: 'taskBackAssignee',
align: 'center',
ellipsis: true
},
{
title: this.$t('createTime'),
dataIndex: 'createTime',
align: 'center',
ellipsis: true
},
{
title: this.$t('CompletionTime'),
dataIndex: 'createTime',
align: 'center',
ellipsis: true
},
{
title: this.$t('ProcessStatus'),
dataIndex: 'isEnd',
align: 'center',
ellipsis: true
},
{
title: this.$t('cutoffTime'),
dataIndex: 'endTime',
align: 'center',
ellipsis: true
},
{
title: this.$t('operation'),
width: 140,
align: 'center',
fixed: 'right',
scopedSlots: { customRender: 'operation' }
}
],
loading: false,
dataSource: []
}
},
methods: {
...mapGetters(['userInfo']),
onSelectChange() {
},
onChange(page, pageSize) {
this.pageNo = page
this.queryProcess()
},
SizeChange(page, pageSize) {
this.pageSize = pageSize
this.queryProcess()
},
queryProcess() {
this.loading = true
let parmes = JSON.parse(JSON.stringify(this.searchForm))
parmes.current = this.pageNo
parmes.size = this.pageSize
parmes.userId = this.userInfo().userId
postAction('task/allProcess', parmes).then((res) => {
this.dataSource = res.orders || []
this.total = res.total
this.loading = false
})
},
// 打开查看
classAdd(row) {
console.log('this.$route.path', this.$route.path)
this.$store.commit('setDetailMap', this.$route.path)
this.$router.push({
path: '/ProcessDetail',
query: {
prcNum: row.prcNum
}
})
}
},
mounted() {
this.queryProcess()
}
}
</script>
<style lang="less" scoped>
.monitor-process {
position: relative;
height: 100%;
padding: 15px;
background: #fff;
.monitor-process {
position: relative;
height: 100%;
padding: 15px;
background: #fff;
/deep/ .el-form-item__label {
width: 144.34px;
}
.label-input-form {
display: flex;
justify-content: space-between;
}
.content {
// height: 540px;
margin-top: 10px;
width: 100%;
height: calc(~'100% - 135px') !important;
//overflow-y: auto;
}
.tabpagination {
position: relative;
}
.demo-drawer__content {
// border: 1px solid #ccc;
padding: 0 15px;
}
/deep/ .el-form-item__label {
width: 144.34px;
}
.wx-dot {
display: inline-block;
width: 12px;
height: 12px;
margin-right: 8px;
border-radius: 50%;
//background: #e8eaec;
position: relative;
top: 1px;
.label-input-form {
display: flex;
justify-content: space-between;
}
.content {
// height: 540px;
margin-top: 10px;
width: 100%;
height: calc(~'100% - 135px') !important;
//overflow-y: auto;
}
.tabpagination {
position: relative;
}
.demo-drawer__content {
// border: 1px solid #ccc;
padding: 0 15px;
}
}
.wx-dot {
display: inline-block;
width: 12px;
height: 12px;
margin-right: 8px;
border-radius: 50%;
//background: #e8eaec;
position: relative;
top: 1px;
}
</style>
@@ -0,0 +1,268 @@
<!-- 草稿 -->
<template>
<div class="box">
<a-table
class="table"
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x: true}"
:data-source="dataSource"
:loading="loading"
:columns="columns"
>
</a-table>
<div class="page" v-if="dataSource.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
@change="onChange"
@showSizeChange="SizeChange"
/>
</div>
</div>
</template>
<script>
import { mapMutations, mapActions, mapGetters } from 'vuex'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
export default {
name: 'ProcessCenter',
data() {
return {
searchForm: {},
total: 0,
pageNo: 1,
pageSize: 10,
selectedRowKeys: [],
columns: [
{
title: this.$t('RelatedItems'),
dataIndex: 'RelatedItems',
align: 'center',
ellipsis: true
},
{
title: this.$t('standard'),
dataIndex: 'prcNum',
align: 'center',
ellipsis: true
},
{
title: this.$t('title'),
dataIndex: 'prcName',
align: 'center',
ellipsis: true
},
{
title: this.$t('ProcessType'),
dataIndex: 'prcType',
align: 'center',
ellipsis: true
},
{
title: this.$t('Sponsor'),
dataIndex: 'creatUserName',
align: 'center',
ellipsis: true
},
{
title: this.$t('LastProcessor'),
dataIndex: 'taskBackAssignee',
align: 'center',
ellipsis: true
},
{
title: this.$t('createTime'),
dataIndex: 'createTime',
align: 'center',
ellipsis: true
},
{
title: this.$t('ProcessStatus'),
dataIndex: 'isEnd',
align: 'center',
ellipsis: true
},
{
title: this.$t('cutoffTime'),
dataIndex: 'endTime',
align: 'center',
ellipsis: true
},
{
title: this.$t('operation'),
width: 140,
align: 'center',
fixed: 'right',
scopedSlots: { customRender: 'operation' }
}
],
loading: false,
dataSource: []
}
},
methods: {
...mapGetters(['userInfo']),
onSelectChange() {
},
handleCommand(command) {
switch (command[1]) {
case '查看':
this.classAdd(command[0])
break
case '办理':
this.dealWith(command[0])
break
case '删除':
this.classDel(command[0])
break
}
},
// 删除
classDel(row) {
this.$confirm('确认删除信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
this.$http.get('lawss/activiti/deleteDraft', { id: row.id }, {
_this: this,
loading: 'loading'
}, res => {
if (res.success) {
this.$message.success('删除成功')
this.pageNo = 1
this.queryProcess()
} else {
}
})
})
},
// 查询待办流程
queryProcess() {
this.loading = true
let parmes = {}
parmes.current = this.pageNo
parmes.size = this.pageSize
parmes.userId = this.userInfo().userId
postAction('task/queryTaskDraft', parmes).then((res) => {
this.dataSource = res.orders || []
this.total = res.total
this.loading = false
})
},
dealWith(row) {
const { prcType } = row
let query = JSON.parse(row.mes)
let ids = query.ids
row.type = 1
}
},
mounted() {
this.queryProcess()
}
}
</script>
<style lang="less" scoped>
.process-center {
position: relative;
height: 100%;
background: #fff;
display: flex;
flex-direction: column;
.el-form-item {
}
.label-input-form {
display: flex;
justify-content: space-between;
}
.content {
width: 100%;
flex: auto;
overflow: hidden;
display: flex;
flex-direction: column;
.table-wrap {
flex: auto;
overflow: hidden;
display: flex;
flex-direction: column;
}
.pagination {
position: static;
/deep/ .pagination-slot {
padding: 0;
}
}
}
.demo-drawer__content {
// border: 1px solid #ccc;
padding: 0 15px;
}
}
.wx-dot {
display: inline-block;
width: 12px;
height: 12px;
margin-right: 8px;
border-radius: 50%;
//background: #e8eaec;
position: relative;
top: 1px;
}
.backlog-process-list {
.backlog-process-left {
float: left;
width: 70%;
line-height: 35px;
font-size: 16px;
font-weight: bold;
//.ellipsis();
& > span {
max-width: 80%;
margin-right: 5px;
//.ellipsis();
}
}
.backlog-process-right {
float: right;
margin-right: 34px;
button {
margin-top: 5px;
}
}
}
.clearfix:after { /*伪元素是行内元素 正常浏览器清除浮动方法*/
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {
*zoom: 1; /*ie6清除浮动的方式 *号只有IE6-IE7执行,其他浏览器不执行*/
}
</style>