1.将所有 ”#“ 改为 序号
2.调整 月度开炉次数统计 颜色
3.调整 设备运行状态总览 数值显示在内部
4.调整 当前报警发生设备 标题背景颜色、滚动速度改为 0.3、滚动数据长度改为18条时开启
5.调整 设备状态布局
6.将免登录按钮添加逻辑判断只有测试时显示
main
liuhr 2 years ago
parent 574bb3e939
commit 518094a6d2

@ -74,7 +74,7 @@
/> -->
</div>
<div class="row q-col-gutter-md" style="width:460px;">
<div class="col-6" style="width:230px;">
<div :class="noSigninFlag == true ? 'col-6 btnWidth' : 'col-12'">
<q-btn class="full-width" size="lg" :loading="loginLoading" color="primary" glossy rounded unelevated push
label="登录" @click="login">
<template v-slot:loading>
@ -83,7 +83,7 @@
</template>
</q-btn>
</div>
<div class="col-6" style="width:230px;">
<div class="col-6 btnWidth" v-if="noSigninFlag">
<q-btn class="full-width" size="lg" color="orange-6" glossy rounded unelevated push label="免登录"
@click="noSignin" />
</div>
@ -108,12 +108,13 @@
<script setup lang="ts">
import { loginApi } from 'src/api/login/loginApi';
import { LocalStorage, Notify } from 'quasar';
import { onMounted, reactive, ref } from 'vue';
import { onMounted, ref } from 'vue';
import { useRouter } from 'vue-router';
import { getMenus } from '../router/routerControl/index';
// import { getMenus } from '../router/routerControl/index';
import menuinfo from 'src/json/menuInfo.json'
import { LoginEntity } from 'src/api/login/model/login';
const noSigninFlag = ref(false);
const isPwd = ref(true);
const router = useRouter();
let loginFormData = ref(new LoginEntity());
@ -200,6 +201,9 @@ const noSignin = () => {
const userName = LocalStorage.getItem('userName')
const passwordRef = ref();
onMounted(() => {
if (process.env.NODE_ENV !== 'production') {
noSigninFlag.value = true;
}
if (userName) {
loginFormData.value.userName = userName.toString()
passwordRef.value.focus();
@ -211,6 +215,10 @@ onMounted(() => {
</script>
<style lang="scss" scoped>
.btnWidth {
width: 230px;
}
.loginIndex {
opacity: 1;
//

@ -145,7 +145,7 @@ let tableData: any = ref([]);
const columns: any = ref([
{
name: 'index',
label: '#',
label: '序号',
field: 'index',
align: 'center',
headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',

@ -113,7 +113,7 @@ let tableData: any = ref();
const columns: any = ref([
{
name: 'index',
label: '#',
label: '序号',
field: 'index',
align: 'center',
headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',

@ -126,7 +126,7 @@ const loading = ref(false);
const columns = ref([
{
name: 'index',
label: '#',
label: '序号',
field: 'index',
align: 'center',
headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',

@ -85,10 +85,9 @@ const activatedList = ref([
])
const remarkList = ref([
{ label: '第一涂层室', value: '第一涂层室' },
{ label: '第二涂层室', value: '第二涂层室' },
{ label: '第三涂层室', value: '第三涂层室' },
{ label: '第四涂层室', value: '第四涂层室' }
{ label: 'Ionbond', value: 'Ionbond' },
{ label: 'Balzers', value: 'Balzers' },
{ label: 'CemeCon', value: 'CemeCon' }
])
//

@ -125,7 +125,7 @@ const loading = ref(false);
const columns = ref([
{
name: 'index',
label: '#',
label: '序号',
field: 'index',
align: 'center',
headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',

@ -72,17 +72,18 @@
<table style="width: 100%; ">
<thead>
<tr>
<th class="text-center headerStyle" style="width:5%;">#</th>
<th class="text-center headerStyle" style="width:10%;">序号</th>
<th class="text-center headerStyle" style="width:40%;">设备编码</th>
<th class="text-center headerStyle" style="width:40%;">设备名称</th>
</tr>
</thead>
</table>
<vue3-seamless-scroll :list="list" :step="0.8" :hover="true" class="scroll">
<vue3-seamless-scroll :list="list" :step="0.3" :hover="true"
:limitScrollNum="18" class="scroll">
<table style="width: 100%;">
<tbody>
<tr v-for="(item, index) in list" :key="index" class="item">
<td class="text-center" style="width:5%;">{{ index + 1 }}</td>
<td class="text-center" style="width:10%;">{{ index + 1 }}</td>
<td class="text-center" style="width:40%;">{{ item.equipmentCode
}}</td>
<td class="text-center" style="width:40%;">{{ item.equipmentName
@ -176,7 +177,7 @@ onBeforeUnmount(() => {
// const columns: any = ref([
// {
// name: 'index',
// label: '#',
// label: '',
// field: 'index',
// align: 'center',
// headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:16px;',
@ -312,9 +313,9 @@ const EquipmentStateView = () => {
normal: {
// alignTo: 'labelLine',
fontSize: '16px',
color: '#000',
color: '#fff',
show: true,
position: 'outside', // outseide
position: 'inside', // outseide
formatter: '{@[1]} 台'
// formatter: '{@[1]} \n {d} %'
// formatter: '{@product}\n{@[1]}\n{d}%'
@ -332,9 +333,9 @@ const EquipmentStateView = () => {
label: {
normal: {
fontSize: '16px',
color: '#000',
color: '#fff',
show: true,
position: 'outside', // outseide
position: 'inside', // outseide
formatter: '{@[2]} 台'
// formatter: '{@[2]} \n {d} %'
}
@ -351,9 +352,9 @@ const EquipmentStateView = () => {
label: {
normal: {
fontSize: '16px',
color: '#000',
color: '#fff',
show: true,
position: 'outside', // outseide
position: 'inside', // outseide
formatter: '{@[3]} 台'
// formatter: '{@[3]} \n {d} %'
}
@ -370,9 +371,9 @@ const EquipmentStateView = () => {
label: {
normal: {
fontSize: '16px',
color: '#000',
color: '#fff',
show: true,
position: 'outside', // outseide
position: 'inside', // outseide
formatter: '{@[4]} 台'
// formatter: '{@[4]} \n {d} %'
}
@ -595,7 +596,7 @@ const EquipmentRecordFurnaceMonthTotal = () => {
//
var option = {
color: color.value,
color: ['#1976d2', '#e91e63', '#9c27b0'],//color.value,
title: {
text: '月度开炉次数统计',
// subtext: ''
@ -872,7 +873,8 @@ const categoryEcharts = (ele: any, option: any) => {
.headerStyle {
background-color: #5186ec;
/* background-color: #5186ec; */
background-color: #fdba35;
color: white;
font-weight: bold;
font-size: 16px;

@ -109,7 +109,7 @@ const deviceList = ref([]);
const columns = ref([
{
name: 'index',
label: '#',
label: '序号',
field: 'index',
align: 'center',
headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',

@ -20,11 +20,11 @@
</template>
</q-table> -->
<div class="col-xs-2 col-xl-2 col-lg-2 col-sm-2">
<div class="col-xs-6 col-xl-6 col-lg-6 col-sm-6">
<q-card class="my-card">
<q-card-section class="row q-pa-xs">
<template v-for="(item, index) in list1" v-bind:key="item">
<div class="q-pa-xs col-xs-12 col-xl-12 col-lg-12 col-sm-12">
<template v-for="(item, index) in BalzersList" v-bind:key="item">
<div class="q-pa-xs col-xs-4 col-xl-4 col-lg-4 col-sm-4">
<q-card :class="'my-card no-shadow ' + helper.getEquipmentStateColor(item.state)"
:bordered="item.id != ''" :flat="item.id == ''" style="height:70px;">
<q-card-section>
@ -47,16 +47,16 @@
</div>
</template>
</q-card-section>
<q-card-section>
<!-- <q-card-section>
<div class="text-h6 text-weight-bold text-center ">第四涂层室</div>
</q-card-section>
</q-card-section> -->
</q-card>
</div>
<div class="col-xs-3 col-xl-3 col-lg-3 col-sm-3">
<div class="col-xs-2 col-xl-2 col-lg-2 col-sm-2">
<q-card class="my-card">
<q-card-section class="row q-pa-xs">
<template v-for="(item, index) in list2" v-bind:key="item">
<div class="q-pa-xs col-xs-6 col-xl-6 col-lg-6 col-sm-6">
<div class="q-pa-xs col-xs-12 col-xl-12 col-lg-12 col-sm-12">
<q-card :class="'my-card no-shadow ' + helper.getEquipmentStateColor(item.state)"
:bordered="item.id != ''" :flat="item.id == ''" style="height:70px;">
<q-card-section class="col-xs-3 col-xl-3 col-lg-4 col-sm-12 ">
@ -79,12 +79,12 @@
</div>
</template>
</q-card-section>
<q-card-section>
<!-- <q-card-section>
<div class=" text-h6 text-weight-bold text-center ">第三涂层室</div>
</q-card-section>
</q-card-section> -->
</q-card>
</div>
<div class=" col-xs-3 col-xl-3 col-lg-3 col-sm-3">
<div class=" col-xs-4 col-xl-4 col-lg-4 col-sm-4">
<q-card class="my-card">
<q-card-section class="row q-pa-xs">
<template v-for="(item, index) in list3" v-bind:key="item">
@ -112,13 +112,13 @@
</div>
</template>
</q-card-section>
<q-card-section>
<!-- <q-card-section>
<div class="text-h6 text-weight-bold text-center ">
第二涂层室</div>
</q-card-section>
</q-card-section> -->
</q-card>
</div>
<div class=" col-xs-4 col-xl-4 col-lg-4 col-sm-4">
<!-- <div class=" col-xs-4 col-xl-4 col-lg-4 col-sm-4">
<q-card class="my-card">
<q-card-section class="row q-pa-xs">
<template v-for="(item, index) in list4" v-bind:key="item">
@ -151,7 +151,7 @@
</div>
</q-card-section>
</q-card>
</div>
</div> -->
</div>
</q-card-section>
@ -163,53 +163,68 @@
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { ref, onMounted, onBeforeUnmount } from 'vue';
import { Screen } from 'quasar';
import viewDialog from './components/viewDialog.vue';
import { equipmentApi } from 'src/api/equipment/equipmentApi'
import { EquipmentSearchEntity } from 'src/api/equipment/model/equipment'
import helper from 'src/Utils/helper'
import screen3_1 from 'src/json/screen3_1.json'
import screen3_2 from 'src/json/screen3_2.json'
import screen3_3 from 'src/json/screen3_3.json'
import screen3_4 from 'src/json/screen3_4.json'
// import screen3_1 from 'src/json/screen3_1.json'
// import screen3_2 from 'src/json/screen3_2.json'
// import screen3_3 from 'src/json/screen3_3.json'
// import screen3_4 from 'src/json/screen3_4.json'
//
const loading = ref(false);
const columns = ref([
{
name: 'index',
label: '#',
field: 'index',
align: 'center',
headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',
},
{
name: 'name',
align: 'center',
label: '设备名称',
field: 'name',
headerClasses: 'text-h4 text-weight-bold',
headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',
},
{ name: 'calories', align: 'center', label: '设备类型', field: 'calories', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
{ name: 'state', align: 'center', label: '运行状态', field: 'state', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
{ name: 'start', align: 'center', label: '启动时间', field: 'start', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
{ name: 'end', align: 'center', label: '停止时间', field: 'end', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
{ name: 'total', align: 'center', label: '累计运行时间', field: 'total', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
])
// const loading = ref(false);
// const columns = ref([
// {
// name: 'index',
// label: '',
// field: 'index',
// align: 'center',
// headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',
// },
// {
// name: 'name',
// align: 'center',
// label: '',
// field: 'name',
// headerClasses: 'text-h4 text-weight-bold',
// headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',
// },
// { name: 'calories', align: 'center', label: '', field: 'calories', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
// { name: 'state', align: 'center', label: '', field: 'state', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
// { name: 'start', align: 'center', label: '', field: 'start', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
// { name: 'end', align: 'center', label: '', field: 'end', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
// { name: 'total', align: 'center', label: '', field: 'total', headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;' },
// ])
const list1 = ref();
const BalzersList = ref();
const list2 = ref();
const list3 = ref();
const list4 = ref();
const equipmentSearchEntity = ref(new EquipmentSearchEntity());
let equipmentListTimer: NodeJS.Timer | null = null; //
onMounted(() => {
EquipmentList();
// 10
equipmentListTimer = setInterval(() => {
EquipmentList();
}, 10000);
})
onBeforeUnmount(() => {
// timer
clearInterval(Number(equipmentListTimer))
})
const EquipmentList = () => {
let Coating1 = [] as any
let Coating2 = [] as any
let Coating3 = [] as any
let Coating4 = [] as any
let BalzersCoating = [] as any
let templateJSON = {
id: '',
equipmentCode: null,
@ -226,17 +241,17 @@ onMounted(() => {
res.forEach((item: any) => {
if (item.remark == '第一涂层室') {
Coating1.push(item);
} else if (item.remark == '第二涂层室') {
} else if (item.remark == 'CemeCon') {
Coating2.push(item);
} else if (item.remark == '第三涂层室') {
} else if (item.remark == 'Ionbond') {
Coating3.push(item);
} else if (item.remark == '第四涂层室') {
Coating4.push(item);
} else if (item.remark == 'Balzers') {
BalzersCoating.push(item);
}
});
//
Coating1.sort((a, b) => a.ordrNo - b.ordrNo);
Coating1.sort((a: any, b: any) => a.ordrNo - b.ordrNo);
let Coating1Val = [] as any
for (let i = 1; i <= 14; i++) {
for (let j = 0; j < Coating1.length; j++) {
@ -257,9 +272,9 @@ onMounted(() => {
list4.value = Coating1Val //obj4
//
Coating2.sort((a, b) => a.ordrNo - b.ordrNo);
Coating2.sort((a: any, b: any) => a.ordrNo - b.ordrNo);
let Coating2Val = [] as any
for (let i = 1; i <= 14; i++) {
for (let i = 1; i <= 18; i++) {
for (let j = 0; j < Coating2.length; j++) {
if (Coating2[j].ordrNo == i) {
Coating2Val.push(Coating2[j])
@ -283,9 +298,9 @@ onMounted(() => {
//
Coating3.sort((a, b) => a.ordrNo - b.ordrNo);
Coating3.sort((a: any, b: any) => a.ordrNo - b.ordrNo);
let Coating3Val = [] as any
for (let i = 1; i <= 14; i++) {
for (let i = 1; i <= 9; i++) {
for (let j = 0; j < Coating3.length; j++) {
if (Coating3[j].ordrNo == i) {
Coating3Val.push(Coating3[j])
@ -306,17 +321,17 @@ onMounted(() => {
// obj2.splice(11, 0, templateJSON);
list2.value = Coating3Val //obj2
//
Coating4.sort((a, b) => a.ordrNo - b.ordrNo);
let Coating4Val = [] as any
for (let i = 1; i <= 14; i++) {
for (let j = 0; j < Coating4.length; j++) {
if (Coating4[j].ordrNo == i) {
Coating4Val.push(Coating4[j])
Coating4.splice(j, 1);
// Balzers
BalzersCoating.sort((a: any, b: any) => a.ordrNo - b.ordrNo);
let BalzersCoatingVal = [] as any
for (let i = 1; i <= 27; i++) {
for (let j = 0; j < BalzersCoating.length; j++) {
if (BalzersCoating[j].ordrNo == i) {
BalzersCoatingVal.push(BalzersCoating[j])
BalzersCoating.splice(j, 1);
break
} else {
Coating4Val.push(templateJSON)
BalzersCoatingVal.push(templateJSON)
break
}
}
@ -326,12 +341,10 @@ onMounted(() => {
// obj1.splice(0, 0, templateJSON, templateJSON);
// obj1.splice(3, 0, templateJSON);
// obj1.splice(5, 0, templateJSON);
list1.value = Coating4Val // obj1
BalzersList.value = BalzersCoatingVal // obj1
})
})
}
const viewRef = ref();
const openView = (e: any) => {

@ -101,7 +101,7 @@ const rangDateText = ref();
const columns = ref([
{
name: 'index',
label: '#',
label: '序号',
field: 'index',
align: 'center',
headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',

@ -100,7 +100,7 @@ const deviceList = ref([]);
const columns = ref([
{
name: 'index',
label: '#',
label: '序号',
field: 'index',
align: 'center',
headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',

@ -113,7 +113,7 @@ const activatedList = ref([
const columns = ref([
{
name: 'index',
label: '#',
label: '序号',
field: 'index',
align: 'center',
headerStyle: 'background-color: #5186ec;color: white;font-weight: bold;font-size:20px;',

Loading…
Cancel
Save