Commit 54e22055 authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of http://111.61.77.35:9999/gengdidi/gassafety into master

parents e1d1679a 444b3437
......@@ -74,13 +74,13 @@ public class TDeviceInfo extends BaseEntity
private String phone;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectionTime;
/** 是否删除 */
......
......@@ -57,13 +57,13 @@ public class TPipe extends BaseEntity
private String iconUrl;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectionTime;
/** 是否删除 */
......
......@@ -79,13 +79,13 @@ public class DeviceInfoVo extends BaseEntity
private String phone;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectionTime;
/** 是否删除 */
......
......@@ -63,13 +63,13 @@ public class PipeVo extends BaseEntity
private String iconUrl;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date installationTime;
/** 最后巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectionTime;
/** 是否删除 */
......
......@@ -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,11 @@ 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",
},
});
},
......
......@@ -167,7 +167,7 @@ export default {
},
checkWork() {
this.obj.polyline.getExtData().class.view.$router.push({
path: "/basicsInfo/detail",
path: "/workOrder/detail",
query: {
orderId: this.obj.polyline.getExtData().lineData.orderId,
},
......@@ -191,9 +191,10 @@ export default {
deviceMore() {
console.log(this.obj.polyline.getExtData().lineData);
this.obj.polyline.getExtData().class.view.$router.push({
path: "/deviceAlarm/alarmdetail",
path: "/dataMonitoring/alarmdetail",
query: {
alarmId: this.obj.polyline.getExtData().lineData.alarmId,
deviceType:"管道"
},
});
},
......
......@@ -91,9 +91,10 @@ export default {
moment,
deviceMore() {
this.data.class.view.$router.push({
path: "/realtimeData/realtimedetail",
path: "/dataMonitoring/realtimedetail",
query: {
deviceId: this.data.deviceId,
deviceType: this.data.deviceType,
},
});
},
......
......@@ -104,6 +104,16 @@ export default {
data: {},
map: null,
},
data() {
return {
deviceType: {
1: "调压箱",
2: "阀门井",
3: "流量计",
4: "智能燃气表",
},
};
},
computed: {
orderId() {
// 如果已经生成过工单,就不能再次生成了
......@@ -141,16 +151,17 @@ export default {
// },
deviceMore() {
this.data.view.$router.push({
path: "/deviceAlarm/alarmdetail",
path: "/dataMonitoring/alarmdetail",
query: {
alarmId: this.data.alarmId,
dcviceType: this.deviceType[this.data.deviceType],
},
});
},
// 查看工单
checkWork() {
this.data.view.$router.push({
path: "/basicsInfo/detail",
path: "/workOrder/detail",
query: {
orderId: this.data.orderId,
},
......
......@@ -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.
......@@ -32,7 +32,7 @@
<el-form-item label="设备型号:" prop="deviceModel">
<font>{{form.deviceModel}}</font>
</el-form-item>
<el-form-item label="物联网编号:" prop="iotNo" v-if="form.iotNo != null || form.iotNo != ''">
<el-form-item label="物联网编号:" prop="iotNo">
<font>{{form.iotNo}}</font>
</el-form-item>
<el-form-item label="联系人:" prop="linkman">
......@@ -70,7 +70,7 @@
</el-form>
</div>
<div id="marbox" style="width: 700px;height: 400px;float: left;margin-top: -25px; border: 1px solid rgb(218, 213, 213);">
<div id="marbox" style="width: 700px;height: 390px;float: left;margin-top: -25px; border: 1px solid rgb(218, 213, 213);">
<div style="width: 100%;height: 100%" id="container"></div>
</div>
</div>
......@@ -106,12 +106,9 @@
this.gaoMap = gaoMap;
},
methods: {
/** 获取巡检计划详情 */
getDetail (){
getDeviceInfo(this.deviceId).then(response =>{
this.form = response.data;
console.log("this.form",this.form)
this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]);
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form)
});
......
......@@ -56,7 +56,7 @@
</el-form>
</div>
<div id="marbox" style="width: 700px;height: 400px;float: left;margin-top: -25px; border: 1px solid rgb(218, 213, 213);">
<div id="marbox" style="width: 700px;height: 390px;float: left;margin-top: -25px; border: 1px solid rgb(218, 213, 213);">
<div style="width: 100%;height: 100%" id="container"></div>
</div>
</div>
......@@ -92,12 +92,9 @@
this.gaoMap = gaoMap;
},
methods: {
/** 获取巡检计划详情 */
getDetail (){
getPipe(this.pipeId).then(response =>{
this.form = response.data;
console.log("this.form",this.form)
this.gaoMap.resetMapCenter([this.form.longitude, this.form.latitude]);
this.gaoMap.addMarker(DEVICE_TYPE.WORKORDER, this.form)
});
......
......@@ -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