| | |
| | | <el-dialog |
| | | title="提示" |
| | | :visible.sync="dialogVisible" |
| | | width="30%" |
| | | :before-close="handleClose"> |
| | | <span>这是一段信息</span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogVisible = false">确 定</el-button> |
| | | </span> |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :show-close="false" |
| | | width="30%"> |
| | | <div style="display: flex;align-items: center;"><i class="el-icon-warning" style="color: red;font-size: 40px;margin-right: 20px;"></i><span>代码正在部署,请30分钟后重新进入系统!</span></div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | const hours = now.getHours(); |
| | | const minutes = now.getMinutes(); |
| | | |
| | | if (hours === 22 && minutes === 0) { |
| | | if (hours === 20 && minutes === 0) { |
| | | this.performTask(); |
| | | // 设置20分钟后提示关闭 |
| | | this.closeTimeout = setTimeout(() => { |
| | |
| | | performTask() { |
| | | // 在这里执行你想要的定时任务 |
| | | console.log("任务执行了!"); |
| | | this.dialogVisible = true; |
| | | // 这里可以触发一个 Vuex 动作、发起一个 HTTP 请求,或者其他操作 |
| | | }, |
| | | promptToClose() { |
| | | // 提示用户关闭 |
| | | alert("请记得在20分钟后关闭任务!"); |
| | | // alert("请记得在20分钟后关闭任务!"); |
| | | this.dialogVisible = true; |
| | | } |
| | | }, |
| | | beforeDestroy() { |