From 9e66c647fddaa5c49e491fb3e1cf8c38c78e896e Mon Sep 17 00:00:00 2001
From: lzhe <lzhe@example.com>
Date: 星期五, 19 四月 2024 18:26:52 +0800
Subject: [PATCH] 1

---
 src/views/mdc/add-station-status.vue |   97 +++++++-
 src/views/mdc/state-feedback.vue     |    9 
 src/views/mdc/station-live.vue       |  511 +++++++++++++++++++++++++++++++++++++++------
 3 files changed, 528 insertions(+), 89 deletions(-)

diff --git a/src/views/mdc/add-station-status.vue b/src/views/mdc/add-station-status.vue
index 7134425..bd8860b 100644
--- a/src/views/mdc/add-station-status.vue
+++ b/src/views/mdc/add-station-status.vue
@@ -1,5 +1,13 @@
 <template>
 	<el-dialog :title="titleMap[mode]" v-model="visible" :width="570" destroy-on-close @closed="$emit('closed')">
+		<div v-if="isShow">鍘嗗彶鍙嶉</div>
+		<el-row v-if="isShow" class="history-feedback">
+				<el-col :span="24"><span>寮�濮嬪弽棣堟椂闂�</span><span>{{latestData.feedbackTime}}</span></el-col>
+				<el-col :span="24"><span>鐘舵��</span><span>{{latestData.wcsDesc}}</span></el-col>
+				<el-col :span="24"><span>鎻忚堪</span><span>{{latestData.feedbackDesc}}</span></el-col>
+				<el-col :span="24"><span>鐘舵�佹寔缁椂闂�</span><span>{{latestData.diffTime}}</span></el-col>
+		</el-row>
+		<div v-if="isShow" class="modal-title">鏈�鏂板弽棣�</div>
 		<el-form :model="addDictForm" :rules="addDictRules" :disabled="mode=='show'" ref="dialogForm" label-width="120px" label-position="center">
 			<el-row>
 				<el-col :span="24">
@@ -8,13 +16,13 @@
 					</el-date-picker>
 					</el-form-item>
 				</el-col>
-				<!-- <el-col :span="24">
+				<el-col :span="24">
 					<el-form-item label="鐘舵��" prop="wcs">
 						<el-select v-model="addDictForm.wcs" style="width: 100%">
 							<el-option v-for="item in feedBackStatusList" :key="item.code" :label="item.name" :value="item.code"/>
 						</el-select>
 					</el-form-item>
-				</el-col> -->
+				</el-col>
 				<el-col :span="24">
 					<el-form-item label="鎻忚堪">
 						<el-input v-model="addDictForm.description" placeholder="鎻忚堪" clearable></el-input>
@@ -24,7 +32,7 @@
 		</el-form>
 		<template #footer>
 			<el-button @click="visible=false" >鍙� 娑�</el-button>
-			<el-button v-if="mode!='show'" type="primary" :loading="isSaveing" @click="dictSubmit()">淇� 瀛�</el-button>
+			<el-button v-if="mode!='show'" type="primary" :loading="isSaveing" @click="dictSubmit">鎻愪氦鍙嶉</el-button>
 		</template>
 	</el-dialog>
 </template>
@@ -32,21 +40,30 @@
 <script>
 	export default {
 		emits: ['success', 'closed'],
+		props: ['workstationId'],
 		data() {
 			return {
+				feedBackStatusList: [],
+				latestData: {
+					latestData: "",
+					wcsDesc: "",
+					feedbackDesc: "",
+					diffTime: ""
+				},
+				isShow: false,
 				value1: true,
 				mode: "add",
 				titleMap: {
 					add: '鐘舵�佸弽棣�',
-					edit: '淇敼',
-					show: '鏌ョ湅'
+					edit: '鐘舵�佸弽棣�',
+					show: '鐘舵�佸弽棣�'
 				},
 				visible: false,
 				isSaveing: false,
 				//琛ㄥ崟鏁版嵁
 				addDictForm: {
 					description: "",
-					date: "",
+					date: [],
 					endTime: "",
 					startTime: "",
 					wcs: ""
@@ -61,6 +78,25 @@
 			
 		},
 		methods: {
+			sumTime(startTime,endTime) {
+				// 灏嗗瓧绗︿覆杞崲涓篋ate瀵硅薄  
+				var startDate = new Date(startTime);  
+				var endDate = new Date(endTime);  
+				
+				// 璁$畻鏃堕棿宸紙姣锛�  
+				var timeDiff = endDate - startDate;  
+				
+				// 灏嗘椂闂村樊杞崲涓哄ぉ鏁般�佸皬鏃舵暟銆佸垎閽熸暟鍜岀鏁�  
+				var diffDays = Math.floor(timeDiff / (1000 * 60 * 60 * 24)); // 澶�  
+				timeDiff %= 1000 * 60 * 60 * 24; // 鍓╀綑姣鏁�  
+				var diffHours = Math.floor(timeDiff / (1000 * 60 * 60)); // 灏忔椂  
+				timeDiff %= 1000 * 60 * 60; // 鍓╀綑姣鏁�  
+				var diffMinutes = Math.floor(timeDiff / (1000 * 60)); // 鍒嗛挓  
+				timeDiff %= 1000 * 60; // 鍓╀綑姣鏁�  
+				var diffSeconds = Math.floor(timeDiff / 1000); // 绉�
+				var d = diffDays == 0?"":diffDays + "澶�";
+				return d + diffHours + "灏忔椂 " + diffMinutes + "鍒嗛挓 " + diffSeconds + "绉�"
+			},
 			dateChange(val) {
 				this.addDictForm.startTime = val[0];
 				this.addDictForm.endTime = val[1];
@@ -71,10 +107,21 @@
 				this.visible = true;
 				return this
 			},
+			getfeedBackStatusList() {
+				this.$HTTP.get("/api/blade-cps/global_wcs/wcs-achievements").then(res=> {
+					if(res.code == 200) {
+						res.data.forEach(item=> {
+							if(item.type == "4") {
+								this.feedBackStatusList.push(item);
+							}
+						})
+					}
+				})
+			},
 			//琛ㄥ崟鎻愪氦鏂规硶
 			dictSubmit(){
 				var obj = Object.assign({},this.addDictForm);
-				obj.workstationIds = [this.workstationId]
+				obj.workstationIds = [this.workstationId];
 				var that = this;
 				this.$refs.dialogForm.validate(async (valid) => {
 					if (valid) {
@@ -113,13 +160,41 @@
 				})
 			},
 			//琛ㄥ崟娉ㄥ叆鏁版嵁
-			setData(data){
-				//鍙互鍜屼笂闈竴鏍峰崟涓敞鍏ワ紝涔熷彲浠ュ儚涓嬮潰涓�鏍风洿鎺ュ悎骞惰繘鍘�
-				//Object.assign(this.addDictForm, data);
+			setData(lastLevelId){
+				this.getfeedBackStatusList();  //鑾峰彇鐘舵�乴ist
+				this.$HTTP.get(`/api/blade-cps/workstation-wcs-feedback/latest?workstationId=${lastLevelId}`).then(res=> {
+					if(res.code == 200) {
+						console.log(res.data);
+						if(res.data == null) {
+							this.isShow = false;
+						}else {
+							res.data.diffTime = this.sumTime(res.data.startTime,res.data.endTime);
+							this.latestData = res.data;
+							this.isShow = true;
+						}
+					}
+				})
 			}
 		}
 	}
 </script>
 
-<style>
+<style scoped>
+.history-feedback {
+    background: #f5f5f5;
+    padding: 12px 0;
+	padding-bottom: 24px;
+    margin: 16px 0 24px 0;
+}
+.history-feedback .el-col.el-col-24 {
+    margin: 24px 0 0px 40px;
+    font-size: 14px;
+}
+.history-feedback .el-col.el-col-24 span:nth-child(1) {
+	display: inline-block;
+	min-width: 100px;
+}
+.modal-title {
+	margin-bottom: 20px;
+}
 </style>
diff --git a/src/views/mdc/state-feedback.vue b/src/views/mdc/state-feedback.vue
index a487cbb..50961c8 100644
--- a/src/views/mdc/state-feedback.vue
+++ b/src/views/mdc/state-feedback.vue
@@ -2,7 +2,7 @@
  * @Author: lzhe lzhe@example.com
  * @Date: 2024-03-26 10:28:33
  * @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-04-18 18:07:47
+ * @LastEditTime: 2024-04-19 18:18:19
  * @FilePath: /smart-web/src/views/master/person/main/index.vue
  * @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 -->
@@ -122,8 +122,11 @@
 			getfeedBackStatusList() {
 				this.$HTTP.get("/api/blade-cps/global_wcs/wcs-achievements").then(res=> {
 					if(res.code == 200) {
-						this.feedBackStatusList.push(res.data[0]);
-						this.feedBackStatusList.push(res.data[1]);
+						res.data.forEach(item=> {
+							if(item.type == "4") {
+								this.feedBackStatusList.push(item);
+							}
+						})
 					}
 				})
 			},
diff --git a/src/views/mdc/station-live.vue b/src/views/mdc/station-live.vue
index 62a82b8..4e223a1 100644
--- a/src/views/mdc/station-live.vue
+++ b/src/views/mdc/station-live.vue
@@ -2,7 +2,7 @@
  * @Author: lzhe lzhe@example.com
  * @Date: 2024-03-26 10:28:33
  * @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-04-18 18:35:55
+ * @LastEditTime: 2024-04-19 18:26:26
  * @FilePath: /smart-web/src/views/master/person/main/index.vue
  * @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 -->
@@ -37,7 +37,15 @@
 			</div>
 			<div class="collect-info-panel">
 				<div class="fact-analysis-realtim">
-					<div class="fact-analysis-card" v-for="item in dmpList">
+					<div class="wimi-empty" style="background-color: rgb(255, 255, 255);" v-if="dmpList.length == 0">
+						<div class="wimi-empty-img" style="width: 150px; height: 150px;">
+							<img src="./quesheng.bd026700.png" style="height: auto; width: 100%;">
+						</div>
+						<div class="empty-description">
+							<div>鏆傛棤鏁版嵁</div>
+						</div>
+					</div>
+					<div class="fact-analysis-card" v-for="item in dmpList" v-if="dmpList.length != 0">
 						<div class="card-name" style="background-color: rgb(127, 192, 192);">{{item.description}}</div>
 						<div class="card-value" style="background-color: rgba(127, 192, 192, 0.14);"></div>
 					</div>
@@ -45,16 +53,67 @@
 			</div>
 			<el-tabs type="border-card" class="demo-tabs">
 			    <el-tab-pane label="宸ヤ綅鏁版嵁">
+					<div style="text-align: right;margin-bottom: 14px;">
+						<el-date-picker v-model="wcsDate" type="date" @change="wcschangedate" value-format="YYYY-MM-DD" size="small" />
+					</div>
 			    	<div class="wcs-main">
 			    		<div><div id="wcs-left" style="width: 100%;height:400px;"></div></div>
 			    		<div><div id="wcs-right" style="width: 100%;height:400px;"></div></div>
 			    	</div>
+					<div class="bottom-panel content-panel">
+						<div class="panel-title">鐝鐘舵�佽褰�</div>
+						<div class="panel-content bottom-panel-chart">
+							<div class="status">
+								<div class="feed-button" @click="table_edit">鐘舵�佸弽棣�</div>
+								<div class="status-wrap align-left">
+									<div class="collect-status">閲囬泦鐘舵��</div>
+									<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" />
+									<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>
+								</div>
+							</div>
+						</div>
+						<div style="padding: 8px;">
+							<div id="wcs-log" style="width: 100%;height:200px;"></div>
+							<el-table ref="multipleTableRef1" :data="recordData" border style="width: 100%;">
+								<el-table-column prop="shiftIndexName" label="鐝"></el-table-column>
+								<el-table-column prop="temdata" label="璋冭瘯"></el-table-column>
+								<el-table-column prop="temdata" label="绂荤嚎"></el-table-column>
+								<el-table-column prop="temdata" label="寰呮満"></el-table-column>
+								<el-table-column prop="temdata" label="鎶ヨ"></el-table-column>
+								<el-table-column prop="temdata" label="杩愯"></el-table-column>
+								<el-table-column prop="perdata" label="绋煎姩鐜�%"></el-table-column>
+								<el-table-column prop="perdata" label="鎶ヨ鐜�%"></el-table-column>
+							</el-table>
+						</div>
+					</div>
 			    </el-tab-pane>
-			    <el-tab-pane label="鏈哄櫒灞ュ巻">234</el-tab-pane>
+			    <el-tab-pane label="鏈哄櫒灞ュ巻">
+					<div class="alarm-title">鎶ヨ淇℃伅灞ュ巻</div>
+					<el-table ref="multipleTableRef" :data="alarmtableData" border style="width: 100%" class="multipleTableRef">
+						<el-table-column prop="alarmCode" label="鎶ヨ浠g爜"></el-table-column>
+						<el-table-column prop="alarmMsg" label="鎶ヨ淇℃伅"></el-table-column>
+						<el-table-column prop="alarmTime" label="鎶ヨ鏃堕棿"></el-table-column>
+					</el-table>
+					<el-pagination
+						style="margin-top: 12px;"
+						@size-change="alarmSizeChange"
+						@current-change="alarmCurrentChange"
+						:current-page="currentPage4"
+						:page-sizes="[15, 50, 100]"
+						:page-size="15"
+						layout="total, sizes, prev, pager, next, jumper"
+						:total="alarmtotal">
+					</el-pagination>
+				</el-tab-pane>
 			 </el-tabs>
 		</div>
 	</div>
-	<save-dialog v-if="dialog.save" ref="saveDialog"  @success="addfeedbackSuccess" @closed="dialog.save=false"></save-dialog>
+	<save-dialog v-if="dialog.save" ref="saveDialog"  @success="addfeedbackSuccess" :workstationId="lastLevelId" @closed="dialog.save=false"></save-dialog>
 </template>
 <script>
 	import * as echarts from 'echarts';
@@ -63,7 +122,13 @@
 		name: "state-feedback",
 		data(){
 			return {
-				wcsOption: {  
+				achievements: [],
+				collectionstatus: [],
+				checked1: "",
+				alarmtotal: 0,
+				alarmtableData: [],
+				wcsDate: "",
+				wcsOptionL: {  
 		            title: {  
 		                text: '鐢ㄦ椂鍒嗗竷鎯呭喌',   
 		                left: 'left',
@@ -90,8 +155,13 @@
 		                    name: '鐢ㄦ椂:',  
 		                    type: 'pie',  
 		                    radius: '55%',  
-		                    center: ['30%', '50%'],  
+		                    center: ['40%', '50%'],  
 		                    data: [],  
+							itemStyle: {
+								borderRadius: 10,
+								borderColor: '#fff',
+								borderWidth: 2
+							},
 		                    emphasis: {  
 		                        itemStyle: {  
 		                            shadowBlur: 10,  
@@ -102,6 +172,88 @@
 		                }  
 		            ]  
 		        },
+				wcsOptionR:{
+					title: {  
+		                text: '璁惧鏁堢巼',   
+		                left: 'left',
+		                textStyle: {
+		                	fontSize:14
+		                }
+		            }, 
+					xAxis: {
+						max: '100'
+					},
+					yAxis: {
+						type: 'category',
+						data: ['杩愯鐜�', '鎶ヨ鐜�', '绋煎姩鐜�']
+					},
+					tooltip: {  
+		                trigger: 'item',  
+		                //formatter: '{a} <br/>{b} : {c} ({d}%)'  
+		                formatter: '{b} {c}%'
+		            },
+					series: [
+						{	
+							top: -30,
+		                    name: 'wcsR',  
+		                    type: 'bar',   
+		                    center: ['40%', '50%'],  
+		                    data: [],  
+							itemStyle: {
+								borderRadius: 8,
+								borderColor: '#fff',
+								borderWidth: 1
+							},
+							label: {
+								show: true,
+								position: 'right',
+								formatter: '{c}%',
+								valueAnimation: true
+							},
+		                    emphasis: {  
+		                        itemStyle: {  
+		                            shadowBlur: 10,  
+		                            shadowOffsetX: 0,  
+		                            shadowColor: 'rgba(0, 0, 0, 0.5)'  
+		                        }  
+		                    }  
+						}
+					],
+					legend: {
+						show: true, // 寮哄埗鏄剧ず鍥句緥  
+						orient: 'vertical', // 鍥句緥鍒楄〃鐨勫竷灞�鏈濆悜锛屽彲閫夊�间负锛�'horizontal' 鎴� 'vertical'  
+						left: 'left', // 鍥句緥缁勪欢绂诲鍣ㄥ乏渚х殑璺濈  
+						top: 'top', // 鍥句緥缁勪欢绂诲鍣ㄤ笂渚х殑璺濈  
+						data: ['杩愯鐜�', '鎶ヨ鐜�', '绋煎姩鐜�'] // 涓巗eries涓殑name瀵瑰簲锛岀敤浜庢樉绀哄浘渚嬪悕绉�
+					}
+				},
+				wcsOptionLog:{
+					grid: {  
+						top: '0%'
+					},
+					xAxis: {
+						type: 'category',
+						data: ['00:00:00', '02:00:00', '04:00:00', '06:00:00', '08:00:00', '10:00:00', '12:00:00', '14:00:00', '18:00:00'],  
+					},
+					yAxis: {
+						type: 'category',
+						data: ['1', '2']
+					},
+					series: [
+						{	
+		                    name: 'wcsLog',  
+		                    type: 'bar',   
+		                    data: [],  
+		                    emphasis: {  
+		                        itemStyle: {  
+		                            shadowBlur: 10,  
+		                            shadowOffsetX: 0,  
+		                            shadowColor: 'rgba(0, 0, 0, 0.5)'  
+		                        }  
+		                    }  
+						}
+					]
+				},
 				dmpList: [],
 				stationForm: {
 					code: "",
@@ -131,37 +283,134 @@
 				},
 				parentId: "0",
 				tableData: [],
-				searchSelection: []
+				searchSelection: [],
+				wcsBeginOption: {},
+				alarmsearchData: {
+					current: "1",
+					size: "15"
+				},
+				recordData: [] // 鐝鐘舵�佽褰晅able
 			}
 		},
 		created(){
 			
 		},
 		mounted(){
+			this.newDate();  //鑾峰彇褰撳墠鏃ユ湡
 			this.getTreeList();
-			this.getwcsL();  //宸︿晶鍥捐〃
 		},
 		components: {
 			saveDialog
 	    },
 		methods: {
-			getwcsL() {
-				this.$HTTP.get(`/api/blade-cps/global_wcs/list?code=&name=`).then(res=> {
+			table_edit(){
+				this.dialog.save = true
+				this.$nextTick(() => {
+					this.$refs.saveDialog.open('edit').setData(this.lastLevelId);
+				})
+			},
+			alarmSizeChange(val) {
+				console.log(`姣忛〉 ${val} 鏉);
+				this.alarmsearchData.current = "1";
+				this.alarmsearchData.size = val;
+				this.alarmsearchBtn();
+			},
+			alarmCurrentChange(val) {
+				console.log(`褰撳墠椤�: ${val}`);
+				this.alarmsearchData.current = val;
+				this.alarmsearchBtn();
+			},
+			alarmsearchBtn() {
+				this.$HTTP.get(`/api/blade-mdc/work-station-analysis/alarm/${this.lastLevelId}?current=${this.alarmsearchData.current}&size=${this.alarmsearchData.size}`).then(res=> {
+					if(res.code == 200) {
+						this.alarmtableData = res.data.records;
+						this.alarmtotal = res.data.total;
+					}
+				})
+			},
+			wcschangedate(date) {
+				this.wcsDate = date;
+				this.getwscLvalue();  //宸︿晶鍥捐〃
+				this.getwcsR();
+				this.getrecord();  //鐝鐘舵�佽褰晅able
+				this.getlogcart();  //鐝鐘舵�佽褰昪hart
+			},
+			getrecord() {  //鐝鐘舵�佽褰晅able
+				var obj = {
+					date: this.wcsDate,
+					humanFeedback: true,
+					workstationId: this.lastLevelId
+				}
+				this.$HTTP.post(`/api/blade-mdc/status-record/shift-index-status-record-table`,obj).then(res=> {
+					if(res.code == 200) {
+						res.data.forEach(item=> {
+							item.temdata = "00:00:00";
+							item.perdata = "0";
+						})
+						console.log(res.data,980)
+						this.recordData = res.data;
+					}
+				})
+			},
+			getlogcart() {  //鐝鐘舵�佽褰昪hart
+				var obj = {
+					date: this.wcsDate,
+					humanFeedback: true,
+					workstationId: this.lastLevelId
+				}
+				this.$HTTP.post(`/api/blade-mdc/status-record/shift-index-status-record-table`,obj).then(res=> {
+					if(res.code == 200) {
+						var myChart = echarts.init(document.getElementById('wcs-log')); 
+						res.data.forEach(item => {
+							item.value = 0;
+						})
+						this.wcsOptionLog.series[0].data = res.data;
+						myChart.setOption(this.wcsOptionLog);
+					}
+				})
+			},
+			getwscLvalue() {
+				var obj = {
+					date: this.wcsDate,
+					humanFeedback: true,
+					workstationId: this.lastLevelId
+				}
+				this.$HTTP.post(`/api/blade-mdc/status-record/time-distribution`,obj).then(res=> {
 					if(res.code == 200) {
 						var myChart = echarts.init(document.getElementById('wcs-left')); 
+						var wcsOption = JSON.parse(JSON.stringify(this.wcsBeginOption));
+						if(res.data.length == 0) {
+							wcsOption.forEach(item=> {
+								item.value = 20;
+							})
+						}else {
+							wcsOption.forEach(item=> {
+								res.data.forEach(item2=> {
+									if(item.code == item2.name) {
+										item.value = item2.value;
+									}
+								})
+							})
+						}
+						this.wcsOptionL.series[0].data = wcsOption;
+						myChart.setOption(this.wcsOptionL);
+					}
+				})
+			},
+			getwcsLcolor() {
+				this.$HTTP.get(`/api/blade-cps/global_wcs/list?code=&name=`).then(res=> {
+					if(res.code == 200) {
 						res.data.forEach(item=> {
-							item.value=20;
-							item.itemStyle = {color: item.color}
+							item.itemStyle = {color: item.color};
 						})
-						this.wcsOption.series[0].data = res.data;
-						myChart.setOption(this.wcsOption);
-						console.log(this.wcsOption,9991);
+						this.wcsBeginOption = res.data;
+						this.getwscLvalue();
 					}
 				})
 			},
 			getwcsR() {
 				var obj = {
-					date: String(this.newDate()),
+					date: this.wcsDate,
 					humanFeedback: true,
 					workstationId: this.lastLevelId
 				}
@@ -169,60 +418,13 @@
 					if(res.code == 200) {
 						console.log(res.data,98988)
 						var myChart = echarts.init(document.getElementById('wcs-right')); 
-						// res.data.forEach(item=> {
-						// 	item.value=20;
-						// 	item.itemStyle = {color: item.color}
-						// })
-						// this.wcsOption.series[0].data = res.data;
-						// myChart.setOption(this.wcsOption);
-						// console.log(this.wcsOption,9991);
-						var option = {
-							title: {  
-						        text: '璁惧鏁堢巼鎸囨爣', // 鍥捐〃鏍囬  
-						        left: 'left',
-						        textStyle: {
-				                	fontSize:14
-				                }
-						    },
-						  tooltip: {
-						    trigger: 'item'
-						  },
-						  legend: {
-						    orient: 'vertical',
-						    bottom: 'bottom', // 鍥句緥缁勪欢绂诲鍣ㄥ乏渚х殑璺濈
-						    data: ['鎶ヨ鐜�', '绋煎姩鐜�', '杩愯鐜�'] // 鍥句緥鏁版嵁  
-						  },
-						  series: [
-						    {
-						      name: 'Access From',
-						      type: 'pie',
-						      radius: ['30%', '50%'],
-						      avoidLabelOverlap: false,
-						      label: {
-						        show: false,
-						        position: 'center'
-						      },
-						      emphasis: {
-						        label: {
-						          show: true,
-						          fontSize: 40,
-						          fontWeight: 'bold'
-						        }
-						      },
-						      labelLine: {
-						        show: false
-						      },
-						      data: [
-						        {value: 0, name: '鎶ヨ鐜�'}, // 鎶ヨ鐜囨暟鎹�  
-						        {value: 0, name: '绋煎姩鐜�'}, // 绋煎姩鐜囨暟鎹�  
-						        {value: 0, name: '杩愯鐜�'}
-						      ]
-						    }
-						  ]
-						};  
-						  
-						// 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁鏄剧ず鍥捐〃銆�  
-						myChart.setOption(option);
+						res.data.forEach(item=> {
+							if(item.name == "杩愯鐜�") item.itemStyle = {color: '#73d13d'};
+							if(item.name == "鎶ヨ鐜�") item.itemStyle = {color: '#ff4d4f'};
+							if(item.name == "绋煎姩鐜�") item.itemStyle = {color: '#40a9ff'};
+						})
+						this.wcsOptionR.series[0].data = res.data;	
+						myChart.setOption(this.wcsOptionR);
 					}
 				})
 			},
@@ -231,13 +433,10 @@
 			    var year = date.getFullYear();  
 			    var month = (1 + date.getMonth()).toString().padStart(2, '0'); // JavaScript涓湀浠芥槸浠�0寮�濮嬬殑锛屾墍浠ユ垜浠渶瑕佸姞1  
 			    var day = date.getDate().toString().padStart(2, '0'); // getDate()杩斿洖鐨勬槸褰撳墠鏈堢殑鏃ユ暟锛屼笉闇�瑕佸姞1  
-			    return year + '-' + month + '-' + day;
+			    this.wcsDate = year + '-' + month + '-' + day;
 			},
 			addfeedbackSuccess() {
-				this.getlist();
-			},
-			feedBackStatusChange(val) {
-				this.getlist();
+				
 			},
 			handleNodeClick(data) {
 				if(data.code) {
@@ -246,6 +445,12 @@
 						if(res.code == 200) {
 							this.stationForm = res.data;
 							this.getdmp(this.lastLevelId,this.stationForm.machineId);
+							this.newDate();  //鑾峰彇褰撳墠鏃ユ湡
+							this.getwcsR();
+							this.getwscLvalue();  //宸︿晶鍥捐〃
+							this.alarmsearchBtn();  //鏈哄櫒灞ュ巻
+							this.getrecord();  //鐝鐘舵�佽褰晅able
+							this.getlogcart();  //鐝鐘舵�佽褰昪hart
 						}
 					})
 				}
@@ -327,10 +532,32 @@
 								this.$refs.treeRef.setCurrentKey(this.lastLevelId);  //绗竴涓妭鐐圭殑绗竴涓瓙鑺傜偣鏈�鍚庝竴绾ч粯璁ら�変腑
 								//浠ヤ笅鏄垵濮嬪寲鏁版嵁
 								this.getlist();  //娓叉煋鍙嶉鍒楄〃
+								this.getwcsLcolor();  //宸︿晶鍥捐〃
 								this.getwcsR();  //鍙充晶鍥炬爣
+								this.getachievements();  //鐝鐘舵�佽褰曢噰闆嗙姸鎬�
+								this.getrecord();  //鐝鐘舵�佽褰晅able
+								this.getlogcart();  //鐝鐘舵�佽褰昪hart
 							})
 							
 						}
+					}
+				})
+			},
+			getachievements() { //鐝鐘舵�佽褰曢噰闆嗙姸鎬�
+				this.$HTTP.get(`/api/blade-cps/global_wcs/wcs-achievements`).then(res=> {
+					if(res.code == 200) {
+						var achievements = [];//閲囬泦鐘舵��
+						var collectionstatus = [];  //浜哄伐鍙嶉鐘舵��
+						res.data.forEach(item=> {
+							if(item.type == 1) {
+								achievements.push(item);
+							}
+							if(item.type == 4) {
+								collectionstatus.push(item);
+							}
+						})
+						this.achievements = achievements;
+						this.collectionstatus = collectionstatus;
 					}
 				})
 			},
@@ -375,6 +602,12 @@
 .content-machine-box {
 	display: flex;
 	align-items: center;
+	flex-direction: row;
+    flex-wrap: nowrap;
+    align-content: center;
+    justify-content: flex-start;
+    background-color: rgba(59, 142, 142, .06);
+    border-radius: 2px;
 }
 .content-machine-img {
 	margin: 14px;
@@ -441,6 +674,134 @@
 	display: flex;
 }
 .wcs-main > div {
+	padding: 6px;
+	box-shadow: 2px 3px 10px rgba(0,0,0,.16);
+}
+.wcs-main > div:nth-child(1) {
 	width: 50%;
+	margin-right: 4px;
+}
+.wcs-main > div:nth-child(2) {
+	flex:1;
+}
+.alarm-title {
+	padding-bottom: 8px;
+	font-size: 14px;
+}
+.wimi-empty {
+    height: 100%;
+    width: 100%;
+    display: flex;
+    border-radius: 2px;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    align-content: center;
+    justify-content: center;
+    align-items: center;
+}
+.empty-description {
+    margin-bottom: 20px;
+    font-size: 14px;
+    color: #5e6d82;
+    margin-top: -16px;
+    line-height: 28px;
+}
+.bottom-panel {
+    margin-top: 8px;
+    min-height: 300px;
+}
+.content-panel {
+    height: 100%;
+    box-shadow: 2px 3px 10px rgba(0,0,0,.16);
+}
+.panel-title {
+    font-size: 16px;
+    box-sizing: border-box;
+    padding: 12px 24px;
+    width: 100%;
+    position: relative;
+    color: #333;
+    font-weight: 700;
+}
+.bottom-panel-chart {
+    display: flex;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    align-content: flex-start;
+    align-items: flex-start;
+    padding: 8px;
+    padding-top: 0;
+    box-sizing: border-box;
+}
+.panel-content {
+    width: 100%;
+    height: calc(100% - 45px);
+}
+.panel-content-gant, .panel-content-table {
+    width: 100%;
+}
+.gant {
+    box-sizing: border-box;
+    padding: 8px;
+}
+.status {
+    display: flex;
+    align-items: start;
+    flex-direction: column;
+    justify-content: start;
+    margin: 8px 0;
+    position: relative;
+	width: 100%;
+	font-size: 16px;
+	cursor: pointer;
+}
+.feed-button {
+	position: absolute;
+    right: 10px;
+    top: -2px;
+    color: #3b8e8e;
+    cursor: pointer;
+}
+.status-wrap.align-left, .status-wrap:first-child {
+    padding-left: 24px;
+    margin-bottom: 8px;
+}
+.status-wrap {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: start;
+}
+.collect-status {
+    color: #3b8e8e;
+    margin-right: 16px;
+	font-size: 14px;
+}
+.status-box {
+    margin: 0 8px;
+    display: flex;
+    align-items: center;
+    justify-content: flex-start;
+}
+.status-color {
+    width: 40px;
+    height: 15px;
+    border-radius: 2px;
+    margin-right: 8px;
+}
+.status-wrap {
+    display: flex;
+    -ms-flex-wrap: wrap;
+    flex-wrap: wrap;
+    -webkit-box-pack: start;
+    -ms-flex-pack: start;
+    justify-content: start;
+}
+.status-wrap .status-con {
+    display: flex;
+    flex: 1;
+    flex-wrap: wrap;
+}
+.status-wrap /deep/ .el-checkbox.el-checkbox--large {
+    color: #3b8e8e;
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3