diff --git a/src/views/enm_limestone/handoverLog.vue b/src/views/enm_limestone/handoverLog.vue index 0aaec9a4..6777a3ee 100644 --- a/src/views/enm_limestone/handoverLog.vue +++ b/src/views/enm_limestone/handoverLog.vue @@ -210,7 +210,7 @@ export default { name: "sflog", data() { return { - apiObj: this.$API.wpm.sflog.list, + apiObj: null, apiObj2: null, query: { mgroup: "", @@ -240,8 +240,10 @@ export default { this.$API.mtm.mgroup.list .req({ page: 0, search: "石灰石破碎" }) .then((res) => { + console.log("石灰石破碎", res); this.mgroupItem = res[0]; this.query.mgroup = res[0].id; + this.apiObj = this.$API.wpm.sflog.list; this.deptId = res[0].belong_dept; this.getTeam(); }); diff --git a/src/views/enm_limestone/handover_form.vue b/src/views/enm_limestone/handover_form.vue deleted file mode 100644 index 0efc5054..00000000 --- a/src/views/enm_limestone/handover_form.vue +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 保存 - 取消 - - - - - - - \ No newline at end of file diff --git a/src/views/enm_limestone/other_form.vue b/src/views/enm_limestone/other_form.vue deleted file mode 100644 index 0388fce6..00000000 --- a/src/views/enm_limestone/other_form.vue +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (t) - - - - - - 保存 - 取消 - - - - - - - \ No newline at end of file diff --git a/src/views/enm_limestone/quastat_form.vue b/src/views/enm_limestone/quastat_form.vue deleted file mode 100644 index 261458bc..00000000 --- a/src/views/enm_limestone/quastat_form.vue +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.material_name }} - - - - - {{ scope.row.testitem_name }} - - - - - - - - - - - - - - - - - - - - - 保存 - 取消 - - - - - - - - - \ No newline at end of file diff --git a/src/views/enm_limestone/report.vue b/src/views/enm_limestone/report.vue index fbc075f2..f788510a 100644 --- a/src/views/enm_limestone/report.vue +++ b/src/views/enm_limestone/report.vue @@ -316,7 +316,7 @@ export default { days: 1, hours: 1, query: { - mgroup: "3346520558031773696", + mgroup: "3555859873776693248", }, tableDatas: [ ["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0], @@ -497,95 +497,18 @@ export default { dataX: [], dataY: [], dataY2: [], - option: { - color: ["#647bfe", "#a9b6fe", "#cbd3fe", "#91CC75", "#EE6666"], - tooltip: { - trigger: "axis", - axisPointer: { - type: "cross", - }, - }, - grid: { - right: "20%", - left: "20%", - }, - toolbox: { - feature: { - dataView: { show: true, readOnly: false }, - restore: { show: true }, - saveAsImage: { show: true }, - }, - }, - legend: { - data: ["总产量", "单位产品分布电耗"], - }, - xAxis: [ - { - type: "category", - axisTick: { - alignWithLabel: true, - }, - // prettier-ignore - data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], - }, - ], - yAxis: [ - { - type: "value", - name: "产量 (t)", - position: "right", - alignTicks: true, - axisLine: { - show: true, - lineStyle: { - color: colors[0], - }, - }, - axisLabel: { - formatter: "{value}", - }, - }, - - { - type: "value", - name: "分布电耗(KW.h)", - position: "left", - alignTicks: true, - axisLine: { - show: true, - lineStyle: { - color: colors[3], - }, - }, - axisLabel: { - formatter: "{value} ", - }, - }, - ], - series: [ - { - name: "总产量", - type: "bar", - yAxisIndex: 0, - data: [ - 100, 120, 110, 130, 140, 120, 110, 120, 100, 150, - 120, 160, - ], - }, - { - name: "分布电耗", - type: "line", - yAxisIndex: 2, - data: [ - 2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, - 16.5, 12.0, 6.2, - ], - }, - ], - }, }; }, - + created() { + let that = this; + this.$API.mtm.mgroup.list + .req({ page: 0, search: "石灰石破碎" }) + .then((res) => { + console.log("石灰石破碎", res); + this.mgroup = res[0]; + this.query.mgroup = res[0].id; + }); + }, mounted() { function precen(a, b) { if (b !== 0 && b !== null && a !== null) { @@ -622,7 +545,7 @@ export default { data: this.list.map((item) => item.k), }); - this.init(this.dataX, this.dataY); + // this.init(this.dataX, this.dataY); }); this.$nextTick(() => { var myDate = new Date(); @@ -767,11 +690,11 @@ export default { }); }, methods: { - init(dataX, dataY) { - this.myChart = echarts.init(document.getElementById("main")); - // 使用刚指定的配置项和数据显示图表。 - this.myChart.setOption(this.option); - }, + // init(dataX, dataY) { + // this.myChart = echarts.init(document.getElementById("main")); + // // 使用刚指定的配置项和数据显示图表。 + // this.myChart.setOption(this.option); + // }, //获取小时数据 getHourData() { let that = this; diff --git a/src/views/enm_limestone/workshopAnalysis.vue b/src/views/enm_limestone/workshopAnalysis.vue index 56fd8b84..1b73486c 100644 --- a/src/views/enm_limestone/workshopAnalysis.vue +++ b/src/views/enm_limestone/workshopAnalysis.vue @@ -98,7 +98,7 @@ export default { chartShow: false, myOption: null, query: { - mgroup: "3346520558031773696", + mgroup: "3555859873776693248", }, tableDatas: [], modelValue: true, diff --git a/src/views/enm_rmbase/handoverLog.vue b/src/views/enm_rmbase/handoverLog.vue index 1f4fc75b..681614f7 100644 --- a/src/views/enm_rmbase/handoverLog.vue +++ b/src/views/enm_rmbase/handoverLog.vue @@ -242,46 +242,18 @@ - - - \ No newline at end of file diff --git a/src/views/enm_rmbase/logDetail.vue b/src/views/enm_rmbase/logDetail.vue index c3422d6d..97a33a8b 100644 --- a/src/views/enm_rmbase/logDetail.vue +++ b/src/views/enm_rmbase/logDetail.vue @@ -1,669 +1,937 @@ - - - - - - {{form.mgroup_name}} - - - {{ form.shift_name }} - - - {{form.start_time}} - - - {{ form.end_time }} - - + + + + + + {{ form.mgroup_name }} + + + {{ form.shift_name }} + + + {{ form.start_time }} + + + {{ form.end_time }} + + - - - - - - - - - - - - - - - - - - - - - - - - - - - 保存 - - - - - - - - {{ form.team_name }} - - - - - {{ form.leader_name }} - - - - - - - - - {{ scope.row.material_name }} - - - - - {{ scope.row.testitem_name }} - - - - - - - - - - - - - - - - - - - - 保存 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 保存 - - - - 无其他成本 - - - - - - - - 停机 - 其他 - - - - - - - - - - - 编辑 - - 删除 - - - - - - 异常详情 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 编辑 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 保存 - 取消 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + + + + + + + + {{ form.team_name }} + + + + + {{ form.leader_name }} + + + + + + + + + {{ + scope.row.material_name + }} + + + + + {{ + scope.row.testitem_name + }} + + + + + + + + + + + + + + + + + + + + 保存 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + + + + 无其他成本 + + + + + + + + 停机 + 其他 + + + + + + + + + + + 编辑 + + 删除 + + + + + + 异常详情 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 取消 + + + + + + + - - - \ No newline at end of file +export default { + name: "listSon", + data() { + return { + deptId: "", + mgroupId: "", + hideAdd: true, + visible: false, + hideDelete: true, + isSaveing: false, + activeName: "fourth", + expTitle: "新增异常", + sflogItem: {}, + form: {}, + thirdForm: { + num: "", + }, + expForm: { + happen_time: "", + cate: "", + title: "", + reason: "", + measure: "", + duration: 0, + sflog: "", + }, + 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: "请填写处置措施" }], + }, + sflogexpType: "1", + typeOptions: [ + { value: "0", name: "停机" }, + { value: "1", name: "其他" }, + ], + options: ["工艺", "电器", "机械", "其他"], + checkList: [], + stlogList: [], + teamOptions: [], + sflogexpList: [], + apiObj: this.$API.wpm.sflogexp.list, + }; + }, + mounted() { + this.deptId = this.$route.query.deptId; + this.mgroupId = this.$route.query.mgroupId; + let form = this.$TOOL.data.get("sflogItem"); + this.form = JSON.parse(form); + this.getTeam(); + this.getSflogexp(); + }, + methods: { + handleClick(e) { + this.activeName = e.paneName; + if (e.paneName == "second") { + this.getsflogItem(); + } + }, + //******first 班组确定 ******* */ + getTeam() { + let that = this; + let form = {}; + form.page = 0; + form.belong_dept = that.deptId; + that.$API.mtm.team.list.req(form).then((res) => { + that.teamOptions = res; + }); + }, + teamChange(data) { + let that = this; + that.teamOptions.forEach((item) => { + if (item.id == data) { + that.form.leader_name = item.leader_name; + that.form.leader = item.leader; + } + }); + }, + //班组表单提交 + submit() { + let that = this; + that.$refs.teamForm.validate(async (valid) => { + if (valid) { + that.isSaveing = true; + let obj = {}; + obj.team = that.form.team; + obj.shift = that.form.shift; + obj.leader = that.form.leader; + obj.pcoal_heat = that.form.pcoal_heat; + that.$API.wpm.sflog.update + .req(that.form.id, obj) + .then((res) => { + that.isSaveing = false; + that.$message.success("操作成功"); + }) + .catch((res) => { + that.isSaveing = false; + }); + } + }); + }, + //****** seconed 质量检验 ******* */ + //检验 + getsflogItem() { + this.$API.wpm.sflog.init_test.req(this.form.id).then((res) => { + this.checkList = res; + }); + }, + submit2() { + this.isSaveing = true; + this.$API.qm.updateQuastat + .req("bulk", this.checkList) + .then((res) => { + this.isSaveing = false; + this.$message.success("操作成功"); + }) + .catch((res) => { + this.isSaveing = false; + }); + }, + //质量检验 + sflog_check(row) { + this.dialog.check = true; + this.$nextTick(() => { + this.$refs.checkDialog.open("edit").setData(row); + }); + }, + //***** fourth 异常 ****** */ + //获取异常列表 + getSflogexp() { + let obj = {}; + obj.page = 0; + obj.sflog = this.form.id; + this.$API.wpm.sflogexp.list.req(obj).then((res) => { + this.sflogexpList = 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 = "新增异常"; + 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"; + } + 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) => { + if (valid) { + that.isSaveing = true; + if (that.expTitle == "新增异常") { + that.$API.wpm.stlog.create + .req(that.expForm) + .then((res) => { + that.isSaveing = false; + that.visible = false; + that.$message.success("操作成功"); + this.$refs.expTable.refresh(); + }) + .catch((res) => { + that.isSaveing = false; + }); + } else { + that.$API.wpm.sflogexp.update + .req(that.expForm.id, that.expForm) + .then((res) => { + that.isSaveing = false; + that.visible = false; + that.$message.success("操作成功"); + this.$refs.expTable.refresh(); + }) + .catch((res) => { + that.isSaveing = false; + }); + } + } + }); + }, + + handlePrint() { + this.$PRINT("#myReport"); + }, + exportExcel() { + this.exportLoading = true; + this.$XLSX("#myTable", this.tableName); + this.exportLoading = false; + }, + }, +}; + + + diff --git a/src/views/enm_rmbase/other_form.vue b/src/views/enm_rmbase/other_form.vue deleted file mode 100644 index 0388fce6..00000000 --- a/src/views/enm_rmbase/other_form.vue +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (t) - - - - - - 保存 - 取消 - - - - - - - \ No newline at end of file diff --git a/src/views/enm_rmbase/quastat_form.vue b/src/views/enm_rmbase/quastat_form.vue deleted file mode 100644 index 261458bc..00000000 --- a/src/views/enm_rmbase/quastat_form.vue +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ scope.row.material_name }} - - - - - {{ scope.row.testitem_name }} - - - - - - - - - - - - - - - - - - - - - 保存 - 取消 - - - - - - - - - \ No newline at end of file
异常详情