|
@@ -23,7 +23,7 @@
|
|
|
<CusFormColumn
|
|
|
:span="16"
|
|
|
labelWidth="0px"
|
|
|
- v-model:param="state.query.form.targetName"
|
|
|
+ v-model:param="state.query.form.mergeDynamicShip.targetName"
|
|
|
class="search"
|
|
|
>
|
|
|
<template #append>
|
|
@@ -151,7 +151,7 @@ import {warnModelRuleTree} from "@/api/modules/web/model";
|
|
|
import {useDictionaryStore, useShipMapStore} from "@/stores";
|
|
|
import {warnRecordList} from "@/api/modules/web/record";
|
|
|
import {ElMessage} from "element-plus";
|
|
|
-import {YMDHms} from "@/utils/util";
|
|
|
+import {YMD, YMDHms} from "@/utils/util";
|
|
|
|
|
|
const emit = defineEmits(['update:show'])
|
|
|
|
|
@@ -237,15 +237,19 @@ const onSearch = () => {
|
|
|
state.query.formReal = JSON.parse(JSON.stringify(state.query.form))
|
|
|
onPage(1, state.query.page.pageSize)
|
|
|
}
|
|
|
-const onReset = () => {
|
|
|
+const onReset = (init = true) => {
|
|
|
state.query.page = {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10
|
|
|
}
|
|
|
state.query.form = {
|
|
|
+ startTime: `${YMD(new Date())} 00:00:00`,
|
|
|
+ endTime: `${YMD(new Date().getTime() + 1000 * 60 * 60 * 24)} 00:00:00`,
|
|
|
mergeDynamicShip: {}
|
|
|
}
|
|
|
- onSearch()
|
|
|
+ if (init) {
|
|
|
+ onSearch()
|
|
|
+ }
|
|
|
}
|
|
|
const onMore = () => {
|
|
|
state.more.layout.top = state.layout.top
|
|
@@ -254,17 +258,18 @@ const onMore = () => {
|
|
|
}
|
|
|
watch(() => ShipMapStore.warningParams, (n) => {
|
|
|
if (n) {
|
|
|
- onReset()
|
|
|
+ onReset(false)
|
|
|
state.query.form.ruleName = n.ruleName
|
|
|
state.query.form.mergeDynamicShip.mergeTarget = n.mergeTarget
|
|
|
state.query.form.startTime = YMDHms(n.warnTime)
|
|
|
- state.query.form.endTime = YMDHms(n.warnTime)
|
|
|
+ state.query.form.endTime = YMDHms(new Date(n.warnTime).getTime() + 1000)
|
|
|
emit('update:show', true)
|
|
|
onMore()
|
|
|
onSearch()
|
|
|
}
|
|
|
})
|
|
|
onMounted(() => {
|
|
|
+ onReset()
|
|
|
warnModelRuleTree().then(res => {
|
|
|
DictionaryStore.initOtherDict('warningModel', res.data.map(v => {
|
|
|
v.dictLabel = v.name
|