Compare commits

..

No commits in common. "c965dfbc5aa4b4478e68dc0b3ebea4cb7b767fb5" and "27ebe39a9681ca05338287a5ad045e261f7298a3" have entirely different histories.

31 changed files with 533 additions and 1008 deletions

View File

@ -12,9 +12,9 @@ ENV = 'development'
VUE_APP_TITLE = 芋道管理系统
# 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
VUE_APP_BASE_API = 'http://192.168.1.49:48080'
# VUE_APP_BASE_API = 'http://192.168.1.8:48080'
VUE_APP_BASE_API = 'http://192.168.0.33:48080'
# VUE_APP_BASE_API = 'http://192.168.0.33:48080'
# VUE_APP_BASE_API = 'http://192.168.1.188:48080'
# 路由懒加载

View File

@ -6,208 +6,182 @@
@import './btn.scss';
body {
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
Microsoft YaHei, Arial, sans-serif;
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}
label {
font-weight: 700;
font-weight: 700;
}
html {
height: 100%;
box-sizing: border-box;
height: 100%;
box-sizing: border-box;
}
#app {
height: 100%;
height: 100%;
}
*,
*:before,
*:after {
box-sizing: inherit;
box-sizing: inherit;
}
.no-padding {
padding: 0px !important;
padding: 0px !important;
}
.padding-content {
padding: 4px 0;
padding: 4px 0;
}
a:focus,
a:active {
outline: none;
outline: none;
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
text-decoration: none;
cursor: pointer;
color: inherit;
text-decoration: none;
}
div:focus {
outline: none;
outline: none;
}
.fr {
float: right;
float: right;
}
.fl {
float: left;
float: left;
}
.pr-5 {
padding-right: 5px;
padding-right: 5px;
}
.pl-5 {
padding-left: 5px;
padding-left: 5px;
}
.block {
display: block;
display: block;
}
.pointer {
cursor: pointer;
cursor: pointer;
}
.inlineBlock {
display: block;
display: block;
}
.clearfix {
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: ' ';
clear: both;
height: 0;
}
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
}
aside {
background: #eef1f6;
padding: 8px 24px;
margin-bottom: 20px;
border-radius: 2px;
display: block;
line-height: 32px;
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
color: #2c3e50;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: #eef1f6;
padding: 8px 24px;
margin-bottom: 20px;
border-radius: 2px;
display: block;
line-height: 32px;
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
color: #2c3e50;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
a {
color: #337ab7;
cursor: pointer;
a {
color: #337ab7;
cursor: pointer;
&:hover {
color: rgb(32, 160, 255);
}
}
&:hover {
color: rgb(32, 160, 255);
}
}
}
//main-container全局样式
.app-container {
padding: 16px;
padding: 16px;
}
.components-container {
margin: 30px 50px;
position: relative;
margin: 30px 50px;
position: relative;
}
.text-center {
text-align: center;
text-align: center
}
.sub-navbar {
height: 50px;
line-height: 50px;
position: relative;
width: 100%;
text-align: right;
padding-right: 20px;
transition: 600ms ease position;
background: linear-gradient(
90deg,
rgba(32, 182, 249, 1) 0%,
rgba(32, 182, 249, 1) 0%,
rgba(33, 120, 241, 1) 100%,
rgba(33, 120, 241, 1) 100%
);
height: 50px;
line-height: 50px;
position: relative;
width: 100%;
text-align: right;
padding-right: 20px;
transition: 600ms ease position;
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
.subtitle {
font-size: 20px;
color: #fff;
}
.subtitle {
font-size: 20px;
color: #fff;
}
&.draft {
background: #d0d0d0;
}
&.draft {
background: #d0d0d0;
}
&.deleted {
background: #d0d0d0;
}
&.deleted {
background: #d0d0d0;
}
}
.link-type,
.link-type:focus {
color: #337ab7;
cursor: pointer;
color: #337ab7;
cursor: pointer;
&:hover {
color: rgb(32, 160, 255);
}
&:hover {
color: rgb(32, 160, 255);
}
}
.filter-container {
padding-bottom: 10px;
padding-bottom: 10px;
.filter-item {
display: inline-block;
vertical-align: middle;
margin-bottom: 10px;
}
.filter-item {
display: inline-block;
vertical-align: middle;
margin-bottom: 10px;
}
}
//refine vue-multiselect plugin
.multiselect {
line-height: 16px;
line-height: 16px;
}
.multiselect--active {
z-index: 1000 !important;
}
.no-data-bg {
height: 240px;
background: url(../images/no-data-bg.png) 50% 100% / contain
no-repeat;
position: relative;
&::after {
content: '暂无数据';
position: absolute;
bottom: 12px;
left: 50%;
transform: translateX(-50%);
color: #ccc;
font-size: 18px;
letter-spacing: 1px;
}
z-index: 1000 !important;
}

View File

@ -5,123 +5,110 @@
/** 基础通用 **/
.pt5 {
padding-top: 5px;
padding-top: 5px;
}
.pr5 {
padding-right: 5px;
padding-right: 5px;
}
.pb5 {
padding-bottom: 5px;
padding-bottom: 5px;
}
.mt5 {
margin-top: 5px;
margin-top: 5px;
}
.mr5 {
margin-right: 5px;
margin-right: 5px;
}
.mb5 {
margin-bottom: 5px;
margin-bottom: 5px;
}
.mb8 {
margin-bottom: 8px;
margin-bottom: 8px;
}
.ml5 {
margin-left: 5px;
margin-left: 5px;
}
.mt10 {
margin-top: 10px;
margin-top: 10px;
}
.mr10 {
margin-right: 10px;
margin-right: 10px;
}
.mb10 {
margin-bottom: 10px;
margin-bottom: 10px;
}
.ml10 {
margin-left: 10px;
margin-left: 10px;
}
.mt20 {
margin-top: 20px;
margin-top: 20px;
}
.mr20 {
margin-right: 20px;
margin-right: 20px;
}
.mb20 {
margin-bottom: 20px;
margin-bottom: 20px;
}
.ml20 {
margin-left: 20px;
margin-left: 20px;
}
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: inherit;
font-weight: 500;
line-height: 1.1;
color: inherit;
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
font-family: inherit;
font-weight: 500;
line-height: 1.1;
color: inherit;
}
.el-message-box__status + .el-message-box__message {
word-break: break-word;
.el-message-box__status + .el-message-box__message{
word-break: break-word;
}
.el-dialog:not(.is-fullscreen) {
// margin-top: 6vh !important;
margin-top: 12vh !important;
margin-top: 6vh !important;
}
.el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body {
overflow: auto;
overflow-x: hidden;
max-height: 70vh;
padding: 10px 20px 0;
overflow: auto;
overflow-x: hidden;
max-height: 70vh;
padding: 10px 20px 0;
}
.el-dialog {
display: flex;
flex-direction: column;
max-width: calc(100% - 30px);
max-height: calc(100% - 70px);
.el-dialog__body {
overflow: auto;
}
.el-dialog{
display: flex;
flex-direction: column;
max-width: calc(100% - 30px);
max-height: calc(100% - 70px);
.el-dialog__body {
overflow: auto;
}
}
.el-table {
.el-table__header-wrapper,
.el-table__fixed-header-wrapper {
th {
word-break: break-word;
background-color: #f8f8f9;
color: #515a6e;
height: 40px;
font-size: 13px;
}
}
.el-table__body-wrapper {
.el-button [class*='el-icon-'] + span {
margin-left: 1px;
}
}
.el-table__header-wrapper, .el-table__fixed-header-wrapper {
th {
word-break: break-word;
background-color: #f8f8f9;
color: #515a6e;
height: 40px;
font-size: 13px;
}
}
.el-table__body-wrapper {
.el-button [class*="el-icon-"] + span {
margin-left: 1px;
}
}
}
/** 表单布局 **/
.form-header {
font-size: 15px;
color: #6379bb;
border-bottom: 1px solid #ddd;
margin: 8px 10px 25px 10px;
padding-bottom: 5px;
font-size:15px;
color:#6379bb;
border-bottom:1px solid #ddd;
margin:8px 10px 25px 10px;
padding-bottom:5px
}
/** 表格布局 **/
@ -135,171 +122,169 @@ h6 {
/* tree border */
.tree-border {
margin-top: 5px;
border: 1px solid #e5e6e7;
background: #ffffff none;
border-radius: 4px;
margin-top: 5px;
border: 1px solid #e5e6e7;
background: #FFFFFF none;
border-radius:4px;
}
.pagination-container .el-pagination {
right: 0;
position: absolute;
right: 0;
position: absolute;
}
@media (max-width: 768px) {
.pagination-container .el-pagination > .el-pagination__jump {
display: none !important;
}
.pagination-container .el-pagination > .el-pagination__sizes {
display: none !important;
}
@media ( max-width : 768px) {
.pagination-container .el-pagination > .el-pagination__jump {
display: none !important;
}
.pagination-container .el-pagination > .el-pagination__sizes {
display: none !important;
}
}
.el-table .fixed-width .el-button--mini {
padding-left: 0;
padding-right: 0;
width: inherit;
padding-left: 0;
padding-right: 0;
width: inherit;
}
/** 表格更多操作下拉样式 */
.el-table .el-dropdown-link,
.el-table .el-dropdown-selfdefine {
cursor: pointer;
margin-left: 5px;
.el-table .el-dropdown-link,.el-table .el-dropdown-selfdefine {
cursor: pointer;
margin-left: 5px;
}
.el-table .el-dropdown,
.el-icon-arrow-down {
font-size: 12px;
.el-table .el-dropdown, .el-icon-arrow-down {
font-size: 12px;
}
.el-tree-node__content > .el-checkbox {
margin-right: 8px;
margin-right: 8px;
}
.list-group-striped > .list-group-item {
border-left: 0;
border-right: 0;
border-radius: 0;
padding-left: 0;
padding-right: 0;
border-left: 0;
border-right: 0;
border-radius: 0;
padding-left: 0;
padding-right: 0;
&:not(:last-child) {
border-bottom: 1px solid #e7eaec;
}
&:not(:last-child) {
border-bottom: 1px solid #e7eaec;
}
}
.list-group {
padding-left: 0px;
list-style: none;
padding-left: 0px;
list-style: none;
}
.list-group-item {
// border-bottom: 1px solid #e7eaec;
// border-top: 1px solid #e7eaec;
margin-bottom: -1px;
padding: 11px 0px;
font-size: 13px;
// border-bottom: 1px solid #e7eaec;
// border-top: 1px solid #e7eaec;
margin-bottom: -1px;
padding: 11px 0px;
font-size: 13px;
}
.pull-right {
float: right !important;
float: right !important;
}
.el-card__header {
padding: 14px 15px 7px;
min-height: 40px;
padding: 14px 15px 7px;
min-height: 40px;
}
.el-card__body {
padding: 15px 20px 20px 20px;
padding: 15px 20px 20px 20px;
}
.card-box {
padding-right: 15px;
padding-left: 15px;
margin-bottom: 10px;
padding-right: 15px;
padding-left: 15px;
margin-bottom: 10px;
}
/* button color */
.el-button--cyan.is-active,
.el-button--cyan:active {
background: #20b2aa;
border-color: #20b2aa;
color: #ffffff;
background: #20B2AA;
border-color: #20B2AA;
color: #FFFFFF;
}
.el-button--cyan:focus,
.el-button--cyan:hover {
background: #48d1cc;
border-color: #48d1cc;
color: #ffffff;
background: #48D1CC;
border-color: #48D1CC;
color: #FFFFFF;
}
.el-button--cyan {
background-color: #20b2aa;
border-color: #20b2aa;
color: #ffffff;
background-color: #20B2AA;
border-color: #20B2AA;
color: #FFFFFF;
}
/* text color */
.text-navy {
color: #1ab394;
color: #1ab394;
}
.text-primary {
color: inherit;
color: inherit;
}
.text-success {
color: #1c84c6;
color: #1c84c6;
}
.text-info {
color: #23c6c8;
color: #23c6c8;
}
.text-warning {
color: #f8ac59;
color: #f8ac59;
}
.text-danger {
color: #ed5565;
color: #ed5565;
}
.text-muted {
color: #888888;
color: #888888;
}
/* image */
.img-circle {
border-radius: 50%;
border-radius: 50%;
}
.img-lg {
width: 120px;
height: 120px;
width: 120px;
height: 120px;
}
.avatar-upload-preview {
position: absolute;
top: 50%;
transform: translate(50%, -50%);
width: 200px;
height: 200px;
border-radius: 50%;
box-shadow: 0 0 4px #ccc;
overflow: hidden;
position: absolute;
top: 50%;
transform: translate(50%, -50%);
width: 200px;
height: 200px;
border-radius: 50%;
box-shadow: 0 0 4px #ccc;
overflow: hidden;
}
/* 拖拽列样式 */
.sortable-ghost {
opacity: 0.8;
color: #fff !important;
background: #42b983 !important;
.sortable-ghost{
opacity: .8;
color: #fff!important;
background: #42b983!important;
}
.top-right-btn {
position: relative;
float: right;
position: relative;
float: right;
}

View File

@ -1,5 +1,3 @@
import moment from 'moment';
/**
* 用于动态表结构的 tableProps 生成
* @param {*} nameData
@ -18,9 +16,10 @@ export function handleNameData(nameData) {
function step1(tree1) {
return Array.from(new Set(tree1.map((item) => item.name)))
.sort()
.map((time) => ({
prop: time,
label: moment(time).format('YYYY-MM-DD HH:mm:ss'),
.map((item) => ({
prop: item,
label: item,
align: 'center',
children: [],
}));
}
@ -34,6 +33,7 @@ function step2(firstTierProps, tree2) {
parent.children.push({
label: nd.name,
prop: `${parent.prop}-${nd.name}`,
align: 'center',
});
}
});

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -86,11 +85,12 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'equipmentName', label: '设备' },
{ prop: 'groupName', label: '分组' },
{ prop: 'equipmentName', label: '设备', align: 'center' },
{ prop: 'groupName', label: '分组', align: 'center' },
{
_action: 'equipment-bind-group-show-alert',
label: '分组报警',
align: 'center',
subcomponent: {
props: ['injectData'],
render: function (h) {
@ -162,9 +162,6 @@ export default {
label: '设备',
url: '/base/equipment/page?pageNo=1&pageSize=100',
prop: 'equipmentId',
bind: {
filterable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
@ -176,9 +173,6 @@ export default {
// depends: '__product_line', // 线
// depends: 'productionLineId',
prop: 'groupId',
bind: {
filterable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
@ -229,7 +223,7 @@ export default {
/** 查询列表 */
getList() {
this.loading = true;
_; //
_//
getEquipmentBindGroupPage(this.queryParams).then((response) => {
this.list = response.data.list;
this.total = response.data.total;

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -84,26 +83,28 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'productionLine', label: '产线名称' },
{ prop: 'workshopSection', label: '工段名称' },
{ prop: 'equipment', label: '设备名称' },
{ prop: 'sort', label: '工段中排序' },
{ prop: 'productionLine', label: '产线名称', align: 'center' },
{ prop: 'workshopSection', label: '工段名称', align: 'center' },
{ prop: 'equipment', label: '设备名称', align: 'center' },
{ prop: 'sort', label: '工段中排序', align: 'center' },
{
prop: 'lineDataType',
label: '产线数据类型',
align: 'center',
filter: (val) =>
val != null ? ['无类型', '进口计数', '出口计数'][val] : '-',
},
{
prop: 'sectionDataType',
label: '工段数据类型',
align: 'center',
filter: (val) =>
val != null ? ['无类型', '进口计数', '出口计数'][val] : '-',
},
// {
// action: 'show-alert',
// label: '',
// ,
// align: 'center',
// subcomponent: {
// props: ['injectData'],
// render: function (h) {

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -85,12 +84,13 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'name', label: '设备分组名称' },
{ prop: 'code', label: '设备分组编码' },
{ prop: 'remark', label: '备注' },
{ prop: 'name', label: '设备分组名称', align: 'center' },
{ prop: 'code', label: '检测分组编码', align: 'center' },
{ prop: 'remark', label: '备注', align: 'center' },
{
_action: 'equipment-group-show-alert',
label: '报警',
align: 'center',
subcomponent: {
props: ['injectData'],
render: function (h) {
@ -127,7 +127,7 @@ export default {
type: 'input',
label: '分组编码',
placeholder: '请输入设备分组编码',
param: 'code',
param: 'codes',
},
{
type: 'button',
@ -172,7 +172,6 @@ export default {
label: '分组编码',
prop: 'code',
url: '/base/equipment-group/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
[
@ -303,7 +302,11 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除设备分组 "' + row.name + '"?')
.confirm(
'是否确认删除设备分组(用于同类型不同厂家的设备区分)编号为"' +
id +
'"的数据项?'
)
.then(function () {
return deleteEquipmentGroup(id);
})

View File

@ -1,177 +0,0 @@
<!--
filename: dialogForm.vue
author: liubin
date: 2023-09-11 15:55:13
description: DialogForm for equipmentBindSection only
-->
<template>
<el-form
ref="form"
:model="dataForm"
label-width="100px"
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
v-model="dataForm.code"
@change="$emit('update', dataForm)"
placeholder="请输入工段排序" />
</el-form-item>
<!--
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.code"
placeholder="请选择产线"
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item> -->
</el-col>
<el-col :span="12">
<el-form-item
label="报警类型"
prop="type"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.type"
placeholder="请选择报警类型"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in [
{ label: '布尔型', value: 2 },
{ label: '字符型', value: 1 },
]"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="报警级别"
prop="grade"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.grade"
placeholder="请选择报警级别"
@change="$emit('update', dataForm)">
<el-option
v-for="opt in getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
v-if="+dataForm.type == 1"
label="设备报警编码"
prop="alarmCode">
<el-input
v-model="dataForm.alarmCode"
@change="$emit('update', dataForm)"
placeholder="请输入设备报警编码" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="参数列名"
prop="plcParamName"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
v-model="dataForm.plcParamName"
placeholder="请输入参数列名"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="报警内容"
prop="alarmContent"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-input
v-model="dataForm.alarmContent"
placeholder="请输入报警内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
export default {
name: 'DialogForm',
model: {
prop: 'dataForm',
event: 'update',
},
emits: ['update'],
components: {},
props: {
dataForm: {
type: Object,
default: () => ({}),
},
},
data() {
return {
formLoading: true,
};
},
mounted() {
this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
this.formLoading = false;
this.$emit('update', {
...this.dataForm,
code,
});
});
},
methods: {
/** 模拟透传 ref */
validate(cb) {
return this.$refs.form.validate(cb);
},
resetFields(args) {
return this.$refs.form.resetFields(args);
},
async handleProductlineChange(id) {
await this.getWorksectionList(id);
this.dataForm.workshopSectionId = null;
this.$emit('update', this.dataForm);
},
async getCode(url) {
const response = await this.$axios(url);
return response.data;
},
},
};
</script>
<style scoped lang="scss">
.el-date-editor,
.el-select {
width: 100%;
}
</style>

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -38,7 +37,7 @@
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
</base-dialog>
</div>
</template>
@ -55,11 +54,10 @@ import {
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import moment from 'moment';
import { publicFormatter } from '@/utils/dict';
import DialogForm from './dialogForm.vue';
export default {
name: 'EquipmentGroupAlarm',
components: { DialogForm },
components: {},
mixins: [basicPageMixin],
data() {
return {
@ -86,27 +84,22 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ width: 240, prop: 'code', label: '报警编码' },
{
prop: 'type',
label: '报警类型',
filter: (val) =>
val != null ? ['-', '字符型', '布尔型', '-'][val] : '-',
},
{ prop: 'code', label: '报警编码', align: 'center' },
{ prop: 'type', label: '报警类型', align: 'center' },
{
prop: 'grade',
label: '报警级别',
align: 'center',
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),
},
{ prop: 'alarmCode', label: '设备报警编码' },
{ prop: 'plcParamName', label: '参数列名' },
{ prop: 'alarmContent', label: '报警内容' },
{ prop: 'alarmCode', label: '设备报警编码', align: 'center' },
{ prop: 'plcParamName', label: '参数列名', align: 'center' },
{ prop: 'alarmContent', label: '报警内容', align: 'center' },
],
searchBarFormConfig: [
{
type: 'input',
label: '设备分组编码',
width: '220',
placeholder: '/',
param: 'equipmentGroupCode',
defaultSelect: null,
@ -188,14 +181,14 @@ export default {
},
//
form: {
id: null,
equipmentGroupId: null,
code: null,
type: null,
grade: null,
alarmCode: null,
alarmContent: null,
plcParamName: null,
id: undefined,
equipmentGroupId: undefined,
code: undefined,
type: undefined,
grade: undefined,
alarmCode: undefined,
alarmContent: undefined,
plcParamName: undefined,
},
// //
// rules: {
@ -256,14 +249,14 @@ export default {
/** 表单重置 */
reset() {
this.form = {
id: null,
equipmentGroupId: null,
code: null,
type: null,
grade: null,
alarmCode: null,
alarmContent: null,
plcParamName: null,
id: undefined,
equipmentGroupId: undefined,
code: undefined,
type: undefined,
grade: undefined,
alarmCode: undefined,
alarmContent: undefined,
plcParamName: undefined,
};
this.resetForm('form');
},
@ -328,7 +321,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除该报警?')
.confirm('是否确认删除设备分组报警明细编号为"' + id + '"的数据项?')
.then(function () {
return deleteEquipmentGroupAlarm(id);
})

View File

@ -12,7 +12,6 @@
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
ref="pageTable"
@emitFun="handleEmitFun">
<method-btn
v-if="tableBtn.length"
@ -59,12 +58,9 @@ const switchBtn = {
name: 'SwitchBtn',
props: ['injectData'],
data() {
return {};
},
computed: {
active() {
return +this.injectData[this.injectData.prop] == 1 ? true : false;
},
return {
active: +this.injectData[this.injectData.prop] == 1 ? true : false,
};
},
methods: {},
render: function (h) {
@ -76,6 +72,8 @@ const switchBtn = {
},
on: {
change: (newVal) => {
this.active = !this.active;
console.log('changed emit', newVal);
this.$emit('emitData', {
action: 'update-collect',
payload: {
@ -97,7 +95,6 @@ export default {
components: {},
data() {
return {
tableKey: Math.random(),
searchBarKeys: ['name', 'plcTableName'],
tableBtn: [
this.$auth.hasPermi('base:equipment-plc:update')
@ -121,16 +118,17 @@ export default {
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{ prop: 'code', label: '编码' },
{ prop: 'plcTableName', label: '关联表名' },
{ prop: 'name', label: '标识名称' },
{ prop: 'enName', label: '英文名称' },
{ prop: 'code', label: '编码', align: 'center' },
{ prop: 'plcTableName', label: '关联表名', align: 'center' },
{ prop: 'name', label: '标识名称', align: 'center' },
{ prop: 'enName', label: '英文名称', align: 'center' },
{
prop: 'collection',
label: '是否采集',
align: 'center',
subcomponent: switchBtn,
},
{ prop: 'description', label: '描述' },
{ prop: 'description', label: '描述', align: 'center' },
],
searchBarFormConfig: [
{
@ -187,7 +185,6 @@ export default {
label: '编码',
prop: 'code',
url: '/base/equipment-group/getCode',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
[
@ -195,7 +192,7 @@ export default {
input: true,
label: '标识',
prop: 'name',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
// rules: [{ required: true, message: '', trigger: 'blur' }],
// bind: {
// disabled: true, // some condition, like detail mode...
// }
@ -249,7 +246,7 @@ export default {
handleEmitFun({ action, payload }) {
switch (action) {
case 'update-collect':
this.reset();
this.reset();
const tempForm = {};
Object.keys(this.form).forEach((key) => {
tempForm[key] = payload[key];
@ -270,7 +267,6 @@ export default {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
// this.tableKey = Math.random(); // method 1
});
},
/** 取消按钮 */

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -62,7 +61,7 @@ export default {
components: {},
data() {
return {
searchBarKeys: ['equipmentId', 'plcId'],
searchBarKeys: ['name', 'plcTableName'],
// tableBtn: [
// this.$auth.hasPermi('base:equipment-plc:update')
// ? {
@ -99,17 +98,18 @@ export default {
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{ prop: 'productionLine', label: '产线' },
{ prop: 'workshopSection', label: '工段' },
{ prop: 'equipmentName', label: '设备名' },
{ prop: 'equipmentCode', label: '设备编码' },
{ prop: 'plcCode', label: '关联表编码' },
{ prop: 'plcTableName', label: '关联表名' },
{ prop: 'plcName', label: '标识名称' },
{ prop: 'bindingParameters', label: '绑定参数数量' },
{ prop: 'productionLine', label: '产线', align: 'center' },
{ prop: 'workshopSection', label: '工段', align: 'center' },
{ prop: 'equipmentName', label: '设备名', align: 'center' },
{ prop: 'equipmentCode', label: '设备编码', align: 'center' },
{ prop: 'plcCode', label: '关联表编码', align: 'center' },
{ prop: 'plcTableName', label: '关联表名', align: 'center' },
{ prop: 'plcName', label: '标识名称', align: 'center' },
{ prop: 'bindingParameters', label: '绑定参数数量', align: 'center' },
{
_action: 'params-bind',
label: '查看绑定',
align: 'center',
subcomponent: {
props: ['injectData'],
render: function (h) {
@ -136,18 +136,16 @@ export default {
],
searchBarFormConfig: [
{
type: 'select',
type: 'input',
label: '设备名',
placeholder: '请选择设备',
placeholder: '请输入设备名',
param: 'equipmentId',
selectOptions: [],
},
{
type: 'select',
label: 'PLC编码',
placeholder: '请选择编码',
type: 'input',
label: '编码',
placeholder: '请输入编码',
param: 'plcId',
selectOptions: [],
},
{
type: 'button',
@ -181,7 +179,6 @@ export default {
select: true,
label: '关联表名',
prop: 'plcId',
labelKey: `plcTableName`,
url: '/base/equipment-plc/listAll',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
@ -210,44 +207,8 @@ export default {
},
created() {
this.getList();
this.initSearchOptions();
},
methods: {
async getEquipmentOptions() {
const res = await this.$axios({
url: '/base/equipment/listAll',
method: 'get',
});
return res.data;
},
async getPlcOptions() {
const res = await this.$axios({
url: '/base/equipment-plc/listAll',
method: 'get',
});
return res.data;
},
/** 初始化查询条件 */
async initSearchOptions() {
Promise.all([this.getEquipmentOptions(), this.getPlcOptions()]).then(
([eqList, plcList]) => {
this.searchBarFormConfig[0].selectOptions = eqList.map((item) => {
return {
name: item.name,
id: item.id,
};
});
this.searchBarFormConfig[1].selectOptions = plcList.map((item) => {
return {
name: item.name,
id: item.id,
};
});
}
);
},
/** 覆盖 handleEmitFun 的默认实现 */
handleEmitFun({ action, payload }) {
switch (action) {

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -69,27 +68,29 @@ export default {
// width: 180,
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
// },
{ prop: 'plcParamName', label: '参数列名' },
{ prop: 'name', label: '参数名称' },
{ prop: 'plcParamName', label: '参数列名', align: 'center' },
{ prop: 'name', label: '参数名称', align: 'center' },
{
prop: 'unit',
label: '单位',
align: 'center',
filter: publicFormatter('unit_dict'),
},
{
prop: 'collection',
label: '是否采集',
align: 'center',
filter: (val) => (val != null ? ['否', '是'][val] : '-'),
},
{ prop: 'minValue', label: '最小值' },
{ prop: 'maxValue', label: '最大值' },
{ prop: 'defaultValue', label: '标准值' },
{ prop: 'description', label: '描述' },
{ prop: 'remark', label: '备注' },
{ prop: 'minValue', label: '最小值', align: 'center' },
{ prop: 'maxValue', label: '最大值', align: 'center' },
{ prop: 'defaultValue', label: '标准值', align: 'center' },
{ prop: 'description', label: '描述', align: 'center' },
{ prop: 'remark', label: '备注', align: 'center' },
// {
// _action: 'params-bind',
// label: '',
// ,
// align: 'center',
// subcomponent: {
// props: ['injectData'],
// render: function (h) {
@ -156,7 +157,7 @@ export default {
{
type: 'number',
message: '请输入正确的数字',
trigger: 'change',
trigger: 'blur',
transform: (val) => Number(val),
},
],
@ -166,13 +167,10 @@ export default {
label: '最大值',
prop: 'maxValue',
rules: [
{
required: false,
},
{
type: 'number',
message: '请输入正确的数字',
trigger: 'change',
trigger: 'blur',
transform: (val) => Number(val),
},
],
@ -351,8 +349,8 @@ export default {
plcParamName: undefined,
name: undefined,
unit: undefined,
minValue: null,
maxValue: null,
minValue: undefined,
maxValue: undefined,
defaultValue: undefined,
collection: undefined,
description: undefined,

View File

@ -16,7 +16,6 @@
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
@ -148,14 +147,15 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'name', label: '设备名称' },
{ width: 256, prop: 'code', label: '检测编码' },
{ prop: 'equipmentType', label: '设备类型' },
{ prop: 'enName', label: '英文名称' },
{ prop: 'abbr', label: '缩写' },
{ prop: 'name', label: '设备名称', align: 'center' },
{ prop: 'code', label: '检测编码', align: 'center' },
{ prop: 'equipmentType', label: '设备类型', align: 'center' },
{ prop: 'enName', label: '英文名称', align: 'center' },
{ prop: 'abbr', label: '缩写', align: 'center' },
{
action: 'show-detail',
label: '详情',
align: 'center',
subcomponent: {
props: ['injectData'],
render: function (h) {
@ -377,8 +377,8 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'name', label: '属性名称' },
{ prop: 'value', label: '属性值' },
{ prop: 'name', label: '属性名称', align: 'center' },
{ prop: 'value', label: '属性值', align: 'center' },
],
//
open: false,

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -86,9 +85,9 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'name', label: '设备类型名称', },
{ prop: 'code', label: '检测类型编码', },
{ prop: 'remark', label: '备注', },
{ prop: 'name', label: '设备类型名称', align: 'center' },
{ prop: 'code', label: '检测类型编码', align: 'center' },
{ prop: 'remark', label: '备注', align: 'center' },
],
searchBarFormConfig: [
{

View File

@ -86,72 +86,84 @@ export default {
// : undefined,
// ].filter((v) => v),
tableProps: [
{ prop: 'factoryName', label: '工厂' },
{ prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备' },
{ prop: 'factoryName', label: '工厂', align: 'center' },
{ prop: 'lineName', label: '产线', align: 'center' },
{ prop: 'sectionName', label: '工段', align: 'center' },
{ prop: 'equipmentName', label: '设备', align: 'center' },
{
label: '有效时间',
align: 'center',
children: [
{
width: 128,
prop: 'workTime',
label: '工作时长',
align: 'center',
},
{
width: 128,
prop: 'workRate',
label: '百分比',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
},
],
},
{
label: '关机时间',
align: 'center',
children: [
{
width: 128,
prop: 'stopTime',
label: '停机时长',
align: 'center',
},
{ width: 128, prop: 'stopRate', label: '百分比' },
{ width: 128, prop: 'stopRate', label: '百分比', align: 'center' },
],
},
{
label: '中断损失',
align: 'center',
children: [
{
width: 128,
prop: 'downTime',
label: '故障时长',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
},
{ width: 128, prop: 'downRate', label: '百分比' },
{ width: 128, prop: 'downRate', label: '百分比', align: 'center' },
{
width: 128,
prop: 'timeEfficiency',
label: '时间开动率',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
},
],
},
{
label: '速度损失',
align: 'center',
children: [
{
width: 128,
prop: 'realProcSpeed',
label: '实际加工速度',
align: 'center',
},
{
width: 128,
prop: 'designProcSpeed',
label: '理论加工速度',
align: 'center',
},
{
width: 128,
prop: 'peEfficiency',
label: '速度开动率',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
},
],
@ -159,17 +171,19 @@ export default {
{
prop: 'oee',
label: 'OEE',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
},
{
prop: 'teep',
label: 'TEEP',
align: 'center',
filter: (val) => (val != null ? +val.toFixed(3) : '-'),
},
// {
// _action: 'view-trend',
// label: '',
// ,
// align: 'center',
// subcomponent: {
// props: ['injectData'],
// render: function (h) {

View File

@ -65,22 +65,24 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
{ prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' },
{ prop: 'equipmentName', label: '设备' },
{ prop: 'lineName', label: '产线', align: 'center' },
{ prop: 'sectionName', label: '工段', align: 'center' },
{ prop: 'equipmentName', label: '设备', align: 'center' },
{
width: 188,
prop: 'mtbf',
label: '平均故障间隔时间[MTBF](h)',
align: 'center',
},
{
width: 180,
prop: 'mttr',
label: '平均维修时间[MTTR](h)',
align: 'center',
},
{ prop: 'workTime', label: '工作时长(h)' },
{ prop: 'downTime', label: '故障时长(h)' },
{ prop: 'downCount', label: '故障次数' },
{ prop: 'workTime', label: '工作时长(h)', align: 'center' },
{ prop: 'downTime', label: '故障时长(h)', align: 'center' },
{ prop: 'downCount', label: '故障次数', align: 'center' },
],
searchBarFormConfig: [
{
@ -160,13 +162,15 @@ export default {
this.queryParams.recordTime = [
moment()
.month(btn.month - 1)
.format('YYYY-MM') + '-01 00:00:00',
moment().month(btn.month).format('YYYY-MM') + '-01 00:00:00',
.format('YYYY-MM')+'-01 00:00:00',
moment()
.month(btn.month)
.format('YYYY-MM')+'-01 00:00:00',
];
} else {
this.queryParams.recordTime = null;
}
this.queryParams.lineId = btn.lineId || null;
this.queryParams.lineId = btn.lineId || null;
this.handleQuery();
break;
}

View File

@ -35,7 +35,6 @@
</template>
<script>
import moment from 'moment';
import LineChart from './components/lineChart.vue';
export default {
@ -43,8 +42,6 @@ export default {
components: { LineChart },
props: {},
data() {
const now = new Date();
const [y, m, d] = [now.getFullYear(), now.getMonth(), now.getDate()];
return {
dialogVisible: false,
urls: {
@ -75,30 +72,13 @@ export default {
dateType: 'daterange', // datetimerange
// format: 'yyyy-MM-dd HH:mm:ss',
format: 'yyyy-MM-dd',
// valueFormat: 'timestamp',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'],
param: 'recordTime',
defaultSelect: [
new Date(y, m, d)
.toLocaleString()
.split('/')
.map((item, index) => {
if (index == 1 || index == 2) return item.padStart(2, '0');
return item;
})
.join('-'),
new Date(y, m, d, 23, 59, 59)
.toLocaleString()
.split('/')
.map((item, index) => {
if (index == 1 || index == 2) return item.padStart(2, '0');
return item;
})
.join('-'),
],
},
{
type: 'button',
@ -106,9 +86,9 @@ export default {
name: 'search',
color: 'primary',
},
// {
// type: 'separate',
// },
{
type: 'separate',
},
// {
// type: 'button',
// btnName: '',
@ -131,36 +111,43 @@ export default {
// width: 160,
prop: 'sectionName',
label: '工段',
align: 'center',
},
{
// width: 160,
prop: 'equipmentName',
label: '设备名称',
align: 'center',
},
{
// width: 160,
prop: 'products',
label: '产品名称',
align: 'center',
},
{
// width: 160,
prop: 'inQuantity',
label: '进片数量',
align: 'center',
},
{
// width: 160,
prop: 'outQuantity',
label: '出片数量',
align: 'center',
},
{
// width: 160,
prop: 'nokQuantity',
label: '破损/不合格数',
align: 'center',
},
{
// width: 160,
prop: 'passRate',
label: '合格率',
align: 'center',
},
],
lineChartConfig: {
@ -174,14 +161,14 @@ export default {
top: 0,
left: 0,
padding: 5,
icon: 'roundRect',
itemWidth: 12,
itemHeight: 12,
itemGap: 20,
icon: 'roundRect',
itemWidth: 12,
itemHeight: 12,
itemGap: 20,
textStyle: {
fontSize: 14,
lineHeight: 14,
},
fontSize: 14,
lineHeight: 14
},
},
xAxis: {
type: 'category',
@ -189,13 +176,13 @@ export default {
},
yAxis: {
type: 'value',
name: '合格率',
nameLocation: 'end',
nameTextStyle: {
fontSize: 14,
align: 'right',
},
nameGap: 26,
name: '合格率',
nameLocation: 'end',
nameTextStyle: {
fontSize: 14,
align: 'right'
},
nameGap: 26
},
series: [
{

View File

@ -16,7 +16,6 @@
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="120"
label="操作"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
@ -82,12 +81,13 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
{ width: 128, prop: 'productionLine', label: '产线' },
{ width: 128, prop: 'workshopSection', label: '工段' },
{ width: 128, prop: 'equipment', label: '设备名称' },
{ width: 128, prop: 'productionLine', label: '产线', align: 'center' },
{ width: 128, prop: 'workshopSection', label: '工段', align: 'center' },
{ width: 128, prop: 'equipment', label: '设备名称', align: 'center' },
{
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: '报警内容' },
{ prop: 'alarmContent', label: '报警内容', align: 'center' },
// {
// _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;

View File

@ -35,9 +35,7 @@
" />
</div>
</div>
<div v-else style="margin-top: 20px; color: #c7c7c7; text-align: center">
暂无数据
</div>
<div v-else style="margin-top: 20px; color: #c7c7c7; text-align: center;">暂无数据</div>
</div>
</template>
@ -141,16 +139,19 @@ 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 = {
@ -161,6 +162,7 @@ export default {
otherList.forEach((item) => {
props.push({
label: item.name,
align: 'center',
prop: item.name,
width: 128,
});

View File

@ -25,7 +25,7 @@ export default {
grid: {
top: 64,
left: 56,
right: 64,
right: 24,
bottom: 56,
},
title: {
@ -64,10 +64,6 @@ export default {
color: '#ccc',
},
},
name: '数量',
nameTextStyle: {
fontSize: 14,
},
},
series: [
{

View File

@ -197,11 +197,11 @@ export default {
// },
],
tableProps: [
{ prop: 'lineName', label: '产线', },
{ prop: 'sectionName', label: '工段', },
{ prop: 'externalCode', label: '设备编码', },
{ prop: 'equipmentName', label: '设备名称', },
{ prop: 'totalQuantity', label: '加工数量', },
{ 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' },
],
mode: 'table', // table | graph
queryParams: {
@ -230,20 +230,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,7 +258,6 @@ export default {
const { data } = await this.$axios('/base/factory/getTree');
this.sidebarContent = data;
this.buildTree(data);
console.log('tree', this.sidebarContent)
},
handleSidebarItemClick({ label, id, type }) {

View File

@ -11,9 +11,18 @@
:formConfigs="[{ label: '设备近24小时生产记录', type: 'title' }]"
ref="search-bar" />
<el-skeleton v-if="initing" :rows="6" animated />
<div v-else :class="{ 'no-data-bg': !list || list.length == 0 }">
<div v-else>
<div
v-if="noData"
style="
height: 240px;
background: url(../../../assets/images/no-data-bg.png) 100% / contain
no-repeat;
">
没有数据
</div>
<base-table
v-if="list && list.length > 0"
v-else
:span-method="mergeColumnHandler"
:table-props="tableProps"
:table-data="list"
@ -54,22 +63,24 @@ export default {
} = item;
const props = [
{ prop: 'productLine', label: '产线' },
{ prop: 'specification', label: '规格' },
{ prop: 'equipmentName', label: '设备' },
{ prop: 'totalQuantity', label: '生产总数' },
{ prop: 'productLine', label: '产线', align: 'center' },
{ prop: 'specification', label: '规格', align: 'center' },
{ prop: 'equipmentName', label: '设备', align: 'center' },
{ prop: 'totalQuantity', label: '生产总数', align: 'center' },
];
for (const key of Object.keys(hourData).sort()) {
const subprop = {
label: key,
align: 'center',
children: [
{ prop: key + '__in', label: '进数据' },
{ prop: key + '__out', label: '出数据' },
{ prop: key + '__nok', label: '报废数据' },
{ prop: key + '__in', label: '进数据', align: 'center' },
{ prop: key + '__out', label: '出数据', align: 'center' },
{ prop: key + '__nok', label: '报废数据', align: 'center' },
{
prop: key + '__ratio',
label: '报废率',
align: 'center',
filter: (val) => (val != null ? val + ' %' : '-'),
},
],

View File

@ -18,7 +18,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -75,24 +74,28 @@ export default {
width: 128,
prop: 'equipmentName',
label: '设备名称',
align: 'center',
},
{
width: 128,
prop: 'equipmentCode',
label: '设备编码',
align: 'center',
},
{ width: 128, prop: 'inQuantity', label: '投入数' },
{ width: 128, prop: 'outQuantity', label: '产出数' },
{ width: 128, prop: 'inQuantity', label: '投入数', align: 'center' },
{ width: 128, prop: 'outQuantity', label: '产出数', align: 'center' },
{
width: 128,
prop: 'run',
label: '是否运行',
align: 'center',
filter: (val) => (val != null ? (val ? '是' : '否') : '-'),
},
{
width: 128,
prop: 'status',
label: '状态',
align: 'center',
filter: (val) =>
val != null ? ['正常', '计划停机', '故障'][val] : '-',
},
@ -100,6 +103,7 @@ export default {
width: 128,
prop: 'error',
label: '是否故障',
align: 'center',
filter: (val) => (val != null ? (val ? '是' : '否') : '-'),
},
{
@ -117,6 +121,7 @@ export default {
{
_action: 'params-monitor',
label: '参数监控',
align: 'center',
subcomponent: {
props: ['injectData'],
render: function (h) {

View File

@ -1,233 +0,0 @@
<!--
filename: dialogForm.vue
author: liubin
date: 2023-09-11 15:55:13
description: DialogForm for equipmentBindSection only
-->
<template>
<el-form
ref="form"
:model="dataForm"
label-width="100px"
v-loading="formLoading">
<el-row :gutter="20">
<el-col>
<el-form-item
label="产线"
prop="productionId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.productionId"
placeholder="请选择产线"
filterable
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label="工段"
prop="sectionId"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.sectionId"
placeholder="请选择工段"
filterable
@change="$emit('update', dataForm)">
<el-option
v-for="opt in workshopSectionList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label="按钮盒识别码"
prop="buttonId"
:rules="[
{
type: 'number',
message: '请输入整数',
trigger: 'blur',
transform: (val) => Number.isInteger(Number(val)) && Number(val),
},
]">
<el-input
v-model="dataForm.buttonId"
@change="$emit('update', dataForm)"
placeholder="请输入整数" />
</el-form-item>
<!--
<el-form-item
label="报警编码"
prop="code"
:rules="[{ required: true, message: '不能为空', trigger: 'blur' }]">
<el-select
v-model="dataForm.code"
placeholder="请选择产线"
@change="handleProductlineChange">
<el-option
v-for="opt in productionLineList"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item> -->
</el-col>
<el-col>
<el-form-item label="按钮盒模式" prop="model">
<el-input
v-model="dataForm.model"
@change="$emit('update', dataForm)"
placeholder="请输入按钮盒模式" />
</el-form-item>
</el-col>
<el-col>
<el-form-item
label="按钮值"
prop="keyValue"
:rules="[
{
type: 'number',
message: '请输入100以内的整数',
trigger: 'blur',
transform: (val) =>
Number(val) <= 100 && Number.isInteger(+val) && Number(val),
},
]">
<el-input
v-model="dataForm.keyValue"
type="number"
min="0"
max="100"
@change="$emit('update', dataForm)"
placeholder="请输入按钮盒模式" />
</el-form-item>
</el-col>
<el-col>
<el-form-item label="检测内容" prop="inspectionDetContent">
<el-input
type="textarea"
v-model="dataForm.inspectionDetContent"
placeholder="请输入检测内容"
@change="$emit('update', dataForm)"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
<script>
export default {
name: 'DialogForm',
model: {
prop: 'dataForm',
event: 'update',
},
emits: ['update'],
components: {},
props: {
dataForm: {
type: Object,
default: () => ({}),
},
},
data() {
return {
formLoading: true,
productionLineList: [],
workshopSectionList: [],
};
},
mounted() {
this.getProductionLineList();
// this.getWorksectionList();
// this.getCode('/base/equipment-group-alarm/getCode').then((code) => {
// this.formLoading = false;
// this.$emit('update', {
// ...this.dataForm,
// code,
// });
// });
},
watch: {
'dataForm.productionId': {
handler(id) {
this.getWorksectionList(id);
},
immediate: true
}
},
methods: {
/** 模拟透传 ref */
validate(cb) {
return this.$refs.form.validate(cb);
},
resetFields(args) {
return this.$refs.form.resetFields(args);
},
async getProductionLineList() {
this.formLoading = true;
const res = await this.$axios({
url: '/base/production-line/listAll',
method: 'get',
});
if (res.code == 0) {
this.productionLineList = res.data.map((item) => ({
label: item.name,
value: item.id,
}));
}
this.formLoading = false;
},
async getWorksectionList(id) {
this.formLoading = true;
const res = await this.$axios({
url: '/base/workshop-section/listByParentId',
method: 'get',
params: {
id,
},
});
if (res.code == 0) {
this.workshopSectionList = res.data.map((item) => ({
label: item.name,
value: item.id,
}));
}
this.formLoading = false;
},
async handleProductlineChange(id) {
await this.getWorksectionList(id);
this.dataForm.sectionId = null;
this.$emit('update', this.dataForm);
},
async getCode(url) {
const response = await this.$axios(url);
return response.data;
},
},
};
</script>
<style scoped lang="scss">
.el-date-editor,
.el-select {
width: 100%;
}
</style>

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
fixed="right"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
@ -39,7 +38,7 @@
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
<DialogForm v-if="open" ref="form" :dataForm="form" :rows="rows" />
</base-dialog>
</div>
</template>
@ -55,12 +54,11 @@ import {
} from '@/api/base/qualityInspectionBoxBtn';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import moment from 'moment';
import DialogForm from './dialogForm.vue';
export default {
name: 'QualityInspectionBoxBtn',
mixins: [basicPageMixin],
components: { DialogForm },
components: {},
data() {
return {
rows: [
@ -83,9 +81,6 @@ export default {
url: '/base/workshop-section/listAll',
prop: 'sectionId',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
bind: {
filterable: true,
},
},
],
[
@ -96,10 +91,9 @@ export default {
rules: [
{
type: 'number',
message: '请输入数',
message: '请输入',
trigger: 'blur',
transform: (val) =>
Number.isInteger(Number(val)) && Number(val),
transform: (val) => Number(val),
},
],
},
@ -113,10 +107,9 @@ export default {
rules: [
{
type: 'number',
message: '请输入100以内的数',
message: '请输入100以内的',
trigger: 'blur',
transform: (val) =>
Number(val) <= 100 && Number.isInteger(+val) && Number(val),
transform: (val) => Number(val) <= 100 && Number(val),
},
],
bind: { type: 'number', min: 0, max: 100 },
@ -127,7 +120,7 @@ export default {
textarea: true,
label: '检测内容',
prop: 'inspectionDetContent',
// rules: [{ required: true, message: '', trigger: 'blur' }],
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
],
@ -180,36 +173,43 @@ export default {
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{
width: 128,
prop: 'productionName',
label: '产线',
align: 'center',
},
{
width: 128,
prop: 'sectionName',
label: '工段',
align: 'center',
},
{
width: 128,
prop: 'inspectionDetContent',
label: '检测内容',
align: 'center',
},
{
width: 160,
prop: 'buttonId',
label: '按钮盒识别码',
align: 'center',
},
// {
// width: 256,
// prop: 'productionId',
// label: '线ID',
// ,
// align: 'center',
// },
// {
// width: 256,
// prop: 'sectionId',
// label: 'ID',
// ,
// align: 'center',
// },
{ width: 90, prop: 'keyValue', label: '按钮值' },
{ width: 128, prop: 'model', label: '按钮盒模式' },
{ width: 90, prop: 'keyValue', label: '按钮值', align: 'center' },
{ width: 128, prop: 'model', label: '按钮盒模式', align: 'center' },
],
//
queryParams: {
@ -220,13 +220,13 @@ export default {
// keys, queryParams pageNo, pageSize key
searchBarKeys: ['inspectionDetContent'],
form: {
id: null,
buttonId: null,
inspectionDetContent: null,
productionId: null,
sectionId: null,
model: null,
keyValue: null,
id: undefined,
inspectionDetId: undefined,
inspectionDetContent: undefined,
productionId: undefined,
sectionId: undefined,
model: undefined,
keyValue: undefined,
},
};
},
@ -247,13 +247,13 @@ export default {
/** 表单重置 */
reset() {
this.form = {
id: null,
buttonId: null,
inspectionDetContent: null,
productionId: null,
sectionId: null,
model: null,
keyValue: null,
id: undefined,
inspectionDetId: undefined,
inspectionDetContent: undefined,
productionId: undefined,
sectionId: undefined,
model: undefined,
keyValue: undefined,
};
this.resetForm('form');
},
@ -300,7 +300,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除"' + row.sectionName + '"?')
.confirm('是否确认删除安灯按钮16键对应编号为"' + id + '"的数据项?')
.then(function () {
return deleteQualityInspectionBoxBtn(id);
})

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
fixed="right"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
@ -173,10 +172,10 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'typeName', label: '类型名称', },
{ prop: 'content', label: '检测内容', },
{ prop: 'code', label: '检测编码', },
{ prop: 'remark', label: '备注', },
{ prop: 'typeName', label: '类型名称', align: 'center' },
{ prop: 'content', label: '检测内容', align: 'center' },
{ prop: 'code', label: '检测编码', align: 'center' },
{ prop: 'remark', label: '备注', align: 'center' },
],
//
queryParams: {
@ -276,7 +275,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除检测信息"' + row.content + '"?')
.confirm('是否确认删除质量检测信息基础编号为"' + id + '"的数据项?')
.then(function () {
return deleteQualityInspectionDet(id);
})

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -107,9 +106,9 @@ export default {
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ prop: 'name', label: '检测类型名称' },
{ prop: 'code', label: '检测类型编码' },
{ prop: 'remark', label: '备注' },
{ prop: 'name', label: '检测类型名称', align: 'center' },
{ prop: 'code', label: '检测类型编码', align: 'center' },
{ prop: 'remark', label: '备注', align: 'center' },
// {
// label: '',
// alignt: 'center',
@ -322,7 +321,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除质量检测类型?')
.confirm('是否确认删除质量检测类型基础编号为"' + id + '"的数据项?')
.then(function () {
return deleteQualityInspectionType(id);
})

View File

@ -17,7 +17,6 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="120"
fixed="right"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
@ -69,7 +68,7 @@ export default {
[
{
select: true,
label: '检测内容',
label: '检测内容ID',
url: '/base/quality-inspection-det/listAll',
prop: 'inspectionDetId',
labelKey: 'content',
@ -98,9 +97,6 @@ export default {
label: '产线',
url: '/base/production-line/listAll',
prop: 'productionLineId',
bind: {
filterable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
{
@ -109,9 +105,6 @@ export default {
url: '/base/workshop-section/listAll', // url options
options: [], // options, options
prop: 'sectionId',
bind: {
filterable: true,
},
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
@ -125,7 +118,6 @@ export default {
datetime: true,
label: '检测时间',
prop: 'checkTime',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
bind: {
format: 'yyyy-MM-dd HH:mm:ss',
'value-format': 'timestamp',
@ -134,15 +126,15 @@ export default {
},
},
],
// [
// {
// textarea: true,
// label: '',
// prop: 'inspectionDetContent',
// value: '',
// rules: [{ required: true, message: '', trigger: 'blur' }],
// },
// ],
[
{
textarea: true,
label: '检测内容',
prop: 'inspectionDetContent',
value: '',
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
},
],
[{ textarea: true, label: '描述', prop: 'explainText' }],
[{ input: true, label: '备注', prop: 'remark' }],
],
@ -221,27 +213,32 @@ export default {
width: 128,
prop: 'inspectionDetContent',
label: '检测内容',
align: 'center',
},
{
// width: 128,
prop: 'lineName',
label: '产线',
align: 'center',
},
{
// width: 128,
prop: 'checkPerson',
label: '检测人员',
align: 'center',
},
{
// width: 160,
prop: 'checkTime',
label: '检测时间',
align: 'center',
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{
width: 90,
prop: 'source',
label: '来源',
align: 'center',
filter: (val) => ['未知', '手动', '自动'][val],
},
],
@ -397,7 +394,7 @@ export default {
handleDelete(row) {
const id = row.id;
this.$modal
.confirm('是否确认删除"' + row.inspectionDetContent + '"?')
.confirm('是否确认删除质量检查信息记录表编号为"' + id + '"的数据项?')
.then(function () {
return deleteQualityInspectionRecord(id);
})

View File

@ -13,20 +13,18 @@
<!-- <pre><code v-html="jsondemo"></code></pre> -->
<el-skeleton v-if="initing" :rows="6" animated />
<div v-else :class="{ 'no-data-bg': !list || list.length == 0 }">
<base-table
v-if="list && list.length > 0"
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emitFun="handleEmitFun"></base-table>
</div>
<base-table
v-else
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emitFun="handleEmitFun"></base-table>
</div>
</template>
<script>
// import response from './response.json';
import response from './response.json';
import { handleNameData, handleDynamicData } from '@/utils/dynamicProps';
// import hljs from 'highlight.js/lib/highlight';
// import json from 'highlight.js/lib/languages/json';
@ -45,6 +43,7 @@ export default {
pageNo: 1,
pageSize: 10,
},
// jsondemo: '',
list: [
// {
// inspectionContent: '1',
@ -57,6 +56,7 @@ export default {
{
prop: 'inspectionContent',
label: '检测内容',
align: 'center',
},
],
};
@ -67,10 +67,20 @@ export default {
},
methods: {
async getList() {
const response = await this.$axios({
url: '/monitoring/record-in-one-day/get',
method: 'get',
});
// const response = await this.$axios({
// url: '/monitoring/record-in-one-day/get',
// method: 'get',
// });
console.log(response);
// const {
// // data: { nameData },
// code,
// } = response;
// this.jsondemo = hljs.highlight(
// 'json',
// JSON.stringify(response, null, 2),
// true
// ).value;
const {
data: { data: dyanmicData, nameData },
} = response;

View File

@ -35,22 +35,27 @@ export default {
{
prop: 'lineName',
label: '产线',
align: 'center',
},
{
prop: 'sumUp',
label: '上片总数',
align: 'center',
},
{
prop: 'sumDown',
label: '下片总数',
align: 'center',
},
{
prop: 'sumCheck',
label: '检测总数',
align: 'center',
},
{
prop: 'scrapRatio',
label: '比例(%)',
align: 'center',
},
],
};

View File

@ -171,17 +171,20 @@ export default {
// width: 160,
prop: 'inspectionContent',
label: '检测内容',
align: 'center',
},
...this.dynamicProps,
{
// width: 128,
prop: 'sumInput',
label: '检测类型总数',
align: 'center',
},
{
// width: 128,
prop: 'ratio',
label: '比例',
align: 'center',
// subcomponent: {
// name: 'TextOnly',
// props: {
@ -378,47 +381,47 @@ export default {
// width: 128,
// prop: 'line1',
// label: '线1',
// ,
// align: 'center',
// },
// {
// width: 128,
// prop: 'line2',
// label: '线2',
// ,
// align: 'center',
// },
// {
// width: 128,
// prop: 'line3',
// label: '线3',
// ,
// align: 'center',
// },
// {
// width: 128,
// prop: 'line4',
// label: '线4',
// ,
// align: 'center',
// },
// {
// width: 128,
// prop: 'line5',
// label: '线5',
// ,
// align: 'center',
// },
// {
// width: 128,
// prop: 'line6',
// label: '线6',
// ,
// align: 'center',
// },
// {
// width: 128,
// prop: 'line7',
// label: '线7',
// ,
// align: 'center',
// },
// {
// width: 128,
// prop: 'line8',
// label: '线8',
// ,
// align: 'center',
// }, -->