diff --git a/back/src/views/modules/workBench/api.js b/back/src/views/modules/workBench/api.js
new file mode 100644
index 00000000..52da4412
--- /dev/null
+++ b/back/src/views/modules/workBench/api.js
@@ -0,0 +1,46 @@
+// /resource/getByDept
+import http from '@/utils/request';
+
+function Request({
+ methods, url, data, success, fali
+}) {
+ let _key = methods == 'get' ? 'params' : 'data';
+ return new Promise((resolve, reject) => {
+ http[methods](url, {
+ [_key]: data
+ }).then(res => {
+ resolve(res)
+ }, err => {
+ reject(err)
+ })
+ })
+
+}
+
+// /resource/getByDept:获取当前登录用户所在部门发布的资源
+
+// 部门待办列表
+export const getToDoTask = (data, success, fail) => {
+ Request({
+ methods: 'get',
+ url: '/act/task/deptToDoTaskPage',
+ data
+ }).then(res => {
+ success && success(res)
+ }).catch(err => {
+ fail && fail(err)
+ })
+}
+
+// 部门已办列表
+export const getHasToDoTask = (data, success, fail) => {
+ Request({
+ methods: 'get',
+ url: '/act/his/getDeptHandledInstancePage',
+ data
+ }).then(res => {
+ success && success(res)
+ }).catch(err => {
+ fail && fail(err)
+ })
+}
\ No newline at end of file
diff --git a/back/src/views/modules/workBench/components/dept-chart-view.vue b/back/src/views/modules/workBench/components/dept-chart-view.vue
index 753f6902..126c5706 100644
--- a/back/src/views/modules/workBench/components/dept-chart-view.vue
+++ b/back/src/views/modules/workBench/components/dept-chart-view.vue
@@ -1,11 +1,6 @@
\ No newline at end of file
diff --git a/back/src/views/modules/workBench/workBench.vue b/back/src/views/modules/workBench/workBench.vue
index 20998672..a8033a0e 100644
--- a/back/src/views/modules/workBench/workBench.vue
+++ b/back/src/views/modules/workBench/workBench.vue
@@ -22,6 +22,7 @@
import BottomView from '../workBench/components/bottom-view.vue'
import CenterView from '../workBench/components/center-view.vue'
import deptTodoView from '../workBench/components/dept-todo-view.vue'
+import * as Apis from './api'
export default {
components: {
@@ -34,16 +35,65 @@ export default {
// 部门待办
toToData: {
color: '#f86f01',
- // imgSrc: require(''),
+ imgSrc: require('@/assets/img/workBench/todo.png'),
+ bgColor: 'rgba(228,138,1,0.12)',
+ borderColor: 'rgba(250,123,12,0.54)',
+ textColor: '#f86f01',
+ num: 34,
+ list: [],
+ nameStr: 'taskName'
},
// 部门已办
hasToDodoData: {
+ noMarginleft: true,
color: '#21b107',
+ imgSrc: require('@/assets/img/workBench/hasToDo.png'),
+ bgColor: 'rgba(37,165,13,0.12)',
+ borderColor: 'rgba(49,194,20,0.54)',
+ textColor: '#21b107',
+ num: 34,
+ list: [],
+ nameStr: 'processDefinitionName'
}
}
},
+ mounted() {
+ this.getToDo()
+ this.getHasToDo()
+ },
methods: {
-
+ // 待办
+ getToDo() {
+ let data = {
+ limit: 5,
+ page: 1,
+ }
+ Apis.getToDoTask(data, res => {
+ if (res.data.code !== 0) {
+ return;
+ }
+ console.log('res----待办-------->', res.data);
+ this.toToData.list = res.data.data.records || []
+ }, err => {
+ console.log('err-----待办------->', err);
+ })
+ },
+ // 已办
+ getHasToDo() {
+ let data = {
+ limit: 5,
+ page: 1,
+ }
+ Apis.getHasToDoTask(data, res => {
+ if (res.data.code !== 0) {
+ return;
+ }
+ console.log('res----已办-------->', res.data);
+ this.hasToDodoData.list = res.data.data.records || []
+ }, err => {
+ console.log('err-----已办------->', err);
+ })
+ },
},
}
@@ -64,7 +114,7 @@ export default {
.top {
height: 284px;
margin-bottom: 16px;
- background: green;
+ background: #fff;
}
.dept-left {