|
@@ -24,7 +24,7 @@
|
|
|
</el-select>
|
|
|
</template>
|
|
|
<template v-if="item.inputType === 'datePicker'">
|
|
|
- <el-date-picker v-model="formData[item.prop]" :size="item.size || 'small'" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
|
|
|
+ <el-date-picker @change="changes()" v-model="formData[item.prop]" :size="item.size || 'small'" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
|
|
|
</template>
|
|
|
<template v-if="item.inputType === 'datetimerange'">
|
|
|
<el-date-picker v-model="formData[item.prop]" type="datetimerange" range-separator="至" value-format="YYYY-MM-DD HH:mm:ss" start-placeholder="开始日期" end-placeholder="结束日期">
|
|
@@ -121,7 +121,7 @@ export default {
|
|
|
area: "",
|
|
|
airport: [],
|
|
|
terminal: "",
|
|
|
- dateTime: [],
|
|
|
+ dateTime: [ new Date(), new Date()],
|
|
|
flightType: "",
|
|
|
baggageType: "",
|
|
|
passengerType: [],
|
|
@@ -297,7 +297,7 @@ export default {
|
|
|
items: {
|
|
|
handler (val) {
|
|
|
val && (this.formItems = val);
|
|
|
- this.formData.dateTime = [Format("yyyy-MM-dd", new Date()),Format("yyyy-MM-dd", new Date())]
|
|
|
+ // this.formData.dateTime = [Format("yyyy-MM-dd", new Date()),Format("yyyy-MM-dd", new Date())]
|
|
|
// this.formData[val[0].prop] ? this.formData[val[0].prop] : val[0].placeholder
|
|
|
// console.log(this.formData,val)
|
|
|
// if (!this.formData[val[0].prop]) {
|
|
@@ -310,15 +310,6 @@ export default {
|
|
|
},
|
|
|
formData: {
|
|
|
handler (val) {
|
|
|
- if (this.action === 14 || this.action === 2 || this.action === 19) {
|
|
|
- this.$emit("fore", val);
|
|
|
- }
|
|
|
- if (!this.formData.aircompany.length === 0) {
|
|
|
- this.formData.aircompany = 'CZ'
|
|
|
- }
|
|
|
- if (!this.formData.airport === 0) {
|
|
|
- this.formData.airport = 'CAN'
|
|
|
- }
|
|
|
},
|
|
|
deep: true,
|
|
|
immediate: true,
|
|
@@ -326,6 +317,7 @@ export default {
|
|
|
data: {
|
|
|
handler (val) {
|
|
|
val && (this.formData = val);
|
|
|
+ // this.$set(this.formData,'dateTime',[val.dateTime[0],val.dateTime[1]])
|
|
|
},
|
|
|
deep: true,
|
|
|
immediate: true,
|
|
@@ -339,6 +331,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
created () {
|
|
|
+ this.$set(this.formData,'dateTime',[Format("yyyy-MM-dd", new Date()),Format("yyyy-MM-dd", new Date())])
|
|
|
this.customItems.forEach((item) => {
|
|
|
if (typeof item.itemIndex === "number") {
|
|
|
if (item.prop) {
|
|
@@ -362,6 +355,9 @@ export default {
|
|
|
mounted () {
|
|
|
},
|
|
|
methods: {
|
|
|
+ changes (event) {
|
|
|
+ console.log(event)
|
|
|
+ },
|
|
|
picup () {
|
|
|
this.picShow = false;
|
|
|
this.$emit("upset", this.picShow);
|