From c30cdc7f7a7a4b49256b3894fc2ba3d939ff0f4e Mon Sep 17 00:00:00 2001
From: sen <1060051436@qq.com>
Date: Thu, 27 Mar 2025 07:32:10 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=95=85=E9=9A=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/bst/fault/index.vue | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/src/views/bst/fault/index.vue b/src/views/bst/fault/index.vue
index f7784ea..ab66ebc 100644
--- a/src/views/bst/fault/index.vue
+++ b/src/views/bst/fault/index.vue
@@ -2,20 +2,25 @@
-
+
+
+
+
-
+
+
+
@@ -161,7 +166,7 @@ export default {
name: "Fault",
mixins: [$showColumns],
components: {FormCol},
- dicts: ['fault_site'],
+ dicts: ['fault_site','appeal_status'],
data() {
return {
span: 24,
From 9d4cdf4dd4e81ca0d99bb8ed761d7531b75ead9c Mon Sep 17 00:00:00 2001
From: SjS
Date: Thu, 27 Mar 2025 18:14:00 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=87=E7=AB=A0=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E5=92=8C=E7=94=B3=E6=8A=A5=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/bst/article.js | 44 +++
src/api/bst/articleCategory.js | 44 +++
src/views/bst/article/index.vue | 342 ++++++++++++++++++
src/views/bst/articleCategory/index.vue | 323 +++++++++++++++++
.../bst/fault/components/FaultEditDialog.vue | 117 ++++++
src/views/bst/fault/index.vue | 165 +++------
6 files changed, 919 insertions(+), 116 deletions(-)
create mode 100644 src/api/bst/article.js
create mode 100644 src/api/bst/articleCategory.js
create mode 100644 src/views/bst/article/index.vue
create mode 100644 src/views/bst/articleCategory/index.vue
create mode 100644 src/views/bst/fault/components/FaultEditDialog.vue
diff --git a/src/api/bst/article.js b/src/api/bst/article.js
new file mode 100644
index 0000000..0348d93
--- /dev/null
+++ b/src/api/bst/article.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询文章列表
+export function listArticle(query) {
+ return request({
+ url: '/bst/article/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询文章详细
+export function getArticle(id) {
+ return request({
+ url: '/bst/article/' + id,
+ method: 'get'
+ })
+}
+
+// 新增文章
+export function addArticle(data) {
+ return request({
+ url: '/bst/article',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改文章
+export function updateArticle(data) {
+ return request({
+ url: '/bst/article',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除文章
+export function delArticle(id) {
+ return request({
+ url: '/bst/article/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/api/bst/articleCategory.js b/src/api/bst/articleCategory.js
new file mode 100644
index 0000000..42047a7
--- /dev/null
+++ b/src/api/bst/articleCategory.js
@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询文章分类列表
+export function listArticleCategory(query) {
+ return request({
+ url: '/bst/articleCategory/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询文章分类详细
+export function getArticleCategory(id) {
+ return request({
+ url: '/bst/articleCategory/' + id,
+ method: 'get'
+ })
+}
+
+// 新增文章分类
+export function addArticleCategory(data) {
+ return request({
+ url: '/bst/articleCategory',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改文章分类
+export function updateArticleCategory(data) {
+ return request({
+ url: '/bst/articleCategory',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除文章分类
+export function delArticleCategory(id) {
+ return request({
+ url: '/bst/articleCategory/' + id,
+ method: 'delete'
+ })
+}
diff --git a/src/views/bst/article/index.vue b/src/views/bst/article/index.vue
new file mode 100644
index 0000000..c8dfef6
--- /dev/null
+++ b/src/views/bst/article/index.vue
@@ -0,0 +1,342 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+ {{d.row[column.key]}}
+
+
+ {{d.row[column.key]}}
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/bst/articleCategory/index.vue b/src/views/bst/articleCategory/index.vue
new file mode 100644
index 0000000..dce96a7
--- /dev/null
+++ b/src/views/bst/articleCategory/index.vue
@@ -0,0 +1,323 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 展开/折叠
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 修改
+ 新增
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{dict.label}}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/bst/fault/components/FaultEditDialog.vue b/src/views/bst/fault/components/FaultEditDialog.vue
new file mode 100644
index 0000000..0055c62
--- /dev/null
+++ b/src/views/bst/fault/components/FaultEditDialog.vue
@@ -0,0 +1,117 @@
+
+
+
+
+ {{form.mac | dv}}
+
+
+ {{form.sn | dv}}
+
+
+
+ {{form.longitude | dv}},{{form.latitude | dv}}
+
+
+
+ {{form.at | dv}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{form.voltage | fix2 | dv}} V
+
+
+ {{form.signal | dv}}
+
+
+ {{form.satellites | dv}}
+
+
+ {{form.onenetMsg | dv}}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/bst/fault/index.vue b/src/views/bst/fault/index.vue
index f7784ea..5600f15 100644
--- a/src/views/bst/fault/index.vue
+++ b/src/views/bst/fault/index.vue
@@ -1,21 +1,25 @@
-
-
+
+
+
+
-
+
+
+
@@ -25,27 +29,6 @@
-
- 新增
-
-
- 删除
-
+
+
+
+
+
+
{{d.row[column.key]}}
@@ -91,10 +84,10 @@
修改
+ icon="el-icon-view"
+ @click="handleView(scope.row)"
+ v-has-permi="['bst:fault:query']"
+ >详情
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -150,6 +118,9 @@
import { listFault, getFault, delFault, addFault, updateFault } from "@/api/bst/fault";
import { $showColumns } from '@/utils/mixins';
import FormCol from "@/components/FormCol/index.vue";
+import LocationLog from "@/views/bst/locationLog/index.vue";
+import LocationLogViewDialog from "@/views/bst/locationLog/components/LocationLogViewDialog.vue";
+import FaultEditDialog from "@/views/bst/fault/components/FaultEditDialog.vue";
// 默认排序字段
const defaultSort = {
@@ -160,8 +131,8 @@ const defaultSort = {
export default {
name: "Fault",
mixins: [$showColumns],
- components: {FormCol},
- dicts: ['fault_site'],
+ components: {FaultEditDialog, FormCol},
+ dicts: ['fault_site','appeal_status'],
data() {
return {
span: 24,
@@ -196,7 +167,10 @@ export default {
title: "",
// 是否显示弹出层
open: false,
+ // 选中的ID
+ selectedId: null,
defaultSort,
+
// 查询参数
queryParams: {
pageNum: 1,
@@ -207,7 +181,7 @@ export default {
vehicleCode: null,
picture: null,
orderId: null,
- faultSite: null,
+ faultSiteList:[],
faultDetail: null,
appealStatus: null,
},
@@ -285,6 +259,10 @@ export default {
this.queryParams.pageNum = 1;
this.getList();
},
+ /** 查看详情 */
+ handleView(row){
+ this.selectedId = row.id
+ },
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
@@ -296,52 +274,7 @@ export default {
this.single = selection.length!==1
this.multiple = !selection.length
},
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = "添加故障";
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.reset();
- const id = row.id || this.ids
- getFault(id).then(response => {
- this.form = response.data;
- this.open = true;
- this.title = "修改故障";
- });
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (this.form.id != null) {
- updateFault(this.form).then(response => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- addFault(this.form).then(response => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal.confirm('是否确认删除故障编号为"' + ids + '"的数据项?').then(function() {
- return delFault(ids);
- }).then(() => {
- this.getList();
- this.$modal.msgSuccess("删除成功");
- }).catch(() => {});
- },
+
/** 导出按钮操作 */
handleExport() {
this.download('bst/fault/export', {