diff --git a/src/api/model/em.js b/src/api/model/em.js index ceac5338..0f2e92f3 100644 --- a/src/api/model/em.js +++ b/src/api/model/em.js @@ -2,10 +2,10 @@ import config from "@/config" import http from "@/utils/request" /*EM接口*/ export default { - - equipment: { + // 测点集 + mgroup: { list: { - name: "获取列表", + name: "测点集列表", req: async function(data){ return await http.get( `${config.API_URL}/em/equipment/`, @@ -14,7 +14,7 @@ export default { } }, item: { - name: "获取详情", + name: "获取测点集详情", req: async function(id){ return await http.get( `${config.API_URL}/em/equipment/${id}/` @@ -36,41 +36,38 @@ export default { `${config.API_URL}/em/equipment/`, data); } - } - }, - mpoint: { - list: { - name: "获取列表", - req: async function(data){ - return await http.get( - `${config.API_URL}/em/mpoint/`, - data - ); - } }, - item: { - name: "获取详情", + delete: { + name: "删除", req: async function(id){ - return await http.get( - `${config.API_URL}/em/mpoint/${id}/` - ); + return await http.delete( + `${config.API_URL}/em/equipment/${id}/`); } }, - update: { - name: "更新", - req: async function(id, data){ - return await http.put( - `${config.API_URL}/em/mpoint/${id}/`, - data); - } - }, - create: { - name: "创建", + deletes: { + name: "批量删除", req: async function(data){ return await http.post( - `${config.API_URL}/em/mpoint/`, + `${config.API_URL}/em/equipment/deletes/`, data); } - } + }, + cquery: { + name: "复杂查询", + req: async function(data){ + return await http.post( + `${config.API_URL}/em/equipment/cquery/`, + data); + } + }, + deleteHard: { + name: "批量物理删除", + req: async function(data){ + return await http.post( + `${config.API_URL}/em/equipment/deletes_hard/`, + data); + } + }, }, + } \ No newline at end of file diff --git a/src/api/model/enm.js b/src/api/model/enm.js new file mode 100644 index 00000000..38e41d2f --- /dev/null +++ b/src/api/model/enm.js @@ -0,0 +1,216 @@ +import config from "@/config" +import http from "@/utils/request" +/*EM接口*/ +export default { + // 测点集 + mgroup: { + list: { + name: "测点集列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/enm/mgroup/`, + data + ); + } + }, + item: { + name: "获取测点集详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/enm/mgroup/${id}/` + ); + } + }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/enm/mgroup/${id}/`, + data); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/mgroup/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/enm/mgroup/${id}/`); + } + }, + deletes: { + name: "批量删除", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/mgroup/deletes/`, + data); + } + }, + cquery: { + name: "复杂查询", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/mgroup/cquery/`, + data); + } + }, + deleteHard: { + name: "批量物理删除", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/mgroup/deletes_hard/`, + data); + } + }, + }, + + // 测点 + mpoint: { + mplog: { + name: "测点原始记录", + req: async function(data){ + return await http.get( + `${config.API_URL}/enm/mplog/`, + data + ); + } + }, + list: { + name: "测点列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/enm/mpoint/`, + data + ); + } + }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/enm/mpoint/${id}/` + ); + } + }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/enm/mpoint/${id}/`, + data); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/mpoint/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/enm/mpoint/${id}/`); + } + }, + deletes: { + name: "批量删除", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/mpoint/deletes/`, + data); + } + }, + cquery: { + name: "复杂查询", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/mpoint/cquery/`, + data); + } + }, + deleteHard: { + name: "批量物理删除", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/mpoint/deletes_hard/`, + data); + } + }, + }, + //班组 + team: { + list: { + name: "班组列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/enm/team/`, + data + ); + } + }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/enm/team/${id}/` + ); + } + }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/enm/team/${id}/`, + data); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/team/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/enm/team/${id}/`); + } + }, + deletes: { + name: "批量删除", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/team/deletes/`, + data); + } + }, + cquery: { + name: "复杂查询", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/team/cquery/`, + data); + } + }, + deleteHard: { + name: "批量物理删除", + req: async function(data){ + return await http.post( + `${config.API_URL}/enm/team/deletes_hard/`, + data); + } + }, + }, +} \ No newline at end of file diff --git a/src/api/model/qm.js b/src/api/model/qm.js new file mode 100644 index 00000000..f8f2c17e --- /dev/null +++ b/src/api/model/qm.js @@ -0,0 +1,27 @@ +import config from "@/config" +import http from "@/utils/request" + +export default { + getQuastat: { + url: `${config.API_URL}/qm/quastat/`, + name: "质量报告分析", + get: async function(data={}){ + return await http.get(this.url, data); + } + }, + createQuastat: { + url: `${config.API_URL}/qm/quastat/`, + name: "质量报告分析", + post: async function(data={}){ + return await http.post(this.url, data); + } + }, + getTestItem: { + url: `${config.API_URL}/qm/testitem/`, + name: "质检项目", + get: async function(data={}){ + return await http.get(this.url, data); + } + }, + +} diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js new file mode 100644 index 00000000..66b7c4ce --- /dev/null +++ b/src/api/model/wpm.js @@ -0,0 +1,101 @@ +import config from "@/config" +import http from "@/utils/request" +/*EM接口*/ +export default { + //值班记录 + sflog: { + list: { + name: "值班记录列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/wpm/sflog/`, + data + ); + } + }, + item: { + name: "获取详情", + req: async function(id){ + return await http.get( + `${config.API_URL}/wpm/sflog/${id}/` + ); + } + }, + update: { + name: "更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/wpm/sflog/${id}/`, + data); + } + }, + create: { + name: "创建", + req: async function(data){ + return await http.post( + `${config.API_URL}/wpm/sflog/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/wpm/sflog/${id}/`); + } + }, + deletes: { + name: "批量删除", + req: async function(data){ + return await http.post( + `${config.API_URL}/wpm/sflog/deletes/`, + data); + } + }, + cquery: { + name: "复杂查询", + req: async function(data){ + return await http.post( + `${config.API_URL}/wpm/sflog/cquery/`, + data); + } + }, + deleteHard: { + name: "批量物理删除", + req: async function(data){ + return await http.post( + `${config.API_URL}/wpm/sflog/deletes_hard/`, + data); + } + }, + }, + //停机记录 + stlog: { + list: { + name: "停机记录列表", + req: async function(data){ + return await http.get( + `${config.API_URL}/wpm/stlog/`, + data + ); + } + }, + stsflog: { + name: "值班停机关系", + req: async function(data){ + return await http.get( + `${config.API_URL}/wpm/stsflog/`, + data + ); + } + }, + update: { + name: "值班停机关系更新", + req: async function(id, data){ + return await http.put( + `${config.API_URL}/wpm/stsflog/${id}/`, + data); + } + }, + }, +} \ No newline at end of file diff --git a/src/config/route.js b/src/config/route.js index e4bef1f1..ce094f5e 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -214,7 +214,7 @@ const routes = [ "icon": "el-icon-grid", "perms": ["equipment"] }, - "component": "em/equipment" + "component": "em/equipment2" }, { "name": "em", @@ -224,7 +224,7 @@ const routes = [ "icon": "el-icon-grid", "perms": ["mpoint"] }, - "component": "em/equipment" + "component": "em/mpoint" }, ] }, diff --git a/src/layout/index.vue b/src/layout/index.vue index 2aa4e3d5..c73b86c6 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -83,7 +83,7 @@
- +
@@ -228,10 +228,13 @@ }, computed:{ baseName(){ - return this.$TOOL.data.get("BASE_INFO").base.base_name; + let baseName = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_name:'智能管理平台'; + return baseName; }, baseLogo(){ - return this.$TOOL.data.get("BASE_INFO").base.base_logo + let base_logo = this.$TOOL.data.get("BASE_INFO")!==null?this.$TOOL.data.get("BASE_INFO").base.base_logo:'img/logo.png'; + + return base_logo }, ismobile(){ return this.$store.state.global.ismobile diff --git a/src/views/em/equipment.vue b/src/views/em/equipment.vue index 15ee414e..5851a265 100644 --- a/src/views/em/equipment.vue +++ b/src/views/em/equipment.vue @@ -2,9 +2,7 @@
- - +