ds1.0
fanluyan 2 years ago
parent e05dd17101
commit 0997c6e2c7

@ -233,10 +233,38 @@
<el-table-column <el-table-column
fixed="right" fixed="right"
label="操作" label="操作"
width="520" width="340"
v-if="roleUser != 2" v-if="roleUser != 2"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-dropdown
class="dropgps"
trigger="click"
@command="
(command) => {
handleSearchCommand(command, scope.row);
}
"
>
<span class="el-dropdown-link">
数据查询<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="info">基本信息</el-dropdown-item>
<el-dropdown-item command="workStatus"
>工作状态</el-dropdown-item
>
<el-dropdown-item command="runStatus"
>运行状态</el-dropdown-item
>
<el-dropdown-item command="GPS">GPS位置</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button
@click.native.stop="handleParameterSet(scope.row)"
type="text"
>参数配置</el-button
>
<el-button <el-button
@click.native.stop="handleRevisePhoto(scope.row)" @click.native.stop="handleRevisePhoto(scope.row)"
type="text" type="text"
@ -247,7 +275,7 @@
@click.native.stop="handlepicture(scope.row)" @click.native.stop="handlepicture(scope.row)"
>图片标记</el-button >图片标记</el-button
> >
<el-button <!-- <el-button
type="text" type="text"
@click.native.stop="handleDeviceReset(scope.row)" @click.native.stop="handleDeviceReset(scope.row)"
>装置复位</el-button >装置复位</el-button
@ -266,7 +294,7 @@
type="text" type="text"
@click.native.stop="handleShowGPS(scope.row)" @click.native.stop="handleShowGPS(scope.row)"
>获取GPS位置</el-button >获取GPS位置</el-button
> > -->
<!-- <el-select <!-- <el-select
class="dropgps" class="dropgps"
v-model="gpsvalue" v-model="gpsvalue"
@ -282,7 +310,7 @@
> >
</el-option> </el-option>
</el-select> --> </el-select> -->
<el-dropdown <!-- <el-dropdown
class="dropgps" class="dropgps"
trigger="click" trigger="click"
@command=" @command="
@ -298,16 +326,16 @@
<el-dropdown-item command="open">开启GPS</el-dropdown-item> <el-dropdown-item command="open">开启GPS</el-dropdown-item>
<el-dropdown-item command="close">关闭GPS</el-dropdown-item> <el-dropdown-item command="close">关闭GPS</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown> -->
<!-- <el-button <el-button
type="text" type="text"
class="deleteText" class="deleteText"
@click.native.stop="handleDelete(scope.row)" @click.native.stop="handleDelete(scope.row)"
>删除</el-button >删除</el-button
> --> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="320" v-else> <el-table-column fixed="right" label="操作" width="180" v-else>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@click.native.stop="handleRevisePhoto(scope.row)" @click.native.stop="handleRevisePhoto(scope.row)"
@ -320,7 +348,7 @@
>图片标记</el-button >图片标记</el-button
> >
<el-button <!-- <el-button
type="text" type="text"
@click.native.stop="handleShowGPS(scope.row)" @click.native.stop="handleShowGPS(scope.row)"
>获取GPS位置</el-button >获取GPS位置</el-button
@ -342,13 +370,13 @@
<el-dropdown-item command="open">开启GPS</el-dropdown-item> <el-dropdown-item command="open">开启GPS</el-dropdown-item>
<el-dropdown-item command="close">关闭GPS</el-dropdown-item> <el-dropdown-item command="close">关闭GPS</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown> -->
<!-- <el-button <el-button
type="text" type="text"
class="deleteText" class="deleteText"
@click.native.stop="handleDelete(scope.row)" @click.native.stop="handleDelete(scope.row)"
>删除</el-button >删除</el-button
> --> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -499,6 +527,7 @@ export default {
this.getSearchdy(); this.getSearchdy();
this.page = 1; this.page = 1;
this.pageSize = 20; this.pageSize = 20;
this.terminalList(); this.terminalList();
}, },
//// ////
@ -546,105 +575,6 @@ export default {
this.$refs.addPhotoDialogref.getdataform(data); this.$refs.addPhotoDialogref.getdataform(data);
console.log(data); console.log(data);
}, },
//
handleDeviceReset(data) {
this.$confirm("此操作将复位装置, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
resetTerminalApi({ cmId: data.cmdId })
.then((res) => {
if (res.code == 200) {
this.$message({
duration: 1500,
showClose: true,
message: "装置已复位",
type: "success",
});
} else {
this.$message({
duration: 1500,
showClose: true,
message: res.msg,
type: "error",
});
}
})
.catch((err) => {});
})
.catch(() => {
// this.$message({
// duration: 1500,
// showClose: true,
// type: "info",
// message: "",
// });
});
},
//GPS
handleShowGPS(data) {
// this.$refs.gpsdialog_ref.display();
// this.$refs.gpsdialog_ref.getgpsData(data);
this.$refs.gpsdialog_ref.display(data);
this.$refs.gpsdialog_ref.getgpssql();
console.log(data);
},
//gps
changeGPS(val, row) {
console.log(val, row);
setTermGPSJoggle({ gpsstatus: val, cmdId: row.cmdId })
.then((res) => {
console.log(res);
if (val == 0) {
this.$message({
duration: 1500,
message: "关闭GPS",
type: "success",
showClose: true,
});
} else {
this.$message({
duration: 1500,
message: "成功开启GPS",
type: "success",
showClose: true,
});
}
})
.catch((err) => {
console.log(err); //
});
},
handleCommand(command, row) {
console.log(command, row);
switch (command) {
case "open": //
this.changeGPS(1, row);
break;
case "close": //
this.changeGPS(0, row);
break;
}
},
//
// gpsChange(val) {
// console.log(val);
// },
//
handleImageCapture(data) {
this.$refs.imageCaptureref.display();
this.$refs.imageCaptureref.getSingleAccess(data);
this.$refs.imageCaptureref.getRatio();
},
//
handleVideoCapture(data) {
this.$refs.videoCaptureref.display();
this.$refs.videoCaptureref.getSingleAccess(data);
this.$refs.videoCaptureref.getRatio();
},
//线 //线
handlepicture(data) { handlepicture(data) {
@ -779,7 +709,7 @@ export default {
} }
.dropgps { .dropgps {
color: @color-primary; color: @color-primary;
margin-left: 16px; // margin-left: 16px;
// margin-right: 16px; // margin-right: 16px;
cursor: pointer; cursor: pointer;
font-size: 12px; font-size: 12px;

Loading…
Cancel
Save