质量样式
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
@headBtnClick="buttonClick" />
|
||||
@headBtnClick="buttonClick"
|
||||
@datepicker-change="datepickerChange" />
|
||||
<base-table
|
||||
class="israLineReportTable1"
|
||||
ref="israLineReportTable11"
|
||||
@@ -57,14 +58,16 @@ export default {
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd',
|
||||
format: 'yyyy-MM-dd HH:mm',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'timeVal',
|
||||
defaultSelect: [],
|
||||
width: 250,
|
||||
width: 300,
|
||||
onchange: true,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@@ -106,12 +109,14 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.tableProp = this.tableProp1;
|
||||
let start = moment().format('yyyy-MM-DD');
|
||||
let end = moment().format('yyyy-MM-DD');
|
||||
let start = moment(moment().format('yyyy-MM-DD') + ' 07:00:00').format(
|
||||
'yyyy-MM-DD HH:mm:ss'
|
||||
);
|
||||
let end =
|
||||
moment(moment().valueOf() + 86400000).format('yyyy-MM-DD') + ' 06:59:59';
|
||||
this.formConfig[0].defaultSelect = [start, end];
|
||||
this.queryParams.startTime =
|
||||
moment(start + ' 00:00:00').valueOf() + 25200000;
|
||||
this.queryParams.endTime = moment(end + ' 23:59:59').valueOf() + 25200000;
|
||||
this.queryParams.startTime = moment(start).valueOf();
|
||||
this.queryParams.endTime = moment(end).valueOf();
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
@@ -237,13 +242,22 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 时间选择器change
|
||||
datepickerChange(val) {
|
||||
console.log(val);
|
||||
let start = moment(
|
||||
moment(val.value[0]).format('yyyy-MM-DD') + ' 07:00:00'
|
||||
).format('yyyy-MM-DD HH:mm:ss');
|
||||
let end =
|
||||
moment(moment(val.value[1]).valueOf() + 86400000).format('yyyy-MM-DD') +
|
||||
' 06:59:59';
|
||||
this.formConfig[0].defaultSelect = [start, end];
|
||||
},
|
||||
buttonClick(val) {
|
||||
if (val.btnName === 'search') {
|
||||
if (val.timeVal && val.timeVal.length > 0) {
|
||||
this.queryParams.startTime =
|
||||
moment(val.timeVal[0] + ' 00:00:00').valueOf() + 25200000;
|
||||
this.queryParams.endTime =
|
||||
moment(val.timeVal[1] + ' 23:59:59').valueOf() + 25200000;
|
||||
this.queryParams.startTime = moment(val.timeVal[0]).valueOf();
|
||||
this.queryParams.endTime = moment(val.timeVal[1]).valueOf();
|
||||
}
|
||||
this.queryParams.lineId = val.lineId;
|
||||
this.getList();
|
||||
|
||||
Reference in New Issue
Block a user