From 332febef274089f35312d261540b0d87b2d4c268 Mon Sep 17 00:00:00 2001
From: YuanYh <2972788632@qq.com>
Date: Thu, 11 Apr 2024 15:35:42 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=85=E9=9A=9C=E5=89=8D=E5=8F=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/business/log.js | 44 ++++
src/api/log/breakLog.js | 10 +
src/views/business/break/index.vue | 16 +-
src/views/business/log/index.vue | 309 +++++++++++++++++++++++++++++
4 files changed, 372 insertions(+), 7 deletions(-)
create mode 100644 src/api/business/log.js
create mode 100644 src/api/log/breakLog.js
create mode 100644 src/views/business/log/index.vue
diff --git a/src/api/business/log.js b/src/api/business/log.js
new file mode 100644
index 0000000..cf5d396
--- /dev/null
+++ b/src/api/business/log.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询故障日志列表
+export function listLog(query) {
+ return request({
+ url: '/business/log/logList',
+ method: 'post',
+ params: query
+ })
+}
+
+// 查询故障日志详细
+export function getLog(breakLogId) {
+ return request({
+ url: '/business/log/' + breakLogId,
+ method: 'get'
+ })
+}
+
+// 新增故障日志
+export function addLog(data) {
+ return request({
+ url: '/business/log/logAdd',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改故障日志
+export function updateLog(data) {
+ return request({
+ url: '/business/log/updLog',
+ method: 'post',
+ data: data
+ })
+}
+
+// 删除故障日志
+export function delLog(breakLogId) {
+ return request({
+ url: '/business/log/logDel/' + breakLogId,
+ method: 'post'
+ })
+}
diff --git a/src/api/log/breakLog.js b/src/api/log/breakLog.js
new file mode 100644
index 0000000..2d2612f
--- /dev/null
+++ b/src/api/log/breakLog.js
@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 查询故障列表
+export function logList(data) {
+ return request({
+ url: '/business/log',
+ method: 'post',
+ params: data
+ })
+}
diff --git a/src/views/business/break/index.vue b/src/views/business/break/index.vue
index 4a5a89f..0dbd199 100644
--- a/src/views/business/break/index.vue
+++ b/src/views/business/break/index.vue
@@ -74,17 +74,18 @@
+
+
+ {{ parseTime(scope.row.breakDate, '{y}-{m}-{d}') }}
+
+
{{ parseTime(scope.row.breakTime, '{y}-{m}-{d}') }}
-
-
- {{ parseTime(scope.row.breakDate, '{y}-{m}-{d}') }}
-
-
+
@@ -199,8 +200,9 @@ export default {
getList() {
this.loading = true;
listBreak(this.queryParams).then(response => {
- this.breakList = response.rows;
- this.total = response.total;
+ this.breakList = response.data.rows
+ this.total = response.data.data;
+ console.log(response)
this.loading = false;
});
},
diff --git a/src/views/business/log/index.vue b/src/views/business/log/index.vue
new file mode 100644
index 0000000..5e8fb9e
--- /dev/null
+++ b/src/views/business/log/index.vue
@@ -0,0 +1,309 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.breakTime, '{y}-{m}-{d}') }}
+
+
+
+
+
+ {{ parseTime(scope.row.breakDate, '{y}-{m}-{d}') }}
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+