From 006e00163d9252e5a7beb1e0714ff6289a79e584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Tue, 13 Jul 2021 16:21:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=8D=E6=A3=80=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/xunjian.js | 12 +++ src/components/MySelect/range_time_select.vue | 32 ++++++ src/components/table/table.vue | 8 +- src/pages/ranger/basic/exemption/add_edit.vue | 98 +++++++++++++++++ src/pages/ranger/basic/exemption/index.js | 3 + src/pages/ranger/basic/exemption/index.vue | 101 ++++++++++++++++++ src/router/config.js | 7 +- 7 files changed, 258 insertions(+), 3 deletions(-) create mode 100644 src/components/MySelect/range_time_select.vue create mode 100644 src/pages/ranger/basic/exemption/add_edit.vue create mode 100644 src/pages/ranger/basic/exemption/index.js create mode 100644 src/pages/ranger/basic/exemption/index.vue diff --git a/src/api/xunjian.js b/src/api/xunjian.js index 263e555..d77b252 100644 --- a/src/api/xunjian.js +++ b/src/api/xunjian.js @@ -31,3 +31,15 @@ export function editUnitApi(data) { export function getUnitInfoApi(id) { return getReq(`/ranger/inspection/api/v1/units/${id}`); } + +export function addExemptionApi(data) { + return postReq('/ranger/inspection/api/v1/exemptions', data); +} + +export function getExemptionApi(id) { + return getReq(`ranger/inspection/api/v1/exemptions/${id}`); +} + +export function updateExemptionApi(data) { + return putReq(`/ranger/inspection/api/v1/exemptions`, data); +} diff --git a/src/components/MySelect/range_time_select.vue b/src/components/MySelect/range_time_select.vue new file mode 100644 index 0000000..ce8ecbc --- /dev/null +++ b/src/components/MySelect/range_time_select.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/components/table/table.vue b/src/components/table/table.vue index 10b222b..2f78d42 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -98,6 +98,10 @@ export default { noPadding: Boolean, scroll: Object, width: { type: Number, default: 900 }, + defaultQuery: { + type: Object, + default: () => ({}), + }, }, data() { @@ -107,7 +111,7 @@ export default { ...initQuery, }, data: [], - queryForm: {}, + queryForm: { ...this.defaultQuery }, loading: false, total: 0, visible: false, @@ -206,7 +210,7 @@ export default { }, reset() { - this.queryForm = {}; + this.queryForm = { ...this.defaultQuery }; this.initQuery = { ...initQuery }; this.getData(); }, diff --git a/src/pages/ranger/basic/exemption/add_edit.vue b/src/pages/ranger/basic/exemption/add_edit.vue new file mode 100644 index 0000000..1522473 --- /dev/null +++ b/src/pages/ranger/basic/exemption/add_edit.vue @@ -0,0 +1,98 @@ + + + diff --git a/src/pages/ranger/basic/exemption/index.js b/src/pages/ranger/basic/exemption/index.js new file mode 100644 index 0000000..65e6b7a --- /dev/null +++ b/src/pages/ranger/basic/exemption/index.js @@ -0,0 +1,3 @@ +import Index from './index.vue'; + +export default Index; diff --git a/src/pages/ranger/basic/exemption/index.vue b/src/pages/ranger/basic/exemption/index.vue new file mode 100644 index 0000000..2136801 --- /dev/null +++ b/src/pages/ranger/basic/exemption/index.vue @@ -0,0 +1,101 @@ + + + diff --git a/src/router/config.js b/src/router/config.js index 6b14a1e..988de4c 100644 --- a/src/router/config.js +++ b/src/router/config.js @@ -72,7 +72,7 @@ const hasAuthorityRoutes = [ }, { path: 'place', - name: '地区配置', + name: '地点配置', component: () => import('@/pages/ranger/basic/place'), }, { @@ -80,6 +80,11 @@ const hasAuthorityRoutes = [ name: '单元配置', component: () => import('@/pages/ranger/basic/unit'), }, + { + path: 'exemption', + name: '免检配置', + component: () => import('@/pages/ranger/basic/exemption'), + }, ], }, { -- GitLab