|
@@ -49,7 +49,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
- import { onBeforeMount, ref } from 'vue';
|
|
|
|
|
|
|
+ import { onBeforeMount, onBeforeUnmount, ref } from 'vue';
|
|
|
import { message } from 'ant-design-vue';
|
|
import { message } from 'ant-design-vue';
|
|
|
import { BasicTable, useTable, TableAction } from '/@/components/TableCard';
|
|
import { BasicTable, useTable, TableAction } from '/@/components/TableCard';
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
@@ -256,12 +256,11 @@
|
|
|
// 查询是否有近日需要保养的设备
|
|
// 查询是否有近日需要保养的设备
|
|
|
async function handleDeviceListRecently() {
|
|
async function handleDeviceListRecently() {
|
|
|
const res = await getDeviceListRecently();
|
|
const res = await getDeviceListRecently();
|
|
|
-
|
|
|
|
|
if (res && res.length > 0) {
|
|
if (res && res.length > 0) {
|
|
|
await message.warning({
|
|
await message.warning({
|
|
|
key: '1',
|
|
key: '1',
|
|
|
content: '有需要保养的设备',
|
|
content: '有需要保养的设备',
|
|
|
- duration: 10,
|
|
|
|
|
|
|
+ duration: 8,
|
|
|
style: {
|
|
style: {
|
|
|
color: '#1890ff',
|
|
color: '#1890ff',
|
|
|
cursor: 'pointer',
|
|
cursor: 'pointer',
|
|
@@ -276,6 +275,10 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ // 页面销毁卸载前事件
|
|
|
|
|
+ onBeforeUnmount(async () => {
|
|
|
|
|
+ await message.destroy('1');
|
|
|
|
|
+ });
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
|
.table-dot {
|
|
.table-dot {
|