From 0bff96af1c4a126badc674201ca867ad7e836335 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 26 Apr 2024 17:03:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=BC=82=E5=B8=B8=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/enm_energy/electric_hour.vue | 2200 ++++++++++++++++++++---- src/views/enm_rm/logDetail.vue | 284 +-- 2 files changed, 1992 insertions(+), 492 deletions(-) diff --git a/src/views/enm_energy/electric_hour.vue b/src/views/enm_energy/electric_hour.vue index aba53bc3..615c40d4 100644 --- a/src/views/enm_energy/electric_hour.vue +++ b/src/views/enm_energy/electric_hour.vue @@ -1,364 +1,1854 @@ + + {{ item[1] }} + + + {{ item[1] }} + + + {{ item[1] }} + + + {{ item[1] }} + + + {{ item[1] }} + + + {{ item[1] }} + + {{ item[1] }} + {{ item[2] }} + + + {{ item[3] }} + + {{ item[4] }} + {{ item[5] }} + {{ item[6] }} + {{ item[7] }} + {{ item[8] }} + {{ item[9] }} + {{ item[10] }} + {{ item[11] }} + {{ item[12] }} + {{ item[13] }} + {{ item[14] }} + {{ item[15] }} + {{ item[16] }} + {{ item[17] }} + {{ item[18] }} + {{ item[19] }} + {{ item[20] }} + {{ item[21] }} + {{ item[22] }} + {{ item[23] }} + {{ item[24] }} + + {{ item[25] }} + + + {{ item[26] }} + + + {{ item[27] }} + + + + + + + + \ No newline at end of file +.printWrap { + width: 100%; + overflow-x: scroll; +} + diff --git a/src/views/enm_rm/logDetail.vue b/src/views/enm_rm/logDetail.vue index f078f607..b65dc8c3 100644 --- a/src/views/enm_rm/logDetail.vue +++ b/src/views/enm_rm/logDetail.vue @@ -20,8 +20,7 @@ + >新增异常 @@ -96,11 +96,11 @@ :sm="24" v-if="mgroupId == '3555859873776693248'" > - + @@ -299,10 +299,11 @@ @@ -348,7 +349,7 @@ 编辑 @@ -358,7 +359,7 @@ 删除 @@ -366,13 +367,13 @@ - + - + @@ -575,12 +577,9 @@ - + @@ -588,22 +587,43 @@ + + + + + + + + + + + - - - - - - - - + - - - - - @@ -711,31 +693,34 @@ export default { visible: false, hideDelete: true, isSaveing: false, + sflogExpVisiable: false, activeName: "fourth", - expTitle: "新增异常", + stlogTitle: "新增异常", sflogItem: {}, form: {}, thirdForm: { num: "", }, - expForm: { - happen_time: "", - cate: "", + stlogForm: { + current_sflog: "", + current_note: "", title: "", + start_time: "", + end_time: "", + cate: "", reason: "", measure: "", - duration: 0, - sflog: "", + handler: "", + mgroup: "", }, query: { page: 0, }, rules: { - happen_time: [{ required: true, message: "请选择发生时间" }], - title: [{ required: true, message: "请填写异常名称" }], - cate: [{ required: true, message: "请选择原因类别" }], - reason: [{ required: true, message: "请填写异常原因" }], - measure: [{ required: true, message: "请填写处置措施" }], + start_time: [{ required: true, message: "请选择发生时间" }], + current_note: [ + { required: true, message: "请填写值班异常处理备注" }, + ], }, sflogexpType: "1", typeOptions: [ @@ -755,8 +740,9 @@ export default { this.mgroupId = this.$route.query.mgroupId; let form = this.$TOOL.data.get("sflogItem"); this.form = JSON.parse(form); + console.log(this.form); this.getTeam(); - this.getSflogexp(); + this.getStlog(); }, methods: { handleClick(e) { @@ -835,80 +821,63 @@ export default { }, //***** fourth 异常 ****** */ //获取异常列表 - getSflogexp() { + getStlog() { let obj = {}; obj.page = 0; obj.sflog = this.form.id; - this.$API.wpm.sflogexp.list.req(obj).then((res) => { - this.sflogexpList = res; + this.$API.wpm.stlog.list.req(obj).then((res) => { + this.stlogList = res; }); }, + //异常添加 - addExp() { - this.expForm = {}; - this.expForm.happen_time = ""; - this.expForm.cate = ""; - this.expForm.title = ""; - this.expForm.reason = ""; - this.expForm.measure = ""; - this.expForm.duration = 0; - this.expForm.sflog = this.form.id; - this.expTitle = "新增异常"; + addStlog() { + console.log("USER_INFO", this.$TOOL.data.get("USER_INFO")); + this.stlogForm.current_sflog = this.form.id; + this.stlogForm.current_note = ""; + this.stlogForm.cate = "1"; + this.stlogForm.title = ""; + this.stlogForm.reason = ""; + this.stlogForm.measure = ""; + this.stlogForm.start_time = ""; + this.stlogForm.end_time = ""; + this.stlogForm.handler = this.$TOOL.data.get("USER_INFO").id; + this.stlogForm.mgroup = this.mgroupId; + this.stlogTitle = "新增异常"; this.visible = true; }, //异常编辑 - sflogexp_edit(row) { - Object.assign(this.expForm, row); - this.expTitle = "编辑异常"; - this.expForm.handler = this.$TOOL.data.get("USER_INFO").id; - if (this.expForm.duration > 0) { - this.sflogexpType = "0"; - } else { - this.sflogexpType = "1"; - } + editStlog(row) { + this.stlogTitle = "编辑异常"; + this.stlogForm = row; this.visible = true; }, - //异常删除 - async sflogexp_delete(row) { - this.$confirm(`确定删除选中的记录吗?`, "提示", { - type: "warning", - }).then(() => { - this.$API.wpm.sflogexp.delete - .req(row.id) - .then((res) => { - this.$message.success("删除成功"); - this.$refs.expTable.refresh(); - }) - .catch((err) => { - this.$message.success(err); - }); - }); - }, + //新增异常提交 submit4() { let that = this; - that.$refs.expForms.validate(async (valid) => { + that.$refs.stlogForms.validate(async (valid) => { if (valid) { that.isSaveing = true; - if (that.expTitle == "新增异常") { + if (that.stlogTitle == "新增异常") { that.$API.wpm.stlog.create - .req(that.expForm) + .req(that.stlogForm) .then((res) => { that.isSaveing = false; that.visible = false; that.$message.success("操作成功"); - this.$refs.expTable.refresh(); + this.getStlog(); }) .catch((res) => { that.isSaveing = false; }); } else { - that.$API.wpm.sflogexp.update - .req(that.expForm.id, that.expForm) + that.$API.wpm.stlog.update + .req(that.stlogForm.id, that.stlogForm) .then((res) => { that.isSaveing = false; that.visible = false; that.$message.success("操作成功"); - this.$refs.expTable.refresh(); + this.getStlog(); }) .catch((res) => { that.isSaveing = false; @@ -917,7 +886,48 @@ export default { } }); }, - + //异常删除 + async stlog_delete(row) { + this.$confirm(`确定删除选中的异常吗?`, "提示", { + type: "warning", + }).then(() => { + this.$API.wpm.stlog.delete + .req(row.id) + .then((res) => { + this.$message.success("删除成功"); + this.getStlog(); + }) + .catch((err) => { + this.$message.success(err); + }); + }); + }, + //点击stlog,展示sflogexp + stlogRowClick(row) { + console.log(row); + this.getSflogexp(row.id); + this.sflogExpVisiable = true; + }, + getSflogexp(id) { + let obj = {}; + obj.page = 0; + obj.sflog = id; + this.$API.wpm.sflogexp.list.req(obj).then((res) => { + this.sflogexpList = res; + }); + }, + //异常编辑 + sflogexp_edit(row) { + Object.assign(this.stlogForm, row); + this.stlogTitle = "编辑异常"; + this.stlogForm.handler = this.$TOOL.data.get("USER_INFO").id; + if (this.stlogForm.duration > 0) { + this.stlogForm.cate = "0"; + } else { + this.stlogForm.cate = "1"; + } + this.visible = true; + }, handlePrint() { this.$PRINT("#myReport"); },