Compare commits

..

No commits in common. "3900dcfbd88dd00f2b03f4c6395151c9e7f2442c" and "8fd1504dc0f4a88a1b3a0098bd9d5317541f21fb" have entirely different histories.

40 changed files with 394 additions and 5806 deletions

View File

@ -1,215 +1,216 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title><%= webpackConfig.name %></title>
<!--[if lt IE 11]>
<script>
window.location.href = 'html/ie.html';
</script>
<![endif]-->
<style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>
<%= webpackConfig.name %>
</title>
<!--[if lt IE 11]><script>window.location.href='html/ie.html';</script><![endif]-->
<style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
}
#loader-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
#loader {
display: block;
position: relative;
left: 50%;
top: 50%;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #fff;
-webkit-animation: spin 2s linear infinite;
-ms-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
-o-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 1001;
}
#loader-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
}
#loader:before {
content: '';
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #fff;
-webkit-animation: spin 3s linear infinite;
-moz-animation: spin 3s linear infinite;
-o-animation: spin 3s linear infinite;
-ms-animation: spin 3s linear infinite;
animation: spin 3s linear infinite;
}
#loader {
display: block;
position: relative;
left: 50%;
top: 50%;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 2s linear infinite;
-ms-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
-o-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 1001;
}
#loader:after {
content: '';
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #fff;
-moz-animation: spin 1.5s linear infinite;
-o-animation: spin 1.5s linear infinite;
-ms-animation: spin 1.5s linear infinite;
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
#loader:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 3s linear infinite;
-moz-animation: spin 3s linear infinite;
-o-animation: spin 3s linear infinite;
-ms-animation: spin 3s linear infinite;
animation: spin 3s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
#loader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-moz-animation: spin 1.5s linear infinite;
-o-animation: spin 1.5s linear infinite;
-ms-animation: spin 1.5s linear infinite;
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: #7171c6;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
#loader-wrapper .loader-section.section-left {
left: 0;
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#loader-wrapper .loader-section.section-right {
right: 0;
}
.loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: #7171C6;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
.loaded #loader-wrapper .loader-section.section-right {
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
#loader-wrapper .loader-section.section-left {
left: 0;
}
.loaded #loader {
opacity: 0;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
#loader-wrapper .loader-section.section-right {
right: 0;
}
.loaded #loader-wrapper {
visibility: hidden;
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
-webkit-transition: all 0.3s 1s ease-out;
transition: all 0.3s 1s ease-out;
}
.no-js #loader-wrapper {
display: none;
}
.loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.no-js h1 {
color: #222222;
}
.loaded #loader-wrapper .loader-section.section-right {
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
#loader-wrapper .load_title {
font-family: 'Open Sans';
color: #fff;
font-size: 19px;
width: 100%;
text-align: center;
z-index: 9999999999999;
position: absolute;
top: 60%;
opacity: 1;
line-height: 30px;
}
.loaded #loader {
opacity: 0;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
#loader-wrapper .load_title span {
font-weight: normal;
font-style: italic;
font-size: 13px;
color: #fff;
opacity: 0.5;
}
</style>
</head>
.loaded #loader-wrapper {
visibility: hidden;
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
-webkit-transition: all 0.3s 1s ease-out;
transition: all 0.3s 1s ease-out;
}
.no-js #loader-wrapper {
display: none;
}
.no-js h1 {
color: #222222;
}
#loader-wrapper .load_title {
font-family: 'Open Sans';
color: #FFF;
font-size: 19px;
width: 100%;
text-align: center;
z-index: 9999999999999;
position: absolute;
top: 60%;
opacity: 1;
line-height: 30px;
}
#loader-wrapper .load_title span {
font-weight: normal;
font-style: italic;
font-size: 13px;
color: #FFF;
opacity: 0.5;
}
</style>
</head>
<body>
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
</body>
<body>
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
</body>
</html>

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建设备
export function createEquipment(data) {
return request({
url: '/base/equipment/create',
method: 'post',
data: data
})
}
// 更新设备
export function updateEquipment(data) {
return request({
url: '/base/equipment/update',
method: 'put',
data: data
})
}
// 删除设备
export function deleteEquipment(id) {
return request({
url: '/base/equipment/delete?id=' + id,
method: 'delete'
})
}
// 获得设备
export function getEquipment(id) {
return request({
url: '/base/equipment/get?id=' + id,
method: 'get'
})
}
// 获得设备分页
export function getEquipmentPage(query) {
return request({
url: '/base/equipment/page',
method: 'get',
params: query
})
}
// 导出设备 Excel
export function exportEquipmentExcel(query) {
return request({
url: '/base/equipment/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建设备属性
export function createEquipmentAttr(data) {
return request({
url: '/base/equipment-attr/create',
method: 'post',
data: data
})
}
// 更新设备属性
export function updateEquipmentAttr(data) {
return request({
url: '/base/equipment-attr/update',
method: 'put',
data: data
})
}
// 删除设备属性
export function deleteEquipmentAttr(id) {
return request({
url: '/base/equipment-attr/delete?id=' + id,
method: 'delete'
})
}
// 获得设备属性
export function getEquipmentAttr(id) {
return request({
url: '/base/equipment-attr/get?id=' + id,
method: 'get'
})
}
// 获得设备属性分页
export function getEquipmentAttrPage(query) {
return request({
url: '/base/equipment-attr/page',
method: 'get',
params: query
})
}
// 导出设备属性 Excel
export function exportEquipmentAttrExcel(query) {
return request({
url: '/base/equipment-attr/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建工段设备绑定
export function createEquipmentBindSection(data) {
return request({
url: '/base/equipment-bind-section/create',
method: 'post',
data: data
})
}
// 更新工段设备绑定
export function updateEquipmentBindSection(data) {
return request({
url: '/base/equipment-bind-section/update',
method: 'put',
data: data
})
}
// 删除工段设备绑定
export function deleteEquipmentBindSection(id) {
return request({
url: '/base/equipment-bind-section/delete?id=' + id,
method: 'delete'
})
}
// 获得工段设备绑定
export function getEquipmentBindSection(id) {
return request({
url: '/base/equipment-bind-section/get?id=' + id,
method: 'get'
})
}
// 获得工段设备绑定分页
export function getEquipmentBindSectionPage(query) {
return request({
url: '/base/equipment-bind-section/page',
method: 'get',
params: query
})
}
// 导出工段设备绑定 Excel
export function exportEquipmentBindSectionExcel(query) {
return request({
url: '/base/equipment-bind-section/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建设备文件对应
export function createEquipmentFile(data) {
return request({
url: '/base/equipment-file/create',
method: 'post',
data: data
})
}
// 更新设备文件对应
export function updateEquipmentFile(data) {
return request({
url: '/base/equipment-file/update',
method: 'put',
data: data
})
}
// 删除设备文件对应
export function deleteEquipmentFile(id) {
return request({
url: '/base/equipment-file/delete?id=' + id,
method: 'delete'
})
}
// 获得设备文件对应
export function getEquipmentFile(id) {
return request({
url: '/base/equipment-file/get?id=' + id,
method: 'get'
})
}
// 获得设备文件对应分页
export function getEquipmentFilePage(query) {
return request({
url: '/base/equipment-file/page',
method: 'get',
params: query
})
}
// 导出设备文件对应 Excel
export function exportEquipmentFileExcel(query) {
return request({
url: '/base/equipment-file/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建设备分组(用于同类型不同厂家的设备区分)
export function createEquipmentGroup(data) {
return request({
url: '/base/equipment-group/create',
method: 'post',
data: data
})
}
// 更新设备分组(用于同类型不同厂家的设备区分)
export function updateEquipmentGroup(data) {
return request({
url: '/base/equipment-group/update',
method: 'put',
data: data
})
}
// 删除设备分组(用于同类型不同厂家的设备区分)
export function deleteEquipmentGroup(id) {
return request({
url: '/base/equipment-group/delete?id=' + id,
method: 'delete'
})
}
// 获得设备分组(用于同类型不同厂家的设备区分)
export function getEquipmentGroup(id) {
return request({
url: '/base/equipment-group/get?id=' + id,
method: 'get'
})
}
// 获得设备分组(用于同类型不同厂家的设备区分)分页
export function getEquipmentGroupPage(query) {
return request({
url: '/base/equipment-group/page',
method: 'get',
params: query
})
}
// 导出设备分组(用于同类型不同厂家的设备区分) Excel
export function exportEquipmentGroupExcel(query) {
return request({
url: '/base/equipment-group/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建设备分组报警明细
export function createEquipmentGroupAlarm(data) {
return request({
url: '/base/equipment-group-alarm/create',
method: 'post',
data: data
})
}
// 更新设备分组报警明细
export function updateEquipmentGroupAlarm(data) {
return request({
url: '/base/equipment-group-alarm/update',
method: 'put',
data: data
})
}
// 删除设备分组报警明细
export function deleteEquipmentGroupAlarm(id) {
return request({
url: '/base/equipment-group-alarm/delete?id=' + id,
method: 'delete'
})
}
// 获得设备分组报警明细
export function getEquipmentGroupAlarm(id) {
return request({
url: '/base/equipment-group-alarm/get?id=' + id,
method: 'get'
})
}
// 获得设备分组报警明细分页
export function getEquipmentGroupAlarmPage(query) {
return request({
url: '/base/equipment-group-alarm/page',
method: 'get',
params: query
})
}
// 导出设备分组报警明细 Excel
export function exportEquipmentGroupAlarmExcel(query) {
return request({
url: '/base/equipment-group-alarm/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建实时数据采集配置
export function createEquipmentPlc(data) {
return request({
url: '/base/equipment-plc/create',
method: 'post',
data: data
})
}
// 更新实时数据采集配置
export function updateEquipmentPlc(data) {
return request({
url: '/base/equipment-plc/update',
method: 'put',
data: data
})
}
// 删除实时数据采集配置
export function deleteEquipmentPlc(id) {
return request({
url: '/base/equipment-plc/delete?id=' + id,
method: 'delete'
})
}
// 获得实时数据采集配置
export function getEquipmentPlc(id) {
return request({
url: '/base/equipment-plc/get?id=' + id,
method: 'get'
})
}
// 获得实时数据采集配置分页
export function getEquipmentPlcPage(query) {
return request({
url: '/base/equipment-plc/page',
method: 'get',
params: query
})
}
// 导出实时数据采集配置 Excel
export function exportEquipmentPlcExcel(query) {
return request({
url: '/base/equipment-plc/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建设备与实时采集关系表(一对多)
export function createEquipmentPlcConnect(data) {
return request({
url: '/base/equipment-plc-connect/create',
method: 'post',
data: data
})
}
// 更新设备与实时采集关系表(一对多)
export function updateEquipmentPlcConnect(data) {
return request({
url: '/base/equipment-plc-connect/update',
method: 'put',
data: data
})
}
// 删除设备与实时采集关系表(一对多)
export function deleteEquipmentPlcConnect(id) {
return request({
url: '/base/equipment-plc-connect/delete?id=' + id,
method: 'delete'
})
}
// 获得设备与实时采集关系表(一对多)
export function getEquipmentPlcConnect(id) {
return request({
url: '/base/equipment-plc-connect/get?id=' + id,
method: 'get'
})
}
// 获得设备与实时采集关系表(一对多)分页
export function getEquipmentPlcConnectPage(query) {
return request({
url: '/base/equipment-plc-connect/page',
method: 'get',
params: query
})
}
// 导出设备与实时采集关系表(一对多) Excel
export function exportEquipmentPlcConnectExcel(query) {
return request({
url: '/base/equipment-plc-connect/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建设备数采详情
export function createEquipmentPlcParam(data) {
return request({
url: '/base/equipment-plc-param/create',
method: 'post',
data: data
})
}
// 更新设备数采详情
export function updateEquipmentPlcParam(data) {
return request({
url: '/base/equipment-plc-param/update',
method: 'put',
data: data
})
}
// 删除设备数采详情
export function deleteEquipmentPlcParam(id) {
return request({
url: '/base/equipment-plc-param/delete?id=' + id,
method: 'delete'
})
}
// 获得设备数采详情
export function getEquipmentPlcParam(id) {
return request({
url: '/base/equipment-plc-param/get?id=' + id,
method: 'get'
})
}
// 获得设备数采详情分页
export function getEquipmentPlcParamPage(query) {
return request({
url: '/base/equipment-plc-param/page',
method: 'get',
params: query
})
}
// 导出设备数采详情 Excel
export function exportEquipmentPlcParamExcel(query) {
return request({
url: '/base/equipment-plc-param/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建后端用 设备生产数量统计表(按一定时间段写入)
export function createEquipmentQuantityLog(data) {
return request({
url: '/base/equipment-quantity-log/create',
method: 'post',
data: data
})
}
// 更新后端用 设备生产数量统计表(按一定时间段写入)
export function updateEquipmentQuantityLog(data) {
return request({
url: '/base/equipment-quantity-log/update',
method: 'put',
data: data
})
}
// 删除后端用 设备生产数量统计表(按一定时间段写入)
export function deleteEquipmentQuantityLog(id) {
return request({
url: '/base/equipment-quantity-log/delete?id=' + id,
method: 'delete'
})
}
// 获得后端用 设备生产数量统计表(按一定时间段写入)
export function getEquipmentQuantityLog(id) {
return request({
url: '/base/equipment-quantity-log/get?id=' + id,
method: 'get'
})
}
// 获得后端用 设备生产数量统计表(按一定时间段写入)分页
export function getEquipmentQuantityLogPage(query) {
return request({
url: '/base/equipment-quantity-log/page',
method: 'get',
params: query
})
}
// 导出后端用 设备生产数量统计表(按一定时间段写入) Excel
export function exportEquipmentQuantityLogExcel(query) {
return request({
url: '/base/equipment-quantity-log/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建后端用 设备生产数量实时
export function createEquipmentQuantityRealtime(data) {
return request({
url: '/base/equipment-quantity-realtime/create',
method: 'post',
data: data
})
}
// 更新后端用 设备生产数量实时
export function updateEquipmentQuantityRealtime(data) {
return request({
url: '/base/equipment-quantity-realtime/update',
method: 'put',
data: data
})
}
// 删除后端用 设备生产数量实时
export function deleteEquipmentQuantityRealtime(id) {
return request({
url: '/base/equipment-quantity-realtime/delete?id=' + id,
method: 'delete'
})
}
// 获得后端用 设备生产数量实时
export function getEquipmentQuantityRealtime(id) {
return request({
url: '/base/equipment-quantity-realtime/get?id=' + id,
method: 'get'
})
}
// 获得后端用 设备生产数量实时分页
export function getEquipmentQuantityRealtimePage(query) {
return request({
url: '/base/equipment-quantity-realtime/page',
method: 'get',
params: query
})
}
// 导出后端用 设备生产数量实时 Excel
export function exportEquipmentQuantityRealtimeExcel(query) {
return request({
url: '/base/equipment-quantity-realtime/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建后端用 设备工作状态
export function createEquipmentStatusLog(data) {
return request({
url: '/base/equipment-status-log/create',
method: 'post',
data: data
})
}
// 更新后端用 设备工作状态
export function updateEquipmentStatusLog(data) {
return request({
url: '/base/equipment-status-log/update',
method: 'put',
data: data
})
}
// 删除后端用 设备工作状态
export function deleteEquipmentStatusLog(id) {
return request({
url: '/base/equipment-status-log/delete?id=' + id,
method: 'delete'
})
}
// 获得后端用 设备工作状态
export function getEquipmentStatusLog(id) {
return request({
url: '/base/equipment-status-log/get?id=' + id,
method: 'get'
})
}
// 获得后端用 设备工作状态分页
export function getEquipmentStatusLogPage(query) {
return request({
url: '/base/equipment-status-log/page',
method: 'get',
params: query
})
}
// 导出后端用 设备工作状态 Excel
export function exportEquipmentStatusLogExcel(query) {
return request({
url: '/base/equipment-status-log/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建后端用 设备状态实时
export function createEquipmentStatusRealtime(data) {
return request({
url: '/base/equipment-status-realtime/create',
method: 'post',
data: data
})
}
// 更新后端用 设备状态实时
export function updateEquipmentStatusRealtime(data) {
return request({
url: '/base/equipment-status-realtime/update',
method: 'put',
data: data
})
}
// 删除后端用 设备状态实时
export function deleteEquipmentStatusRealtime(id) {
return request({
url: '/base/equipment-status-realtime/delete?id=' + id,
method: 'delete'
})
}
// 获得后端用 设备状态实时
export function getEquipmentStatusRealtime(id) {
return request({
url: '/base/equipment-status-realtime/get?id=' + id,
method: 'get'
})
}
// 获得后端用 设备状态实时分页
export function getEquipmentStatusRealtimePage(query) {
return request({
url: '/base/equipment-status-realtime/page',
method: 'get',
params: query
})
}
// 导出后端用 设备状态实时 Excel
export function exportEquipmentStatusRealtimeExcel(query) {
return request({
url: '/base/equipment-status-realtime/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建设备类型
export function createEquipmentType(data) {
return request({
url: '/base/equipment-type/create',
method: 'post',
data: data
})
}
// 更新设备类型
export function updateEquipmentType(data) {
return request({
url: '/base/equipment-type/update',
method: 'put',
data: data
})
}
// 删除设备类型
export function deleteEquipmentType(id) {
return request({
url: '/base/equipment-type/delete?id=' + id,
method: 'delete'
})
}
// 获得设备类型
export function getEquipmentType(id) {
return request({
url: '/base/equipment-type/get?id=' + id,
method: 'get'
})
}
// 获得设备类型分页
export function getEquipmentTypePage(query) {
return request({
url: '/base/equipment-type/page',
method: 'get',
params: query
})
}
// 导出设备类型 Excel
export function exportEquipmentTypeExcel(query) {
return request({
url: '/base/equipment-type/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,54 +0,0 @@
import request from '@/utils/request'
// 创建设备类型文件关联
export function createEquipmentTypeFile(data) {
return request({
url: '/base/equipment-type-file/create',
method: 'post',
data: data
})
}
// 更新设备类型文件关联
export function updateEquipmentTypeFile(data) {
return request({
url: '/base/equipment-type-file/update',
method: 'put',
data: data
})
}
// 删除设备类型文件关联
export function deleteEquipmentTypeFile(id) {
return request({
url: '/base/equipment-type-file/delete?id=' + id,
method: 'delete'
})
}
// 获得设备类型文件关联
export function getEquipmentTypeFile(id) {
return request({
url: '/base/equipment-type-file/get?id=' + id,
method: 'get'
})
}
// 获得设备类型文件关联分页
export function getEquipmentTypeFilePage(query) {
return request({
url: '/base/equipment-type-file/page',
method: 'get',
params: query
})
}
// 导出设备类型文件关联 Excel
export function exportEquipmentTypeFileExcel(query) {
return request({
url: '/base/equipment-type-file/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,279 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="编码" prop="code">
<el-input v-model="queryParams.code" placeholder="请输入编码" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="设备名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入设备名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="编码" align="center" prop="code" />
<el-table-column label="设备名称" align="center" prop="name" />
<el-table-column label="英文名称" align="center" prop="enName" />
<el-table-column label="缩写" align="center" prop="abbr" />
<el-table-column label="设备类型,关联设备类型表" align="center" prop="equipmentTypeId" />
<el-table-column label="分组id (关联 base_equipment_GROUP" align="center" prop="groupId" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="编码" prop="code">
<el-input v-model="form.code" placeholder="请输入编码" />
</el-form-item>
<el-form-item label="设备名称" prop="name">
<el-input v-model="form.name" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="英文名称" prop="enName">
<el-input v-model="form.enName" placeholder="请输入英文名称" />
</el-form-item>
<el-form-item label="缩写" prop="abbr">
<el-input v-model="form.abbr" placeholder="请输入缩写" />
</el-form-item>
<el-form-item label="进厂日期" prop="enterTime">
<el-date-picker clearable v-model="form.enterTime" type="date" value-format="timestamp" placeholder="选择进厂日期" />
</el-form-item>
<el-form-item label="生产日期" prop="productionTime">
<el-date-picker clearable v-model="form.productionTime" type="date" value-format="timestamp" placeholder="选择生产日期" />
</el-form-item>
<el-form-item label="设备类型,关联设备类型表" prop="equipmentTypeId">
<el-select v-model="form.equipmentTypeId" placeholder="请选择设备类型,关联设备类型表">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="分组id (关联 base_equipment_GROUP" prop="groupId">
<el-select v-model="form.groupId" placeholder="请选择分组id (关联 base_equipment_GROUP">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="每小时生产数量" prop="tvalue">
<el-input v-model="form.tvalue" placeholder="请输入每小时生产数量" />
</el-form-item>
<el-form-item label="单件加工时间 s/件" prop="processingTime">
<el-input v-model="form.processingTime" placeholder="请输入单件加工时间 s/件" />
</el-form-item>
<el-form-item label="制造商" prop="manufacturer">
<el-input v-model="form.manufacturer" placeholder="请输入制造商" />
</el-form-item>
<el-form-item label="规格" prop="spec">
<el-input v-model="form.spec" placeholder="请输入规格" />
</el-form-item>
<el-form-item label="功能描述">
<editor v-model="form.description" :min-height="192"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipment, updateEquipment, deleteEquipment, getEquipment, getEquipmentPage, exportEquipmentExcel } from "@/api/base/equipment";
import Editor from '@/components/Editor';
export default {
name: "Equipment",
components: {
Editor
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
code: null,
name: null,
createTime: [],
},
//
form: {},
//
rules: {
code: [{ required: true, message: "编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "设备名称不能为空", trigger: "blur" }],
groupId: [{ required: true, message: "分组id (关联 base_equipment_GROUP不能为空", trigger: "change" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
code: undefined,
name: undefined,
enName: undefined,
abbr: undefined,
enterTime: undefined,
productionTime: undefined,
equipmentTypeId: undefined,
groupId: undefined,
tvalue: undefined,
processingTime: undefined,
manufacturer: undefined,
spec: undefined,
description: undefined,
remark: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipment(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipment(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipment(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除设备编号为"' + id + '"的数据项?').then(function() {
return deleteEquipment(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有设备数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentExcel(params);
}).then(response => {
this.$download.excel(response, '设备.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,214 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="queryParams.equipmentId" placeholder="请输入设备id" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-attr:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-attr:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="设备id" align="center" prop="equipmentId" />
<el-table-column label="属性名称" align="center" prop="name" />
<el-table-column label="属性值" align="center" prop="value" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-attr:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-attr:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="form.equipmentId" placeholder="请输入设备id" />
</el-form-item>
<el-form-item label="属性名称" prop="name">
<el-input v-model="form.name" placeholder="请输入属性名称" />
</el-form-item>
<el-form-item label="属性值" prop="value">
<el-input v-model="form.value" placeholder="请输入属性值" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentAttr, updateEquipmentAttr, deleteEquipmentAttr, getEquipmentAttr, getEquipmentAttrPage, exportEquipmentAttrExcel } from "@/api/base/equipmentAttr";
export default {
name: "EquipmentAttr",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentId: null,
},
//
form: {},
//
rules: {
equipmentId: [{ required: true, message: "设备id不能为空", trigger: "blur" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentAttrPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
equipmentId: undefined,
name: undefined,
value: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备属性";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentAttr(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备属性";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentAttr(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentAttr(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除设备属性编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentAttr(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有设备属性数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentAttrExcel(params);
}).then(response => {
this.$download.excel(response, '设备属性.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,253 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="工段ID" prop="workshopSectionId">
<el-input v-model="queryParams.workshopSectionId" placeholder="请输入工段ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="设备ID" prop="equipmentId">
<el-input v-model="queryParams.equipmentId" placeholder="请输入设备ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-bind-section:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-bind-section:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="工段ID" align="center" prop="workshopSectionId" />
<el-table-column label="设备ID" align="center" prop="equipmentId" />
<el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="产线数据类型 0.无类型 1.进口计数 2.出口计数" align="center" prop="lineDataType">
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.EQU_DATA_TYPE" :value="scope.row.lineDataType" />
</template>
</el-table-column>
<el-table-column label="工段数据类型 0.无类型 1.进口计数 2.出口计数" align="center" prop="sectionDataType">
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.EQU_DATA_TYPE" :value="scope.row.sectionDataType" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="版本号" align="center" prop="version" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-bind-section:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-bind-section:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="工段ID" prop="workshopSectionId">
<el-input v-model="form.workshopSectionId" placeholder="请输入工段ID" />
</el-form-item>
<el-form-item label="设备ID" prop="equipmentId">
<el-input v-model="form.equipmentId" placeholder="请输入设备ID" />
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model="form.sort" placeholder="请输入排序" />
</el-form-item>
<el-form-item label="产线数据类型 0.无类型 1.进口计数 2.出口计数" prop="lineDataType">
<el-select v-model="form.lineDataType" placeholder="请选择产线数据类型 0.无类型 1.进口计数 2.出口计数">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.EQU_DATA_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="工段数据类型 0.无类型 1.进口计数 2.出口计数" prop="sectionDataType">
<el-select v-model="form.sectionDataType" placeholder="请选择工段数据类型 0.无类型 1.进口计数 2.出口计数">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.EQU_DATA_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="form.version" placeholder="请输入版本号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentBindSection, updateEquipmentBindSection, deleteEquipmentBindSection, getEquipmentBindSection, getEquipmentBindSectionPage, exportEquipmentBindSectionExcel } from "@/api/base/equipmentBindSection";
export default {
name: "EquipmentBindSection",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
workshopSectionId: null,
equipmentId: null,
},
//
form: {},
//
rules: {
workshopSectionId: [{ required: true, message: "工段ID不能为空", trigger: "blur" }],
equipmentId: [{ required: true, message: "设备ID不能为空", trigger: "blur" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentBindSectionPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
workshopSectionId: undefined,
equipmentId: undefined,
sort: undefined,
lineDataType: undefined,
sectionDataType: undefined,
remark: undefined,
version: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加工段设备绑定";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentBindSection(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改工段设备绑定";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentBindSection(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentBindSection(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除工段设备绑定编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentBindSection(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有工段设备绑定数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentBindSectionExcel(params);
}).then(response => {
this.$download.excel(response, '工段设备绑定.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,225 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备ID" prop="equipmentId">
<el-input v-model="queryParams.equipmentId" placeholder="请输入设备ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-file:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-file:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="设备ID" align="center" prop="equipmentId" />
<el-table-column label="文件类型 1.图片 2.设备资料" align="center" prop="fileType">
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.EQU_FILE_TYPE" :value="scope.row.fileType" />
</template>
</el-table-column>
<el-table-column label="原始文件名" align="center" prop="fileName" />
<el-table-column label="文件url" align="center" prop="fileUrl" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-file:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-file:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备ID" prop="equipmentId">
<el-input v-model="form.equipmentId" placeholder="请输入设备ID" />
</el-form-item>
<el-form-item label="文件类型 1.图片 2.设备资料" prop="fileType">
<el-select v-model="form.fileType" placeholder="请选择文件类型 1.图片 2.设备资料">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.EQU_FILE_TYPE)"
:key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="原始文件名" prop="fileName">
<el-input v-model="form.fileName" placeholder="请输入原始文件名" />
</el-form-item>
<el-form-item label="文件url" prop="fileUrl">
<el-input v-model="form.fileUrl" placeholder="请输入文件url" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentFile, updateEquipmentFile, deleteEquipmentFile, getEquipmentFile, getEquipmentFilePage, exportEquipmentFileExcel } from "@/api/base/equipmentFile";
export default {
name: "EquipmentFile",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentId: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentFilePage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
equipmentId: undefined,
fileType: undefined,
fileName: undefined,
fileUrl: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备文件对应";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentFile(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备文件对应";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentFile(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentFile(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除设备文件对应编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentFile(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有设备文件对应数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentFileExcel(params);
}).then(response => {
this.$download.excel(response, '设备文件对应.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,217 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="分组编码" prop="code">
<el-input v-model="queryParams.code" placeholder="请输入分组编码" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="分组名字" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入分组名字" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-group:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-group:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="分组编码" align="center" prop="code" />
<el-table-column label="分组名字" align="center" prop="name" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-group:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-group:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="分组编码" prop="code">
<el-input v-model="form.code" placeholder="请输入分组编码" />
</el-form-item>
<el-form-item label="分组名字" prop="name">
<el-input v-model="form.name" placeholder="请输入分组名字" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentGroup, updateEquipmentGroup, deleteEquipmentGroup, getEquipmentGroup, getEquipmentGroupPage, exportEquipmentGroupExcel } from "@/api/base/equipmentGroup";
export default {
name: "EquipmentGroup",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
code: null,
name: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentGroupPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
code: undefined,
name: undefined,
remark: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备分组(用于同类型不同厂家的设备区分)";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentGroup(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备分组(用于同类型不同厂家的设备区分)";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentGroup(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentGroup(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除设备分组(用于同类型不同厂家的设备区分)编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentGroup(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有设备分组(用于同类型不同厂家的设备区分)数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentGroupExcel(params);
}).then(response => {
this.$download.excel(response, '设备分组(用于同类型不同厂家的设备区分).xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,246 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备分组ID关联base_equipment_group" prop="equipmentGroupId">
<el-input v-model="queryParams.equipmentGroupId" placeholder="请输入设备分组ID关联base_equipment_group" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-group-alarm:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-group-alarm:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="设备分组ID关联base_equipment_group" align="center" prop="equipmentGroupId" />
<el-table-column label="编码" align="center" prop="code" />
<el-table-column label="报警类型:1.字符型2.布尔型" align="center" prop="type" />
<el-table-column label="报警级别 字典表关联label_value" align="center" prop="grade">
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.EQU_ALARM_LEVEL" :value="scope.row.grade" />
</template>
</el-table-column>
<el-table-column label="字符型用 对应到设备实际的报警编码 布尔型不用填写" align="center" prop="alarmCode" />
<el-table-column label="报警内容 该条报警具体的解释" align="center" prop="alarmContent" />
<el-table-column label="关联编码对应到plc_param_name的编码用于链接数采" align="center" prop="plcParamName" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-group-alarm:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-group-alarm:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备分组ID关联base_equipment_group" prop="equipmentGroupId">
<el-input v-model="form.equipmentGroupId" placeholder="请输入设备分组ID关联base_equipment_group" />
</el-form-item>
<el-form-item label="编码" prop="code">
<el-input v-model="form.code" placeholder="请输入编码" />
</el-form-item>
<el-form-item label="报警类型:1.字符型2.布尔型" prop="type">
<el-select v-model="form.type" placeholder="请选择报警类型:1.字符型2.布尔型">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="报警级别 字典表关联label_value" prop="grade">
<el-select v-model="form.grade" placeholder="请选择报警级别 字典表关联label_value">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.EQU_ALARM_LEVEL)"
:key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="字符型用 对应到设备实际的报警编码 布尔型不用填写" prop="alarmCode">
<el-input v-model="form.alarmCode" placeholder="请输入字符型用 对应到设备实际的报警编码 布尔型不用填写" />
</el-form-item>
<el-form-item label="报警内容 该条报警具体的解释" prop="alarmContent">
<el-input v-model="form.alarmContent" placeholder="请输入报警内容 该条报警具体的解释" />
</el-form-item>
<el-form-item label="关联编码对应到plc_param_name的编码用于链接数采" prop="plcParamName">
<el-input v-model="form.plcParamName" placeholder="请输入关联编码对应到plc_param_name的编码用于链接数采" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentGroupAlarm, updateEquipmentGroupAlarm, deleteEquipmentGroupAlarm, getEquipmentGroupAlarm, getEquipmentGroupAlarmPage, exportEquipmentGroupAlarmExcel } from "@/api/base/equipmentGroupAlarm";
export default {
name: "EquipmentGroupAlarm",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentGroupId: null,
},
//
form: {},
//
rules: {
equipmentGroupId: [{ required: true, message: "设备分组ID关联base_equipment_group不能为空", trigger: "blur" }],
type: [{ required: true, message: "报警类型:1.字符型2.布尔型不能为空", trigger: "change" }],
alarmContent: [{ required: true, message: "报警内容 该条报警具体的解释不能为空", trigger: "blur" }],
plcParamName: [{ required: true, message: "关联编码对应到plc_param_name的编码用于链接数采不能为空", trigger: "blur" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentGroupAlarmPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
equipmentGroupId: undefined,
code: undefined,
type: undefined,
grade: undefined,
alarmCode: undefined,
alarmContent: undefined,
plcParamName: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备分组报警明细";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentGroupAlarm(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备分组报警明细";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentGroupAlarm(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentGroupAlarm(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除设备分组报警明细编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentGroupAlarm(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有设备分组报警明细数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentGroupAlarmExcel(params);
}).then(response => {
this.$download.excel(response, '设备分组报警明细.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,233 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="实时关联表实际名称" prop="plcTableName">
<el-input v-model="queryParams.plcTableName" placeholder="请输入实时关联表实际名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="标识名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入标识名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-plc:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-plc:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="实时关联表实际名称" align="center" prop="plcTableName" />
<el-table-column label="关联表编码" align="center" prop="code" />
<el-table-column label="标识名称" align="center" prop="name" />
<el-table-column label="英文标识名称" align="center" prop="enName" />
<el-table-column label="描述" align="center" prop="description" />
<el-table-column label="是否采集 0 代表不采集, 1 代表采集" align="center" prop="collection" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-plc:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-plc:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="实时关联表实际名称" prop="plcTableName">
<el-input v-model="form.plcTableName" placeholder="请输入实时关联表实际名称" />
</el-form-item>
<el-form-item label="关联表编码" prop="code">
<el-input v-model="form.code" placeholder="请输入关联表编码" />
</el-form-item>
<el-form-item label="标识名称" prop="name">
<el-input v-model="form.name" placeholder="请输入标识名称" />
</el-form-item>
<el-form-item label="英文标识名称" prop="enName">
<el-input v-model="form.enName" placeholder="请输入英文标识名称" />
</el-form-item>
<el-form-item label="描述" prop="description">
<el-input v-model="form.description" placeholder="请输入描述" />
</el-form-item>
<el-form-item label="是否采集 0 代表不采集, 1 代表采集" prop="collection">
<el-input v-model="form.collection" placeholder="请输入是否采集 0 代表不采集, 1 代表采集" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentPlc, updateEquipmentPlc, deleteEquipmentPlc, getEquipmentPlc, getEquipmentPlcPage, exportEquipmentPlcExcel } from "@/api/base/equipmentPlc";
export default {
name: "EquipmentPlc",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
plcTableName: null,
name: null,
},
//
form: {},
//
rules: {
plcTableName: [{ required: true, message: "实时关联表实际名称不能为空", trigger: "blur" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentPlcPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
plcTableName: undefined,
code: undefined,
name: undefined,
enName: undefined,
description: undefined,
collection: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加实时数据采集配置";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentPlc(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改实时数据采集配置";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentPlc(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentPlc(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除实时数据采集配置编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentPlc(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有实时数据采集配置数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentPlcExcel(params);
}).then(response => {
this.$download.excel(response, '实时数据采集配置.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,209 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="plc表iD" prop="plcId">
<el-input v-model="queryParams.plcId" placeholder="请输入plc表iD" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="设备表id" prop="equipmentId">
<el-input v-model="queryParams.equipmentId" placeholder="请输入设备表id" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-plc-connect:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-plc-connect:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="plc表iD" align="center" prop="plcId" />
<el-table-column label="设备表id" align="center" prop="equipmentId" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-plc-connect:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-plc-connect:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="plc表iD" prop="plcId">
<el-input v-model="form.plcId" placeholder="请输入plc表iD" />
</el-form-item>
<el-form-item label="设备表id" prop="equipmentId">
<el-input v-model="form.equipmentId" placeholder="请输入设备表id" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentPlcConnect, updateEquipmentPlcConnect, deleteEquipmentPlcConnect, getEquipmentPlcConnect, getEquipmentPlcConnectPage, exportEquipmentPlcConnectExcel } from "@/api/base/equipmentPlcConnect";
export default {
name: "EquipmentPlcConnect",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
plcId: null,
equipmentId: null,
},
//
form: {},
//
rules: {
plcId: [{ required: true, message: "plc表iD不能为空", trigger: "blur" }],
equipmentId: [{ required: true, message: "设备表id不能为空", trigger: "blur" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentPlcConnectPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
plcId: undefined,
equipmentId: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备与实时采集关系表(一对多)";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentPlcConnect(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备与实时采集关系表(一对多)";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentPlcConnect(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentPlcConnect(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除设备与实时采集关系表(一对多)编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentPlcConnect(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有设备与实时采集关系表(一对多)数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentPlcConnectExcel(params);
}).then(response => {
this.$download.excel(response, '设备与实时采集关系表(一对多).xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,255 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="实时数采表id" prop="connectId">
<el-input v-model="queryParams.connectId" placeholder="请输入实时数采表id" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-plc-param:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-plc-param:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="实时数采表id" align="center" prop="connectId" />
<el-table-column label="plc实际的列名参数列名" align="center" prop="plcParamName" />
<el-table-column label="参数名称" align="center" prop="name" />
<el-table-column label="单位 关联数据字典表label_value" align="center" prop="unit">
<template v-slot="scope">
<dict-tag :type="DICT_TYPE.UNIT_DICT" :value="scope.row.unit" />
</template>
</el-table-column>
<el-table-column label="最小值 数值型可用" align="center" prop="minValue" />
<el-table-column label="最大值 数值型可用" align="center" prop="maxValue" />
<el-table-column label="参数设定标准值" align="center" prop="defaultValue" />
<el-table-column label="0 代表不采集, 1 代表采集" align="center" prop="collection" />
<el-table-column label="描述" align="center" prop="description" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-plc-param:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-plc-param:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="实时数采表id" prop="connectId">
<el-input v-model="form.connectId" placeholder="请输入实时数采表id" />
</el-form-item>
<el-form-item label="plc实际的列名参数列名" prop="plcParamName">
<el-input v-model="form.plcParamName" placeholder="请输入plc实际的列名参数列名" />
</el-form-item>
<el-form-item label="参数名称" prop="name">
<el-input v-model="form.name" placeholder="请输入参数名称" />
</el-form-item>
<el-form-item label="单位 关联数据字典表label_value" prop="unit">
<el-select v-model="form.unit" placeholder="请选择单位 关联数据字典表label_value">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.UNIT_DICT)"
:key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="最小值 数值型可用" prop="minValue">
<el-input v-model="form.minValue" placeholder="请输入最小值 数值型可用" />
</el-form-item>
<el-form-item label="最大值 数值型可用" prop="maxValue">
<el-input v-model="form.maxValue" placeholder="请输入最大值 数值型可用" />
</el-form-item>
<el-form-item label="参数设定标准值" prop="defaultValue">
<el-input v-model="form.defaultValue" placeholder="请输入参数设定标准值" />
</el-form-item>
<el-form-item label="0 代表不采集, 1 代表采集" prop="collection">
<el-input v-model="form.collection" placeholder="请输入0 代表不采集, 1 代表采集" />
</el-form-item>
<el-form-item label="描述">
<editor v-model="form.description" :min-height="192"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentPlcParam, updateEquipmentPlcParam, deleteEquipmentPlcParam, getEquipmentPlcParam, getEquipmentPlcParamPage, exportEquipmentPlcParamExcel } from "@/api/base/equipmentPlcParam";
import Editor from '@/components/Editor';
export default {
name: "EquipmentPlcParam",
components: {
Editor
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
connectId: null,
},
//
form: {},
//
rules: {
connectId: [{ required: true, message: "实时数采表id不能为空", trigger: "blur" }],
plcParamName: [{ required: true, message: "plc实际的列名参数列名不能为空", trigger: "blur" }],
name: [{ required: true, message: "参数名称不能为空", trigger: "blur" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentPlcParamPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
connectId: undefined,
plcParamName: undefined,
name: undefined,
unit: undefined,
minValue: undefined,
maxValue: undefined,
defaultValue: undefined,
collection: undefined,
description: undefined,
remark: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备数采详情";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentPlcParam(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备数采详情";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentPlcParam(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentPlcParam(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除设备数采详情编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentPlcParam(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有设备数采详情数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentPlcParamExcel(params);
}).then(response => {
this.$download.excel(response, '设备数采详情.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,277 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="queryParams.equipmentId" placeholder="请输入设备id" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="设备名称" prop="equipmentName">
<el-input v-model="queryParams.equipmentName" placeholder="请输入设备名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="进入设备的数量" prop="inQuantity">
<el-input v-model="queryParams.inQuantity" placeholder="请输入进入设备的数量" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="离开设备的数量若plc只记录一个生产数量也写入该字段" prop="outQuantity">
<el-input v-model="queryParams.outQuantity" placeholder="请输入离开设备的数量若plc只记录一个生产数量也写入该字段" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="正常生产量" prop="okQuantity">
<el-input v-model="queryParams.okQuantity" placeholder="请输入正常生产量" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="设备上报的报废数量" prop="nokQuantity">
<el-input v-model="queryParams.nokQuantity" placeholder="请输入设备上报的报废数量" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="生产数量的记录时间" prop="recordTime">
<el-date-picker v-model="queryParams.recordTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="queryParams.version" placeholder="请输入版本号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-quantity-log:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-quantity-log:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="设备id" align="center" prop="equipmentId" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="进入设备的数量" align="center" prop="inQuantity" />
<el-table-column label="离开设备的数量若plc只记录一个生产数量也写入该字段" align="center" prop="outQuantity" />
<el-table-column label="正常生产量" align="center" prop="okQuantity" />
<el-table-column label="设备上报的报废数量" align="center" prop="nokQuantity" />
<el-table-column label="生产数量的记录时间" align="center" prop="recordTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.recordTime) }}</span>
</template>
</el-table-column>
<el-table-column label="版本号" align="center" prop="version" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-quantity-log:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-quantity-log:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="form.equipmentId" placeholder="请输入设备id" />
</el-form-item>
<el-form-item label="设备名称" prop="equipmentName">
<el-input v-model="form.equipmentName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="进入设备的数量" prop="inQuantity">
<el-input v-model="form.inQuantity" placeholder="请输入进入设备的数量" />
</el-form-item>
<el-form-item label="离开设备的数量若plc只记录一个生产数量也写入该字段" prop="outQuantity">
<el-input v-model="form.outQuantity" placeholder="请输入离开设备的数量若plc只记录一个生产数量也写入该字段" />
</el-form-item>
<el-form-item label="正常生产量" prop="okQuantity">
<el-input v-model="form.okQuantity" placeholder="请输入正常生产量" />
</el-form-item>
<el-form-item label="设备上报的报废数量" prop="nokQuantity">
<el-input v-model="form.nokQuantity" placeholder="请输入设备上报的报废数量" />
</el-form-item>
<el-form-item label="生产数量的记录时间" prop="recordTime">
<el-date-picker clearable v-model="form.recordTime" type="date" value-format="timestamp" placeholder="选择生产数量的记录时间" />
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="form.version" placeholder="请输入版本号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentQuantityLog, updateEquipmentQuantityLog, deleteEquipmentQuantityLog, getEquipmentQuantityLog, getEquipmentQuantityLogPage, exportEquipmentQuantityLogExcel } from "@/api/base/equipmentQuantityLog";
export default {
name: "EquipmentQuantityLog",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentId: null,
equipmentName: null,
inQuantity: null,
outQuantity: null,
okQuantity: null,
nokQuantity: null,
recordTime: [],
version: null,
createTime: [],
},
//
form: {},
//
rules: {
equipmentName: [{ required: true, message: "设备名称不能为空", trigger: "blur" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentQuantityLogPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
equipmentId: undefined,
equipmentName: undefined,
inQuantity: undefined,
outQuantity: undefined,
okQuantity: undefined,
nokQuantity: undefined,
recordTime: undefined,
version: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加后端用 设备生产数量统计表(按一定时间段写入)";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentQuantityLog(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改后端用 设备生产数量统计表(按一定时间段写入)";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentQuantityLog(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentQuantityLog(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除后端用 设备生产数量统计表(按一定时间段写入)编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentQuantityLog(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有后端用 设备生产数量统计表(按一定时间段写入)数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentQuantityLogExcel(params);
}).then(response => {
this.$download.excel(response, '后端用 设备生产数量统计表(按一定时间段写入).xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,276 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="queryParams.equipmentId" placeholder="请输入设备id" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="设备名称" prop="equipmentName">
<el-input v-model="queryParams.equipmentName" placeholder="请输入设备名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="进入设备的基板数量" prop="inQuantity">
<el-input v-model="queryParams.inQuantity" placeholder="请输入进入设备的基板数量" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="离开设备的基板数量若plc只记录一个生产数量也写入该字段" prop="outQuantity">
<el-input v-model="queryParams.outQuantity" placeholder="请输入离开设备的基板数量若plc只记录一个生产数量也写入该字段" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="正常生产量" prop="okQuantity">
<el-input v-model="queryParams.okQuantity" placeholder="请输入正常生产量" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="设备上报的报废数量" prop="nokQuantity">
<el-input v-model="queryParams.nokQuantity" placeholder="请输入设备上报的报废数量" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="记录时间" prop="recordTime">
<el-date-picker v-model="queryParams.recordTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="queryParams.version" placeholder="请输入版本号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-quantity-realtime:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-quantity-realtime:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="设备id" align="center" prop="equipmentId" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="进入设备的基板数量" align="center" prop="inQuantity" />
<el-table-column label="离开设备的基板数量若plc只记录一个生产数量也写入该字段" align="center" prop="outQuantity" />
<el-table-column label="正常生产量" align="center" prop="okQuantity" />
<el-table-column label="设备上报的报废数量" align="center" prop="nokQuantity" />
<el-table-column label="记录时间" align="center" prop="recordTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.recordTime) }}</span>
</template>
</el-table-column>
<el-table-column label="版本号" align="center" prop="version" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-quantity-realtime:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-quantity-realtime:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="form.equipmentId" placeholder="请输入设备id" />
</el-form-item>
<el-form-item label="设备名称" prop="equipmentName">
<el-input v-model="form.equipmentName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="进入设备的基板数量" prop="inQuantity">
<el-input v-model="form.inQuantity" placeholder="请输入进入设备的基板数量" />
</el-form-item>
<el-form-item label="离开设备的基板数量若plc只记录一个生产数量也写入该字段" prop="outQuantity">
<el-input v-model="form.outQuantity" placeholder="请输入离开设备的基板数量若plc只记录一个生产数量也写入该字段" />
</el-form-item>
<el-form-item label="正常生产量" prop="okQuantity">
<el-input v-model="form.okQuantity" placeholder="请输入正常生产量" />
</el-form-item>
<el-form-item label="设备上报的报废数量" prop="nokQuantity">
<el-input v-model="form.nokQuantity" placeholder="请输入设备上报的报废数量" />
</el-form-item>
<el-form-item label="记录时间" prop="recordTime">
<el-date-picker clearable v-model="form.recordTime" type="date" value-format="timestamp" placeholder="选择记录时间" />
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="form.version" placeholder="请输入版本号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentQuantityRealtime, updateEquipmentQuantityRealtime, deleteEquipmentQuantityRealtime, getEquipmentQuantityRealtime, getEquipmentQuantityRealtimePage, exportEquipmentQuantityRealtimeExcel } from "@/api/base/equipmentQuantityRealtime";
export default {
name: "EquipmentQuantityRealtime",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentId: null,
equipmentName: null,
inQuantity: null,
outQuantity: null,
okQuantity: null,
nokQuantity: null,
recordTime: [],
version: null,
createTime: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentQuantityRealtimePage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
equipmentId: undefined,
equipmentName: undefined,
inQuantity: undefined,
outQuantity: undefined,
okQuantity: undefined,
nokQuantity: undefined,
recordTime: undefined,
version: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加后端用 设备生产数量实时";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentQuantityRealtime(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改后端用 设备生产数量实时";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentQuantityRealtime(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentQuantityRealtime(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除后端用 设备生产数量实时编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentQuantityRealtime(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有后端用 设备生产数量实时数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentQuantityRealtimeExcel(params);
}).then(response => {
this.$download.excel(response, '后端用 设备生产数量实时.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,289 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="queryParams.equipmentId" placeholder="请输入设备id" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="设备名称" prop="equipmentName">
<el-input v-model="queryParams.equipmentName" placeholder="请输入设备名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="plc id" prop="plcId">
<el-input v-model="queryParams.plcId" placeholder="请输入plc id" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="plc" prop="plc">
<el-input v-model="queryParams.plc" placeholder="请输入plc" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="状态0正常 1计划停机 2故障" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态0正常 1计划停机 2故障" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="记录时间" prop="recordTime">
<el-date-picker v-model="queryParams.recordTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item label="持续时间(分钟),状态变动时记录并更新" prop="duration">
<el-input v-model="queryParams.duration" placeholder="请输入持续时间(分钟),状态变动时记录并更新" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="queryParams.version" placeholder="请输入版本号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-status-log:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-status-log:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="设备id" align="center" prop="equipmentId" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="plc id" align="center" prop="plcId" />
<el-table-column label="plc" align="center" prop="plc" />
<el-table-column label="状态0正常 1计划停机 2故障" align="center" prop="status" />
<el-table-column label="记录时间" align="center" prop="recordTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.recordTime) }}</span>
</template>
</el-table-column>
<el-table-column label="持续时间(分钟),状态变动时记录并更新" align="center" prop="duration" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="版本号" align="center" prop="version" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-status-log:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-status-log:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="form.equipmentId" placeholder="请输入设备id" />
</el-form-item>
<el-form-item label="设备名称" prop="equipmentName">
<el-input v-model="form.equipmentName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="plc id" prop="plcId">
<el-input v-model="form.plcId" placeholder="请输入plc id" />
</el-form-item>
<el-form-item label="plc" prop="plc">
<el-input v-model="form.plc" placeholder="请输入plc" />
</el-form-item>
<el-form-item label="状态0正常 1计划停机 2故障" prop="status">
<el-radio-group v-model="form.status">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="记录时间" prop="recordTime">
<el-date-picker clearable v-model="form.recordTime" type="date" value-format="timestamp" placeholder="选择记录时间" />
</el-form-item>
<el-form-item label="持续时间(分钟),状态变动时记录并更新" prop="duration">
<el-input v-model="form.duration" placeholder="请输入持续时间(分钟),状态变动时记录并更新" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="form.version" placeholder="请输入版本号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentStatusLog, updateEquipmentStatusLog, deleteEquipmentStatusLog, getEquipmentStatusLog, getEquipmentStatusLogPage, exportEquipmentStatusLogExcel } from "@/api/base/equipmentStatusLog";
export default {
name: "EquipmentStatusLog",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentId: null,
equipmentName: null,
plcId: null,
plc: null,
status: null,
recordTime: [],
duration: null,
remark: null,
version: null,
createTime: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentStatusLogPage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
equipmentId: undefined,
equipmentName: undefined,
plcId: undefined,
plc: undefined,
status: undefined,
recordTime: undefined,
duration: undefined,
remark: undefined,
version: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加后端用 设备工作状态";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentStatusLog(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改后端用 设备工作状态";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentStatusLog(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentStatusLog(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除后端用 设备工作状态编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentStatusLog(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有后端用 设备工作状态数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentStatusLogExcel(params);
}).then(response => {
this.$download.excel(response, '后端用 设备工作状态.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,296 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="queryParams.equipmentId" placeholder="请输入设备id" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="设备名称" prop="equipmentName">
<el-input v-model="queryParams.equipmentName" placeholder="请输入设备名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="状态0正常 1计划停机 2故障" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态0正常 1计划停机 2故障" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="是否运行中" prop="run">
<el-select v-model="queryParams.run" placeholder="请选择是否运行中" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="是否发生运行错误" prop="error">
<el-select v-model="queryParams.error" placeholder="请选择是否发生运行错误" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="记录时间" prop="recordTime">
<el-date-picker v-model="queryParams.recordTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="queryParams.version" placeholder="请输入版本号" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-status-realtime:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-status-realtime:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="设备id" align="center" prop="equipmentId" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="状态0正常 1计划停机 2故障" align="center" prop="status" />
<el-table-column label="是否运行中" align="center" prop="run" />
<el-table-column label="是否发生运行错误" align="center" prop="error" />
<el-table-column label="描述" align="center" prop="description" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="记录时间" align="center" prop="recordTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.recordTime) }}</span>
</template>
</el-table-column>
<el-table-column label="版本号" align="center" prop="version" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-status-realtime:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-status-realtime:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备id" prop="equipmentId">
<el-input v-model="form.equipmentId" placeholder="请输入设备id" />
</el-form-item>
<el-form-item label="设备名称" prop="equipmentName">
<el-input v-model="form.equipmentName" placeholder="请输入设备名称" />
</el-form-item>
<el-form-item label="状态0正常 1计划停机 2故障" prop="status">
<el-radio-group v-model="form.status">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否运行中" prop="run">
<el-radio-group v-model="form.run">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否发生运行错误" prop="error">
<el-radio-group v-model="form.error">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="描述">
<editor v-model="form.description" :min-height="192"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="记录时间" prop="recordTime">
<el-date-picker clearable v-model="form.recordTime" type="date" value-format="timestamp" placeholder="选择记录时间" />
</el-form-item>
<el-form-item label="版本号" prop="version">
<el-input v-model="form.version" placeholder="请输入版本号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentStatusRealtime, updateEquipmentStatusRealtime, deleteEquipmentStatusRealtime, getEquipmentStatusRealtime, getEquipmentStatusRealtimePage, exportEquipmentStatusRealtimeExcel } from "@/api/base/equipmentStatusRealtime";
import Editor from '@/components/Editor';
export default {
name: "EquipmentStatusRealtime",
components: {
Editor
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentId: null,
equipmentName: null,
status: null,
run: null,
error: null,
description: null,
remark: null,
recordTime: [],
version: null,
createTime: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentStatusRealtimePage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
equipmentId: undefined,
equipmentName: undefined,
status: undefined,
run: undefined,
error: undefined,
description: undefined,
remark: undefined,
recordTime: undefined,
version: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加后端用 设备状态实时";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentStatusRealtime(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改后端用 设备状态实时";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentStatusRealtime(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentStatusRealtime(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除后端用 设备状态实时编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentStatusRealtime(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有后端用 设备状态实时数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentStatusRealtimeExcel(params);
}).then(response => {
this.$download.excel(response, '后端用 设备状态实时.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,219 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-type:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-type:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="编码" align="center" prop="code" />
<el-table-column label="名称" align="center" prop="name" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-type:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-type:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="编码" prop="code">
<el-input v-model="form.code" placeholder="请输入编码" />
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="父类ID最上层为0" prop="parentId">
<el-input v-model="form.parentId" placeholder="请输入父类ID最上层为0" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentType, updateEquipmentType, deleteEquipmentType, getEquipmentType, getEquipmentTypePage, exportEquipmentTypeExcel } from "@/api/base/equipmentType";
export default {
name: "EquipmentType",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
name: null,
},
//
form: {},
//
rules: {
code: [{ required: true, message: "编码不能为空", trigger: "blur" }],
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentTypePage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
code: undefined,
name: undefined,
parentId: undefined,
remark: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备类型";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentType(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备类型";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentType(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentType(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除设备类型编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentType(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有设备类型数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentTypeExcel(params);
}).then(response => {
this.$download.excel(response, '设备类型.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -1,229 +0,0 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备类型ID" prop="equipmentTypeId">
<el-input v-model="queryParams.equipmentTypeId" placeholder="请输入设备类型ID" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="原始名称" prop="fileName">
<el-input v-model="queryParams.fileName" placeholder="请输入原始名称" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="下载地址" prop="fileUrl">
<el-input v-model="queryParams.fileUrl" placeholder="请输入下载地址" clearable @keyup.enter.native="handleQuery"/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['base:equipment-type-file:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['base:equipment-type-file:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="设备类型ID" align="center" prop="equipmentTypeId" />
<el-table-column label="原始名称" align="center" prop="fileName" />
<el-table-column label="下载地址" align="center" prop="fileUrl" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template v-slot="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['base:equipment-type-file:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['base:equipment-type-file:delete']">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getList"/>
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="设备类型ID" prop="equipmentTypeId">
<el-input v-model="form.equipmentTypeId" placeholder="请输入设备类型ID" />
</el-form-item>
<el-form-item label="原始名称" prop="fileName">
<el-input v-model="form.fileName" placeholder="请输入原始名称" />
</el-form-item>
<el-form-item label="下载地址" prop="fileUrl">
<el-input v-model="form.fileUrl" placeholder="请输入下载地址" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createEquipmentTypeFile, updateEquipmentTypeFile, deleteEquipmentTypeFile, getEquipmentTypeFile, getEquipmentTypeFilePage, exportEquipmentTypeFileExcel } from "@/api/base/equipmentTypeFile";
export default {
name: "EquipmentTypeFile",
components: {
},
data() {
return {
//
loading: true,
//
exportLoading: false,
//
showSearch: true,
//
total: 0,
//
list: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNo: 1,
pageSize: 10,
equipmentTypeId: null,
fileName: null,
fileUrl: null,
createTime: [],
},
//
form: {},
//
rules: {
equipmentTypeId: [{ required: true, message: "设备类型ID不能为空", trigger: "blur" }],
fileName: [{ required: true, message: "原始名称不能为空", trigger: "blur" }],
fileUrl: [{ required: true, message: "下载地址不能为空", trigger: "blur" }],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
//
getEquipmentTypeFilePage(this.queryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
equipmentTypeId: undefined,
fileName: undefined,
fileUrl: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备类型文件关联";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getEquipmentTypeFile(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备类型文件关联";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
updateEquipmentTypeFile(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
//
createEquipmentTypeFile(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除设备类型文件关联编号为"' + id + '"的数据项?').then(function() {
return deleteEquipmentTypeFile(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
//
let params = {...this.queryParams};
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有设备类型文件关联数据项?').then(() => {
this.exportLoading = true;
return exportEquipmentTypeFileExcel(params);
}).then(response => {
this.$download.excel(response, '设备类型文件关联.xls');
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

View File

@ -6,204 +6,24 @@
-->
<template>
<div class="app-container">
<SearchBar
:formConfigs="[{ label: '近24小时检测记录', type: 'title' }]"
ref="search-bar" />
<pre><code v-html="jsondemo"></code></pre>
<base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emit-fun="handleEmitFun"></base-table>
</div>
<div class="app-container">
<h1>Recent 24 hours</h1>
</div>
</template>
<script>
import hljs from 'highlight.js/lib/highlight';
import json from 'highlight.js/lib/languages/json';
import 'highlight.js/styles/github-gist.css';
hljs.registerLanguage('json', json);
export default {
name: 'QualityRecentHours',
components: {},
props: {},
data() {
return {
queryParams: {
pageNo: 1,
pageSize: 10,
},
jsondemo: '',
list: [
{
inspectionContent: '检测内容1',
'2023-03-18T00:00:00-产线1': '产线1-asdf',
'2023-03-18T01:00:00-产线2': '产线2-kldf',
'2023-03-18T02:00:00-产线1': '产线1-vasdkj',
},
],
tableProps: [
{
prop: 'inspectionContent',
label: '检测内容',
align: 'center',
},
//
// mock
{
prop: '2023-03-18T00:00:00',
label: '2023-03-18T00:00:00',
align: 'center',
children: [
{
prop: '2023-03-18T00:00:00-产线1',
label: '产线1',
align: 'center',
},
{
prop: '2023-03-18T00:00:00-产线2',
label: '产线2',
align: 'center',
},
{
prop: '2023-03-18T00:00:00-产线3',
label: '产线3',
align: 'center',
},
{
prop: '2023-03-18T00:00:00-产线4',
label: '产线4',
align: 'center',
},
{
prop: '2023-03-18T00:00:00-产线5',
label: '产线5',
align: 'center',
},
],
},
{
prop: '2023-03-18T01:00:00',
label: '2023-03-18T01:00:00',
align: 'center',
children: [
{
prop: '2023-03-18T01:00:00-产线1',
label: '产线1',
align: 'center',
},
{
prop: '2023-03-18T01:00:00-产线2',
label: '产线2',
align: 'center',
},
{
prop: '2023-03-18T01:00:00-产线3',
label: '产线3',
align: 'center',
},
],
},
{
prop: '2023-03-18T02:00:00',
label: '2023-03-18T02:00:00',
align: 'center',
children: [
{
prop: '2023-03-18T02:00:00-产线1',
label: '产线1',
align: 'center',
},
{
prop: '2023-03-18T02:00:00-产线2',
label: '产线2',
align: 'center',
},
],
},
],
};
},
computed: {},
mounted() {
this.getList();
},
methods: {
async getList() {
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;
},
filterNameData(nameData) {
const ndSet = new Set();
nameData.forEach((nd) => {
ndSet.add(nd.name);
});
return Array.from(ndSet.values())
.sort()
.map((name) => ({
prop: name,
label: name,
}));
},
filterData(data) {
return data.map((item) => {
const { data: innerData } = item;
const keyValuePairs = {};
innerData.map((d) => {
keyValuePairs[d.dynamicName] = d.dynamicValue;
});
return {
inspectionContent: item.inspectionContent,
...keyValuePairs,
sumInput: item.sumInput,
};
});
},
handleEmitFun(payload) {
console.log('payload', payload);
},
},
};
name: "QualityRecentHours",
components: {},
props: {},
data() {
return {}
},
computed: {},
methods: {},
}
</script>
<style scoped lang="scss">
::-webkit-scrollbar {
display: none;
}
pre {
margin: 10px;
background: #f6f8faf6;
border: 1px solid #e1e4e8;
padding: 12px;
border-radius: 12px;
position: fixed;
// top: 15vh;
top: 10vh;
left: 0;
max-height: 80vh;
overflow-y: auto;
z-index: 100000;
box-shadow: 0 0 32px 12px #0001;
}
code {
font-family: 'IntelOne Mono', 'Ubuntu', 'Courier New', Courier, monospace;
}
</style>

View File

@ -1,176 +0,0 @@
{
"code": 0,
"data": {
"data": [
{
"data": [
{
"id": "测试222023-08-09T02:00",
"parentId": "测试22",
"dynamicName": "2023-08-09T02:00",
"dynamicValue": 1691517600000,
"children": [
{
"id": "1672847052717821953",
"parentId": "测试222023-08-09T02:00",
"dynamicName": "产线1",
"dynamicValue": 1
}
]
},
{
"id": "测试222023-08-09T08:00",
"parentId": "测试22",
"dynamicName": "2023-08-09T08:00",
"dynamicValue": 1691539200000,
"children": [
{
"id": "1672847052717821953",
"parentId": "测试222023-08-09T08:00",
"dynamicName": "产线1",
"dynamicValue": 1
}
]
},
{
"id": "测试222023-08-09T11:00",
"parentId": "测试22",
"dynamicName": "2023-08-09T11:00",
"dynamicValue": 1691550000000,
"children": [
{
"id": "1672847052717821953",
"parentId": "测试222023-08-09T11:00",
"dynamicName": "产线1",
"dynamicValue": 1
}
]
}
],
"inspectionDetContent": "测试22"
},
{
"data": [
{
"id": "测试112023-08-09T02:00",
"parentId": "测试11",
"dynamicName": "2023-08-09T02:00",
"dynamicValue": 1691517600000,
"children": [
{
"id": "1672847052717821954",
"parentId": "测试112023-08-09T02:00",
"dynamicName": "产线22",
"dynamicValue": 1
}
]
},
{
"id": "测试112023-08-09T08:00",
"parentId": "测试11",
"dynamicName": "2023-08-09T08:00",
"dynamicValue": 1691539200000,
"children": [
{
"id": "1672847052717821953",
"parentId": "测试112023-08-09T08:00",
"dynamicName": "产线1",
"dynamicValue": 1
}
]
},
{
"id": "测试112023-08-09T09:00",
"parentId": "测试11",
"dynamicName": "2023-08-09T09:00",
"dynamicValue": 1691542800000,
"children": [
{
"id": "1672847052717821954",
"parentId": "测试112023-08-09T09:00",
"dynamicName": "产线22",
"dynamicValue": 2
}
]
}
],
"inspectionDetContent": "测试11"
}
],
"nameData": [
{
"name": "2023-08-09T02:00",
"tree": 1,
"id": "测试222023-08-09T02:00",
"parentId": "测试22"
},
{
"name": "产线1",
"tree": 2,
"id": "1672847052717821953",
"parentId": "测试222023-08-09T02:00"
},
{
"name": "2023-08-09T08:00",
"tree": 1,
"id": "测试222023-08-09T08:00",
"parentId": "测试22"
},
{
"name": "产线1",
"tree": 2,
"id": "1672847052717821953",
"parentId": "测试222023-08-09T08:00"
},
{
"name": "2023-08-09T11:00",
"tree": 1,
"id": "测试222023-08-09T11:00",
"parentId": "测试22"
},
{
"name": "产线1",
"tree": 2,
"id": "1672847052717821953",
"parentId": "测试222023-08-09T11:00"
},
{
"name": "2023-08-09T02:00",
"tree": 1,
"id": "测试112023-08-09T02:00",
"parentId": "测试11"
},
{
"name": "产线22",
"tree": 2,
"id": "1672847052717821954",
"parentId": "测试112023-08-09T02:00"
},
{
"name": "2023-08-09T08:00",
"tree": 1,
"id": "测试112023-08-09T08:00",
"parentId": "测试11"
},
{
"name": "产线1",
"tree": 2,
"id": "1672847052717821953",
"parentId": "测试112023-08-09T08:00"
},
{
"name": "2023-08-09T09:00",
"tree": 1,
"id": "测试112023-08-09T09:00",
"parentId": "测试11"
},
{
"name": "产线22",
"tree": 2,
"id": "1672847052717821954",
"parentId": "测试112023-08-09T09:00"
}
]
},
"msg": ""
}

View File

@ -6,50 +6,26 @@
-->
<template>
<div class="cell">
<div class="title">
<span>
{{ title }}
</span>
</div>
<div class="content">
<slot />
</div>
</div>
<div id="detail-graph">
detail graph (echarts)
</div>
</template>
<script>
export default {
name: 'DetailGraph',
components: {},
props: {
title: {
type: String,
default: 'detail graph (echarts)',
},
},
};
name: "DetailGraph",
components: {},
props: {},
data() {
return {
configs: {}
}
},
computed: {},
methods: {},
}
</script>
<style scoped lang="scss">
.cell {
// background: #cfcfcf;
border: 1px solid #cfcfcf;
border-radius: 8px;
padding: 8px;
display: flex;
flex-direction: column;
}
.title > span {
display: inline-block;
padding: 4px 8px 4px 6px;
background: rgba(20, 145, 210, 0.155);
border-left: 4px solid rgba(20, 145, 210);
}
.content {
flex: 1;
// background-color: aquamarine;
}
</style>

View File

@ -1,150 +0,0 @@
<!--
filename: line.vue
author: liubin
date: 2023-08-07 16:14:11
description:
-->
<template>
<div ref="line-chart" class="line-chart"></div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'LineDataChart',
components: {},
props: {
xProps: {
type: Array,
default: () => [],
},
legend: {
type: Array,
default: () => [],
},
series: {
type: Array,
default: () => [],
},
},
data() {
return {
chart: null,
// inspectionContents: [
// '1',
// '2',
// '3',
// '4',
// '5',
// '6',
// '7',
// '8',
// '',
// '%',
// ],
// xProps: [
// '线1',
// '线2',
// '线3',
// '线4',
// '线5',
// '线6',
// '线7',
// '线8',
// '线9',
// ],
// series: [
// {
// name: 'a',
// type: 'line',
// data: [120, 132, 101, 134, 90, 230, 210, 120, 132],
// },
// {
// name: 'lkj',
// type: 'line',
// data: [220, 182, 191, 234, 290, 330, 310, 220, 182],
// },
// {
// name: '11',
// type: 'line',
// data: [150, 232, 201, 154, 190, 330, 410, 150, 232],
// },
// {
// name: '22',
// type: 'line',
// data: [320, 332, 301, 334, 390, 330, 320, 332, 301],
// },
// ],
};
},
computed: {
config() {
return {
// title: {
// text: '线',
// },
grid: {
top: '24%',
left: '3%',
right: '5%',
bottom: '5%',
containLabel: true,
},
tooltip: {
trigger: 'axis',
},
legend: {
data: this.legend,
top: '5%',
icon: 'circle',
},
// toolbox: {
// feature: {
// saveAsImage: {},
// },
// },
xAxis: {
type: 'category',
boundaryGap: false,
data: this.xProps,
},
yAxis: {
type: 'value',
},
series: this.series,
};
},
},
mounted() {
this.init();
},
watch: {
config(val) {
this.$nextTick(() => {
this.init();
});
},
},
methods: {
init() {
if (!this.chart) this.chart = echarts.init(this.$refs['line-chart']);
this.$nextTick(() => {
this.setOption();
});
},
setOption() {
this.chart.setOption(this.config);
},
},
};
</script>
<style scoped lang="scss">
.line-chart {
// background: #f3f3f3;
height: 100%;
}
</style>

View File

@ -1,185 +0,0 @@
<!--
filename: total.vue
author: liubin
date: 2023-08-07 15:04:31
description:
-->
<template>
<div class="total-graph" id="total-graph">
<div id="updata" class="updata"></div>
<div id="downdata" class="downdata"></div>
<div id="checktotal" class="checktotal"></div>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name: 'TotalGraph',
components: {},
props: {
summaryList: {
type: Array,
default: () => [],
},
},
data() {
return {
config: {},
updata: [],
downdata: [],
checktotal: [],
upChart: null,
downChart: null,
totalChart: null,
};
},
computed: {},
mounted() {
this.init();
},
methods: {
init() {
this.handleSummaryList();
this.initUpdata();
this.initDowndata();
this.initChecktotal();
},
handleSummaryList() {
this.summaryList.map((item) => {
this.updata.push({ name: item.lineName, value: item.sumUp });
this.downdata.push({ name: item.lineName, value: item.sumDown });
this.checktotal.push({ name: item.lineName, value: item.sumCheck });
});
},
initUpdata() {
if (!this.upChart)
this.upChart = echarts.init(document.getElementById('updata'));
this.upChart.setOption(
this.handleOption({
title: '上片总数',
name: '上片数据',
data: this.updata
})
);
},
initDowndata() {
if (!this.downChart)
this.downChart = echarts.init(document.getElementById('downdata'));
this.downChart.setOption(
this.handleOption({
title: '下片总数',
name: '下片数据',
data: this.downdata
})
);
},
initChecktotal() {
if (!this.totalChart)
this.totalChart = echarts.init(document.getElementById('checktotal'));
this.totalChart.setOption(
this.handleOption({
title: '检测总数',
name: '检测数据',
data: this.checktotal
})
);
},
handleOption({ title, name, data }) {
const defaultOption = {
title: {
text: title,
left: '42%',
top: 'center',
textAlign: 'right',
textStyle: {
fontSize: 14,
},
},
tooltip: {
trigger: 'item',
},
legend: {
top: 'center',
right: '10%',
orient: 'vertical',
itemWidth: 12,
itemHeight: 12,
icon: 'circle',
},
series: [
{
name: name,
type: 'pie',
radius: ['40%', '70%'],
center: ['35%', '50%'],
avoidLabelOverlap: true,
label: {
show: false,
position: 'center',
},
// emphasis: {
// label: {
// show: true,
// fontSize: 40,
// fontWeight: 'bold',
// },
// },
labelLine: {
show: false,
},
data: data ?? [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' },
],
},
],
};
return defaultOption;
},
},
};
</script>
<style scoped lang="scss">
#total-graph {
margin-top: 8px;
width: 100%;
// height: 400px;
// background: #ccc;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, 240px);
// row-gap: 20px;
}
.updata {
// width: 320px;
// justify-self: center;
// background: rgba($color: #f00, $alpha: 0.3);
}
.downdata {
// width: 240px;
// justify-self: center;
// background: rgba($color: #0f0, $alpha: 0.3);
}
.checktotal {
width: 320px;
justify-self: center;
// background: rgba($color: #00f, $alpha: 0.3);
grid-column: span 2;
}
</style>

View File

@ -9,7 +9,6 @@
<!-- 列表 -->
<base-table
:table-props="tableProps"
height="35vh"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"></base-table>
@ -41,27 +40,27 @@ export default {
},
tableProps: [
{
prop: 'lineName',
prop: 'pl',
label: '产线',
align: 'center',
},
{
prop: 'sumUp',
prop: 'upTotal',
label: '上片总数',
align: 'center',
},
{
prop: 'sumDown',
prop: 'downTotal',
label: '下片总数',
align: 'center',
},
{
prop: 'sumCheck',
prop: 'total',
label: '检测总数',
align: 'center',
},
{
prop: 'scrapRatio',
prop: 'ratio',
label: '比例(%)',
align: 'center',
},

View File

@ -1,107 +0,0 @@
<!--
filename: graphPage.vue
author: liubin
date: 2023-08-07 13:46:59
description:
-->
<template>
<div class="graph-page">
<DetailGraph id="dg1" key="dg1" ref="dg1" title="数据总览">
<TotalGraph :summary-list="summaryList" />
</DetailGraph>
<DetailGraph id="dg2" key="dg2" ref="dg2" title="检测内容数据">
<LineGraph :x-props="lineData.xProps" :legend="legend" :series="series" />
</DetailGraph>
<!-- <DetailGraph id="dg3" key="dg3" ref="dg3" />
<DetailGraph id="dg4" key="dg4" ref="dg4" /> -->
</div>
</template>
<script>
import DetailGraph from './components/detailGraph.vue';
import TotalGraph from './components/graphs/total.vue';
import LineGraph from './components/graphs/line.vue';
export default {
name: 'GraphPage',
components: { DetailGraph, TotalGraph, LineGraph },
props: {
summaryList: {
type: Array,
default: () => [],
},
lineData: {
type: Object,
default: () => ({}),
},
},
data() {
return {
legend: [],
series: [],
};
},
mounted() {
this.buildLegend();
this.$nextTick(() => {
this.series = this.lineData.list.map(this.buildSeries);
console.log('this.series', this.series);
});
},
methods: {
buildSeries(item) {
console.log('this.list', this.lineData.list, this.lineData.xProps);
const seriesItem = {
name: item.inspectionContent,
type: 'line',
data: [],
};
this.lineData.xProps.forEach((prop) => {
if (prop in item) {
seriesItem.data.push(item[prop]);
} else {
seriesItem.data.push(null);
}
});
return seriesItem;
},
buildLegend() {
this.legend = this.lineData.list
.map((item) => item.inspectionContent)
.sort();
},
},
};
</script>
<style scoped lang="scss">
.graph-page {
height: 100%;
display: grid;
// grid-template-columns: ;
// grid-template-columns: 1fr 1fr;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
grid-auto-rows: minmax(300px, max-content);
gap: 12px;
}
#dg1 {
grid-column: 1 / 3;
}
#dg2 {
grid-column: 3 / 5;
}
#dg3 {
grid-column: span 2;
}
#dg4 {
grid-column: span 2;
}
</style>

View File

@ -13,31 +13,24 @@
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<transition mode="out-in" name="fade-down">
<template v-if="mode == 'table'">
<!-- 列表 -->
<base-table
v-if="mode == 'table'"
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emit-fun="handleEmitFun">
<!-- <method-btn
<!-- 列表 -->
<base-table
v-if="mode == 'table'"
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-data="list"
@emit-fun="handleEmitFun">
<!-- <method-btn
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
fixed="right"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> -->
</base-table>
</template>
</base-table>
<GraphPage
v-else
:summary-list="summaryList"
:line-data="{ list: list, xProps: dynamicProps.map((v) => v.prop) }" />
</transition>
<p v-if="mode == 'graph'">图形版</p>
<!-- todo: 数据总览用弹窗包裹的 table 实现 -->
<base-dialog
@ -53,12 +46,11 @@
</template>
<script>
import GraphPage from './graphPage.vue';
import summaryTable from './components/summaryTable.vue';
export default {
name: 'QualityStatistics',
components: { GraphPage, summaryTable },
components: { summaryTable },
props: {},
data() {
return {
@ -70,13 +62,12 @@ export default {
dateType: 'daterange', // datetimerange
// format: 'yyyy-MM-dd HH:mm:ss',
format: 'yyyy-MM-dd',
// valueFormat: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'timestamp',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
defaultTime: ['00:00:00', '23:59:59'],
param: 'timerange',
param: 'checkTime',
},
{
type: 'button',
@ -112,84 +103,91 @@ export default {
color: 'text btn-graph',
},
],
// props
dynamicProps: [],
//
queryParams: {
pageNo: 1,
pageSize: 10,
param: null,
},
summaryList: [],
summaryOpen: false,
list: [
/** mock data */
// {
// content: 'asdfasdf',
// line1: '',
// line2: '',
// line3: '',
// line4: '',
// line5: '',
// line6: '',
// line7: '',
// line8: '',
// line9: '',
// line10: '',
// typeTotal: 100,
// ratio: '93%',
// },
// {
// content: 'fdasfs',
// line1: '',
// line2: '',
// line3: '',
// line4: '',
// line5: '',
// line6: '',
// line7: '',
// line8: '',
// line9: '',
// line10: '',
// typeTotal: 100,
// ratio: '93%',
// },
// {
// content: 'asdfdfffffff',
// line1: '',
// line2: '',
// line3: '',
// line4: '',
// line5: '',
// line6: '',
// line7: '',
// line8: '',
// line9: '',
// line10: '',
// typeTotal: 100,
// ratio: '93%',
// },
],
};
},
computed: {
tableProps() {
return [
tableProps: [
{
// width: 160,
prop: 'inspectionContent',
width: 160,
prop: 'content',
label: '检测内容',
align: 'center',
},
...this.dynamicProps,
{
// width: 128,
prop: 'sumInput',
label: '检测类型总数',
width: 128,
prop: 'line1',
label: '产线1',
align: 'center',
},
{
// width: 128,
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',
},
{
width: 128,
prop: 'typeTotal',
label: '检测类型总数',
align: 'center',
// subcomponent: {
// name: 'TextOnly',
// props: {
// injectData: {
// type: Object,
// default: () => ({}),
// },
// },
// data() {
// return {
// text: '线',
// };
// },
// methods: {
// handleEmit(payload) {
// console.log('handleEmit', payload);
// },
// },
// render(h) {
// return h('el-button', { props: { type: 'text' } }, this.text);
// },
// },
},
{
width: 128,
prop: 'ratio',
label: '比例',
align: 'center',
@ -216,9 +214,65 @@ export default {
// },
// },
},
];
},
],
//
queryParams: {
pageNo: 1,
pageSize: 10,
},
summaryList: [],
summaryOpen: false,
list: [
/** mock data */
{
content: 'asdfasdf',
line1: '',
line2: '',
line3: '',
line4: '',
line5: '',
line6: '',
line7: '',
line8: '',
line9: '',
line10: '',
typeTotal: 100,
ratio: '93%',
},
{
content: 'fdasfs',
line1: '',
line2: '',
line3: '',
line4: '',
line5: '',
line6: '',
line7: '',
line8: '',
line9: '',
line10: '',
typeTotal: 100,
ratio: '93%',
},
{
content: 'asdfdfffffff',
line1: '',
line2: '',
line3: '',
line4: '',
line5: '',
line6: '',
line7: '',
line8: '',
line9: '',
line10: '',
typeTotal: 100,
ratio: '93%',
},
],
};
},
computed: {},
mounted() {
this.getList();
},
@ -229,74 +283,32 @@ export default {
},
/** 获取 检测总数 列表 */
async getSummaryList() {
const response = await this.$axios({
url: '/monitoring/statistical-data/getUpPart',
method: 'get',
params: this.queryParams.param
? {
param: {
// startTime: new Date(2022, 6, 1, 0, 0, 0).getTime(), // '2023-07-01 00:00:00',
// endTime: new Date(2023, 7, 10, 0, 0, 0).getTime(), // '2023-08-10 00:00:00',
startTime: this.queryParams.param.startTime,
endTime: this.queryParams.param.endTime,
},
}
: null,
});
const response = await this.$axios(
'/monitoring/statistical-data/getUpPart',
{
params: {
startTime: '2023-07-01 00:00:00',
endTime: '2023-08-10 00:00:00',
},
}
);
this.summaryList = response.data;
console.log('summaryList', this.summaryList);
},
/** 获取 检测内容和产线关联 列表 */
async getDetailedList() {
const {
data: { data, otherList, otherMap, nameData },
} = await this.$axios({
url: '/monitoring/statistical-data/getDownPart',
params: this.queryParams.param
? {
param: {
// startTime: new Date(2023, 6, 1).getTime(), // '2023-07-01 00:00:00',
// endTime: new Date(2023, 7, 22).getTime(), // '2023-08-10 00:00:00',
startTime: this.queryParams.param.startTime,
endTime: this.queryParams.param.endTime,
},
}
: null,
} = await this.$axios('/monitoring/statistical-data/getDownPart', {
params: {
startTime: '2023-07-01 00:00:00',
endTime: '2023-08-10 00:00:00',
},
});
// this.list = response.data;
console.log('data', data);
console.log('otherList', otherList);
console.log('otherMap', otherMap);
console.log('nameData', nameData);
this.dynamicProps = this.filterNameData(nameData);
this.list = this.filterData(data);
},
filterNameData(nameData) {
const ndSet = new Set();
nameData.forEach((nd) => {
ndSet.add(nd.name);
});
return Array.from(ndSet.values())
.sort()
.map((name) => ({
prop: name,
label: name,
}));
},
filterData(data) {
return data.map((item) => {
const { data: innerData } = item;
const keyValuePairs = {};
innerData.map((d) => {
keyValuePairs[d.dynamicName] = d.dynamicValue;
});
return {
inspectionContent: item.inspectionContent,
...keyValuePairs,
sumInput: item.sumInput,
};
});
console.log("data", data);
console.log("otherList", otherList);
console.log("otherMap", otherMap);
console.log("nameData", nameData);
},
/** 总览关闭 */
handleSummaryClose() {
@ -304,15 +316,10 @@ export default {
},
/** 搜索按钮 */
handleSearchBarBtnClick(btn) {
console.log('bnt, ', btn);
switch (btn.btnName) {
case 'search':
if (btn.timerange && typeof btn.timerange === 'object') {
this.queryParams.param = {};
this.$set(this.queryParams.param, 'startTime', btn.timerange[0]);
this.$set(this.queryParams.param, 'endTime', btn.timerange[1]);
}
this.handleQuery();
this.queryParams[key] = btn[key] || null;
// this.handleQuery();
break;
case 'summary':
this.summaryOpen = true;
@ -329,10 +336,6 @@ export default {
break;
}
},
handleQuery() {
this.getSummaryList();
this.getDetailedList();
},
/** 处理表格事件 */
handleEmitFun() {},
},
@ -366,70 +369,4 @@ export default {
}
}
}
.fade-down-enter-active,
.fade-down-leave-active {
transition: all 0.3s;
}
.fade-down-enter,
.fade-down-leave-to {
transform: translateY(20%);
opacity: 0;
}
.fade-down-enter-to,
.fade-down-leave {
transform: translateY(0);
}
</style>
<!--
// {
// 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',
// }, -->

View File

@ -5293,7 +5293,7 @@ hex-color-regex@^1.1.0:
highlight.js@9.18.5:
version "9.18.5"
resolved "https://registry.npmmirror.com/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825"
resolved "https://registry.npmmirror.com/highlight.js/-/highlight.js-9.18.5.tgz"
integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==
highlight.js@^10.7.1: