Commit ae570df8 authored by 王晓倩's avatar 王晓倩

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	gassafety-web/src/views/device/deviceInfo/index.vue
parents 565013a7 2e3171ca
......@@ -8,17 +8,17 @@
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-row>
<el-col :span="11">
<el-form-item label="所属管道" prop="pipeCode">
<el-form-item label="所属管道" prop="pipeId">
<el-select
v-model="form.pipeCode"
v-model="form.pipeId"
placeholder="请选择所属管道"
style="width: 100%"
>
<el-option
v-for="item in pipeList"
:key="item.pipeCode"
:key="item.pipeId"
:label="item.pipeName"
:value="item.pipeCode"
:value="item.pipeId"
>
</el-option>
</el-select>
......@@ -163,7 +163,7 @@ export default {
pipeList: [],
rules: {
pipeCode: [
pipeId: [
{ required: true, message: "请选择所属管道", trigger: "blur" },
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
......@@ -211,6 +211,8 @@ export default {
},
submitForm() {
this.$refs["form"].validate((valid) => {
// console.log("this.form流量计",this.form)
// return;
if (valid) {
if (this.form.deviceId != null) {
updateDeviceInfo(this.form).then((response) => {
......
......@@ -8,17 +8,17 @@
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-row>
<el-col :span="11">
<el-form-item label="所属管道" prop="pipeCode">
<el-form-item label="所属管道" prop="pipeId">
<el-select
v-model="form.pipeCode"
v-model="form.pipeId"
placeholder="请选择所属管道"
style="width: 100%"
>
<el-option
v-for="item in pipeList"
:key="item.pipeCode"
:key="item.pipeId"
:label="item.pipeName"
:value="item.pipeCode"
:value="item.pipeId"
>
</el-option>
</el-select>
......@@ -156,7 +156,7 @@ export default {
fileList: [],
// 表单校验
rules: {
pipeCode: [
pipeId: [
{ required: true, message: "请选择所属管道", trigger: "blur" },
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
......@@ -209,6 +209,8 @@ export default {
},
submitForm() {
this.$refs["form"].validate((valid) => {
// console.log("this.form)",this.form)
if (valid) {
if (this.form.deviceId != null) {
updateDeviceInfo(this.form).then((response) => {
......
......@@ -8,17 +8,17 @@
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-row>
<el-col :span="11">
<el-form-item label="所属管道" prop="pipeCode">
<el-form-item label="所属管道" prop="pipeId">
<el-select
v-model="form.pipeCode"
v-model="form.pipeId"
placeholder="请选择所属管道"
style="width: 100%"
>
<el-option
v-for="item in pipeList"
:key="item.pipeCode"
:key="item.pipeId"
:label="item.pipeName"
:value="item.pipeCode"
:value="item.pipeId"
>
</el-option>
</el-select>
......@@ -160,7 +160,7 @@ export default {
fileArr: [],
pipeList: [],
rules: {
pipeCode: [
pipeId: [
{ required: true, message: "请选择所属管道", trigger: "blur" },
// { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
......@@ -209,6 +209,7 @@ export default {
},
submitForm() {
this.$refs["form"].validate((valid) => {
// console.log("this.form",this.form)
if (valid) {
if (this.form.deviceId != null) {
updateDeviceInfo(this.form).then((response) => {
......
......@@ -132,9 +132,10 @@ export default {
deviceMore() {
console.log(this.obj.polyline.getExtData().lineData)
this.obj.polyline.getExtData().class.view.$router.push({
path: "/realtimeData/realtimedetail",
path: "/dataMonitoring/realtimedetail",
query: {
deviceId: this.obj.polyline.getExtData().lineData.pipeId,
deviceType:"0"
},
});
},
......
......@@ -23,10 +23,11 @@
<el-button size="small" @click="$emit('dialogcancelFun')">取消</el-button
>
</el-row>
<div style="width: 47vw; height: 57vh" id="container"></div>
<div style="width: 47vw; height: 65vh" id="container"></div>
<el-col :span="8" class="button">
<el-input id="ss" placeholder="输入地址" v-model="keyWorld" ></el-input><el-button size="small" type="primary" icon="el-icon-search" @click="search" style="position: fixed;margin-left: 3px;">搜索</el-button>
<el-input id="ss" placeholder="输入地址" v-model="keyWorld" ></el-input>
<el-button size="small" type="primary" icon="el-icon-search" @click="search" style="position: fixed;margin-left: 3px;">搜索</el-button>
</el-col>
</el-dialog>
......@@ -47,7 +48,10 @@
keyWorld: ""
}
},
mounted(){
watch:{
dialogTableVisible:{
handler(value) {
if(value){
let that = this;
that.$nextTick(() => {
//初始化地图
......@@ -58,10 +62,9 @@
viewMode: "3D",
showLabel: true,
pitch: 8,
zoom: 10
zoom: 12
});
map.setFitView();
var overlays = [];
//坐标回显
if (typeof that.slng == "number" && that.slng != 0) {
that.lnglat.lng = that.slng;
......@@ -71,12 +74,12 @@
});
marker.setMap(map);
map.setCenter([that.slng,that.slat]);
overlays.push(marker);
}
//点击获取坐标点
var mouseTool = new AMap.MouseTool(map);
//监听draw事件可获取画好的覆盖物
var overlays = [];
mouseTool.on('draw',function(e){
map.remove(overlays);
overlays.push(e.obj);
......@@ -92,6 +95,12 @@
});
});
})
}
},
// 代表在wacth里声明了firstName这个方法之后立即先去执行handler方法
immediate: true
}
},
methods:{
confirmFun(){
......@@ -123,7 +132,7 @@
.button{
position: relative;
top: -393px;
top: -453px;
left: 14px;
}
......
<template>
<el-dialog
title="拾取坐标"
:visible.sync="dialogTableVisible"
:show-close="false"
:close-on-click-modal="false"
>
<div style="postion:relative">
<el-row :span="8" class="button">
<el-input id="ss" placeholder="输入地址" v-model="keyWorld" ></el-input>
<el-button size="small" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
</el-row>
</div>
<div style="" id="container" ref="elD"></div>
<el-row class="lt">
<el-button type="primary" size="small" @click="confirmFun">确定</el-button>
<el-button size="small" @click="$emit('dialogcancelFun')">取消</el-button>
</el-row>
</el-dialog>
</template>
<script>
import gaodeMap from "./js/gaodeMapDialog.js";
import { getString } from "@/utils/gassafety.js";
export default {
props: {
dialogTableVisible: {
type:Boolean,
},
slat: 0,
slng: 0,
str:{
type:String,
}
},
data(){
return{
lnglat: {
lat: "",
lng: ""
},
keyWorld: "",
map:{},
div:null,
}
},
watch:{
dialogTableVisible:{
handler(value) {
if(value){
window.addEventListener("click", this.barClose);
this.$nextTick(() => {
this.map = new gaodeMap("石家庄");
this.map.addMouseTool();
if(this.str){
this.map.addPolyline([{coordinates:this.str}]);
}
this.map.lineType = 1;
if (this.map.newLineObj == null) {
this.map.createNewLine();
}
})
}else{
console.log("清除事件")
window.removeEventListener("click", this.barClose);
}
},
// 代表在wacth里声明了firstName这个方法之后立即先去执行handler方法
immediate: true
}
},
methods:{
confirmFun(){
console.log("path",this.map.newLineObj.getPath())
const pathArr = this.map.newLineObj.getPath().map(item=>{
return [
item.lng,item.lat
]
})
const str = getString(pathArr)
this.$emit('confirmFun',str);
this.$emit('dialogcancelFun');
},
search(){
this.placeSearch.search(this.keyWorld); //关键字查询查询
},
barClose() {
console.log("window");
this.deviceType = false;
// 关闭当前线条的infowindow
this.map.closeInfoWindow();
this.map.lineFlag = false;
},
},
beforeDestroy() {
},
}
</script>
<style scoped lang="scss">
.dialog{
position:relative;
}
#container{
width: 100%;
height: 500px;
}
.lt{
margin-top: 15px;
text-align: right;
}
.lt .el-input {
width: 120px;
margin-right: 15px;
display: inline-block;
}
.button{
position: absolute;
top: 90px;
left: 30px;
z-index: 999;
}
.button .el-input{
width: 180px;
margin-right: 10px;
display: inline-block;
}
</style>
This diff is collapsed.
......@@ -54,8 +54,11 @@ router.afterEach((to, from) => {
// console.log('全局后置钩子',to, from)
if (to.path == "/enterprise/mapView") {
store.dispatch("app/toggleDevice", "mobile");
store.dispatch("app/closeSideBar", { withoutAnimation: true });
} else {
store.dispatch("app/toggleDevice", "desktop");
store.dispatch("app/closeSideBar", { withoutAnimation: false });
}
NProgress.done();
});
This diff is collapsed.
......@@ -351,7 +351,8 @@ export default {
this.$router.push({
path: '/dataMonitoring/alarmdetail',
query: {
alarmId: row.alarmId
alarmId: row.alarmId,
deviceType:row.deviceType
}
}) //带参跳转
},
......
......@@ -177,7 +177,8 @@ export default {
this.$router.push({
path: '/dataMonitoring/realtimedetail',
query:{
deviceId : row.deviceId
deviceId : row.deviceId,
deviceType: row.deviceType
}
}) //带参跳转
},
......
<template>
<div class="app-container detail" style="background-color: rgb(238, 241, 245);">
<div style="padding-top: 10px;background: #fff;height: 100%;">
<div>
<div style="width: 5%;height: 45px;margin-left: 20px;" @click="$router.go(-1)">
<el-row>
<el-col :span="24" style="padding-left: 15px;">
<div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button>
<div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png"
style="width: 25px;" alt=""></div>
</div>
<div style="float: left;margin-top: 8px;margin-left: 5px;"><img src="../../../assets/logo/fanhui.png" style="width: 25px;" alt=""></div>
</div>
</el-col>
</el-row>
<div style="width: 100%;height: 350px;padding: 10px;height: 300px;">
<div style="width: 66.6%;float: left;height: 100%;">
<el-row>
<el-col :span="16" style="padding: 10px;">
<div style="height: 100%;">
<el-table :data="dataListdetail1" style="width: 100%">
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceCode" />
......@@ -39,41 +42,62 @@
<el-table-column label="设备状态" align="center" prop="deviceStatus">
</el-table-column>
</el-table>
</div>
<div id="marbox" style="width: 33%;height: 350px; border: 1px solid rgb(218, 213, 213);float: right;margin-top: -45px;">
</el-col>
<el-col :span="8" style="padding: 10px;padding-left: 0px;">
<div id="marbox" style="height: 350px; border: 1px solid rgb(218, 213, 213);margin-top: -45px;">
<div style="width: 100%;height: 100%" id="container"></div>
</div>
</div>
</el-col>
</el-row>
<div v-if="form.deviceType != '4'" style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;">
<div id="main1" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
<template v-if="$route.query.deviceType !='0'">
<el-row v-if="form.deviceType != '4'">
<el-col :span="12" style="padding: 10px;">
<div id="main1" style="height:300px;background-color: rgb(247 247 247);padding: 5px;">
<div v-if = "form.deviceReportDataList == null" class="div-null">
<p>暂无数据</p>
</div>
</div>
<div id="main2" style="float: right;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</el-col>
<el-col :span="12" style="padding: 10px;">
<div id="main2" style="height:300px;background-color: rgb(247 247 247);padding: 5px;">
<div v-if = "form.deviceReportDataList == null" class="div-null">
<p>暂无数据</p>
</div>
</div>
</div>
<div style="height: 320px;width: 100%;padding: 10px;margin-top: 10px;">
<div v-if="form.deviceType != '4'" id="main3" style="float: left;width: 49.8%;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</el-col>
</el-row>
<el-row>
<el-col :span="12" style="padding: 10px;" v-if="form.deviceType != '4'">
<div id="main3" style="height:300px;background-color: rgb(247 247 247);padding: 5px;">
<div v-if = "form.deviceReportDataList == null" class="div-null">
<p>暂无数据</p>
</div>
</div>
<div id="main4" style="float: left;width: 49.8%;margin-left: 5px;height:300px;background-color: rgb(247 247 247);padding: 5px;">
</el-col>
<el-col :span="12" style="padding: 10px;">
<div id="main4" style="margin-left: 5px;height:300px;background-color: rgb(247 247 247);padding: 5px;">
<div v-if = "form.deviceReportDataList == null" class="div-null">
<p>暂无数据</p>
</div>
</div>
</div>
</el-col>
</el-row>
<!-- <div v-if="form.deviceType != '4'" style="height: 320px;width: 100%;margin-top: 15px;padding: 10px;"> -->
<!-- </div> -->
<!-- <div style="height: 320px;width: 100%;padding: 10px;margin-top: 10px;"> -->
<!-- </div> -->
</template>
</div>
......
......@@ -342,6 +342,7 @@ export default {
created() {
// 让左边的框隐藏
this.$store.dispatch("app/toggleDevice", "mobile");
console.log("sasdasdas")
},
mounted() {
......@@ -396,7 +397,6 @@ export default {
}
});
},
getDeviceInfo(queryParams) {
this.loading = true;
return getAllDeviceInfo(queryParams).then((response) => {
......
......@@ -81,7 +81,7 @@ export default {
code: [{ required: true, trigger: "change", message: "验证码不能为空" }]
},
loading: false,
redirect: "/index"
redirect: ""
};
},
watch: {
......@@ -134,7 +134,9 @@ export default {
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
this.$store.dispatch("Login", this.loginForm).then(() => {
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
// this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
// console.log(this.redirect)
this.$router.push({ path: "/enterprise/mapView" || "/" }).catch(()=>{});
}).catch(() => {
this.loading = false;
this.getCode();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment