diff --git a/.env.dev b/.env.dev index 9e1d10f4..43076e63 100644 --- a/.env.dev +++ b/.env.dev @@ -5,8 +5,10 @@ ENV = 'development' VUE_APP_TITLE = 芋道管理系统 # 芋道管理系统/开发环境 +VUE_APP_BASE_API = 'http://192.168.1.49:48080' +# VUE_APP_BASE_API = 'http://192.168.1.8:48080' # VUE_APP_BASE_API = 'http://192.168.0.33:48080' -VUE_APP_BASE_API = 'http://192.168.1.188:48080' +# VUE_APP_BASE_API = 'http://192.168.1.188:48080' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/package.json b/package.json index 5bb88d64..447d0973 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "js-beautify": "1.13.0", "jsencrypt": "3.3.1", "min-dash": "3.5.2", + "mockjs": "^1.1.0", "moment": "^2.29.4", "nprogress": "0.2.0", "qrcode.vue": "^1.7.0", diff --git a/public/index.html b/public/index.html index be59532f..589910ee 100644 --- a/public/index.html +++ b/public/index.html @@ -1,216 +1,215 @@ + + + + + + + <%= webpackConfig.name %> + + + - .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; - } - - - - -
-
-
-
-
-
正在加载系统资源,请耐心等待
-
-
- - - \ No newline at end of file + +
+
+
+
+
+
正在加载系统资源,请耐心等待
+
+
+ + diff --git a/src/api/base/equipment.js b/src/api/base/equipment.js index 71feef4b..8c1b4246 100644 --- a/src/api/base/equipment.js +++ b/src/api/base/equipment.js @@ -1,8 +1,61 @@ 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' + }) +} // 获得所有设备列表 export function getEquipmentAll() { return request({ url: '/base/equipment/listAll', method: 'get' }) -} \ No newline at end of file +} diff --git a/src/api/base/equipmentAttr.js b/src/api/base/equipmentAttr.js new file mode 100644 index 00000000..b65a5266 --- /dev/null +++ b/src/api/base/equipmentAttr.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentBindGroup.js b/src/api/base/equipmentBindGroup.js new file mode 100644 index 00000000..990a055c --- /dev/null +++ b/src/api/base/equipmentBindGroup.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建设备与分组绑定 +export function createEquipmentBindGroup(data) { + return request({ + url: '/base/equipment-bind-group/create', + method: 'post', + data: data + }) +} + +// 更新设备与分组绑定 +export function updateEquipmentBindGroup(data) { + return request({ + url: '/base/equipment-bind-group/update', + method: 'put', + data: data + }) +} + +// 删除设备与分组绑定 +export function deleteEquipmentBindGroup(id) { + return request({ + url: '/base/equipment-bind-group/delete?id=' + id, + method: 'delete' + }) +} + +// 获得设备与分组绑定 +export function getEquipmentBindGroup(id) { + return request({ + url: '/base/equipment-bind-group/get?id=' + id, + method: 'get' + }) +} + +// 获得设备与分组绑定分页 +export function getEquipmentBindGroupPage(query) { + return request({ + url: '/base/equipment-bind-group/page', + method: 'get', + params: query + }) +} + +// 导出设备与分组绑定 Excel +export function exportEquipmentBindGroupExcel(query) { + return request({ + url: '/base/equipment-bind-group/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/base/equipmentBindSection.js b/src/api/base/equipmentBindSection.js new file mode 100644 index 00000000..82850670 --- /dev/null +++ b/src/api/base/equipmentBindSection.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentFile.js b/src/api/base/equipmentFile.js new file mode 100644 index 00000000..3640265c --- /dev/null +++ b/src/api/base/equipmentFile.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentGroup.js b/src/api/base/equipmentGroup.js new file mode 100644 index 00000000..2f8349cf --- /dev/null +++ b/src/api/base/equipmentGroup.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentGroupAlarm.js b/src/api/base/equipmentGroupAlarm.js new file mode 100644 index 00000000..45e8ed47 --- /dev/null +++ b/src/api/base/equipmentGroupAlarm.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentPlc.js b/src/api/base/equipmentPlc.js new file mode 100644 index 00000000..94cb3465 --- /dev/null +++ b/src/api/base/equipmentPlc.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentPlcConnect.js b/src/api/base/equipmentPlcConnect.js new file mode 100644 index 00000000..437d3825 --- /dev/null +++ b/src/api/base/equipmentPlcConnect.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentPlcParam.js b/src/api/base/equipmentPlcParam.js new file mode 100644 index 00000000..84dcb547 --- /dev/null +++ b/src/api/base/equipmentPlcParam.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentQuantityLog.js b/src/api/base/equipmentQuantityLog.js new file mode 100644 index 00000000..7b28bef2 --- /dev/null +++ b/src/api/base/equipmentQuantityLog.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentQuantityRealtime.js b/src/api/base/equipmentQuantityRealtime.js new file mode 100644 index 00000000..a6743358 --- /dev/null +++ b/src/api/base/equipmentQuantityRealtime.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentStatusLog.js b/src/api/base/equipmentStatusLog.js new file mode 100644 index 00000000..d1d1b43d --- /dev/null +++ b/src/api/base/equipmentStatusLog.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentStatusRealtime.js b/src/api/base/equipmentStatusRealtime.js new file mode 100644 index 00000000..2ef4a89a --- /dev/null +++ b/src/api/base/equipmentStatusRealtime.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentType.js b/src/api/base/equipmentType.js new file mode 100644 index 00000000..57e7746a --- /dev/null +++ b/src/api/base/equipmentType.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/base/equipmentTypeFile.js b/src/api/base/equipmentTypeFile.js new file mode 100644 index 00000000..2e3c8821 --- /dev/null +++ b/src/api/base/equipmentTypeFile.js @@ -0,0 +1,54 @@ +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' + }) +} diff --git a/src/api/monitoring/equipmentAlarmLog.js b/src/api/monitoring/equipmentAlarmLog.js new file mode 100644 index 00000000..fd74cb33 --- /dev/null +++ b/src/api/monitoring/equipmentAlarmLog.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建设备报警日志 +export function createEquipmentAlarmLog(data) { + return request({ + url: '/monitoring/equipment-alarm-log/create', + method: 'post', + data: data + }) +} + +// 更新设备报警日志 +export function updateEquipmentAlarmLog(data) { + return request({ + url: '/monitoring/equipment-alarm-log/update', + method: 'put', + data: data + }) +} + +// 删除设备报警日志 +export function deleteEquipmentAlarmLog(id) { + return request({ + url: '/monitoring/equipment-alarm-log/delete?id=' + id, + method: 'delete' + }) +} + +// 获得设备报警日志 +export function getEquipmentAlarmLog(id) { + return request({ + url: '/monitoring/equipment-alarm-log/get?id=' + id, + method: 'get' + }) +} + +// 获得设备报警日志分页 +export function getEquipmentAlarmLogPage(query) { + return request({ + url: '/monitoring/equipment-alarm-log/page', + method: 'get', + params: query + }) +} + +// 导出设备报警日志 Excel +export function exportEquipmentAlarmLogExcel(query) { + return request({ + url: '/monitoring/equipment-alarm-log/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/monitoring/equipmentAlarmRealtime.js b/src/api/monitoring/equipmentAlarmRealtime.js new file mode 100644 index 00000000..00523a24 --- /dev/null +++ b/src/api/monitoring/equipmentAlarmRealtime.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建设备报警实时信息 +export function createEquipmentAlarmRealtime(data) { + return request({ + url: '/monitoring/equipment-alarm-realtime/create', + method: 'post', + data: data + }) +} + +// 更新设备报警实时信息 +export function updateEquipmentAlarmRealtime(data) { + return request({ + url: '/monitoring/equipment-alarm-realtime/update', + method: 'put', + data: data + }) +} + +// 删除设备报警实时信息 +export function deleteEquipmentAlarmRealtime(id) { + return request({ + url: '/monitoring/equipment-alarm-realtime/delete?id=' + id, + method: 'delete' + }) +} + +// 获得设备报警实时信息 +export function getEquipmentAlarmRealtime(id) { + return request({ + url: '/monitoring/equipment-alarm-realtime/get?id=' + id, + method: 'get' + }) +} + +// 获得设备报警实时信息分页 +export function getEquipmentAlarmRealtimePage(query) { + return request({ + url: '/monitoring/equipment-alarm-realtime/page', + method: 'get', + params: query + }) +} + +// 导出设备报警实时信息 Excel +export function exportEquipmentAlarmRealtimeExcel(query) { + return request({ + url: '/monitoring/equipment-alarm-realtime/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/views/quality/components/dialogForm.vue b/src/components/DialogForm/index.vue similarity index 63% rename from src/views/quality/components/dialogForm.vue rename to src/components/DialogForm/index.vue index 2db7ffd9..03c05be4 100644 --- a/src/views/quality/components/dialogForm.vue +++ b/src/components/DialogForm/index.vue @@ -1,7 +1,7 @@ @@ -44,7 +44,36 @@ v-model="form[col.prop]" type="datetime" :placeholder="`请选择${col.label}`" + value-format="timestamp" v-bind="col.bind"> + + + 点击上传 + +
+ {{ col.uploadTips || '只能上传jpg/png文件,大小不超过2MB' }} +
+
+ + @@ -90,6 +119,8 @@ export default { return { formLoading: true, optionListOf: {}, + uploadedFileList: [], + dataLoaded: false, }; }, computed: { @@ -101,6 +132,8 @@ export default { }, form: { get() { + // if (this.dataLoaded) return this.dataForm; + // else return {} return this.dataForm; }, set(val) { @@ -138,7 +171,7 @@ export default { return response.data; }, async handleOptions(trigger = 'monuted') { - // console.log("[dialogForm:handleOptions]") + console.log('[dialogForm:handleOptions]'); const promiseList = []; this.rows.forEach((cols) => { cols.forEach((opt) => { @@ -150,6 +183,36 @@ export default { if (opt.options) { this.$set(this.optionListOf, opt.prop, opt.options); } else if (opt.url) { + // 如果有 depends,则暂时先不获取,注册一个watcher + if (opt.depends) { + console.log('[handleOptions] setting watch'); + this.$watch( + () => this.form[opt.depends], + (id) => { + console.log('<', opt.depends, '>', 'changed', id); + if (id == null) return; + // 清空原有选项 + this.form[opt.prop] = null; + // 获取新的选项 + this.$axios({ + url: `${opt.url}?id=${id}`, + }).then((res) => { + this.$set( + this.optionListOf, + opt.prop, + res.data.map((item) => ({ + label: item[opt.labelKey ?? 'name'], + value: item[opt.valueKey ?? 'id'], + })) + ); + }); + }, + { + immediate: true, + } + ); + return; + } // 如果是下拉框,或者新增模式下的输入框,才去请求 if (opt.select || (opt.input && !this.form?.id)) { promiseList.push(async () => { @@ -172,6 +235,7 @@ export default { })) ); } else if (opt.input) { + console.log('setting code: ', response.data); // 处理输入框数据 this.form[opt.prop] = response.data; } @@ -181,6 +245,8 @@ export default { }); }); + console.log('[dialogForm:handleOptions] done!'); + // 如果是 watch 触发的,不需要执行进一步的请求 if (trigger == 'watch') { this.formLoading = false; @@ -189,6 +255,7 @@ export default { try { await Promise.all(promiseList.map((fn) => fn())); this.formLoading = false; + this.dataLoaded = true; // console.log("[dialogForm:handleOptions:optionListOf]", this.optionListOf) } catch (error) { console.log('[dialogForm:handleOptions:error]', error); @@ -196,6 +263,27 @@ export default { } if (!promiseList.length) this.formLoading = false; }, + // 上传成功的特殊处理 + beforeUpload() {}, + // 上传前的验证规则可通过 bind 属性传入 + handleUploadSuccess(response, file, fileList) { + console.log( + '[dialogForm:handleUploadSuccess]', + response, + file, + fileList, + this.form + ); + // 保存原始文件名 + if ('fileNames' in this.form) this.form.fileNames.push(file.name); + // 保存完整地址 + if ('fileUrls' in this.form) this.form.fileUrls.push(response.data); + this.$modal.msgSuccess('上传成功'); + }, + + getFileName(fileUrl) { + return fileUrl.split('/').pop(); + }, }, }; diff --git a/src/components/SequenceGraph/index.vue b/src/components/SequenceGraph/index.vue new file mode 100644 index 00000000..34da2137 --- /dev/null +++ b/src/components/SequenceGraph/index.vue @@ -0,0 +1,89 @@ + + + + + + + diff --git a/src/components/SequenceGraph/sequenceGraphItem.vue b/src/components/SequenceGraph/sequenceGraphItem.vue new file mode 100644 index 00000000..de882b0c --- /dev/null +++ b/src/components/SequenceGraph/sequenceGraphItem.vue @@ -0,0 +1,51 @@ + + + + + + + diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 797c3eb5..a14aba84 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -46,6 +46,8 @@ export default { .app-main { /* 84 = navbar + tags-view = 50 + 34 */ min-height: calc(100vh - 120px - 8px); + display: flex; + flex-direction: column; } .fixed-header + .app-main { diff --git a/src/views/quality/mixin/basicPageMixin.js b/src/mixins/lb/basicPageMixin.js similarity index 91% rename from src/views/quality/mixin/basicPageMixin.js rename to src/mixins/lb/basicPageMixin.js index 670b909a..8eab17ff 100644 --- a/src/views/quality/mixin/basicPageMixin.js +++ b/src/mixins/lb/basicPageMixin.js @@ -1,4 +1,4 @@ -import DialogForm from '../components/dialogForm.vue'; +import DialogForm from '@/components/DialogForm/index.vue'; export default { components: { DialogForm }, @@ -31,7 +31,6 @@ export default { // dialogFormConfig: [], // 占位 }; }, - mounted() {}, methods: { // 过滤后端传回的详情数据 filterData(data, keys) { @@ -45,8 +44,6 @@ export default { }); return obj; }, - // 处理搜索条件 - handleSearchBarBtnClick() {}, // 处理表格按钮 handleTableBtnClick({ data, type }) { switch (type) { @@ -87,9 +84,13 @@ export default { }, handleEmitFun(val) { console.log('emit unf', val); + switch (val.action) { + // 查看详情 + case 'show-detail': + this.viewDetail(val.value); // 交由每个组件自己实现 + break; + } }, - // 获取列表数据 - getList() {}, /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNo = 1; diff --git a/src/utils/dict.js b/src/utils/dict.js index efd89ef3..77b6b2b6 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -89,6 +89,9 @@ export const DICT_TYPE = { // ============== ENERGY - 能源模块 ============= ENERGY_UNIT: 'energy_unit', + + // ============== ENERGY - 能源模块 ============= + EQU_ALARM_LEVEL: 'equ_alarm_level', MONITOR_INDEX_TYPE: 'monitor_index_type', OBJECT_TYPE: 'object_type', STATISTIC_TYPE: 'statistic_type', diff --git a/src/utils/dynamicProps.js b/src/utils/dynamicProps.js new file mode 100644 index 00000000..b0a9e643 --- /dev/null +++ b/src/utils/dynamicProps.js @@ -0,0 +1,63 @@ +/** + * 用于动态表结构的 tableProps 生成 + * @param {*} nameData + * @returns + */ +export function handleNameData(nameData) { + const props = step1(nameData.filter((item) => item.tree == 1)); + step2( + props, + nameData.filter((item) => item.tree == 2) + ); + // console.log('level 1', JSON.stringify(props, null, 2)); + return props; +} + +function step1(tree1) { + return Array.from(new Set(tree1.map((item) => item.name))) + .sort() + .map((item) => ({ + prop: item, + label: item, + align: 'center', + children: [], + })); +} + +function step2(firstTierProps, tree2) { + tree2.map((nd) => { + const parent = firstTierProps.find( + ({ prop }) => nd.parentId.indexOf(prop) > -1 + ); + if (notRepeat(parent.children, nd.name)) { + parent.children.push({ + label: nd.name, + prop: `${parent.prop}-${nd.name}`, + align: 'center', + }); + } + }); +} + +function notRepeat(propArray, name) { + return propArray.every((item) => item.label !== name); +} + +/** + * 用于调整服务器返回的动态数据 + * @param {*} dynamicData + * @returns + */ +export function handleDynamicData(dynamicData) { + return dynamicData.map((dd) => { + const initData = { + inspectionContent: dd.inspectionDetContent, + }; + dd.data.forEach((column) => { + column.children.forEach((ch) => { + initData[`${column.dynamicName}-${ch.dynamicName}`] = ch.dynamicValue; + }); + }); + return initData; + }); +} diff --git a/src/views/base/equipmentAttr/index.vue b/src/views/base/equipmentAttr/index.vue new file mode 100644 index 00000000..9696af92 --- /dev/null +++ b/src/views/base/equipmentAttr/index.vue @@ -0,0 +1,214 @@ + + + diff --git a/src/views/base/equipmentBindGroup/index.vue b/src/views/base/equipmentBindGroup/index.vue new file mode 100644 index 00000000..c67c66eb --- /dev/null +++ b/src/views/base/equipmentBindGroup/index.vue @@ -0,0 +1,330 @@ + + + diff --git a/src/views/base/equipmentBindSection/index.vue b/src/views/base/equipmentBindSection/index.vue new file mode 100644 index 00000000..cd653693 --- /dev/null +++ b/src/views/base/equipmentBindSection/index.vue @@ -0,0 +1,357 @@ + + + diff --git a/src/views/base/equipmentFile/index.vue b/src/views/base/equipmentFile/index.vue new file mode 100644 index 00000000..cb2ebd21 --- /dev/null +++ b/src/views/base/equipmentFile/index.vue @@ -0,0 +1,225 @@ + + + diff --git a/src/views/base/equipmentGroup/index.vue b/src/views/base/equipmentGroup/index.vue new file mode 100644 index 00000000..ae10d52a --- /dev/null +++ b/src/views/base/equipmentGroup/index.vue @@ -0,0 +1,344 @@ + + + diff --git a/src/views/base/equipmentGroupAlarm/index.vue b/src/views/base/equipmentGroupAlarm/index.vue new file mode 100644 index 00000000..01fd0821 --- /dev/null +++ b/src/views/base/equipmentGroupAlarm/index.vue @@ -0,0 +1,354 @@ + + + diff --git a/src/views/base/equipmentPlc/index.vue b/src/views/base/equipmentPlc/index.vue new file mode 100644 index 00000000..c8327042 --- /dev/null +++ b/src/views/base/equipmentPlc/index.vue @@ -0,0 +1,373 @@ + + + diff --git a/src/views/base/equipmentPlcConnect/http.js b/src/views/base/equipmentPlcConnect/http.js new file mode 100644 index 00000000..16544450 --- /dev/null +++ b/src/views/base/equipmentPlcConnect/http.js @@ -0,0 +1,78 @@ +import Mock from 'mockjs'; + +const baseURL = 'http://192.168.1.49:48080/admin-api'; + +Mock.setup({ + timeout: 200, +}); + +// @database +const list = Mock.mock({ + 'data|1-10': [ + { + 'id|+1': 1, + productionLine: (options) => { + // console.log('otpsion', options.context.currentContext); + return `EQ${options.context.currentContext.id}`; + }, + workshopSection: ({ context: { currentContext } }) => + `EQ${currentContext.id}_WS${Mock.Random.integer(1, 10)}`, + equipmentName: ({ context: { currentContext } }) => + `设备${currentContext.id}`, + equipmentCode: ({ context: { currentContext } }) => + `${currentContext.equipmentName}_Code`, + plcCode: ({ context: { currentContext } }) => + `PLC_TABLE_CODE_${currentContext.id}`, + plcTableName: ({ context: { currentContext } }) => + `PLC_TABLE_${currentContext.id}`, + plcName: ({ context: { currentContext } }) => `PLC_${currentContext.id}`, + 'bindingParameters|1-10': 1, + }, + ], +}); + +// @page +Mock.mock( + RegExp(baseURL + '/base/equipment-plc-connect/page' + '.*'), + 'get', + (options) => { + console.log('[Mock url]', options.url, list); + return { + code: 0, + data: { + list: list.data, + total: list.data.length, + }, + }; + } +); + +// @create +Mock.mock(baseURL + '/base/equipment-plc-connect/create', 'post', (options) => { + console.log('options', options); + const { url, type, body } = options; + const newItem = JSON.parse(body); + list.data.push(newItem); + return { + code: 0, + data: null, + msg: 'success', + }; +}); + +// @update +Mock.mock( + baseURL + '/admin-api/base/equipment-plc-connect/update', + 'put', + (options) => { + const { url, type, body } = options; + const { id } = JSON.parse(body); + const newItem = list.data.find((item) => item.id == id); + newItem = { ...newItem, ...JSON.parse(body) }; + return { + code: 0, + msg: 'success', + data: null, + }; + } +); diff --git a/src/views/base/equipmentPlcConnect/index.vue b/src/views/base/equipmentPlcConnect/index.vue new file mode 100644 index 00000000..7554b9af --- /dev/null +++ b/src/views/base/equipmentPlcConnect/index.vue @@ -0,0 +1,349 @@ + + + diff --git a/src/views/base/equipmentPlcParam/index.vue b/src/views/base/equipmentPlcParam/index.vue new file mode 100644 index 00000000..161b1b76 --- /dev/null +++ b/src/views/base/equipmentPlcParam/index.vue @@ -0,0 +1,450 @@ + + + diff --git a/src/views/base/equipmentQuantityLog/index.vue b/src/views/base/equipmentQuantityLog/index.vue new file mode 100644 index 00000000..b8d5208e --- /dev/null +++ b/src/views/base/equipmentQuantityLog/index.vue @@ -0,0 +1,277 @@ + + + diff --git a/src/views/base/equipmentQuantityRealtime/index.vue b/src/views/base/equipmentQuantityRealtime/index.vue new file mode 100644 index 00000000..6d85dbbe --- /dev/null +++ b/src/views/base/equipmentQuantityRealtime/index.vue @@ -0,0 +1,276 @@ + + + diff --git a/src/views/base/equipmentStatusLog/index.vue b/src/views/base/equipmentStatusLog/index.vue new file mode 100644 index 00000000..5aa1b79a --- /dev/null +++ b/src/views/base/equipmentStatusLog/index.vue @@ -0,0 +1,289 @@ + + + diff --git a/src/views/base/equipmentStatusRealtime/index.vue b/src/views/base/equipmentStatusRealtime/index.vue new file mode 100644 index 00000000..64b6e43f --- /dev/null +++ b/src/views/base/equipmentStatusRealtime/index.vue @@ -0,0 +1,296 @@ + + + diff --git a/src/views/base/equipmentTypeFile/index.vue b/src/views/base/equipmentTypeFile/index.vue new file mode 100644 index 00000000..e148348e --- /dev/null +++ b/src/views/base/equipmentTypeFile/index.vue @@ -0,0 +1,229 @@ + + + diff --git a/src/views/core/base/equipment/assets/eq1.jpg b/src/views/core/base/equipment/assets/eq1.jpg new file mode 100644 index 00000000..e62db64c Binary files /dev/null and b/src/views/core/base/equipment/assets/eq1.jpg differ diff --git a/src/views/core/base/equipment/assets/eq10.jpg b/src/views/core/base/equipment/assets/eq10.jpg new file mode 100644 index 00000000..1f738260 Binary files /dev/null and b/src/views/core/base/equipment/assets/eq10.jpg differ diff --git a/src/views/core/base/equipment/assets/eq2.jpg b/src/views/core/base/equipment/assets/eq2.jpg new file mode 100644 index 00000000..7ca5dcc1 Binary files /dev/null and b/src/views/core/base/equipment/assets/eq2.jpg differ diff --git a/src/views/core/base/equipment/assets/eq3.jpg b/src/views/core/base/equipment/assets/eq3.jpg new file mode 100644 index 00000000..45f23067 Binary files /dev/null and b/src/views/core/base/equipment/assets/eq3.jpg differ diff --git a/src/views/core/base/equipment/assets/eq4.jpg b/src/views/core/base/equipment/assets/eq4.jpg new file mode 100644 index 00000000..51476968 Binary files /dev/null and b/src/views/core/base/equipment/assets/eq4.jpg differ diff --git a/src/views/core/base/equipment/assets/eq5.jpg b/src/views/core/base/equipment/assets/eq5.jpg new file mode 100644 index 00000000..8e536163 Binary files /dev/null and b/src/views/core/base/equipment/assets/eq5.jpg differ diff --git a/src/views/core/base/equipment/assets/eq6.jpg b/src/views/core/base/equipment/assets/eq6.jpg new file mode 100644 index 00000000..256ec18e Binary files /dev/null and b/src/views/core/base/equipment/assets/eq6.jpg differ diff --git a/src/views/core/base/equipment/assets/eq7.jpg b/src/views/core/base/equipment/assets/eq7.jpg new file mode 100644 index 00000000..3fae2905 Binary files /dev/null and b/src/views/core/base/equipment/assets/eq7.jpg differ diff --git a/src/views/core/base/equipment/assets/eq8.jpg b/src/views/core/base/equipment/assets/eq8.jpg new file mode 100644 index 00000000..ff3c2c39 Binary files /dev/null and b/src/views/core/base/equipment/assets/eq8.jpg differ diff --git a/src/views/core/base/equipment/assets/eq9.jpg b/src/views/core/base/equipment/assets/eq9.jpg new file mode 100644 index 00000000..93754f39 Binary files /dev/null and b/src/views/core/base/equipment/assets/eq9.jpg differ diff --git a/src/views/core/base/equipment/components/EquipmentAssets.vue b/src/views/core/base/equipment/components/EquipmentAssets.vue new file mode 100644 index 00000000..aa7b92b8 --- /dev/null +++ b/src/views/core/base/equipment/components/EquipmentAssets.vue @@ -0,0 +1,32 @@ + + + + + + + diff --git a/src/views/core/base/equipment/components/EquipmentDrawer.vue b/src/views/core/base/equipment/components/EquipmentDrawer.vue new file mode 100644 index 00000000..445ac334 --- /dev/null +++ b/src/views/core/base/equipment/components/EquipmentDrawer.vue @@ -0,0 +1,444 @@ + + + + + + + diff --git a/src/views/core/base/equipment/components/EquipmentPics.vue b/src/views/core/base/equipment/components/EquipmentPics.vue new file mode 100644 index 00000000..9c4b1f92 --- /dev/null +++ b/src/views/core/base/equipment/components/EquipmentPics.vue @@ -0,0 +1,111 @@ + + + + + + + diff --git a/src/views/core/base/equipment/index.vue b/src/views/core/base/equipment/index.vue new file mode 100644 index 00000000..b031cd65 --- /dev/null +++ b/src/views/core/base/equipment/index.vue @@ -0,0 +1,539 @@ + + + diff --git a/src/views/core/base/equipmentType/index.vue b/src/views/core/base/equipmentType/index.vue new file mode 100644 index 00000000..8790f426 --- /dev/null +++ b/src/views/core/base/equipmentType/index.vue @@ -0,0 +1,299 @@ + + + diff --git a/src/views/equipment/analysis/efficiency/components/pieChart.vue b/src/views/equipment/analysis/efficiency/components/pieChart.vue new file mode 100644 index 00000000..74db4ada --- /dev/null +++ b/src/views/equipment/analysis/efficiency/components/pieChart.vue @@ -0,0 +1,98 @@ + + + + + + + diff --git a/src/views/equipment/analysis/efficiency/index.vue b/src/views/equipment/analysis/efficiency/index.vue new file mode 100644 index 00000000..23ebb70c --- /dev/null +++ b/src/views/equipment/analysis/efficiency/index.vue @@ -0,0 +1,419 @@ + + + + + + + diff --git a/src/views/equipment/analysis/exception/index.vue b/src/views/equipment/analysis/exception/index.vue new file mode 100644 index 00000000..c8246cdb --- /dev/null +++ b/src/views/equipment/analysis/exception/index.vue @@ -0,0 +1,194 @@ + + + + + + + diff --git a/src/views/equipment/analysis/quality/components/lineChart.vue b/src/views/equipment/analysis/quality/components/lineChart.vue new file mode 100644 index 00000000..f3a93bc8 --- /dev/null +++ b/src/views/equipment/analysis/quality/components/lineChart.vue @@ -0,0 +1,49 @@ + + + + + + + diff --git a/src/views/equipment/analysis/quality/index.vue b/src/views/equipment/analysis/quality/index.vue new file mode 100644 index 00000000..2f9dcae2 --- /dev/null +++ b/src/views/equipment/analysis/quality/index.vue @@ -0,0 +1,343 @@ + + + + + + diff --git a/src/views/equipment/timing-diagram/output/components/lineChart.vue b/src/views/equipment/timing-diagram/output/components/lineChart.vue new file mode 100644 index 00000000..1ca240df --- /dev/null +++ b/src/views/equipment/timing-diagram/output/components/lineChart.vue @@ -0,0 +1,49 @@ + + + + + + + diff --git a/src/views/equipment/timing-diagram/output/index.vue b/src/views/equipment/timing-diagram/output/index.vue new file mode 100644 index 00000000..50306c55 --- /dev/null +++ b/src/views/equipment/timing-diagram/output/index.vue @@ -0,0 +1,330 @@ + + + + + + + diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue new file mode 100644 index 00000000..2aafc1c6 --- /dev/null +++ b/src/views/equipment/timing-diagram/status/index.vue @@ -0,0 +1,449 @@ + + + + + + + diff --git a/src/views/monitoring/equipmentAlarmLog/index.vue b/src/views/monitoring/equipmentAlarmLog/index.vue new file mode 100644 index 00000000..697cbf10 --- /dev/null +++ b/src/views/monitoring/equipmentAlarmLog/index.vue @@ -0,0 +1,285 @@ + + + diff --git a/src/views/monitoring/equipmentAlarmRealtime/index.vue b/src/views/monitoring/equipmentAlarmRealtime/index.vue new file mode 100644 index 00000000..b5e7080b --- /dev/null +++ b/src/views/monitoring/equipmentAlarmRealtime/index.vue @@ -0,0 +1,326 @@ + + + diff --git a/src/views/monitoring/equipmentFullParams/index.vue b/src/views/monitoring/equipmentFullParams/index.vue new file mode 100644 index 00000000..ef2c84b8 --- /dev/null +++ b/src/views/monitoring/equipmentFullParams/index.vue @@ -0,0 +1,307 @@ + + + + + + + diff --git a/src/views/monitoring/equipmentFullParams/response.js b/src/views/monitoring/equipmentFullParams/response.js new file mode 100644 index 00000000..d984f34e --- /dev/null +++ b/src/views/monitoring/equipmentFullParams/response.js @@ -0,0 +1,247 @@ +export default { + "code": 0, + "data": [ + // 一个表格 + { + "data": [ + // 一行参数 + { + "time": "1694056192800", + "plcCode": "PLC_CODE_1", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + { "id": 'param-4', "parentId": 0, "dynamicName": "P1V4", "dynamicValue": 15 }, + { "id": 'param-5', "parentId": 0, "dynamicName": "P1V5", "dynamicValue": 15 }, + { "id": 'param-6', "parentId": 0, "dynamicName": "P1V6", "dynamicValue": 15 }, + ] + } + ], + "otherList": [ + // 一个参数的属性 + { + "id": "attr-1", + "plcParamName": "P1V1", + "name": "P1V1", // 和 dynamicName 对应 + "minValue": 1, + "maxValue": 100 + }, + { + "id": "attr-2", + "plcParamName": "P1V2", + "name": "P1V2", + "minValue": 10, + "maxValue": 90, + "defaultValue": 24 + }, + { + "id": "attr-3", + "plcParamName": "P1V3", + "name": "P1V3", + "minValue": 10, + "maxValue": 98 + }, + { + "id": "attr-4", + "plcParamName": "P1V4", + "name": "P1V4", + "minValue": 10, + "maxValue": 90 + }, + { + "id": "attr-5", + "plcParamName": "P1V5", + "name": "P1V5", + "minValue": null, + "maxValue": null + }, + { + "id": "attr-6", + "plcParamName": "P1V6", + "name": "P1V6", + "minValue": null, + "maxValue": null, + "defaultValue": false + }, + ], + "nameData": [], + "otherMap": [] + }, + // 一个表格 + { + "data": [ + // 一行参数 + { + "time": "1694056100800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + }, + { + "time": "1694056102800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + } + ], + "otherList": [ + // 一个参数的属性 + { + "id": "attr-1", + "plcParamName": "P1V1", + "name": "P1V1", // 和 dynamicName 对应 + "minValue": 1, + "maxValue": 100 + }, + { + "id": "attr-2", + "plcParamName": "P1V2", + "name": "P1V2", + "minValue": 10, + "maxValue": 90 + }, + { + "id": "attr-3", + "plcParamName": "P1V3", + "name": "P1V3", + "minValue": 10, + "maxValue": 98 + }, + ], + "nameData": [], + "otherMap": [] + }, + // 一个表格 + { + "data": [ + // 一行参数 + { + "time": "1694056100800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + }, + { + "time": "1694056102800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + }, + { + "time": "1694056109800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + }, + { + "time": "1694066109800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + }, + { + "time": "1694067109800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + }, + { + "time": "1694068109800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + }, + { + "time": "1694069109800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + }, + { + "time": "1694071109800", + "plcCode": "PLC_CODE_2", + "data": [ + // 一个参数值 + { "id": 'param-1', "parentId": 0, "dynamicName": "P1V1", "dynamicValue": 15 }, + { "id": 'param-2', "parentId": 0, "dynamicName": "P1V2", "dynamicValue": 15 }, + { "id": 'param-3', "parentId": 0, "dynamicName": "P1V3", "dynamicValue": 15 }, + + ] + } + ], + "otherList": [ + // 一个参数的属性 + { + "id": "attr-1", + "plcParamName": "P1V1", + "name": "P1V1", // 和 dynamicName 对应 + "minValue": 1, + "maxValue": 100 + }, + { + "id": "attr-2", + "plcParamName": "P1V2", + "name": "P1V2", + "minValue": 10, + "maxValue": 90 + }, + { + "id": "attr-3", + "plcParamName": "P1V3", + "name": "P1V3", + "minValue": 10, + "maxValue": 98 + } + ], + "nameData": [], + "otherMap": [] + } + ] +} diff --git a/src/views/monitoring/equipmentFullParams/utils/local-data-manager.js b/src/views/monitoring/equipmentFullParams/utils/local-data-manager.js new file mode 100644 index 00000000..5d8c76fd --- /dev/null +++ b/src/views/monitoring/equipmentFullParams/utils/local-data-manager.js @@ -0,0 +1,36 @@ +export default class LocalDataManager { + constructor(dataList, pageNo, pageSize) { + this._dataListStore = dataList; + this._pageNo = pageNo; + this._pageSize = pageSize; + } + + set pageNo(pageNo) { + console.log('set pageNo', pageNo); + this._pageNo = pageNo; + } + + set pageSize(pageSize) { + console.log('set pageSize', pageSize); + this._pageSize = pageSize; + } + + get dataList() { + const firstLine = this._dataListStore[0]; + const realDataList = this._dataListStore.slice(1); + return [ + firstLine, + ...realDataList.slice((this._pageNo - 1) * this._pageSize, this._pageNo * this._pageSize) + ] + } + + get total() { + return this._dataListStore.length; + } + + deleteData(id) { + const idx = this._dataListStore.findIndex(item => item.id == id); + this._dataListStore.splice(idx, 1); + // send http request + } +} \ No newline at end of file diff --git a/src/views/monitoring/equipmentProcessAmount/graph.vue b/src/views/monitoring/equipmentProcessAmount/graph.vue new file mode 100644 index 00000000..7d6843cb --- /dev/null +++ b/src/views/monitoring/equipmentProcessAmount/graph.vue @@ -0,0 +1,126 @@ + + + + + + + diff --git a/src/views/monitoring/equipmentProcessAmount/index.vue b/src/views/monitoring/equipmentProcessAmount/index.vue new file mode 100644 index 00000000..4119be8d --- /dev/null +++ b/src/views/monitoring/equipmentProcessAmount/index.vue @@ -0,0 +1,341 @@ + + + + + + + diff --git a/src/views/monitoring/equipmentRecentHours/index.vue b/src/views/monitoring/equipmentRecentHours/index.vue new file mode 100644 index 00000000..c4cf6b6b --- /dev/null +++ b/src/views/monitoring/equipmentRecentHours/index.vue @@ -0,0 +1,181 @@ + + + + + + + diff --git a/src/views/monitoring/equipmentStatusAndParams/index.vue b/src/views/monitoring/equipmentStatusAndParams/index.vue new file mode 100644 index 00000000..2cacd5b6 --- /dev/null +++ b/src/views/monitoring/equipmentStatusAndParams/index.vue @@ -0,0 +1,283 @@ + + + diff --git a/src/views/quality/base/qualityInspectionBoxBtn/index.vue b/src/views/quality/base/qualityInspectionBoxBtn/index.vue index 6c6bee19..2193b1a4 100644 --- a/src/views/quality/base/qualityInspectionBoxBtn/index.vue +++ b/src/views/quality/base/qualityInspectionBoxBtn/index.vue @@ -12,7 +12,7 @@ :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list" - @emit-fun="handleEmitFun"> + @emitFun="handleEmitFun"> + @emitFun="handleEmitFun"> + @emitFun="handleEmitFun"> + @emitFun="handleEmitFun"> + + + + + + diff --git a/src/views/quality/monitoring/qualityRecentHours/props.json b/src/views/quality/monitoring/qualityRecentHours/props.json new file mode 100644 index 00000000..a8976b08 --- /dev/null +++ b/src/views/quality/monitoring/qualityRecentHours/props.json @@ -0,0 +1,80 @@ +{ + "tableProps": [ + { + "prop": "inspectionContent", + "label": "检测内容", + "align": "center" + }, + { + "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" + } + ] + } + ] +} diff --git a/src/views/quality/monitoring/qualityRecentHours/response.json b/src/views/quality/monitoring/qualityRecentHours/response.json new file mode 100644 index 00000000..9524dfb4 --- /dev/null +++ b/src/views/quality/monitoring/qualityRecentHours/response.json @@ -0,0 +1,176 @@ +{ + "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": "" +} diff --git a/src/views/quality/monitoring/qualityStatistics/components/detailGraph.vue b/src/views/quality/monitoring/qualityStatistics/components/detailGraph.vue new file mode 100644 index 00000000..70a3a71a --- /dev/null +++ b/src/views/quality/monitoring/qualityStatistics/components/detailGraph.vue @@ -0,0 +1,55 @@ + + + + + + + diff --git a/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue b/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue new file mode 100644 index 00000000..10366b3f --- /dev/null +++ b/src/views/quality/monitoring/qualityStatistics/components/graphs/line.vue @@ -0,0 +1,150 @@ + + + + + + + diff --git a/src/views/quality/monitoring/qualityStatistics/components/graphs/total.vue b/src/views/quality/monitoring/qualityStatistics/components/graphs/total.vue new file mode 100644 index 00000000..e65d60b7 --- /dev/null +++ b/src/views/quality/monitoring/qualityStatistics/components/graphs/total.vue @@ -0,0 +1,185 @@ + + + + + + + diff --git a/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue b/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue new file mode 100644 index 00000000..4edc8489 --- /dev/null +++ b/src/views/quality/monitoring/qualityStatistics/components/summaryTable.vue @@ -0,0 +1,68 @@ + + + + + + + diff --git a/src/views/quality/monitoring/qualityStatistics/graphPage.vue b/src/views/quality/monitoring/qualityStatistics/graphPage.vue new file mode 100644 index 00000000..4aa9a981 --- /dev/null +++ b/src/views/quality/monitoring/qualityStatistics/graphPage.vue @@ -0,0 +1,107 @@ + + + + + + + diff --git a/src/views/quality/monitoring/qualityStatistics/index.vue b/src/views/quality/monitoring/qualityStatistics/index.vue new file mode 100644 index 00000000..77102f4f --- /dev/null +++ b/src/views/quality/monitoring/qualityStatistics/index.vue @@ -0,0 +1,427 @@ + + + + + + + + + diff --git a/yarn.lock b/yarn.lock index 000b5599..ea7b06e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3059,6 +3059,11 @@ combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +commander@*: + version "11.0.0" + resolved "https://registry.npmmirror.com/commander/-/commander-11.0.0.tgz#43e19c25dbedc8256203538e8d7e9346877a6f67" + integrity sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ== + commander@2.17.x: version "2.17.1" resolved "https://registry.npmmirror.com/commander/-/commander-2.17.1.tgz" @@ -5293,7 +5298,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" + resolved "https://registry.npmmirror.com/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825" integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA== highlight.js@^10.7.1: @@ -6826,6 +6831,13 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.npmmirror.com/mkdirp/-/mkdirp-1.0.4.tgz" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +mockjs@^1.1.0: + version "1.1.0" + resolved "https://registry.npmmirror.com/mockjs/-/mockjs-1.1.0.tgz#e6a0c378e91906dbaff20911cc0273b3c7d75b06" + integrity sha512-eQsKcWzIaZzEZ07NuEyO4Nw65g0hdWAyurVol1IPl1gahRwY+svqzfgfey8U8dahLwG44d6/RwEzuK52rSa/JQ== + dependencies: + commander "*" + moddle-xml@^9.0.6: version "9.0.6" resolved "https://registry.npmmirror.com/moddle-xml/-/moddle-xml-9.0.6.tgz"