|
@@ -20,15 +20,15 @@
|
|
|
<article class="left">
|
|
|
|
|
|
<div v-if="roomType==1||roomType==2" class="contianer">
|
|
|
- <el-carousel height="300px" indicator-position="none" :interval="300000">
|
|
|
+ <el-carousel height="300px" indicator-position="none" :interval="1800">
|
|
|
<el-carousel-item v-for="(item, index) in empty.a" :key="item + index">
|
|
|
- <img :src="item" />
|
|
|
+ <img :src="item.url" />
|
|
|
</el-carousel-item>
|
|
|
</el-carousel>
|
|
|
</div>
|
|
|
|
|
|
<div v-else-if="$route.query.type==3||$route.query.type==4" class="contianer">
|
|
|
- <el-carousel height="300px" indicator-position="none" :interval="300000">
|
|
|
+ <el-carousel height="300px" indicator-position="none" :interval="1800">
|
|
|
<el-carousel-item v-for="(item, index) in number.a" :key="item + index">
|
|
|
<img @click="toSowDetail(index)" :src="item" />
|
|
|
</el-carousel-item>
|
|
@@ -36,7 +36,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div v-else class="contianer">
|
|
|
- <el-carousel height="300px" indicator-position="none" :interval="300000">
|
|
|
+ <el-carousel height="300px" indicator-position="none" :interval="1800">
|
|
|
<el-carousel-item v-for="(item, index) in number.a" :key="item + index">
|
|
|
<img @click="toSowDetail(index)" :src="item" />
|
|
|
</el-carousel-item>
|
|
@@ -169,7 +169,8 @@ import empty5 from "../../../assets/img/empty5.jpg";
|
|
|
|
|
|
import {
|
|
|
reqDeliveryRoomInfo,
|
|
|
- reqUpload
|
|
|
+ reqUpload,
|
|
|
+ reqImglist
|
|
|
} from "@/api/deliveryRoomManagement.js";
|
|
|
|
|
|
// 时间选择器配置
|
|
@@ -235,13 +236,25 @@ export default {
|
|
|
},
|
|
|
index: 0,
|
|
|
show: false,
|
|
|
- roomType: -1
|
|
|
+ roomType: -1,
|
|
|
+ timer1: null
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
console.log(this.$route.query.type);
|
|
|
this.roomType = this.$route.query.type;
|
|
|
this.getDeliveryRoomInfo({ bedNo: "10086-1" });
|
|
|
+
|
|
|
+ window.clearInterval(this.timer1)
|
|
|
+ this.getImglist()
|
|
|
+ this.timer1 = setInterval(() => {
|
|
|
+ this.getImglist()
|
|
|
+ console.log("1")
|
|
|
+ }, 10000)
|
|
|
+
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ window.clearInterval(this.timer1)
|
|
|
},
|
|
|
methods: {
|
|
|
// 请求厂房列表
|
|
@@ -267,6 +280,16 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ // 拿到图片数组
|
|
|
+ getImglist() {
|
|
|
+ reqImglist()
|
|
|
+ .then(res => {
|
|
|
+ this.empty.a = res
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
pickerChange(value) {
|
|
|
console.log(value);
|
|
|
this.getDeliveryRoomInfo({ bedNo: "10086-1", date: value });
|