diff --git a/back/src/mixins/view-module-css.scss b/back/src/mixins/view-module-css.scss new file mode 100644 index 00000000..71e4e256 --- /dev/null +++ b/back/src/mixins/view-module-css.scss @@ -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; +} \ No newline at end of file diff --git a/back/src/mixins/view-module.js b/back/src/mixins/view-module.js index e65d2d34..c2385585 100644 --- a/back/src/mixins/view-module.js +++ b/back/src/mixins/view-module.js @@ -71,7 +71,7 @@ export default { return this.$message.error(res.msg) } 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) => { if (this.dataList[index].type != null) { switch (item.type) { @@ -92,9 +92,8 @@ export default { }) } }) - } - + // 我的代办特殊处理 if (this.mixinViewModuleOptions.getDataListURL === '/act/task/myToDoTaskPage') { this.$http.get('/sys/user/info').then(userRes => { @@ -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) { diff --git a/back/src/views/main.vue b/back/src/views/main.vue index 60bcff29..4a4c390d 100644 --- a/back/src/views/main.vue +++ b/back/src/views/main.vue @@ -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(() => {}) }, diff --git a/back/src/views/modules/myAgent/AbilityResourceShelf.vue b/back/src/views/modules/myAgent/AbilityResourceShelf.vue index 876c2562..07baf92b 100644 --- a/back/src/views/modules/myAgent/AbilityResourceShelf.vue +++ b/back/src/views/modules/myAgent/AbilityResourceShelf.vue @@ -1,8 +1,8 @@