|
@@ -93,7 +93,7 @@
|
93
|
93
|
this.startTimestamp = Date.now();
|
94
|
94
|
this.current = -1;
|
95
|
95
|
this.yyTime = this.yy ? new Date(this.yy) : dayjs().format('YYYY-MM-DD HH:mm:ss');
|
96
|
|
- this.setDate(this.yyTime)
|
|
96
|
+ this.setDate(this.yyTime, 'load')
|
97
|
97
|
}
|
98
|
98
|
if (newValue && this.operate.know == "返回") {
|
99
|
99
|
this.time = 5;
|
|
@@ -166,18 +166,31 @@
|
166
|
166
|
methods: {
|
167
|
167
|
dateChange(e){
|
168
|
168
|
if(e){
|
169
|
|
- this.setDate(e)
|
|
169
|
+ this.setDate(e, 'change')
|
170
|
170
|
}else{
|
171
|
171
|
this.yyEndTime = null
|
172
|
172
|
}
|
173
|
173
|
},
|
174
|
174
|
// 设置预约结束时间
|
175
|
|
- setDate(yyTime){
|
176
|
|
- let date = dayjs(new Date(yyTime));
|
177
|
|
- let num = this.currentInspect.inspectCheckType.extra1?this.currentInspect.inspectCheckType.extra1:undefined
|
178
|
|
- let newDate = date.add(num ? num : this.yytimeGapMinute, 'minute');
|
179
|
|
- let endTime = new Date(newDate);
|
180
|
|
- this.yyEndTime = endTime.Format('yyyy-MM-dd hh:mm:ss')
|
|
175
|
+ setDate(yyTime, type){
|
|
176
|
+ let date = null
|
|
177
|
+ let num = null
|
|
178
|
+ let newDate = null
|
|
179
|
+ let endTime = null
|
|
180
|
+ if(type=='change'){
|
|
181
|
+ date = dayjs(new Date(yyTime));
|
|
182
|
+ num = this.currentInspect.inspectCheckType && this.currentInspect.inspectCheckType.extra1?this.currentInspect.inspectCheckType.extra1:undefined
|
|
183
|
+ newDate = date.add(num ? num : this.yytimeGapMinute, 'minute');
|
|
184
|
+ endTime = new Date(newDate);
|
|
185
|
+ this.yyEndTime = endTime.Format('yyyy-MM-dd hh:mm:ss')
|
|
186
|
+ }else{
|
|
187
|
+ if(this.currentInspect.endCheckTime){
|
|
188
|
+ date = dayjs(new Date(this.currentInspect.endCheckTime))
|
|
189
|
+ this.yyEndTime = date.format('YYYY-MM-DD HH:mm:ss')
|
|
190
|
+ }else{
|
|
191
|
+ this.yyEndTime = null
|
|
192
|
+ }
|
|
193
|
+ }
|
181
|
194
|
},
|
182
|
195
|
radioChange: function(evt) {
|
183
|
196
|
this.yyTime = '';
|
|
@@ -191,12 +204,12 @@
|
191
|
204
|
},
|
192
|
205
|
// 确定
|
193
|
206
|
ok() {
|
194
|
|
- let date = dayjs(new Date(this.yyTime));
|
195
|
|
- let num = this.currentInspect.inspectCheckType.extra1?this.currentInspect.inspectCheckType.extra1:undefined
|
196
|
|
- let newDate = date.add(num ? num : this.yytimeGapMinute, 'minute');
|
197
|
|
- let endTime = new Date(newDate);
|
|
207
|
+ // let date = dayjs(new Date(this.yyTime));
|
|
208
|
+ // let num = this.currentInspect.inspectCheckType.extra1?this.currentInspect.inspectCheckType.extra1:undefined
|
|
209
|
+ // let newDate = date.add(num ? num : this.yytimeGapMinute, 'minute');
|
|
210
|
+ // let endTime = new Date(newDate);
|
198
|
211
|
let e = {
|
199
|
|
- yyEndTime: endTime.getTime()
|
|
212
|
+ yyEndTime: this.yyEndTime
|
200
|
213
|
};
|
201
|
214
|
if (this.current > -1) {
|
202
|
215
|
e.value = this.removeReasons[this.current].value;
|