-
设备状态时序图
-
-
+
+
+ 生产节拍时序图
+
+
+
+
-
-
-
-
-
-
-
-
-
计划停机
+
+
+
+
-
-
请添加设备
-
+
.graph {
- border: 1px solid #ccc;
- padding: 12px 12px 28px 12px;
- margin: 64px 0;
+ // border: 1px solid #ccc;
+ // padding: 12px 12px 28px 12px;
+ // margin: 64px 0;
position: relative;
display: flex;
}
.graph-title {
- position: absolute;
- top: -64px;
- left: -1px;
- padding: 8px 18px;
- background: #ccc;
- font-size: 18px;
+ // position: absolute;
+ // top: -64px;
+ // left: -1px;
+ // padding: 8px 18px;
+ padding: 0 12px;
+ font-size: 14px;
line-height: 1;
}
+.graph-content {
+ display: flex;
+ flex: 1;
+ padding: 22px 12px;
+ border: 1px solid #ccc;
+ border-bottom-width: 2px;
+ border-top: none;
+ position: relative;
+}
+
+.graph-content::after,
+.graph-content::before {
+ content: '';
+ position: absolute;
+ width: 3px;
+ height: 80%;
+ background: #fff;
+ right: -1px;
+ top: 0;
+}
+
+.graph-content::before {
+ right: unset;
+ left: -1px;
+}
+
.graph-item,
.graph-item-fixed {
- height: 88px;
+ // height: 88px;
// width: 24px;
flex: 1;
// border: 1px solid #ccc;
@@ -405,32 +421,40 @@ export default {
}
.running {
- background-color: #84f04e;
+ background-color: #5ad8a6;
+ // background-color: #84f04e;
}
.waiting {
- background-color: #409eff;
+ background-color: #5ad8a6;
+ // background-color: #409eff;
}
.fault {
- background-color: #ea5b5b;
+ // background-color: #ea5b5b;
+ background-color: #fc9c91;
}
.full {
- background-color: #e6a23c;
+ // background-color: #e6a23c;
+ background-color: #598fff;
}
.lack {
- background-color: #a69c8d;
+ // background-color: #a69c8d;
+ background-color: #7585a2;
}
.stop {
- background-color: #000c;
+ background-color: #000;
}
.legend-row {
- margin: 12px 0;
+ margin: 6px 0;
+ padding-right: 12px;
display: flex;
+ justify-content: flex-end;
+
> .legend:not(:last-child) {
margin-right: 12px;
}
@@ -441,9 +465,32 @@ export default {
}
.icon {
- width: 16px;
+ width: 8px;
+ height: 8px;
+ border-radius: 2px;
+ margin-right: 4px;
+ margin-top: 1px;
+ }
+}
+
+.blue-title {
+ position: relative;
+ padding: 4px 0;
+ padding-left: 12px;
+ font-size: 14px;
+ color: #606266;
+ font-weight: 700;
+ margin-bottom: 12px;
+
+ &::before {
+ content: '';
+ position: absolute;
+ left: 0;
+ top: 6px;
height: 16px;
- margin-right: 8px;
+ width: 4px;
+ border-radius: 1px;
+ background: #0b58ff;
}
}
diff --git a/src/views/monitoring/equipmentAlarmLog/index.vue b/src/views/monitoring/equipmentAlarmLog/index.vue
index 697cbf10..50bf8d20 100644
--- a/src/views/monitoring/equipmentAlarmLog/index.vue
+++ b/src/views/monitoring/equipmentAlarmLog/index.vue
@@ -16,6 +16,7 @@
@@ -81,13 +82,12 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
- { width: 128, prop: 'productionLine', label: '产线', align: 'center' },
- { width: 128, prop: 'workshopSection', label: '工段', align: 'center' },
- { width: 128, prop: 'equipment', label: '设备名称', align: 'center' },
+ { width: 128, prop: 'productionLine', label: '产线' },
+ { width: 128, prop: 'workshopSection', label: '工段' },
+ { width: 128, prop: 'equipment', label: '设备名称' },
{
prop: 'alarmGrade',
label: '报警级别',
- align: 'center',
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
},
{
@@ -96,11 +96,11 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
- { prop: 'alarmContent', label: '报警内容', align: 'center' },
+ { prop: 'alarmContent', label: '报警内容' },
// {
// _action: 'equipment-group-show-alert',
// label: '报警',
- // align: 'center',
+ // ,
// subcomponent: {
// props: ['injectData'],
// render: function (h) {
@@ -166,7 +166,7 @@ export default {
this.getList();
},
methods: {
- /** 重写 basicPageMixin 里的 handleSearchBarBtnClick */
+ /** 重写 basicPageMixin 里的 handleSearchBarBtnClick */
handleSearchBarBtnClick(btn) {
// 仅查询一种情况
this.queryParams.createTime = btn.createTime;
diff --git a/src/views/monitoring/equipmentFullParams/index.vue b/src/views/monitoring/equipmentFullParams/index.vue
index 5c2e99a3..a664f2ea 100644
--- a/src/views/monitoring/equipmentFullParams/index.vue
+++ b/src/views/monitoring/equipmentFullParams/index.vue
@@ -35,7 +35,9 @@
" />
-
暂无数据
+
+ 暂无数据
+
@@ -139,19 +141,16 @@ export default {
width: 48,
prop: 'index',
label: '序号',
- align: 'center',
},
{
width: 160,
prop: 'time',
label: '时间',
- align: 'center',
},
{
width: 200,
prop: 'plcCode',
label: 'PLC编码',
- align: 'center',
},
];
const firstLineData = {
@@ -162,7 +161,6 @@ export default {
otherList.forEach((item) => {
props.push({
label: item.name,
- align: 'center',
prop: item.name,
width: 128,
});
diff --git a/src/views/monitoring/equipmentProcessAmount/graph.vue b/src/views/monitoring/equipmentProcessAmount/graph.vue
index 7d6843cb..8bde181b 100644
--- a/src/views/monitoring/equipmentProcessAmount/graph.vue
+++ b/src/views/monitoring/equipmentProcessAmount/graph.vue
@@ -25,7 +25,7 @@ export default {
grid: {
top: 64,
left: 56,
- right: 24,
+ right: 64,
bottom: 56,
},
title: {
@@ -64,6 +64,10 @@ export default {
color: '#ccc',
},
},
+ name: '数量',
+ nameTextStyle: {
+ fontSize: 14,
+ },
},
series: [
{
diff --git a/src/views/monitoring/equipmentProcessAmount/index.vue b/src/views/monitoring/equipmentProcessAmount/index.vue
index 4119be8d..d92d7b68 100644
--- a/src/views/monitoring/equipmentProcessAmount/index.vue
+++ b/src/views/monitoring/equipmentProcessAmount/index.vue
@@ -9,15 +9,52 @@
-
+ style="
+ margin-right: 12px;
+ border-radius: 8px;
+ background: #fff;
+ padding: 0;
+ ">
+ class="factory-list__selector"
+ style="margin: 12px"
+ title="点击切换工厂"
+ @mouseenter="factoryListOpen = true"
+ @mouseleave="factoryListOpen = false">
+ {{ currentFactory?.label || '工厂名称' }}
+
+
+
+
+ :empty-text="' - 暂无数据 - '"
+ icon-class="custom-icon-class"
+ @node-click="handleSidebarItemClick">
+
+
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
@@ -66,6 +120,16 @@ export default {
props: {},
data() {
return {
+ factoryListOpen: false,
+ currentFactory: null,
+ factoryList: [
+ { name: '1', value: 1 },
+ { name: '2', value: 2 },
+ { name: '3', value: 3 },
+ { name: '4', value: 4 },
+ { name: '5', value: 5 },
+ { name: '6', value: 6 },
+ ],
sidebarContent: [
// {
// id: 'fc1',
@@ -152,6 +216,7 @@ export default {
// ],
// },
],
+ activeName: 'table',
searchBarFormConfig: [
{
type: 'datePicker',
@@ -172,23 +237,23 @@ export default {
name: 'search',
color: 'primary',
},
- {
- type: 'separate',
- },
- {
- type: 'button',
- btnName: '表格',
- name: 'table',
- plain: true,
- color: 'success',
- },
- {
- type: 'button',
- btnName: '图表',
- name: 'graph',
- plain: true,
- color: 'warning',
- },
+ // {
+ // type: 'separate',
+ // },
+ // {
+ // type: 'button',
+ // btnName: '表格',
+ // name: 'table',
+ // plain: true,
+ // color: 'success',
+ // },
+ // {
+ // type: 'button',
+ // btnName: '图表',
+ // name: 'graph',
+ // plain: true,
+ // color: 'warning',
+ // },
// {
// type: this.$auth.hasPermi('base:equipment-group:export') ? 'button' : '',
// btnName: '导出',
@@ -197,11 +262,11 @@ export default {
// },
],
tableProps: [
- { prop: 'lineName', label: '产线', align: 'center' },
- { prop: 'sectionName', label: '工段', align: 'center' },
- { prop: 'externalCode', label: '设备编码', align: 'center' },
- { prop: 'equipmentName', label: '设备名称', align: 'center' },
- { prop: 'totalQuantity', label: '加工数量', align: 'center' },
+ { prop: 'lineName', label: '产线' },
+ { prop: 'sectionName', label: '工段' },
+ { prop: 'externalCode', label: '设备编码' },
+ { prop: 'equipmentName', label: '设备名称' },
+ { prop: 'totalQuantity', label: '加工数量' },
],
mode: 'table', // table | graph
queryParams: {
@@ -230,20 +295,20 @@ export default {
this.$set(factory, 'label', factory.name);
this.$set(factory, 'type', '工厂');
delete factory.name;
- factory.children = factory.lines;
- delete factory.lines;
+ // factory.children = factory.lines;
+ // delete factory.lines;
factory.children?.forEach((line) => {
this.$set(line, 'label', line.name);
this.$set(line, 'type', '产线');
delete line.name;
- line.children = line.sections;
- delete line.sections;
+ // line.children = line.sections;
+ // delete line.sections;
line.children?.forEach((ws) => {
this.$set(ws, 'label', ws.name);
this.$set(ws, 'type', '工段');
delete ws.name;
- ws.children = ws.equipments;
- delete ws.equipments;
+ // ws.children = ws.equipments;
+ // delete ws.equipments;
ws.children?.forEach((eq) => {
this.$set(eq, 'label', eq.name);
this.$set(eq, 'type', '设备');
@@ -258,10 +323,23 @@ export default {
const { data } = await this.$axios('/base/factory/getTree');
this.sidebarContent = data;
this.buildTree(data);
+ console.log('tree', this.sidebarContent);
+ },
+
+ handleTabClick(tab, event) {
+ console.log('handle tab click: ', tab, event);
+ },
+
+ factoryChangeHandler(event) {
+ this.factoryListOpen = false;
+ const fcId = event.target.dataset.value;
+ console.log('fc id', fcId);
+ this.handleSidebarItemClick({ id: fcId, type: '工厂' });
+ this.currentFactory = this.sidebarContent.find((item) => item.id == fcId);
},
handleSidebarItemClick({ label, id, type }) {
- console.log('lable clicked!', label, id, type);
+ console.log('label clicked!', label, id, type);
switch (type) {
case '设备':
this.queryParams.equipmentId = id;
@@ -317,8 +395,10 @@ export default {
+
+
diff --git a/src/views/monitoring/equipmentRecentHours/index.vue b/src/views/monitoring/equipmentRecentHours/index.vue
index c4cf6b6b..79ea99db 100644
--- a/src/views/monitoring/equipmentRecentHours/index.vue
+++ b/src/views/monitoring/equipmentRecentHours/index.vue
@@ -11,14 +11,16 @@
:formConfigs="[{ label: '设备近24小时生产记录', type: 'title' }]"
ref="search-bar" />