|
|
|
@ -1,16 +1,20 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="summary-record-div">
|
|
|
|
|
<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>
|
|
|
|
|
<TotalRecord :type="pageType" :searchTime="searchTime"/>
|
|
|
|
|
<SubmitInfo :type="pageType" :searchTime="searchTime"/>
|
|
|
|
|
<TotalRecord :type="pageType" :searchTime="searchTime" :selectedData="selectedData"/>
|
|
|
|
|
<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>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
/*
|
|
|
|
|
* 总结统计
|
|
|
|
|
* */
|
|
|
|
|
import {Button} from 'ant-design-vue'
|
|
|
|
|
import TabComp from '../common/tabComp.vue';
|
|
|
|
|
import DateChoose from '../common/dateChoose.vue';
|
|
|
|
|
import TotalRecord from './component/totalRecord.vue';
|
|
|
|
@ -18,6 +22,7 @@
|
|
|
|
|
import OfficeMenuConfig from '../../../../../../../../src/utils/officeMenuConfig';
|
|
|
|
|
import interConfig from './interConfig';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
import SelectDepartment from '../../../../../../../components/common/selectDepartment/SelectDepartment'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
@ -34,9 +39,37 @@
|
|
|
|
|
tabIndex: 0,
|
|
|
|
|
totalRecordJson: {},
|
|
|
|
|
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() {
|
|
|
|
|
//部门权限
|
|
|
|
|
this.depAdmin = OfficeMenuConfig.menuIsExist(["daliyOffice", "newPlanConclusion", "plan_summary_statistics", "dept"]);
|
|
|
|
@ -76,10 +109,10 @@
|
|
|
|
|
this.tabIndex = param.index;
|
|
|
|
|
this.pageType = param.cbName;
|
|
|
|
|
}
|
|
|
|
|
if (param.index == 1) {
|
|
|
|
|
this.deptSelect = true
|
|
|
|
|
if (param.index === 1) {
|
|
|
|
|
this.deptBtnShow = true
|
|
|
|
|
} else {
|
|
|
|
|
this.deptSelect = false
|
|
|
|
|
this.deptBtnShow = false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//更改结束日期
|
|
|
|
@ -92,32 +125,49 @@
|
|
|
|
|
this.begin_date = begin_date
|
|
|
|
|
this.searchTime = this.begin_date + "|" + this.end_date;
|
|
|
|
|
},
|
|
|
|
|
getWorkSummaryPersonCycleStatistics: function () {
|
|
|
|
|
let param = {
|
|
|
|
|
person_id: this.BaseConfig.userInfo.person_id,
|
|
|
|
|
org_id: this.BaseConfig.person_info_my.bureau_id,
|
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// 点击部门按钮
|
|
|
|
|
showDepts() {
|
|
|
|
|
if (!this.showDepPanel || this.showDepPanel) {
|
|
|
|
|
this.showDepPanel = true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
selectComplete: function (selectedData) {
|
|
|
|
|
this.depObjs = selectedData;
|
|
|
|
|
this.showDepPanel = false;
|
|
|
|
|
this.selectedData = selectedData
|
|
|
|
|
},
|
|
|
|
|
//关闭部门选择页
|
|
|
|
|
closeDepPanel() {
|
|
|
|
|
this.showDepPanel = false;
|
|
|
|
|
},
|
|
|
|
|
// getWorkSummaryPersonCycleStatistics: function () {
|
|
|
|
|
// let param = {
|
|
|
|
|
// person_id: this.BaseConfig.userInfo.person_id,
|
|
|
|
|
// org_id: this.BaseConfig.person_info_my.bureau_id,
|
|
|
|
|
// }
|
|
|
|
|
// 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: {
|
|
|
|
|
AButton: Button,
|
|
|
|
|
SelectDepartment,
|
|
|
|
|
TabComp,
|
|
|
|
|
DateChoose,
|
|
|
|
|
TotalRecord,
|
|
|
|
@ -133,5 +183,17 @@
|
|
|
|
|
padding: 0.5rem;
|
|
|
|
|
display: flex;
|
|
|
|
|
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>
|