Commit 303b4e37 authored by 耿迪迪's avatar 耿迪迪
parents d435ca23 1280bd38
...@@ -6,12 +6,18 @@ import com.zehong.common.core.domain.AjaxResult; ...@@ -6,12 +6,18 @@ import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo; import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType; import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil; import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TSupBalGasSup; import com.zehong.system.domain.TSupBalGasSup;
import com.zehong.system.service.ITSupBalGasSupService; import com.zehong.system.service.ITSupBalGasSupService;
import com.zehong.system.service.ITTroubleStandingBookService;
import com.zehong.web.controller.tool.TimeConfig;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
* 供需平衡-气量监管Controller * 供需平衡-气量监管Controller
...@@ -37,6 +43,40 @@ public class TSupBalGasSupController extends BaseController ...@@ -37,6 +43,40 @@ public class TSupBalGasSupController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 气量监管统计
*/
@GetMapping("/tSupBalGasSupStatistics")
public AjaxResult tSupBalGasSupStatistics()
{
List<Statistics> list=new ArrayList<>();
//生成近7天数据
List<String> sevenDate = TimeConfig.getSevenDate();
//查询统计日期和数量
List<Statistics> statistics = tSupBalGasSupService.tSupBalGasSupStatistics(sevenDate);
Map<String, List<Statistics>> collect = statistics.stream().collect(Collectors.groupingBy(e -> e.getDate()));
for (String s : sevenDate) {
List<Statistics> statistics1 = collect.get(s);
Statistics statisticsn=new Statistics();
if(statistics1!=null && statistics1.size()>0){
statisticsn.setCount(statistics1.get(0).getCount());
statisticsn.setCount1(statistics1.get(0).getCount1());
statisticsn.setCount2(statistics1.get(0).getCount2());
statisticsn.setCount3(statistics1.get(0).getCount3());
}else{
statisticsn.setCount(0);
statisticsn.setCount1(0);
statisticsn.setCount2(0);
statisticsn.setCount3(0);
}
statisticsn.setDate(s);
list.add(statisticsn);
}
return AjaxResult.success(list);
}
/** /**
* 导出供需平衡-气量监管列表 * 导出供需平衡-气量监管列表
*/ */
......
...@@ -12,5 +12,11 @@ public class Statistics { ...@@ -12,5 +12,11 @@ public class Statistics {
private int count; private int count;
private int count1;
private int count2;
private int count3;
private String date; private String date;
} }
...@@ -2,6 +2,8 @@ package com.zehong.system.mapper; ...@@ -2,6 +2,8 @@ package com.zehong.system.mapper;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TSupBalGasSup; import com.zehong.system.domain.TSupBalGasSup;
/** /**
...@@ -28,6 +30,8 @@ public interface TSupBalGasSupMapper ...@@ -28,6 +30,8 @@ public interface TSupBalGasSupMapper
*/ */
public List<TSupBalGasSup> selectTSupBalGasSupList(TSupBalGasSup tSupBalGasSup); public List<TSupBalGasSup> selectTSupBalGasSupList(TSupBalGasSup tSupBalGasSup);
public List<Statistics> tSupBalGasSupStatistics(List<String> sevenDate);
/** /**
* 新增供需平衡-气量监管 * 新增供需平衡-气量监管
* *
......
package com.zehong.system.service; package com.zehong.system.service;
import java.util.List; import java.util.List;
import com.zehong.system.domain.Statistics;
import com.zehong.system.domain.TSupBalGasSup; import com.zehong.system.domain.TSupBalGasSup;
/** /**
...@@ -27,6 +29,9 @@ public interface ITSupBalGasSupService ...@@ -27,6 +29,9 @@ public interface ITSupBalGasSupService
*/ */
public List<TSupBalGasSup> selectTSupBalGasSupList(TSupBalGasSup tSupBalGasSup); public List<TSupBalGasSup> selectTSupBalGasSupList(TSupBalGasSup tSupBalGasSup);
public List<Statistics> tSupBalGasSupStatistics(List<String> sevenDate);
/** /**
* 新增供需平衡-气量监管 * 新增供需平衡-气量监管
* *
......
...@@ -7,6 +7,7 @@ import java.util.Map; ...@@ -7,6 +7,7 @@ import java.util.Map;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils; import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.Statistics;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TSupBalGasSupMapper; import com.zehong.system.mapper.TSupBalGasSupMapper;
...@@ -49,6 +50,12 @@ public class TSupBalGasSupServiceImpl implements ITSupBalGasSupService ...@@ -49,6 +50,12 @@ public class TSupBalGasSupServiceImpl implements ITSupBalGasSupService
return tSupBalGasSupMapper.selectTSupBalGasSupList(tSupBalGasSup); return tSupBalGasSupMapper.selectTSupBalGasSupList(tSupBalGasSup);
} }
@Override
public List<Statistics> tSupBalGasSupStatistics(List<String> sevenDate)
{
return tSupBalGasSupMapper.tSupBalGasSupStatistics(sevenDate);
}
/** /**
* 新增供需平衡-气量监管 * 新增供需平衡-气量监管
* *
......
...@@ -58,6 +58,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -58,6 +58,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseName != null and enterpriseName != ''"> and en.enterprise_name like concat('%', #{enterpriseName}, '%')</if> <if test="enterpriseName != null and enterpriseName != ''"> and en.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
</where> </where>
</select> </select>
<!--查询统计信息-->
<select id="tSupBalGasSupStatistics" resultType="com.zehong.system.domain.Statistics">
SELECT
SUM(f_plan_quan) as 'count',
SUM(f_appr_quan) as 'count1',
SUM(f_sup_gas_vol) as 'count2',
SUM(f_storage_vol) as 'count3',
DATE_FORMAT( f_rep_date, '%Y-%m-%d' ) AS date
FROM
t_sup_bal_gas_sup
WHERE
is_del='0'
and
DATE_FORMAT( f_rep_date, '%Y-%m-%d' ) IN
<foreach collection="list" item="sevenDate" separator="," open="(" close=")">
#{sevenDate}
</foreach>
GROUP BY
DATE_FORMAT( f_rep_date, '%Y-%m-%d' )
ORDER BY
DATE_FORMAT( f_rep_date, '%Y-%m-%d' ) DESC;
</select>
<select id="selectTSupBalGasSupById" parameterType="Long" resultMap="TSupBalGasSupResult"> <select id="selectTSupBalGasSupById" parameterType="Long" resultMap="TSupBalGasSupResult">
<include refid="selectTSupBalGasSupVo"/> <include refid="selectTSupBalGasSupVo"/>
......
...@@ -24,6 +24,15 @@ export function getYHZZ(query) { ...@@ -24,6 +24,15 @@ export function getYHZZ(query) {
params: query params: query
}) })
} }
// 气量监管统计接口
export function getQLJG(query) {
return request({
url: '/supplyBalance/gas/tSupBalGasSupStatistics',
method: 'get',
params: query
})
}
// 燃气用户统计接口 // 燃气用户统计接口
export function getYHTJ(query) { export function getYHTJ(query) {
return request({ return request({
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<div class="fong-div" style="margin-left: 3px;"></div> <div class="fong-div" style="margin-left: 3px;"></div>
<div class="fong-div" style="margin-left: 3px;"></div> --> <div class="fong-div" style="margin-left: 3px;"></div> -->
<span style="letter-spacing: 1px; color: #fff; float: right"> <span style="letter-spacing: 1px; color: #fff; float: right">
隐患分析 气量监管
</span> </span>
<!-- <img src="../../assets/second1/ti-bg.png" alt=""> --> <!-- <img src="../../assets/second1/ti-bg.png" alt=""> -->
<div class="rightline3"></div> <div class="rightline3"></div>
...@@ -144,7 +144,7 @@ import { selectWorkOrderNum } from "@/api/operationMonitor/order"; ...@@ -144,7 +144,7 @@ import { selectWorkOrderNum } from "@/api/operationMonitor/order";
// require("echarts/lib/component/title"); // require("echarts/lib/component/title");
// let echarts = this.$echarts; // let echarts = this.$echarts;
import { getSGSL, getYHZZ, getYHTJ } from "@/api/bigWindow/charsData.js"; import { getQLJG,getSGSL, getYHZZ, getYHTJ } from "@/api/bigWindow/charsData.js";
export default { export default {
data() { data() {
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
async getLineChats() { async getLineChats() {
// getSGSL,getYHZZ // getSGSL,getYHZZ
await getSGSL().then((res) => { /*await getSGSL().then((res) => {
console.log("aaa", res); console.log("aaa", res);
this.datanow.date = res.data.map((item) => item.date).reverse(); this.datanow.date = res.data.map((item) => item.date).reverse();
this.datanow.shigu1 = res.data.map((item) => item.count).reverse(); this.datanow.shigu1 = res.data.map((item) => item.count).reverse();
...@@ -224,6 +224,14 @@ export default { ...@@ -224,6 +224,14 @@ export default {
await getYHZZ().then((res) => { await getYHZZ().then((res) => {
console.log("bbb", res); console.log("bbb", res);
this.datanow.shigu2 = res.data.map((item) => item.count).reverse(); this.datanow.shigu2 = res.data.map((item) => item.count).reverse();
});*/
await getQLJG().then((res) => {
console.log("CCC", res);
this.datanow.date = res.data.map((item) => item.date).reverse();
this.datanow.shigu1 = res.data.map((item) => item.count).reverse();
this.datanow.shigu2 = res.data.map((item) => item.count1).reverse();
this.datanow.shigu3 = res.data.map((item) => item.count2).reverse();
this.datanow.shigu4 = res.data.map((item) => item.count3).reverse();
}); });
this.drawLine(this.datanow); this.drawLine(this.datanow);
}, },
...@@ -484,7 +492,7 @@ export default { ...@@ -484,7 +492,7 @@ export default {
}, },
series: [ series: [
{ {
name: "事故数量", name: "计划量",
data: data.shigu1, data: data.shigu1,
type: "line", type: "line",
smooth: true, smooth: true,
...@@ -502,7 +510,7 @@ export default { ...@@ -502,7 +510,7 @@ export default {
data: data.shigu2, data: data.shigu2,
type: "line", type: "line",
smooth: true, smooth: true,
name: "隐患整治数", name: "批复量",
areaStyle: { areaStyle: {
normal: { normal: {
// 渐变填充色(线条下半部分) // 渐变填充色(线条下半部分)
...@@ -513,6 +521,36 @@ export default { ...@@ -513,6 +521,36 @@ export default {
}, },
}, },
}, },
{
data: data.shigu3,
type: "line",
smooth: true,
name: "供气量",
areaStyle: {
normal: {
// 渐变填充色(线条下半部分)
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "#d630dc" },
{ offset: 1, color: "#91cc7500" },
]),
},
},
},
{
data: data.shigu4,
type: "line",
smooth: true,
name: "储存量",
areaStyle: {
normal: {
// 渐变填充色(线条下半部分)
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: "#f38e0d" },
{ offset: 1, color: "#91cc7500" },
]),
},
},
},
// { // {
// data: data.shigu3, // data: data.shigu3,
// type: "line", // type: "line",
......
...@@ -90,6 +90,13 @@ export default { ...@@ -90,6 +90,13 @@ export default {
xiaohidden:false, xiaohidden:false,
receivedList:[], receivedList:[],
routerPath:"", routerPath:"",
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 100,
status:5,
enterpriseId:""
},
} }
}, },
computed: { computed: {
......
...@@ -175,29 +175,29 @@ export class EditorMap { ...@@ -175,29 +175,29 @@ export class EditorMap {
const detectorUserHas = this.selarr.indexOf(6) >= 0; const detectorUserHas = this.selarr.indexOf(6) >= 0;
if (detectorUserHas) { if (detectorUserHas) {
this.detectorUserlabelsLayer.show(); this.detectorUserlabelsLayer.show();
} }
} }
//商业用户 //商业用户
if (this.businessDetectorUserlabelsLayer != null) { if (this.businessDetectorUserlabelsLayer != null) {
const businessDetectorUserHas = this.selarr.indexOf(61) >= 0; const businessDetectorUserHas = this.selarr.indexOf(61) >= 0;
if (businessDetectorUserHas) { if (businessDetectorUserHas) {
this.businessDetectorUserlabelsLayer.show(); this.businessDetectorUserlabelsLayer.show();
} }
} }
// 调压箱 // 调压箱
if (this.tyxlabelsLayer != null) { if (this.tyxlabelsLayer != null) {
const tyxHas = this.selarr.indexOf(2) >= 0; const tyxHas = this.selarr.indexOf(2) >= 0;
if (tyxHas) { if (tyxHas) {
this.tyxlabelsLayer.show(); this.tyxlabelsLayer.show();
} }
} }
// 阀门井 // 阀门井
if (this.fmjlabelLayer != null) { if (this.fmjlabelLayer != null) {
const fmjHas = this.selarr.indexOf(3) >= 0; const fmjHas = this.selarr.indexOf(3) >= 0;
if (fmjHas) { if (fmjHas) {
this.fmjlabelLayer.show(); this.fmjlabelLayer.show();
} }
} }
// 场站 // 场站
...@@ -205,7 +205,7 @@ export class EditorMap { ...@@ -205,7 +205,7 @@ export class EditorMap {
const czHas = this.selarr.indexOf(4) >= 0; const czHas = this.selarr.indexOf(4) >= 0;
if (czHas) { if (czHas) {
this.czlabelLayer.show(); this.czlabelLayer.show();
} }
} }
// 监控 // 监控
...@@ -213,7 +213,7 @@ export class EditorMap { ...@@ -213,7 +213,7 @@ export class EditorMap {
const videoHas = this.selarr.indexOf(5) >= 0; const videoHas = this.selarr.indexOf(5) >= 0;
if (videoHas) { if (videoHas) {
this.videolabelLayer.show(); this.videolabelLayer.show();
} }
} }
// 餐饮单位液化气用户 // 餐饮单位液化气用户
...@@ -221,7 +221,7 @@ export class EditorMap { ...@@ -221,7 +221,7 @@ export class EditorMap {
const deviceUserHas = this.selarr.indexOf(18) >= 0; const deviceUserHas = this.selarr.indexOf(18) >= 0;
if (deviceUserHas) { if (deviceUserHas) {
this.deviceUserlableLayer.show(); this.deviceUserlableLayer.show();
} }
} }
}); });
this.map.on("movestart",()=>{ this.map.on("movestart",()=>{
...@@ -232,7 +232,7 @@ export class EditorMap { ...@@ -232,7 +232,7 @@ export class EditorMap {
const detectorUserHas = this.selarr.indexOf(6) >= 0; const detectorUserHas = this.selarr.indexOf(6) >= 0;
if (detectorUserHas) { if (detectorUserHas) {
this.detectorUserlabelsLayer.hide(); this.detectorUserlabelsLayer.hide();
} }
} }
//商业用户 //商业用户
...@@ -240,15 +240,15 @@ export class EditorMap { ...@@ -240,15 +240,15 @@ export class EditorMap {
const businessDetectorUserHas = this.selarr.indexOf(61) >= 0; const businessDetectorUserHas = this.selarr.indexOf(61) >= 0;
if (businessDetectorUserHas) { if (businessDetectorUserHas) {
this.businessDetectorUserlabelsLayer.hide(); this.businessDetectorUserlabelsLayer.hide();
} }
} }
// 调压箱 // 调压箱
if (this.tyxlabelsLayer != null) { if (this.tyxlabelsLayer != null) {
const tyxHas = this.selarr.indexOf(2) >= 0; const tyxHas = this.selarr.indexOf(2) >= 0;
if (tyxHas) { if (tyxHas) {
this.tyxlabelsLayer.hide(); this.tyxlabelsLayer.hide();
} }
} }
// 阀门井 // 阀门井
...@@ -256,31 +256,31 @@ export class EditorMap { ...@@ -256,31 +256,31 @@ export class EditorMap {
const fmjHas = this.selarr.indexOf(3) >= 0; const fmjHas = this.selarr.indexOf(3) >= 0;
if (fmjHas) { if (fmjHas) {
this.fmjlabelLayer.hide(); this.fmjlabelLayer.hide();
} }
} }
// 场站 // 场站
if (this.czlabelLayer != null) { if (this.czlabelLayer != null) {
const czHas = this.selarr.indexOf(4) >= 0; const czHas = this.selarr.indexOf(4) >= 0;
if (czHas) { if (czHas) {
this.czlabelLayer.hide(); this.czlabelLayer.hide();
} }
} }
// 监控 // 监控
if (this.videolabelLayer != null) { if (this.videolabelLayer != null) {
const videoHas = this.selarr.indexOf(5) >= 0; const videoHas = this.selarr.indexOf(5) >= 0;
if (videoHas) { if (videoHas) {
this.videolabelLayer.hide(); this.videolabelLayer.hide();
} }
} }
// 餐饮单位液化气用户 // 餐饮单位液化气用户
if (this.deviceUserlableLayer != null) { if (this.deviceUserlableLayer != null) {
const deviceUserHas = this.selarr.indexOf(18) >= 0; const deviceUserHas = this.selarr.indexOf(18) >= 0;
if (deviceUserHas) { if (deviceUserHas) {
this.deviceUserlableLayer.hide(); this.deviceUserlableLayer.hide();
} }
} }
}) })
// this.map.on('zoomchange', () => { // this.map.on('zoomchange', () => {
...@@ -581,8 +581,8 @@ export class EditorMap { ...@@ -581,8 +581,8 @@ export class EditorMap {
filterSelectPipe(id,mediumComponent,lng, lat) { filterSelectPipe(id,mediumComponent,lng, lat) {
this.pipeArr[6].forEach((pipe) => { this.pipeArr[6].forEach((pipe) => {
const deviceExtData = pipe.getExtData(); const deviceExtData = pipe.getExtData();
if (deviceExtData.pipeId === id) { if (deviceExtData.pipeId === id) {
//设置颜色 //设置颜色
const options = pipe.getOptions(); const options = pipe.getOptions();
options.strokeColor = "blue"; options.strokeColor = "blue";
// options.strokeWeight =4; // options.strokeWeight =4;
...@@ -610,10 +610,10 @@ export class EditorMap { ...@@ -610,10 +610,10 @@ export class EditorMap {
} }
/** /**
* 地图上添加 餐饮单位液化气用户 海量标注 LabelMarker 方式 * 地图上添加 餐饮单位液化气用户 海量标注 LabelMarker 方式
* @param {*} detectorUserData * @param {*} detectorUserData
* @param {*} compontent * @param {*} compontent
* @param {*} showBool * @param {*} showBool
*/ */
labelsLayerMarksDeviceUserGoMap(mapData,compontent,showBool = true){ labelsLayerMarksDeviceUserGoMap(mapData,compontent,showBool = true){
if(mapData != null) { if(mapData != null) {
...@@ -622,7 +622,7 @@ export class EditorMap { ...@@ -622,7 +622,7 @@ export class EditorMap {
zooms: [3, 20], zooms: [3, 20],
zIndex: 1000, zIndex: 1000,
collision: true, //该层内标注是否避让 collision: true, //该层内标注是否避让
allowCollision: false, //不同标注层之间是否避让 allowCollision: false, //不同标注层之间是否避让
}); });
//设置一个图标对象 //设置一个图标对象
const icon = { const icon = {
...@@ -632,34 +632,34 @@ export class EditorMap { ...@@ -632,34 +632,34 @@ export class EditorMap {
anchor: "center", //图片相对 position 的锚点,默认为 bottom-center anchor: "center", //图片相对 position 的锚点,默认为 bottom-center
}; };
var markers = []; var markers = [];
mapData.forEach(item => { mapData.forEach(item => {
let longitude = item.longitude; let longitude = item.longitude;
let latitude = item.latitude; let latitude = item.latitude;
var userId = item.userId; var userId = item.userId;
icon.userId = userId; icon.userId = userId;
var curData = { var curData = {
position: [longitude, latitude], position: [longitude, latitude],
icon: icon, icon: icon,
rank: 1, //避让优先级 rank: 1, //避让优先级
}; };
hashMap.set(JSON.stringify(userId),item); hashMap.set(JSON.stringify(userId),item);
//创建 LabelMarker //创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData); const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData); // var marker = new AMap.Marker(curData);
markers.push(labelMarker); markers.push(labelMarker);
labelMarker.on("click", (e) => { labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts); var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts); var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId); var userId = JSON.stringify(optsObj.icon.userId);
var extData = hashMap.get(userId); var extData = hashMap.get(userId);
// 如果control==0就是默认值,没有使用123功能,就显示infowindow // 如果control==0就是默认值,没有使用123功能,就显示infowindow
this.massMarksMarkerClick(extData, compontent); this.massMarksMarkerClick(extData, compontent);
}); });
}); });
this.deviceUserlableLayer.add(markers); this.deviceUserlableLayer.add(markers);
this.map.add(this.deviceUserlableLayer) this.map.add(this.deviceUserlableLayer)
if (!showBool) { if (!showBool) {
...@@ -669,10 +669,10 @@ export class EditorMap { ...@@ -669,10 +669,10 @@ export class EditorMap {
} }
/** /**
* 地图上添加监控 海量标注 LabelMarker 方式 * 地图上添加监控 海量标注 LabelMarker 方式
* @param {*} detectorUserData * @param {*} detectorUserData
* @param {*} compontent * @param {*} compontent
* @param {*} showBool * @param {*} showBool
*/ */
labelsLayerMarksVideoGoMap(mapData,compontent,showBool = true){ labelsLayerMarksVideoGoMap(mapData,compontent,showBool = true){
if(mapData != null) { if(mapData != null) {
...@@ -681,7 +681,7 @@ export class EditorMap { ...@@ -681,7 +681,7 @@ export class EditorMap {
zooms: [3, 20], zooms: [3, 20],
zIndex: 1000, zIndex: 1000,
collision: true, //该层内标注是否避让 collision: true, //该层内标注是否避让
allowCollision: false, //不同标注层之间是否避让 allowCollision: false, //不同标注层之间是否避让
}); });
//设置一个图标对象 //设置一个图标对象
const icon = { const icon = {
...@@ -691,34 +691,34 @@ export class EditorMap { ...@@ -691,34 +691,34 @@ export class EditorMap {
anchor: "center", //图片相对 position 的锚点,默认为 bottom-center anchor: "center", //图片相对 position 的锚点,默认为 bottom-center
}; };
var markers = []; var markers = [];
mapData.forEach(item => { mapData.forEach(item => {
let longitude = item.longitude; let longitude = item.longitude;
let latitude = item.latitude; let latitude = item.latitude;
var userId = item.userId; var userId = item.userId;
icon.userId = userId; icon.userId = userId;
var curData = { var curData = {
position: [longitude, latitude], position: [longitude, latitude],
icon: icon, icon: icon,
rank: 1, //避让优先级 rank: 1, //避让优先级
}; };
hashMap.set(JSON.stringify(userId),item); hashMap.set(JSON.stringify(userId),item);
//创建 LabelMarker //创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData); const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData); // var marker = new AMap.Marker(curData);
markers.push(labelMarker); markers.push(labelMarker);
labelMarker.on("click", (e) => { labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts); var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts); var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId); var userId = JSON.stringify(optsObj.icon.userId);
var extData = hashMap.get(userId); var extData = hashMap.get(userId);
// 如果control==0就是默认值,没有使用123功能,就显示infowindow // 如果control==0就是默认值,没有使用123功能,就显示infowindow
this.massMarksMarkerClick(extData, compontent); this.massMarksMarkerClick(extData, compontent);
}); });
}); });
this.videolabelLayer.add(markers); this.videolabelLayer.add(markers);
this.map.add(this.videolabelLayer) this.map.add(this.videolabelLayer)
if (!showBool) { if (!showBool) {
...@@ -728,10 +728,10 @@ export class EditorMap { ...@@ -728,10 +728,10 @@ export class EditorMap {
} }
/** /**
* 地图上添加场站 海量标注 LabelMarker 方式 * 地图上添加场站 海量标注 LabelMarker 方式
* @param {*} detectorUserData * @param {*} detectorUserData
* @param {*} compontent * @param {*} compontent
* @param {*} showBool * @param {*} showBool
*/ */
labelsLayerMarksCzGoMap(mapData,compontent,showBool = true){ labelsLayerMarksCzGoMap(mapData,compontent,showBool = true){
if(mapData != null) { if(mapData != null) {
...@@ -740,7 +740,7 @@ export class EditorMap { ...@@ -740,7 +740,7 @@ export class EditorMap {
zooms: [3, 20], zooms: [3, 20],
zIndex: 1000, zIndex: 1000,
collision: true, //该层内标注是否避让 collision: true, //该层内标注是否避让
allowCollision: false, //不同标注层之间是否避让 allowCollision: false, //不同标注层之间是否避让
}); });
//设置一个图标对象 //设置一个图标对象
const icon = { const icon = {
...@@ -750,34 +750,34 @@ export class EditorMap { ...@@ -750,34 +750,34 @@ export class EditorMap {
anchor: "center", //图片相对 position 的锚点,默认为 bottom-center anchor: "center", //图片相对 position 的锚点,默认为 bottom-center
}; };
var markers = []; var markers = [];
mapData.forEach(item => { mapData.forEach(item => {
let longitude = item.longitude; let longitude = item.longitude;
let latitude = item.latitude; let latitude = item.latitude;
var userId = item.userId; var userId = item.userId;
icon.userId = userId; icon.userId = userId;
var curData = { var curData = {
position: [longitude, latitude], position: [longitude, latitude],
icon: icon, icon: icon,
rank: 1, //避让优先级 rank: 1, //避让优先级
}; };
hashMap.set(JSON.stringify(userId),item); hashMap.set(JSON.stringify(userId),item);
//创建 LabelMarker //创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData); const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData); // var marker = new AMap.Marker(curData);
markers.push(labelMarker); markers.push(labelMarker);
labelMarker.on("click", (e) => { labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts); var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts); var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId); var userId = JSON.stringify(optsObj.icon.userId);
var extData = hashMap.get(userId); var extData = hashMap.get(userId);
// 如果control==0就是默认值,没有使用123功能,就显示infowindow // 如果control==0就是默认值,没有使用123功能,就显示infowindow
this.massMarksMarkerClick(extData, compontent); this.massMarksMarkerClick(extData, compontent);
}); });
}); });
this.czlabelLayer.add(markers); this.czlabelLayer.add(markers);
this.map.add(this.czlabelLayer) this.map.add(this.czlabelLayer)
if (!showBool) { if (!showBool) {
...@@ -787,10 +787,10 @@ export class EditorMap { ...@@ -787,10 +787,10 @@ export class EditorMap {
} }
/** /**
* 地图上添加阀门井 海量标注 LabelMarker 方式 * 地图上添加阀门井 海量标注 LabelMarker 方式
* @param {*} detectorUserData * @param {*} detectorUserData
* @param {*} compontent * @param {*} compontent
* @param {*} showBool * @param {*} showBool
*/ */
labelsLayerMarksFmjGoMap(mapData,compontent,showBool = true){ labelsLayerMarksFmjGoMap(mapData,compontent,showBool = true){
if(mapData != null) { if(mapData != null) {
...@@ -799,7 +799,7 @@ export class EditorMap { ...@@ -799,7 +799,7 @@ export class EditorMap {
zooms: [3, 20], zooms: [3, 20],
zIndex: 1000, zIndex: 1000,
collision: true, //该层内标注是否避让 collision: true, //该层内标注是否避让
allowCollision: false, //不同标注层之间是否避让 allowCollision: false, //不同标注层之间是否避让
}); });
//设置一个图标对象 //设置一个图标对象
const icon = { const icon = {
...@@ -809,34 +809,34 @@ export class EditorMap { ...@@ -809,34 +809,34 @@ export class EditorMap {
anchor: "center", //图片相对 position 的锚点,默认为 bottom-center anchor: "center", //图片相对 position 的锚点,默认为 bottom-center
}; };
var markers = []; var markers = [];
mapData.forEach(item => { mapData.forEach(item => {
let longitude = item.longitude; let longitude = item.longitude;
let latitude = item.latitude; let latitude = item.latitude;
var userId = item.userId; var userId = item.userId;
icon.userId = userId; icon.userId = userId;
var curData = { var curData = {
position: [longitude, latitude], position: [longitude, latitude],
icon: icon, icon: icon,
rank: 1, //避让优先级 rank: 1, //避让优先级
}; };
hashMap.set(JSON.stringify(userId),item); hashMap.set(JSON.stringify(userId),item);
//创建 LabelMarker //创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData); const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData); // var marker = new AMap.Marker(curData);
markers.push(labelMarker); markers.push(labelMarker);
labelMarker.on("click", (e) => { labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts); var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts); var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId); var userId = JSON.stringify(optsObj.icon.userId);
var extData = hashMap.get(userId); var extData = hashMap.get(userId);
// 如果control==0就是默认值,没有使用123功能,就显示infowindow // 如果control==0就是默认值,没有使用123功能,就显示infowindow
this.massMarksMarkerClick(extData, compontent); this.massMarksMarkerClick(extData, compontent);
}); });
}); });
this.fmjlabelLayer.add(markers); this.fmjlabelLayer.add(markers);
this.map.add(this.fmjlabelLayer) this.map.add(this.fmjlabelLayer)
if (!showBool) { if (!showBool) {
...@@ -846,10 +846,10 @@ export class EditorMap { ...@@ -846,10 +846,10 @@ export class EditorMap {
} }
/** /**
* 地图上添加调压箱 海量标注 LabelMarker 方式 * 地图上添加调压箱 海量标注 LabelMarker 方式
* @param {*} detectorUserData * @param {*} detectorUserData
* @param {*} compontent * @param {*} compontent
* @param {*} showBool * @param {*} showBool
*/ */
labelsLayerMarksTysGoMap(mapData,compontent,showBool = true){ labelsLayerMarksTysGoMap(mapData,compontent,showBool = true){
if(mapData != null) { if(mapData != null) {
const hashMap = new Map(); const hashMap = new Map();
...@@ -857,7 +857,7 @@ export class EditorMap { ...@@ -857,7 +857,7 @@ export class EditorMap {
zooms: [3, 20], zooms: [3, 20],
zIndex: 1000, zIndex: 1000,
collision: true, //该层内标注是否避让 collision: true, //该层内标注是否避让
allowCollision: false, //不同标注层之间是否避让 allowCollision: false, //不同标注层之间是否避让
}); });
//设置一个图标对象 //设置一个图标对象
const icon = { const icon = {
...@@ -867,34 +867,34 @@ export class EditorMap { ...@@ -867,34 +867,34 @@ export class EditorMap {
anchor: "center", //图片相对 position 的锚点,默认为 bottom-center anchor: "center", //图片相对 position 的锚点,默认为 bottom-center
}; };
var markers = []; var markers = [];
mapData.forEach(item => { mapData.forEach(item => {
let longitude = item.longitude; let longitude = item.longitude;
let latitude = item.latitude; let latitude = item.latitude;
var userId = item.userId; var userId = item.userId;
icon.userId = userId; icon.userId = userId;
var curData = { var curData = {
position: [longitude, latitude], position: [longitude, latitude],
icon: icon, icon: icon,
rank: 1, //避让优先级 rank: 1, //避让优先级
}; };
hashMap.set(JSON.stringify(userId),item); hashMap.set(JSON.stringify(userId),item);
//创建 LabelMarker //创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData); const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData); // var marker = new AMap.Marker(curData);
markers.push(labelMarker); markers.push(labelMarker);
labelMarker.on("click", (e) => { labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts); var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts); var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId); var userId = JSON.stringify(optsObj.icon.userId);
var extData = hashMap.get(userId); var extData = hashMap.get(userId);
// 如果control==0就是默认值,没有使用123功能,就显示infowindow // 如果control==0就是默认值,没有使用123功能,就显示infowindow
this.massMarksMarkerClick(extData, compontent); this.massMarksMarkerClick(extData, compontent);
}); });
}); });
this.tyxlabelsLayer.add(markers); this.tyxlabelsLayer.add(markers);
this.map.add(this.tyxlabelsLayer) this.map.add(this.tyxlabelsLayer)
if (!showBool) { if (!showBool) {
...@@ -902,30 +902,30 @@ export class EditorMap { ...@@ -902,30 +902,30 @@ export class EditorMap {
} }
} }
} }
/** /**
* 地图上添加用户数据 海量标注 LabelMarker 方式 * 地图上添加用户数据 海量标注 LabelMarker 方式
* @param {*} detectorUserData * @param {*} detectorUserData
* @param {*} component * @param {*} component
* @param {*} showBool * @param {*} showBool
*/ */
labelsLayerMarksDetectorUserList(mapData,compontent,showBool = true){ labelsLayerMarksDetectorUserList(mapData,compontent,showBool = true){
if(mapData !== null && mapData !== undefined) { if(mapData !== null && mapData !== undefined) {
const hashMap = new Map(); const hashMap = new Map();
for(var key in mapData){ for(var key in mapData){
var value = mapData[key]; var value = mapData[key];
var jsonValue = JSON.stringify(value); var jsonValue = JSON.stringify(value);
var jsonValueArr = JSON.parse(jsonValue); var jsonValueArr = JSON.parse(jsonValue);
//居民用户 //居民用户
if (key === "6") { if (key === "6") {
this.detectorUserlabelsLayer = new AMap.LabelsLayer({ this.detectorUserlabelsLayer = new AMap.LabelsLayer({
zooms: [3, 20], zooms: [3, 20],
zIndex: 1000, zIndex: 1000,
collision: true, //该层内标注是否避让 collision: true, //该层内标注是否避让
allowCollision: false, //不同标注层之间是否避让 allowCollision: false, //不同标注层之间是否避让
}); });
//设置一个图标对象 //设置一个图标对象
const icon = { const icon = {
...@@ -935,27 +935,27 @@ export class EditorMap { ...@@ -935,27 +935,27 @@ export class EditorMap {
anchor: "center", //图片相对 position 的锚点,默认为 bottom-center anchor: "center", //图片相对 position 的锚点,默认为 bottom-center
}; };
var markers = []; var markers = [];
if(jsonValueArr !== null && jsonValueArr !== undefined) { if(jsonValueArr !== null && jsonValueArr !== undefined) {
jsonValueArr.forEach(item => { jsonValueArr.forEach(item => {
let longitude = item.longitude; let longitude = item.longitude;
let latitude = item.latitude; let latitude = item.latitude;
var userId = item.userId; var userId = item.userId;
icon.userId = userId; icon.userId = userId;
var curData = { var curData = {
position: [longitude, latitude], position: [longitude, latitude],
icon: icon, icon: icon,
rank: 1, //避让优先级 rank: 1, //避让优先级
}; };
hashMap.set(JSON.stringify(userId),item); hashMap.set(JSON.stringify(userId),item);
//创建 LabelMarker //创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData); const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData); // var marker = new AMap.Marker(curData);
markers.push(labelMarker); markers.push(labelMarker);
labelMarker.on("click", (e) => { labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts); var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts); var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId); var userId = JSON.stringify(optsObj.icon.userId);
var extData = hashMap.get(userId); var extData = hashMap.get(userId);
...@@ -976,7 +976,7 @@ export class EditorMap { ...@@ -976,7 +976,7 @@ export class EditorMap {
zooms: [3, 20], zooms: [3, 20],
zIndex: 1000, zIndex: 1000,
collision: true, //该层内标注是否避让 collision: true, //该层内标注是否避让
allowCollision: false, //不同标注层之间是否避让 allowCollision: false, //不同标注层之间是否避让
}); });
//设置一个图标对象 //设置一个图标对象
const icon = { const icon = {
...@@ -991,22 +991,22 @@ export class EditorMap { ...@@ -991,22 +991,22 @@ export class EditorMap {
jsonValueArr.forEach(item => { jsonValueArr.forEach(item => {
let longitude = item.longitude; let longitude = item.longitude;
let latitude = item.latitude; let latitude = item.latitude;
var userId = item.userId; var userId = item.userId;
icon.userId = userId; icon.userId = userId;
var curData = { var curData = {
position: [longitude, latitude], position: [longitude, latitude],
icon: icon, icon: icon,
rank: 2, //避让优先级 rank: 2, //避让优先级
}; };
hashMap.set(JSON.stringify(userId),item); hashMap.set(JSON.stringify(userId),item);
//创建 LabelMarker //创建 LabelMarker
const labelMarker = new AMap.LabelMarker(curData); const labelMarker = new AMap.LabelMarker(curData);
// var marker = new AMap.Marker(curData); // var marker = new AMap.Marker(curData);
markers.push(labelMarker); markers.push(labelMarker);
labelMarker.on("click", (e) => { labelMarker.on("click", (e) => {
var opts = JSON.stringify(e.data.opts); var opts = JSON.stringify(e.data.opts);
var optsObj = JSON.parse(opts); var optsObj = JSON.parse(opts);
var userId = JSON.stringify(optsObj.icon.userId); var userId = JSON.stringify(optsObj.icon.userId);
var extData = hashMap.get(userId); var extData = hashMap.get(userId);
...@@ -1015,7 +1015,7 @@ export class EditorMap { ...@@ -1015,7 +1015,7 @@ export class EditorMap {
}); });
}); });
} }
this.businessDetectorUserlabelsLayer.add(markers); this.businessDetectorUserlabelsLayer.add(markers);
this.map.add(this.businessDetectorUserlabelsLayer) this.map.add(this.businessDetectorUserlabelsLayer)
if (!showBool) { if (!showBool) {
...@@ -1027,16 +1027,16 @@ export class EditorMap { ...@@ -1027,16 +1027,16 @@ export class EditorMap {
} }
/** /**
* 地图上添加用户数据 海量点标记 MassMarks 方式 * 地图上添加用户数据 海量点标记 MassMarks 方式
* @param {*} detectorUserData * @param {*} detectorUserData
* @param {*} component * @param {*} component
* @param {*} showBool * @param {*} showBool
*/ */
addMassMarksDetectorUserGoMap(mapData,compontent,showBool = true){ addMassMarksDetectorUserGoMap(mapData,compontent,showBool = true){
if(mapData !== null && mapData !== undefined) { if(mapData !== null && mapData !== undefined) {
var style; var style;
for(var key in mapData){ for(var key in mapData){
var value = mapData[key]; var value = mapData[key];
var jsonValue = JSON.stringify(value); var jsonValue = JSON.stringify(value);
var jsonValueArr = JSON.parse(jsonValue); var jsonValueArr = JSON.parse(jsonValue);
if ("6" === key) { if ("6" === key) {
style = [{ style = [{
...@@ -1053,19 +1053,19 @@ export class EditorMap { ...@@ -1053,19 +1053,19 @@ export class EditorMap {
zIndex: 3, zIndex: 3,
}] }]
} }
var mass = new AMap.MassMarks(jsonValueArr, { var mass = new AMap.MassMarks(jsonValueArr, {
opacity: 0.8, opacity: 0.8,
zIndex: 111, zIndex: 111,
cursor: 'pointer', cursor: 'pointer',
style: style style: style
}); });
//先一启动,直接显示 //先一启动,直接显示
// if (!showBool) { // if (!showBool) {
// mass.hide(); // mass.hide();
// } // }
mass.on("click", (e) => { mass.on("click", (e) => {
var data = e.data; var data = e.data;
// 如果control==0就是默认值,没有使用123功能,就显示infowindow // 如果control==0就是默认值,没有使用123功能,就显示infowindow
...@@ -1089,10 +1089,10 @@ export class EditorMap { ...@@ -1089,10 +1089,10 @@ export class EditorMap {
* @param {*} compontent marker点击弹出的infowindow的组件 * @param {*} compontent marker点击弹出的infowindow的组件
* @return {*} * @return {*}
*/ */
massMarksMarkerClick(data, compontent) { massMarksMarkerClick(data, compontent) {
// var detectorUserVO = data.tdetectorUserVO; // var detectorUserVO = data.tdetectorUserVO;
// var lng = lnglatArray[0]; // var lng = lnglatArray[0];
// var lat = lnglatArray[1]; // var lat = lnglatArray[1];
// var detectorUserVO = {"userId":159843,"iconType":null,"userStatus":null,"nickName":"曾宪成","userType":"2","detectorCountList":[{"userId":159843,"iconType":null,"userStatus":null,"nickName":"曾宪成","userType":"2","detectorCountList":null,"detectorType":"工业探测器","detectorCount":1,"onLineNum":1,"offLineNum":0,"historyAlarmNum":0,"cancelAlarmNum":0,"processingAlarmNum":0,"address":"河北省-廊坊市-三河市-泃阳镇老厨小吃","longitude":117.06009,"latitude":39.991257,"linkman":"曾宪成","phone":"13172132000","email":null}],"detectorType":"工业探测器","detectorCount":1,"onLineNum":1,"offLineNum":0,"historyAlarmNum":0,"cancelAlarmNum":0,"processingAlarmNum":0,"address":"河北省-廊坊市-三河市-泃阳镇老厨小吃","longitude":117.06009,"latitude":39.991257,"linkman":"曾宪成","phone":"13172132000","email":null} // var detectorUserVO = {"userId":159843,"iconType":null,"userStatus":null,"nickName":"曾宪成","userType":"2","detectorCountList":[{"userId":159843,"iconType":null,"userStatus":null,"nickName":"曾宪成","userType":"2","detectorCountList":null,"detectorType":"工业探测器","detectorCount":1,"onLineNum":1,"offLineNum":0,"historyAlarmNum":0,"cancelAlarmNum":0,"processingAlarmNum":0,"address":"河北省-廊坊市-三河市-泃阳镇老厨小吃","longitude":117.06009,"latitude":39.991257,"linkman":"曾宪成","phone":"13172132000","email":null}],"detectorType":"工业探测器","detectorCount":1,"onLineNum":1,"offLineNum":0,"historyAlarmNum":0,"cancelAlarmNum":0,"processingAlarmNum":0,"address":"河北省-廊坊市-三河市-泃阳镇老厨小吃","longitude":117.06009,"latitude":39.991257,"linkman":"曾宪成","phone":"13172132000","email":null}
let lng = data.longitude; let lng = data.longitude;
...@@ -1104,12 +1104,12 @@ export class EditorMap { ...@@ -1104,12 +1104,12 @@ export class EditorMap {
this, this,
data, data,
compontent compontent
); );
this.infowindow = new AMap.InfoWindow({ this.infowindow = new AMap.InfoWindow({
isCustom: true, isCustom: true,
content: this.infowindowComponent.$el, content: this.infowindowComponent.$el,
position: [lng, lat], position: [lng, lat],
anchor: "middle-left", anchor: "middle-left",
offset: [20, -10], offset: [20, -10],
}); });
...@@ -1125,7 +1125,7 @@ export class EditorMap { ...@@ -1125,7 +1125,7 @@ export class EditorMap {
const pipe = this.createPipeLine({ const pipe = this.createPipeLine({
id:id, id:id,
path: eval(path), path: eval(path),
strokeWeight: objData.strokeWeight || 4, strokeWeight: objData.strokeWeight || 2,
strokeColor: color, strokeColor: color,
extData: objData, extData: objData,
cursor: "pointer", cursor: "pointer",
...@@ -1186,11 +1186,11 @@ export class EditorMap { ...@@ -1186,11 +1186,11 @@ export class EditorMap {
if (infowindowOptions.visible){ if (infowindowOptions.visible){
var pipeData = this.infowindowComponent.deviceData; var pipeData = this.infowindowComponent.deviceData;
const target = e.target; const target = e.target;
var clickPipeId = pipeData.pipeId; var clickPipeId = pipeData.pipeId;
const { pipeId } = target.getExtData(); const { pipeId } = target.getExtData();
if (clickPipeId === pipeId) return; if (clickPipeId === pipeId) return;
} }
} }
...@@ -1261,14 +1261,14 @@ export class EditorMap { ...@@ -1261,14 +1261,14 @@ export class EditorMap {
//关闭的时候恢复颜色 //关闭的时候恢复颜色
var data = this.infowindowComponent.deviceData; var data = this.infowindowComponent.deviceData;
var pipePressure = data.pipePressure; var pipePressure = data.pipePressure;
var id = data.pipeId; var id = data.pipeId;
const color = pipeColor[pipePressure]; const color = pipeColor[pipePressure];
this.pipeArr[6].forEach((pipe) => { this.pipeArr[6].forEach((pipe) => {
const deviceExtData = pipe.getExtData(); const deviceExtData = pipe.getExtData();
if (deviceExtData.pipeId === id) { if (deviceExtData.pipeId === id) {
//设置颜色 //设置颜色
const options = pipe.getOptions(); const options = pipe.getOptions();
options.strokeColor = color; options.strokeColor = color;
// options.strokeWeight =4; // options.strokeWeight =4;
...@@ -1280,7 +1280,6 @@ export class EditorMap { ...@@ -1280,7 +1280,6 @@ export class EditorMap {
} }
// 设备以及公司过滤 // 设备以及公司过滤
allfilter(companyArr, typeArr) { allfilter(companyArr, typeArr) {
debugger
for (let pipeItem in this.pipeArr) { for (let pipeItem in this.pipeArr) {
this.pipeArr[pipeItem].forEach((pipe) => { this.pipeArr[pipeItem].forEach((pipe) => {
const data = pipe.getExtData(); const data = pipe.getExtData();
...@@ -1320,7 +1319,7 @@ export class EditorMap { ...@@ -1320,7 +1319,7 @@ export class EditorMap {
this.detectorUserlabelsLayer.hide(); this.detectorUserlabelsLayer.hide();
} }
} }
// 判断是否需要显示 商业用户 // 判断是否需要显示 商业用户
const businessDetectorUserHas = typeArr.indexOf(61) >= 0; const businessDetectorUserHas = typeArr.indexOf(61) >= 0;
...@@ -1342,7 +1341,7 @@ export class EditorMap { ...@@ -1342,7 +1341,7 @@ export class EditorMap {
} }
} }
//判断是否需要显示 阀门井 //判断是否需要显示 阀门井
const fmjHas = typeArr.indexOf(3) >= 0; const fmjHas = typeArr.indexOf(3) >= 0;
if (this.fmjlabelLayer != null) { if (this.fmjlabelLayer != null) {
...@@ -1352,7 +1351,7 @@ export class EditorMap { ...@@ -1352,7 +1351,7 @@ export class EditorMap {
this.fmjlabelLayer.hide(); this.fmjlabelLayer.hide();
} }
} }
//判断是否需要显示 场站 //判断是否需要显示 场站
const czHas = typeArr.indexOf(4) >= 0; const czHas = typeArr.indexOf(4) >= 0;
if (this.czlabelLayer != null) { if (this.czlabelLayer != null) {
...@@ -1372,7 +1371,7 @@ export class EditorMap { ...@@ -1372,7 +1371,7 @@ export class EditorMap {
this.videolabelLayer.hide(); this.videolabelLayer.hide();
} }
} }
//判断是否需要显示 餐饮单位液化气用户 //判断是否需要显示 餐饮单位液化气用户
const deviceUserHas = typeArr.indexOf(18) >= 0; const deviceUserHas = typeArr.indexOf(18) >= 0;
if (this.deviceUserlableLayer != null) { if (this.deviceUserlableLayer != null) {
......
...@@ -203,7 +203,7 @@ export default { ...@@ -203,7 +203,7 @@ export default {
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 申报状态:1 已上报,2 未上报,3 已通过,4未通过 字典 // 申报状态:1 已上报,2 未上报 字典
fRepStatusOptions: [], fRepStatusOptions: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
...@@ -232,7 +232,7 @@ export default { ...@@ -232,7 +232,7 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.getDicts("t_rep_status").then(response => { this.getDicts("t_expert_rep_status").then(response => {
this.fRepStatusOptions = response.data; this.fRepStatusOptions = response.data;
}); });
}, },
......
...@@ -138,6 +138,7 @@ ...@@ -138,6 +138,7 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
:loading="exportLoading" :loading="exportLoading"
@click="handleExport"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
...@@ -379,7 +380,12 @@ ...@@ -379,7 +380,12 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="从事专业工作年限" prop="fMajorLife"> <el-form-item label="从事专业工作年限" prop="fMajorLife">
<el-input v-model="form.fMajorLife" placeholder="请输入从事专业工作年限" /> <el-input-number
:style="{width: '320px'}"
controls-position="right"
:min="0"
v-model="form.fMajorLife"
placeholder="请输入从事专业工作年限" />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -528,7 +534,7 @@ export default { ...@@ -528,7 +534,7 @@ export default {
fThisProvinceFlagOptions: [], fThisProvinceFlagOptions: [],
// 是否有效:0 有效,1 无效字典 // 是否有效:0 有效,1 无效字典
fValidTypeOptions: [], fValidTypeOptions: [],
//1 已上报,2 未上报,3 已通过,4未通过 //1 已上报,2 未上报
repStatusOptions: [], repStatusOptions: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
...@@ -649,7 +655,7 @@ export default { ...@@ -649,7 +655,7 @@ export default {
this.getDicts("t_valid_type").then(response => { this.getDicts("t_valid_type").then(response => {
this.fValidTypeOptions = response.data; this.fValidTypeOptions = response.data;
}); });
this.getDicts("t_rep_status").then(response => { this.getDicts("t_expert_rep_status").then(response => {
this.repStatusOptions = response.data; this.repStatusOptions = response.data;
}); });
}, },
...@@ -691,6 +697,9 @@ export default { ...@@ -691,6 +697,9 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
filterNum(value){
this.form.fMajorLife = Math.abs(this.value) //去除中文输入下的负号和 this.value是字符时00开头等乱输
},
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
...@@ -838,3 +847,10 @@ export default { ...@@ -838,3 +847,10 @@ export default {
} }
}; };
</script> </script>
<style>
.el-input-number .el-input__inner{
text-align: left;
}
</style>
\ No newline at end of file
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