From 32678f5c24c7681a198b517fa72db1de2e98646d Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期一, 08 七月 2024 22:00:42 +0800
Subject: [PATCH] PCS平面图检测线段
---
代码管理/PCS/WCS_Client/src/views/Home.vue | 7
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs | 31 ++++
代码管理/PCS/WCS_Client/src/views/Homes/Homest/centerLeft4index.vue | 300 ++++++++++++++++++++++++++++++++++++++++++++++++++
代码管理/PCS/WCS_Client/src/views/Homes/centerLeft1.vue | 10 +
代码管理/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json | 4
代码管理/PCS/WCS_Client/src/views/Homes/Homest/centerLeft1index.vue | 1
6 files changed, 343 insertions(+), 10 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Home.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Home.vue"
index 435f2cc..dcbebfe 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Home.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Home.vue"
@@ -1,4 +1,5 @@
<template>
+ <div class="home-page">
<div class="qhuan">
<el-button type="primary" :class="{ 'qh_box': true, 'selected': selected === '涓嬫枡鍖�' }"
v-on:click="selectss(0)">涓嬫枡鍖�</el-button>
@@ -68,6 +69,7 @@
<centerLeft2 :dataList="datalist" />
</div>
<!-- 搴撳尯浠g爜 -->
+</div>
</template>
<script>
@@ -223,8 +225,9 @@
}
</script>
-<style>
-body {
+<style scoped>
+.home-page {
+ width: 125%;
background-image: url("../assets/imgs/pageBg.png");
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/Homest/centerLeft1index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/Homest/centerLeft1index.vue"
index 5fdfecf..4a4c586 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/Homest/centerLeft1index.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/Homest/centerLeft1index.vue"
@@ -1015,6 +1015,7 @@
</script>
<style scoped>
+
.contents {
display: flex;
align-items: flex-end;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/Homest/centerLeft4index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/Homest/centerLeft4index.vue"
new file mode 100644
index 0000000..4c587b6
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/Homest/centerLeft4index.vue"
@@ -0,0 +1,300 @@
+<template>
+ <div class="container">
+
+
+ <div style="margin-top: -6px;">
+ <!--杞﹂棿涔嬩笅鐨勮緤閬撶嚎-->
+ <div style="margin-top: -30px;">
+ <div class="box" >
+ <div v-for="items in plcList_one.section_fourteen" class="box_sto"
+ :style="{ 'background-color': getBackgroundColor2(items.r_wheel_SN) }">
+ <el-tooltip class="item" effect="dark" placement="right">
+ <template #content v-if="items.r_wheel_SN != '' && items.r_wheel_SN != null">
+ <div>r_wheel_SN锛歿{ items.r_wheel_SN }}</div>
+ <div>r_wheel_type锛歿{ items.r_wheel_type }}</div>
+ <div>r_part_status锛歿{ items.r_part_status }}</div>
+ <div>r_part_process锛� {{ items.r_part_process }}</div>
+ <div>stackerNo:{{ items.stackerNo }}</div>
+ </template>
+ <template #content v-else>
+ <div>鐩墠鏆傛棤杞﹁疆淇℃伅</div>
+ <div>stackerNo:{{ items.stackerNo }}</div>
+ </template>
+ <div class="box_sto_dt">
+ <div class="quan_div" v-if="items.r_wheel_SN != '' && items.r_wheel_SN != null">
+ <img src="../../../assets/imgs/pcs_lun.png" style="width: 100%;">
+ </div>
+ <div v-else>{{ items.stackerNo }}</div>
+ </div>
+ </el-tooltip>
+ </div>
+ </div>
+
+ </div>
+ <!--杞﹂棿涔嬩笅鐨勮緤閬撶嚎-->
+
+ <div style="margin-top: -164px;margin-right: 30px;">
+ <!--涓嬭溅闂翠腑闂磋緤閬�-->
+ <div class="box" style="height: 66px;display: flex;width: 210px;">
+ <div v-for="items in plcList_one.section_sixteen" class="box_sto2"
+ :style="{ 'background-color': getBackgroundColor2(items.r_wheel_SN) }">
+ <el-tooltip class="item" effect="dark" placement="left">
+ <template #content v-if="items.r_wheel_SN != '' && items.r_wheel_SN != null">
+ <div>r_wheel_SN锛歿{ items.r_wheel_SN }}</div>
+ <div>r_wheel_type锛歿{ items.r_wheel_type }}</div>
+ <div>r_part_status锛歿{ items.r_part_status }}</div>
+ <div>r_part_process锛� {{ items.r_part_process }}</div>
+ <div>stackerNo:{{ items.stackerNo }}</div>
+ </template>
+ <template #content v-else>
+ <div>鐩墠鏆傛棤杞﹁疆淇℃伅</div>
+ <div>stackerNo:{{ items.stackerNo }}</div>
+ </template>
+ <div class="box_sto_dt">
+ <div class="quan_div" v-if="items.r_wheel_SN != '' && items.r_wheel_SN != null">
+ <img src="../../../assets/imgs/pcs_lun.png" style="width: 100%;">
+ </div>
+ <div v-else>{{ items.stackerNo }}</div>
+ </div>
+ </el-tooltip>
+ </div>
+ </div>
+ <!--涓嬭溅闂翠腑闂磋緤閬�-->
+ </div>
+ </div>
+ </div>
+
+
+</template>
+
+<script>
+import axios from 'axios';
+
+export default {
+ props: {
+ dataList: {
+ type: Array,
+ required: true
+ },
+ plcList_one: {
+ type: Array,
+ required: true
+ }
+ },
+ data() {
+ return {
+ isModalVisible: false,
+ isModalVisible2: false,
+ isModalVisible3: false,
+ dataFList: []
+ };
+ },
+ mounted() {
+ },
+ methods: {
+ open(staname) {
+ this.http.get('api/Readplc/Four_unit_plc3?staname=' + staname).then(x => {
+ this.dataFList = x;
+ this.isModalVisible = true;
+ })
+ .catch(error => {
+ console.error('璇锋眰鍑洪敊锛�', error);
+ });
+ },
+ getBackgroundColor4(vk_state){
+ if(vk_state==1){
+ return 'lightgreen';
+ }else if(vk_state==2){
+ return '#3c3ca5';
+ }else if(vk_state>=10 && vk_state<=20){
+ return '#cccc33';
+ }else if(vk_state>20){
+ return '#d53d3d';
+ }else{
+ return 'rgb(195 176 176)';
+ }
+ },
+ getBackgroundColor(enable, locationState) {
+ if (enable == '0') {
+ return '#C0C4CC';
+ }
+ else {
+ switch (locationState) {
+ case 'Stroge':
+ return '#409eff';
+ case 'Empty':
+ return 'lightgreen';
+ case 'InBusy':
+ return 'yellow';
+ case 'OutBusy':
+ return 'yellow';
+ case 'Busy':
+ return 'yellow';
+ case 'Abnormal':
+ return 'red';
+ case 'Abnormal':
+ return 'yellow';
+ default:
+ return 'transparent';
+ }
+ }
+
+ },
+ getBackgroundColor2(r_wheel_SN) {
+ if (r_wheel_SN != '') {
+ return 'lightgreen';
+ }
+ }
+ }
+}
+</script>
+
+<style scoped>
+.contents {
+ display: flex;
+ align-items: flex-end;
+}
+
+
+.box {
+ background-color: rgb(129, 179, 182);
+ width: 69px;
+ margin-left: 10px;
+ margin-left: 3px;
+ color: rgb(255, 255, 255);
+ font-size: 16px;
+}
+
+.box_sto {
+ width: 100%;
+ border: 1px solid #000000;
+ height: 45px;
+ background-image: url(../../../assets/lines.png);
+ background-size: 100%;
+ margin-top: 6px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+}
+
+.div_cl {
+ width: 30px;
+ height: 25px;
+ float: right;
+ background-color: greenyellow;
+ text-align: center;
+ padding-top: 5px;
+}
+
+.div_inp{
+ margin-left: 40px;
+}
+.div_cl2 {
+ width: 30px;
+ height: 25px;
+ float: right;
+ background-color: darkgrey;
+ text-align: center;
+ padding-top: 5px;
+}
+.box_sto2 {
+ width: 67px;
+ border: 1px solid #000000;
+ height: 65px;
+ background-image: url(../../../assets/linesd.png);
+ background-size: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-left: 4px;
+}
+
+.box_sto_dt {
+ height: 17px;
+ text-align: center;
+ line-height: 17px;
+ margin-bottom: 3px;
+}
+
+
+.quan_div {
+ border: 1px solid #000000;
+ border-radius: 50px;
+ width: 30px;
+ height: 30px;
+ background-color: #818181;
+ margin-top: -3px;
+}
+
+.box2_sto_baox {
+ width: 137px;
+ height: 45px;
+ background-color: rgb(129, 179, 182);
+ margin-left: 5px;
+ border-radius: 10px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 18px;
+ padding: 5px;
+ text-align: center
+}
+
+.box_stoy {
+ width: 35px;
+ height: 35px;
+ background-color: rgb(129, 179, 182);
+ margin-left: 4px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ text-align: center
+}
+
+.box2_sto_yj {
+ width: 70px;
+ height: 70px;
+ margin-left: 5px;
+ border-radius: 10px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 18px;
+ padding: 5px;
+ text-align: center;
+ background-color: rgb(129, 179, 182);
+}
+
+.box2_sto_yj2 {
+ width: 50px;
+ height: 50px;
+
+ margin-left: 5px;
+ border-radius: 10px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-size: 18px;
+ padding: 5px;
+}
+
+.x_div {
+ border: 1px solid #757373;
+ width: 57px;
+ height: 52px;
+}
+
+.jie_div {
+
+ width: 57px;
+ height: 52px;
+ color: #ffffff;
+}
+
+.w_div {
+ height: 43px;
+ width: 40px;
+ margin: 5px auto;
+}
+
+</style>
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/centerLeft1.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/centerLeft1.vue"
index 9f2077e..b08a476 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/centerLeft1.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/views/Homes/centerLeft1.vue"
@@ -19,6 +19,11 @@
<centerLeft3index :dataList="dataList" :plcList_one="plcList_three" />
</div>
<!-- 涓夊崟鍏� -->
+ <!-- 涓夊崟鍏� -->
+ <div class="cen_div" style="margin-left: 80px;">
+ <centerLeft4index :dataList="dataList" :plcList_one="plcList_three" />
+ </div>
+ <!-- 涓夊崟鍏� -->
</div>
</template>
@@ -27,6 +32,7 @@
import centerLeft1index from '@/views/Homes/Homest/centerLeft1index.vue';
import centerLeft2index from '@/views/Homes/Homest/centerLeft2index.vue';
import centerLeft3index from '@/views/Homes/Homest/centerLeft3index.vue';
+ import centerLeft4index from '@/views/Homes/Homest/centerLeft4index.vue';
export default {
props: {
@@ -55,6 +61,7 @@
centerLeft1index,
centerLeft2index,
centerLeft3index,
+ centerLeft4index,
},
mounted() {
},
@@ -63,7 +70,8 @@
}
</script>
-<style>
+<style >
+
.contents {
display: flex;
align-items: flex-end;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs"
index baee244..fe4d685 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs"
@@ -94,7 +94,7 @@
var Section_one = DBIems.Where(x => IsInRange(x.StackerNo, 4, 13, 4, 24)).ToList();
var Section_two = DBIems.Where(x => IsInRange(x.StackerNo, 4, 11, 4, 12)).ToList();
- var Section_three = DBIems.Where(x => IsInRange(x.StackerNo, 4, 9, 4, 10)).ToList();
+ var Section_three = DBIems.Where(x => IsInRange(x.StackerNo, 4, 9, 4, 10)).OrderByDescending(x=>x.StackerNo).ToList();
var Section_four = DBIems.Where(x => IsInRange(x.StackerNo, 4, 1, 4, 8)).ToList();
var Section_six = DBIems.Where(x => IsInRange(x.StackerNo, 10, 1, 10, 2)).ToList(); //10.1-10.2
var Section_seven = DBIems.Where(x => IsInRange(x.StackerNo, 10, 3, 10, 4)).ToList(); //10.3-10.4
@@ -360,7 +360,7 @@
List<SectionData> DataList2 = new List<SectionData>();
var Section_one = DBIems.Where(x => IsInRange(x.StackerNo, 5, 13, 5, 24)).ToList();
var Section_two = DBIems.Where(x => IsInRange(x.StackerNo, 5, 11, 5, 12)).ToList();
- var Section_three = DBIems.Where(x => IsInRange(x.StackerNo, 5, 9, 5, 10)).ToList();
+ var Section_three = DBIems.Where(x => IsInRange(x.StackerNo, 5, 9, 5, 10)).OrderByDescending(x => x.StackerNo).ToList();
var Section_four = DBIems.Where(x => IsInRange(x.StackerNo, 5, 1, 5, 8)).ToList();
@@ -491,7 +491,7 @@
if (DBIems.Count == 0)
{
List<SectionData> DBIemss = new List<SectionData>();
- for (int i = 0; i < 31; i++)
+ for (int i = 0; i < 36; i++)
{
var seDataList = new SectionData
{
@@ -523,6 +523,21 @@
case 30:
seDataList.stackerNo = "鏈烘鎵�3";
break;
+ case 31:
+ seDataList.stackerNo = "7.26";
+ break;
+ case 32:
+ seDataList.stackerNo = "7.27";
+ break;
+ case 33:
+ seDataList.stackerNo = "7.28";
+ break;
+ case 34:
+ seDataList.stackerNo = "7.29";
+ break;
+ case 35:
+ seDataList.stackerNo = "7.30";
+ break;
default:
break;
}
@@ -540,8 +555,12 @@
}
var Section_one = DBIems.Where(x => IsInRange(x.StackerNo, 6, 13, 6, 20) || x.StackerNo == "6.24" || x.StackerNo == "7.21").ToList();
+
+ var Section_fourteen= DBIems.Where(x => IsInRange(x.StackerNo, 7, 26, 7, 27)).ToList(); //涓婃枡鍙�
+ var Section_sixteen = DBIems.Where(x => IsInRange(x.StackerNo, 7, 28, 7, 30)).ToList(); //涓婃枡鍙�
+
var Section_two = DBIems.Where(x => IsInRange(x.StackerNo, 6, 11, 6, 12)).ToList();
- var Section_three = DBIems.Where(x => IsInRange(x.StackerNo, 6, 9, 6, 10)).ToList();
+ var Section_three = DBIems.Where(x => IsInRange(x.StackerNo, 6, 9, 6, 10)).OrderByDescending(x => x.StackerNo).ToList();
var Section_four = DBIems.Where(x => IsInRange(x.StackerNo, 6, 1, 6, 8)).ToList();
var Section_thirteen = DBIems.Where(x => IsInRange(x.StackerNo, 6, 21, 6, 23)).ToList();
@@ -618,7 +637,9 @@
Section_eleven,
Section_twelve,
Section_thirteen,
- Section_fifteen
+ Section_fifteen,
+ Section_fourteen,
+ Section_sixteen
};
return Ok(data);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json"
index 1ecb410..ef57b3b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json"
@@ -16,8 +16,8 @@
"Connection": {
"DBType": "MsSql", //MySql/MsSql/PgSql //鏁版嵁搴撶被鍨嬶紝濡傛灉浣跨敤鐨勬槸sqlserver姝ゅ搴旇缃负MsSql
//sqlserver杩炴帴瀛楃涓睵@ssw0rd
- "DbConnectionString": "Data Source=192.168.12.101;Initial Catalog=WIDESEA_DB;Persist Security Info=True;User ID=sa;Password=123456;Connect Timeout=500;",
- //"DbConnectionString": "Data Source=.;Initial Catalog=WIDESEA_DB;Persist Security Info=True;User ID=sa;Password=P@ssw0rd;Connect Timeout=500;",
+ //"DbConnectionString": "Data Source=192.168.12.101;Initial Catalog=WIDESEA_DB;Persist Security Info=True;User ID=sa;Password=123456;Connect Timeout=500;",
+ "DbConnectionString": "Data Source=.;Initial Catalog=WIDESEA_DB_TY_TY;Persist Security Info=True;User ID=sa;Password=123456;Connect Timeout=500;",
//mysql杩炴帴瀛楃涓�(鍗囩骇EFCore3.1鍒版椂宸插皢mysql杩炴帴瀛楃涓蹭慨鏀�,2019-12-20)
// "DbConnectionString": " Data Source=127.0.0.1;Database=netcoredev;AllowLoadLocalInfile=true;User ID=root;Password=123456;allowPublicKeyRetrieval=true;pooling=true;CharSet=utf8;port=3306;sslmode=none;",
--
Gitblit v1.9.3