From abe7e8ea7ef812d313e5d76c7f90ef2acf70dae5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <943146732@qq.com>
Date: Tue, 12 Mar 2024 23:02:24 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=B4=E4=BF=AE=E7=AE=A1?=
=?UTF-8?q?=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/content/maintenance/category.js | 54 +++++
src/api/content/maintenance/index.js | 64 ++++++
src/config/router.config.js | 18 ++
src/views/content/maintenance/Index.vue | 210 ++++++++++++++++++
.../content/maintenance/category/Index.vue | 144 ++++++++++++
.../maintenance/category/modules/AddForm.vue | 109 +++++++++
.../maintenance/category/modules/EditForm.vue | 124 +++++++++++
.../content/maintenance/modules/AddForm.vue | 127 +++++++++++
.../content/maintenance/modules/EditForm.vue | 162 ++++++++++++++
9 files changed, 1012 insertions(+)
create mode 100644 src/api/content/maintenance/category.js
create mode 100644 src/api/content/maintenance/index.js
create mode 100644 src/views/content/maintenance/Index.vue
create mode 100644 src/views/content/maintenance/category/Index.vue
create mode 100644 src/views/content/maintenance/category/modules/AddForm.vue
create mode 100644 src/views/content/maintenance/category/modules/EditForm.vue
create mode 100644 src/views/content/maintenance/modules/AddForm.vue
create mode 100644 src/views/content/maintenance/modules/EditForm.vue
diff --git a/src/api/content/maintenance/category.js b/src/api/content/maintenance/category.js
new file mode 100644
index 0000000..9250413
--- /dev/null
+++ b/src/api/content/maintenance/category.js
@@ -0,0 +1,54 @@
+import { axios } from '@/utils/request'
+
+// api接口列表
+const api = {
+ list: '/content.maintenanceCategory/list',
+ add: '/content.maintenanceCategory/add',
+ edit: '/content.maintenanceCategory/edit',
+ delete: '/content.maintenanceCategory/delete'
+}
+
+// 列表记录
+export function list (params) {
+ return axios({
+ url: api.list,
+ method: 'get',
+ params
+ })
+}
+
+/**
+ * 新增记录
+ * @param {*} data
+ */
+export function add (data) {
+ return axios({
+ url: api.add,
+ method: 'post',
+ data
+ })
+}
+
+/**
+ * 编辑记录
+ * @param {*} data
+ */
+export function edit (data) {
+ return axios({
+ url: api.edit,
+ method: 'post',
+ data
+ })
+}
+
+/**
+ * 删除记录
+ * @param {*} data
+ */
+export function deleted (data) {
+ return axios({
+ url: api.delete,
+ method: 'post',
+ data: data
+ })
+}
diff --git a/src/api/content/maintenance/index.js b/src/api/content/maintenance/index.js
new file mode 100644
index 0000000..f0de653
--- /dev/null
+++ b/src/api/content/maintenance/index.js
@@ -0,0 +1,64 @@
+import { axios } from '@/utils/request'
+
+// api接口列表
+const api = {
+ list: '/content.maintenance/list',
+ detail: '/content.maintenance/detail',
+ add: '/content.maintenance/add',
+ edit: '/content.maintenance/edit',
+ delete: '/content.maintenance/delete'
+}
+
+// 列表记录
+export function list (params) {
+ return axios({
+ url: api.list,
+ method: 'get',
+ params
+ })
+}
+
+// 详情信息
+export function detail (params) {
+ return axios({
+ url: api.detail,
+ method: 'get',
+ params
+ })
+}
+
+/**
+ * 新增记录
+ * @param {*} data
+ */
+export function add (data) {
+ return axios({
+ url: api.add,
+ method: 'post',
+ data
+ })
+}
+
+/**
+ * 编辑记录
+ * @param {*} data
+ */
+export function edit (data) {
+ return axios({
+ url: api.edit,
+ method: 'post',
+ data
+ })
+}
+
+/**
+ * 删除记录
+ * @param {*} data
+ */
+export function deleted (data) {
+ return axios({
+ url: api.delete,
+ method: 'post',
+ data: data
+ })
+}
diff --git a/src/config/router.config.js b/src/config/router.config.js
index 678664c..9110543 100644
--- a/src/config/router.config.js
+++ b/src/config/router.config.js
@@ -511,6 +511,24 @@ export const asyncRouterMap = [
}
]
},
+ {
+ path: '/content/maintenance',
+ component: RouteView,
+ redirect: '/content/maintenance/index',
+ meta: { title: '维修管理', keepAlive: false },
+ children: [
+ {
+ path: '/content/maintenance/category/index',
+ component: () => import(/* webpackChunkName: "content" */ '@/views/content/maintenance/category/Index'),
+ meta: { title: '维修分类', keepAlive: false }
+ },
+ {
+ path: '/content/maintenance/index',
+ component: () => import(/* webpackChunkName: "content" */ '@/views/content/maintenance/Index'),
+ meta: { title: '维修列表', keepAlive: false }
+ }
+ ]
+ },
{
path: '/content/help/index',
component: () => import(/* webpackChunkName: "content" */ '@/views/content/help/Index'),
diff --git a/src/views/content/maintenance/Index.vue b/src/views/content/maintenance/Index.vue
new file mode 100644
index 0000000..c4bb113
--- /dev/null
+++ b/src/views/content/maintenance/Index.vue
@@ -0,0 +1,210 @@
+
+
+ {{ $route.meta.title }}
+
+
+
+
+
+
+
+
+
+ 全部
+ {{ item.name }}
+
+
+
+
+ 搜索
+
+
+
+
+
+
+
+
+ {{ text }}
+
+
+ {{ text.name }}
+
+
+ {{ text ? '显示' : '隐藏' }}
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
diff --git a/src/views/content/maintenance/category/Index.vue b/src/views/content/maintenance/category/Index.vue
new file mode 100644
index 0000000..72ec0c2
--- /dev/null
+++ b/src/views/content/maintenance/category/Index.vue
@@ -0,0 +1,144 @@
+
+
+ {{ $route.meta.title }}
+
+
+
+
+
+
+
+
+
+
+ {{ text ? '显示' : '隐藏' }}
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
diff --git a/src/views/content/maintenance/category/modules/AddForm.vue b/src/views/content/maintenance/category/modules/AddForm.vue
new file mode 100644
index 0000000..5d3850c
--- /dev/null
+++ b/src/views/content/maintenance/category/modules/AddForm.vue
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+ 显示
+ 隐藏
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/content/maintenance/category/modules/EditForm.vue b/src/views/content/maintenance/category/modules/EditForm.vue
new file mode 100644
index 0000000..5f12ec3
--- /dev/null
+++ b/src/views/content/maintenance/category/modules/EditForm.vue
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+ 显示
+ 隐藏
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/content/maintenance/modules/AddForm.vue b/src/views/content/maintenance/modules/AddForm.vue
new file mode 100644
index 0000000..b5a9be0
--- /dev/null
+++ b/src/views/content/maintenance/modules/AddForm.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/content/maintenance/modules/EditForm.vue b/src/views/content/maintenance/modules/EditForm.vue
new file mode 100644
index 0000000..f3e45ec
--- /dev/null
+++ b/src/views/content/maintenance/modules/EditForm.vue
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+