添加装置

master
fanluyan 2 years ago
parent 0566418f1b
commit a822f6b578

@ -36,25 +36,24 @@ export function getChannelByTermidJoggle(data) {
}); });
} }
//图片轮巡 //图片轮巡
//获取图片轮巡接口 //获取图片轮巡接口
export function getPictureList(data){ export function getPictureList(data) {
return request({ return request({
url: "/test/getPhotoBanner", url: "/test/getPhotoBanner",
method: "post", method: "post",
data data,
}) });
} }
//实时查询 //实时查询
//获取电压-线路-杆塔等信息 //获取电压-线路-杆塔等信息
export function getSearchInfo(data){ export function getSearchInfo(data) {
return request({ return request({
url: "/test/getLineAndGt", url: "/test/getLineAndGt",
method: "post", method: "post",
data data,
}) });
} }
//杆塔信息 //杆塔信息
@ -308,3 +307,23 @@ export function getLatestPhotoJoggle(data) {
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-form-item label="杆塔编号:" prop="towerid" required>
<el-select <el-select
v-model="formInfo.towerid" v-model="formInfo.towerid"
multiple
placeholder="请选择" placeholder="请选择"
@change="changetowerid" @change="changetowerid"
> >
<el-option <el-option
v-for="item in toweridOptions" v-for="item in toweridOptions"
:key="item.id" :key="item.id"
:label="item.channelname" :label="item.lineName"
:value="item.id" :value="item.id"
> >
</el-option> </el-option>
@ -106,7 +105,8 @@
import { import {
addTerminalJoggle, addTerminalJoggle,
updateTerminalJoggle, updateTerminalJoggle,
getChannelListapi, getAllChannelListJoggle,
getAllTowerJoggle,
} from "@/utils/api/index"; } from "@/utils/api/index";
export default { export default {
props: { props: {
@ -127,9 +127,9 @@ export default {
data() { data() {
let validCmid = (rule, value, callback) => { 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)) { if (!reg.test(value)) {
callback(new Error("装置id是由17位字母+数字组合")); callback(new Error("装置id位17位编码"));
} else { } else {
callback(); callback();
} }
@ -140,6 +140,7 @@ export default {
channelOptions: "", channelOptions: "",
channelArr: [], channelArr: [],
toweridOptions: "", toweridOptions: "",
toweridVal: "",
formInfo: {}, formInfo: {},
rules: { rules: {
// displayName: [ // displayName: [
@ -266,10 +267,7 @@ export default {
}, },
// //
getChannel() { getChannel() {
getChannelListapi({ getAllChannelListJoggle()
pageindex: this.page,
pagesize: this.pageSize,
})
.then((res) => { .then((res) => {
this.channelOptions = res.data.list; this.channelOptions = res.data.list;
console.log(this.channelOptions); console.log(this.channelOptions);
@ -278,13 +276,35 @@ export default {
console.log(err); console.log(err);
}); });
}, },
//
getTowerid() {
getAllTowerJoggle()
.then((res) => {
this.toweridOptions = res.data.list;
console.log(this.channelOptions);
})
.catch((err) => {
console.log(err);
});
},
//id //id
changeChannelId(val) { changeChannelId(val) {
console.log(val); console.log(val);
this.channelArr = val; this.channelArr = val;
}, },
// //id
changetowerid() {}, 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() { mounted() {
console.log("打印传过来的对象", this.formItem); console.log("打印传过来的对象", this.formItem);
@ -293,6 +313,7 @@ export default {
}, },
created() { created() {
this.getChannel(); this.getChannel();
this.getTowerid();
}, },
watch: { watch: {
formItem: { formItem: {

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

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

Loading…
Cancel
Save