Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	mes-ui/mes-ui-admin-vue3/src/layout/components/warnmessage.vue
pull/4/head
zengchenxi 8 months ago
commit 6d0a9992bf

@ -16,7 +16,7 @@
<!-- 折叠 --> <!-- 折叠 -->
<div class="warncenter"> <div class="warncenter">
<div class="warntext" v-for="item in warnings" :key="item"> <div class="warntext" v-for="item in warnings" :key="item">
<span style="margin-top:5px"><img :src="warnimg" alt="" /></span> <span style="margin-top:2px"><img :src="warnimg" alt="" /></span>
<div class="warnnr" v-if="item.processDesignType != 'BLUEPRINT_FOUNDRY_TECHNOLOGY'"> <div class="warnnr" v-if="item.processDesignType != 'BLUEPRINT_FOUNDRY_TECHNOLOGY'">
<span>{{processDesignTypeDict[item.processDesignType]}}设计负责人: <span class="warnname">{{item.ownerName}}</span> 请注意!</span> <span>{{processDesignTypeDict[item.processDesignType]}}设计负责人: <span class="warnname">{{item.ownerName}}</span> 请注意!</span>
<span class="warnbh">项目编号{{ item.projectCode}}, 子项目编号{{ item.projectSubCode }}的图纸设计{{item.remainingTime < 0 ? '已超时' : '即将超时'}}请及时完成</span> <span class="warnbh">项目编号{{ item.projectCode}}, 子项目编号{{ item.projectSubCode }}的图纸设计{{item.remainingTime < 0 ? '已超时' : '即将超时'}}请及时完成</span>
@ -42,16 +42,16 @@
import { useCommonStore } from '@/store/modules/common' import { useCommonStore } from '@/store/modules/common'
import { CloseBold, Expand, WarningFilled } from '@element-plus/icons-vue' import { CloseBold, Expand, WarningFilled } from '@element-plus/icons-vue'
import warnimg from '/src/assets/imgs/warnicon.png' import warnimg from '/src/assets/imgs/warnicon.png'
import {getProcessDesignDeferredWarning} from "@/api/heli/processdesign"; import { getProcessDesignDeferredWarning } from '@/api/heli/processdesign'
const commonStore = useCommonStore() const commonStore = useCommonStore()
const showWarning = computed(() => commonStore.showWarning) const showWarning = computed(() => commonStore.showWarning)
const showFilled = ref(false) const showFilled = ref(false)
const warnings = ref([]) const warnings = ref([])
const processDesignTypeDict = { const processDesignTypeDict = {
"BLUEPRINT_FOUNDRY_TECHNOLOGY": "铸造工艺", BLUEPRINT_FOUNDRY_TECHNOLOGY: '铸造工艺',
"BLUEPRINT_3D": "3D", BLUEPRINT_3D: '3D',
"BLUEPRINT_2D": "2D", BLUEPRINT_2D: '2D',
"BLUEPRINT_WORKBLANK": "毛坯" BLUEPRINT_WORKBLANK: '毛坯'
} }
const FoldWran = () => { const FoldWran = () => {
showFilled.value = false showFilled.value = false
@ -96,14 +96,15 @@ const onMouseMove = (event: MouseEvent) => {
// const onDragEnd = () => { // const onDragEnd = () => {
// // // //
// }; // };
const wranout = ref(false)
const queryData = async () => { const queryData = async () => {
const data = await getProcessDesignDeferredWarning()
const data = await getProcessDesignDeferredWarning(); if (data.hasWarning) {
if (data.hasWarning){ warnings.value = data.warnings
warnings.value = data.warnings;
commonStore.setStore('showWarning', true) commonStore.setStore('showWarning', true)
}else{ } else {
commonStore.setStore('showWarning', false) // commonStore.setStore('showWarning', false)
} }
} }
@ -114,6 +115,11 @@ onMounted(() => {
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.warn.no-data {
/* 当warnings数组为空时隐藏元素并禁用过渡动画 */
display: none;
transition: none !important; /* 确保过渡动画被禁用 */
}
.FoldWran { .FoldWran {
cursor: pointer; cursor: pointer;
margin-left: 15px; margin-left: 15px;
@ -122,7 +128,7 @@ onMounted(() => {
right: 0; right: 0;
width: 40px; width: 40px;
height: 40px; height: 40px;
background-color: #e6a23c; background-color: rgb(255, 120, 0);
color: #fff; color: #fff;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -136,11 +142,12 @@ onMounted(() => {
right: 60px; right: 60px;
z-index: 5000; z-index: 5000;
width: 400px; width: 400px;
height: 300px; height: 450px;
box-shadow: 0px 0px 10px 0px #999; box-shadow: 0px 0px 10px 0px #999;
border-radius: 5px; border-radius: 5px;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
.warntitle { .warntitle {
height: 40px; height: 40px;
background-color: #f7f8fa; background-color: #f7f8fa;
@ -156,11 +163,11 @@ onMounted(() => {
} }
} }
.warncenter { .warncenter {
height: 250px; height: 400px;
background-color: #fff; background-color: #fff;
padding: 10px; padding: 10px;
overflow-y: auto; overflow-y: auto;
max-height: 250px; max-height: 400px;
.warntext { .warntext {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -175,6 +182,8 @@ onMounted(() => {
} }
.warnbh { .warnbh {
margin-top: 5px; margin-top: 5px;
line-height: 23px;
font-size: 16px !important;
color: rgba(84, 89, 94, 0.6); color: rgba(84, 89, 94, 0.6);
} }
} }
@ -203,10 +212,9 @@ onMounted(() => {
border-radius: 6px; border-radius: 6px;
} }
.slide-right-enter-active, .slide-right-enter-active,
.slide-right-leave-active { .slide-right-leave-active {
transition: all 0.5s ; transition: all 0.5s;
} }
.slide-right-enter-from, .slide-right-enter-from,

Loading…
Cancel
Save