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

init
zhusiyu 3 years ago
parent be983d6f5f
commit f925ffeb97

@ -47,60 +47,85 @@
import {Spin,} from 'ant-design-vue'; import {Spin,} from 'ant-design-vue';
import interConfig from './interConfig'; import interConfig from './interConfig';
import moment from 'moment'; import moment from 'moment';
export default{
export default {
props: { props: {
tabIndexNum: Boolean tabIndexNum: Boolean,
selectTabIndex: Number,
}, },
data(){ data() {
return { return {
begin_date: "", begin_date: "",
end_date: "", end_date: "",
searchTime: "", searchTime: "",
totalRecordJson: {}, totalRecordJson: {},
spinning: true, spinning: true,
selectTabIndexChild: 1,
}
},
watch: {
selectTabIndex(xin, jiu) {
this.selectTabIndexChild = xin
this.getNowTime()
} }
}, },
mounted() { mounted() {
this.getNowTime() this.getNowTime()
}, },
methods: { methods: {
getRecordData () { getRecordData() {
let timeStr = this.searchTime; let timeStr = this.searchTime;
if (timeStr !== "") { if (timeStr !== "") {
let startDate = timeStr.split("|")[0]; let startDate = timeStr.split("|")[0];
let endDate = timeStr.split("|")[1]; let endDate = timeStr.split("|")[1];
let url = "";
let param = { let param = {
begin_date: moment(parseInt(startDate)).format("YYYY-MM-DD"), begin_date: moment(parseInt(startDate)).format("YYYY-MM-DD"),
end_date: moment(parseInt(endDate)).format("YYYY-MM-DD"), end_date: moment(parseInt(endDate)).format("YYYY-MM-DD"),
org_id: this.BaseConfig.person_info_my.bureau_id, 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([{ this.InterfaceConfig.callInterface([{
url: url, url: interConfig.workSummaryDeptStatistics.url,
params: param, params: param,
method: method, method: interConfig.workSummaryDeptStatistics.method,
isTestLogin: isTestLogin, isTestLogin: interConfig.workSummaryDeptStatistics.isTestLogin,
}], (result) => { }], (result) => {
this.showLoading = false; this.spinning = false;
let resData = result[0].data; // console.log('-', resData)
console.log('resData', resData) if (result[0].data.code === 2000) {
if (result[0].status === 200) { let resData = result[0].data.data;
if (resData.code === 2000) { this.totalRecordJson = {}
this.spinning = false; if (this.selectTabIndexChild === 1) {
this.totalRecordJson = resData.data; this.totalRecordJson.delay_day_summary = resData.delay_day_summary
this.spinning = false 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([{ this.InterfaceConfig.callInterface([{
url: interConfig.getNowTime.url, url: interConfig.getNowTime.url,
params: {}, params: {},

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

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

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

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

Loading…
Cancel
Save