通知公告时间选择
This commit is contained in:
@@ -61,7 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AiBack ref="aiBack" v-if="!userSelect"/>
|
<AiBack ref="aiBack" v-if="!userSelect"/>
|
||||||
<u-datetime-picker :show="show" mode="datetime" :value="Number(new Date())" @confirm="confirm"></u-datetime-picker>
|
<u-picker v-model="show" mode="time" :params="options" @confirm="confirm"></u-picker>
|
||||||
<AiSelectEnterprise :visible.sync="userSelect" :value="form.persons" v-if="userSelect" @change="change"></AiSelectEnterprise>
|
<AiSelectEnterprise :visible.sync="userSelect" :value="form.persons" v-if="userSelect" @change="change"></AiSelectEnterprise>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -92,6 +92,15 @@
|
|||||||
},
|
},
|
||||||
userSelect: false,
|
userSelect: false,
|
||||||
flag: null,
|
flag: null,
|
||||||
|
options: {
|
||||||
|
year: true,
|
||||||
|
month: true,
|
||||||
|
day: true,
|
||||||
|
hour: true,
|
||||||
|
minute: true,
|
||||||
|
second: true,
|
||||||
|
timestamp: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
@@ -112,17 +121,10 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
confirm(e){
|
confirm(e){
|
||||||
const date = new Date(e.value);
|
if(e.timestamp< (Date.now()/1000)|0){
|
||||||
if(e.value< (Date.now())|0){
|
|
||||||
return this.$u.toast("发送时间不能小于当前时间");
|
return this.$u.toast("发送时间不能小于当前时间");
|
||||||
}
|
}
|
||||||
const year = date.getFullYear();
|
this.form.releaseTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
|
||||||
const month = date.getMonth() + 1;
|
|
||||||
const day = date.getDate();
|
|
||||||
const hours = date.getHours();
|
|
||||||
const minutes = date.getMinutes();
|
|
||||||
this.form.releaseTime = `${year}-${month}-${day} ${hours}:${minutes}:00`;
|
|
||||||
this.show = false;
|
|
||||||
},
|
},
|
||||||
fileList(e){
|
fileList(e){
|
||||||
this.form.files = e
|
this.form.files = e
|
||||||
|
|||||||
Reference in New Issue
Block a user