| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | .search_thing { |
| | | height: 50px; |
| | | margin-bottom: 26px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 120px; |
| | | font-size: 14px; |
| | | text-align: left; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | </style> |
| | | |
| | | <template> |
| | |
| | | <div class="right-2-title"> |
| | | <span style="color: #333333;font-size: 16px;">我的日程</span> |
| | | <span style="cursor: pointer;font-size: 12px; |
| | | color: #3A7BFA;">添加我的日程</span> |
| | | color: #3A7BFA;" @click="dialogVisible=true">添加我的日程</span> |
| | | </div> |
| | | <div class="right-2-body"> |
| | | <div class="calendar" style="width: 49%;"> |
| | |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-dialog title="日程添加" :visible.sync="dialogVisible" width="400px"> |
| | | <div class="body" style="max-height: 60vh;"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label">时间:</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | v-model="query.time" |
| | | type="datetime" |
| | | placeholder="选择日期时间" |
| | | size="small" |
| | | style="width:100%"> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label">内容:</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="query.content" size="small" placeholder="请输入内容"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="handleCancel">取 消</el-button> |
| | | <el-button type="primary" @click="submit" :loading="loading">确 定</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | now: null, |
| | | calendarValue: new Date(), |
| | | currentIndex:0, |
| | | dialogVisible:false, |
| | | query:{ |
| | | time:'', |
| | | content:'' |
| | | }, |
| | | loading:false |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | // 将得到的年月日格式转换为标准时间,与饿了么时间格式相同才能联动 |
| | | this.calendarValue = new Date(prevtime); |
| | | }, |
| | | handleCancel(){ |
| | | this.dialogVisible = false; |
| | | this.query = { |
| | | time:'', |
| | | content:'' |
| | | } |
| | | }, |
| | | submit(){ |
| | | if(!this.query.time){ |
| | | this.$message.error('时间未填写') |
| | | return |
| | | } |
| | | if(!this.query.content){ |
| | | this.$message.error('内容未填写') |
| | | return |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |