总结统计接口调用,处理数据

init
zhusiyu 3 years ago
parent be983d6f5f
commit f925ffeb97

@ -47,60 +47,85 @@
import {Spin,} from 'ant-design-vue';
import interConfig from './interConfig';
import moment from 'moment';
export default{
export default {
props: {
tabIndexNum: Boolean
tabIndexNum: Boolean,
selectTabIndex: Number,
},
data(){
data() {
return {
begin_date: "",
end_date: "",
searchTime: "",
totalRecordJson: {},
spinning: true,
selectTabIndexChild: 1,
}
},
watch: {
selectTabIndex(xin, jiu) {
this.selectTabIndexChild = xin
this.getNowTime()
}
},
mounted() {
this.getNowTime()
},
methods: {
getRecordData () {
getRecordData() {
let timeStr = this.searchTime;
if (timeStr !== "") {
let startDate = timeStr.split("|")[0];
let endDate = timeStr.split("|")[1];
let url = "";
let param = {
begin_date: moment(parseInt(startDate)).format("YYYY-MM-DD"),
end_date: moment(parseInt(endDate)).format("YYYY-MM-DD"),
org_id: this.BaseConfig.person_info_my.bureau_id,
dept_id: this.BaseConfig.person_info_my.dep_id,
};
let method = "";
let isTestLogin = "";
url = interConfig.workSummaryPersonStatistics.url;
param.person_id = this.BaseConfig.userInfo.person_id;
method = interConfig.workSummaryPersonStatistics.method;
isTestLogin = interConfig.workSummaryPersonStatistics.isTestLogin;
this.InterfaceConfig.callInterface([{
url: url,
url: interConfig.workSummaryDeptStatistics.url,
params: param,
method: method,
isTestLogin: isTestLogin,
method: interConfig.workSummaryDeptStatistics.method,
isTestLogin: interConfig.workSummaryDeptStatistics.isTestLogin,
}], (result) => {
this.showLoading = false;
let resData = result[0].data;
console.log('resData', resData)
if (result[0].status === 200) {
if (resData.code === 2000) {
this.spinning = false;
this.totalRecordJson = resData.data;
this.spinning = false
this.spinning = false;
// console.log('-', resData)
if (result[0].data.code === 2000) {
let resData = result[0].data.data;
this.totalRecordJson = {}
if (this.selectTabIndexChild === 1) {
this.totalRecordJson.delay_day_summary = resData.delay_day_summary
this.totalRecordJson.empty_day_summary = resData.empty_day_summary
this.totalRecordJson.total_day_summary = resData.total_day_summary
this.totalRecordJson.total_day_summary = resData.total_day_summary
} else if (this.selectTabIndexChild === 2) {
this.totalRecordJson.delay_day_summary = resData.delay_week_summary
this.totalRecordJson.empty_day_summary = resData.empty_week_summary
this.totalRecordJson.total_day_summary = resData.total_week_summary
this.totalRecordJson.total_day_summary = resData.total_week_summary
} else if (this.selectTabIndexChild === 3) {
this.totalRecordJson.delay_day_summary = resData.delay_month_summary
this.totalRecordJson.empty_day_summary = resData.empty_month_summary
this.totalRecordJson.total_day_summary = resData.total_month_summary
this.totalRecordJson.total_day_summary = resData.total_month_summary
} else if (this.selectTabIndexChild === 4) {
this.totalRecordJson.delay_day_summary = resData.delay_term_summary
this.totalRecordJson.empty_day_summary = resData.empty_term_summary
this.totalRecordJson.total_day_summary = resData.total_term_summary
this.totalRecordJson.total_day_summary = resData.total_term_summary
} else if (this.selectTabIndexChild === 5) {
this.totalRecordJson.delay_day_summary = resData.delay_year_summary
this.totalRecordJson.empty_day_summary = resData.empty_year_summary
this.totalRecordJson.total_day_summary = resData.total_year_summary
this.totalRecordJson.total_day_summary = resData.total_year_summary
}
}
})
}
},
getNowTime () {
getNowTime() {
this.InterfaceConfig.callInterface([{
url: interConfig.getNowTime.url,
params: {},

@ -2,42 +2,42 @@ export default {
/*
* 获取服务器端系统时间
* */
"getNowTime":{
url:'/intellioa/common/getNowTime',
method:'get',
isTestLogin:true
"getNowTime": {
url: '/intellioa/common/getNowTime',
method: 'get',
isTestLogin: true
},
/*
* 个人工作总结统计
* */
"workSummaryPersonStatistics":{
url:'/intellioa/workSummary/workSummaryPersonStatistics',
method:'get',
isTestLogin:true
"workSummaryPersonStatistics": {
url: '/intellioa/workSummary/workSummaryPersonStatistics',
method: 'get',
isTestLogin: true
},
/*
* 部门工作总结统计
* */
"workSummaryDeptStatistics":{
url:'/intellioa/workSummary/workSummaryDeptStatistics',
method:'get',
isTestLogin:true
"workSummaryDeptStatistics": {
url: '/intellioa/workSummary/workSummaryDeptStatistics',
method: 'get',
isTestLogin: true
},
/*
* 机构工作总结统计
* */
"workSummaryOrgStatistics":{
url:'/intellioa/workSummary/workSummaryOrgStatistics',
method:'get',
isTestLogin:true
"workSummaryOrgStatistics": {
url: '/intellioa/workSummary/workSummaryOrgStatistics',
method: 'get',
isTestLogin: true
},
/*
* 总结-个人工作总结概览详情
* */
"workSummaryInfoPersonOverview":{
url:'/intellioa/workSummary/workSummaryInfoPersonOverview',
method:'get',
isTestLogin:true
"workSummaryInfoPersonOverview": {
url: '/intellioa/workSummary/workSummaryInfoPersonOverview',
method: 'get',
isTestLogin: true
},
/*
@ -47,10 +47,10 @@ export default {
* person_id: 22933
* org_id: 400195
* */
"getWorkSummaryPersonCycleStatistics":{
url:'/intellioa/workSummary/workSummaryPersonCycleStatistics',
method:'get',
isTestLogin:true
"getWorkSummaryPersonCycleStatistics": {
url: '/intellioa/workSummary/workSummaryPersonCycleStatistics',
method: 'get',
isTestLogin: true
},
/*
@ -60,10 +60,10 @@ export default {
dept_id: 400316
org_id: 400195
* */
"getWorkSummaryDeptPersonOverview":{
url:'/intellioa/workSummary/workSummaryDeptPersonOverview',
method:'get',
isTestLogin:true
"getWorkSummaryDeptPersonOverview": {
url: '/intellioa/workSummary/workSummaryDeptPersonOverview',
method: 'get',
isTestLogin: true
},
/*
@ -72,18 +72,18 @@ export default {
end_date: 2022-03-29
org_id: 400195
* */
"getWorkSummaryOrgDeptOverview":{
url:'/intellioa/workSummary/workSummaryOrgDeptOverview',
method:'get',
isTestLogin:true
"getWorkSummaryOrgDeptOverview": {
url: '/intellioa/workSummary/workSummaryOrgDeptOverview',
method: 'get',
isTestLogin: true
},
/*
* 个人工作总结概览
* */
"listSuperfusionPersonalWorkSummaryReport":{
url:'/intellioa/workPlan/listSuperfusionPersonalWorkSummaryReport',
method:'get',
isTestLogin:true
"listSuperfusionPersonalWorkSummaryReport": {
url: '/intellioa/workPlan/listSuperfusionPersonalWorkSummaryReport',
method: 'get',
isTestLogin: true
},
}

@ -1,22 +1,22 @@
<template>
<div class="largeSummaryTable">
<a-spin class="brandCreat" :spinning="spinning">
<vue-scroll :ops="listScroll"
:style="showPage?'height:20rem':'height:20rem'"
class="score-list-div">
<a-table :dataSource="dataSource" :columns="columns" bordered :pagination="false"></a-table>
</vue-scroll>
</a-spin>
<vue-scroll :ops="listScroll"
:style="showPage?'height:20rem':'height:20rem'"
class="score-list-div">
<a-table :dataSource="dataSource" :columns="columns" bordered :pagination="false"></a-table>
</vue-scroll>
</div>
</template>
<script>
import {Spin, Table} from 'ant-design-vue';
export default{
data(){
import {Table} from 'ant-design-vue';
import moment from "moment";
import interConfig from './interConfig';
export default {
data() {
return {
showPage: true,
listScroll: this.StaticParams.scrollOption,
spinning: false,
}
},
props: {
@ -30,16 +30,9 @@
}
},
components: {
ASpin: Spin,
ATable: Table,
},
mounted(){
// this.getGoodsByEveryday()
// this.getGoodsBySupplies()
// this.getGoodsByPeople()
},
methods: {},
}
</script>
<style scoped lang="scss">

@ -481,6 +481,7 @@
isTestLogin: interConfig.getWorkSummaryPersonCycleStatistics.isTestLogin,
}], (result) => {
let resData = result[0].data;
// console.log('', resData)
if (resData.code === 2000) {
this.dayList = resData.data.day_list;
this.weekList = resData.data.week_list;

@ -52,24 +52,29 @@
</a-col>
<a-col style="width: calc(29% - 10px) !important;" v-if="tabIndex==1||tabIndex==2">
<bgBox :largeBgTitle="summary">
<deptLargeSummary :tabIndexNum="tabIndexNum"></deptLargeSummary>
<deptLargeSummary :tabIndexNum="tabIndexNum" :selectTabIndex="selectTabIndex"></deptLargeSummary>
</bgBox>
</a-col>
<a-col style="width: calc(33% - 10px) !important;" v-if="tabIndex==1||tabIndex==2">
<bgBox :largeBgTitle="tabIndex==2?deptSummary:orgSummary">
<LargeSummaryTable :dataSource="dataSource" :columns="columns"/>
<a-col style="width: calc(33% - 10px) !important;" v-if="tabIndex==1">
<bgBox :largeBgTitle="deptSummary">
<LargeSummaryTable :dataSource="dataSourceDept" :columns="columnsDept"/>
</bgBox>
</a-col>
<a-col style="width: calc(33% - 10px) !important;" v-if="tabIndex==2">
<bgBox :largeBgTitle="memberSummary">
<LargeSummaryTable :dataSource="dataSourceOrg" :columns="columnsDept"/>
</bgBox>
</a-col>
<a-col style="width: calc(33% - 10px) !important;" v-if="tabIndex==1||tabIndex==2">
<bgBox :largeBgTitle="submitSummary">
<LargeSummaryTable :dataSource="dataSource" :columns="columns"/>
<LargeSummaryTable :dataSource="dataSource" :columns="columnsOrg"/>
</bgBox>
</a-col>
</a-row>
</div>
</template>
<script>
import {Row, Col, Select} from 'ant-design-vue';
import {Row, Col, Select, Spin,} from 'ant-design-vue';
import TabComp from '../common/tabComp.vue';
import bgBox from './bgBox.vue'
import DateChoose from '../common/dateChoose.vue'
@ -85,10 +90,11 @@
export default {
data() {
return {
spinning: true,
summary: '总结概览',
submit: '提交情况',
orgSummary: '部门总结统计',
deptSummary: '成员总结统计',
deptSummary: '部门总结统计',
memberSummary: '成员总结统计',
submitSummary: '提交统计',
begin_date: "",
end_date: "",
@ -96,120 +102,152 @@
tabIndex: 0,
value1: 'jack',
tabIndexNum: false,
dataSource: [
{
key: '1',
goodsName: '胡彦斌',
collectTimes: 32,
collectNum: '88',
delay: '11',
empty: '2',
},
{
key: '2',
goodsName: '胡彦斌',
collectTimes: 32,
collectNum: '88',
delay: '11',
empty: '2',
},
{
key: '3',
goodsName: '胡彦斌',
collectTimes: 32,
collectNum: '88',
delay: '11',
empty: '2',
},
{
key: '4',
goodsName: '胡彦斌',
collectTimes: 32,
collectNum: '88',
delay: '11',
empty: '2',
},
{
key: '5',
goodsName: '胡彦斌',
collectTimes: 32,
collectNum: '88',
delay: '11',
empty: '2',
},
{
key: '6',
goodsName: '胡彦斌',
collectTimes: 32,
collectNum: '88',
delay: '11',
empty: '2',
},
{
key: '7',
goodsName: '胡彦斌',
collectTimes: 32,
collectNum: '88',
delay: '11',
empty: '2',
},
{
key: '8',
goodsName: '胡彦斌',
collectTimes: 32,
collectNum: '88',
delay: '11',
empty: '2',
},
selectTabIndex: 1,
columnsYear: [
{
key: '9',
goodsName: '胡彦斌',
collectTimes: 32,
collectNum: '88',
delay: '11',
empty: '2',
},
{
key: '10',
goodsName: '胡彦斌',
collectTimes: 32,
collectNum: '88',
delay: '11',
empty: '2',
title: '姓名',
dataIndex: 'person_name',
key: 'person_name',
align: 'center',
}, {
title: '应交',
dataIndex: 'should_year_summary',
key: 'should_year_summary',
align: 'center',
}, {
title: '已交',
dataIndex: 'total_year_summary',
key: 'total_year_summary',
align: 'center',
}, {
title: '延期',
dataIndex: 'delay_year_summary',
key: 'delay_year_summary',
align: 'center',
}, {
title: '空缺',
dataIndex: 'empty_year_summary',
key: 'empty_year_summary',
align: 'center',
},
],
columns: [
columnsTerm: [
{
title: '姓名',
dataIndex: 'goodsName',
key: 'goodsName',
dataIndex: 'person_name',
key: 'person_name',
align: 'center',
},
{
}, {
title: '应交',
dataIndex: 'collectTimes',
key: 'collectTimes',
dataIndex: 'should_term_summary',
key: 'should_term_summary',
align: 'center',
}, {
title: '已交',
dataIndex: 'total_term_summary',
key: 'total_term_summary',
align: 'center',
}, {
title: '延期',
dataIndex: 'delay_term_summary',
key: 'delay_term_summary',
align: 'center',
}, {
title: '空缺',
dataIndex: 'empty_term_summary',
key: 'empty_term_summary',
align: 'center',
},
],
columnsMonth: [
{
title: '姓名',
dataIndex: 'person_name',
key: 'person_name',
align: 'center',
}, {
title: '应交',
dataIndex: 'should_month_summary',
key: 'should_month_summary',
align: 'center',
}, {
title: '已交',
dataIndex: 'collectNum',
key: 'collectNum',
dataIndex: 'total_month_summary',
key: 'total_month_summary',
align: 'center',
}, {
title: '延期',
dataIndex: 'delay_month_summary',
key: 'delay_month_summary',
align: 'center',
}, {
title: '空缺',
dataIndex: 'empty_month_summary',
key: 'empty_month_summary',
align: 'center',
},
],
columnsWeek: [
{
title: '姓名',
dataIndex: 'person_name',
key: 'person_name',
align: 'center',
}, {
title: '应交',
dataIndex: 'should_week_summary',
key: 'should_week_summary',
align: 'center',
}, {
title: '已交',
dataIndex: 'total_week_summary',
key: 'total_week_summary',
align: 'center',
}, {
title: '延期',
dataIndex: 'delay',
key: 'delay',
dataIndex: 'delay_week_summary',
key: 'delay_week_summary',
align: 'center',
}, {
title: '空缺',
dataIndex: 'empty_week_summary',
key: 'empty_week_summary',
align: 'center',
},
],
columnsDay: [
{
title: '姓名',
dataIndex: 'person_name',
key: 'person_name',
align: 'center',
}, {
title: '应交',
dataIndex: 'should_day_summary',
key: 'should_day_summary',
align: 'center',
}, {
title: '已交',
dataIndex: 'total_day_summary',
key: 'total_day_summary',
align: 'center',
}, {
title: '延期',
dataIndex: 'delay_day_summary',
key: 'delay_day_summary',
align: 'center',
}, {
title: '空缺',
dataIndex: 'empty',
key: 'empty',
dataIndex: 'empty_day_summary',
key: 'empty_day_summary',
align: 'center',
},
],
columnsDept: [],
columnsOrg: [],
dataSourceDept: [],
dataSourceOrg: [],
dataSource: [],
selectedItemDay: true,
selectedItemWeek: false,
selectedItemMon: false,
@ -225,6 +263,7 @@
}
},
created() {
this.columnsDept = this.columnsDay
//
this.depAdmin = OfficeMenuConfig.menuIsExist(["daliyOffice", "newPlanConclusion", "plan_summary_statistics", "dept"]);
if (this.depAdmin) {
@ -238,44 +277,47 @@
this.getNowTime();
},
methods: {
// mySummaryFn(index) {
// this.tabIndex = index
// if (this.tabIndex == 2) {
// this.tabIndexNum = true
// } else {
// this.tabIndexNum = false
// }
// },
chooseItem(index) {
this.selectTabIndex = index
switch (index) {
case 1:
this.selectedItemDay = true
this.selectedItemWeek = this.selectedItemMon = this.selectedItemTerm = this.selectedItemYear = false
this.columnsDept = this.columnsDay
break;
case 2:
this.selectedItemWeek = true
this.selectedItemDay = this.selectedItemMon = this.selectedItemTerm = this.selectedItemYear = false
this.columnsDept = this.columnsWeek
break;
case 3:
this.selectedItemMon = true
this.selectedItemDay = this.selectedItemWeek = this.selectedItemTerm = this.selectedItemYear = false
this.columnsDept = this.columnsMonth
break;
case 4:
this.selectedItemTerm = true
this.selectedItemDay = this.selectedItemWeek = this.selectedItemMon = this.selectedItemYear = false
this.columnsDept = this.columnsTerm
break;
case 5:
this.selectedItemYear = true
this.selectedItemDay = this.selectedItemWeek = this.selectedItemMon = this.selectedItemTerm = false
this.columnsDept = this.columnsYear
break;
}
this.getWorkSummaryDeptPersonOverview()
this.getWorkSummaryOrgDeptOverview()
},
tabChange: function (param) {
if (this.tabIndex != param.index) {
this.tabIndex = param.index;
this.pageType = param.cbName;
}
if (param.index == 2) {
if (param.index == 1) {
this.getWorkSummaryDeptPersonOverview()
this.tabIndexNum = false
} else if (param.index == 2) {
this.tabIndexNum = true
} else {
this.tabIndexNum = false
@ -302,15 +344,70 @@
this.begin_date = moment(year + "-" + month + "-01");
this.end_date = moment(year + "-" + month + "-" + day);
this.searchTime = this.begin_date + "|" + this.end_date;
this.getWorkSummaryDeptPersonOverview()
this.getWorkSummaryOrgDeptOverview()
}
}
})
},
getWorkSummaryDeptPersonOverview() {
let timeStr = this.searchTime;
if (timeStr !== "") {
let startDate = timeStr.split("|")[0];
let endDate = timeStr.split("|")[1];
let param = {
begin_date: moment(parseInt(startDate)).format("YYYY-MM-DD"),
end_date: moment(parseInt(endDate)).format("YYYY-MM-DD"),
org_id: this.BaseConfig.person_info_my.bureau_id,
dept_id: this.BaseConfig.person_info_my.dep_id,
};
this.InterfaceConfig.callInterface([{
url: interConfig.getWorkSummaryDeptPersonOverview.url,
params: param,
method: interConfig.getWorkSummaryDeptPersonOverview.method,
isTestLogin: interConfig.getWorkSummaryDeptPersonOverview.isTestLogin,
}], (result) => {
// console.log('', result)
if (result[0].data.code === 2000) {
this.spinning = false
let resData = result[0].data;
let dataSource = resData.data.person_list;//12345
this.dataSourceDept = dataSource
// console.log('', this.dataSourceDept)
}
})
}
},
getWorkSummaryOrgDeptOverview: function () {
let timeStr = this.searchTime;
if (timeStr !== "") {
let startDate = timeStr.split("|")[0];
let endDate = timeStr.split("|")[1];
let param = {
begin_date: moment(parseInt(startDate)).format("YYYY-MM-DD"),
end_date: moment(parseInt(endDate)).format("YYYY-MM-DD"),
org_id: this.BaseConfig.person_info_my.bureau_id,
};
this.InterfaceConfig.callInterface([{
url: interConfig.getWorkSummaryOrgDeptOverview.url,
params: param,
method: interConfig.getWorkSummaryOrgDeptOverview.method,
isTestLogin: interConfig.getWorkSummaryOrgDeptOverview.isTestLogin,
}], (result) => {
if (result[0].data.code === 2000) {
let resData = result[0].data;
this.dataSourceOrg = resData.data.dept_list;
// console.log('', this.dataSourceOrg)
}
})
}
},
handleChange() {
},
},
components: {
ASpin: Spin,
ARow: Row,
ACol: Col,
ASelect: Select,

Loading…
Cancel
Save