分支自 SuZhouGuanHong/TaiYuanTaiZhong

huanghongfeng
2024-07-08 32678f5c24c7681a198b517fa72db1de2e98646d
PCS平面图检测线段
已修改5个文件
已添加1个文件
351 ■■■■■ 文件已修改
代码管理/PCS/WCS_Client/src/views/Home.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/Homes/Homest/centerLeft1index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/Homes/Homest/centerLeft4index.vue 300 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Client/src/views/Homes/centerLeft1.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/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>
  <!-- åº“区代码 -->
</div>
</template>
<script>
@@ -223,8 +225,9 @@
}
</script>
<style>
body {
<style scoped>
.home-page {
  width: 125%;
  background-image: url("../assets/imgs/pageBg.png");
}
´úÂë¹ÜÀí/PCS/WCS_Client/src/views/Homes/Homest/centerLeft1index.vue
@@ -1015,6 +1015,7 @@
</script>
<style scoped>
.contents {
    display: flex;
    align-items: flex-end;
´úÂë¹ÜÀí/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>
´úÂë¹ÜÀí/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() {
  },
@@ -64,6 +71,7 @@
</script>
<style>
.contents {
  display: flex;
  align-items: flex-end;
´úÂë¹ÜÀí/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);
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json
@@ -16,8 +16,8 @@
  "Connection": {
    "DBType": "MsSql", //MySql/MsSql/PgSql  //数据库类型,如果使用的是sqlserver此处应设置为MsSql
    //sqlserver连接字符串P@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;",