diff --git a/.env.development b/.env.development index 0909b16..316dd69 100644 --- a/.env.development +++ b/.env.development @@ -12,8 +12,8 @@ VUE_APP_TITLE = 苏州应急执法计划管理系统 ENV = 'development' # 苏州应急执法计划管理系统/开发环境 -# VUE_APP_BASE_API = 'http://localhost:9028' -VUE_APP_BASE_API = '/api' +VUE_APP_BASE_API = 'http://39.101.188.84:9033' +# VUE_APP_BASE_API = '/api' # 路由懒加载 diff --git a/.env.production b/.env.production index bdead2a..ad61603 100644 --- a/.env.production +++ b/.env.production @@ -6,5 +6,9 @@ ENV = 'production' # 苏州应急执法计划管理系统/生产环境 # VUE_APP_BASE_API = 'http://192.168.0.105:9033' -VUE_APP_BASE_API = 'http://39.101.188.84:9033' +# VUE_APP_BASE_API = 'http://39.101.188.84:9033' +VUE_APP_BASE_API = 'http://180.108.205.123:13002' + +# 路由懒加载 +VUE_CLI_BABEL_TRANSPILE_MODULES = true \ No newline at end of file diff --git a/src/api/mudu/article.js b/src/api/mudu/article.js deleted file mode 100644 index 34d1d3a..0000000 --- a/src/api/mudu/article.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 查询文章列表 -export function listArticle(query) { - return request({ - url: '/mudu/article/list', - method: 'get', - params: query - }) -} - -// 查询文章详细 -export function getArticle(id) { - return request({ - url: '/mudu/article/' + id, - method: 'get' - }) -} - -// 新增文章 -export function addArticle(data) { - return request({ - url: '/mudu/article', - method: 'post', - data: data - }) -} - -// 修改文章 -export function updateArticle(data) { - return request({ - url: '/mudu/article', - method: 'put', - data: data - }) -} - -// 删除文章 -export function delArticle(id) { - return request({ - url: '/mudu/article/' + id, - method: 'delete' - }) -} diff --git a/src/api/mudu/check.js b/src/api/mudu/check.js deleted file mode 100644 index ddbdb64..0000000 --- a/src/api/mudu/check.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from "@/utils/request"; - -// 查询清单式检查列表 -export function listCheck(query) { - return request({ - url: "/mudu/check/list", - method: "get", - params: query, - }); -} - -// 查询清单式检查详细 -export function getCheck(id) { - return request({ - url: "/mudu/check/" + id, - method: "get", - }); -} - -// 新增清单式检查 -export function addCheck(data) { - return request({ - url: "/mudu/check", - method: "post", - data: data, - }); -} - -// 修改清单式检查 -export function updateCheck(data) { - return request({ - url: "/mudu/check", - method: "put", - data: data, - }); -} - -// 删除清单式检查 -export function delCheck(id) { - return request({ - url: "/mudu/check/" + id, - method: "delete", - }); -} diff --git a/src/api/mudu/directory.js b/src/api/mudu/directory.js deleted file mode 100644 index fa54588..0000000 --- a/src/api/mudu/directory.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 查询服务企业名录库列表 -export function listDirectory(query) { - return request({ - url: '/mudu/directory/list', - method: 'get', - params: query - }) -} - -// 查询服务企业名录库详细 -export function getDirectory(id) { - return request({ - url: '/mudu/directory/' + id, - method: 'get' - }) -} - -// 新增服务企业名录库 -export function addDirectory(data) { - return request({ - url: '/mudu/directory', - method: 'post', - data: data - }) -} - -// 修改服务企业名录库 -export function updateDirectory(data) { - return request({ - url: '/mudu/directory', - method: 'put', - data: data - }) -} - -// 删除服务企业名录库 -export function delDirectory(id) { - return request({ - url: '/mudu/directory/' + id, - method: 'delete' - }) -} diff --git a/src/api/mudu/equipment.js b/src/api/mudu/equipment.js deleted file mode 100644 index accc472..0000000 --- a/src/api/mudu/equipment.js +++ /dev/null @@ -1,46 +0,0 @@ -import request from '@/utils/request' - -// 查询特种设备列表 -export function listEquipment(query) { - return request({ - url: '/mudu/equipment/list', - method: 'get', - params: query - }) -} - -// 查询特种设备详细 -export function getEquipment(id) { - return request({ - url: '/mudu/equipment/' + id, - method: 'get' - }) -} - -// 新增特种设备 -export function addEquipment(data) { - return request({ - url: '/mudu/equipment', - method: 'post', - data: data - }) -} - -// 修改特种设备 -export function updateEquipment(data) { - return request({ - url: '/mudu/equipment', - method: 'put', - data: data - }) -} - -// 删除特种设备 -export function delEquipment(id) { - return request({ - url: '/mudu/equipment/' + id, - method: 'delete' - }) -} - - diff --git a/src/api/mudu/hcheck.js b/src/api/mudu/hcheck.js deleted file mode 100644 index 346aa63..0000000 --- a/src/api/mudu/hcheck.js +++ /dev/null @@ -1,65 +0,0 @@ -import request from "@/utils/request"; - -// 查询巡查工单列表 -export function listHcheck(query) { - return request({ - url: "/mudu/hcheck/list", - method: "get", - params: query, - }); -} - -// 查询巡查工单详细 -export function getHcheck(id) { - return request({ - url: "/mudu/hcheck/" + id, - method: "get", - }); -} - -// 新增巡查工单 -export function addHcheck(data) { - return request({ - url: "/mudu/hcheck", - method: "post", - data: data, - }); -} - -// 修改巡查工单 -export function updateHcheck(data) { - return request({ - url: "/mudu/hcheck", - method: "put", - data: data, - }); -} - -// 删除巡查工单 -export function delHcheck(id) { - return request({ - url: "/mudu/hcheck/" + id, - method: "delete", - }); -} - -// 导出巡查工单 -export function exportHcheck(data) { - return request({ - url: "/mudu/hcheck/export", - method: "post", - data, - }); -} - -// 导入巡查工单 -export function importHcheckTable(data) { - return request({ - url: "/mudu/hcheck/importExcel", - method: "post", - headers: { - "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", - }, - data, - }); -} diff --git a/src/api/mudu/history.js b/src/api/mudu/history.js deleted file mode 100644 index 3beb4c8..0000000 --- a/src/api/mudu/history.js +++ /dev/null @@ -1,45 +0,0 @@ -import request from '@/utils/request' - -// 查询浏览记录列表 -export function listHistory(query) { - return request({ - url: '/mudu/history/list', - method: 'get', - params: query - }) -} - -// 查询浏览记录详细 -export function getHistory(id) { - return request({ - url: '/mudu/history/' + id, - method: 'get' - }) -} - -// 新增浏览记录 -export function addHistory(data) { - return request({ - url: '/mudu/history', - method: 'post', - data: data - }) -} - -// 修改浏览记录 -export function updateHistory(data) { - return request({ - url: '/mudu/history', - method: 'put', - data: data - }) -} - -// 删除浏览记录 -export function delHistory(id) { - return request({ - url: '/mudu/history/' + id, - method: 'delete' - }) - -} diff --git a/src/api/mudu/likes.js b/src/api/mudu/likes.js deleted file mode 100644 index cae8647..0000000 --- a/src/api/mudu/likes.js +++ /dev/null @@ -1,54 +0,0 @@ -import request from '@/utils/request' - -// 查询点赞列表 -export function listLikes(query) { - return request({ - url: '/mudu/likes/list', - method: 'get', - params: query - }) -} - -// 查询点赞详细 -export function getLikes(id) { - return request({ - url: '/mudu/likes/' + id, - method: 'get' - }) -} - -// 新增点赞 -export function addLikes(data) { - return request({ - url: '/mudu/likes', - method: 'post', - data: data - }) -} - -// 修改点赞 -export function updateLikes(data) { - return request({ - url: '/mudu/likes', - method: 'put', - data: data - }) -} - -// 删除点赞 -export function delLikes(id) { - return request({ - url: '/mudu/likes/' + id, - method: 'delete' - }) - -} - -// 导出点赞 -export function exportLikes(data) { - return request({ - url: '/mudu/likes/export', - method: 'post', - data - }) -} diff --git a/src/api/mudu/manage.js b/src/api/mudu/manage.js deleted file mode 100644 index 8194ca3..0000000 --- a/src/api/mudu/manage.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 查询全镇公共物资管理列表 -export function listManage(query) { - return request({ - url: '/mudu/manage/list', - method: 'get', - params: query - }) -} - -// 查询全镇公共物资管理详细 -export function getManage(id) { - return request({ - url: '/mudu/manage/' + id, - method: 'get' - }) -} - -// 新增全镇公共物资管理 -export function addManage(data) { - return request({ - url: '/mudu/manage', - method: 'post', - data: data - }) -} - -// 修改全镇公共物资管理 -export function updateManage(data) { - return request({ - url: '/mudu/manage', - method: 'put', - data: data - }) -} - -// 删除全镇公共物资管理 -export function delManage(id) { - return request({ - url: '/mudu/manage/' + id, - method: 'delete' - }) -} diff --git a/src/api/mudu/management.js b/src/api/mudu/management.js deleted file mode 100644 index 38d6d31..0000000 --- a/src/api/mudu/management.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 查询风险企业管理列表 -export function listManagement(query) { - return request({ - url: '/mudu/management/list', - method: 'get', - params: query - }) -} - -// 查询风险企业管理详细 -export function getManagement(id) { - return request({ - url: '/mudu/management/' + id, - method: 'get' - }) -} - -// 新增风险企业管理 -export function addManagement(data) { - return request({ - url: '/mudu/management', - method: 'post', - data: data - }) -} - -// 修改风险企业管理 -export function updateManagement(data) { - return request({ - url: '/mudu/management', - method: 'put', - data: data - }) -} - -// 删除风险企业管理 -export function delManagement(id) { - return request({ - url: '/mudu/management/' + id, - method: 'delete' - }) -} diff --git a/src/api/mudu/materials.js b/src/api/mudu/materials.js deleted file mode 100644 index 53b071e..0000000 --- a/src/api/mudu/materials.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 查询园内专有物资管理列表 -export function listMaterials(query) { - return request({ - url: '/mudu/materials/list', - method: 'get', - params: query - }) -} - -// 查询园内专有物资管理详细 -export function getMaterials(id) { - return request({ - url: '/mudu/materials/' + id, - method: 'get' - }) -} - -// 新增园内专有物资管理 -export function addMaterials(data) { - return request({ - url: '/mudu/materials', - method: 'post', - data: data - }) -} - -// 修改园内专有物资管理 -export function updateMaterials(data) { - return request({ - url: '/mudu/materials', - method: 'put', - data: data - }) -} - -// 删除园内专有物资管理 -export function delMaterials(id) { - return request({ - url: '/mudu/materials/' + id, - method: 'delete' - }) -} diff --git a/src/api/mudu/monitor.js b/src/api/mudu/monitor.js deleted file mode 100644 index d150eab..0000000 --- a/src/api/mudu/monitor.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 查询园内监控管理列表 -export function listMonitor(query) { - return request({ - url: '/mudu/monitor/list', - method: 'get', - params: query - }) -} - -// 查询园内监控管理详细 -export function getMonitor(id) { - return request({ - url: '/mudu/monitor/' + id, - method: 'get' - }) -} - -// 新增园内监控管理 -export function addMonitor(data) { - return request({ - url: '/mudu/monitor', - method: 'post', - data: data - }) -} - -// 修改园内监控管理 -export function updateMonitor(data) { - return request({ - url: '/mudu/monitor', - method: 'put', - data: data - }) -} - -// 删除园内监控管理 -export function delMonitor(id) { - return request({ - url: '/mudu/monitor/' + id, - method: 'delete' - }) -} diff --git a/src/api/mudu/order.js b/src/api/mudu/order.js deleted file mode 100644 index 5647200..0000000 --- a/src/api/mudu/order.js +++ /dev/null @@ -1,55 +0,0 @@ -import request from '@/utils/request' - -// 查询隐患巡查工单列表 -export function listOrder(query) { - return request({ - url: '/mudu/order/list', - method: 'get', - params: query - }) -} - -// 查询隐患巡查工单详细 -export function getOrder(id) { - return request({ - url: '/mudu/order/' + id, - method: 'get' - }) -} - -// 新增隐患巡查工单 -export function addOrder(data) { - return request({ - url: '/mudu/order', - method: 'post', - data: data - }) -} - -// 修改隐患巡查工单 -export function updateOrder(data) { - return request({ - url: '/mudu/order', - method: 'put', - data: data - }) -} - -// 删除隐患巡查工单 -export function delOrder(id) { - return request({ - url: '/mudu/order/' + id, - method: 'delete' - }) -} -// 导入隐患巡查工单 -export function importOrder(data) { - return request({ - url: '/mudu/order/importExcel', - method: 'post', - headers:{ - 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' - }, - data - }) -} diff --git a/src/api/mudu/point.js b/src/api/mudu/point.js deleted file mode 100644 index a11d67f..0000000 --- a/src/api/mudu/point.js +++ /dev/null @@ -1,47 +0,0 @@ -import request from '@/utils/request' - -// 查询点位列表 -export function listPoint(query) { - return request({ - url: '/mudu/point/list', - method: 'get', - params: query - }) -} - -// 查询点位详细 -export function getPoint(id) { - return request({ - url: '/mudu/point/' + id, - method: 'get' - }) -} - -// 新增点位 -export function addPoint(data) { - return request({ - url: '/mudu/point', - method: 'post', - data: data - }) -} - -// 修改点位 -export function updatePoint(data) { - return request({ - url: '/mudu/point', - method: 'put', - data: data - }) -} - -// 删除点位 -export function delPoint(id) { - return request({ - url: '/mudu/point/' + id, - method: 'delete' - }) - -} - - diff --git a/src/api/mudu/principal.js b/src/api/mudu/principal.js deleted file mode 100644 index 779d400..0000000 --- a/src/api/mudu/principal.js +++ /dev/null @@ -1,45 +0,0 @@ -import request from '@/utils/request' - -// 查询负责人列表 -export function listPrincipal(query) { - return request({ - url: '/mudu/principal/list', - method: 'get', - params: query - }) -} - -// 查询负责人详细 -export function getPrincipal(id) { - return request({ - url: '/mudu/principal/' + id, - method: 'get' - }) -} - -// 新增负责人 -export function addPrincipal(data) { - return request({ - url: '/mudu/principal', - method: 'post', - data: data - }) -} - -// 修改负责人 -export function updatePrincipal(data) { - return request({ - url: '/mudu/principal', - method: 'put', - data: data - }) -} - -// 删除负责人 -export function delPrincipal(id) { - return request({ - url: '/mudu/principal/' + id, - method: 'delete' - }) -} - diff --git a/src/api/mudu/profile.js b/src/api/mudu/profile.js deleted file mode 100644 index 03367c5..0000000 --- a/src/api/mudu/profile.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 查询园区概况列表 -export function listProfile(query) { - return request({ - url: '/mudu/profile/list', - method: 'get', - params: query - }) -} - -// 查询园区概况详细 -export function getProfile(id) { - return request({ - url: '/mudu/profile/' + id, - method: 'get' - }) -} - -// 新增园区概况 -export function addProfile(data) { - return request({ - url: '/mudu/profile', - method: 'post', - data: data - }) -} - -// 修改园区概况 -export function updateProfile(data) { - return request({ - url: '/mudu/profile', - method: 'put', - data: data - }) -} - -// 删除园区概况 -export function delProfile(id) { - return request({ - url: '/mudu/profile/' + id, - method: 'delete' - }) -} \ No newline at end of file diff --git a/src/api/mudu/receiver.js b/src/api/mudu/receiver.js deleted file mode 100644 index dcd40fb..0000000 --- a/src/api/mudu/receiver.js +++ /dev/null @@ -1,45 +0,0 @@ -import request from '@/utils/request' - -// 查询储气罐列表 -export function listReceiver(query) { - return request({ - url: '/mudu/receiver/list', - method: 'get', - params: query - }) -} - -// 查询储气罐详细 -export function getReceiver(id) { - return request({ - url: '/mudu/receiver/' + id, - method: 'get' - }) -} - -// 新增储气罐 -export function addReceiver(data) { - return request({ - url: '/mudu/receiver', - method: 'post', - data: data - }) -} - -// 修改储气罐 -export function updateReceiver(data) { - return request({ - url: '/mudu/receiver', - method: 'put', - data: data - }) -} - -// 删除储气罐 -export function delReceiver(id) { - return request({ - url: '/mudu/receiver/' + id, - method: 'delete' - }) - -} diff --git a/src/api/mudu/records.js b/src/api/mudu/records.js deleted file mode 100644 index 6b63907..0000000 --- a/src/api/mudu/records.js +++ /dev/null @@ -1,46 +0,0 @@ -import request from '@/utils/request' - -// 查询检查记录列表 -export function listRecords(query) { - return request({ - url: '/mudu/records/list', - method: 'get', - params: query - }) -} - -// 查询检查记录详细 -export function getRecords(id) { - return request({ - url: '/mudu/records/' + id, - method: 'get' - }) -} - -// 新增检查记录 -export function addRecords(data) { - return request({ - url: '/mudu/records', - method: 'post', - data: data - }) -} - -// 修改检查记录 -export function updateRecords(data) { - return request({ - url: '/mudu/records', - method: 'put', - data: data - }) -} - -// 删除检查记录 -export function delRecords(id) { - return request({ - url: '/mudu/records/' + id, - method: 'delete' - }) - -} - diff --git a/src/api/mudu/train.js b/src/api/mudu/train.js deleted file mode 100644 index 846f468..0000000 --- a/src/api/mudu/train.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 查询培训列表 -export function listTrain(query) { - return request({ - url: '/mudu/train/list', - method: 'get', - params: query - }) -} - -// 查询培训详细 -export function getTrain(id) { - return request({ - url: '/mudu/train/' + id, - method: 'get' - }) -} - -// 新增培训 -export function addTrain(data) { - return request({ - url: '/mudu/train', - method: 'post', - data: data - }) -} - -// 修改培训 -export function updateTrain(data) { - return request({ - url: '/mudu/train', - method: 'put', - data: data - }) -} - -// 删除培训 -export function delTrain(id) { - return request({ - url: '/mudu/train/' + id, - method: 'delete' - }) -} diff --git a/src/api/mudu/transportation.js b/src/api/mudu/transportation.js deleted file mode 100644 index 56409dd..0000000 --- a/src/api/mudu/transportation.js +++ /dev/null @@ -1,47 +0,0 @@ -import request from '@/utils/request' - -// 查询交通运输列表 -export function listTransportation(query) { - return request({ - url: '/mudu/transportation/list', - method: 'get', - params: query - }) -} - -// 查询交通运输详细 -export function getTransportation(id) { - return request({ - url: '/mudu/transportation/' + id, - method: 'get' - }) -} - -// 新增交通运输 -export function addTransportation(data) { - return request({ - url: '/mudu/transportation', - method: 'post', - data: data - }) -} - -// 修改交通运输 -export function updateTransportation(data) { - return request({ - url: '/mudu/transportation', - method: 'put', - data: data - }) -} - -// 删除交通运输 -export function delTransportation(id) { - return request({ - url: '/mudu/transportation/' + id, - method: 'delete' - }) - -} - - diff --git a/src/api/mudu/trouble.js b/src/api/mudu/trouble.js deleted file mode 100644 index ccfe51b..0000000 --- a/src/api/mudu/trouble.js +++ /dev/null @@ -1,64 +0,0 @@ -import request from "@/utils/request"; -// 查询隐患工单列表 -export function listTrouble(query) { - return request({ - url: "/mudu/trouble/list", - method: "get", - params: query, - }); -} - -// 查询隐患工单详细 -export function getTrouble(id) { - return request({ - url: "/mudu/trouble/" + id, - method: "get", - }); -} - -// 新增隐患工单 -export function addTrouble(data) { - return request({ - url: "/mudu/trouble", - method: "post", - data: data, - }); -} - -// 修改隐患工单 -export function updateTrouble(data) { - return request({ - url: "/mudu/trouble", - method: "put", - data: data, - }); -} - -// 删除隐患工单 -export function delTrouble(id) { - return request({ - url: "/mudu/trouble/" + id, - method: "delete", - }); -} - -// 导出隐患工单 -export function exportTrouble(data) { - return request({ - url: "/mudu/trouble/export", - method: "post", - data, - }); -} - -// 导入隐患工单 -export function importTroubleTable(data) { - return request({ - url: "/mudu/trouble/importExcel", - method: "post", - headers: { - "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", - }, - data, - }); -} diff --git a/src/api/yingji/home.js b/src/api/yingji/home.js new file mode 100644 index 0000000..7a3668a --- /dev/null +++ b/src/api/yingji/home.js @@ -0,0 +1,18 @@ +/* + * @Descripttion: + * @version: + * @Author: JC9527 + * @Date: 2023-09-11 15:38:21 + * @LastEditors: JC9527 + * @LastEditTime: 2023-09-28 13:22:58 + */ +import request from '@/utils/request' + +// 首页表格 +export function indexRegionalism(params) { + return request({ + url: "/pharmaceuticals/bPlanEnterprise/tree", + method: "get", + params, + }); +} \ No newline at end of file diff --git a/src/api/yingji/index.js b/src/api/yingji/index.js index c6c9d4e..e36fed4 100644 --- a/src/api/yingji/index.js +++ b/src/api/yingji/index.js @@ -4,7 +4,7 @@ * @Author: JC9527 * @Date: 2023-09-11 15:38:21 * @LastEditors: JC9527 - * @LastEditTime: 2023-09-19 15:27:12 + * @LastEditTime: 2023-09-30 00:52:32 */ import request from '@/utils/request' @@ -44,7 +44,7 @@ export default { }, bPlanManageTwo(id){ return request({ - url: `/pharmaceuticals/bPlanManage/${id}`, + url: `/pharmaceuticals/bPlanEnterprise/${id}`, method:'get', }); }, @@ -55,10 +55,36 @@ export default { params }); }, - bPlanEnterprise(){ + bPlanEnterprise(method,data = null, params = null, id){ return request({ - url: `/pharmaceuticals/bPlanEnterprise`, + url: `/pharmaceuticals/bPlanEnterprise${id ? `/${id}` : ''}`, + method, + data, + params + }); + }, + // 查看计划明细 + planmx(params){ + return request({ + url: `/pharmaceuticals/bPlanEnterprise/planmx`, + method:'post', + params, + }); + }, + // 查询计划企业列表 + bPlanEnterpriseList(){ + return request({ + url: `/pharmaceuticals/bPlanEnterprise/list`, method:'get', }); }, + // 根据行政区划查询重点企业数量 + getBydistrict(params){ + return request({ + url: `/pharmaceuticals/bKeyEnterprise/getBydistrict`, + method:'get', + params + }); + }, + }; \ No newline at end of file diff --git a/src/api/yingji/keyEnterprise.js b/src/api/yingji/keyEnterprise.js index 8c4648c..6495096 100644 --- a/src/api/yingji/keyEnterprise.js +++ b/src/api/yingji/keyEnterprise.js @@ -68,6 +68,13 @@ export function enforcingDetail(data) { }) } +//执法列表详情 +export function enforcingGet(id) { + return request({ + url: `/pharmaceuticals/examine/${id}`, + method: 'get', + }) +} // 根据字段查询字典信息 export function listDist(query) { @@ -77,12 +84,34 @@ export function listDist(query) { params: query }) } - +//计划企业表数结构 +export function planeEnTree(data) { + return request({ + url: '/pharmaceuticals/bPlanEnterprise/tree', + method: 'get', + params:data + }) +} // 行政区划树结构 -export function xzTree(id) { +export function xzTree() { return request({ url: '/pharmaceuticals/administrative/tree', method: 'get', }) } - +//执法计划工作情况统计 +export function workStatistics(data) { + return request({ + url: '/pharmaceuticals/bPlanEnterprise/getZhifaCount', + method: 'get', + params:data + }) +} +//各区域执法计划 +export function quyuPlan(data) { + return request({ + url: '/pharmaceuticals/bPlanEnterprise/getplan', + method: 'get', + params:data + }) +} diff --git a/src/assets/images/bg1.png b/src/assets/images/bg1.png new file mode 100644 index 0000000..a2e6a26 Binary files /dev/null and b/src/assets/images/bg1.png differ diff --git a/src/assets/images/bg2.png b/src/assets/images/bg2.png new file mode 100644 index 0000000..6c47dda Binary files /dev/null and b/src/assets/images/bg2.png differ diff --git a/src/assets/images/ceB.jpg b/src/assets/images/ceB.jpg new file mode 100644 index 0000000..9507ef5 Binary files /dev/null and b/src/assets/images/ceB.jpg differ diff --git a/src/assets/images/ceT.jpg b/src/assets/images/ceT.jpg new file mode 100644 index 0000000..c4c1eda Binary files /dev/null and b/src/assets/images/ceT.jpg differ diff --git a/src/assets/images/tb1.png b/src/assets/images/tb1.png new file mode 100644 index 0000000..3599e79 Binary files /dev/null and b/src/assets/images/tb1.png differ diff --git a/src/assets/images/tb2.png b/src/assets/images/tb2.png new file mode 100644 index 0000000..caa6ada Binary files /dev/null and b/src/assets/images/tb2.png differ diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 1696f54..f6088d6 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -35,7 +35,7 @@ export default { const first = matched[0] if (!this.isDashboard(first)) { - matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched) + matched = [{ path: '/home', meta: { title: '首页' }}].concat(matched) } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) @@ -49,6 +49,7 @@ export default { }, handleLink(item) { const { redirect, path } = item + console.log(item); if (redirect) { this.$router.push(redirect) return diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index a9f63cb..cacf3c0 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -6,40 +6,56 @@ class="hamburger-container" @toggleClick="toggleSideBar" /> - - + /> --> +
- + + --> +
+ +
+
+
+ {{ dept.deptName }}    {{ username }} + + + +
+
+ + + 个人中心 + + 退出登录 + +
+
- -
- - -
个人中心 @@ -51,13 +67,13 @@ 退出登录 -
+ -->
\ No newline at end of file + diff --git a/src/permission.js b/src/permission.js index 40baf7c..b64458e 100644 --- a/src/permission.js +++ b/src/permission.js @@ -1,3 +1,11 @@ +/* + * @Descripttion: + * @version: + * @Author: JC9527 + * @Date: 2023-09-26 13:45:06 + * @LastEditors: JC9527 + * @LastEditTime: 2023-09-28 16:55:12 + */ import router from './router' import store from './store' import { Message } from 'element-ui' @@ -19,26 +27,37 @@ router.beforeEach((to, from, next) => { next({ path: '/' }) NProgress.done() } else { + store.dispatch("Getdistrict"); if (store.getters.roles.length === 0) { - // console.log(router.options); isRelogin.show = true // 判断当前用户是否已拉取完user_info信息 - store.dispatch('GetInfo').then(() => { + store.dispatch('GetInfo').then((res) => { isRelogin.show = false store.dispatch('GenerateRoutes').then(accessRoutes => { - console.log(accessRoutes); // 根据roles权限生成可访问的路由表 + console.log(res); router.addRoutes(accessRoutes) // 动态添加可访问路由表 - next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 + //刷新之后,要去的路由肯定是自己已经保存过的新路由 + let refresh = '' + if (store.state.user.new1.indexOf(to.path) != -1) { + refresh = to.path + } + console.log(to.path); + //进入添加的第一个路由 + next({ path: refresh || res[0].path }) }) }).catch(err => { - store.dispatch('LogOut').then(() => { - Message.error(err) - next({ path: '/' }) - }) + store.dispatch('LogOut').then(() => { + Message.error(err) + next({ path: '/' }) }) + }) } else { - next() + if (store.state.user.old1.indexOf(to.path) != -1 && store.state.user.new1.indexOf(to.path) == -1) { + next({ path: '/404' }) + } else { + next() + } } } } else { @@ -47,7 +66,7 @@ router.beforeEach((to, from, next) => { // 在免登录白名单,直接进入 next() } else { - next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 + next(`/login`) // 否则全部重定向到登录页 NProgress.done() } } diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 2287665..c70396a 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -11,7 +11,7 @@ const permission = { addRoutes: [], defaultRoutes: [], topbarRouters: [], - sidebarRouters: [] + sidebarRouters: [], }, mutations: { SET_ROUTES: (state, routes) => { @@ -45,7 +45,7 @@ const permission = { commit('SET_SIDEBAR_ROUTERS', constantRoutes.concat(sidebarRoutes)) commit('SET_DEFAULT_ROUTES', sidebarRoutes) commit('SET_TOPBAR_ROUTES', sidebarRoutes) - resolve(rewriteRoutes) + resolve(rewriteRoutes,1) }) }) } @@ -59,6 +59,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { route.children = filterChildren(route.children) } if (route.component) { + // Layout ParentView 组件特殊处理 if (route.component === 'Layout') { route.component = Layout @@ -126,7 +127,7 @@ export const loadView = (view) => { return (resolve) => require([`@/views/${view}`], resolve) } else { // 使用 import 实现生产环境的路由懒加载 - return () => import(`@/views/${view}`) + return (resolve) => require([`@/views/${view}`], resolve) } } diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 0c2d440..4820325 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,4 +1,5 @@ import { login, login2, logout, getInfo } from "@/api/login"; +import { xzTree, listDist } from "@/api/yingji/keyEnterprise"; import { getToken, setToken, removeToken } from "@/utils/auth"; const user = { @@ -9,10 +10,31 @@ const user = { roles: [], permissions: [], //存储用户id - dept: null + dept: null, + //存储路由 + oldRouter: [], + newRouter: [], + old1: [], + new1: [], + district:[], }, mutations: { + setOld: (state, route) => { + state.old1 = route + }, + SET_DISTRICT: (state,data) => { + state.district = data + }, + setNew: (state, route) => { + state.new1 = route + }, + getOldRouter: (state, route) => { + state.oldRouter = route + }, + getNewRouter: (state, route) => { + state.newRouter = route + }, get_dept: (state, id) => { state.dept = id; }, @@ -52,6 +74,19 @@ const user = { }); }); }, + // 获取行政区划 + Getdistrict({ commit }){ + return new Promise((resolve, reject) => { + xzTree() + .then((res) => { + commit("SET_DISTRICT", res.data); + resolve(); + }) + .catch((error) => { + reject(error); + }); + }); + }, // 匿名 login2({ commit }, userInfo) { const username = userInfo.username.trim(); @@ -89,9 +124,73 @@ const user = { } else { commit("SET_ROLES", ["ROLE_DEFAULT"]); } + let arr1 = [ + { + path: "/home", + name: "首页", + icon1: require("../../assets/images/index1.png"), + icon2: require("../../assets/images/index1-change.png"), + }, + { + path: "/planManage", + name: "计划管理", + icon1: require("../../assets/images/jihua.png"), + icon2: require("../../assets/images/jihua-change.png"), + }, + { + path: "/enforcing", + name: "执法结果", + icon1: require("../../assets/images/zhifa.png"), + icon2: require("../../assets/images/zhifa-change.png"), + }, + { + path: "/enterprise", + name: "企业名录", + icon1: require("../../assets/images/qiye.png"), + icon2: require("../../assets/images/qiye-change.png"), + }, + { + path: "/focusEnter", + name: "省重点企业", + icon1: require("../../assets/images/qiye.png"), + icon2: require("../../assets/images/qiye-change.png"), + }, + ] + let arr2 = [] + let A1 = [] + let A2 = [] + let toRouter = '' + commit("getOldRouter", arr1) + arr1.forEach((value) => { + A1.push(value.path) + }) + commit("setOld", A1) + if (res.roles.indexOf('admin') != -1) { + commit("getNewRouter", arr1) + commit("setNew", A1) + toRouter = arr1 + } else { + //区级和镇级 + if (user.dept.parentId != 0) { + arr2 = arr1.filter((value) => { + return value.path == "/planManage"; + }); + arr2.forEach((value) => { + A2.push(value.path) + }) + commit("getNewRouter", arr2) + commit("setNew", A2) + toRouter = arr2 + } else { + commit("getNewRouter", arr1) + commit("setNew", A1) + toRouter = arr1 + } + } + commit("SET_NAME", user.userName); commit("SET_AVATAR", avatar); - resolve(res); + resolve(toRouter); }) .catch((error) => { reject(error); diff --git a/src/views/components/dialog/index.vue b/src/views/components/dialog/index.vue index 67c6c65..cd6ca31 100644 --- a/src/views/components/dialog/index.vue +++ b/src/views/components/dialog/index.vue @@ -1,284 +1,361 @@ diff --git a/src/views/components/dialogTwo/index.vue b/src/views/components/dialogTwo/index.vue index 2b8c5d8..8924564 100644 --- a/src/views/components/dialogTwo/index.vue +++ b/src/views/components/dialogTwo/index.vue @@ -1,150 +1,324 @@ + diff --git a/src/views/components/myPagination/index.vue b/src/views/components/myPagination/index.vue index 57a6fc3..f09bf5f 100644 --- a/src/views/components/myPagination/index.vue +++ b/src/views/components/myPagination/index.vue @@ -4,7 +4,7 @@ * @Author: JC9527 * @Date: 2023-09-04 13:11:33 * @LastEditors: JC9527 - * @LastEditTime: 2023-09-20 09:31:57 + * @LastEditTime: 2023-09-27 16:36:54 --> + \ No newline at end of file diff --git a/src/views/yingji/echarts/executive.vue b/src/views/yingji/echarts/executive.vue new file mode 100644 index 0000000..d38c7b9 --- /dev/null +++ b/src/views/yingji/echarts/executive.vue @@ -0,0 +1,122 @@ + + + + \ No newline at end of file diff --git a/src/views/yingji/echarts/finishRate.vue b/src/views/yingji/echarts/finishRate.vue index 1bd9f57..7ffbfac 100644 --- a/src/views/yingji/echarts/finishRate.vue +++ b/src/views/yingji/echarts/finishRate.vue @@ -1,16 +1,61 @@ -