From 2755663693e5ad534272805a4b8f2acb6cc1e139 Mon Sep 17 00:00:00 2001 From: zyn Date: Thu, 26 Oct 2023 13:37:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BF=E7=AD=96=E6=B3=95=E8=A7=84=E8=B5=84?= =?UTF-8?q?=E6=96=99=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/axios/index.js | 28 + src/components/navMenu/index.vue | 7 +- .../regulatoryMaterialsDetail/index.vue | 485 ++++++++++++++++++ .../components/RegulatoryMaterialsMain.vue | 383 ++++++++++++++ .../components/RegulatoryMaterialsTree.vue | 343 +++++++++++++ .../components/editDrawer.vue | 351 +++++++++++++ .../regulatoryMaterials/index.vue | 121 +++++ src/router/index.js | 23 +- 8 files changed, 1739 insertions(+), 2 deletions(-) create mode 100644 src/pages/details/regulatoryMaterialsDetail/index.vue create mode 100644 src/pages/policyRegulation/regulatoryMaterials/components/RegulatoryMaterialsMain.vue create mode 100644 src/pages/policyRegulation/regulatoryMaterials/components/RegulatoryMaterialsTree.vue create mode 100644 src/pages/policyRegulation/regulatoryMaterials/components/editDrawer.vue create mode 100644 src/pages/policyRegulation/regulatoryMaterials/index.vue diff --git a/src/common/axios/index.js b/src/common/axios/index.js index 2957a7291..8fd737999 100644 --- a/src/common/axios/index.js +++ b/src/common/axios/index.js @@ -635,6 +635,34 @@ export default { }) }, + // formData + _put (url, params = {}, config = {}) { + var _formData = formData(params) + // 参数包含this + let _this = config._this || false + // 参数包含loading + let loading = config.loading || false + // 是否显示操作提示 + let showTips = config.showTips === undefined ? true : config.showTips + if (_this && loading) { _this[loading] = true } + + return new Promise((resolve,reject) => { + _axios.put(api() + url + '?' + new Date().getTime(), _formData).then(res => { + if (res.data.ok !== undefined && showTips) { + let type = res.data.ok ? 'success' : 'warning' + if (_this && res.data.message !== '' && res.data.message !== null) { + Message[type](res.data.message) + } + } + resolve(res.data) + }).catch(err => { + reject(err) + }).finally(()=>{ + if (_this && loading) { _this[loading] = false } + }) + }) + }, + _downloadFile (url, params = {}, method = 'get', fileName = '导出文件') { _axios({ method, diff --git a/src/components/navMenu/index.vue b/src/components/navMenu/index.vue index 9a4a55234..d5cd40ff4 100644 --- a/src/components/navMenu/index.vue +++ b/src/components/navMenu/index.vue @@ -258,7 +258,12 @@ title: '政策课题', path: '/policyTopics', menuId: '627f66cd6746234edd4722e20d8c01bb' - } + }, + { + title: '政策法规资料', + path: '/regulatoryMaterials', + menuId: '5b77e62147c5397178bc76f698e151c1' + }, ] }, { diff --git a/src/pages/details/regulatoryMaterialsDetail/index.vue b/src/pages/details/regulatoryMaterialsDetail/index.vue new file mode 100644 index 000000000..53a2dff8c --- /dev/null +++ b/src/pages/details/regulatoryMaterialsDetail/index.vue @@ -0,0 +1,485 @@ + + + + + diff --git a/src/pages/policyRegulation/regulatoryMaterials/components/RegulatoryMaterialsMain.vue b/src/pages/policyRegulation/regulatoryMaterials/components/RegulatoryMaterialsMain.vue new file mode 100644 index 000000000..3feba598a --- /dev/null +++ b/src/pages/policyRegulation/regulatoryMaterials/components/RegulatoryMaterialsMain.vue @@ -0,0 +1,383 @@ + + + + + diff --git a/src/pages/policyRegulation/regulatoryMaterials/components/RegulatoryMaterialsTree.vue b/src/pages/policyRegulation/regulatoryMaterials/components/RegulatoryMaterialsTree.vue new file mode 100644 index 000000000..f98b823e2 --- /dev/null +++ b/src/pages/policyRegulation/regulatoryMaterials/components/RegulatoryMaterialsTree.vue @@ -0,0 +1,343 @@ + + + + + diff --git a/src/pages/policyRegulation/regulatoryMaterials/components/editDrawer.vue b/src/pages/policyRegulation/regulatoryMaterials/components/editDrawer.vue new file mode 100644 index 000000000..0533c6ec0 --- /dev/null +++ b/src/pages/policyRegulation/regulatoryMaterials/components/editDrawer.vue @@ -0,0 +1,351 @@ + + + + + diff --git a/src/pages/policyRegulation/regulatoryMaterials/index.vue b/src/pages/policyRegulation/regulatoryMaterials/index.vue new file mode 100644 index 000000000..b57639eaa --- /dev/null +++ b/src/pages/policyRegulation/regulatoryMaterials/index.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index 2883b0ee7..66f5b61be 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -4047,7 +4047,17 @@ const routes = [ title: '政策课题', menuId: '627f66cd6746234edd4722e20d8c01bb' } - } + }, + { + path: '/regulatoryMaterials', + name: 'regulatoryMaterials', + component: () => import('@/pages/policyRegulation/regulatoryMaterials'), + meta: { + requireAuth: true, + title: '政策法规资料', + menuId: '5b77e62147c5397178bc76f698e151c1' + } + }, ] }, // 配置管理 @@ -4493,6 +4503,17 @@ const routes = [ } ] }, + { + path: '/regulatoryMaterialsDetail/:id', + name: 'regulatoryMaterialsDetail', + component: () => + import('@/pages/details/regulatoryMaterialsDetail'), + meta: { + requireAuth: true, + title: '政策法规资料详情', + isBoolean: true + } + }, // ************************** 搜索中心 ******************************* // { path: '/searchCenter/:selectKey?/:selectValue?',