Commit 59eb81b4 authored by zhangjianqian's avatar zhangjianqian

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	gassafetyprogress-web/src/layout/components/Navbar.vue
#	gassafetyprogress-web/src/utils/mapClass/config.js
parents ce3957ba f37e0db7
package com.zehong.web.controller.supervise;
import java.io.File;
import java.text.ParseException;
import java.util.List;
import com.zehong.common.config.GassafetyProgressConfig;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.SecurityUtils;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -77,8 +79,7 @@ public class TProjectInfoController extends BaseController
@PreAuthorize("@ss.hasPermi('project:info:add')")
@Log(title = "工程项目信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TProjectInfo tProjectInfo)
{
public AjaxResult add(@RequestBody TProjectInfo tProjectInfo) throws ParseException {
//查询是否已经有重复的年份数据
List<TProjectInfo> tProjectInfos = tProjectInfoService.selectSameYear(tProjectInfo.getProjectYear());
//说明有重复的年份 将重复的年份删除
......@@ -86,6 +87,10 @@ public class TProjectInfoController extends BaseController
//重复年份删除方法
tProjectInfoService.deleteisSameYear(tProjectInfo.getProjectYear());
}
SysUser user = SecurityUtils.getLoginUser().getUser();
//获取用户所属单位
String enterpriseName = user.getEnterpriseName();
tProjectInfo.setEnterpriseCode(String.valueOf(enterpriseName));
return toAjax(tProjectInfoService.insertTProjectInfo(tProjectInfo));
}
......@@ -99,7 +104,7 @@ public class TProjectInfoController extends BaseController
{
//查询修改文件之前的路径
TProjectInfo tProjectInfos = tProjectInfoService.selectNearbyAddress(tProjectInfo.getProjectId());
if (tProjectInfos.getNearbyAddress()!=null){
if (tProjectInfos!=null){
// 上传文件路径
String filePath = GassafetyProgressConfig.getUploadPath();
String[] strs = tProjectInfos.getNearbyAddress().split("upload");
......
......@@ -46,6 +46,10 @@ public class TProjectInfo extends BaseEntity
@Excel(name = "管道金额")
private BigDecimal pipeInvestment;
/**企业编码*/
@Excel(name = "企业编码")
private String enterpriseCode;
/** 附件地址 */
private String nearbyAddress;
......@@ -56,26 +60,37 @@ public class TProjectInfo extends BaseEntity
@Excel(name = "备注")
private String remarks;
public String getEnterpriseCode() {
return enterpriseCode;
}
public void setEnterpriseCode(String enterpriseCode) {
this.enterpriseCode = enterpriseCode;
}
public void setProjectId(Long projectId)
{
this.projectId = projectId;
}
public Long getProjectId()
{
return projectId;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public void setProjectYear(Date projectYear)
{
this.projectYear = projectYear;
public Long getProjectId() {
return projectId;
}
public Date getProjectYear()
{
public Date getProjectYear() {
return projectYear;
}
public void setGateStationAddress(String gateStationAddress)
{
public void setProjectYear(Date projectYear) {
this.projectYear = projectYear;
}
public void setGateStationAddress(String gateStationAddress) {
this.gateStationAddress = gateStationAddress;
}
......@@ -149,21 +164,18 @@ public class TProjectInfo extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("projectId", getProjectId())
.append("projectYear", getProjectYear())
.append("gateStationAddress", getGateStationAddress())
.append("gateStationInvestment", getGateStationInvestment())
.append("numberGateStations", getNumberGateStations())
.append("pipeLength", getPipeLength())
.append("pipeInvestment", getPipeInvestment())
.append("nearbyAddress", getNearbyAddress())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
return "TProjectInfo{" +
"projectId=" + projectId +
", projectYear=" + projectYear +
", gateStationAddress='" + gateStationAddress + '\'' +
", gateStationInvestment=" + gateStationInvestment +
", numberGateStations=" + numberGateStations +
", pipeLength=" + pipeLength +
", pipeInvestment=" + pipeInvestment +
", enterpriseCode='" + enterpriseCode + '\'' +
", nearbyAddress='" + nearbyAddress + '\'' +
", isDel='" + isDel + '\'' +
", remarks='" + remarks + '\'' +
'}';
}
}
......@@ -34,8 +34,8 @@ public class TVehicleLocationInfo extends BaseEntity
private BigDecimal latitude;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date reportTime;
/** 是否删除(0正常,1删除) */
......
......@@ -94,8 +94,8 @@ public class TWorkOrder extends BaseEntity
private String responsiblePerson;
/** 截止日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "截止日期", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "截止日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date expiryDate;
/** 是否删除(0正常,1删除) */
......
......@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="TProjectInfo" id="TProjectInfoResult">
<result property="projectId" column="project_id" />
<result property="enterpriseCode" column="enterprise_code" />
<result property="projectYear" column="project_year" />
<result property="gateStationAddress" column="gate_station_address" />
<result property="gateStationInvestment" column="gate_station_investment" />
......@@ -22,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTProjectInfoVo">
select project_id, project_year, gate_station_address, gate_station_investment, number_gate_stations, pipe_length, pipe_investment, nearby_address, create_by, create_time, update_by, update_time, is_del, remarks from t_project_info
select project_id,enterprise_code,project_year, gate_station_address, gate_station_investment, number_gate_stations, pipe_length, pipe_investment, nearby_address, create_by, create_time, update_by, update_time, is_del, remarks from t_project_info
</sql>
<select id="selectTProjectInfoList" parameterType="TProjectInfo" resultMap="TProjectInfoResult">
......@@ -51,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_project_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectYear != null">project_year,</if>
<if test="enterpriseCode != null">enterprise_code,</if>
<if test="gateStationAddress != null">gate_station_address,</if>
<if test="gateStationInvestment != null">gate_station_investment,</if>
<if test="numberGateStations != null">number_gate_stations,</if>
......@@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectYear != null">#{projectYear},</if>
<if test="enterpriseCode != null">#{enterpriseCode},</if>
<if test="gateStationAddress != null">#{gateStationAddress},</if>
<if test="gateStationInvestment != null">#{gateStationInvestment},</if>
<if test="numberGateStations != null">#{numberGateStations},</if>
......@@ -85,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_project_info
<trim prefix="SET" suffixOverrides=",">
<if test="projectYear != null">project_year = #{projectYear},</if>
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if>
<if test="gateStationAddress != null">gate_station_address = #{gateStationAddress},</if>
<if test="gateStationInvestment != null">gate_station_investment = #{gateStationInvestment},</if>
<if test="numberGateStations != null">number_gate_stations = #{numberGateStations},</if>
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1647852854992" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2263" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M662.04973405 329.56834123l108.40905238-142.19888693c4.22372932-5.63163908 4.22372932-11.26327817 1.40790978-18.30282702-2.81581955-5.63163908-8.44745863-9.8553684-15.48700748-9.85536841H218.55815604c-9.8553684 0-16.89491725 7.03954885-16.89491725 16.89491726V867.38987389c0 9.8553684 7.03954885 16.89491725 16.89491725 16.89491726s16.89491725-7.03954885 16.89491726-16.89491726V487.25423562h522.33452519c7.03954885 0 12.67118794-4.22372932 15.48700749-9.8553684s1.40790977-12.67118794-2.81581955-18.30282703l-108.40905238-129.52769896z" fill="#EA4942" p-id="2264"></path></svg>
\ No newline at end of file
......@@ -633,6 +633,40 @@
overflow-y: hidden !important;
}
}
// 后台系统右上角消息图标
.el-badge {
position: relative;
vertical-align: middle;
display: inline-block;
margin-bottom: 25px;
margin-right: 25px;
}
.el-icon-chat-dot-round {
font-family: "element-icons" !important;
speak: none;
font-style: normal;
font-weight: 900 !important;
font-variant: normal;
text-transform: none;
vertical-align: text-bottom;
vertical-align: baseline;
display: inline-block;
-webkit-font-smoothing: antialiased;
display: inline-block;
padding: 0 8px;
height: 100% !important;
font-size: 22px;
color: #5a5e66;
-moz-osx-font-smoothing: grayscale;
}
.el-badge__content.is-fixed {
top: 15px !important;
right: -5px !important;
}
.el-badge__content {
padding: 0 2px !important;
}
//去除高德logo
.amap-logo{
display: none;
......
.gass-vehiche {
.el-table {
/*.el-table {
background-color: rgba(0, 0, 0, 0) !important;
.el-table__body {
width: 100% !important;
......@@ -60,7 +60,7 @@
// margin-left: 1px;
}
}
}
}*/
// 滚动条样式
......@@ -69,7 +69,9 @@
.drawer{
::-webkit-scrollbar {
width: 10px;
background: #012a53;
//background: #012a53;
background: #f8f8f9;
position: absolute;
top: 0;
//display:none
......@@ -79,7 +81,7 @@
/*滚动条里面小方块*/
// border-radius: 10px;
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #cccccccc;
background: #cccccc;
border-radius: 8px;
}
::-webkit-scrollbar-track {
......@@ -101,7 +103,7 @@
.el-pagination {
/* .el-pagination {
button:disabled {
background-color: rgba(0, 0, 0, 0);
}
......@@ -166,5 +168,5 @@
background-color: rgba(0, 0, 0, 0);
border-color: #1890ff;
//color: #fff;
}
}*/
}
<!--
* @Author: your name
* @Date: 2022-03-22 10:31:50
* @LastEditTime: 2022-03-22 10:31:51
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/components/bigWindow/Nulll.vue
-->
<template>
</template>
<script>
export default {
}
</script>
<style>
</style>
......@@ -205,11 +205,12 @@
// 绘制图表
pieone.setOption({
title: {
text: '巡检任务完成率:'+(this.allNum.typeOne+this.allNum.typeTwo),
text: '巡检任务数(个) : '+ (this.allNum.typeOne+this.allNum.typeTwo),
left: 'center',
top :20,
textStyle:{
color: "#00ffff"
color: "#00ffff",
fontSize: "16"
}
},
grid: {
......@@ -281,11 +282,12 @@
});
pietwo.setOption({
title: {
text: '隐患整治完成率:'+(this.allNum.typeOne+this.allNum.typeTwo),
text: '隐患整治数(个) : '+ (this.allNum.typeOne+this.allNum.typeTwo),
left: 'center',
top :20,
textStyle:{
color: "#00ffff"
color: "#00ffff",
fontSize: "16"
}
},
grid: {
......
......@@ -48,37 +48,93 @@
></div>
</div>
</div>
<div class="" style="padding: 0px 10px;">
<div class="yujingleft yujing" style="width: 33%;height: 90px;float: left;">
<div class="yujingtop" style="width: 70px;height: 90px;float: left;margin-top: 15px;text-align: right;">
<img src="@/assets/mapinages/group786.png" alt="" style="width: 60px;height: 60px;" />
</div>
<div class="yujingbottom" style="float: left;color: #cddbe4;margin-left: 10px;">
<p>设备预警</p>
<span>2</span>
</div>
<div class="" style="padding: 0px 10px">
<div
class="yujingleft yujing"
style="width: 33%; height: 90px; float: left"
>
<div
class="yujingtop"
style="
width: 70px;
height: 90px;
float: left;
margin-top: 15px;
text-align: right;
"
>
<img
src="@/assets/mapinages/group786.png"
alt=""
style="width: 50px; height: 50px"
/>
</div>
<div
class="yujingbottom"
style="float: left; color: #cddbe4; margin-left: 10px"
>
<p>设备预警</p>
<span>2</span>
</div>
</div>
<div class="yujingcenter yujing" style="width: 33%;height: 90px;float: left;">
<div class="yujingtop" style="width: 70px;height: 90px;float: left;margin-top: 15px;text-align: right;">
<img src="@/assets/mapinages/group787.png" alt="" style="width: 60px;height: 60px;" />
<div
class="yujingcenter yujing"
style="width: 33%; height: 90px; float: left"
>
<div
class="yujingtop"
style="
width: 70px;
height: 90px;
float: left;
margin-top: 15px;
text-align: right;
"
>
<img
src="@/assets/mapinages/group787.png"
alt=""
style="width: 50px; height: 50px"
/>
</div>
<div class="yujingbottom" style="float: left;color: #cddbe4;margin-left: 10px;">
<div
class="yujingbottom"
style="float: left; color: #cddbe4; margin-left: 10px"
>
<p>事件情况</p>
<span>2</span>
</div>
</div>
<div class="yujingright yujing" style="width: 33%;height: 90px;float: left;">
<div class="yujingtop" style="width: 70px;height: 90px;float: left;margin-top: 15px;text-align: right;">
<img src="@/assets/mapinages/group788.png" alt="" style="width: 60px;height: 60px;" />
<div
class="yujingright yujing"
style="width: 33%; height: 90px; float: left"
>
<div
class="yujingtop"
style="
width: 70px;
height: 90px;
float: left;
margin-top: 15px;
text-align: right;
"
>
<img
src="@/assets/mapinages/group788.png"
alt=""
style="width: 50px; height: 50px"
/>
</div>
<div class="yujingbottom" style="float: left;color: #cddbe4;margin-left: 10px;">
<div
class="yujingbottom"
style="float: left; color: #cddbe4; margin-left: 10px"
>
<p>隐患数量</p>
<span>2</span>
</div>
</div>
</div>
<div class="left">
<div
class="bottom right-bottom-data-left"
......@@ -372,6 +428,10 @@ export default {
this.drawLine3();
});
},
beforeDestroy() {
console.log("清空定时器");
clearInterval(this.alarmTimer);
},
methods: {
getAlarm() {
return alarmData().then((response) => {
......@@ -581,16 +641,13 @@ export default {
});
},
drawLine3() {
// 基于准备好的dom,初始化echarts实例
let myChart31 = echarts.init(document.getElementById("huanleft"));
let myChart32 = echarts.init(document.getElementById('huanright'))
let myChart32 = echarts.init(document.getElementById("huanright"));
// 绘制图表
myChart31.setOption({
color: ["#91cc75", "#5470c6", "#fa8167" ],
color: ["#91cc75", "#5470c6", "#fa8167"],
grid: {
left: 0,
// right: 0,
......
......@@ -10,13 +10,17 @@
<div class="right-menu-item" v-if="total>0" @click="$router.push('/emergency/emergency')">
<img src="@/assets/xiaoxi.png" :hidden="xiaohidden" style="height: 40px;width: 40px;margin-top: 5px;cursor: pointer;">
</div>
<search id="header-search" class="right-menu-item" />
<!-- <search id="header-search" class="right-menu-item" /> -->
          <el-badge :value="20" :max="99" class="item">
            <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;"></i>
          </el-badge>
<screenfull id="screenfull" class="right-menu-item hover-effect" />
<el-tooltip content="布局大小" effect="dark" placement="bottom">
<!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
<size-select id="size-select" class="right-menu-item hover-effect" />
</el-tooltip>
</el-tooltip> -->
</template>
......
/*
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-03-21 08:57:08
* @LastEditTime: 2022-03-22 10:35:13
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/mapClass.js
......@@ -331,7 +331,11 @@ export class EditorMap {
const data = target.getExtData();
console.log(data);
const name =
data.nickName || data.deviceName || data.videoName || data.stationName;
data.nickName ||
data.deviceName ||
data.videoName ||
data.stationName ||
data.time;
target.setLabel({ content: name, direction: "top" });
});
device.on("mouseout", (e) => {
......@@ -678,65 +682,100 @@ export class EditorMap {
* @param {*} path 轨迹回访率丼
* @return {*}
*/
backTrack(vehicleId, path) {
backTrack(vehicleId, path, times,component) {
this.infowindowClose();
AMap.plugin("AMap.MoveAnimation", () => {
let marker = this.allDevice[9].filter(item => item.getExtData().vehicleId == vehicleId)[0];
let marker = this.allDevice[9].filter(
(item) => item.getExtData().vehicleId == vehicleId
)[0];
// 绘制轨迹
marker.polyline = new AMap.Polyline({
map: this.map,
path,
showDir: true,
strokeColor: "#28F", //线颜色
// strokeOpacity: 1, //线透明度
strokeWeight: 6, //线宽
// strokeStyle: "solid" //线样式
});
marker.passedPolyline = new AMap.Polyline({
map: this.map,
strokeColor: "#AF5", //线颜色
strokeWeight: 6, //线宽
});
marker.on("moving", (e) => {
marker.passedPolyline.setPath(e.passedPath);
// this.map.setCenter(e.target.getPosition(), true);
});
// 绘制轨迹
marker.polyline = new AMap.Polyline({
map: this.map,
path,
showDir: true,
strokeColor: "#28F", //线颜色
// strokeOpacity: 1, //线透明度
strokeWeight: 6, //线宽
// strokeStyle: "solid" //线样式
});
marker.passedPolyline = new AMap.Polyline({
map: this.map,
strokeColor: "#AF5", //线颜色
strokeWeight: 6, //线宽
});
marker.on("moving", (e) => {
marker.passedPolyline.setPath(e.passedPath);
// this.map.setCenter(e.target.getPosition(), true);
// console.log(getPosition());
});
marker.moveAlong(path , {
// 每一段的时长
duration: 8000,//可根据实际采集时间间隔设置
// JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
autoRotation: true,
});
// 每个path的点
// marker.pointArr = [];
// carTarget
});
//点击的时候,先传进来一个点
const carPathData = { ...marker.getExtData(), time: times[0] };
carPathData.iconType = 14;
this.addDevice(carPathData,component);
// marker.pointArr.push(point);
}
marker.on("moveend", (e) => {
// this.addDevice(carPathData,carBackComponent);
// 如果不是最后一个点,就创建一个新的worderpoint,如果是就不创建,并且把自身删除
let z = {
longitude: e.pos[0],
latitude: e.pos[1],
iconType: 14,
time: times[e.index],
};
// if (e.index == path.length - 1) {
// point = this.addDevice(z, null);
// } else {
this.addDevice(z,component);
// workPoint.infoWindow.open(map,e.passedPos);
// }
console.log("定点", e);
});
marker.moveAlong(path, {
// 每一段的时长
duration: 8000, //可根据实际采集时间间隔设置
// JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
autoRotation: true,
});
});
}
clearbackTrack(vehicleId) {
// let marker = this.allDevice[9].filter(
// (item) => item.getExtData().vehicleId == vehicleId
// )[0];
this.allDevice["9"]?.forEach(item=>{
this.allDevice["9"]?.forEach((item) => {
if (item) {
// 停止运动
item.stopMove();
if(item.polyline){
// 删除每个点
console.log(item.pointArr);
if (item.polyline) {
this.map.remove(item.polyline);
}
if(item.passedPolyline){
if (item.passedPolyline) {
this.map.remove(item.passedPolyline);
}
this.map.remove(item);
}
})
});
// 最后把数组清空
this.allDevice["9"]=[];
this.allDevice["9"] = [];
// 把car的路径点也清空
this.allDevice["14"]?.forEach((iten) => {
this.map.remove(iten);
});
this.allDevice["14"] = [];
this.infowindowClose();
}
}
......@@ -14,7 +14,7 @@
<el-select v-model="queryParams.workType" placeholder="请选择任务类型" clearable size="small">
<el-option label="入户安检" value="1" />
<el-option label="巡检" value="2" />
<el-option label="报警巡查" value="3" />
<!--<el-option label="报警巡查" value="3" />-->
<el-option label="其他" value="4" />
</el-select>
</el-form-item>
......@@ -64,7 +64,7 @@
<template slot-scope="scope">
<span v-if="scope.row.workType == 1">入户安检</span>
<span v-if="scope.row.workType == 2">巡检</span>
<span v-if="scope.row.workType == 3">报警巡查</span>
<!-- <span v-if="scope.row.workType == 3">报警巡查</span>-->
<span v-if="scope.row.workType == 4">其他</span>
</template>
</el-table-column>
......@@ -186,7 +186,7 @@
<el-select v-model="form.workType" placeholder="请选择任务类型" style="width: 350px" :disabled="isDetail">
<el-option label="入户安检" value="1" />
<el-option label="巡检" value="2" />
<el-option label="报警巡查" value="3" />
<!--<el-option label="报警巡查" value="3" />-->
<el-option label="其他" value="4" />
</el-select>
</el-form-item>
......@@ -284,8 +284,8 @@
<el-form-item label="截止日期" prop="expiryDate">
<el-date-picker clearable size="small"
v-model="form.expiryDate"
type="date"
value-format="yyyy-MM-dd"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择截止日期" style="width: 350px" :disabled="isDetail">
</el-date-picker>
</el-form-item>
......@@ -309,7 +309,7 @@
<el-form-item label="任务类型" prop="workType">
<span v-if="workForm.workType == '1'">入户安检</span>
<span v-if="workForm.workType == '2'">巡检</span>
<span v-if="workForm.workType == '3'">报警巡查</span>
<!--<span v-if="workForm.workType == '3'">报警巡查</span>-->
<span v-if="workForm.workType == '4'">其他</span>
</el-form-item>
</el-col>
......@@ -363,7 +363,7 @@
<el-form-item label="任务类型" prop="workType">
<span v-if="feedBookForm.workType == '1'">入户安检</span>
<span v-if="feedBookForm.workType == '2'">巡检</span>
<span v-if="feedBookForm.workType == '3'">报警巡查</span>
<!-- <span v-if="feedBookForm.workType == '3'">报警巡查</span>-->
<span v-if="feedBookForm.workType == '4'">其他</span>
</el-form-item>
</el-col>
......@@ -606,7 +606,7 @@ export default {
this.reset();
this.open = true;
this.isDetail = false;
this.title = "添加燃气任务";
this.title = "添加巡检巡查任务";
this.getEnterpriseLists();
},
/** 修改按钮操作 */
......
......@@ -139,7 +139,8 @@
z-index: 10;
top: 0;
height: 100%;
background: rgb(49 114 195 / 24%);
/* background: rgb(49 114 195 / 24%);*/
background: #FFFFFF;
transition: all 0.5s;
}
.main-show {
......@@ -163,8 +164,9 @@
padding: 0 15px;
font-size: 15px;
font-weight: bold;
background: rgb(87 114 153 / 44%);
color: white;
/*background: rgb(87 114 153 / 44%);*/
background: #f8f8f9;
color:#515a6e;
/* border-bottom: 1px solid #eee;*/
.close-btn {
display: inline-block;
......@@ -186,7 +188,7 @@
}
.switch {
position: absolute;
right: -35px;
right: -33px;
top: 250px;
i {
background: #fff;
......
......@@ -33,7 +33,7 @@
<!--<el-table-column label="车辆检测信息" align="center" prop="vehicleInspect" />-->
<el-table-column label="所属企业" align="center" prop="beyondEnterpriseId" />
<el-table-column label="责任人" align="center" prop="personLiable" />
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column label="联系电话" align="center" prop="phone" width="120"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button
......@@ -49,17 +49,24 @@
icon="el-icon-map-location"
@click="getVehicleTravel(scope.row)"
v-hasPermi="['system:info:remove']"
>车辆轨迹</el-button>
>车辆位置</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
<!-- <el-pagination
@current-change="handleCurrentChangvale"
:page-size="queryParams.pageSize"
layout="prev, pager, next, jumper"
:total="total"
:hide-on-single-page="total <= queryParams.pageSize"
:key="total + '' + queryParams.pageSize"
/>-->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</drawer>
......@@ -67,7 +74,7 @@
<!-- 查询车辆信息 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" label-width="80px">
<el-form ref="form" :model="form" label-width="100px">
<el-row>
<el-col :span="11">
<el-form-item label="车牌号" prop="carNum">
......@@ -144,10 +151,19 @@
<!--值班人员轨迹回放-->
<el-dialog
title="值班人员轨迹回放"
title="车辆轨迹回放"
:visible.sync="backOpen"
>
<el-form :model="backForm" ref="backForm" :rules="rules">
<el-form :model="backForm" ref="backForm" :rules="rules" label-width="120px">
<el-row>
<el-col :span="10">
<el-form-item label="车牌号" prop="carNum">
<!--<span>{{ backForm.carNum }}</span>-->
<el-input v-model="backForm.carNum" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="请选择时间段" prop="changeTime">
......@@ -201,6 +217,7 @@ import MapCar from "./component/MapCar";
import { EditorMap } from "@/utils/mapClass/map";
import { mapGetters, mapActions } from "vuex";
import drawer from "./component/drawer";
import NullVUe from "@/components/bigWindow/Null";
import moment from "moment";
export default {
name: "vechicle",
......@@ -279,7 +296,7 @@ export default {
"map",
{
center: path,
mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
/* mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",*/
zoom: 14.5,
},
this
......@@ -358,10 +375,10 @@ export default {
.format("YYYY-MM-DD HH:mm:ss");
this.backForm.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
} else if (e == 2) {
this.backForm.beginTime = moment().format("YYYY-MM-DD HH:mm:ss");
this.backForm.endTime = moment()
.add(1, "d")
this.backForm.beginTime = moment()
.subtract(1, "d")
.format("YYYY-MM-DD HH:mm:ss");
this.backForm.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
} else {
this.backForm.beginTime = "";
this.backForm.endTime = "";
......@@ -370,8 +387,8 @@ export default {
getCar(carNum){
this.backOpen=true;
this.backForm.carNum =carNum;
this.backForm.beginTime = moment().format("YYYY-MM-DD HH:mm:ss");
this.backForm.endTime = moment().add(2, "h").format("YYYY-MM-DD HH:mm:ss");
this.backForm.beginTime = moment().subtract(2, "h").format("YYYY-MM-DD HH:mm:ss");
this.backForm.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
},
handleCurrentChangvale(val){
this.queryParams.pageNum = val;
......@@ -415,6 +432,7 @@ export default {
}
getVehicleLocations(this.backForm).then(res =>{
let paths = [];
let times = [];
if(res.data.length == 1){
this.$message({
message: '抱歉当前车辆只能查看位置信息,无法形成轨迹!',
......@@ -427,18 +445,17 @@ export default {
});
}else{
res.data.forEach(item => {
paths.push([item.longitude,item.latitude]);
})
this.map.backTrack(this.backForm.vehicleId,paths);
this.backOpen = false;
paths.push([item.longitude,item.latitude]);
times.push(item.reportTime)
})
this.map.backTrack(this.backForm.vehicleId,paths,times,NullVUe);
this.backOpen = false;
}
})
}
});
},
sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time));
......
......@@ -16,8 +16,8 @@
</el-table-column>
<el-table-column label="状态" align="center" prop="detectorStatus">
<template slot-scope="scope">
<span v-if="scope.row.detectorStatus == 0">正常</span>
<span v-if="scope.row.detectorStatus == 1">离线</span>
<span v-if="scope.row.detectorStatus == 0" style="color: green">正常</span>
<span v-if="scope.row.detectorStatus == 1" style="color: red">离线</span>
<span v-if="scope.row.detectorStatus == 2">报警</span>
</template>
</el-table-column>
......
......@@ -9,15 +9,6 @@
placeholder="选择工程项目年度">
</el-date-picker>
</el-form-item>
<el-form-item label="门站地址" prop="gateStationAddress">
<el-input
v-model="queryParams.gateStationAddress"
placeholder="请输入门站地址"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
......@@ -75,20 +66,29 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工程项目年度" align="center" prop="projectYear" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.projectYear, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.projectYear, '{y}') }}</span>
</template>
</el-table-column>
<el-table-column label="门站地址" align="center" prop="gateStationAddress" />
<el-table-column label="门站金额" align="center" prop="gateStationInvestment" />
<el-table-column label="门站数量" align="center" prop="numberGateStations" />
<el-table-column label="管道长度" align="center" prop="pipeLength" />
<el-table-column label="管道金额" align="center" prop="pipeInvestment" />
<el-table-column label="附件" align="center" prop="nearbyAddress">
<el-table-column label="企业名称" align="center" prop="enterpriseCode" >
<span slot-scope="scope" v-if="scope.row.enterpriseCode">{{scope.row.enterpriseCode}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="门站数量(个)" align="center" prop="numberGateStations" />
<el-table-column label="门站投资额(万元)" align="center" prop="gateStationInvestment">
<span slot-scope="scope" v-if="scope.row.gateStationInvestment">{{scope.row.gateStationInvestment}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="管道长度(米)" align="center" prop="pipeLength" />
<el-table-column label="管道投资额(万元)" align="center" prop="pipeInvestment" >
<span slot-scope="scope" v-if="scope.row.pipeInvestment">{{scope.row.pipeInvestment}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="附件" align="center" prop="nearbyAddress" >
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.nearbyAddress)"
v-if="scope.row.dealPlan != ''"
v-if="scope.row.nearbyAddress"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
......@@ -126,8 +126,7 @@
<!-- 添加或修改工程项目信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-row>
<el-col :span="11">
<el-form-item label="项目年度" prop="projectYear">
......@@ -140,40 +139,54 @@
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="门站地址" prop="gateStationAddress">
<el-input v-model="form.gateStationAddress" placeholder="请输入门站地址" />
<el-col :span="11">
<el-form-item label="企业名称" prop="enterpriseCode">
<el-input :disabled="true" v-model="form.enterpriseCode" placeholder="企业名称" >
</el-input>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row>
<div class="tableTitle">
<img :src="stationImg" style="width: 24px; height: 25px;position: relative; left: -326px; top: -12px;"/>
<span class="midText">门站</span>
</div>
<el-row>
<el-col :span="11">
<el-form-item label="门站数量" prop="numberGateStations">
<el-input @change="numberGateStations()" v-model="form.numberGateStations" placeholder="请输入门站数量" />
<el-input @change="numberGateStations()" v-model="form.numberGateStations" placeholder="请输入门站数量" >
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="门站额" prop="gateStationInvestment">
<el-input :disabled="isGateStationDisabled" v-model="form.gateStationInvestment" placeholder="请输入门站额" >
<template slot="append"></template>
<el-form-item label="门站投资额" prop="gateStationInvestment">
<el-input :disabled="isGateStationDisabled" v-model="form.gateStationInvestment" placeholder="请输入门站投资额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<div class="tableTitle">
<img :src="bookImg" style="width: 24px; height: 25px; position: relative; left: -326px; top: -12px;"/>
<span class="midText">管道</span>
</div>
<el-row>
<el-col :span="11">
<el-form-item label="管道长度" prop="pipeLength">
<el-input @change="conduitGateStations()" v-model="form.pipeLength" placeholder="请输入管道长度" />
<el-input @change="conduitGateStations()" v-model="form.pipeLength" placeholder="请输入管道长度" >
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="管道额" prop="pipeInvestment">
<el-input :disabled="isPipelineAmount" v-model="form.pipeInvestment" placeholder="请输入管道额" >
<template slot="append"></template>
<el-form-item label="管道投资额" prop="pipeInvestment">
<el-input :disabled="isPipelineAmount" v-model="form.pipeInvestment" placeholder="请输入管道投资额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
......@@ -220,6 +233,8 @@ export default {
},
data() {
return {
stationImg: require('@/assets/project/station.png'),
bookImg: require('@/assets/project/theConduit.png'),
// 上传文件列表
fileList: [],
//门站金额输入框是否输入
......@@ -251,7 +266,6 @@ export default {
pageNum: 1,
pageSize: 10,
projectYear: null,
gateStationAddress: null,
gateStationInvestment: null,
numberGateStations: null,
pipeLength: null,
......@@ -325,10 +339,9 @@ export default {
this.form = {
projectId: null,
projectYear: null,
gateStationAddress: null,
gateStationInvestment: null,
numberGateStations: null,
pipeLength: null,
numberGateStations: 0,
pipeLength: 0,
pipeInvestment: null,
nearbyAddress: null,
createBy: null,
......@@ -336,7 +349,8 @@ export default {
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
remarks: null,
enterpriseCode:null
};
this.resetForm("form");
this.fileList = [];
......@@ -482,4 +496,23 @@ export default {
border-width: 1px;
border-color: rgb(48, 180, 107);
}
.tableTitle {
position: relative;
margin: 24px auto;
width: 600px;
height: 2px;
background-color: #d4d4d4;
text-align: center;
font-size: 16px;
color: rgba(101, 101, 101, 1);
}
.midText {
position: absolute;
left: 3%;
background-color: #ffffff;
padding: 0 15px;
transform: translateX(-50%) translateY(-50%);
}
</style>
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