待办流程添加批量办理
This commit is contained in:
@@ -1292,4 +1292,10 @@ module.exports = {
|
||||
Deletetitle:'Delete the title',
|
||||
toConfirmed: 'to confirm',
|
||||
confirmtitle:'The title is incorrect. Please re-enter it',
|
||||
batchProcessing:'Batch Processing',
|
||||
onlyDataTaskConfirmationProcessSelected:'Only data of task confirmation process can be selected',
|
||||
processNode:'Process Node',
|
||||
personChargeReceivesTheTask:'Person in charge receives the task',
|
||||
theResponsiblePersonTaskForTheSecondTime:'The responsible person receives the task for the second time',
|
||||
processNodesAreInconsistentPleaseSelectConsistentData:'Process nodes are inconsistent; Please select consistent data',
|
||||
}
|
||||
@@ -1394,4 +1394,10 @@ module.exports = {
|
||||
Deletetitle:'删除标题',
|
||||
toConfirmed: '来确认',
|
||||
confirmtitle:'标题不正确,请重新输入',
|
||||
batchProcessing:'批量办理',
|
||||
onlyDataTaskConfirmationProcessSelected:'只能选择流程类型为任务确认流程的数据',
|
||||
processNode:'流程节点',
|
||||
personChargeReceivesTheTask:'责任人接收任务',
|
||||
theResponsiblePersonTaskForTheSecondTime:'责任人二次接收任务',
|
||||
processNodesAreInconsistentPleaseSelectConsistentData:'流程节点不一致;请选择一致的数据',
|
||||
}
|
||||
@@ -135,7 +135,7 @@
|
||||
dreUserIdName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('selectIssuer') + this.$t('cannotEmpty'),
|
||||
message: this.$t('selectInquiry') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-modal
|
||||
:title="$t('batchProcessing')"
|
||||
:width="700"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24" v-if="taskDefinitionKey != 'dreqr'">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"></span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="flag">
|
||||
<a-radio-group style="margin-top: 2px" @change="flagChange" class="box-input" v-model="formInline.flag">
|
||||
<a-radio value="0">
|
||||
{{$t('accept')}}
|
||||
</a-radio>
|
||||
<a-radio value="1">
|
||||
{{$t('disagree')}}
|
||||
</a-radio>
|
||||
<a-radio value="3" v-if="taskDefinitionKey == 'zrrjsrw'">
|
||||
{{$t('inquiry')}}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="isTrue">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text" :title="$t('selectInquiry')">{{$t('selectInquiry')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="dreUserIdName">
|
||||
<PersonnelSelection class="box-input"
|
||||
:personneQuery="formInline"
|
||||
:query="{db_field_name:'dreUserId',db_field_txt:$t('selectInquiry')}"
|
||||
:isInput="true"
|
||||
:isSingleChoice="true"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="formInline.dreUserIdName"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text" :title="$t('feedbackMessage')">{{$t('feedbackMessage')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel" prop="standard">
|
||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('feedbackMessage')" v-model="formInline.approvalOpinion"
|
||||
:rows="4"/>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'batchProcessing',
|
||||
components: {
|
||||
PersonnelSelection
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
rules: {
|
||||
flag: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('reviewResults') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
dreUserIdName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('selectInquiry') + this.$t('cannotEmpty'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
approvalOpinion: [
|
||||
{
|
||||
max: 300,
|
||||
message: this.$t('feedbackMessage') + this.$t('cannotExceed') + 300 + this.$t('Characters'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
confirmLoading: false,
|
||||
visible: false,
|
||||
selectedRowKeys: [],
|
||||
issue: false,
|
||||
isTrue: false,
|
||||
taskDefinitionKey: '',
|
||||
taskIds:[],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
getData(data) {
|
||||
this.selectedRowKeys = data
|
||||
this.taskDefinitionKey = this.selectedRowKeys[0].taskDefinitionKey
|
||||
this.selectedRowKeys.forEach(res=>{
|
||||
if (res.taskIds.indexOf(',') != '-1'){
|
||||
res.taskIds = res.taskIds.slice(0,res.taskIds.indexOf(','))
|
||||
}
|
||||
this.taskIds.push(res.taskIds)
|
||||
})
|
||||
this.confirmLoading = false
|
||||
this.visible = true
|
||||
this.isTrue = false
|
||||
this.$nextTick(() => {
|
||||
this.formInline = {}
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
flagChange(event) {
|
||||
if (event.target.value == 3) {
|
||||
this.isTrue = true
|
||||
} else {
|
||||
this.isTrue = false
|
||||
}
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.formInline[value] = id
|
||||
this.formInline = { ...this.formInline }
|
||||
},
|
||||
addBatch(){
|
||||
let rejectTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
||||
let query = {
|
||||
rejectUserId:this.userInfo().id,
|
||||
rejectTime:rejectTime,
|
||||
rejectCause:this.formInline.approvalOpinion,
|
||||
taskIds:this.taskIds.join(','),
|
||||
rejectType:'1',
|
||||
}
|
||||
postAction('/project/projectLawsInventoryRejectCauseEO/addBatch', query).then((res) => {
|
||||
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let query = {
|
||||
...this.formInline,
|
||||
taskIds:this.taskIds.join(','),
|
||||
userId:this.userInfo().id
|
||||
}
|
||||
if (this.formInline.flag == '1'){
|
||||
this.addBatch()
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction('/workFlow/completeTaskBatch', query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('batchProcessingForm')
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 84px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.formAdd {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
</style>
|
||||
+190
-5
@@ -1,9 +1,65 @@
|
||||
<!--待办流程-->
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text tree-select">
|
||||
<div class="title-text" :title="$t('ProcessType')">
|
||||
<span>{{$t('ProcessType')}}</span>
|
||||
</div>
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('ProcessType')"
|
||||
class="box-input"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
v-model="queryParam.prcType">
|
||||
<a-select-option v-for="(item, key) in Object.keys(prcTypeName)"
|
||||
:key="key"
|
||||
:value="item">
|
||||
<span class="itemOption" :title=" prcTypeName[item] ">
|
||||
{{ prcTypeName[item]}}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-col>
|
||||
<!-- <a-col :md="6" :sm="8">-->
|
||||
<!-- <div class="box-title-text tree-select">-->
|
||||
<!-- <div class="title-text" :title="$t('processNode')">-->
|
||||
<!-- <span>{{$t('processNode')}}</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('processNode')"-->
|
||||
<!-- class="box-input"-->
|
||||
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
|
||||
<!-- v-model="queryParam.prcType">-->
|
||||
<!-- <a-select-option v-for="(item, key) in processNodeList"-->
|
||||
<!-- :key="key"-->
|
||||
<!-- :value="item.value">-->
|
||||
<!-- <span class="itemOption" :title=" item.name ">-->
|
||||
<!-- {{ item.name}}-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator-index">
|
||||
<div @click="batchProcessingClick" class="operator-text-index">
|
||||
<a-icon type="apartment"/>
|
||||
{{$t('batchProcessing')}}
|
||||
</div>
|
||||
</div>
|
||||
<a-table
|
||||
class="table"
|
||||
rowKey="id"
|
||||
:rowKey="(record)=>JSON.stringify(record)"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
@@ -11,7 +67,7 @@
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
>
|
||||
<span slot="prcType" slot-scope="text,record">
|
||||
<span slot="prcType" slot-scope="text,record" :title="prcTypeName[text]">
|
||||
{{prcTypeName[text]}}
|
||||
</span>
|
||||
<span slot="operation" slot-scope="record">
|
||||
@@ -30,6 +86,7 @@
|
||||
@showSizeChange="SizeChange"
|
||||
/>
|
||||
</div>
|
||||
<batchProcessing ref="batchProcessingRef" @batchProcessingForm="batchProcessingForm"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -37,13 +94,18 @@
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import { mapGetters } from 'vuex'
|
||||
import store from '@/store/'
|
||||
import batchProcessing from './components/batchProcessing'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'ProcessCenter',
|
||||
components: {
|
||||
batchProcessing
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
searchForm: {},
|
||||
queryParam: {},
|
||||
total: 0,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@@ -53,6 +115,20 @@
|
||||
5: this.$t('collectionOfRegulatoryOpinionsProcess'),
|
||||
6: this.$t('regulatoryTechnologyAssessmentProcess')
|
||||
},
|
||||
processNodeList: [
|
||||
{
|
||||
name: this.$t('personChargeReceivesTheTask'),
|
||||
value: 'zrrjsrw'
|
||||
},
|
||||
{
|
||||
name: this.$t('engineerReply'),
|
||||
value: 'dreqr'
|
||||
},
|
||||
{
|
||||
name: this.$t('theResponsiblePersonTaskForTheSecondTime'),
|
||||
value: 'zrrqr'
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('RelatedItems'),
|
||||
@@ -83,6 +159,13 @@
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'prcType' }
|
||||
},
|
||||
{
|
||||
title: this.$t('processNode'),
|
||||
dataIndex: 'taskInfo',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: this.$t('Sponsor'),
|
||||
dataIndex: 'creatUserName',
|
||||
@@ -136,12 +219,54 @@
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
onSelectChange() {
|
||||
|
||||
onSelectChange(value) {
|
||||
this.selectedRowKeys = []
|
||||
if (value && value.length > 0) {
|
||||
value.forEach(res => {
|
||||
res = JSON.parse(res)
|
||||
if (res.prcType == '1') {
|
||||
this.selectedRowKeys.push(JSON.stringify(res))
|
||||
} else {
|
||||
this.$message.warning(this.$t('onlyDataTaskConfirmationProcessSelected'))
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
batchProcessingClick() {
|
||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
let content = []
|
||||
selectedRowKeys.forEach(res => {
|
||||
content.push(JSON.parse(res))
|
||||
})
|
||||
console.log(content)
|
||||
for (let i = 0; i < content.length; i++) {
|
||||
if (content[i].taskDefinitionKey != content[0].taskDefinitionKey) {
|
||||
this.$message.warning(this.$t('processNodesAreInconsistentPleaseSelectConsistentData'))
|
||||
return
|
||||
}
|
||||
}
|
||||
this.$refs.batchProcessingRef.getData(JSON.parse(JSON.stringify(content)))
|
||||
} else {
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}
|
||||
},
|
||||
batchProcessingForm() {
|
||||
this.pageNo = 1
|
||||
this.queryProcess()
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
this.queryProcess()
|
||||
},
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.pageNo = 1
|
||||
this.queryProcess()
|
||||
},
|
||||
queryProcess() {
|
||||
this.loading = true
|
||||
let parmes = JSON.parse(JSON.stringify(this.searchForm))
|
||||
let parmes = JSON.parse(JSON.stringify(this.queryParam))
|
||||
parmes.current = this.pageNo
|
||||
parmes.size = this.pageSize
|
||||
parmes.userId = this.userInfo().userId
|
||||
@@ -192,8 +317,68 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 20%;
|
||||
min-width: 110px;
|
||||
color: #000F16;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
margin-top: 3px;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
width: 70%;
|
||||
height: 38px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.box-button {
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
|
||||
.table-operator-index {
|
||||
/*width: 100%;*/
|
||||
text-align: right;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.operator-text-index {
|
||||
cursor: pointer;
|
||||
margin-right: 13px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #040B29;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.itemOption {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user