线路添加杆塔

master
fanluyan 2 years ago
parent 8b2ce947ca
commit 416a6c99b9

@ -60,3 +60,6 @@
.el-button--primary {
width: 80px;
}
.el-dropdown [disabled] {
color: #fff;
}

@ -1,6 +1,6 @@
<template>
<el-dialog
class="addLineDialog"
class="addchannelDialog"
:title="title"
:visible.sync="isShow"
:close-on-click-modal="false"
@ -15,19 +15,27 @@
:model="formdata"
>
<el-form-item label="通道名称:" prop="channelname">
<el-input v-model="formdata.channelname" autocomplete="off" style="width:200px"></el-input>
<el-input v-model="formdata.channelname" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="装置ID" prop="id">
<el-input-number v-model="formdata.id" ></el-input-number>
<el-form-item label="装置ID" prop="id" :error="errorMsg">
<el-input-number v-model="formdata.id"></el-input-number>
</el-form-item>
<el-form-item label="分辨率高:" prop="maxResolutionHeight">
<el-input-number v-model="formdata.maxResolutionHeight" ></el-input-number>
<!-- <el-form-item label="分辨率高:" prop="maxResolutionHeight">
<el-input-number
v-model="formdata.maxResolutionHeight"
></el-input-number>
</el-form-item>
<el-form-item label="分辨率宽:" prop="maxResolutionWidth">
<el-input-number v-model="formdata.maxResolutionWidth" ></el-input-number>
</el-form-item>
<el-form-item label="状态:" prop="status" v-if="title=='修改'">
<el-switch v-model="formdata.status" :active-value="1" :inactive-value="0"></el-switch>
<el-input-number
v-model="formdata.maxResolutionWidth"
></el-input-number>
</el-form-item> -->
<el-form-item label="状态:" prop="status" v-if="title == '修改'">
<el-switch
v-model="formdata.status"
:active-value="1"
:inactive-value="0"
></el-switch>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -45,12 +53,19 @@ export default {
data() {
return {
isShow: false,
errorMsg: "",
formdata: {},
rules: {
channelname: [{ required: true, message: "请输入名称", trigger: "blur" }],
channelname: [
{ required: true, message: "请输入名称", trigger: "blur" },
],
id: [{ required: true, message: "请输入id", trigger: "blur" }],
maxResolutionHeight: [{ required: true, message: "请输入分辨率高", trigger: "blur" }],
maxResolutionWidth: [{ required: true, message: "请输入分辨率宽", trigger: "blur" }],
// maxResolutionHeight: [
// { required: true, message: "", trigger: "blur" },
// ],
// maxResolutionWidth: [
// { required: true, message: "", trigger: "blur" },
// ],
},
};
},
@ -72,11 +87,13 @@ export default {
formArr.push(this.formdata);
addChannelapi({ list: formArr })
.then((res) => {
this.errorMsg = "";
if (res.code == 200) {
this.$message.success("添加成功");
this.$parent.deviceList();
this.isShow = false;
}else{
} else {
this.errorMsg = res.msg;
this.$message.error(res.msg);
}
})
@ -90,7 +107,7 @@ export default {
this.$message.success("修改成功");
this.$parent.deviceList();
this.isShow = false;
}else{
} else {
this.$message.error(res.msg);
}
})
@ -110,10 +127,20 @@ export default {
hide() {
this.isShow = false;
},
handleclose(){
handleclose() {
this.$parent.deviceList();
}
},
},
mounted() {},
};
</script>
<style lang="less">
.addchannelDialog {
.el-form-item {
.el-input,
.el-input-number {
width: 100%;
}
}
}
</style>

@ -12,7 +12,11 @@
bigPicPath ? 'backgroundImage:url(' + bigPicPath + '!128x72)' : ''
"
>
<img class="animImg" :src="bigPicPath + '!1280x720'" />
<img
class="animImg"
v-if="bigPicPath !== ''"
:src="bigPicPath + '!1280x720'"
/>
<!-- <p class="mark">
{{ bigPicPath }}
<span>{{ this.activeSmall }}</span>
@ -86,6 +90,7 @@
>
<img
src="../../assets/img/loading.jpg"
style="object-fit: cover"
v-if="item.thumb.indexOf('jpg') == -1"
/>
<img :src="item.thumb" v-else />
@ -300,7 +305,7 @@ export default {
position: absolute;
cursor: pointer;
color: #fff;
font-size: 60px;
font-size: 16px;
border-radius: 30px;
position: absolute;
top: 50%;
@ -312,6 +317,8 @@ export default {
color: #fff;
text-align: center;
line-height: 60px;
width: 40px;
height: 40px;
&:hover {
color: #409eff;
}
@ -403,7 +410,7 @@ export default {
position: absolute;
cursor: pointer;
color: #fff;
font-size: 30px;
font-size: 12px;
border-radius: 30px;
position: absolute;
top: 45%;
@ -415,6 +422,8 @@ export default {
color: #fff;
text-align: center;
line-height: 60px;
width: 28px;
height: 28px;
}
.leftArrow {
left: 16px;

@ -4,7 +4,7 @@
:title="photoDialogTitle"
:visible.sync="isShow"
:close-on-click-modal="false"
width="660px"
width="576px"
@close="handleclose"
>
<el-form
@ -55,6 +55,7 @@
</el-form-item>
<el-form-item label="通道(可多选)" prop="channelVal">
<el-checkbox-group
class="channelBox"
v-model="formInfo.channelVal"
v-if="channelOptions.length > 0"
>
@ -122,7 +123,7 @@ export default {
{ validator: validCmid, trigger: "blur" },
],
},
photoDialogtype:0,//1 线change
photoDialogtype: 0, //1 线change
};
},
mounted() {},
@ -224,20 +225,20 @@ export default {
this.formInfo.towerid = "";
} else {
this.toweridOptions = res.data.list;
if (this.photoDialogTitle == "新增" || this.photoDialogtype == 1 ) {
if (this.photoDialogTitle == "新增" || this.photoDialogtype == 1) {
// this.formInfo.towerid = res.data.list[0].id;
this.$set(this.formInfo, "towerid", res.data.list[0].id);
this.photoDialogtype = 0
this.photoDialogtype = 0;
}
}
})
.catch((err) => {});
},
getTowerchange(){
getTowerchange() {
if (this.photoDialogTitle == "修改") {
this.photoDialogtype = 1
this.photoDialogtype = 1;
}
this.getTower()
this.getTower();
},
//
getChannel() {
@ -280,6 +281,13 @@ export default {
padding-right: 0px;
}
}
.channelBox {
.el-checkbox {
margin-right: 12px;
margin-left: 0px;
margin-bottom: 8px;
}
}
}
}
}

@ -0,0 +1,108 @@
<template>
<el-dialog
class="addtowerDialogline"
title="新增杆塔"
:visible.sync="isShow"
:close-on-click-modal="false"
width="420px"
>
<el-form
label-position="left"
label-width="92px"
ref="formLineInfo"
:rules="rules"
:model="formdata"
>
<el-form-item label="线路编号:" prop="lineId">
<el-input
v-model="formdata.lineId"
autocomplete="off"
:disabled="true"
></el-input>
</el-form-item>
<el-form-item label="杆塔名称:" prop="towerName">
<el-input v-model="formdata.towerName" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="isShow = false"> </el-button>
<el-button type="primary" @click="submitForm()"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { addTowerApi } from "@/utils/api/index";
export default {
props: {
lineDialogTitle: String,
},
data() {
return {
isShow: false,
formdata: {},
dyOptions: "",
rules: {
towerName: [
{
required: true,
message: "请输入杆塔名称",
trigger: "blur",
},
],
},
};
},
methods: {
//
getdataform(val) {
this.formdata = val;
this.formdata.lineId = val.name;
},
//
submitForm() {
this.$refs.formLineInfo.validate((valid) => {
if (valid) {
//
addTowerApi({
list: [
{
lineId: this.formdata.id,
name: this.formdata.towerName,
},
],
})
.then((res) => {
this.isShow = false;
this.$message.success("添加成功");
})
.catch((err) => {
this.$message.error("添加失败");
});
} else {
console.log("error submit!!");
return false;
}
});
},
display() {
this.isShow = true;
},
hide() {
this.isShow = false;
},
},
created() {},
};
</script>
<style lang="less">
.addtowerDialogline {
.el-select {
width: 100%;
}
}
</style>

@ -85,15 +85,18 @@
:lineDialogTitle="lineDialogTitle"
ref="addlineDialogref"
></add-lineDialog>
<!-- 新增杆塔 -->
<add-towerDialog ref="addTowerDialogref"></add-towerDialog>
</div>
</template>
<script>
import { getLineListJoggle, deleteLineJoggle } from "@/utils/api/index";
import addLineDialog from "./components/addLineDialog.vue";
import addTowerDialog from "./components/addTowerDialog.vue";
export default {
components: {
addLineDialog,
addTowerDialog,
},
data() {
return {
@ -149,6 +152,8 @@ export default {
//
handleTower(data) {
console.log(data);
this.$refs.addTowerDialogref.display();
this.$refs.addTowerDialogref.getdataform(data);
},
//

@ -79,6 +79,7 @@ export default {
if (this.title == "新增") {
let formArr = [];
formArr.push(this.formdata);
console.log(this.formdata);
addTowerApi({ list: formArr })
.then((res) => {
this.isShow = false;
@ -89,6 +90,7 @@ export default {
this.$message.error("添加失败");
});
} else {
console.log(this.formdata);
updateTowerApi(this.formdata)
.then((res) => {
this.isShow = false;

@ -40,11 +40,11 @@
show-overflow-tooltip
></el-table-column>
<el-table-column
<!-- <el-table-column
prop="id"
label="杆塔编号"
show-overflow-tooltip
></el-table-column>
></el-table-column> -->
<el-table-column fixed="right" label="操作" width="200">
<template slot-scope="scope">
@ -98,7 +98,12 @@ export default {
loading: true,
};
},
created() {
mounted() {
console.log("ssss");
this.deviceList();
},
activated() {
console.log("aaaaaaaaaassss");
this.deviceList();
},
methods: {

@ -207,7 +207,6 @@ export default {
pagesize: this.pageSize,
})
.then((res) => {
console.log(this.totalPage);
this.picList = res.data.list;
this.totalPage = res.data.totalpage;
this.total = res.data.total;
@ -219,19 +218,16 @@ export default {
},
//
startCountdown() {
console.log(this.remainingTime);
this.timer = setInterval(() => {
if (this.remainingTime <= 0) {
this.clearTimer();
console.log("结束");
this.page++;
console.log(this.totalPage);
if (this.page > this.totalPage) {
console.log("组后一页");
this.page = 0;
this.startCountdown();
} else {
console.log(this.page);
this.remainingTime = parseInt(localStorage.getItem("totalTime"))
? parseInt(localStorage.getItem("totalTime"))
: 15;
@ -256,15 +252,12 @@ export default {
//isRuning
toggleCountdown() {
if (this.isRuning) {
console.log(this.isRuning);
this.pauseCountdown();
} else {
console.log(this.isRuning);
this.startCountdown();
this.getPicData();
}
this.isRuning = !this.isRuning;
console.log(this.isRuning);
},
},
computed: {},

@ -6,9 +6,8 @@
:close-on-click-modal="false"
width="50%"
@close="handleclose"
v-loading="loading"
>
<div class="infoTable">
<div class="infoTable" v-loading="loading">
<el-descriptions class="margin-top" :column="1" border>
<el-descriptions-item>
<template slot="label"> 装置编号 </template>{{ cmdid }}
@ -74,6 +73,7 @@ export default {
methods: {
//
getListData(val, cmdid) {
this.loading = true;
this.cmdid = cmdid;
getDeviceList({
termId: val,
@ -84,17 +84,18 @@ export default {
this.timer = window.setInterval(() => {
this.getNewListData(val);
}, 10000);
this.loading = false;
})
.catch((err) => {});
},
//
getNewListData(val) {
this.loading = true;
getNewDeviceList({
queryTime: this.queryTime,
termId: val,
})
.then((res) => {
this.loading = false;
if (res.data.isNew == true) {
this.infornr = res.data;
this.$message({
@ -105,6 +106,7 @@ export default {
} else {
this.infornr = res.data;
}
this.loading = false;
})
.catch((err) => {});
},

@ -0,0 +1,611 @@
<template>
<el-dialog
class="setTimeDialog"
title="拍照时间表设置"
:visible.sync="isShow"
:close-on-click-modal="false"
@close="handleclose"
width="1000px"
>
<el-tabs v-model="activeName" @tab-click="handleClick" v-loading="loading">
<el-tab-pane label="查询实际时间表" name="1">
<div class="timebox">
<div class="flexnr">
<div class="w8">选择通道:</div>
<el-select
v-model="selaccess"
placeholder="请选择"
class="mr20"
@change="changeSelect"
>
<el-option
v-for="item in accesslist"
:key="item.channelid"
:label="item.channelname"
:value="item.channelid"
></el-option>
</el-select>
<!-- <el-button type="primary" @click="inquireRealbtn()"
>查询实际时间表</el-button
> -->
</div>
<div class="flexno bt30" v-if="this.shedulenr.length !== 0">
<div class="timehead">
<label>时间表规则:</label>
<p>ssssssssssss</p>
</div>
<div class="timeShow">
<div class="w8">时间表:</div>
<div class="w80 flexonly" v-loading="timeloading">
<el-tag
class="mr10 mt10"
size="mini"
v-for="(val, index) in this.shedulenr"
:key="index"
>{{ val }}</el-tag
>
</div>
</div>
</div>
<div class="flexno bt30" v-else></div>
<el-button class="searchBtn" type="text" @click="inquirebtn()"
>查询</el-button
>
</div>
</el-tab-pane>
<el-tab-pane label="设置时间表" name="2">
<div class="deviceTable">
<el-table
ref="multipleTable"
:data="deviceTableData"
tooltip-effect="dark"
stripe
style="width: 100%"
height="calc(100% - 40px)"
>
<el-table-column label="名称" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column label="时间表类型" show-overflow-tooltip>
<template>按时间段</template>
</el-table-column>
<el-table-column label="时间表规则" width="300">
<template slot-scope="scope">
<p
class="timeGz"
v-for="(val, index) in scope.row.list"
:key="index"
>
<span>{{ val.startTime }}</span> ~
<span>{{ val.endTime }}</span>
间隔<b>{{ val.span }}分钟</b>
</p>
</template>
</el-table-column>
<el-table-column
prop="remark"
label="备注"
show-overflow-tooltip
></el-table-column>
<el-table-column fixed="right" label="操作">
<template slot-scope="scope">
<el-button
type="primary"
@click.native.stop="handleSet(scope.row)"
>设置</el-button
>
</template>
</el-table-column>
</el-table>
<div class="pageNation">
<el-pagination
:current-page="page"
:page-size="pageSize"
layout=" prev, pager, next, jumper,total"
@current-change="handleCurrentChange"
:total="total"
background
>
</el-pagination>
</div>
</div>
<el-dialog
class="setRoadDialog"
title="设置"
:visible.sync="isShowset"
:close-on-click-modal="false"
width="680px"
append-to-body
@close="closebtn"
>
<div class="setTimeTd">
<div class="tdSetBox">
<h3>装置信息</h3>
<el-descriptions title="" :column="3" border>
<el-descriptions-item label="电压等级">{{
deviceListData.dyname
}}</el-descriptions-item>
<el-descriptions-item label="线路名称">
{{ deviceListData.xlname }}</el-descriptions-item
>
<el-descriptions-item label="装置名称">
{{ deviceListData.zzname }}
</el-descriptions-item>
</el-descriptions>
<h3>时间表规则</h3>
<p class="timename">时间表名称{{ timeName }}</p>
<div class="flexTimeGz">
<p
class="timeGz"
v-for="(val, index) in scheduleInfo"
:key="index"
>
<span>{{ val.startTime }}</span> ~
<span>{{ val.endTime }}</span>
间隔<b>{{ val.span }}分钟</b>
</p>
</div>
<h3>选择通道</h3>
<div class="checkBox">
<el-radio-group v-model="checkList" @change="handleChange">
<el-radio
:label="val.id"
border
v-for="val in zzchannel"
:key="val.id"
>{{ val.name }}</el-radio
>
</el-radio-group>
<!-- <el-checkbox-group v-model="checkList" @change="handleChange">
<el-checkbox
:label="val.id"
border
v-for="val in zzchannel"
:key="val.id"
>{{ val.name }}</el-checkbox
>
</el-checkbox-group> -->
</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="closebtn"> </el-button>
<el-button type="primary" v-debounce="submitForm"> </el-button>
</div>
</el-dialog>
</el-tab-pane>
</el-tabs>
</el-dialog>
</template>
<script>
import {
getChannelListJoggle,
getSchedulenr,
getScheduleRulelListJoggle,
setScheduleRulel,
getScheduleRulelAccessList,
selectPhotoTimeGetJoggle,
selectPhotoTimeJoggle,
getPhotoTimeJoggle,
} from "@/utils/api/index";
export default {
props: {
title: String,
},
data() {
return {
loading: true,
isShow: true,
isShowset: false,
activeName: "1", //
accesslist: [], //
selaccess: "", //
shedulenr: [], //
deviceTableData: [], //-
page: 1, //
pageSize: 10, //
total: 0, //
listnr: [], //
defaultProps: {
children: "list",
label: "name",
},
selfacilityId: "", //id
ruleid: "", //线id
parmsList: [], //
scheduleid: 0, //id
//-
timeName: "",
scheduleInfo: [],
//
deviceListData: {}, //
zzchannel: [], //
checkList: "", //
newcmdzzid: "",
newrequestId: "",
timer: null, //
timernum: 0,
timeloading: false,
};
},
mounted() {},
methods: {
handleClick(tab, event) {
console.log(tab, event);
},
//
getSingleAccess(id, zzid) {
this.newcmdzzid = zzid;
this.selfacilityId = id;
getChannelListJoggle({ termid: id })
.then((res) => {
this.accesslist = res.data.list;
console.log(this.accesslist);
this.selaccess = res.data.list[0].channelid;
this.inquireRealbtn();
})
.catch((err) => {});
},
//
changeSelect(val) {
console.log(val);
console.log(this.selaccess);
},
//
//
inquirebtn() {
console.log(this.selaccess, this.selfacilityId, this.newcmdzzid);
this.timeloading = true;
selectPhotoTimeGetJoggle({
channel: this.selaccess,
termId: this.selfacilityId,
cmdId: this.newcmdzzid,
})
.then((res) => {
this.$message.success("查询成功");
console.log(this.shedulenr);
this.newrequestId = res.data.requestId;
this.searchRealtime();
})
.catch((err) => {
this.$message.error("查询失败");
});
},
searchRealtime() {
selectPhotoTimeJoggle({
channel: this.selaccess,
termId: this.selfacilityId,
cmdId: this.newcmdzzid,
requestId: this.newrequestId,
}).then((res) => {
console.log(res);
if (res.data.isNew == true && this.timernum < 10) {
clearInterval(this.timer);
this.timer = null;
this.inquirebtn();
this.timernum = 0;
} else if (res.data.isNew == false && this.timernum > 10) {
this.i = 0;
clearInterval(this.timer);
this.timer = null;
this.$message({
message: "时间表查询无响应,请稍后再试!",
type: "warning",
});
}
// if (res.data.isNew == true) {
// this.shedulenr = res.data.list;
// this.$message({
// message: "",
// type: "success",
// });
// clearInterval(this.timer);
// }
});
},
//线
deviceList() {
getScheduleRulelListJoggle({
pageindex: this.page,
pagesize: this.pageSize,
})
.then((res) => {
this.deviceTableData = res.data.list;
this.total = res.data.total;
console.log(this.deviceTableData);
this.loading = false;
})
.catch((err) => {});
},
//
handleCurrentChange(val) {
this.page = val;
this.deviceList();
},
//-
handleSet(val) {
this.loading = true;
this.scheduleid = val.id;
this.isShowset = true;
console.log(val);
this.scheduleInfo = val.list;
this.timeName = val.name;
getScheduleRulelAccessList({ termid: this.selfacilityId })
.then((res) => {
this.listnr = res.data.list;
console.log("1111111111111111111");
console.log(this.listnr);
this.deviceListData = {
dyname: this.listnr[0].name,
dyid: this.listnr[0].id,
xlname: this.listnr[0].list[0].name,
xlid: this.listnr[0].list[0].id,
zzname: this.listnr[0].list[0].list[0].name,
zzcmid: this.listnr[0].list[0].list[0].cmdid,
zzid: this.listnr[0].list[0].list[0].id,
};
this.zzchannel = this.listnr[0].list[0].list[0].list;
console.log(this.deviceListData);
console.log(this.zzchannel);
this.this.loading = false;
})
.catch((err) => {});
},
//
getCheckedNodes() {
this.parmsList = [];
const checkedNodes = this.$refs.tree.getCheckedNodes(false, true); //
//const checkedParam = []; //
let index = -1;
// console.log(checkedNodes);
if (checkedNodes.length !== 0) {
checkedNodes.forEach((item) => {
// list
if (item.list !== undefined) {
index++;
this.parmsList[index] = {
//name: item.name,
termid: item.id,
channelidlist: [],
};
} else {
//list id push channelidlist
this.parmsList[index].channelidlist.push(item.id);
}
//bsManufacturer 线 线id
// if (item.bsManufacturer !== undefined) {
// this.ruleid = item.id;
// console.log(this.ruleid);
// }
});
}
// console.log(this.parmsList);
//channelichilddlist
this.parmsList = this.parmsList
.filter((item) => item.channelidlist.length !== 0)
.map((item) => {
return {
termid: item.termid,
channelidlist: item.channelidlist,
};
});
// console.log(this.parmsList);
return this.parmsList;
},
//
handleChange() {
//console.log(this.listnr);
console.log(this.checkList);
// this.$refs.tree.setCheckedKeys(this.checkedAisle);
},
//
submitForm() {
//this.getCheckedNodes();
console.log(this.deviceListData);
console.log(this.checkList);
console.log(this.scheduleid);
if (this.checkList.length == 0) {
this.$message.error("请选择通道");
} else {
setScheduleRulel({
scheduleid: this.scheduleid,
list: [
{
termid: this.deviceListData.zzid,
channelidlist: [this.checkList],
},
],
})
.then((res) => {
this.isShowset = false;
console.log(res);
//this.$message.success("");
console.log(this.checkList);
// this.$store.commit("SET_CHANNELID", this.checkList); //vuex
// this.$store.commit("SET_TERMID", this.deviceListData.zzid); //vuex
this.handlexfTime(this.deviceListData.zzid, this.checkList);
this.deviceList();
})
.catch((err) => {
this.$message.error("添加失败");
});
}
},
//
handlexfTime(termid, channelid) {
console.log("下发时间表");
console.log(termid);
console.log(channelid);
console.log("下发时间表结束");
getPhotoTimeJoggle({
channel: channelid,
termId: termid,
})
.then((res) => {
console.log(res);
if (res.code == 200) {
this.$message.success("拍照时间表设置下发成功");
}
})
.catch((err) => {});
},
closebtn() {
this.isShowset = false;
clearInterval(this.timer);
this.deviceList();
},
display() {
this.isShow = true;
},
hide() {
this.isShow = false;
},
handleclose() {
clearInterval(this.timer);
console.log("关闭轮询");
},
},
};
</script>
<style lang="less">
.setTimeDialog {
.el-tabs__content {
height: 400px;
overflow: auto;
.el-tab-pane {
height: calc(100% - 16px);
}
}
.timebox {
width: 410px;
margin: auto;
}
.flexonly {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
}
.flexno {
display: flex;
margin-top: 16px;
padding: 0px 8px;
flex-direction: column;
.timehead {
display: flex;
line-height: 32px;
margin-bottom: 8px;
label {
margin-right: 6px;
width: 80px;
}
.searchBtn {
font-size: 16px;
}
}
.timeShow {
display: flex;
}
}
.flexnr {
display: flex;
align-items: center;
margin-top: 16px;
padding: 0px 8px;
}
.mt10 {
margin-bottom: 10px;
}
.mr10 {
margin-right: 10px;
}
.w8 {
width: 80px;
}
.w80 {
width: 80%;
overflow-y: auto;
height: 267px;
}
.mr20 {
margin-right: 20px;
}
.deviceTable {
padding: 16px 8px 0 8px;
height: calc(100% - 16px);
.el-table--small {
margin-bottom: 8px;
}
.rulesBox {
display: flex;
flex-direction: row;
li {
list-style: none;
margin-right: 24px;
line-height: 24px;
span {
margin-right: 4px;
}
.el-tag--small {
height: 16px;
padding: 0 8px;
line-height: 16px;
}
}
}
.timeGz {
line-height: 26px;
span {
margin: 0px 8px;
}
}
.pageNation {
justify-content: flex-start;
}
}
}
.setRoadDialog {
.el-dialog__body {
height: 400px;
overflow: auto;
.el-form {
height: 100%;
//background: #fcc;
}
.setTimeTd {
h3 {
margin: 8px 0px;
font-size: 16px;
line-height: 24px;
}
.timename {
margin: 8px 0px;
}
.flexTimeGz {
display: flex;
flex-wrap: wrap;
.timeGz {
line-height: 32px;
margin-right: 16px;
span {
margin: 0px 8px;
}
}
}
}
}
}
</style>

@ -5,13 +5,19 @@
:visible.sync="isShow"
:close-on-click-modal="false"
@close="handleclose"
width="60%"
width="1000px"
>
<el-tabs v-model="activeName" @tab-click="handleClick" v-loading="loading">
<el-tab-pane label="查询实际时间表" name="1">
<el-tab-pane label="拍照时间表" name="1">
<div class="timebox">
<div class="flexnr">
<div class="w8">通道:</div>
<el-select v-model="selaccess" placeholder="请选择" class="mr20">
<div class="w8">选择通道:</div>
<el-select
v-model="selaccess"
placeholder="请选择"
class="mr20"
@change="changeSelect"
>
<el-option
v-for="item in accesslist"
:key="item.channelid"
@ -19,18 +25,32 @@
:value="item.channelid"
></el-option>
</el-select>
<el-button type="primary" @click="inquirebtn()"></el-button>
<!-- <el-button type="primary" @click="inquireRealbtn()"
>查询实际时间表</el-button
> -->
</div>
<div class="flexno bt30">
<div class="flexno bt30" v-if="this.shedulenr.length !== 0">
<div class="timehead">
<label>时间表规则:</label>
<p>ssssssssssss</p>
</div>
<div class="timeShow">
<div class="leftTime">
<div class="w8">时间表:</div>
<div
class="w80 flexonly"
v-loading="timeloading"
v-if="this.shedulenr.length !== 0"
<div class="w80 flexonly" v-loading="timeloading">
<el-tag
class="mr10 mt10"
size="mini"
v-for="(val, index) in this.shedulenr"
:key="index"
>{{ val }}</el-tag
>
</div>
</div>
<div class="rightTime">
<div class="w8">装置时间表:</div>
<div class="w80 flexonly" v-loading="timeloading">
<el-tag
class="mr10 mt10"
size="mini"
@ -39,10 +59,16 @@
>{{ val }}</el-tag
>
</div>
<div class="w80 flexonly" v-else></div>
</div>
</div>
</div>
<div class="flexno bt30" v-else></div>
<el-button class="searchBtn" type="text" @click="inquirebtn()"
>装置时间表对比</el-button
>
</div>
</el-tab-pane>
<el-tab-pane label="设置时间表" name="2">
<el-tab-pane label="拍照时间表下发" name="2">
<div class="deviceTable">
<el-table
ref="multipleTable"
@ -56,7 +82,7 @@
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column label="时间表类型" show-overflow-tooltip>
<template>时间表类型</template>
<template>按时间段</template>
</el-table-column>
<el-table-column label="时间表规则" width="300">
<template slot-scope="scope">
@ -69,18 +95,6 @@
<span>{{ val.endTime }}</span>
间隔<b>{{ val.span }}分钟</b>
</p>
<!-- <ul
class="rulesBox"
v-for="(item, value) in scope.row.list"
:key="value"
>
<li><span>开始时间</span>{{ item.startTime }}</li>
<li><span>结束时间</span>{{ item.endTime }}</li>
<li>
<span>时间间隔:</span>
<el-tag>{{ item.span }}</el-tag>
</li>
</ul> -->
</template>
</el-table-column>
@ -118,6 +132,7 @@
:close-on-click-modal="false"
width="680px"
append-to-body
@close="closebtn"
>
<div class="setTimeTd">
<div class="tdSetBox">
@ -188,6 +203,7 @@ import {
getScheduleRulelAccessList,
selectPhotoTimeGetJoggle,
selectPhotoTimeJoggle,
getPhotoTimeJoggle,
} from "@/utils/api/index";
export default {
props: {
@ -195,7 +211,7 @@ export default {
},
data() {
return {
loading: true,
loading: false,
isShow: false,
isShowset: false,
activeName: "1", //
@ -244,12 +260,13 @@ export default {
this.accesslist = res.data.list;
console.log(this.accesslist);
this.selaccess = res.data.list[0].channelid;
this.inquirebtn();
this.inquireRealbtn();
})
.catch((err) => {});
},
//
inquirebtn() {
//changeSelect\
changeSelect() {
console.log(this.selaccess);
this.loading = true;
getSchedulenr({
channelid: this.selaccess,
@ -265,8 +282,10 @@ export default {
this.$message.error("查询失败");
});
},
//
//
inquireRealbtn() {
inquirebtn() {
console.log(this.selaccess, this.selfacilityId, this.newcmdzzid);
this.timeloading = true;
selectPhotoTimeGetJoggle({
@ -278,11 +297,7 @@ export default {
this.$message.success("查询成功");
console.log(this.shedulenr);
this.newrequestId = res.data.requestId;
// this.searchRealtime();
this.searchRealtime();
this.timer = window.setInterval(() => {
this.searchRealtime();
}, 10000);
})
.catch((err) => {
this.$message.error("查询失败");
@ -296,14 +311,28 @@ export default {
requestId: this.newrequestId,
}).then((res) => {
console.log(res);
if (res.data.isNew == true) {
this.shedulenr = res.data.list;
if (res.data.isNew == true && this.timernum < 10) {
clearInterval(this.timer);
this.timer = null;
this.inquirebtn();
this.timernum = 0;
} else if (res.data.isNew == false && this.timernum > 10) {
this.i = 0;
clearInterval(this.timer);
this.timer = null;
this.$message({
message: "装置信息已更新",
type: "success",
message: "时间表查询无响应,请稍后再试!",
type: "warning",
});
clearInterval(this.timer);
}
// if (res.data.isNew == true) {
// this.shedulenr = res.data.list;
// this.$message({
// message: "",
// type: "success",
// });
// clearInterval(this.timer);
// }
});
},
@ -405,11 +434,11 @@ export default {
//
submitForm() {
//this.getCheckedNodes();
console.log("111111111111111111111");
console.log(this.deviceListData);
console.log(this.checkList);
console.log(this.scheduleid);
console.log("22222222222222222");
if (this.checkList.length == 0) {
this.$message.error("请选择通道");
} else {
@ -424,10 +453,12 @@ export default {
})
.then((res) => {
this.isShowset = false;
this.$message.success("添加成功");
console.log(res);
//this.$message.success("");
console.log(this.checkList);
this.$store.commit("SET_CHANNELID", this.checkList); //vuex
this.$store.commit("SET_TERMID", this.deviceListData.zzid); //vuex
// this.$store.commit("SET_CHANNELID", this.checkList); //vuex
// this.$store.commit("SET_TERMID", this.deviceListData.zzid); //vuex
this.handlexfTime(this.deviceListData.zzid, this.checkList);
this.deviceList();
})
.catch((err) => {
@ -435,6 +466,24 @@ export default {
});
}
},
//
handlexfTime(termid, channelid) {
console.log("下发时间表");
console.log(termid);
console.log(channelid);
console.log("下发时间表结束");
getPhotoTimeJoggle({
channel: channelid,
termId: termid,
})
.then((res) => {
console.log(res);
if (res.code == 200) {
this.$message.success("拍照时间表设置下发成功");
}
})
.catch((err) => {});
},
closebtn() {
this.isShowset = false;
clearInterval(this.timer);
@ -462,6 +511,10 @@ export default {
height: calc(100% - 16px);
}
}
.timebox {
//width: 410px;
margin: auto;
}
.flexonly {
display: flex;
flex-wrap: wrap;
@ -469,8 +522,29 @@ export default {
}
.flexno {
display: flex;
margin-top: 24px;
margin-top: 16px;
padding: 0px 8px;
flex-direction: column;
height: 294px;
.timehead {
display: flex;
line-height: 32px;
margin-bottom: 8px;
label {
margin-right: 6px;
width: 80px;
}
}
.timeShow {
display: flex;
}
}
.searchBtn {
font-size: 14px;
text-decoration-line: underline;
display: flex;
margin-left: auto;
}
.flexnr {
display: flex;
@ -485,19 +559,18 @@ export default {
margin-right: 10px;
}
.w8 {
width: 8%;
width: 80px;
margin-bottom: 8px;
}
.w80 {
width: 90%;
width: 80%;
overflow-y: auto;
height: 300px;
height: 250px;
}
.mr20 {
margin-right: 20px;
}
.bt30 {
margin-bottom: 30px;
}
.deviceTable {
padding: 16px 8px 0 8px;
height: calc(100% - 16px);

@ -54,7 +54,7 @@
>
</el-date-picker>
</div>
<div class="monitorItemBox" v-if="channelOption.length !== 0">
<div class="monitorItemBox">
<h3>选择通道监拍点</h3>
<el-select
@ -91,10 +91,6 @@
<div class="setTimebtn">
<h3>操作项</h3>
<div class="buttonGroup">
<el-button type="primary" @click.native.stop="handleSetSchedule()"
>拍照时间表</el-button
>
<!-- <el-button
v-if="this.newTermId == this.termid"
type="primary"
@ -105,7 +101,7 @@
>手动拍照</el-button
> -->
<el-dropdown trigger="click" @command="handleCommandpic">
<el-button type="primary">
<el-button type="primary" :loading="btnpicloading">
主动拍照<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown" class="picdropStyle">
@ -118,7 +114,7 @@
</el-dropdown-menu>
</el-dropdown>
<el-dropdown trigger="click" @command="handleCommandvideo">
<el-button type="primary">
<el-button type="primary" :loading="btnvideoloading">
主动录像<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown" class="videodropStyle">
@ -140,6 +136,9 @@
<el-button type="primary" @click="handleShowInfo">
装置信息</el-button
>
<el-button type="primary" @click.native.stop="handleSetSchedule()"
>拍照时间表</el-button
>
<!-- <el-dropdown
class="dropgps"
trigger="click"
@ -178,7 +177,6 @@ import {
setTermGPSJoggle,
getLatestPhotoJoggle,
getReturnedPhotoJoggle,
getPhotoTimeJoggle,
} from "@/utils/api/index";
import { mapState } from "vuex";
import carouselChart from "../components/carouselChart.vue";
@ -196,6 +194,8 @@ export default {
},
data() {
return {
btnpicloading: false,
btnvideoloading: false,
flag: true,
onlinestatus: "", //
showBigPic: true,
@ -443,22 +443,7 @@ export default {
this.$refs.setschedule_ref.getSingleAccess(this.channelId, this.cmdid);
this.$refs.setschedule_ref.deviceList();
},
handlexfTime() {
console.log(this.newTermId);
console.log(this.channelid);
console.log(this.termid);
getPhotoTimeJoggle({
channel: this.channelid,
termId: this.termid,
})
.then((res) => {
console.log(res);
if (res.code == 200) {
this.$message.success("拍照时间表设置下发成功");
}
})
.catch((err) => {});
},
handleShowErr() {
this.$message({
message: "该功能暂未开发,敬请期待",
@ -521,6 +506,7 @@ export default {
},
//
handleCommandpic(command) {
this.btnpicloading = true;
console.log(command);
getLatestPhotoJoggle({
captureType: 0,
@ -550,6 +536,7 @@ export default {
//
handleCommandvideo(command) {
console.log(command);
this.btnvideoloading = true;
getLatestPhotoJoggle({
captureType: 1,
channel: command,
@ -621,6 +608,8 @@ export default {
this.dateValue,
this.channelList[0].termId
);
this.btnpicloading = false;
this.btnvideoloading = false;
console.log("返回最新图片");
this.i = 0;
} else if (res.data == false && this.i > 10) {
@ -631,6 +620,8 @@ export default {
message: "装置暂无响应,请稍后再试!",
type: "warning",
});
this.btnpicloading = false;
this.btnvideoloading = false;
}
console.log("2222222222222222");
});

Loading…
Cancel
Save