|
|
|
@ -52,16 +52,6 @@
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="可信度" class="gjbox">
|
|
|
|
|
<el-select v-model="formdata.prob">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in kxdOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="onSubmit">查询</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -170,7 +160,7 @@
|
|
|
|
|
<div class="alarmPic">
|
|
|
|
|
<div class="imgshow"><img :src="photoPic" /></div>
|
|
|
|
|
<div class="editorBtn">
|
|
|
|
|
<el-button type="primary">主动拍照</el-button>
|
|
|
|
|
<!-- <el-button type="primary" :loading="btnpicloading" @click="handleCommandpic">主动拍照</el-button> -->
|
|
|
|
|
<el-button type="primary">历史图片</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -180,7 +170,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getSearchInfo, getAlarmList } from "@/utils/api/index";
|
|
|
|
|
import { getSearchInfo, getAlarmList, getLatestPhotoJoggle, getReturnedPhotoJoggle } from "@/utils/api/index";
|
|
|
|
|
import moment from "moment";
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -189,19 +179,12 @@ export default {
|
|
|
|
|
xlOptions: [{ id: 0, name: "全部" }], //线路数据
|
|
|
|
|
gtOptions: [{ id: 0, name: "全部" }], //杆塔数据
|
|
|
|
|
gjOptions: [{ id: 0, name: "全部" }], //告警数据
|
|
|
|
|
kxdOptions: [
|
|
|
|
|
{ id: 80, name: "80" },
|
|
|
|
|
{ id: 60, name: "60" },
|
|
|
|
|
{ id: 40, name: "40" },
|
|
|
|
|
{ id: 20, name: "20" }
|
|
|
|
|
], //可信度数据
|
|
|
|
|
formdata: {
|
|
|
|
|
dyId: "",
|
|
|
|
|
lineId: "",
|
|
|
|
|
towerId: "",
|
|
|
|
|
warnCause: "",
|
|
|
|
|
timeVal: "",
|
|
|
|
|
prob: ""
|
|
|
|
|
},
|
|
|
|
|
photoPic: "",
|
|
|
|
|
tableData: [],
|
|
|
|
@ -210,6 +193,9 @@ export default {
|
|
|
|
|
pageSize: 20, // 每页数量
|
|
|
|
|
total: 0, //总条数
|
|
|
|
|
loading: false,
|
|
|
|
|
btnpicloading: false,
|
|
|
|
|
timer: null,
|
|
|
|
|
i:0
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -217,7 +203,6 @@ export default {
|
|
|
|
|
new Date(new Date().toLocaleDateString()).getTime(),
|
|
|
|
|
new Date().getTime(),
|
|
|
|
|
]);
|
|
|
|
|
this.$set(this.formdata, "prob", 80);
|
|
|
|
|
this.getTableList();
|
|
|
|
|
this.getSearchdy();
|
|
|
|
|
this.getSearchgj();
|
|
|
|
@ -305,6 +290,44 @@ export default {
|
|
|
|
|
this.photoPic = row.path;
|
|
|
|
|
//未读变已读
|
|
|
|
|
},
|
|
|
|
|
//手动拍照
|
|
|
|
|
handleCommandpic() {
|
|
|
|
|
this.btnpicloading = true;
|
|
|
|
|
getLatestPhotoJoggle({})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: "手动拍照请求成功!",
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
this.timer = window.setInterval(() => {
|
|
|
|
|
this.newPicApi();
|
|
|
|
|
this.i++;
|
|
|
|
|
}, 5000);
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//获取最新图片
|
|
|
|
|
newPicApi() {
|
|
|
|
|
getReturnedPhotoJoggle({}).then((res) => {
|
|
|
|
|
if (res.data == true && this.i < 10) {
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
this.timer = null;
|
|
|
|
|
this.i = 0;
|
|
|
|
|
this.btnpicloading = false;
|
|
|
|
|
console.log("返回最新图片");
|
|
|
|
|
} else if (res.data == false && this.i > 10) {
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
this.timer = null;
|
|
|
|
|
this.i = 0;
|
|
|
|
|
this.btnpicloading = false;
|
|
|
|
|
this.$message({
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: "装置暂无响应,请稍后再试!",
|
|
|
|
|
type: "warning",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
dateFormat(row, column) {
|
|
|
|
|
var date = row[column.property];
|
|
|
|
|
if (date == undefined) {
|
|
|
|
|