From 0a0114964007502d1a855c34e601e437be947c5e Mon Sep 17 00:00:00 2001
From: 李喆(开发组) <lzhe@yxqiche.com>
Date: 星期二, 18 十一月 2025 16:09:45 +0800
Subject: [PATCH] 1
---
src/views/mdc/status-record.vue | 71 ++++++++++++++++++-----------------
1 files changed, 36 insertions(+), 35 deletions(-)
diff --git a/src/views/mdc/status-record.vue b/src/views/mdc/status-record.vue
index 0ae953e..03f6f9d 100644
--- a/src/views/mdc/status-record.vue
+++ b/src/views/mdc/status-record.vue
@@ -2,7 +2,7 @@
* @Author: lzhe lzhe@example.com
* @Date: 2024-04-26 09:36:18
* @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-06-05 11:49:48
+ * @LastEditTime: 2024-12-18 15:21:51
* @FilePath: /smart-web/src/views/mdc/status-record.vue
* @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -12,7 +12,7 @@
<el-container style="height: 100%;">
<el-aside width="300px" style="height: 100%;">
<el-container>
- <div class="left-title">鏌ヨ鏉′欢</div>
+ <!-- <div class="left-title">鏌ヨ鏉′欢</div> -->
<el-main style="padding: 20px;">
<div class="left-title-col">鏃ユ湡</div>
<el-date-picker v-model="time" type="daterange" :shortcuts="shortcuts" range-separator="-" size="small" style="width: 100%;" value-format="YYYY-MM-DD"/>
@@ -40,7 +40,7 @@
<div class="status-box" v-for="item in achievements"><div class="status-color" :style="{'background-color': item.color}"></div>{{ item.name }}</div>
</div>
<div class="status-wrap">
- <el-checkbox v-model="checked1" label="浜哄伐鍙嶉鐘舵��" size="large" />
+ <el-checkbox v-model="humanFeedback" label="浜哄伐鍙嶉鐘舵��" size="large" @change="humanFeedbackChange" />
<div class="status-con">
<div class="status-box" v-for="item in collectionstatus"><div class="status-color" :style="{'background-color': item.color}"></div>{{ item.name }}</div>
</div>
@@ -49,7 +49,7 @@
<!-- collectionstatus 鍙嶉鐘舵��
date 鏃ユ湡
workstationInfoList 宸ヤ綅list -->
- <record-charts-by-date :achievements="allwcs" :date="date" :workstationInfoList="workstationInfoList" v-if="date != ''" ref="chart01"></record-charts-by-date>
+ <record-charts-by-date :achievements="allwcs" :date="date" :workstationInfoList="workstationInfoList" v-if="date != ''" ref="chart01" :humanFeedback="humanFeedback"></record-charts-by-date>
</el-tab-pane>
<el-tab-pane label="鎸夊伐浣嶆煡鐪�" name="time">
<div class="fact-analysis-realtim">
@@ -69,7 +69,7 @@
<div class="status-box" v-for="item in achievements"><div class="status-color" :style="{'background-color': item.color}"></div>{{ item.name }}</div>
</div>
<div class="status-wrap">
- <el-checkbox v-model="checked1" label="浜哄伐鍙嶉鐘舵��" size="large" />
+ <el-checkbox v-model="humanFeedback" label="浜哄伐鍙嶉鐘舵��" size="large" />
<div class="status-con">
<div class="status-box" v-for="item in collectionstatus"><div class="status-color" :style="{'background-color': item.color}"></div>{{ item.name }}</div>
</div>
@@ -104,6 +104,7 @@
},
watch: {
treeChecked(select) {
+ console.log(select,111)
var arr = [];
select.forEach(item=> {
arr.push({id: item.id,name: item.code})
@@ -121,7 +122,7 @@
select: [],
workstationInfoList: [],
date: "",
- checked1: true,
+ humanFeedback: true,
btnListActive: '',
btnGongweiListActive: "",
btnList: [],
@@ -174,6 +175,9 @@
this.init();
},
methods: {
+ humanFeedbackChange(falg) {
+ this.$refs.chart01.getCharts();
+ },
addfeedbackSuccess() {
var workstationName = "";
this.btnGongweiList.forEach(item=> {
@@ -184,7 +188,7 @@
this.setWork = {
endDate: this.time[1],
startDate: this.time[0],
- humanFeedback: true,
+ humanFeedback: this.humanFeedback,
machineFeedback: true,
workstationId: this.lastLevelId,
workstationName: workstationName
@@ -206,7 +210,7 @@
this.setWork = { //宸ヤ綅
endDate: this.time[1],
startDate: this.time[0],
- humanFeedback: true,
+ humanFeedback: this.humanFeedback,
machineFeedback: true,
workstationId: this.select[0].id,
workstationName: this.btnGongweiList[0].name
@@ -222,9 +226,9 @@
startTime: this.time[0],
workstationInfoList: this.workstationInfoList
}
- this.$HTTP.post(`/api/blade-mdc/status-record/excel/export`,obj).then(res=> {
+ this.$HTTP.post(`/api/mdc/status-record/excel/export`,obj).then(res=> {
if(res.code == 200) {
- window.open(res.data.link);
+ this.$TOOL.downFile(res.data.link,res.data.originalName);
}
})
},
@@ -247,7 +251,7 @@
this.setWork = {
endDate: this.time[1],
startDate: this.time[0],
- humanFeedback: true,
+ humanFeedback: this.humanFeedback,
machineFeedback: true,
workstationId: item.id,
workstationName: workstationName
@@ -257,7 +261,7 @@
})
},
getachievements() { //鐝鐘舵�佽褰曢噰闆嗙姸鎬�
- this.$HTTP.get(`/api/blade-cps/global_wcs/wcs-achievements`).then(res=> {
+ this.$HTTP.get(`/api/smis/global_wcs/wcs-achievements`).then(res=> {
if(res.code == 200) {
var achievements = [];//閲囬泦鐘舵��
var collectionstatus = []; //浜哄伐鍙嶉鐘舵��
@@ -277,7 +281,7 @@
},
getTime(data) {
return new Promise(resolve=> {
- this.$HTTP.post('/api/blade-mdc/efficiency-analysis/interval', {...data}).then(res => {
+ this.$HTTP.post('/api/mdc/efficiency-analysis/interval', {...data}).then(res => {
if (res.code === 200) {
var today = moment().format('YYYY-MM-DD');
var yesterday = moment().subtract(1, 'days').format('YYYY-MM-DD');
@@ -309,29 +313,26 @@
this.workstationInfoList = this.select;
this.btnGongweiList = this.select; //宸ヤ綅
this.date = this.btnList[0].id;
- if(this.activeName == "shift") {
- this.$nextTick(()=> {
- this.$refs.chart01.getCharts();
- })
- }else {
- if(this.btnGongweiList.length != 0) { //鏈夐�夊伐浣嶆墠鑳藉睍绀哄伐浣�
- this.isshowempty = false;
- console.log(this.btnGongweiList,122)
- this.btnGongweiListActive = this.btnGongweiList[0].id; //宸ヤ綅
- this.lastLevelId = this.btnGongweiListActive;
- this.setWork = { //宸ヤ綅
- endDate: this.time[1],
- startDate: this.time[0],
- humanFeedback: true,
- machineFeedback: true,
- workstationId: this.select[0].id,
- workstationName: this.btnGongweiList[0].name
- }
- this.workSelect = this.select;
- this.$nextTick(()=> {
- this.$refs.chart02.getCharts();
- })
+ this.$nextTick(()=> { //鎸夋棩鏈熸煡鐪�
+ this.$refs.chart01.getCharts();
+ })
+ //鎸夊伐浣嶆煡鐪�
+ if(this.btnGongweiList.length != 0) { //鏈夐�夊伐浣嶆墠鑳藉睍绀哄伐浣�
+ this.isshowempty = false;
+ this.btnGongweiListActive = this.btnGongweiList[0].id; //宸ヤ綅
+ this.lastLevelId = this.btnGongweiListActive;
+ this.setWork = { //宸ヤ綅
+ endDate: this.time[1],
+ startDate: this.time[0],
+ humanFeedback: this.humanFeedback,
+ machineFeedback: true,
+ workstationId: this.select[0].id,
+ workstationName: this.btnGongweiList[0].name
}
+ this.workSelect = this.select;
+ this.$nextTick(()=> {
+ this.$refs.chart02.getCharts();
+ })
}
});
}
--
Gitblit v1.9.3