|
|
|
@ -165,7 +165,7 @@
|
|
|
|
|
>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
|
|
|
|
|
<el-table-column fixed="right" label="操作" width="360">
|
|
|
|
|
<el-table-column fixed="right" label="操作" width="580">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
@click.native.stop="handleRevisePhoto(scope.row)"
|
|
|
|
@ -182,16 +182,44 @@
|
|
|
|
|
@click.native.stop="handleDeviceReset(scope.row)"
|
|
|
|
|
>装置复位</el-button
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-button type="text">远程升级</el-button> -->
|
|
|
|
|
<!-- <el-button
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
@click.native.stop="handleImageCapture(scope.row)"
|
|
|
|
|
>图像参数</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
@click.native.stop="handleVideoCapture(scope.row)"
|
|
|
|
|
>视频参数</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
@click.native.stop="handleShowGPS(scope.row)"
|
|
|
|
|
>获取GPS位置</el-button
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-select
|
|
|
|
|
class="dropgps"
|
|
|
|
|
v-model="gpsvalue"
|
|
|
|
|
placeholder="请选择"
|
|
|
|
|
popper-class="gpsdropbox"
|
|
|
|
|
@change="gpsChange(scope.row)"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in gpsOptions"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select> -->
|
|
|
|
|
<el-dropdown
|
|
|
|
|
class="dropgps"
|
|
|
|
|
trigger="click"
|
|
|
|
|
@command="handleCommand"
|
|
|
|
|
@command="
|
|
|
|
|
(command) => {
|
|
|
|
|
handleCommand(command, scope.row);
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<span class="el-dropdown-link">
|
|
|
|
|
GPS开关<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
|
@ -200,18 +228,7 @@
|
|
|
|
|
<el-dropdown-item command="open">开启GPS</el-dropdown-item>
|
|
|
|
|
<el-dropdown-item command="close">关闭GPS</el-dropdown-item>
|
|
|
|
|
</el-dropdown-menu>
|
|
|
|
|
</el-dropdown> -->
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
@click.native.stop="handleImageCapture(scope.row)"
|
|
|
|
|
>图像参数</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
@click.native.stop="handleVideoCapture(scope.row)"
|
|
|
|
|
>视频参数</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-dropdown>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
class="deleteText"
|
|
|
|
@ -242,6 +259,7 @@
|
|
|
|
|
<imageCapture ref="imageCaptureref"></imageCapture>
|
|
|
|
|
<videoCapture ref="videoCaptureref"></videoCapture>
|
|
|
|
|
<pictureTags ref="picturetagsref"></pictureTags>
|
|
|
|
|
<gps-position ref="gpsdialog_ref"></gps-position>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
@ -249,7 +267,6 @@ import {
|
|
|
|
|
getTerminalJoggle,
|
|
|
|
|
deleteTerminalJoggle,
|
|
|
|
|
resetTerminalApi,
|
|
|
|
|
getTermGPSJoggle,
|
|
|
|
|
setTermGPSJoggle,
|
|
|
|
|
} from "@/utils/api/index";
|
|
|
|
|
import moment from "moment";
|
|
|
|
@ -257,12 +274,14 @@ import addPhotoDialog from "./components/addPhotoDialog.vue";
|
|
|
|
|
import imageCapture from "./components/imageCapture.vue";
|
|
|
|
|
import videoCapture from "./components/videoCapture.vue";
|
|
|
|
|
import pictureTags from "./components/pictureTags.vue";
|
|
|
|
|
import gpsPosition from "./components/gpsPosition.vue";
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
addPhotoDialog,
|
|
|
|
|
imageCapture,
|
|
|
|
|
videoCapture,
|
|
|
|
|
pictureTags,
|
|
|
|
|
gpsPosition,
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -276,6 +295,18 @@ export default {
|
|
|
|
|
pageSize: 20, // 每页数量
|
|
|
|
|
total: 0, //总条数
|
|
|
|
|
loading: true,
|
|
|
|
|
|
|
|
|
|
gpsOptions: [
|
|
|
|
|
{
|
|
|
|
|
value: "1",
|
|
|
|
|
label: "GPS关闭",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: "2",
|
|
|
|
|
label: "GPS开启",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
gpsvalue: "1",
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -360,37 +391,23 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
//获取GPS位置
|
|
|
|
|
handleShowGPS(data) {
|
|
|
|
|
this.$refs.gpsdialog_ref.display();
|
|
|
|
|
this.$refs.gpsdialog_ref.getgpsData(data);
|
|
|
|
|
console.log(data);
|
|
|
|
|
getTermGPSJoggle({ termid: data.id, cmId: data.cmdid })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.$alert(
|
|
|
|
|
"<p><label>经度:</label><span>" +
|
|
|
|
|
`${res.data.longitude}` +
|
|
|
|
|
"</span></p><p><label>纬度:</label><span>" +
|
|
|
|
|
`${res.data.latitude}` +
|
|
|
|
|
"</span></p><p><label>半径:</label><span>" +
|
|
|
|
|
`${res.data.radius}` +
|
|
|
|
|
"</span></p>",
|
|
|
|
|
"GPS位置",
|
|
|
|
|
{
|
|
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
|
|
customClass: "messageGps",
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//切换gps开启关闭
|
|
|
|
|
changeGPS(val) {
|
|
|
|
|
console.log(val);
|
|
|
|
|
setTermGPSJoggle({ gpsstatus: val, termid: this.channelId })
|
|
|
|
|
changeGPS(val, row) {
|
|
|
|
|
console.log(val, row);
|
|
|
|
|
setTermGPSJoggle({ gpsstatus: val, cmdId: row.cmdid })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
if (val == 0) {
|
|
|
|
|
this.$message("关闭GPS");
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "关闭GPS",
|
|
|
|
|
type: "success",
|
|
|
|
|
showClose: true,
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "成功开启GPS",
|
|
|
|
@ -403,16 +420,21 @@ export default {
|
|
|
|
|
console.log(err); //代码错误、请求失败捕获
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleCommand(command) {
|
|
|
|
|
handleCommand(command, row) {
|
|
|
|
|
console.log(command, row);
|
|
|
|
|
switch (command) {
|
|
|
|
|
case "open": //开启
|
|
|
|
|
this.changeGPS(1);
|
|
|
|
|
this.changeGPS(1, row);
|
|
|
|
|
break;
|
|
|
|
|
case "close": //关闭
|
|
|
|
|
this.changeGPS(0);
|
|
|
|
|
this.changeGPS(0, row);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//
|
|
|
|
|
// gpsChange(val) {
|
|
|
|
|
// console.log(val);
|
|
|
|
|
// },
|
|
|
|
|
//图像采集参数
|
|
|
|
|
handleImageCapture(data) {
|
|
|
|
|
this.$refs.imageCaptureref.display();
|
|
|
|
@ -518,6 +540,23 @@ export default {
|
|
|
|
|
margin-left: 16px;
|
|
|
|
|
margin-right: 16px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
width: 80px;
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
padding: 0px;
|
|
|
|
|
border: none;
|
|
|
|
|
color: @color-primary;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.gpsdropbox {
|
|
|
|
|
.el-select-dropdown__item {
|
|
|
|
|
line-height: 27px;
|
|
|
|
|
padding: 0 15px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
height: 27px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|