物品实用统计、总结统计,部门按钮接口处理

init
zhusiyu 3 years ago
parent be2ef7962a
commit db7b353880

@ -59,6 +59,8 @@
depObjs: [], depObjs: [],
selectDeps: [], selectDeps: [],
chartsOption: {}, chartsOption: {},
selected_data: {},
deptId: this.BaseConfig.person_info_my.dep_id,
} }
}, },
props: ['dataFlag'], props: ['dataFlag'],
@ -85,6 +87,19 @@
this.depNames = depNames; this.depNames = depNames;
this.selectDeps = depObjs; this.selectDeps = depObjs;
}, },
selected_data: {
handler(select_data) {
if (select_data.length == 0) {
this.deptId = this.BaseConfig.person_info_my.dep_id;
} else {
this.deptId = select_data[select_data.length - 1].id
this.byPeople()
this.bySupplies()
this.byEveryday()
}
},
immediate: true
},
}, },
components: { components: {
AIcon: Icon, AIcon: Icon,
@ -110,8 +125,13 @@
if (echart == null) { if (echart == null) {
echart = echarts.init(document.getElementById('deptmain')); echart = echarts.init(document.getElementById('deptmain'));
} }
console.log('this.chartsOption', this.chartsOption) //console.log('this.chartsOption', this.chartsOption)
echart.setOption(this.chartsOption) echart.setOption(this.chartsOption)
window.addEventListener("resize", () => {
if (myEchart) {
myEchart.resize()
}
})
}, },
// //
showDepts() { showDepts() {
@ -126,6 +146,7 @@
selectComplete: function (selectedData) { selectComplete: function (selectedData) {
this.depObjs = selectedData; this.depObjs = selectedData;
this.showDepPanel = false; this.showDepPanel = false;
this.selected_data = selectedData
}, },
// //
endDate(end_date) { endDate(end_date) {
@ -168,9 +189,10 @@
}, },
// //
bySupplies() { bySupplies() {
this.spinning = true
let param = { let param = {
person_id: this.BaseConfig.userInfo.person_id,//ID person_id: this.BaseConfig.userInfo.person_id,//ID
dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2 dept_id: this.deptId,//data_flag=2
org_id: this.BaseConfig.person_info_my.bureau_id, //ID org_id: this.BaseConfig.person_info_my.bureau_id, //ID
data_flag: this.dataFlag,// =123 data_flag: this.dataFlag,// =123
start_date: this.begin_date, //2020-12-15 start_date: this.begin_date, //2020-12-15
@ -195,9 +217,10 @@
}, },
// //
byPeople() { byPeople() {
this.spinning = true
let param = { let param = {
person_id: this.BaseConfig.userInfo.person_id,//ID person_id: this.BaseConfig.userInfo.person_id,//ID
dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2 dept_id: this.deptId,//data_flag=2
org_id: this.BaseConfig.person_info_my.bureau_id, //ID org_id: this.BaseConfig.person_info_my.bureau_id, //ID
data_flag: this.dataFlag,// =123 data_flag: this.dataFlag,// =123
start_date: this.begin_date, //2020-12-15 start_date: this.begin_date, //2020-12-15
@ -222,9 +245,10 @@
}, },
// //
byEveryday() { byEveryday() {
this.spinning = true
let param = { let param = {
person_id: this.BaseConfig.userInfo.person_id,//ID person_id: this.BaseConfig.userInfo.person_id,//ID
dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2 dept_id: this.deptId,//data_flag=2
org_id: this.BaseConfig.person_info_my.bureau_id, //ID org_id: this.BaseConfig.person_info_my.bureau_id, //ID
data_flag: this.dataFlag,// =123 data_flag: this.dataFlag,// =123
start_date: this.begin_date, //2020-12-15 start_date: this.begin_date, //2020-12-15

@ -73,7 +73,6 @@
if (echart == null) { if (echart == null) {
echart = echarts.init(document.getElementById('deptmain')); echart = echarts.init(document.getElementById('deptmain'));
} }
console.log('this.chartsOption', this.chartsOption)
echart.setOption(this.chartsOption) echart.setOption(this.chartsOption)
}, },
// //

@ -146,6 +146,8 @@
optionBot: {}, optionBot: {},
top_eachrts_show: true, top_eachrts_show: true,
bot_eachrts_show: true, bot_eachrts_show: true,
selected_data: {},
deptId: this.BaseConfig.person_info_my.dep_id,
} }
}, },
watch: { watch: {
@ -171,6 +173,18 @@
this.depNames = depNames; this.depNames = depNames;
this.selectDeps = depObjs; this.selectDeps = depObjs;
}, },
selected_data: {
handler(select_data) {
if (select_data.length == 0) {
this.deptId = this.BaseConfig.person_info_my.dep_id;
} else {
this.deptId = select_data[select_data.length - 1].id
this.byPeople()
this.bySupplies()
}
},
immediate: true
},
}, },
props: ['dataFlag'], props: ['dataFlag'],
components: { components: {
@ -213,7 +227,7 @@
bySupplies() { bySupplies() {
let param = { let param = {
person_id: this.BaseConfig.userInfo.person_id,//ID person_id: this.BaseConfig.userInfo.person_id,//ID
dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2 dept_id: this.deptId,//data_flag=2
org_id: this.BaseConfig.person_info_my.bureau_id, //ID org_id: this.BaseConfig.person_info_my.bureau_id, //ID
data_flag: this.dataFlag,// =123 data_flag: this.dataFlag,// =123
start_date: this.begin_date, //2020-12-15 start_date: this.begin_date, //2020-12-15
@ -250,7 +264,7 @@
byPeople() { byPeople() {
let param = { let param = {
person_id: this.BaseConfig.userInfo.person_id,//ID person_id: this.BaseConfig.userInfo.person_id,//ID
dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2 dept_id: this.deptId,//data_flag=2
org_id: this.BaseConfig.person_info_my.bureau_id, //ID org_id: this.BaseConfig.person_info_my.bureau_id, //ID
data_flag: this.dataFlag,// =123 data_flag: this.dataFlag,// =123
start_date: this.begin_date, //2020-12-15 start_date: this.begin_date, //2020-12-15
@ -294,6 +308,7 @@
selectComplete(selectedData) { selectComplete(selectedData) {
this.depObjs = selectedData; this.depObjs = selectedData;
this.showDepPanel = false; this.showDepPanel = false;
this.selected_data = selectedData
}, },
// //
endDate(end_date) { endDate(end_date) {

@ -100,6 +100,7 @@
end_date: "", end_date: "",
totalRecordJson: {}, totalRecordJson: {},
spinning: true, spinning: true,
dataSearchTime: this.searchTime,
} }
}, },
mounted() { mounted() {
@ -112,7 +113,7 @@
searchTime: { searchTime: {
handler(time) { handler(time) {
if (time !== "") { if (time !== "") {
this.searchTime = time; this.dataSearchTime = time;
this.getNowTime(); this.getNowTime();
} }
}, },
@ -122,7 +123,7 @@
methods: { methods: {
//- //-
workSummaryPersonOverview() { workSummaryPersonOverview() {
let timeStr = this.searchTime; let timeStr = this.dataSearchTime;
if (timeStr !== "") { if (timeStr !== "") {
let startDate = timeStr.split("|")[0]; let startDate = timeStr.split("|")[0];
let endDate = timeStr.split("|")[1]; let endDate = timeStr.split("|")[1];

@ -83,6 +83,11 @@
type: Number, type: Number,
searchTime: String, searchTime: String,
largeSummary: Boolean, largeSummary: Boolean,
selectedData: {
type: Object,
default: () => {
}
}
}, },
data() { data() {
return { return {
@ -392,6 +397,7 @@
{id: 4, value: "周报"}, {id: 4, value: "周报"},
], ],
tabKey: 5, tabKey: 5,
deptId: this.BaseConfig.person_info_my.dep_id,
} }
}, },
watch: { watch: {
@ -414,8 +420,8 @@
immediate: true immediate: true
}, },
searchTime: { searchTime: {
handler(time) { handler(time, oldTime) {
if (time !== "") { if (time !== "" && oldTime != time && oldTime != 'undefined') {
this.searchTime = time; this.searchTime = time;
if (this.type === 1) { if (this.type === 1) {
this.getWorkSummaryPersonCycleStatistics(); this.getWorkSummaryPersonCycleStatistics();
@ -428,6 +434,17 @@
}, },
immediate: true immediate: true
}, },
selectedData: {
handler(select_data) {
if (select_data.length == 0) {
this.deptId = this.BaseConfig.person_info_my.dep_id;
} else {
this.deptId = select_data[0].id
this.getWorkSummaryDeptPersonOverview()
}
},
immediate: true
},
}, },
mounted() { mounted() {
if (this.type !== 1) { if (this.type !== 1) {
@ -465,6 +482,7 @@
this.tabChange(tabKey, index); this.tabChange(tabKey, index);
}, },
getWorkSummaryPersonCycleStatistics: function () { getWorkSummaryPersonCycleStatistics: function () {
this.spinning1 = true
let timeStr = this.searchTime; let timeStr = this.searchTime;
if (timeStr !== "") { if (timeStr !== "") {
let startDate = timeStr.split("|")[0]; let startDate = timeStr.split("|")[0];
@ -493,6 +511,7 @@
} }
}, },
getWorkSummaryDeptPersonOverview: function () { getWorkSummaryDeptPersonOverview: function () {
this.spinning2 = true
let timeStr = this.searchTime; let timeStr = this.searchTime;
if (timeStr !== "") { if (timeStr !== "") {
let startDate = timeStr.split("|")[0]; let startDate = timeStr.split("|")[0];
@ -501,25 +520,26 @@
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, dept_id: this.deptId,
}; };
this.InterfaceConfig.callInterface([{ this.InterfaceConfig.callInterface([{
url: interConfig.getWorkSummaryDeptPersonOverview.url, url: interConfig.workSummaryDeptPersonOverview.url,
params: param, params: param,
method: interConfig.getWorkSummaryDeptPersonOverview.method, method: interConfig.workSummaryDeptPersonOverview.method,
isTestLogin: interConfig.getWorkSummaryDeptPersonOverview.isTestLogin, isTestLogin: interConfig.workSummaryDeptPersonOverview.isTestLogin,
}], (result) => { }], (result) => {
this.spinning2 = false
let resData = result[0].data; let resData = result[0].data;
if (resData.code === 2000) { if (resData.code === 2000) {
let dataSource = resData.data.person_list;//12345 let dataSource = resData.data.person_list;//12345
this.dataSourceDept = dataSource this.dataSourceDept = dataSource
this.spinning2 = false
this.changeType(); this.changeType();
} }
}) })
} }
}, },
getWorkSummaryOrgDeptOverview: function () { getWorkSummaryOrgDeptOverview: function () {
this.spinning3 = true
let timeStr = this.searchTime; let timeStr = this.searchTime;
if (timeStr !== "") { if (timeStr !== "") {
let startDate = timeStr.split("|")[0]; let startDate = timeStr.split("|")[0];
@ -530,10 +550,10 @@
org_id: this.BaseConfig.person_info_my.bureau_id, org_id: this.BaseConfig.person_info_my.bureau_id,
}; };
this.InterfaceConfig.callInterface([{ this.InterfaceConfig.callInterface([{
url: interConfig.getWorkSummaryOrgDeptOverview.url, url: interConfig.workSummaryOrgDeptOverview.url,
params: param, params: param,
method: interConfig.getWorkSummaryOrgDeptOverview.method, method: interConfig.workSummaryOrgDeptOverview.method,
isTestLogin: interConfig.getWorkSummaryOrgDeptOverview.isTestLogin, isTestLogin: interConfig.workSummaryOrgDeptOverview.isTestLogin,
}], (result) => { }], (result) => {
let resData = result[0].data; let resData = result[0].data;
//console.log('', resData) //console.log('', resData)

@ -1,44 +1,45 @@
<template> <template>
<div class="summary-total-record-box-style"> <div class="summary-total-record-box-style">
<div class="part-title">{{title}}</div> <div class="part-title">{{title}}</div>
<div v-if="!spinning" class="part-content"> <a-spin :spinning="spinning" style="width: 100%;height: 100%;">
<div class="record-item-box-style"> <div class="part-content">
<div class="info-row-style default-style">应交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div> <div class="record-item-box-style">
<div class="info-row-style default-style">已交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div> <div class="info-row-style default-style">应交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style warning-style">延期&nbsp;&nbsp;{{totalRecordJson.delay_day_summary}}</div> <div class="info-row-style default-style">已交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style danger-style">空缺&nbsp;&nbsp;{{totalRecordJson.empty_day_summary}}</div> <div class="info-row-style warning-style">延期&nbsp;&nbsp;{{totalRecordJson.delay_day_summary}}</div>
<div class="triangle"><span>日报</span></div> <div class="info-row-style danger-style">空缺&nbsp;&nbsp;{{totalRecordJson.empty_day_summary}}</div>
<div class="triangle"><span>日报</span></div>
</div>
<div class="record-item-box-style">
<div class="info-row-style default-style">应交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style default-style">已交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style warning-style">延期&nbsp;&nbsp;{{totalRecordJson.delay_week_summary}}</div>
<div class="info-row-style danger-style">空缺&nbsp;&nbsp;{{totalRecordJson.empty_week_summary}}</div>
<div class="triangle"><span>周报</span></div>
</div>
<div class="record-item-box-style">
<div class="info-row-style default-style">应交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style default-style">已交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style warning-style">延期&nbsp;&nbsp;{{totalRecordJson.delay_month_summary}}
</div>
<div class="info-row-style danger-style">空缺&nbsp;&nbsp;{{totalRecordJson.empty_month_summary}}</div>
<div class="triangle"><span>月报</span></div>
</div>
<div class="record-item-box-style">
<div class="info-row-style default-style">应交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style default-style">已交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style warning-style">延期&nbsp;&nbsp;{{totalRecordJson.delay_term_summary}}</div>
<div class="info-row-style danger-style">空缺&nbsp;&nbsp;{{totalRecordJson.empty_term_summary}}</div>
<div class="triangle"><span>学期</span></div>
</div>
<div class="record-item-box-style">
<div class="info-row-style default-style">应交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style default-style">已交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style warning-style">延期&nbsp;&nbsp;{{totalRecordJson.delay_year_summary}}</div>
<div class="info-row-style danger-style">空缺&nbsp;&nbsp;{{totalRecordJson.empty_year_summary}}</div>
<div class="triangle"><span>学年</span></div>
</div>
</div> </div>
<div class="record-item-box-style">
<div class="info-row-style default-style">应交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style default-style">已交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style warning-style">延期&nbsp;&nbsp;{{totalRecordJson.delay_week_summary}}</div>
<div class="info-row-style danger-style">空缺&nbsp;&nbsp;{{totalRecordJson.empty_week_summary}}</div>
<div class="triangle"><span>周报</span></div>
</div>
<div class="record-item-box-style">
<div class="info-row-style default-style">应交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style default-style">已交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style warning-style">延期&nbsp;&nbsp;{{totalRecordJson.delay_month_summary}}</div>
<div class="info-row-style danger-style">空缺&nbsp;&nbsp;{{totalRecordJson.empty_month_summary}}</div>
<div class="triangle"><span>月报</span></div>
</div>
<div class="record-item-box-style">
<div class="info-row-style default-style">应交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style default-style">已交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style warning-style">延期&nbsp;&nbsp;{{totalRecordJson.delay_term_summary}}</div>
<div class="info-row-style danger-style">空缺&nbsp;&nbsp;{{totalRecordJson.empty_term_summary}}</div>
<div class="triangle"><span>学期</span></div>
</div>
<div class="record-item-box-style">
<div class="info-row-style default-style">应交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style default-style">已交&nbsp;&nbsp;{{totalRecordJson.total_day_summary}}</div>
<div class="info-row-style warning-style">延期&nbsp;&nbsp;{{totalRecordJson.delay_year_summary}}</div>
<div class="info-row-style danger-style">空缺&nbsp;&nbsp;{{totalRecordJson.empty_year_summary}}</div>
<div class="triangle"><span>学年</span></div>
</div>
</div>
<a-spin v-else="spinning">
</a-spin> </a-spin>
</div> </div>
</template> </template>
@ -47,20 +48,27 @@
* type: person 累计汇总 dept 部门汇总 org 机构汇总 * type: person 累计汇总 dept 部门汇总 org 机构汇总
* *
* */ * */
import interConfig from '../interConfig'; import interConfig from '../interConfig'
import moment from 'moment'; import moment from 'moment'
import {Spin} from 'ant-design-vue'; import {Spin} from 'ant-design-vue'
export default { export default {
props: { props: {
type: Number, type: Number,
searchTime: String, searchTime: String,
selectedData: {
type: Object,
default: () => {
}
}
}, },
data() { data() {
return { return {
title: "", title: "",
totalRecordJson: {}, totalRecordJson: {},
spinning: false, spinning: true,
deptId: this.BaseConfig.person_info_my.dep_id,
} }
}, },
watch: { watch: {
@ -68,10 +76,13 @@
handler(val) { handler(val) {
if (val === 1) { if (val === 1) {
this.title = "总结概览"; this.title = "总结概览";
this.deptBtnShow = false
} else if (val === 2) { } else if (val === 2) {
this.title = "部门总结汇总"; this.title = "部门总结汇总";
this.deptBtnShow = true
} else if (val === 3) { } else if (val === 3) {
this.title = "机构总结汇总"; this.title = "机构总结汇总";
this.deptBtnShow = false
} }
this.type = val; this.type = val;
this.getRecordData(); this.getRecordData();
@ -79,14 +90,25 @@
immediate: true immediate: true
}, },
searchTime: { searchTime: {
handler(time) { handler(time, oldTime) {
if (time !== "") { if (time !== "" && oldTime != time && oldTime != 'undefined') {
this.searchTime = time; this.searchTime = time;
this.getRecordData(); this.getRecordData();
} }
}, },
immediate: true immediate: true
} },
selectedData: {
handler(select_data) {
if (select_data.length == 0) {
this.deptId = this.BaseConfig.person_info_my.dep_id;
} else {
this.deptId = select_data[0].id
this.getRecordData()
}
},
immediate: true
},
}, },
methods: { methods: {
getRecordData: function () { getRecordData: function () {
@ -103,19 +125,20 @@
let method = ""; let method = "";
let isTestLogin = ""; let isTestLogin = "";
if (this.type === 1) { if (this.type === 1) {
url = interConfig.workSummaryPersonStatistics.url; url = interConfig.workSummaryPersonOverview.url;
param.person_id = this.BaseConfig.userInfo.person_id; param.person_id = this.BaseConfig.userInfo.person_id;
method = interConfig.workSummaryPersonStatistics.method; method = interConfig.workSummaryPersonOverview.method;
isTestLogin = interConfig.workSummaryPersonStatistics.isTestLogin; isTestLogin = interConfig.workSummaryPersonOverview.isTestLogin;
} else if (this.type === 2) { } else if (this.type === 2) {
url = interConfig.workSummaryDeptStatistics.url; url = interConfig.workSummaryDeptOverview.url;
param.dept_id = this.BaseConfig.person_info_my.dep_id; // param.dept_id = this.BaseConfig.person_info_my.dep_id;
method = interConfig.workSummaryDeptStatistics.method; param.dept_id = this.deptId;
isTestLogin = interConfig.workSummaryDeptStatistics.isTestLogin; method = interConfig.workSummaryDeptOverview.method;
isTestLogin = interConfig.workSummaryDeptOverview.isTestLogin;
} else if (this.type === 3) { } else if (this.type === 3) {
url = interConfig.workSummaryOrgStatistics.url; url = interConfig.workSummaryOrgOverview.url;
method = interConfig.workSummaryOrgStatistics.method; method = interConfig.workSummaryOrgOverview.method;
isTestLogin = interConfig.workSummaryOrgStatistics.isTestLogin; isTestLogin = interConfig.workSummaryOrgOverview.isTestLogin;
} }
this.spinning = true; this.spinning = true;
this.InterfaceConfig.callInterface([{ this.InterfaceConfig.callInterface([{
@ -124,25 +147,18 @@
method: method, method: method,
isTestLogin: isTestLogin, isTestLogin: isTestLogin,
}], (result) => { }], (result) => {
this.showLoading = false; this.spinning = false;
let resData = result[0].data; let resData = result[0].data;
// console.log('-', resData.data) //console.log('-', resData)
if (result[0].status === 200) { if (resData.code === 2000) {
if (resData.code === 2000) { this.totalRecordJson = resData.data;
this.spinning = false;
this.totalRecordJson = resData.data;
} else {
this.spinning = false;
}
} else {
this.spinning = false;
} }
}) })
} }
} },
}, },
components: { components: {
ASpin: Spin ASpin: Spin,
} }
} }
</script> </script>

@ -95,7 +95,7 @@ export default {
method: 'get', method: 'get',
isTestLogin: true isTestLogin: true
}, },
//我的总结-总结概览 //我的总结-总结概览 √√√√√√《总结-个人》工作总结概览
"workSummaryPersonOverview": { "workSummaryPersonOverview": {
url: '/intellioa/workSummary/workSummaryPersonOverview', url: '/intellioa/workSummary/workSummaryPersonOverview',
method: 'get', method: 'get',

@ -1,16 +1,20 @@
<template> <template>
<div class="summary-record-div"> <div class="summary-record-div">
<TabComp :tabArr="tabArr" showName="title" @tabChange="tabChange" cbName="type"></TabComp> <TabComp :tabArr="tabArr" showName="title" @tabChange="tabChange" cbName="type"></TabComp>
<DateChoose @startDate="startDate" @endDate="endDate" :deptSelect="deptSelect" :begin_date="begin_date" <DateChoose @startDate="startDate" @endDate="endDate" :begin_date="begin_date"
:end_date="end_date"></DateChoose> :end_date="end_date"></DateChoose>
<TotalRecord :type="pageType" :searchTime="searchTime"/> <TotalRecord :type="pageType" :searchTime="searchTime" :selectedData="selectedData"/>
<SubmitInfo :type="pageType" :searchTime="searchTime"/> <SubmitInfo :type="pageType" :searchTime="searchTime" :selectedData="selectedData"/>
<a-button v-if="deptBtnShow" type="primary" ghost class="deptBtn" @click="showDepts"></a-button>
<select-department key="dep-select-com" :show="showDepPanel" modalTitle="部门选择" :selectedDepart="selectDeps"
@cancel="closeDepPanel" @selectComplete="selectComplete" :isMultipleChoice="true"/>
</div> </div>
</template> </template>
<script> <script>
/* /*
* 总结统计 * 总结统计
* */ * */
import {Button} from 'ant-design-vue'
import TabComp from '../common/tabComp.vue'; import TabComp from '../common/tabComp.vue';
import DateChoose from '../common/dateChoose.vue'; import DateChoose from '../common/dateChoose.vue';
import TotalRecord from './component/totalRecord.vue'; import TotalRecord from './component/totalRecord.vue';
@ -18,6 +22,7 @@
import OfficeMenuConfig from '../../../../../../../../src/utils/officeMenuConfig'; import OfficeMenuConfig from '../../../../../../../../src/utils/officeMenuConfig';
import interConfig from './interConfig'; import interConfig from './interConfig';
import moment from 'moment'; import moment from 'moment';
import SelectDepartment from '../../../../../../../components/common/selectDepartment/SelectDepartment'
export default { export default {
@ -34,9 +39,37 @@
tabIndex: 0, tabIndex: 0,
totalRecordJson: {}, totalRecordJson: {},
searchTime: "", searchTime: "",
deptSelect: false, showDepPanel: false,
depObjs: [],
selectDeps: [],
deptBtnShow: false,
selectedData: {}
} }
}, },
watch: {
depObjs: function (newVal) {
let depObjs = [];
let depNames = "全部";
let depIds = "";
if (newVal.length > 0) {
depNames = "";
for (let i = 0, len = newVal.length; i < len; i++) {
let dom = {
id: newVal[i].id,
name: newVal[i].name
}
depIds += dom.id + ",";
depNames += dom.name + ",";
depObjs.push(dom);
}
depIds = depIds.substring(0, depIds.length - 1);
depNames = depNames.substring(0, depNames.length - 1);
}
this.depIds = depIds;
this.depNames = depNames;
this.selectDeps = depObjs;
},
},
created() { created() {
// //
this.depAdmin = OfficeMenuConfig.menuIsExist(["daliyOffice", "newPlanConclusion", "plan_summary_statistics", "dept"]); this.depAdmin = OfficeMenuConfig.menuIsExist(["daliyOffice", "newPlanConclusion", "plan_summary_statistics", "dept"]);
@ -76,10 +109,10 @@
this.tabIndex = param.index; this.tabIndex = param.index;
this.pageType = param.cbName; this.pageType = param.cbName;
} }
if (param.index == 1) { if (param.index === 1) {
this.deptSelect = true this.deptBtnShow = true
} else { } else {
this.deptSelect = false this.deptBtnShow = false
} }
}, },
// //
@ -92,32 +125,49 @@
this.begin_date = begin_date this.begin_date = begin_date
this.searchTime = this.begin_date + "|" + this.end_date; this.searchTime = this.begin_date + "|" + this.end_date;
}, },
getWorkSummaryPersonCycleStatistics: function () { //
let param = { showDepts() {
person_id: this.BaseConfig.userInfo.person_id, if (!this.showDepPanel || this.showDepPanel) {
org_id: this.BaseConfig.person_info_my.bureau_id, this.showDepPanel = true
} }
if (this.begin_date) { },
param.begin_date = moment(this.begin_date).format("YYYY-MM-DD"); selectComplete: function (selectedData) {
} this.depObjs = selectedData;
if (this.end_date) { this.showDepPanel = false;
param.end_date = moment(this.end_date).format("YYYY-MM-DD"); this.selectedData = selectedData
} },
this.InterfaceConfig.callInterface([{ //
url: interConfig.getWorkSummaryPersonCycleStatistics.url, closeDepPanel() {
params: param, this.showDepPanel = false;
method: interConfig.getWorkSummaryPersonCycleStatistics.method, },
isTestLogin: interConfig.getWorkSummaryPersonCycleStatistics.isTestLogin, // getWorkSummaryPersonCycleStatistics: function () {
}], (result) => { // let param = {
let resData = result[0].data; // person_id: this.BaseConfig.userInfo.person_id,
if (resData.code === 2000) { // org_id: this.BaseConfig.person_info_my.bureau_id,
this.dataList = resData.data; // }
} // if (this.begin_date) {
}) // param.begin_date = moment(this.begin_date).format("YYYY-MM-DD");
// }
} // if (this.end_date) {
// param.end_date = moment(this.end_date).format("YYYY-MM-DD");
// }
// this.InterfaceConfig.callInterface([{
// url: interConfig.getWorkSummaryPersonCycleStatistics.url,
// params: param,
// method: interConfig.getWorkSummaryPersonCycleStatistics.method,
// isTestLogin: interConfig.getWorkSummaryPersonCycleStatistics.isTestLogin,
// }], (result) => {
// let resData = result[0].data;
// if (resData.code === 2000) {
// this.dataList = resData.data;
// }
// })
//
// }
}, },
components: { components: {
AButton: Button,
SelectDepartment,
TabComp, TabComp,
DateChoose, DateChoose,
TotalRecord, TotalRecord,
@ -133,5 +183,17 @@
padding: 0.5rem; padding: 0.5rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative;
.deptBtn {
border: 1px solid #00FFFF;
color: #00ffff;
width: 70px;
height: 23px;
padding: 0;
text-align: center;
position: absolute;
top: 60px;
right: 40px;
}
} }
</style> </style>

@ -438,6 +438,8 @@
showDepPanel: false, showDepPanel: false,
depObjs: [], depObjs: [],
selectDeps: [], selectDeps: [],
selected_data: {},
deptId: this.BaseConfig.person_info_my.dep_id,
} }
}, },
watch: { watch: {
@ -472,6 +474,18 @@
this.depNames = depNames; this.depNames = depNames;
this.selectDeps = depObjs; this.selectDeps = depObjs;
}, },
selected_data: {
handler(select_data) {
if (select_data.length == 0) {
this.deptId = this.BaseConfig.person_info_my.dep_id;
} else {
this.deptId = select_data[select_data.length - 1].id
this.workSummaryDeptPersonOverview()
this.workSummaryDeptCycleStatistics()
}
},
immediate: true
},
}, },
created() { created() {
this.columnsOrg = this.columnsDayOrg this.columnsOrg = this.columnsDayOrg
@ -498,6 +512,7 @@
selectComplete: function (selectedData) { selectComplete: function (selectedData) {
this.depObjs = selectedData; this.depObjs = selectedData;
this.showDepPanel = false; this.showDepPanel = false;
this.selected_data = selectedData
}, },
// //
closeDepPanel() { closeDepPanel() {
@ -569,11 +584,19 @@
endDate(end_date) { endDate(end_date) {
this.end_date = end_date; this.end_date = end_date;
this.searchTime = this.begin_date + "|" + this.end_date; this.searchTime = this.begin_date + "|" + this.end_date;
this.workSummaryDeptPersonOverview()
this.workSummaryOrgDeptOverview()
this.workSummaryDeptCycleStatistics()
this.workSummaryOrgCycleStatistics()
}, },
// //
startDate(begin_date) { startDate(begin_date) {
this.begin_date = begin_date this.begin_date = begin_date
this.searchTime = this.begin_date + "|" + this.end_date; this.searchTime = this.begin_date + "|" + this.end_date;
this.workSummaryDeptPersonOverview()
this.workSummaryOrgDeptOverview()
this.workSummaryDeptCycleStatistics()
this.workSummaryOrgCycleStatistics()
}, },
getNowTime() { getNowTime() {
this.InterfaceConfig.callInterface([{ this.InterfaceConfig.callInterface([{
@ -601,6 +624,7 @@
}, },
//- //-
workSummaryDeptPersonOverview() { workSummaryDeptPersonOverview() {
this.deptMemberSpinning = true
let timeStr = this.searchTime; let timeStr = this.searchTime;
if (timeStr !== "") { if (timeStr !== "") {
let startDate = timeStr.split("|")[0]; let startDate = timeStr.split("|")[0];
@ -609,7 +633,7 @@
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, dept_id: this.deptId,
}; };
this.InterfaceConfig.callInterface([{ this.InterfaceConfig.callInterface([{
url: interConfig.workSummaryDeptPersonOverview.url, url: interConfig.workSummaryDeptPersonOverview.url,
@ -662,7 +686,7 @@
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, dept_id: this.deptId,
}; };
this.InterfaceConfig.callInterface([{ this.InterfaceConfig.callInterface([{
url: interConfig.workSummaryDeptCycleStatistics.url, url: interConfig.workSummaryDeptCycleStatistics.url,
@ -670,11 +694,11 @@
method: interConfig.workSummaryDeptCycleStatistics.method, method: interConfig.workSummaryDeptCycleStatistics.method,
isTestLogin: interConfig.workSummaryDeptCycleStatistics.isTestLogin, isTestLogin: interConfig.workSummaryDeptCycleStatistics.isTestLogin,
}], (result) => { }], (result) => {
//console.log('-', result[0].data) // console.log('-', result[0].data)
this.submitSpinning = true
let temp = [] let temp = []
let normalSubmit = 0 let normalSubmit = 0
let delay = 0 let delay = 0
this.submitSpinning = true
if (result[0].data.code === 2000) { if (result[0].data.code === 2000) {
if (this.selectTabIndex === 1) { if (this.selectTabIndex === 1) {
this.submitDataSource = [] this.submitDataSource = []

Loading…
Cancel
Save