From 9d72def8f11bdb72475145d7b60a8d2330ccd541 Mon Sep 17 00:00:00 2001 From: "2309368887@qq.com" <2309368887@qq.com> Date: Fri, 1 Jul 2022 09:09:28 +0800 Subject: [PATCH] quyu --- src/api/model/vm.js | 133 +++++++++- src/config/route.js | 19 ++ src/views/hrm/certificates.vue | 233 +++++++++++++++++ src/views/login/components/passwordForm.vue | 2 +- src/views/opm/clear.vue | 8 +- src/views/opm/cooler.vue | 7 +- src/views/opm/fire.vue | 6 +- src/views/opm/high.vue | 8 +- src/views/opm/hoisting.vue | 8 +- src/views/opm/operation.vue | 85 +++---- src/views/opm/operation_form.vue | 27 +- src/views/opm/opl.vue | 14 +- src/views/opm/oplcate.vue | 18 +- src/views/opm/preheat.vue | 103 ++++---- src/views/opm/soil.vue | 8 +- src/views/opm/space.vue | 7 +- src/views/opm/usecl.vue | 8 +- src/views/rpm/remployee.vue | 4 +- src/views/rpm/rparty.vue | 2 +- src/views/vm/people.vue | 189 ++++++++++++++ src/views/vm/visit.vue | 263 ++++++++++++++++++++ src/views/vm/visit_form.vue | 228 +++++++++++++++++ src/views/vm/visitor.vue | 216 ++++++++++++++++ 23 files changed, 1443 insertions(+), 153 deletions(-) create mode 100644 src/views/hrm/certificates.vue create mode 100644 src/views/vm/people.vue create mode 100644 src/views/vm/visit_form.vue diff --git a/src/api/model/vm.js b/src/api/model/vm.js index b7b2580e..d8555ac0 100644 --- a/src/api/model/vm.js +++ b/src/api/model/vm.js @@ -5,7 +5,7 @@ export default { /*访客 */ visitor: { - create: { + createz: { name: "注册", req: async function (data) { return await http.post( @@ -13,11 +13,142 @@ export default { data); } }, + list: { + name: "获取", + req: async function (data) { + return await http.get( + `${config.API_URL}/vm/visitor/`, + data + ); + } + }, + read:{ + name: "详情", + req: async function (id) { + return await http.get( + `${config.API_URL}/vm/visitor/${id}/`); + } + }, + create: { + name: "创建", + req: async function (data) { + return await http.post( + `${config.API_URL}/vm/visitor/`, + data); + } + }, + update: { + name: "更新", + req: async function (id, data) { + return await http.put( + `${config.API_URL}/vm/visitor/${id}/`, + data); + } + }, + delete: { + name: "删除", + req: async function (id) { + return await http.delete( + `${config.API_URL}/vm/visitor/${id}/`); + } + } + + + }, + /*来访项目 */ + visit: { + + + list: { + name: "获取", + req: async function (data) { + return await http.get( + `${config.API_URL}/vm/visit/`, + data + ); + } + }, + read:{ + name: "详情", + req: async function (id) { + return await http.get( + `${config.API_URL}/vm/visit/${id}/`); + } + }, + create: { + name: "创建", + req: async function (data) { + return await http.post( + `${config.API_URL}/vm/visit/`, + data); + } + }, + update: { + name: "更新", + req: async function (id, data) { + return await http.put( + `${config.API_URL}/vm/visit/${id}/`, + data); + } + }, + delete: { + name: "删除", + req: async function (id) { + return await http.delete( + `${config.API_URL}/vm/visit/${id}/`); + } + } }, + /*项目人员绑定定 */ + people: { + + + list: { + name: "获取", + req: async function (data) { + return await http.get( + `${config.API_URL}/vm/vpeople/`, + data + ); + } + }, + read:{ + name: "详情", + req: async function (id) { + return await http.get( + `${config.API_URL}/vm/vpeople/${id}/`); + } + }, + create: { + name: "创建", + req: async function (data) { + return await http.post( + `${config.API_URL}/vm/vpeople/`, + data); + } + }, + update: { + name: "更新", + req: async function (id, data) { + return await http.put( + `${config.API_URL}/vm/vpeople/${id}/`, + data); + } + }, + delete: { + name: "删除", + req: async function (id) { + return await http.delete( + `${config.API_URL}/vm/vpeople/${id}/`); + } + } + + }, + } \ No newline at end of file diff --git a/src/config/route.js b/src/config/route.js index 6c36bbb8..b1e74226 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -362,6 +362,15 @@ const routes = [ "icon": "el-icon-menu", }, "component": "vm/visitor" + },{ + "name": "people", + "path": "/vm/people", + "meta": { + "title": "访客人员", + "icon": "el-icon-menu", + "hidden": true + }, + "component": "vm/people" }, ] }, @@ -422,6 +431,16 @@ const routes = [ "component": "hrm/employee" } , + { + "name": "certificates", + "path": "/hrm/certificates", + "meta": { + "title": "证书列表", + "icon": "el-icon-menu", + }, + "component": "hrm/certificates" + } + , { "name": "certificate", "path": "/hrm/certificate", diff --git a/src/views/hrm/certificates.vue b/src/views/hrm/certificates.vue new file mode 100644 index 00000000..c7d85248 --- /dev/null +++ b/src/views/hrm/certificates.vue @@ -0,0 +1,233 @@ + + diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue index 15286374..bc1a8279 100644 --- a/src/views/login/components/passwordForm.vue +++ b/src/views/login/components/passwordForm.vue @@ -223,7 +223,7 @@ export default { this.visitorsdialog=true; }, submitvisitor(){ - this.$API.vm.visitor.create + this.$API.vm.visitor.createz .req(this.visitorform) .then((res) => { this.$message.success("创建成功!"); diff --git a/src/views/opm/clear.vue b/src/views/opm/clear.vue index 24e9a7de..45f5566f 100644 --- a/src/views/opm/clear.vue +++ b/src/views/opm/clear.vue @@ -791,7 +791,8 @@ export default { .req(row.id) .then((res) => { this.$message.success("作业人员删除成功"); - + + this.$refs.workerTable.refresh(); return res; }) .catch((err) => { @@ -807,6 +808,7 @@ export default { .req(this.formworker) .then((res) => { this.$message.success("创建作业人员成功"); + this.$refs.workerTable.refresh(); this.workerdialog = false; }) @@ -839,6 +841,8 @@ export default { .req(this.formgas) .then((res) => { this.$message.success("创建气体浓度检测记录成功"); + this.$refs.gasTable.refresh(); + this.gasdialog = false; }) @@ -854,7 +858,7 @@ export default { .req(row.id) .then((res) => { this.$message.success("气体浓度检测记录删除成功"); - + this.$refs.gasTable.refresh(); return res; }) .catch((err) => { diff --git a/src/views/opm/cooler.vue b/src/views/opm/cooler.vue index 0a118a95..2c12ba2b 100644 --- a/src/views/opm/cooler.vue +++ b/src/views/opm/cooler.vue @@ -485,7 +485,7 @@ export default { this.oplId = res.id; this.getworkerList(res.id); - this.getgasList(res.id); + return res; }) .catch((err) => { @@ -497,7 +497,7 @@ export default { this.$message.success("基本修改成功!"); this.issave = true; this.active = 1; - this.getgasList(this.oplId); + this.getworkerList(this.oplId); }); @@ -538,7 +538,7 @@ export default { .req(row.id) .then((res) => { this.$message.success("作业人员删除成功"); - + this.$refs.workerTable.refresh(); return res; }) .catch((err) => { @@ -554,6 +554,7 @@ export default { .req(this.formworker) .then((res) => { this.$message.success("创建作业人员成功"); + this.$refs.workerTable.refresh(); this.workerdialog = false; }) diff --git a/src/views/opm/fire.vue b/src/views/opm/fire.vue index a3b50064..39da1543 100644 --- a/src/views/opm/fire.vue +++ b/src/views/opm/fire.vue @@ -795,7 +795,7 @@ export default { .req(row.id) .then((res) => { this.$message.success("作业人员删除成功"); - + this.$refs.workerTable.refresh(); return res; }) .catch((err) => { @@ -811,6 +811,7 @@ export default { .req(this.formworker) .then((res) => { this.$message.success("创建作业人员成功"); + this.$refs.workerTable.refresh(); this.workerdialog = false; }) @@ -843,6 +844,7 @@ export default { .req(this.formgas) .then((res) => { this.$message.success("创建气体检测记录成功"); + this.$refs.gasTable.refresh(); this.gasdialog = false; }) @@ -858,7 +860,7 @@ export default { .req(row.id) .then((res) => { this.$message.success("气体检测记录删除成功"); - + this.$refs.gasTable.refresh(); return res; }) .catch((err) => { diff --git a/src/views/opm/high.vue b/src/views/opm/high.vue index 0ad353a5..4b8df3c3 100644 --- a/src/views/opm/high.vue +++ b/src/views/opm/high.vue @@ -575,7 +575,7 @@ export default { this.oplId = res.id; this.getworkerList(res.id); - this.getgasList(res.id); + return res; }) .catch((err) => { @@ -587,7 +587,7 @@ export default { this.$message.success("基本修改成功!"); this.issave = true; this.active = 1; - this.getgasList(this.oplId); + this.getworkerList(this.oplId); }); @@ -628,7 +628,7 @@ export default { .req(row.id) .then((res) => { this.$message.success("作业人员删除成功"); - + this.$refs.workerTable.refresh(); return res; }) .catch((err) => { @@ -645,7 +645,7 @@ export default { .then((res) => { this.$message.success("创建作业人员成功"); this.workerdialog = false; - + this.$refs.workerTable.refresh(); }) .catch((err) => { return err; diff --git a/src/views/opm/hoisting.vue b/src/views/opm/hoisting.vue index e648d6f8..8feed46d 100644 --- a/src/views/opm/hoisting.vue +++ b/src/views/opm/hoisting.vue @@ -575,7 +575,7 @@ export default { this.oplId = res.id; this.getworkerList(res.id); - this.getgasList(res.id); + return res; }) .catch((err) => { @@ -587,7 +587,7 @@ export default { this.$message.success("基本修改成功!"); this.issave = true; this.active = 1; - this.getgasList(this.oplId); + this.getworkerList(this.oplId); }); @@ -628,7 +628,7 @@ export default { .req(row.id) .then((res) => { this.$message.success("作业人员删除成功"); - + this.$refs.workerTable.refresh(); return res; }) .catch((err) => { @@ -645,7 +645,7 @@ export default { .then((res) => { this.$message.success("创建作业人员成功"); this.workerdialog = false; - + this.$refs.workerTable.refresh(); }) .catch((err) => { return err; diff --git a/src/views/opm/operation.vue b/src/views/opm/operation.vue index 6a7d0c73..ad4d5747 100644 --- a/src/views/opm/operation.vue +++ b/src/views/opm/operation.vue @@ -24,7 +24,7 @@ - + @@ -164,6 +174,7 @@ export default { }; }, methods: { + //添加 add() { this.dialog.save = true; @@ -186,14 +197,15 @@ export default { this.$refs.saveDialog.open("show").setData(row); }); }, - //创建作业许可证 - creatopl(row){ - - this.$router.push({name: "opl", - query:{ - id: row.id - } }) - }, + //创建作业许可证 + creatopl(row) { + this.$router.push({ + name: "opl", + query: { + id: row.id, + }, + }); + }, //权限设置 permission() { this.dialog.permission = true; @@ -201,34 +213,23 @@ export default { this.$refs.permissionDialog.open(); }); }, - //删除 - async table_del(row) { - var reqData = { id: row.id }; - var res = await this.$API.demo.post.post(reqData); - if (res.code == 200) { - this.$refs.table.refresh(); - this.$message.success("删除成功"); - } else { - this.$alert(res.message, "提示", { type: "error" }); - } - }, - //批量删除 - async batch_del() { - this.$confirm( - `确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`, - "提示", - { - type: "warning", - } - ) - .then(() => { - const loading = this.$loading(); - this.$refs.table.refresh(); - loading.close(); - this.$message.success("操作成功"); + + //删除 + table_del(row) { + this.$API.opm.operation.delete + .req(row.id) + .then((res) => { + this.$message.success("删除成功"); + this.$refs.tableoperation.refresh(); + return res; }) - .catch(() => {}); + .catch((err) => { + return err; + }); + }, + + //表格选择后回调事件 selectionChange(selection) { this.selection = selection; @@ -258,15 +259,15 @@ export default { } }); } - filter(this.$refs.table.tableData); + filter(this.$refs.tableoperation.tableData); return target; }, //本地更新数据 handleSaveSuccess(data, mode) { if (mode == "add") { - this.$refs.table.refresh(); + this.$refs.tableoperation.refresh(); } else if (mode == "edit") { - this.$refs.table.refresh(); + this.$refs.tableoperation.refresh(); } }, resetQuery() { diff --git a/src/views/opm/operation_form.vue b/src/views/opm/operation_form.vue index 154d36a9..521cb931 100644 --- a/src/views/opm/operation_form.vue +++ b/src/views/opm/operation_form.vue @@ -17,17 +17,17 @@ > - + - + - + - + - + - + - + - + - + { - // var res = await this.$API.system.table.info.get(params) - // this.loading = false - // this.form = res.data - // },400) Object.assign(this.form, data); }, //设置过滤项 diff --git a/src/views/opm/opl.vue b/src/views/opm/opl.vue index a9fbd36f..d0f4046d 100644 --- a/src/views/opm/opl.vue +++ b/src/views/opm/opl.vue @@ -33,7 +33,7 @@ { + this.apiObj = res; + }); + }, + + //作业许可证类型列表 getoplcate() { this.$API.opm.oplcate.list.req({ page: 0 }).then((res) => { this.oplcateList = res; diff --git a/src/views/opm/oplcate.vue b/src/views/opm/oplcate.vue index 24da7283..f00ba9fa 100644 --- a/src/views/opm/oplcate.vue +++ b/src/views/opm/oplcate.vue @@ -90,8 +90,8 @@ }, //删除 async table_del(row){ - var reqData = {id: row.id} - var res = await this.$API.demo.post.post(reqData); + + var res = await this.$API.opm.oplcate.delete( row.id); if(res.code == 200){ this.$refs.table.refresh() this.$message.success("删除成功") @@ -99,19 +99,7 @@ this.$alert(res.message, "提示", {type: 'error'}) } }, - //批量删除 - async batch_del(){ - this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`, '提示', { - type: 'warning' - }).then(() => { - const loading = this.$loading(); - this.$refs.table.refresh() - loading.close(); - this.$message.success("操作成功") - }).catch(() => { - - }) - }, + //表格选择后回调事件 selectionChange(selection){ this.selection = selection; diff --git a/src/views/opm/preheat.vue b/src/views/opm/preheat.vue index cd916b39..460b59fd 100644 --- a/src/views/opm/preheat.vue +++ b/src/views/opm/preheat.vue @@ -64,9 +64,25 @@ /> - - + + + + + + @@ -91,7 +107,7 @@ - + @@ -141,8 +157,12 @@

1、发生火灾时立即使用消防器材进行灭火

-

2、高温物料冲入眼睛时用洗眼器进行持续冲洗,严重时拨打120送医。

-

3、发生人员烫伤时用喷淋装置对烫伤部位进行冲洗或用清水浸泡,用干净的纱布或衣物盖住被烫伤部位,伤势严重时立即拨打120送医。若贴身衣服与伤口粘在一起时,可用剪刀剪开,然后缓慢剥离衣物。

+

+ 2、高温物料冲入眼睛时用洗眼器进行持续冲洗,严重时拨打120送医。 +

+

+ 3、发生人员烫伤时用喷淋装置对烫伤部位进行冲洗或用清水浸泡,用干净的纱布或衣物盖住被烫伤部位,伤势严重时立即拨打120送医。若贴身衣服与伤口粘在一起时,可用剪刀剪开,然后缓慢剥离衣物。 +

@@ -189,6 +209,7 @@ row-key="id" hidePagination stripe + > - diff --git a/src/views/vm/visitor.vue b/src/views/vm/visitor.vue index e69de29b..3ee7a5f3 100644 --- a/src/views/vm/visitor.vue +++ b/src/views/vm/visitor.vue @@ -0,0 +1,216 @@ + +