update names

This commit is contained in:
DESKTOP-FUDKNA8\znjsz 2024-01-23 10:58:36 +08:00
parent bc96f76d7f
commit 7bf5a24cda
5 changed files with 137 additions and 72 deletions

View File

@ -17,26 +17,26 @@ const handleClick = (page) => {
<ul class="flex-list">
<li>
<button type="button" @click="(e) => handleClick('3d')">
<span :style="{color: value == '3d' ? '#b1daff': '#339dff' }">三维界面</span>
<Icon3D class="nav-icon" :color="value == '3d' ? '#b1daff': '#339dff'" />
<span :style="{ color: value == '3d' ? '#b1daff' : '#339dff' }">三维界面</span>
<Icon3D class="nav-icon" :color="value == '3d' ? '#b1daff' : '#339dff'" />
</button>
</li>
<li>
<button type="button" @click="(e) => handleClick('data')">
<span :style="{color: value == 'data' ? '#b1daff': '#339dff' }">数据界面</span>
<IconChart class="nav-icon" :color="value == 'data' ? '#b1daff': '#339dff'" />
<span :style="{ color: value == 'data' ? '#b1daff' : '#339dff' }">数据界面</span>
<IconChart class="nav-icon" :color="value == 'data' ? '#b1daff' : '#339dff'" />
</button>
</li>
<li>
<button type="button" @click="(e) => handleClick('realtime')">
<span :style="{color: value == 'realtime' ? '#b1daff': '#339dff' }">实时数据</span>
<IconRealtime class="nav-icon" :color="value == 'realtime' ? '#b1daff': '#339dff'" />
<span :style="{ color: value == 'realtime' ? '#b1daff' : '#339dff' }">实时数据</span>
<IconRealtime class="nav-icon" :color="value == 'realtime' ? '#b1daff' : '#339dff'" />
</button>
</li>
<li>
<button type="button" @click="(e) => handleClick('alert')">
<span :style="{color: value == 'alert' ? '#b1daff': '#339dff' }">报警列表</span>
<IconAlert class="nav-icon" :color="value == 'alert' ? '#b1daff': '#339dff'" />
<span :style="{ color: value == 'alert' ? '#b1daff' : '#339dff' }">报警列表</span>
<IconAlert class="nav-icon" :color="value == 'alert' ? '#b1daff' : '#339dff'" />
</button>
</li>
<li>
@ -112,4 +112,5 @@ li {
.nav-menu button:hover>.nav-icon #announce-main,
.nav-menu button:hover>.nav-icon #chart-main {
fill: #b1daff !important;
}</style>
}
</style>

View File

@ -58,7 +58,7 @@ function handleConfirm() {
}
.setting-dialog {
position: fixed;
position: absolute;
margin: auto;
top: 0;
left: 0;

View File

@ -30,10 +30,80 @@ const props = defineProps({
const eqStatus = computed(() => settings.eqStatus);
const status = ref({
// 线
'M1上片': '',
'M2上片': '',
'M1磨边机': '',
'M2磨边机': '',
'M1清洗机': '',
'M1清洗机': '',
'S1丝印机': '',
'S2丝印机': '',
'S1前储片台': '',
'S2前储片台': '',
'S1清洗机': '',
'S2清洗机': '',
'Z1钻孔机': '',
'Z2钻孔机': '',
'B1前储片台': '',
'B1后储片台': '',
'B1下片': '',
'B1清洗机': '',
//
'M3清洗机': '',
'M4清洗机': '',
'M5清洗机': '',
'M3磨边机': '',
'M4磨边机': '',
'M5磨边机': '',
'M3上片': '',
'M4上片': '',
'M5上片': '',
'Z3钻孔机': '',
'Z4钻孔机': '',
'Z5钻孔机': '',
'S3清洗机': '',
'S4清洗机': '',
'S5清洗机': '',
'S3前储片台': '',
'S4前储片台': '',
'S5前储片台': '',
'S3丝印机': '',
'S4丝印机': '',
'S5丝印机': '',
'S3固化机': '',
'S4固化机': '',
'S5固化机': '',
'S3后储片台': '',
'S4后储片台': '',
'S5后储片台': '',
'B2前储片台': '',
'B2后储片台': '',
'B2下片': '',
'B2清洗机': '',
'M1清洗机': 'error',
'M1磨边机': 'warn'
// ...
//
'M6上片': '',
'M7上片': '',
'M6磨边机': '',
'M7磨边机': '',
'M6清洗机': '',
'M7清洗机': '',
'Z6钻孔机': '',
'Z7钻孔机': '',
'S6清洗机': '',
'S7清洗机': '',
'S6前储片台': '',
'S7前储片台': '',
'S6丝印机': '',
'S7丝印机': '',
'S6固化炉': '',
'S7固化炉': '',
'S6后储片台': '',
'S7后储片台': '',
'B3前储片台': '',
'B3后储片台': '',
'B3清洗机': '',
'B3下片': '',
})
</script>
@ -80,13 +150,13 @@ const status = ref({
<div class="info-2" v-if="eqStatus && line == '2'">
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['Z7钻孔机'] == 'error' ? '#ff3737' : status['Z7钻孔机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
Z7钻孔机
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['Z6钻孔机'] == 'error' ? '#ff3737' : status['Z6钻孔机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
Z6钻孔机
</h1>
<span v-if="lines.g3?.drillingInput">上片: {{ lines.g3.drillingInput }}</span>
@ -94,37 +164,37 @@ const status = ref({
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S7清洗机'] == 'error' ? '#ff3737' : status['S7清洗机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S7清洗机
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S6清洗机'] == 'error' ? '#ff3737' : status['S6清洗机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S6清洗机
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S7前储片台'] == 'error' ? '#ff3737' : status['S7前储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S7前储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S6前储片台'] == 'error' ? '#ff3737' : status['S6前储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S6前储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S7丝印机'] == 'error' ? '#ff3737' : status['S7丝印机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S7丝印机
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S6丝印机'] == 'error' ? '#ff3737' : status['S6丝印机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S6丝印机
</h1>
<span v-if="lines.g3?.silkInput">上片: {{ lines.g3.silkInput }}</span>
@ -132,13 +202,13 @@ const status = ref({
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S7固化炉'] == 'error' ? '#ff3737' : status['S7固化炉'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S7固化炉
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S6固化炉'] == 'error' ? '#ff3737' : status['S6固化炉'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S6固化炉
</h1>
<span v-if="lines.g3?.solidificationInput">上片: {{ lines.g3.solidificationInput }}</span>
@ -146,13 +216,13 @@ const status = ref({
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S7后储片台'] == 'error' ? '#ff3737' : status['S7后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S7后储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S6后储片台'] == 'error' ? '#ff3737' : status['S6后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S6后储片台
</h1>
</div>
@ -245,7 +315,7 @@ const status = ref({
<div class="info-6" v-if="eqStatus && line == '6'">
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['Z5钻孔机'] == 'error' ? '#ff3737' : status['Z5钻孔机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
Z5钻孔机
</h1>
</div>
@ -259,49 +329,49 @@ const status = ref({
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['Z3钻孔机'] == 'error' ? '#ff3737' : status['Z3钻孔机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
Z3钻孔机
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S5清洗机'] == 'error' ? '#ff3737' : status['S5清洗机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S5清洗机
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S4清洗机'] == 'error' ? '#ff3737' : status['S4清洗机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S4清洗机
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S3清洗机'] == 'error' ? '#ff3737' : status['S3清洗机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S3清洗机
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S5前储片台'] == 'error' ? '#ff3737' : status['S5前储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S5前储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S4前储片台'] == 'error' ? '#ff3737' : status['S4前储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S4前储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S3前储片台'] == 'error' ? '#ff3737' : status['S3前储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S3前储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S5丝印机'] == 'error' ? '#ff3737' : status['S5丝印机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S5丝印机
</h1>
</div>
@ -315,7 +385,7 @@ const status = ref({
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S3丝印机'] == 'error' ? '#ff3737' : status['S3丝印机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S3丝印机
</h1>
</div>
@ -323,25 +393,25 @@ const status = ref({
<div class="info-7" v-if="eqStatus && line == '7'">
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S5后储片台'] == 'error' ? '#ff3737' : status['S5后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S5后储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S4后储片台'] == 'error' ? '#ff3737' : status['S4后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S4后储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S3后储片台'] == 'error' ? '#ff3737' : status['S3后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S3后储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S5固化炉'] == 'error' ? '#ff3737' : status['S5固化炉'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S5固化炉
</h1>
</div>
@ -355,13 +425,13 @@ const status = ref({
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S3固化炉'] == 'error' ? '#ff3737' : status['S3固化炉'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S3固化炉
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M4磨边机'] == 'error' ? '#ff3737' : status['M4磨边机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['B2前储片台'] == 'error' ? '#ff3737' : status['B2前储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
B2前储片台
</h1>
</div>
@ -466,19 +536,19 @@ const status = ref({
</div>
<div class="info">
<h1>
<Icon :color="status['M1清洗机'] == 'error' ? '#ff3737' : status['M1清洗机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S1前储片台'] == 'error' ? '#ff3737' : status['S1前储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S1前储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M1清洗机'] == 'error' ? '#ff3737' : status['M1清洗机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S2丝印机'] == 'error' ? '#ff3737' : status['S2丝印机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S2丝印机
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['M1清洗机'] == 'error' ? '#ff3737' : status['M1清洗机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S1丝印机'] == 'error' ? '#ff3737' : status['S1丝印机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S1丝印机
</h1>
<span v-if="lines.g1?.silkInput">上片: {{ lines.g1.silkInput }}</span>
@ -500,13 +570,13 @@ const status = ref({
</div>
<div class="info">
<h1>
<Icon :color="status['S6后储片台'] == 'error' ? '#ff3737' : status['S6后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S7固化炉'] == 'error' ? '#ff3737' : status['S7固化炉'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S7固化炉
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['S6后储片台'] == 'error' ? '#ff3737' : status['S6后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['S6固化炉'] == 'error' ? '#ff3737' : status['S6固化炉'] == 'warn' ? '#ffb524' : '#24ff5e'" />
S6固化炉
</h1>
<span v-if="lines.g3?.solidificationInput">上片: {{ lines.g3.solidificationInput }}</span>
@ -514,7 +584,7 @@ const status = ref({
</div>
<div class="info">
<h1>
<Icon :color="status['S6后储片台'] == 'error' ? '#ff3737' : status['S6后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['B3前储片台'] == 'error' ? '#ff3737' : status['B3前储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
B3前储片台
</h1>
</div>
@ -522,25 +592,25 @@ const status = ref({
<div class="info-12" v-if="eqStatus && line == '12'">
<div class="info">
<h1>
<Icon :color="status['S6后储片台'] == 'error' ? '#ff3737' : status['S6后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['B3前储片台'] == 'error' ? '#ff3737' : status['B3前储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
B3前储片台
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['S6后储片台'] == 'error' ? '#ff3737' : status['S6后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['B3清洗机'] == 'error' ? '#ff3737' : status['B3清洗机'] == 'warn' ? '#ffb524' : '#24ff5e'" />
B3清洗机
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['S6后储片台'] == 'error' ? '#ff3737' : status['S6后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['B3下片'] == 'error' ? '#ff3737' : status['B3下片'] == 'warn' ? '#ffb524' : '#24ff5e'" />
B3下片
</h1>
</div>
<div class="info">
<h1>
<Icon :color="status['S6后储片台'] == 'error' ? '#ff3737' : status['S6后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
<Icon :color="status['B3后储片台'] == 'error' ? '#ff3737' : status['B3后储片台'] == 'warn' ? '#ffb524' : '#24ff5e'" />
B3后储片台
</h1>
</div>

View File

@ -3,32 +3,26 @@
import { ref } from "vue";
import { useWsStore } from "../store";
import Container from "../components/Base/Container.vue";
const alarmList = ref([]);
const store = useWsStore();
alarmList.value = (store.data1.alarmArrList ?? [
{ id: 1, equipmentName: 'hallo', alarmLevel: 1, alarmDetails: 'asdf', productLine: 'A001', segment: '2' },
{ id: 1, equipmentName: 'fffff', alarmLevel: 1, alarmDetails: 'sda', productLine: 'A002', segment: '3' },
{ id: 1, equipmentName: 'aaaa', alarmLevel: 1, alarmDetails: 'dfd', productLine: 'A001', segment: '1' },
]).map((item, index) => ({
const store = useWsStore();
const alarmList = ref((store.data1.alarmArrList || []).map((item, index) => ({
id: item.id,
eqName: item.equipmentName,
eqIndex: index + 1,
alarmGrade: item.alarmLevel,
alarmDetail: item.alarmDetails,
position: `${item.productLine} - ${item.segment}`,
}));
// store.$subscribe((mutation, state) => {
// alarmList.value = state.data1.alarmArrList.map((item, index) => ({
// id: item.id,
// eqName: item.equipmentName,
// eqIndex: index + 1,
// alarmGrade: item.alarmLevel,
// alarmDetail: item.alarmDetails,
// position: `${item.productLine} - ${item.segment}`,
// }));
// });
})));
store.$subscribe((mutation, state) => {
alarmList.value = state.data1.alarmArrList.map((item, index) => ({
id: item.id,
eqName: item.equipmentName,
eqIndex: index + 1,
alarmGrade: item.alarmLevel,
alarmDetail: item.alarmDetails,
position: `${item.productLine} - ${item.segment}`,
}));
});
// function handleIgnore() {
// alarmList.value.splice(0)

View File

@ -48,7 +48,7 @@ const handleClose = () => {
<button
id="return-btn"
style="
position: fixed;
position: absolute;
right: 32px;
top: 56px;
appearance: none;
@ -80,6 +80,7 @@ const handleClose = () => {
display: flex;
flex-direction: column;
color: #f00;
position: relative;
}
.announcement-title {
@ -109,7 +110,6 @@ const handleClose = () => {
padding: 0 80px;
line-height: 128px;
font-family: sans-serif;
position: relative;
user-select: none;
}
</style>