From 7fa87a1df7d190b54373d96d9190956ff4f488d5 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Fri, 2 Feb 2024 09:18:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=A1=E9=87=8F=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 9 ++ src/utils/api/index.js | 41 ++++++ src/views/dataReport/index.vue | 6 +- src/views/equipment/index.vue | 4 + .../components/addunitDialog.vue | 131 +++++++++++++++++ src/views/equipment/unitController/index.vue | 139 ++++++++++++++++++ vue.config.js | 4 +- 7 files changed, 329 insertions(+), 5 deletions(-) create mode 100644 src/views/equipment/unitController/components/addunitDialog.vue create mode 100644 src/views/equipment/unitController/index.vue diff --git a/src/router/index.js b/src/router/index.js index 6a8bc034..72788fd0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -87,6 +87,15 @@ const routes = [ title: "监测设备类型", }, }, + { + path: "/equipment/unitController", + component: () => + import("../views/equipment/unitController/index.vue"), + name: "unitController", + meta: { + title: "计量单位配置", + }, + }, ], }, { diff --git a/src/utils/api/index.js b/src/utils/api/index.js index e12ce104..5b3bf4fc 100644 --- a/src/utils/api/index.js +++ b/src/utils/api/index.js @@ -358,6 +358,47 @@ export function modevDeleteApi(data) { }, }); } +//计量单位相关接口Unit Controller +//查询全部 +export function unitListAllApi(data) { + return request({ + url: "/unit/listAll", + method: "get", + params: data, + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + }, + }); +} +//新增 +export function unitAddApi(data) { + return request({ + url: "/unit/add", + method: "post", + data, + }); +} +//修改更新 +export function unitUpdateApi(data) { + return request({ + url: "/unit/update", + method: "post", + data, + }); +} + +//删除 +export function unitDeleteApi(data) { + return request({ + url: "/unit/delete", + method: "post", + params: data, + headers: { + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + }, + }); +} + //查询全部 export function modevListAllApi(data) { return request({ diff --git a/src/views/dataReport/index.vue b/src/views/dataReport/index.vue index 926dac93..8023408a 100644 --- a/src/views/dataReport/index.vue +++ b/src/views/dataReport/index.vue @@ -536,12 +536,12 @@ export default { height: 100%; //background: #fcc; .leftTree { - min-width: 220px; - max-width: 220px; + min-width: 280px; + max-width: 280px; height: 100%; overflow: auto; //border: 1px solid #fff; - margin-right: 24px; + margin-right: 16px; background: rgba(8, 9, 36, 0.28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); diff --git a/src/views/equipment/index.vue b/src/views/equipment/index.vue index 8ef47ef1..47dcf744 100644 --- a/src/views/equipment/index.vue +++ b/src/views/equipment/index.vue @@ -44,6 +44,10 @@ export default { name: "监测设备类型管理", path: "/equipment/modevtype", }, + { + name: "计量单位管理", + path: "/equipment/unitController", + }, ], }; }, diff --git a/src/views/equipment/unitController/components/addunitDialog.vue b/src/views/equipment/unitController/components/addunitDialog.vue new file mode 100644 index 00000000..ad425d4d --- /dev/null +++ b/src/views/equipment/unitController/components/addunitDialog.vue @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + diff --git a/src/views/equipment/unitController/index.vue b/src/views/equipment/unitController/index.vue new file mode 100644 index 00000000..a218676d --- /dev/null +++ b/src/views/equipment/unitController/index.vue @@ -0,0 +1,139 @@ + + + + 计量单位管理 + + + 添加计量单位 + + + + + + + + 编辑 + 删除 + + + + + + + + + + diff --git a/vue.config.js b/vue.config.js index d03e29f8..a393c6ce 100644 --- a/vue.config.js +++ b/vue.config.js @@ -20,8 +20,8 @@ module.exports = defineConfig({ proxy: { "/cac-api": { //表示拦截以/api开头的请求路径 - //target: "http://192.168.1.190:88", //200服务器 - target: "http://dev.xinyingpower.com:40080/", //dell服务器 + target: "http://192.168.1.190:88", //200服务器 + //target: "http://dev.xinyingpower.com:40080/", //dell服务器 changOrigin: true, //是否开启跨域 pathRewrite: { "^/api": "/cac-api", //重写api,把api变成空字符,因为我们真正请求的路径是没有api的