diff --git a/client/src/router/index.js b/client/src/router/index.js index 251e9c5..aebe060 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -213,6 +213,12 @@ export const asyncRoutes = [ component: () => import('@/views/supervisionNew/basicGoal.vue'), meta: { title: '年度基础目标' , perms: ['task2']} }, + { + path: 'basicGoalDept', + name: 'basicGoalDept', + component: () => import('@/views/supervisionNew/basicGoalDept.vue'), + meta: { title: '部门年度目标' , perms: ['task2do']} + }, { path: 'content', name: 'Content', diff --git a/client/src/views/dashboard/index.vue b/client/src/views/dashboard/index.vue index 0cb90a2..4dd59f3 100644 --- a/client/src/views/dashboard/index.vue +++ b/client/src/views/dashboard/index.vue @@ -1,122 +1,134 @@ diff --git a/client/src/views/supervisionNew/basicGoalDept.vue b/client/src/views/supervisionNew/basicGoalDept.vue index 57e1f79..c51db61 100644 --- a/client/src/views/supervisionNew/basicGoalDept.vue +++ b/client/src/views/supervisionNew/basicGoalDept.vue @@ -36,7 +36,7 @@ - - - - - + + + - import { getPgoalDeptList } from "@/api/task"; + import { getOrgList, getSubOrgList } from "@/api/org"; import checkPermission from "@/utils/permission"; import Pagination from "@/components/Pagination"; - import { upUrl, upHeaders } from "@/api/file"; - export default { components:{Pagination}, data(){ return{ dataList:{ - results:[], - count:0, + results:[], + count:0 }, listQuery:{ - page: 1, - search:'', - cycle:10, - page_size: 20, + page: 0, + year:'', + goal_key__in:'pgoal_1,pgoal_2,pgoal_3,pgoal_4,pgoal_5', }, - + taskList:[], + listLoading:false }; }, mounted(){ @@ -109,15 +91,84 @@ }, methods:{ checkPermission, + getOrgList() { + let that = this; + let ids = '' + if (that.checkPermission(["record_confirm"])) { + getOrgList({ can_supervision: true }).then((res) => { + let data = res.data; + for(let i=0;i { + let data = res.data; + for(let i=0;i { - if (response.data) { - that.dataList = response.data; + if(that.listQuery.year==''){ + that.listQuery.year = new Date().getFullYear(); + } + that.listQuery.page=0; + getPgoalDeptList(that.listQuery).then((res) => { + debugger; + if (res.data) { + let data0 = res.data; + let data =data0.filter(item=>{ + return item.task2do!==null; + }); + that.dataList.count = data.length; + if(data.length>0){ + let alreadyId = ['000']; + let dataList = [ + {year:that.listQuery.year,dept_name:'集团',dept:'000',pgoal_1:'',pgoal_2:'',pgoal_3:'',pgoal_4:'',pgoal_5:''} + ]; + for(let i=0;i-1){ + }else{ + let obj = {year:that.listQuery.year,dept_name:data[i].belong_dept_name,dept:data[i].belong_dept,pgoal_1:'',pgoal_2:'',pgoal_3:'',pgoal_4:'',pgoal_5:''}; + dataList.push(obj) + alreadyId.push(data[i].belong_dept) + } + index = alreadyId.length-1; + if(data[i].goal_key=='pgoal_1'){ + dataList[0].pgoal_1=data[i].goal_value_a; + dataList[index].pgoal_1=data[i].goal_value_b; + }else if(data[i].goal_key=='pgoal_2'){ + dataList[0].pgoal_2=data[i].goal_value_a; + dataList[index].pgoal_2=data[i].goal_value_b; + }else if(data[i].goal_key=='pgoal_3'){ + dataList[0].pgoal_3=data[i].goal_value_a; + dataList[index].pgoal_3=data[i].goal_value_b; + }else if(data[i].goal_key=='pgoal_4'){ + dataList[0].pgoal_4=data[i].goal_value_a; + dataList[index].pgoal_4=data[i].goal_value_b; + }else if(data[i].goal_key=='pgoal_5'){ + dataList[0].pgoal_5=data[i].goal_value_a; + dataList[index].pgoal_5=data[i].goal_value_b; + } + } + that.dataList.results = dataList; + that.listLoading = false; + } } - that.listLoading = false; + }); + }, resetFilter(){ this.listQuery.search = ''; diff --git a/client/src/views/supervisionNew/complaint_form.vue b/client/src/views/supervisionNew/complaint_form.vue index e52e3ce..9c713ea 100644 --- a/client/src/views/supervisionNew/complaint_form.vue +++ b/client/src/views/supervisionNew/complaint_form.vue @@ -12,7 +12,7 @@ label-position="right" :rules="rules" > - + @@ -28,17 +28,17 @@ > - + - + - - - + + + - + - - + + - - + + - - - + + + @@ -355,7 +355,7 @@ {{ resultsOptions[scope.row.result] }} - + @@ -406,12 +406,12 @@ highlight-current-row :height="tableHeight" > - - + + - - + + - @@ -333,12 +332,12 @@ highlight-current-row height="250px" > - - + + - - + +