Compare commits

..

No commits in common. "bf7a53a9e370c357a6a57bc6f01d94156eb57af5" and "d52cff7a8eb183fa6a1b4138fe9128278fa4ad4d" have entirely different histories.

7 changed files with 20 additions and 26 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 903 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

BIN
src/assets/img/U轨道.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
src/assets/img/car.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
src/assets/img/直轨.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2022-05-31 15:49:03 * @Date: 2022-05-31 15:49:03
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2022-11-22 14:41:50 * @LastEditTime: 2022-06-06 15:27:38
* @Description: * @Description:
--> -->
<template> <template>
@ -11,8 +11,9 @@
style="width:100%;height:100%;border-bottom:1px dotted #ff0000;padding-bottom:10px" style="width:100%;height:100%;border-bottom:1px dotted #ff0000;padding-bottom:10px"
> >
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="6"><div class="Ugui"></div></el-col>
<div class="zhigui" id="zhigui"> <el-col :span="18">
<div class="zhigui">
<div class="car" id="car"></div> <div class="car" id="car"></div>
</div> </div>
</el-col> </el-col>
@ -357,7 +358,8 @@ export default {
} }
], ],
car: '', car: '',
zhigui: '' zhigui: '',
motion: ''
} }
}, },
created () {}, created () {},
@ -367,24 +369,10 @@ export default {
methods: { methods: {
init () { init () {
this.car = document.getElementById('car') this.car = document.getElementById('car')
this.zhigui = document.getElementById('zhigui') this.motion = setInterval(() => {
this.runCar()
},
runCar () {
const runCarInterval = setInterval(() => {
this.car.style.left = this.car.offsetLeft - 1 + 'px' this.car.style.left = this.car.offsetLeft - 1 + 'px'
if (this.car.offsetLeft <= 0) { if (this.car.offsetLeft <= 0) {
clearInterval(runCarInterval) clearInterval(this.motion)
this.backCar()
}
}, 100)
},
backCar () {
const backCarInterval = setInterval(() => {
this.car.style.left = this.car.offsetLeft + 1 + 'px'
if (this.zhigui.clientWidth - this.car.offsetLeft - this.car.offsetWidth <= 0) {
clearInterval(backCarInterval)
this.runCar()
} }
}, 100) }, 100)
} }
@ -395,11 +383,17 @@ export default {
<style scoped> <style scoped>
.zhigui { .zhigui {
height: 250px; height: 250px;
background: url("../../../assets/1.png") repeat; background: url("../../../assets/img/直轨.jpeg") repeat;
background-size: 100% 100%; background-size: 100% 100%;
padding-top: 100px; padding-top: 100px;
position: relative; position: relative;
} }
.Ugui {
height: 250px;
transform: rotate(180deg);
background: url("../../../assets/img/U轨道.jpeg") repeat;
background-size: 100% 100%;
}
.wareBody { .wareBody {
margin: auto; margin: auto;
height: 90%; height: 90%;
@ -434,12 +428,12 @@ export default {
background-color: #09bb07; background-color: #09bb07;
} }
.car { .car {
width: 100px; width: 50px;
height: 100px; height: 50px;
background: url("../../../assets/2.png") repeat; background-color: rgb(116, 79, 250);
background: url("../../../assets/img/car.jpeg") repeat;
background-size: 100% 100%; background-size: 100% 100%;
right: 0; right: 0;
bottom: 40%;
position: absolute; position: absolute;
} }
.line { .line {

View File

@ -57,7 +57,7 @@
align="center" align="center"
label="终点"> label="终点">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ endPosition.find(item=>item.value === scope.row.targetPosition)?.label }}</span> <span>{{ endPosition.find(item=>item.value === scope.row.targetPosition).label }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column