Merge pull request 'projects/mes-lb' (#104) from projects/mes-lb into projects/mes-test

Reviewed-on: #104
This commit is contained in:
g7hoo 2023-11-22 17:09:03 +08:00
commit 0ce6bc07a0
8 changed files with 264 additions and 148 deletions

View File

@ -37,6 +37,9 @@ $tabWidth: $tabW * 1px;
$rowHeight: $rowH * 1px; $rowHeight: $rowH * 1px;
$buttonHeight: $buttonH * 1px; $buttonHeight: $buttonH * 1px;
// 1080px 高度为基准的 1px
$base1px: 0.15vh; // 1px / 1080px;
// - - - - - 页面基础设置 // - - - - - 页面基础设置
.container { .container {
.login-code { .login-code {
@ -87,7 +90,7 @@ $buttonHeight: $buttonH * 1px;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #ffffff; background-color: #ffffff;
// box-shadow: 0px 16px 40px rgba(0, 0, 0, 0.07); // box-shadow: 0px calc(16 * 0.12vh) 40px rgba(0, 0, 0, 0.07);
// border-radius: 20px; // border-radius: 20px;
// 定位 // 定位
position: relative; position: relative;
@ -100,6 +103,7 @@ $buttonHeight: $buttonH * 1px;
// 元素 // 元素
// width: $picWidth; // width: $picWidth;
height: $picHeight; height: $picHeight;
// height: 10vh;
background-image: url($picImage); background-image: url($picImage);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
@ -118,7 +122,7 @@ $buttonHeight: $buttonH * 1px;
} }
.field { .field {
position: relative; position: relative;
margin-top: 8%; margin-top: 14vh;
flex: 2; flex: 2;
// width: 800px; // width: 800px;
display: flex; display: flex;
@ -130,17 +134,36 @@ $buttonHeight: $buttonH * 1px;
text-align: center; text-align: center;
clear: both; clear: both;
position: relative; position: relative;
top: -36px; top: calc(-32 * $base1px);
height: 128px; height: calc(128 * $base1px);
.title { .title {
margin: 0; margin: 0;
margin-left: 32px; margin-left: calc(28 * 0.12vh);
font-weight: 400; font-weight: 400;
user-select: none; user-select: none;
color: #000; color: #000;
font-size: 36px; font-size: calc(28 * 0.12vh);
line-height: 54px; line-height: calc(40 * 0.12vh);
letter-spacing: calc(2 * 0.12vh);
.cnbm_logo {
height: calc(40 * 0.12vh);
width: calc(40 * 0.12vh);
position: relative;
top: calc(8 * 0.12vh);
right: calc(8 * 0.12vh);
}
}
.sub-title {
margin: 0;
margin-left: calc(28 * 0.12vh);
font-weight: 400;
user-select: none;
color: #000;
font-size: calc(28 * 0.12vh);
line-height: calc(48 * 0.12vh);
letter-spacing: 2px; letter-spacing: 2px;
} }
} }
@ -159,10 +182,10 @@ $buttonHeight: $buttonH * 1px;
.footer { .footer {
user-select: none; user-select: none;
// 元素 // 元素
margin: 12px 0; margin: calc(12 * 0.12vh) 0;
height: 16px; height: calc(16 * 0.12vh);
line-height: 16px; line-height: calc(16 * 0.12vh);
font-size: 12px; font-size: calc(12 * 0.12vh);
color: #8c8c8c; color: #8c8c8c;
a, a,
@ -176,12 +199,8 @@ $buttonHeight: $buttonH * 1px;
.form { .form {
margin-top: 0; margin-top: 0;
box-sizing: border-box; box-sizing: border-box;
// width: $formWidth;
width: 100%; width: 100%;
// - - - tab
:deep(.el-tabs__nav) {
// background: #f0f3;
}
:deep(.el-tabs__content) { :deep(.el-tabs__content) {
padding: 20px 0 0; padding: 20px 0 0;
} }
@ -189,12 +208,13 @@ $buttonHeight: $buttonH * 1px;
user-select: none; user-select: none;
// 元素 // 元素
width: $tabWidth; width: $tabWidth;
height: $rowHeight; // height: $rowHeight;
height: calc(54 * 0.12vh);
padding: 0; padding: 0;
// 文字 // 文字
line-height: $rowHeight; line-height: $rowHeight;
color: #666666; color: #666666;
font-size: 18px; font-size: calc(14 * 0.12vh);
font-weight: 400; font-weight: 400;
text-align: center; text-align: center;
} }
@ -210,7 +230,8 @@ $buttonHeight: $buttonH * 1px;
:deep(.el-input__inner) { :deep(.el-input__inner) {
// 元素 // 元素
width: 100%; width: 100%;
height: $rowHeight; // height: $rowHeight;
height: calc(72 * 0.12vh);
background: #f5f5f5; background: #f5f5f5;
border: 0; border: 0;
border-radius: 28px; border-radius: 28px;
@ -280,7 +301,7 @@ $buttonHeight: $buttonH * 1px;
margin-bottom: 20px; margin-bottom: 20px;
// 文字 // 文字
line-height: 26px; line-height: 26px;
font-size: 20px; font-size: calc(18 * 0.12vh);
color: #ffffff; color: #ffffff;
} }
.button-active { .button-active {
@ -299,13 +320,14 @@ $buttonHeight: $buttonH * 1px;
:deep(.el-input__inner) { :deep(.el-input__inner) {
// 元素 // 元素
width: 420px; width: 420px;
height: 66px; height: calc(52 * 0.12vh);
// height: 66px;
color: #262626; color: #262626;
font-size: 18px; font-size: calc(14 * 0.12vh);
} }
:deep(.el-checkbox__label) { :deep(.el-checkbox__label) {
font-size: 18px; font-size: calc(14 * 0.12vh);
line-height: 14px; line-height: calc(12 * 0.12vh);
} }
} }
} }
@ -314,19 +336,42 @@ $buttonHeight: $buttonH * 1px;
@media screen and (min-width: 1920px) { @media screen and (min-width: 1920px) {
.container { .container {
.content { .content {
.field { .field {
flex: initial; flex: initial;
width: 800px; // width: 800px;
width: 40vw;
}
}
}
}
@media screen and (min-height: 1024px) {
.container {
.content {
.field {
margin-top: 16vh;
}
}
}
}
@media screen and (max-height: 1024px) {
.container {
.content {
.field {
margin-top: 8vh;
} }
} }
} }
} }
@media screen and (min-width: 599px) and (max-width: 1366px) { @media screen and (min-width: 599px) and (max-width: 1366px) {
.container { .container {
min-width: 599px; // min-width: 599px;
min-width: 42vw;
.content { .content {
// width: 710px; // width: 710px;
// height: 397px; // height: 397px;
@ -337,6 +382,7 @@ $buttonHeight: $buttonH * 1px;
display: none; display: none;
} }
.field { .field {
// margin-top: 6vh;
// width: calc(710px - 314px); // width: calc(710px - 314px);
// left: 314px; // left: 314px;
// justify-content: center; // justify-content: center;
@ -363,6 +409,14 @@ $buttonHeight: $buttonH * 1px;
} }
} }
// @media screen and (max-height: 1080px) {
// .container {
// .field {
// transform: scale(0.74);
// }
// }
// }
/* ===== MOBILE DESIGN ===== */ /* ===== MOBILE DESIGN ===== */
$mobileW: 375; $mobileW: 375;
$mobileH: 812; $mobileH: 812;
@ -503,7 +557,7 @@ $iconBgImage: '../assets/images/icon.png';
.footer { .footer {
// 元素 // 元素
font-size: 12px; font-size: calc(12 * 0.12vh);
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 400; font-weight: 400;
line-height: 17px; line-height: 17px;
@ -511,7 +565,7 @@ $iconBgImage: '../assets/images/icon.png';
opacity: 0.6; opacity: 0.6;
// 定位 // 定位
// position: absolute; // position: absolute;
bottom: -32px; bottom: -calc(32 * 0.12vh);
} }
} }
} }

View File

@ -347,6 +347,8 @@ export default {
console.log('setting code: ', response.data); console.log('setting code: ', response.data);
// //
this.form[opt.prop] = response.data; this.form[opt.prop] = response.data;
// dataFormcodebug
this.$emit('update', this.form)
} }
}); });
} }

View File

@ -61,7 +61,7 @@
rows: drawerBaseInfoRows, rows: drawerBaseInfoRows,
}, },
{ {
name: '属性列表', name: '采集参数',
key: 'attrs', key: 'attrs',
props: drawerListProps, props: drawerListProps,
url: '/base/equipment-plc-param/page', url: '/base/equipment-plc-param/page',
@ -75,18 +75,26 @@
pageSize: 10, pageSize: 10,
}, },
tableBtn: [ tableBtn: [
this.$auth.hasPermi('equipment:collection-config-param:update') {
? { type: 'edit',
type: 'edit', btnName: '修改',
btnName: '修改', },
} {
: undefined, type: 'delete',
this.$auth.hasPermi('equipment:collection-config-param:delete') btnName: '删除',
? { },
type: 'delete', // this.$auth.hasPermi('equipment:collection-config-param:update')
btnName: '删除', // ? {
} // type: 'edit',
: undefined, // btnName: '',
// }
// : undefined,
// this.$auth.hasPermi('equipment:collection-config-param:delete')
// ? {
// type: 'delete',
// btnName: '',
// }
// : undefined,
].filter((v) => v), ].filter((v) => v),
allowAdd: true, allowAdd: true,
}, },
@ -106,7 +114,6 @@ import {
getEquipmentPlcConnectPage, getEquipmentPlcConnectPage,
exportEquipmentPlcConnectExcel, exportEquipmentPlcConnectExcel,
} from '@/api/base/equipmentPlcConnect'; } from '@/api/base/equipmentPlcConnect';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
// import './http'; // import './http';
import BasicDrawer from './components/BasicDrawer.vue'; import BasicDrawer from './components/BasicDrawer.vue';
@ -182,13 +189,15 @@ export default {
placeholder: '请选择设备', placeholder: '请选择设备',
param: 'equipmentId', param: 'equipmentId',
selectOptions: [], selectOptions: [],
filterable: true
}, },
{ {
type: 'select', type: 'select',
label: '编码', label: '关联表编码',
placeholder: '请选择编码', placeholder: '请选择关联表编码',
param: 'plcId', param: 'plcId',
selectOptions: [], selectOptions: [],
filterable: true
}, },
{ {
type: 'button', type: 'button',
@ -224,7 +233,9 @@ export default {
prop: 'plcId', prop: 'plcId',
labelKey: `plcTableName`, labelKey: `plcTableName`,
url: '/base/equipment-plc/listAll', url: '/base/equipment-plc/listAll',
rules: [{ required: true, message: '关联表名不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '关联表名不能为空', trigger: 'blur' },
],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -236,7 +247,9 @@ export default {
label: '设备', label: '设备',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/page?pageNo=1&pageSize=99', url: '/base/core-equipment/page?pageNo=1&pageSize=99',
rules: [{ required: true, message: '设备不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '设备不能为空', trigger: 'blur' },
],
bind: { bind: {
filterable: true, filterable: true,
}, },
@ -262,7 +275,9 @@ export default {
input: true, input: true,
label: '设备名', label: '设备名',
prop: 'equipmentName', prop: 'equipmentName',
rules: [{ required: true, message: '设备名不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '设备名不能为空', trigger: 'blur' },
],
// bind: { // bind: {
// disabled: this.editMode == 'detail', // some condition, like detail mode... // disabled: this.editMode == 'detail', // some condition, like detail mode...
// } // }
@ -296,7 +311,8 @@ export default {
label: '生产参数类型', label: '生产参数类型',
filter: (val) => filter: (val) =>
val != null val != null
? ['', '进片数量', '出片数量', '破损数量', '无类型', ''][val] // ? ['', '', '', '', '', ''][val]
? ['', '进口计数', '出口计数', '损耗计数', '无类型', ''][val]
: '-', : '-',
}, },
{ {

View File

@ -59,7 +59,6 @@ import {
getEquipmentPlcPage, getEquipmentPlcPage,
exportEquipmentPlcExcel, exportEquipmentPlcExcel,
} from '@/api/base/equipmentPlc'; } from '@/api/base/equipmentPlc';
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
const switchBtn = { const switchBtn = {
@ -352,7 +351,7 @@ export default {
handleDelete(row) { handleDelete(row) {
const id = row.id; const id = row.id;
this.$modal this.$modal
.confirm('是否确认删除实时数据采集配置编号为"' + id + '"的数据项?') .confirm('是否确认删除该配置?')
.then(function () { .then(function () {
return deleteEquipmentPlc(id); return deleteEquipmentPlc(id);
}) })

View File

@ -194,13 +194,17 @@ export default {
input: true, input: true,
label: '参数列名', label: '参数列名',
prop: 'plcParamName', prop: 'plcParamName',
rules: [{ required: true, message: '参数列名不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '参数列名不能为空', trigger: 'blur' },
],
}, },
{ {
input: true, input: true,
label: '参数名称', label: '参数名称',
prop: 'name', prop: 'name',
rules: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }], rules: [
{ required: true, message: '参数名称不能为空', trigger: 'blur' },
],
}, },
], ],
[ [
@ -230,19 +234,35 @@ export default {
{ label: '工艺参数', value: 2 }, { label: '工艺参数', value: 2 },
{ label: '报警参数', value: 3 }, { label: '报警参数', value: 3 },
], ],
rules: [{ required: true, message: '设备参数类型不能为空', trigger: 'blur' }], rules: [
{
required: true,
message: '设备参数类型不能为空',
trigger: 'blur',
},
],
}, },
{ {
select: true, select: true,
label: '生产参数类型', label: '生产参数类型',
prop: 'production_param_type', prop: 'production_param_type',
options: [ options: [
{ label: '进片数量', value: 1 }, // { label: '', value: 1 },
{ label: '出片数量', value: 2 }, // { label: '', value: 2 },
{ label: '破损数量', value: 3 }, // { label: '', value: 3 },
// { label: '', value: 4 },
{ label: '进口计数', value: 1 },
{ label: '出口计数', value: 2 },
{ label: '损耗计数', value: 3 },
{ label: '无类型', value: 4 }, { label: '无类型', value: 4 },
], ],
rules: [{ required: true, message: '生产参数类型不能为空', trigger: 'blur' }], rules: [
{
required: true,
message: '生产参数类型不能为空',
trigger: 'blur',
},
],
}, },
], ],
[ [
@ -305,6 +325,7 @@ export default {
infoQuery: null, // infoQuery: null, //
attrFormSubmitting: false, attrFormSubmitting: false,
attrListLoading: false, attrListLoading: false,
shouldRefreshPageView: false,
}; };
}, },
computed: { computed: {
@ -323,10 +344,12 @@ export default {
}); });
}, },
tableBtn() { tableBtn() {
return this.mode == 'detail' ? [] : this.sections[1].tableBtn; return this.sections[1].tableBtn;
// return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
}, },
}, },
mounted() { mounted() {
this.shouldRefreshPageView = false;
this.mode = this.defaultMode || 'detail'; this.mode = this.defaultMode || 'detail';
for (const section of this.sections) { for (const section of this.sections) {
// //
@ -403,6 +426,9 @@ export default {
}, },
handleCancel() { handleCancel() {
if (this.shouldRefreshPageView) {
this.$emit('refreshDataList');
}
this.visible = false; this.visible = false;
}, },
@ -426,7 +452,7 @@ export default {
remark: '', remark: '',
alarmContent: '', alarmContent: '',
}; };
this.attrTitle = '添加设备绑定信息'; this.attrTitle = '添加参数绑定信息';
this.attrFormVisible = true; this.attrFormVisible = true;
}, },
@ -439,14 +465,14 @@ export default {
}); });
if (res.code == 0) { if (res.code == 0) {
this.attrForm = res.data; this.attrForm = res.data;
this.attrTitle = '编辑设备绑定信息'; this.attrTitle = '编辑参数绑定信息';
this.attrFormVisible = true; this.attrFormVisible = true;
} }
}, },
// //
handleDeleteAttr(attrId) { handleDeleteAttr(attrId) {
this.$confirm('确定删除该分组报警?', '提示', { this.$confirm('确定删除该参数?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
@ -458,6 +484,7 @@ export default {
params: { id: attrId }, params: { id: attrId },
}); });
if (res.code == 0) { if (res.code == 0) {
this.shouldRefreshPageView = true;
this.$message({ this.$message({
message: '删除成功', message: '删除成功',
type: 'success', type: 'success',
@ -472,35 +499,37 @@ export default {
}, },
// //
async submitAttrForm() { submitAttrForm() {
this.$refs['attrForm'].validate((valid) => { this.$refs['attrForm'].validate(async (valid) => {
if (!valid) { if (!valid) {
return; return;
} }
});
const isEdit = this.attrForm.id != null;
this.attrFormSubmitting = true;
const res = await this.$axios({
url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
method: isEdit ? 'put' : 'post',
data: {
...this.attrForm,
connectId: this.infoData.id,
},
});
if (res.code == 0) { const isEdit = this.attrForm.id != null;
this.closeAttrForm(); this.attrFormSubmitting = true;
this.$message({ const res = await this.$axios({
message: `${isEdit ? '更新' : '创建'}成功`, url: isEdit ? this.sections[1].urlUpdate : this.sections[1].urlCreate,
type: 'success', method: isEdit ? 'put' : 'post',
duration: 1500, data: {
onClose: () => { ...this.attrForm,
this.getAttrList(); connectId: this.infoData.id,
}, },
}); });
}
this.attrFormSubmitting = false; if (res.code == 0) {
this.closeAttrForm();
this.$message({
message: `${isEdit ? '更新' : '创建'}成功`,
type: 'success',
duration: 1500,
onClose: () => {
this.getAttrList();
this.shouldRefreshPageView = true;
},
});
}
this.attrFormSubmitting = false;
});
}, },
closeAttrForm() { closeAttrForm() {
@ -509,7 +538,7 @@ export default {
handleClick(raw) { handleClick(raw) {
if (raw.type === 'delete') { if (raw.type === 'delete') {
this.$confirm(`确定删除该报警?`, '提示', { this.$confirm(`确定删除该参数?`, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

View File

@ -482,7 +482,7 @@ export default {
async submitForm() { async submitForm() {
const { code, data } = await this.$axios({ const { code, data } = await this.$axios({
url: '/analysis/equipment-analysis/quantity', url: '/monitoring/equipment-monitor/quantity-series',
method: 'get', method: 'get',
params: this.queryParams, params: this.queryParams,
}); });

View File

@ -6,19 +6,29 @@
--> -->
<template> <template>
<div class="status-timegraph-container" style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column"> <div
<el-row class="" style=" class="status-timegraph-container"
style="background: #f2f4f9; flex: 1; display: flex; flex-direction: column">
<el-row
class=""
style="
margin-bottom: 12px; margin-bottom: 12px;
background: #fff; background: #fff;
padding: 16px 16px 0; padding: 16px 16px 0;
border-radius: 8px; border-radius: 8px;
"> ">
<div class="blue-title">生产节拍时序图</div> <div class="blue-title">生产节拍时序图</div>
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" :remove-blue="true" <SearchBar
@select-changed="handleSearchBarSelectChange" @headBtnClick="handleSearchBarBtnClick" /> :formConfigs="searchBarFormConfig"
ref="search-bar"
:remove-blue="true"
@select-changed="handleSearchBarSelectChange"
@headBtnClick="handleSearchBarBtnClick" />
</el-row> </el-row>
<el-row class="" style=" <el-row
class=""
style="
height: 1px; height: 1px;
flex: 1; flex: 1;
margin-bottom: 12px; margin-bottom: 12px;
@ -47,17 +57,36 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="main-area" style="flex: 1; display: flex; flex-direction: column"> <div
<div class="graphs" v-show="graphList.length" id="status-chart" style="height: 1px; flex: 1"></div> class="main-area"
style="flex: 1; display: flex; flex-direction: column">
<div
class="graphs"
v-show="graphList.length"
id="status-chart"
style="height: 1px; flex: 1"></div>
<h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2> <h2 v-if="!graphList || graphList.length == 0" class="no-data-bg"></h2>
</div> </div>
</el-row> </el-row>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<base-dialog dialogTitle="添加设备" :dialogVisible="open" width="500px" @close="open = false" @cancel="open = false" <base-dialog
dialogTitle="添加设备"
:dialogVisible="open"
width="500px"
@close="open = false"
@cancel="open = false"
@confirm="submitForm"> @confirm="submitForm">
<el-select v-if="open" style="width: 100%" v-model="queryParams.equipmentId" placeholder="请选择一个设备"> <el-select
<el-option v-for="eq in eqList" :key="eq.id" :value="eq.id" :label="eq.name"></el-option> v-if="open"
style="width: 100%"
v-model="queryParams.equipmentId"
placeholder="请选择一个设备">
<el-option
v-for="eq in eqList"
:key="eq.id"
:value="eq.id"
:label="eq.name"></el-option>
</el-select> </el-select>
</base-dialog> </base-dialog>
</div> </div>
@ -129,7 +158,7 @@ export default {
open: false, open: false,
eqList: [], eqList: [],
startTime: null, startTime: null,
gantt: null gantt: null,
// demo: [ // demo: [
// [ // [
// { // {
@ -159,7 +188,7 @@ export default {
this.initEquipment(); this.initEquipment();
// this.getList(); // this.getList();
}, },
mounted() { }, mounted() {},
watch: { watch: {
graphList: { graphList: {
handler(val) { handler(val) {
@ -171,7 +200,6 @@ export default {
return; return;
} }
this.gantt.update(val); this.gantt.update(val);
}); });
} }
return; return;
@ -215,7 +243,9 @@ export default {
params: this.queryParams, params: this.queryParams,
}); });
if (code == 0) { if (code == 0) {
this.existingEquipments = Object.values(data).map((eq) => eq[0].equipmentId); this.existingEquipments = Object.values(data).map(
(eq) => eq[0].equipmentId
);
this.graphList = this.objectToArray(data); this.graphList = this.objectToArray(data);
} }
}, },
@ -302,26 +332,26 @@ export default {
return; return;
} }
this.startTime = new Date(payload.recordTime) this.startTime = new Date(payload.recordTime);
this.queryParams.lineId = payload.lineId || null; this.queryParams.lineId = payload.lineId || null;
this.queryParams.sectionId = payload.sectionId || null; this.queryParams.sectionId = payload.sectionId || null;
this.queryParams.equipmentId = payload.equipmentId || null; this.queryParams.equipmentId = payload.equipmentId || null;
this.queryParams.recordTime = payload.recordTime this.queryParams.recordTime = payload.recordTime
? [ ? [
payload.recordTime, payload.recordTime,
new Date( new Date(
new Date(payload.recordTime).getTime() + 24 * 3600 * 1000 new Date(payload.recordTime).getTime() + 24 * 3600 * 1000
) )
.toLocaleDateString() .toLocaleDateString()
.split('/') .split('/')
.map((value, index) => { .map((value, index) => {
if (index == 1 || index == 2) { if (index == 1 || index == 2) {
return value.padStart(2, '0'); return value.padStart(2, '0');
} }
return value; return value;
}) })
.join('-') + ' 00:00:00', .join('-') + ' 00:00:00',
] ]
: null; : null;
this.getList(); this.getList();
break; break;
@ -337,7 +367,7 @@ export default {
return; return;
} }
const { code, data } = await this.$axios({ const { code, data } = await this.$axios({
url: '/analysis/equipment-analysis/status', url: '/monitoring/equipment-monitor/status-series',
method: 'get', method: 'get',
params: this.queryParams, params: this.queryParams,
}); });
@ -444,7 +474,7 @@ export default {
} }
.running { .running {
background-color: #288AFF; background-color: #288aff;
// background-color: #84f04e; // background-color: #84f04e;
} }
@ -455,7 +485,7 @@ export default {
.fault { .fault {
// background-color: #ea5b5b; // background-color: #ea5b5b;
background-color: #FC9C91; background-color: #fc9c91;
} }
.full { .full {
@ -469,7 +499,7 @@ export default {
} }
.stop { .stop {
background-color: #FFDC94; background-color: #ffdc94;
} }
.legend-row { .legend-row {
@ -478,7 +508,7 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
>.legend:not(:last-child) { > .legend:not(:last-child) {
margin-right: 12px; margin-right: 12px;
} }
@ -521,7 +551,7 @@ export default {
background: #ccc; background: #ccc;
} }
.echarts__status-chart>div { .echarts__status-chart > div {
height: 100% !important; height: 100% !important;
width: 100% !important; width: 100% !important;
} }

View File

@ -71,29 +71,11 @@
<img <img
src="../assets/logo/cnbm.png" src="../assets/logo/cnbm.png"
alt="cnbm_logo" alt="cnbm_logo"
style=" style=""
height: 48px; class="cnbm_logo" />
width: 48px;
position: relative;
top: 12px;
right: 8px;
" />
<span>中建材智能自动化研究院有限公司</span> <span>中建材智能自动化研究院有限公司</span>
</h3> </h3>
<h3 <h3 class="sub-title" style="">MES</h3>
class="sub-title"
style="
margin: 0;
margin-left: 32px;
font-weight: 400;
user-select: none;
color: #000;
font-size: 36px;
line-height: 54px;
letter-spacing: 2px;
">
MES
</h3>
</h2> </h2>
<!-- 表单 --> <!-- 表单 -->
@ -193,9 +175,9 @@
style=" style="
cursor: pointer; cursor: pointer;
color: #0b58ff; color: #0b58ff;
font-size: 18px; font-size: calc(12 * 0.12vh);
line-height: 66px; line-height: calc(54 * 0.12vh);
padding-right: 12px; padding-right: calc(10 * 0.12vh);
"> ">
获取验证码 获取验证码
</span> </span>
@ -215,7 +197,11 @@
:loading="loading" :loading="loading"
size="medium" size="medium"
type="primary" type="primary"
style="width: 100%; height: 66px; font-size: 18px" style="
width: 100%;
height: calc(52 * 0.12vh);
font-size: calc(14 * 0.12vh);
"
@click.native.prevent="getCode"> @click.native.prevent="getCode">
<span v-if="!loading"> </span> <span v-if="!loading"> </span>
<span v-else> 中...</span> <span v-else> 中...</span>
@ -349,7 +335,7 @@ export default {
}; };
}, },
created() { created() {
document.body.style['min-height'] = '1024px'; // document.body.style['min-height'] = '1024px';
// //
this.tenantEnable = getTenantEnable(); this.tenantEnable = getTenantEnable();
if (this.tenantEnable) { if (this.tenantEnable) {