|
|
|
@ -14,7 +14,11 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="线路名称" class="xlbox">
|
|
|
|
|
<el-select v-model="formdata.lineId" @change="getSearchgt">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formdata.lineId"
|
|
|
|
|
@change="getSearchgt"
|
|
|
|
|
filterable
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in xlOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
@ -24,7 +28,7 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="杆塔名称">
|
|
|
|
|
<el-select v-model="formdata.towerId">
|
|
|
|
|
<el-select v-model="formdata.towerId" filterable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in gtOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
@ -115,7 +119,7 @@
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="通道名称"
|
|
|
|
|
label="通道"
|
|
|
|
|
min-width="75"
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
>
|
|
|
|
@ -161,12 +165,28 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="alarmPic">
|
|
|
|
|
<div class="imgshow" @click="handleBigPicbox(selectRow)">
|
|
|
|
|
<img ref="picJpg" :src="photoPic" />
|
|
|
|
|
<img
|
|
|
|
|
ref="picJpg"
|
|
|
|
|
:src="photoPic"
|
|
|
|
|
v-if="selectRow.path !== '' && tableData.length !== 0"
|
|
|
|
|
/>
|
|
|
|
|
<img ref="picJpg" src="../../assets/img/nopic.jpg" v-else />
|
|
|
|
|
<canvas id="myCanvas" class="myCanvas" ref="myCanvas"></canvas>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="editorBtn">
|
|
|
|
|
<el-button type="primary" :loading="btnpicloading" @click="handleCommandpic">主动拍照</el-button>
|
|
|
|
|
<el-button type="primary" @click="handleHistory">历史图片</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
:loading="btnpicloading"
|
|
|
|
|
@click="handleCommandpic"
|
|
|
|
|
:disabled="tableData.length == 0"
|
|
|
|
|
>主动拍照</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="handleHistory"
|
|
|
|
|
:disabled="tableData.length == 0"
|
|
|
|
|
>历史图片</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -192,11 +212,11 @@ import {
|
|
|
|
|
getReturnedPhotoJoggle,
|
|
|
|
|
readAlarm,
|
|
|
|
|
} from "@/utils/api/index";
|
|
|
|
|
import historyimg from './components/historyimg.vue'
|
|
|
|
|
import historyimg from "./components/historyimg.vue";
|
|
|
|
|
import moment from "moment";
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
historyimg
|
|
|
|
|
historyimg,
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -233,18 +253,19 @@ export default {
|
|
|
|
|
new Date(new Date().toLocaleDateString()).getTime(),
|
|
|
|
|
new Date().getTime(),
|
|
|
|
|
]);
|
|
|
|
|
this.getTableList();
|
|
|
|
|
// this.getTableList();
|
|
|
|
|
this.getSearchdy();
|
|
|
|
|
this.getSearchgj();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleBigPicbox(val) {
|
|
|
|
|
console.log(val);
|
|
|
|
|
this.bigPhotoPic = val.path;
|
|
|
|
|
this.showBigpic = true;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.drawline(val);
|
|
|
|
|
});
|
|
|
|
|
if (val.path !== "" && tableData.length !== 0) {
|
|
|
|
|
console.log(val);
|
|
|
|
|
this.bigPhotoPic = val.path;
|
|
|
|
|
this.showBigpic = true;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.drawline(val);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
closePic() {
|
|
|
|
|
this.showBigpic = false;
|
|
|
|
@ -277,6 +298,7 @@ export default {
|
|
|
|
|
this.gtOptions = [{ id: 0, name: "全部" }];
|
|
|
|
|
this.gtOptions = this.gtOptions.concat(res.data.list);
|
|
|
|
|
this.formdata.towerId = this.gtOptions[0].id;
|
|
|
|
|
this.getSearchgj();
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
@ -289,12 +311,17 @@ export default {
|
|
|
|
|
console.log(this.gjOptions);
|
|
|
|
|
this.formdata.label = this.gjOptions[0].label;
|
|
|
|
|
console.log(this.formdata.label);
|
|
|
|
|
this.getTableList();
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
//获取数据
|
|
|
|
|
getTableList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
// this.$set(this.formdata, "dyId", this.page);
|
|
|
|
|
// this.$set(this.formdata, "label", this.page);
|
|
|
|
|
// this.$set(this.formdata, "lineId", this.page);
|
|
|
|
|
// this.$set(this.formdata, "towerId", this.page);
|
|
|
|
|
this.$set(this.formdata, "pageindex", this.page);
|
|
|
|
|
this.$set(this.formdata, "pagesize", this.pageSize);
|
|
|
|
|
this.$set(this.formdata, "starttime", this.formdata.timeVal[0]);
|
|
|
|
@ -375,17 +402,19 @@ export default {
|
|
|
|
|
this.selectRow = row;
|
|
|
|
|
//未读变已读
|
|
|
|
|
if (row.isread == 0) {
|
|
|
|
|
readAlarm({
|
|
|
|
|
id: row.id,
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
row.isread = 1;
|
|
|
|
|
console.log(row.isread);
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
readAlarm({
|
|
|
|
|
id: row.id,
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err);
|
|
|
|
|
});
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
row.isread = 1;
|
|
|
|
|
console.log(row.isread);
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err);
|
|
|
|
|
});
|
|
|
|
|
}, 300);
|
|
|
|
|
}
|
|
|
|
|
this.drawline(row);
|
|
|
|
|
},
|
|
|
|
@ -421,10 +450,10 @@ export default {
|
|
|
|
|
this.i = 0;
|
|
|
|
|
this.btnpicloading = false;
|
|
|
|
|
this.$notify({
|
|
|
|
|
title: '通知信息',
|
|
|
|
|
message: '已返回最新图片',
|
|
|
|
|
type: 'success',
|
|
|
|
|
position: 'bottom-right'
|
|
|
|
|
title: "通知信息",
|
|
|
|
|
message: "已返回最新图片",
|
|
|
|
|
type: "success",
|
|
|
|
|
position: "bottom-right",
|
|
|
|
|
});
|
|
|
|
|
} else if (res.data == false && this.i > 10) {
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
@ -432,16 +461,16 @@ export default {
|
|
|
|
|
this.i = 0;
|
|
|
|
|
this.btnpicloading = false;
|
|
|
|
|
this.$notify({
|
|
|
|
|
title: '通知信息',
|
|
|
|
|
message: '装置暂无响应,请稍后再试!',
|
|
|
|
|
type: 'warning',
|
|
|
|
|
position: 'bottom-right'
|
|
|
|
|
title: "通知信息",
|
|
|
|
|
message: "装置暂无响应,请稍后再试!",
|
|
|
|
|
type: "warning",
|
|
|
|
|
position: "bottom-right",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//历史图片
|
|
|
|
|
handleHistory(){
|
|
|
|
|
handleHistory() {
|
|
|
|
|
this.$refs.historyimg_ref.display();
|
|
|
|
|
this.$refs.historyimg_ref.getdataform(this.selectRow);
|
|
|
|
|
},
|
|
|
|
|