批量审批开发

This commit is contained in:
a0049873 2022-12-06 11:19:50 +08:00
parent 491f2910b1
commit 7a096d5dc1
8 changed files with 242 additions and 19 deletions

View File

@ -0,0 +1,55 @@
.agreeButton{
display: inline-block;
line-height: 8px;
width:80px;
height: 32px;
white-space: nowrap;
cursor: pointer;
color: #ffffff;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin-left: 10px;
-webkit-transition: .1s;
transition: .1s;
font-weight: 500;
//padding: 12px 20px;
font-size: 14px;
border-radius: 4px;
background-color: #0058e1;
}
.agreeButton:hover{
background: #65a5f9;
border-color: #65a5f9;
color: #FFF;
}
.rejectButton{
display: inline-block;
line-height: 8px;
width:80px;
height: 32px;
white-space: nowrap;
cursor: pointer;
color: #F56C6C;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin: 0;
-webkit-transition: .1s;
transition: .1s;
font-weight: 500;
//padding: 12px 20px;
font-size: 14px;
border-radius: 4px;
border-color: #F56C6C;
margin-left: 12px;
}
.rejectButton:hover{
background-color: #F56C6C;
border-color: #F56C6C;
color: #ffffff;
}

View File

@ -92,7 +92,6 @@ export default {
})
}
})
}
// 我的代办特殊处理
@ -166,6 +165,68 @@ export default {
dataListSelectionChangeHandle (val) {
this.dataListSelections = val
},
// 批量审批
showApproval () {
if (this.dataListSelections.length === 0) {
this.$message({
type: 'warning',
message: '请先选择需要审批的信息!'
})
return
}
this.dialogVisible = true
},
handleClose () {
this.input = ''
this.dialogVisible = false
},
approval (str) {
console.log('批量审批', this.dataListSelections, this.$store)
if (this.input.length < 1) {
this.$message({
type: 'warning',
message: '请输入审批意见!'
})
return
}
const arr = []
this.dataListSelections.map(val => {
arr.push(val.taskId)
})
if (str === '同意') {
this.$http.post('/act/task/batchComplete', { comment: this.input, taskIds: arr }).then(res => {
if (res.data.msg !== 'success') {
this.$message({
type: 'warning',
message: '审批失败!'
})
return
}
this.handleClose()
this.query()
this.$message({
type: 'success',
message: '审批成功!'
})
})
} else if (str === '驳回') {
this.$http.post('/act/task/batchBackToFirst', { comment: this.input, taskIds: arr }).then(res => {
if (res.data.msg !== 'success') {
this.$message({
type: 'warning',
message: '审批失败!'
})
return
}
this.handleClose()
this.query()
this.$message({
type: 'success',
message: '审批成功!'
})
})
}
},
// 排序
dataListSortChangeHandle (data) {
if (!data.order || !data.prop) {

View File

@ -115,6 +115,14 @@ export default {
this.$store.state.user.id = res.data.id
this.$store.state.user.name = res.data.realName
this.$store.state.user.superAdmin = res.data.superAdmin
this.$store.state.user.roleIdList = []
if (res.data.roleIdList) {
res.data.roleIdList.map(val => {
this.$http.get('/sys/role/' + val).then(res1 => {
this.$store.state.user.roleIdList.push(res1.data.data.name)
})
})
}
})
.catch(() => {})
},

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-25 09:45:35
* @LastEditors: Light
* @LastEditTime: 2022-12-05 18:01:39
* @Description: "能力资源上架"
-->
<template>
@ -25,6 +25,21 @@
$t('query')
}}</el-button>
</el-form-item>
<el-form-item v-if="($store.state.user.roleIdList.indexOf('运维管理员') !== -1)">
<el-button type="primary" @click="showApproval" >批量审批</el-button>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
:close-on-click-modal="false">
<el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer">
<el-button class="agreeButton" @click="approval('同意')">同意</el-button>
<el-button class="rejectButton" @click="approval('驳回')">驳回</el-button>
</span>
</el-dialog>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
@ -147,7 +162,9 @@ export default {
taskId: '',
processDefinitionKey: 'resourcemountapply'
},
processInstanceId: ''
processInstanceId: '',
input: '',
dialogVisible: false
}
},
components: {},
@ -172,7 +189,9 @@ export default {
this.getDataList()
bus.$emit('updateTaskNum')
})
}
}
</script>
<style lang="scss" scoped>
@import '~@/mixins/view-module-css';
</style>

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-25 09:48:46
* @LastEditors: Light
* @LastEditTime: 2022-12-06 10:18:33
* @Description: "能力资源下架"
-->
<template>
@ -25,6 +25,21 @@
$t('query')
}}</el-button>
</el-form-item>
<el-form-item v-if="($store.state.user.roleIdList.indexOf('运维管理员') !== -1)">
<el-button type="primary" @click="showApproval" >批量审批</el-button>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
:close-on-click-modal="false">
<el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer">
<el-button class="agreeButton" @click="approval('同意')">同意</el-button>
<el-button class="rejectButton" @click="approval('驳回')">驳回</el-button>
</span>
</el-dialog>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
@ -147,7 +162,9 @@ export default {
taskId: '',
processDefinitionKey: 'resourcundercarriageapply'
},
processInstanceId: ''
processInstanceId: '',
input: '',
dialogVisible: false
}
},
components: {},
@ -176,3 +193,6 @@ export default {
}
}
</script>
<style lang="scss" scoped>
@import '~@/mixins/view-module-css';
</style>

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-29 16:31:26
* @LastEditors: Light
* @LastEditTime: 2022-12-06 10:18:29
* @Description: "能力需求申请"
-->
<template>
@ -25,6 +25,21 @@
$t('query')
}}</el-button>
</el-form-item>
<el-form-item v-if="($store.state.user.roleIdList.indexOf('运维管理员') !== -1)">
<el-button type="primary" @click="showApproval" >批量审批</el-button>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
:close-on-click-modal="false">
<el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer">
<el-button class="agreeButton" @click="approval('同意')">同意</el-button>
<el-button class="rejectButton" @click="approval('驳回')">驳回</el-button>
</span>
</el-dialog>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
@ -147,7 +162,9 @@ export default {
taskId: '',
processDefinitionKey: 'abilitydemandapply'
},
processInstanceId: ''
processInstanceId: '',
input: '',
dialogVisible: false
}
},
components: {},
@ -175,3 +192,6 @@ export default {
}
}
</script>
<style lang="scss" scoped>
@import '~@/mixins/view-module-css';
</style>

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-29 16:31:26
* @LastEditors: Light
* @LastEditTime: 2022-12-06 10:18:37
* @Description: "评论审核"
-->
<template>
@ -25,6 +25,21 @@
$t('query')
}}</el-button>
</el-form-item>
<el-form-item v-if="($store.state.user.roleIdList.indexOf('运维管理员') !== -1)">
<el-button type="primary" @click="showApproval" >批量审批</el-button>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
:close-on-click-modal="false">
<el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer">
<el-button class="agreeButton" @click="approval('同意')">同意</el-button>
<el-button class="rejectButton" @click="approval('驳回')">驳回</el-button>
</span>
</el-dialog>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
@ -147,7 +162,9 @@ export default {
taskId: '',
processDefinitionKey: 'comment_review'
},
processInstanceId: ''
processInstanceId: '',
input: '',
dialogVisible: false
}
},
components: {},
@ -177,3 +194,6 @@ export default {
}
}
</script>
<style lang="scss" scoped>
@import '~@/mixins/view-module-css';
</style>

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-10-19 11:10:50
* @LastEditors: Light
* @LastEditTime: 2022-12-06 10:18:28
* @Description: 能力申请
-->
<template>
@ -25,6 +25,21 @@
$t("query")
}}</el-button>
</el-form-item>
<el-form-item v-if="($store.state.user.roleIdList.indexOf('运维管理员') !== -1)">
<el-button type="primary" @click="showApproval" >批量审批</el-button>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
:close-on-click-modal="false">
<el-input v-model="input" placeholder="请输入审批意见"></el-input>
<span slot="footer" class="dialog-footer">
<el-button class="agreeButton" @click="approval('同意')">同意</el-button>
<el-button class="rejectButton" @click="approval('驳回')">驳回</el-button>
</span>
</el-dialog>
</el-form-item>
</el-form>
<el-table
v-loading="dataListLoading"
@ -157,7 +172,9 @@ export default {
taskId: '',
processDefinitionKey: returnLocationStr() == 'qingdao' ? 'abilityprocess_v3' : 'abilityprocess_v2'
},
processInstanceId: ''
processInstanceId: '',
input: '',
dialogVisible: false
}
},
components: {},
@ -186,3 +203,6 @@ export default {
}
}
</script>
<style lang="scss" scoped>
@import '~@/mixins/view-module-css';
</style>