批量审批开发

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

@ -71,7 +71,7 @@ export default {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data
if(!['/sys/notice/page','/sys/notice/mynotice/page'].includes(this.mixinViewModuleOptions.getDataListURL)){//我得通知、通知管理不需要特殊处理 if (!['/sys/notice/page', '/sys/notice/mynotice/page'].includes(this.mixinViewModuleOptions.getDataListURL)) { // 我得通知、通知管理不需要特殊处理
this.dataList.map((item, index) => { this.dataList.map((item, index) => {
if (this.dataList[index].type != null) { if (this.dataList[index].type != null) {
switch (item.type) { switch (item.type) {
@ -92,9 +92,8 @@ export default {
}) })
} }
}) })
} }
// 我的代办特殊处理 // 我的代办特殊处理
if (this.mixinViewModuleOptions.getDataListURL === '/act/task/myToDoTaskPage') { if (this.mixinViewModuleOptions.getDataListURL === '/act/task/myToDoTaskPage') {
this.$http.get('/sys/user/info').then(userRes => { this.$http.get('/sys/user/info').then(userRes => {
@ -166,6 +165,68 @@ export default {
dataListSelectionChangeHandle (val) { dataListSelectionChangeHandle (val) {
this.dataListSelections = 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) { dataListSortChangeHandle (data) {
if (!data.order || !data.prop) { 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.id = res.data.id
this.$store.state.user.name = res.data.realName this.$store.state.user.name = res.data.realName
this.$store.state.user.superAdmin = res.data.superAdmin 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(() => {}) .catch(() => {})
}, },

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22 * @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua * @LastEditors: Light
* @LastEditTime: 2022-07-25 09:45:35 * @LastEditTime: 2022-12-05 18:01:39
* @Description: "能力资源上架" * @Description: "能力资源上架"
--> -->
<template> <template>
@ -25,6 +25,21 @@
$t('query') $t('query')
}}</el-button> }}</el-button>
</el-form-item> </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-form>
<el-table <el-table
v-loading="dataListLoading" v-loading="dataListLoading"
@ -147,7 +162,9 @@ export default {
taskId: '', taskId: '',
processDefinitionKey: 'resourcemountapply' processDefinitionKey: 'resourcemountapply'
}, },
processInstanceId: '' processInstanceId: '',
input: '',
dialogVisible: false
} }
}, },
components: {}, components: {},
@ -172,7 +189,9 @@ export default {
this.getDataList() this.getDataList()
bus.$emit('updateTaskNum') bus.$emit('updateTaskNum')
}) })
} }
} }
</script> </script>
<style lang="scss" scoped>
@import '~@/mixins/view-module-css';
</style>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22 * @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua * @LastEditors: Light
* @LastEditTime: 2022-07-25 09:48:46 * @LastEditTime: 2022-12-06 10:18:33
* @Description: "能力资源下架" * @Description: "能力资源下架"
--> -->
<template> <template>
@ -25,6 +25,21 @@
$t('query') $t('query')
}}</el-button> }}</el-button>
</el-form-item> </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-form>
<el-table <el-table
v-loading="dataListLoading" v-loading="dataListLoading"
@ -147,7 +162,9 @@ export default {
taskId: '', taskId: '',
processDefinitionKey: 'resourcundercarriageapply' processDefinitionKey: 'resourcundercarriageapply'
}, },
processInstanceId: '' processInstanceId: '',
input: '',
dialogVisible: false
} }
}, },
components: {}, components: {},
@ -176,3 +193,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped>
@import '~@/mixins/view-module-css';
</style>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22 * @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua * @LastEditors: Light
* @LastEditTime: 2022-06-29 16:31:26 * @LastEditTime: 2022-12-06 10:18:29
* @Description: "能力需求申请" * @Description: "能力需求申请"
--> -->
<template> <template>
@ -25,6 +25,21 @@
$t('query') $t('query')
}}</el-button> }}</el-button>
</el-form-item> </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-form>
<el-table <el-table
v-loading="dataListLoading" v-loading="dataListLoading"
@ -147,7 +162,9 @@ export default {
taskId: '', taskId: '',
processDefinitionKey: 'abilitydemandapply' processDefinitionKey: 'abilitydemandapply'
}, },
processInstanceId: '' processInstanceId: '',
input: '',
dialogVisible: false
} }
}, },
components: {}, components: {},
@ -175,3 +192,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped>
@import '~@/mixins/view-module-css';
</style>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22 * @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.liangjunhua * @LastEditors: Light
* @LastEditTime: 2022-06-29 16:31:26 * @LastEditTime: 2022-12-06 10:18:37
* @Description: "评论审核" * @Description: "评论审核"
--> -->
<template> <template>
@ -25,6 +25,21 @@
$t('query') $t('query')
}}</el-button> }}</el-button>
</el-form-item> </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-form>
<el-table <el-table
v-loading="dataListLoading" v-loading="dataListLoading"
@ -147,7 +162,9 @@ export default {
taskId: '', taskId: '',
processDefinitionKey: 'comment_review' processDefinitionKey: 'comment_review'
}, },
processInstanceId: '' processInstanceId: '',
input: '',
dialogVisible: false
} }
}, },
components: {}, components: {},
@ -177,3 +194,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped>
@import '~@/mixins/view-module-css';
</style>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-27 11:27:22 * @Date: 2022-06-27 11:27:22
* @LastEditors: hisense.wuhongjian * @LastEditors: Light
* @LastEditTime: 2022-10-19 11:10:50 * @LastEditTime: 2022-12-06 10:18:28
* @Description: 能力申请 * @Description: 能力申请
--> -->
<template> <template>
@ -25,6 +25,21 @@
$t("query") $t("query")
}}</el-button> }}</el-button>
</el-form-item> </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-form>
<el-table <el-table
v-loading="dataListLoading" v-loading="dataListLoading"
@ -157,7 +172,9 @@ export default {
taskId: '', taskId: '',
processDefinitionKey: returnLocationStr() == 'qingdao' ? 'abilityprocess_v3' : 'abilityprocess_v2' processDefinitionKey: returnLocationStr() == 'qingdao' ? 'abilityprocess_v3' : 'abilityprocess_v2'
}, },
processInstanceId: '' processInstanceId: '',
input: '',
dialogVisible: false
} }
}, },
components: {}, components: {},
@ -186,3 +203,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped>
@import '~@/mixins/view-module-css';
</style>