首页预警样式

pull/4/head
qiuhongwu 8 months ago
parent 9f7b6fffb5
commit 04f368a397

@ -1,22 +1,26 @@
<template> <template>
<div> <el-card class="hl-card" style="min-height: 80vh">
<el-card shadow="never"> <template #header>
<el-skeleton :loading="loading" animated> <span>首页</span>
<el-row :gutter="20" justify="space-between"> </template>
<el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24"> <div>
<div class="flex items-center"> <el-card shadow="never">
<img :src="avatar" alt="" class="mr-20px h-70px w-70px rounded-[50%]" /> <el-skeleton :loading="loading" animated>
<div> <el-row :gutter="20" justify="space-between">
<div class="text-20px"> <el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
{{ t('workplace.welcome') }} {{ username }} {{ t('workplace.happyDay') }} <div class="flex items-center">
</div> <img :src="avatar" alt="" class="mr-20px h-70px w-70px rounded-[50%]" />
<!-- <div class="mt-10px text-14px text-gray-500"> <div>
<div class="text-20px">
{{ t('workplace.welcome') }} {{ username }} {{ t('workplace.happyDay') }}
</div>
<!-- <div class="mt-10px text-14px text-gray-500">
{{ t('workplace.toady') }}20 - 32 {{ t('workplace.toady') }}20 - 32
</div>--> </div>-->
</div>
</div> </div>
</div> </el-col>
</el-col> <!-- <el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
<!-- <el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24">
<div class="h-70px flex items-center justify-end lt-sm:mt-10px"> <div class="h-70px flex items-center justify-end lt-sm:mt-10px">
<div class="px-8px text-right"> <div class="px-8px text-right">
<div class="mb-20px text-14px text-gray-400">{{ t('workplace.project') }}</div> <div class="mb-20px text-14px text-gray-400">{{ t('workplace.project') }}</div>
@ -49,12 +53,12 @@
</div> </div>
</div> </div>
</el-col>--> </el-col>-->
</el-row> </el-row>
</el-skeleton> </el-skeleton>
</el-card> </el-card>
</div> </div>
<!-- <el-row class="mt-5px" :gutter="20" justify="space-between"> <!-- <el-row class="mt-5px" :gutter="20" justify="space-between">
<el-col :xl="16" :lg="16" :md="24" :sm="24" :xs="24" class="mb-10px"> <el-col :xl="16" :lg="16" :md="24" :sm="24" :xs="24" class="mb-10px">
<el-card shadow="never"> <el-card shadow="never">
<template #header> <template #header>
@ -159,12 +163,13 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row>--> </el-row>-->
</el-card>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { set } from 'lodash-es' import { set } from 'lodash-es'
import { EChartsOption } from 'echarts' import { EChartsOption } from 'echarts'
import { formatTime } from '@/utils' import { formatTime } from '@/utils'
import { ElNotification } from 'element-plus'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { useWatermark } from '@/hooks/web/useWatermark' import { useWatermark } from '@/hooks/web/useWatermark'
import avatarImg from '@/assets/imgs/smile.png' import avatarImg from '@/assets/imgs/smile.png'
@ -378,4 +383,33 @@ const getAllApi = async () => {
} }
getAllApi() getAllApi()
const openwarn = () =>{
ElNotification({
title: `设计预警通知`,
message: `铸造工艺设计负责人: <span class="bordercolor">${`薛小宝`} </span>请注意!<br/>
项目编号<span class="bordercolor">${`2546845`} </span>的图纸设计即将超时请及时完成`,
type: 'warning',
offset: 100,
dangerouslyUseHTMLString: true,
duration: 0,
customClass: 'my-notification'
})
}
onMounted(() => {
openwarn()
})
</script> </script>
<style lang="scss">
.my-notification {
width: 380px;
.el-notification__group {
.el-notification__content {
.bordercolor{
color: #409eff;
}
}
}
}
</style>

@ -421,7 +421,7 @@ const openerror = () => {
ElMessageBox.alert( ElMessageBox.alert(
// 使 // 使
`文件名为:${failedAttachmentsName.value.join(' / ')}上传失败`, `文件名为:${failedAttachmentsName.value.join(' / ')}上传失败`,
`文件格式不正确或网络问题 请您稍再试`, `文件格式不正确或网络问题 请您稍再试`,
{ {
dangerouslyUseHTMLString: false, // 使HTMLfalse dangerouslyUseHTMLString: false, // 使HTMLfalse
confirmButtonText: '知道了', confirmButtonText: '知道了',

@ -437,7 +437,7 @@ const openerror = () => {
ElMessageBox.alert( ElMessageBox.alert(
// 使 // 使
`文件名为:${failedAttachmentsName.value.join(' / ')}上传失败`, `文件名为:${failedAttachmentsName.value.join(' / ')}上传失败`,
`文件格式不正确或网络问题 请您稍再试`, `文件格式不正确或网络问题 请您稍再试`,
{ {
dangerouslyUseHTMLString: false, dangerouslyUseHTMLString: false,
confirmButtonText: '知道了', confirmButtonText: '知道了',

Loading…
Cancel
Save