From 241e5b5b546f0824ed405914b26dde8e1e502b02 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期日, 17 九月 2023 17:54:06 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes
---
CanadaMes-ui/src/views/home/index.vue | 57 +++++++++++++++++++++++++++++++--------------------------
1 files changed, 31 insertions(+), 26 deletions(-)
diff --git a/CanadaMes-ui/src/views/home/index.vue b/CanadaMes-ui/src/views/home/index.vue
index 072ab2c..9a39977 100644
--- a/CanadaMes-ui/src/views/home/index.vue
+++ b/CanadaMes-ui/src/views/home/index.vue
@@ -60,25 +60,25 @@
.gezi {
height: 35px;
-
+
position: absolute;
- width: 3.07px;
+ width: 3.08px;
/* width: 4.22px; */
}
-.gezi:nth-child(22),
+/* .gezi:nth-child(22),
.gezi:nth-child(43),
.gezi:nth-child(64),
.gezi:nth-child(85) {
margin-left: 7px;
- /* margin-left: 10px; */
-}
+ margin-left: 10px;
+} */
.blocks {
-
+
background-image: url('../../img/xmjc.png');
margin: 0 auto;
background-repeat: no-repeat;
@@ -241,22 +241,24 @@
<el-footer>
<div class="blocks" style="position: relative;">
<div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:237px;">
- <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist1" :key="item['date']"
- :style="{ height: 35 * item['glassWidth'] + 'px',left:3.07*index+'px' }" @click="showcageinfo(item['cage'])"></div>
+ <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist1" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px', left: 3.07 * index+(item['cage']-1)*6.8 + 'px' }"
+ @click="showcageinfo(item['cage'])"></div>
</div>
<div style="display:flex;position: absolute;float:left;z-index: 999;top:102px;left:640px;">
- <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist2" :key="item['date']"
- :style="{ height: 35 * item['glassWidth'] + 'px',left:3.07*index+'px' }" @click="showcageinfo(item['cage'])"></div>
+ <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist2" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px', left: 3.07 * index+(item['cage']-6)*6.8 + 'px' }"
+ @click="showcageinfo(item['cage'])"></div>
</div>
<div style="display:flex;position: absolute;float:left;z-index: 999;top:139px;left:237px;">
- <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist3" :key="item['date']"
- :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px',left:3.07*index+'px' }"
+ <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist3" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px', left: 3.07 * index+(item['cage']-1)*6.8 + 'px' }"
@click="showcageinfo(item['cage'])">
</div>
</div>
<div style="display:flex;position: absolute;float:left;z-index: 999;top:139px;left:640px;">
- <div :class="getStatusClass(item.state)" v-for="(item,index) in cagelist4" :key="item['date']"
- :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px',left:3.07*index+'px' }"
+ <div :class="getStatusClass(item.state)" v-for="(item, index) in cagelist4" :key="item['date']"
+ :style="{ height: 35 * item['glassWidth'] + 'px', top: item['width'] * 35 - 35 + 'px', left: 3.07 * index+(item['cage']-6)*6.8 + 'px' }"
@click="showcageinfo(item['cage'])"></div>
</div>
<div class="blocks-img" :style="{ left: car1 + 'px', top: '16px' }"></div>
@@ -360,7 +362,7 @@
</template>
<script>
-import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID } from "../../api/home";
+import { home, home2, loadtask, InsertOrder, Addglassid, UpdateTask, SelectAlarmmgInfo, SelectCageInfo, DeleteByGlassID, OutByGlassID, Loadcarlist } from "../../api/home";
import LanguageMixin from '../../lang/LanguageMixin'
@@ -397,12 +399,13 @@
order: "",
glassid: "",
url: "../../img/bigcar01.png",
- car1: 107,
- car2: 175,
- // car1: 150,
- // car2: 242,
+ car1: 145,
+ car2: 210,
+ // car1: 210,
+ // car2: 300,
cageinfo: [],
- cage: 0
+ cage: 0,
+ carlist: []
};
},
created() {
@@ -434,10 +437,10 @@
//console.log("鏀跺埌鏁版嵁====" + msg.data);
let obj = JSON.parse(msg.data);
if (obj.params != null) {
- this.car1 = 107 + 17.62 * obj.params[0][0]/1000;
- this.car2 = 175 + 17.62 * obj.params[0][1]/1000;
- // this.car1 = 150 + 24.6 * obj.params[0][0]/1000;
- // this.car2 = 242 + 24.6 * obj.params[0][1]/1000;
+ this.car1 = 145 + 8.15 * (obj.params[0][0] - this.carlist[0]['start']) / (this.carlist[0]['end'] - this.carlist[0]['start']) * 100;
+ this.car2 = 210 + 8.15 * (obj.params[0][1] - this.carlist[1]['start']) / (this.carlist[1]['end'] - this.carlist[1]['start']) * 100;
+ // this.car1 = 210 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
+ // this.car2 = 300 + 11.25 * (obj.params[0][1]-this.carlist[1]['start'])/(this.carlist[1]['end']-this.carlist[1]['start'])*100;
}
this.tableData = obj.tableData[0];
this.cagelist1 = obj.cagelist1[0];
@@ -486,15 +489,17 @@
if (res.data.list.length > 0) {
this.outcell = this.tasklist2[0]['cell'];
}
-
});
loadtask(this.task2).then(res => {
this.tasklist2 = res.data.list;
-
});
SelectAlarmmgInfo().then(res => {
this.alarm = res.data.alarmmg;
});
+ Loadcarlist().then(res => {
+ this.carlist = res.data.carlist;
+ console.log(this.carlist);
+ });
},
//鏍规嵁鏍煎瓙鐘舵�佷慨鏀归鑹�
getStatusClass(state) {
--
Gitblit v1.8.0