add 催办
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<a-col :md="6" :sm="8">
|
||||
<div style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<!--催办-->
|
||||
<a-button type="primary" @click="handleUrge" icon="bell" v-if="canUrge">
|
||||
<a-button type="primary" @click="handleUrge" icon="bell" v-if="showUrgeButton">
|
||||
{{ $t('workCenter.processDetail.urgeHandle') }}
|
||||
</a-button>
|
||||
<!--流程图-->
|
||||
@@ -38,7 +38,7 @@
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
rowKey="taskId"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
@@ -100,6 +100,7 @@ import FlowChartModal from './FlowChartModal.vue'
|
||||
import UploadFile from './UploadFile'
|
||||
import { filterObj } from '../utils/util'
|
||||
import { kkFilePreview } from '../utils/kkFilePreview'
|
||||
import { urgeProcessNode } from '../api/workCenter'
|
||||
|
||||
// 支持预览的文件后缀
|
||||
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx']
|
||||
@@ -121,12 +122,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 是否可以催办,自己不能催自己
|
||||
canUrge: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
},
|
||||
// 催办按钮的权限
|
||||
urgePermissionFlag: {
|
||||
type: String,
|
||||
@@ -144,6 +139,12 @@ export default {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
// 是否展示催办按钮
|
||||
showUrgeButton: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -275,7 +276,24 @@ export default {
|
||||
fileLook (record) {
|
||||
this.$refs.uploadFile.open(record.commitFile)
|
||||
},
|
||||
/**
|
||||
* 催办
|
||||
*/
|
||||
handleUrge () {
|
||||
if (!this.selectedRowKeys || this.selectedRowKeys.length === 0) {
|
||||
this.$message.warning(this.$t('selectARecord'))
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
urgeProcessNode({taskId: this.selectedRowKeys.join(',')}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 跳转流程图页面
|
||||
|
||||
Reference in New Issue
Block a user