|
@@ -37,7 +37,7 @@ var dateComponentTemplate = `<div class="j-container">
|
|
</div>
|
|
</div>
|
|
<div class="j-footer">
|
|
<div class="j-footer">
|
|
<div class="j-button-group">
|
|
<div class="j-button-group">
|
|
- <button class="j-button-cancel" @click="resetAll">重置</button>
|
|
|
|
|
|
+ <button class="j-button-cancel" @click="resetStart">重置</button>
|
|
<button class="j-button-confirm" @click="onStartConfirm">确认</button>
|
|
<button class="j-button-confirm" @click="onStartConfirm">确认</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -71,7 +71,7 @@ var dateComponentTemplate = `<div class="j-container">
|
|
</div>
|
|
</div>
|
|
<div class="j-footer">
|
|
<div class="j-footer">
|
|
<div class="j-button-group">
|
|
<div class="j-button-group">
|
|
- <button class="j-button-cancel" @click="resetAll">重置</button>
|
|
|
|
|
|
+ <button class="j-button-cancel" @click="resetEnd">重置</button>
|
|
<button class="j-button-confirm" @click="onendConfirm">确认</button>
|
|
<button class="j-button-confirm" @click="onendConfirm">确认</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -299,7 +299,16 @@ var dateComponent = {
|
|
getStratFocus: function() {
|
|
getStratFocus: function() {
|
|
document.activeElement.blur()
|
|
document.activeElement.blur()
|
|
},
|
|
},
|
|
|
|
+ // 重置
|
|
resetAll:function() {
|
|
resetAll:function() {
|
|
|
|
+ this.dateStyle = false
|
|
|
|
+ console.log(this.timeSelectList)
|
|
|
|
+ this.timeSelectList.forEach((v) => {
|
|
|
|
+ console.log(v)
|
|
|
|
+ if(v.value == 'all') {
|
|
|
|
+ v.selected = true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
let params = {
|
|
let params = {
|
|
name: 'dateItem',
|
|
name: 'dateItem',
|
|
data: ''
|
|
data: ''
|
|
@@ -307,6 +316,16 @@ var dateComponent = {
|
|
this.$emit('cancel', params)
|
|
this.$emit('cancel', params)
|
|
return params
|
|
return params
|
|
},
|
|
},
|
|
|
|
+ // 重置开始时间
|
|
|
|
+ resetStart: function() {
|
|
|
|
+ this.datePicker.startshow = false
|
|
|
|
+ this.dateTimePickerState.startPlaceHolder = ''
|
|
|
|
+ },
|
|
|
|
+ // 重置结束时间
|
|
|
|
+ resetEnd: function() {
|
|
|
|
+ this.datePicker.endshow = false
|
|
|
|
+ this.dateTimePickerState.endPlaceHolder = ''
|
|
|
|
+ },
|
|
// 选择开始时间弹窗确认按钮
|
|
// 选择开始时间弹窗确认按钮
|
|
onStartConfirm:function() {
|
|
onStartConfirm:function() {
|
|
this.dateTimePickerState.start = new Date(this.$refs.getstartValues.value)
|
|
this.dateTimePickerState.start = new Date(this.$refs.getstartValues.value)
|