|
@@ -285,12 +285,8 @@
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="bianju">
|
|
<div class="bianju">
|
|
- <span class="demonstration">开始日期</span>
|
|
|
|
- <el-date-picker v-model="statDatas" type="date" :picker-options="pickerOptionsStart" value-format="yyyy-MM-dd" placeholder="选择开始日期" @change="picks()"> </el-date-picker>
|
|
|
|
- </div>
|
|
|
|
- <div class="bianju">
|
|
|
|
- <span class="demonstration">结束日期</span>
|
|
|
|
- <el-date-picker v-model="endDatas" type="date" :picker-options="pickerOptionsEnd" value-format="yyyy-MM-dd" placeholder="选择结束日期" @change="picks()"> </el-date-picker>
|
|
|
|
|
|
+ <span class="demonstration">时间段</span>
|
|
|
|
+ <el-date-picker v-model="rangeDatas" type="daterange" value-format="yyyy-MM-dd" placeholder="选择开始日期" @change="picks()" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width:350px" :clearable="false"> </el-date-picker>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<el-table v-if="ins == 6" :key="ins" border :data="overTimeList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
<el-table v-if="ins == 6" :key="ins" border :data="overTimeList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
|
|
@@ -454,27 +450,10 @@ export default {
|
|
ins: 0,
|
|
ins: 0,
|
|
user: JSON.parse(sessionStorage.user),
|
|
user: JSON.parse(sessionStorage.user),
|
|
overTimeList: [], // 项目加班情况统计列表
|
|
overTimeList: [], // 项目加班情况统计列表
|
|
- statDatas: this.getCurrentTimes(),
|
|
|
|
- endDatas: this.getCurrentTime(),
|
|
|
|
proList: [],
|
|
proList: [],
|
|
proJuctId: '',
|
|
proJuctId: '',
|
|
createDate: '2020-01-01',
|
|
createDate: '2020-01-01',
|
|
- pickerOptionsStart: {
|
|
|
|
- disabledDate: (time) => {
|
|
|
|
- if (this.endDatas) {
|
|
|
|
- return time.getTime() > new Date(this.endDatas).getTime() || time.getTime() <= new Date(this.createDate).getTime() - 86400000;
|
|
|
|
- }
|
|
|
|
- return time.getTime() <= new Date(this.createDate).getTime() - 86400000;
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- pickerOptionsEnd: {
|
|
|
|
- disabledDate: (time) => {
|
|
|
|
- if (this.statDatas) {
|
|
|
|
- return time.getTime() < new Date(this.statDatas).getTime();
|
|
|
|
- }
|
|
|
|
- return time.getTime() <= new Date(this.createDate).getTime() - 86400000;
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ rangeDatas: this.getCurrentRangeTime()
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
@@ -624,8 +603,8 @@ export default {
|
|
} else if (this.ins == 6) {
|
|
} else if (this.ins == 6) {
|
|
fName = "加班情况统计报表.xls";
|
|
fName = "加班情况统计报表.xls";
|
|
url += "/exportOvertimeList";
|
|
url += "/exportOvertimeList";
|
|
- sl.startDate = this.statDatas
|
|
|
|
- sl.endDate = this.endDatas
|
|
|
|
|
|
+ sl.startDate = this.rangeDatas[0]
|
|
|
|
+ sl.endDate = this.rangeDatas[1]
|
|
sl.projectId = this.proJuctId
|
|
sl.projectId = this.proJuctId
|
|
}
|
|
}
|
|
this.http.post(url, sl,
|
|
this.http.post(url, sl,
|
|
@@ -713,8 +692,8 @@ export default {
|
|
this.listLoading = true;
|
|
this.listLoading = true;
|
|
this.http.post('/project/getOvertimeList', {
|
|
this.http.post('/project/getOvertimeList', {
|
|
projectId: this.proJuctId,
|
|
projectId: this.proJuctId,
|
|
- startDate: this.statDatas,
|
|
|
|
- endDate: this.endDatas,
|
|
|
|
|
|
+ startDate: this.rangeDatas[0],
|
|
|
|
+ endDate: this.rangeDatas[1],
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -864,20 +843,12 @@ export default {
|
|
this.overTime()
|
|
this.overTime()
|
|
},
|
|
},
|
|
// 日期
|
|
// 日期
|
|
- getCurrentTime() {
|
|
|
|
- var _this = this;
|
|
|
|
- let yy = new Date().getFullYear();
|
|
|
|
- let mm = new Date().getMonth()+1;
|
|
|
|
- let dd = new Date().getDate();
|
|
|
|
- _this.gettime = yy +'-'+ mm +'-'+ dd;
|
|
|
|
- return _this.gettime
|
|
|
|
- },
|
|
|
|
- getCurrentTimes() {
|
|
|
|
|
|
+ getCurrentRangeTime() {
|
|
var _this = this;
|
|
var _this = this;
|
|
let yy = new Date().getFullYear();
|
|
let yy = new Date().getFullYear();
|
|
let mm = new Date().getMonth()+1;
|
|
let mm = new Date().getMonth()+1;
|
|
let dd = new Date().getDate();
|
|
let dd = new Date().getDate();
|
|
- _this.gettime = yy+'-'+mm+'-'+'01';
|
|
|
|
|
|
+ _this.gettime = [yy+'-'+mm+'-'+'01' , yy +'-'+ mm +'-'+ dd];
|
|
return _this.gettime
|
|
return _this.gettime
|
|
},
|
|
},
|
|
selcts() {
|
|
selcts() {
|