添加装置

master
fanluyan 2 years ago
parent 0566418f1b
commit a822f6b578

@ -36,15 +36,14 @@ export function getChannelByTermidJoggle(data) {
});
}
//图片轮巡
//获取图片轮巡接口
export function getPictureList(data) {
return request({
url: "/test/getPhotoBanner",
method: "post",
data
})
data,
});
}
//实时查询
@ -53,8 +52,8 @@ export function getSearchInfo(data){
return request({
url: "/test/getLineAndGt",
method: "post",
data
})
data,
});
}
//杆塔信息
@ -308,3 +307,23 @@ export function getLatestPhotoJoggle(data) {
data,
});
}
//获取所有通道列表
export function getAllChannelListJoggle(data) {
return request({
url: "/test/getAllChannelList",
method: "post",
data,
});
}
//获取所有杆塔列表
export function getAllTowerJoggle(data) {
return request({
url: "/test/getAllTower",
method: "post",
data,
});
}

@ -21,14 +21,13 @@
<el-form-item label="杆塔编号:" prop="towerid" required>
<el-select
v-model="formInfo.towerid"
multiple
placeholder="请选择"
@change="changetowerid"
>
<el-option
v-for="item in toweridOptions"
:key="item.id"
:label="item.channelname"
:label="item.lineName"
:value="item.id"
>
</el-option>
@ -106,7 +105,8 @@
import {
addTerminalJoggle,
updateTerminalJoggle,
getChannelListapi,
getAllChannelListJoggle,
getAllTowerJoggle,
} from "@/utils/api/index";
export default {
props: {
@ -127,9 +127,9 @@ export default {
data() {
let validCmid = (rule, value, callback) => {
let reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{17}$/;
let reg = /^[0-9A-Za-z]{17}$/;
if (!reg.test(value)) {
callback(new Error("装置id是由17位字母+数字组合"));
callback(new Error("装置id位17位编码"));
} else {
callback();
}
@ -140,6 +140,7 @@ export default {
channelOptions: "",
channelArr: [],
toweridOptions: "",
toweridVal: "",
formInfo: {},
rules: {
// displayName: [
@ -266,10 +267,7 @@ export default {
},
//
getChannel() {
getChannelListapi({
pageindex: this.page,
pagesize: this.pageSize,
})
getAllChannelListJoggle()
.then((res) => {
this.channelOptions = res.data.list;
console.log(this.channelOptions);
@ -278,13 +276,35 @@ export default {
console.log(err);
});
},
//
getTowerid() {
getAllTowerJoggle()
.then((res) => {
this.toweridOptions = res.data.list;
console.log(this.channelOptions);
})
.catch((err) => {
console.log(err);
});
},
//id
changeChannelId(val) {
console.log(val);
this.channelArr = val;
},
//
changetowerid() {},
//id
changetowerid(val) {
let opt = {};
opt = this.toweridOptions.find((item) => {
return item.lineName;
});
// let channelObj = {};
// channelObj = this.channelOption.find(function (i) {
// return i.value;
// });
console.log(opt.lineName);
//this.toweridVal = val;
},
},
mounted() {
console.log("打印传过来的对象", this.formItem);
@ -293,6 +313,7 @@ export default {
},
created() {
this.getChannel();
this.getTowerid();
},
watch: {
formItem: {

@ -35,8 +35,8 @@
<div class="imageCenter" v-loading="loading">
<div class="imgList" v-for="(item, index) in picList" :key="index">
<viewer class="bigpic" v-if="!item.path.includes('mp4')">
<!-- <img :src="item.path + '!1280x720'" /> -->
<el-image :src="item.path + '!1280x720'" lazy></el-image>
<img :src="item.path + '!1280x720'" />
<!-- <el-image :src="item.path + '!1280x720'" lazy></el-image> -->
</viewer>
<video width="100%" height="90%" controls autoplay v-else>
<source :src="item.path" type="video/mp4" />
@ -217,7 +217,7 @@ export default {
this.getPicData();
if (this.page >= this.totalPage) {
clearInterval(this.timer);
this.page = 0;
this.page = 1;
this.startCountdown();
}
} else {
@ -307,7 +307,7 @@ export default {
width: 100%;
height: 100%;
}
.el-image {
img {
width: 100%;
height: 100%;
}

@ -57,7 +57,7 @@
</el-form-item>
</el-form>
</div>
<div class="pictureBox" v-loading="loading">
<div class="pictureBox" v-loading="loading" ref="picture_ref">
<el-card
class="box-card imgList"
v-for="(item, index) in picList"
@ -66,6 +66,11 @@
<viewer class="bigpic">
<img :src="item.path" />
<!-- <el-image :src="item.path" lazy></el-image> -->
<!-- <el-image :src="item.path" lazy :scroll-container="scrollContainer">
<div slot="placeholder" class="image-slot">
加载中<span class="dot">...</span>
</div>
</el-image> -->
<div class="caption">
<p class="infoTop">
{{ item.channelId }}-{{ item.termId }}-{{ item.fileSize }}
@ -116,7 +121,7 @@ export default {
},
picList: [],
page: 1, //
pageSize: 30, //
pageSize: 10, //
total: 0, //
loading: false,
};
@ -128,6 +133,7 @@ export default {
]);
this.getSearchdy();
this.getPicData();
this.scrollContainer = this.$refs.picture_ref.warp;
},
methods: {
//

Loading…
Cancel
Save