|
@ -5,6 +5,7 @@ |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
class="date-input" |
|
|
class="date-input" |
|
|
v-model="time" |
|
|
v-model="time" |
|
|
|
|
|
:key="pickerKey" |
|
|
type="datetime" |
|
|
type="datetime" |
|
|
placeholder="修改日期与时间" |
|
|
placeholder="修改日期与时间" |
|
|
format="YYYY-MM-DD HH:mm:ss" |
|
|
format="YYYY-MM-DD HH:mm:ss" |
|
@ -233,6 +234,7 @@ const settings = ref<Settings>({ |
|
|
// 日期和时间 |
|
|
// 日期和时间 |
|
|
const currentDate = ref(new Date()) |
|
|
const currentDate = ref(new Date()) |
|
|
const time = ref('00:00:00') |
|
|
const time = ref('00:00:00') |
|
|
|
|
|
let pickerKey = ref(0) |
|
|
// const dateFormats = ['MM.dd.yyyy', 'dd.MM.yyyy', 'yyyy.MM.dd'] |
|
|
// const dateFormats = ['MM.dd.yyyy', 'dd.MM.yyyy', 'yyyy.MM.dd'] |
|
|
// const selectedDateFormat = ref(dateFormats[2]) |
|
|
// const selectedDateFormat = ref(dateFormats[2]) |
|
|
|
|
|
|
|
@ -294,6 +296,8 @@ const updateSetting = async (key: string, value: any) => { |
|
|
// 暂停定时器 |
|
|
// 暂停定时器 |
|
|
clearInterval(intervalId.value) |
|
|
clearInterval(intervalId.value) |
|
|
res = await setDateAndTime(value) |
|
|
res = await setDateAndTime(value) |
|
|
|
|
|
//更新后利用KEY重新加载date-picker,不然focus不起作用 |
|
|
|
|
|
pickerKey.value = new Date().getTime() |
|
|
// 恢复定时器 |
|
|
// 恢复定时器 |
|
|
startTimer() |
|
|
startTimer() |
|
|
break |
|
|
break |
|
@ -482,7 +486,7 @@ const resumeTimer = () => { |
|
|
<style scoped lang="less"> |
|
|
<style scoped lang="less"> |
|
|
.device-management { |
|
|
.device-management { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 87vh; |
|
|
|
|
|
|
|
|
height: 91.5vh; |
|
|
padding: 20px; |
|
|
padding: 20px; |
|
|
box-sizing: border-box; |
|
|
box-sizing: border-box; |
|
|
background-color: #f5f7fa; |
|
|
background-color: #f5f7fa; |
|
|