Compare commits

..

No commits in common. "0ce6bc07a0bf91da2149b0b46afc368eb6af7a35" and "d2d5503792e995489b915209fa5837ccae005f4d" have entirely different histories.

8 changed files with 148 additions and 264 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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