diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" new file mode 100644 index 0000000..56e1168 --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" Binary files differ diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" new file mode 100644 index 0000000..56e1168 --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" new file mode 100644 index 0000000..40381bf --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" Binary files differ diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" new file mode 100644 index 0000000..56e1168 --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" new file mode 100644 index 0000000..40381bf --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" Binary files differ diff --git a/src/pages/ywts/cszl/hw/Pop.vue b/src/pages/ywts/cszl/hw/Pop.vue new file mode 100644 index 0000000..a89fe10 --- /dev/null +++ b/src/pages/ywts/cszl/hw/Pop.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" new file mode 100644 index 0000000..56e1168 --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" new file mode 100644 index 0000000..40381bf --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" Binary files differ diff --git a/src/pages/ywts/cszl/hw/Pop.vue b/src/pages/ywts/cszl/hw/Pop.vue new file mode 100644 index 0000000..a89fe10 --- /dev/null +++ b/src/pages/ywts/cszl/hw/Pop.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/pages/ywts/cszl/hw/data.js b/src/pages/ywts/cszl/hw/data.js new file mode 100644 index 0000000..93c4970 --- /dev/null +++ b/src/pages/ywts/cszl/hw/data.js @@ -0,0 +1,106 @@ +const iconLJT= require('@/assets/images/layerControl/垃圾桶.png') +const iconGC= require('@/assets/images/layerControl/垃圾桶.png') +const iconZZZ= require('@/assets/images/layerControl/中转站.png') +const iconCLZ= require('@/assets/images/layerControl/垃圾处理站.png') +export const iconPerson = require('@/assets/images/icon/应急/人员/专家.png') +export const iconCar = require('@/assets/images/icon/环卫/车辆.png') +export const iconDict = { + 垃圾桶: iconLJT, + 公厕: iconGC, + 中转站: iconZZZ, + 处理站: iconCLZ, +} + +export const iconFilter = (name) => { + return iconDict[name] +} + +export const personList = [ + { + id: '1', + lon: '114.837249', + lat: '25.746674', + name: '李三春', + location: '江西省赣州市章贡区赣南大道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.83749', '25.74674'], + ['114.837249', '25.74674'], + ['114.83729', '25.74664'] + ] + }, + { + id: '2', + lon: '114.851628', + lat: '25.732745', + name: '石禾', + location: '江西省赣州市章贡区潭口镇938乡道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.851623', '25.795933'], + ['114.8512', '25.795923'], + ['114.85833', '25.79533'] + ] + }, + { + id: '3', + lon: '114.858093', + lat: '25.795923', + name: '罗垇', + location: '江西省赣州市南康区滨江南大道靠近潭东镇解胜村梁明清卫生所', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.858093', '25.795923'], + ['114.858013', '25.795923'], + ['114.858033', '25.795933'] + ] + }, +] +export const carList = [ + { + id: '1', + lon: '114.915698', + lat: '25.784352', + name: '', + location: '江西省赣州市章贡区黄金岭街道仓背岭路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.915198', '25.78432'], + ['114.91568', '25.7843512'], + ['114.91598', '25.7841352'] + ] + }, + { + id: '2', + lon: '114.907709', + lat: '25.780931', + name: '', + location: '江西省赣州市章贡区黄金岭街道玫瑰路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.90709', '25.7801931'], + ['114.9027709', '25.78091'], + ['114.9077109', '25.7820931'] + ] + }, +] diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" new file mode 100644 index 0000000..56e1168 --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" new file mode 100644 index 0000000..40381bf --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" Binary files differ diff --git a/src/pages/ywts/cszl/hw/Pop.vue b/src/pages/ywts/cszl/hw/Pop.vue new file mode 100644 index 0000000..a89fe10 --- /dev/null +++ b/src/pages/ywts/cszl/hw/Pop.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/pages/ywts/cszl/hw/data.js b/src/pages/ywts/cszl/hw/data.js new file mode 100644 index 0000000..93c4970 --- /dev/null +++ b/src/pages/ywts/cszl/hw/data.js @@ -0,0 +1,106 @@ +const iconLJT= require('@/assets/images/layerControl/垃圾桶.png') +const iconGC= require('@/assets/images/layerControl/垃圾桶.png') +const iconZZZ= require('@/assets/images/layerControl/中转站.png') +const iconCLZ= require('@/assets/images/layerControl/垃圾处理站.png') +export const iconPerson = require('@/assets/images/icon/应急/人员/专家.png') +export const iconCar = require('@/assets/images/icon/环卫/车辆.png') +export const iconDict = { + 垃圾桶: iconLJT, + 公厕: iconGC, + 中转站: iconZZZ, + 处理站: iconCLZ, +} + +export const iconFilter = (name) => { + return iconDict[name] +} + +export const personList = [ + { + id: '1', + lon: '114.837249', + lat: '25.746674', + name: '李三春', + location: '江西省赣州市章贡区赣南大道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.83749', '25.74674'], + ['114.837249', '25.74674'], + ['114.83729', '25.74664'] + ] + }, + { + id: '2', + lon: '114.851628', + lat: '25.732745', + name: '石禾', + location: '江西省赣州市章贡区潭口镇938乡道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.851623', '25.795933'], + ['114.8512', '25.795923'], + ['114.85833', '25.79533'] + ] + }, + { + id: '3', + lon: '114.858093', + lat: '25.795923', + name: '罗垇', + location: '江西省赣州市南康区滨江南大道靠近潭东镇解胜村梁明清卫生所', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.858093', '25.795923'], + ['114.858013', '25.795923'], + ['114.858033', '25.795933'] + ] + }, +] +export const carList = [ + { + id: '1', + lon: '114.915698', + lat: '25.784352', + name: '', + location: '江西省赣州市章贡区黄金岭街道仓背岭路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.915198', '25.78432'], + ['114.91568', '25.7843512'], + ['114.91598', '25.7841352'] + ] + }, + { + id: '2', + lon: '114.907709', + lat: '25.780931', + name: '', + location: '江西省赣州市章贡区黄金岭街道玫瑰路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.90709', '25.7801931'], + ['114.9027709', '25.78091'], + ['114.9077109', '25.7820931'] + ] + }, +] diff --git a/src/pages/ywts/cszl/hw/index.vue b/src/pages/ywts/cszl/hw/index.vue index 989a75c..e773b7d 100644 --- a/src/pages/ywts/cszl/hw/index.vue +++ b/src/pages/ywts/cszl/hw/index.vue @@ -1,13 +1,22 @@ @@ -15,21 +24,16 @@ import CommonBtn from "@/components/CommonBtn"; import LayerManagerMix from "@/components/LayerManagerMix"; import TimeManager from "@/components/TimeManager"; +import Pop from './Pop.vue' import { heat } from '@/utils/freedo/heat' -import { clearUpMap, AddLabelPoint } from '@/utils/freedo' -import { - getHeat, - getArea, - getDevList, - getStatistics, - getCasePointList, getCaseInfo -} from "../../../../api/ywts/cszl/gd"; -import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; +import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' +import { AddDivPointHighlight, AddLabel } from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; - +import { getPlacePointList, getOverviewStatistics, getPersonList, getCarList, getCaseList, getCaseInfo } from '@/api/ywts/cszl/hw' +import { iconFilter, iconPerson, personList, carList, iconCar } from './data' export default { name: 'Hw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop }, data() { return { isListPage: false, @@ -45,19 +49,19 @@ }, caseTotal: 0, caseIcon: { - 1: require('@/assets/images/icon/事件/已撤案.png'), - 2: require('@/assets/images/icon/事件/指派中.png'), - 3: require('@/assets/images/icon/事件/处置中.png'), - 4: require('@/assets/images/icon/事件/已办结.png'), - 5: require('@/assets/images/icon/事件/已结案.png'), - }, + 1: require('@/assets/images/icon/事件/已撤案.png'), + 2: require('@/assets/images/icon/事件/指派中.png'), + 3: require('@/assets/images/icon/事件/处置中.png'), + 4: require('@/assets/images/icon/事件/已办结.png'), + 5: require('@/assets/images/icon/事件/已结案.png'), + }, caseColor: { - 1: '#ffffff', - 2: '#fdeb56', - 3: '#85c8ff', - 4: '#ffba74', - 5: '#87f6b3', - }, + 1: '#ffffff', + 2: '#fdeb56', + 3: '#85c8ff', + 4: '#ffba74', + 5: '#87f6b3', + }, time: { startTime: '', endTime: '', @@ -71,125 +75,208 @@ carHover: require('@/assets/images/function/环卫/环卫车辆选中.png'), caseBg: require('@/assets/images/function/物联网/物联事件未选中.png'), caseHover: require('@/assets/images/function/物联网/物联事件选中.png'), - menuTab: [{ - name: '基础设施', - value: 'device' - } - // , { - // name: '环监设备', - // value: 'others' - // } - ], + menuTab: [], menus: { - device: [ - ], + // device: [ + // { type: "1", typename: "****设备", total: "111" }, + // ], // others: [ // {type : "1", typename: "****设备", total: "111"}, // {type : "2", typename: "****设备", total: "111"} // ] - } + }, + markerList: [], + markerListBak: [], + currentSelect: '', + showPop: false, + } }, mounted() { - getStatistics().then(response => { - if(response.code === 200) { - this.menus.device = response.data.value - } - }) - this.search() + clearResetMap() + this.fetchPoint() }, methods: { async btnClick(e) { - clearUpMap() + clearResetMap() this.isListPage = false + this.showPop = false this.selectIndex = e.target.id switch (this.selectIndex) { + case "deviceBtn": + this.fetchPoint() + break + case "personBtn": + this.fetchPerson() + break + case "carBtn": + this.fetchCar() + break case "caseBtn": - this.casePoint() + this.fetchCase() break - case "devBtn": - this.search() - break + // } }, - // 设备图层控制 - layer(item) { - // clearUpMap() - const iconOnline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'在线.png') - const iconOffline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'离线.png') - getDevList({type: item.type}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - AddLabelPoint( - item.id, - '', - item.status === '1'? iconOnline: iconOffline, - [item.lon, item.lat, 0], 'gd-dev', item, - null) - }) + // 获取点位 + fetchPoint() { + this.menuTab = [ + { + name: '基础设施', + value: 'device' } + ] + this.menus = { + device: [ + { + type: '1', typename: '垃圾桶', total: 0, icon: iconFilter('垃圾桶') + }, + { + type: '2', typename: '公厕', total: 0, icon: iconFilter('公厕') + }, + { + type: '3', typename: '中转站', total: 0, icon: iconFilter('中转站') + }, + { + type: '4', typename: '处理站', total: 0, icon: iconFilter('处理站') + }, + ] + } + getPlacePointList({}).then(res => { + console.log(res.data, '点位') + const initData = res.data.value.filter(item => item.id && item.lon && item.lat) + this.menus.device = this.menus.device.map((item) => { + return { + ...item, + children: initData.filter(citem => citem.typename === item.type).map(citem => ({ ...citem, type: item.type, typename: item.typename })), + total: initData.filter(citem => citem.typename === item.type).length + } + }) + console.log(this.menus.device) + this.markerList = [] + this.menus.device.forEach(element => { + this.markerList = [...this.markerList, ...element.children] + }); + this.markerListBak = JSON.parse(JSON.stringify(this.markerList)) + console.log(this.markerList, 'this.markerList') + // 绘制点位 + this.markerList.forEach((item) => { + AddLabelPoint( + item.id, + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'yl-dev', item, + this.clickMarker) + }) }) }, - // 事件点位 - casePoint() { - console.log(this.time) - getCasePointList(this.time).then(response => { - if(response.code === 200) { - clearUpMap() - const data = [] - response.data.value.forEach(item => { - if(!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) { - data.push(item) - } + menuClick(e) { + console.log(e, '123') + clearResetMap() + this.showPop = false + if (this.currentSelect === e.typename) { + // 退出筛选 + this.markerList = this.markerListBak + this.currentSelect = '' + } + else { + this.markerList = this.markerListBak.filter((item) => item.typename === e.typename) + this.currentSelect = e.typename + } + this.markerList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }, + // 点击点位 + clickMarker(eventArg) { + const showPop = (e) => { + const item = e._data.data + this.showPop = true + console.log(this.$refs.popRef) + // this.$nextTick(() => { + // this.$refs.popRef.initData(item) + // }) + setTimeout(() => { + this.$nextTick(() => { + this.$refs.popRef.initData(item) }) - data.forEach(item => { + }, 100); + } + if (this.showPop) { + this.showPop = false + setTimeout(() => { + showPop(eventArg) + }, 100); + } + else { + showPop(eventArg) + } + }, + // 获取人员 + fetchPerson() { + this.menus = {} + this.menuTab = [] + getPersonList({}).then(res => { + console.log(res.data, '人员') + // iconPerson, personList + personList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconPerson, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取车辆 + fetchCar() { + this.menus = {} + this.menuTab = [] + getCarList({}).then(res => { + // console.log(res.data.value, '车辆') + // const typeList = [...new Map(res.data.value.filter(item => item.id && item.lon && item.lat).map(item => item.typename))] + // console.log(typeList, 'typeList') + + carList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconCar, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取事件 + fetchCase() { + getCaseList(this.time).then(res => { + console.log(res.data, '事件') + // this.caseList = res.data.value || [] + // this.caseTotal = this.caseList.length + res.data.value.forEach(item => { AddLabelPoint( - item.id, + item.id.replaceAll('.', ''), '', this.caseIcon[item.status], [item.lon, item.lat, 0], 'gd-case', item, this.clickCase) }) - } }) }, - // 查询工地点位 - search() { - const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') - const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - getArea({}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - // console.log(item.areaboundary) - // todo : 画范围 - AddLabelPoint( - item.id, - item.name, - item.status === '2' ? iconDoing: iconDone, - [item.lon, item.lat, 0], 'gd', item, - this.clickHw) - }) - } - }) - }, - // 智慧工地-工地近1月综合得分 - score() { - getArea({}).then(response => { - if(response.code === 200) { - response.data.value.forEach(item => { - console.log(item.areaboundary) - // todo : 画范围 - }) - } - }) - }, - // 点击事件icon - clickCase(eventArg) { + // 点击事件icon + clickCase(eventArg) { const item = eventArg._data.data // 恢复上一个marker - if(this.preCase !== null ) { + if (this.preCase !== null) { window.mmManager.removeById(this.preCase.id) AddLabelPoint( this.preCase.id, @@ -215,38 +302,29 @@ } this.searchCaseMarkerList() }, - // 事件换页 - changePage(val) { + searchCaseMarkerList() { + getCaseInfo(this.caseListQuery).then(res => { + console.log(res.data, '事件详情') + this.caseList = res.data.value || [] + this.caseTotal = this.caseList.length + }) + }, + // 事件换页 + changePage(val) { if (val && val.page) { this.caseListQuery.pageNo = val.page } this.searchCaseMarkerList() }, - searchCaseMarkerList() { - // getCaseInfo(this.caseListQuery).then(response => { - getCaseInfo(this.caseListQuery).then(response => { - if(response.code === 200) { - console.log(response.data.value) - // 右侧看板 - this.caseList = response.data.value - // todo - // this.caseTotal = response.data.value.length - this.caseTotal = 12 - } - }) - }, - changeState(v) { - this.ktSelect = v - }, handleTimeRange(time) { this.isListPage = false - if(this.time.startTime !== '') { + if (this.time.startTime !== '') { this.time = time - this.casePoint() + this.fetchCase() } else { this.time = time } - } + }, } } diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" new file mode 100644 index 0000000..56e1168 --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" new file mode 100644 index 0000000..40381bf --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" Binary files differ diff --git a/src/pages/ywts/cszl/hw/Pop.vue b/src/pages/ywts/cszl/hw/Pop.vue new file mode 100644 index 0000000..a89fe10 --- /dev/null +++ b/src/pages/ywts/cszl/hw/Pop.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/pages/ywts/cszl/hw/data.js b/src/pages/ywts/cszl/hw/data.js new file mode 100644 index 0000000..93c4970 --- /dev/null +++ b/src/pages/ywts/cszl/hw/data.js @@ -0,0 +1,106 @@ +const iconLJT= require('@/assets/images/layerControl/垃圾桶.png') +const iconGC= require('@/assets/images/layerControl/垃圾桶.png') +const iconZZZ= require('@/assets/images/layerControl/中转站.png') +const iconCLZ= require('@/assets/images/layerControl/垃圾处理站.png') +export const iconPerson = require('@/assets/images/icon/应急/人员/专家.png') +export const iconCar = require('@/assets/images/icon/环卫/车辆.png') +export const iconDict = { + 垃圾桶: iconLJT, + 公厕: iconGC, + 中转站: iconZZZ, + 处理站: iconCLZ, +} + +export const iconFilter = (name) => { + return iconDict[name] +} + +export const personList = [ + { + id: '1', + lon: '114.837249', + lat: '25.746674', + name: '李三春', + location: '江西省赣州市章贡区赣南大道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.83749', '25.74674'], + ['114.837249', '25.74674'], + ['114.83729', '25.74664'] + ] + }, + { + id: '2', + lon: '114.851628', + lat: '25.732745', + name: '石禾', + location: '江西省赣州市章贡区潭口镇938乡道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.851623', '25.795933'], + ['114.8512', '25.795923'], + ['114.85833', '25.79533'] + ] + }, + { + id: '3', + lon: '114.858093', + lat: '25.795923', + name: '罗垇', + location: '江西省赣州市南康区滨江南大道靠近潭东镇解胜村梁明清卫生所', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.858093', '25.795923'], + ['114.858013', '25.795923'], + ['114.858033', '25.795933'] + ] + }, +] +export const carList = [ + { + id: '1', + lon: '114.915698', + lat: '25.784352', + name: '', + location: '江西省赣州市章贡区黄金岭街道仓背岭路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.915198', '25.78432'], + ['114.91568', '25.7843512'], + ['114.91598', '25.7841352'] + ] + }, + { + id: '2', + lon: '114.907709', + lat: '25.780931', + name: '', + location: '江西省赣州市章贡区黄金岭街道玫瑰路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.90709', '25.7801931'], + ['114.9027709', '25.78091'], + ['114.9077109', '25.7820931'] + ] + }, +] diff --git a/src/pages/ywts/cszl/hw/index.vue b/src/pages/ywts/cszl/hw/index.vue index 989a75c..e773b7d 100644 --- a/src/pages/ywts/cszl/hw/index.vue +++ b/src/pages/ywts/cszl/hw/index.vue @@ -1,13 +1,22 @@ @@ -15,21 +24,16 @@ import CommonBtn from "@/components/CommonBtn"; import LayerManagerMix from "@/components/LayerManagerMix"; import TimeManager from "@/components/TimeManager"; +import Pop from './Pop.vue' import { heat } from '@/utils/freedo/heat' -import { clearUpMap, AddLabelPoint } from '@/utils/freedo' -import { - getHeat, - getArea, - getDevList, - getStatistics, - getCasePointList, getCaseInfo -} from "../../../../api/ywts/cszl/gd"; -import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; +import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' +import { AddDivPointHighlight, AddLabel } from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; - +import { getPlacePointList, getOverviewStatistics, getPersonList, getCarList, getCaseList, getCaseInfo } from '@/api/ywts/cszl/hw' +import { iconFilter, iconPerson, personList, carList, iconCar } from './data' export default { name: 'Hw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop }, data() { return { isListPage: false, @@ -45,19 +49,19 @@ }, caseTotal: 0, caseIcon: { - 1: require('@/assets/images/icon/事件/已撤案.png'), - 2: require('@/assets/images/icon/事件/指派中.png'), - 3: require('@/assets/images/icon/事件/处置中.png'), - 4: require('@/assets/images/icon/事件/已办结.png'), - 5: require('@/assets/images/icon/事件/已结案.png'), - }, + 1: require('@/assets/images/icon/事件/已撤案.png'), + 2: require('@/assets/images/icon/事件/指派中.png'), + 3: require('@/assets/images/icon/事件/处置中.png'), + 4: require('@/assets/images/icon/事件/已办结.png'), + 5: require('@/assets/images/icon/事件/已结案.png'), + }, caseColor: { - 1: '#ffffff', - 2: '#fdeb56', - 3: '#85c8ff', - 4: '#ffba74', - 5: '#87f6b3', - }, + 1: '#ffffff', + 2: '#fdeb56', + 3: '#85c8ff', + 4: '#ffba74', + 5: '#87f6b3', + }, time: { startTime: '', endTime: '', @@ -71,125 +75,208 @@ carHover: require('@/assets/images/function/环卫/环卫车辆选中.png'), caseBg: require('@/assets/images/function/物联网/物联事件未选中.png'), caseHover: require('@/assets/images/function/物联网/物联事件选中.png'), - menuTab: [{ - name: '基础设施', - value: 'device' - } - // , { - // name: '环监设备', - // value: 'others' - // } - ], + menuTab: [], menus: { - device: [ - ], + // device: [ + // { type: "1", typename: "****设备", total: "111" }, + // ], // others: [ // {type : "1", typename: "****设备", total: "111"}, // {type : "2", typename: "****设备", total: "111"} // ] - } + }, + markerList: [], + markerListBak: [], + currentSelect: '', + showPop: false, + } }, mounted() { - getStatistics().then(response => { - if(response.code === 200) { - this.menus.device = response.data.value - } - }) - this.search() + clearResetMap() + this.fetchPoint() }, methods: { async btnClick(e) { - clearUpMap() + clearResetMap() this.isListPage = false + this.showPop = false this.selectIndex = e.target.id switch (this.selectIndex) { + case "deviceBtn": + this.fetchPoint() + break + case "personBtn": + this.fetchPerson() + break + case "carBtn": + this.fetchCar() + break case "caseBtn": - this.casePoint() + this.fetchCase() break - case "devBtn": - this.search() - break + // } }, - // 设备图层控制 - layer(item) { - // clearUpMap() - const iconOnline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'在线.png') - const iconOffline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'离线.png') - getDevList({type: item.type}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - AddLabelPoint( - item.id, - '', - item.status === '1'? iconOnline: iconOffline, - [item.lon, item.lat, 0], 'gd-dev', item, - null) - }) + // 获取点位 + fetchPoint() { + this.menuTab = [ + { + name: '基础设施', + value: 'device' } + ] + this.menus = { + device: [ + { + type: '1', typename: '垃圾桶', total: 0, icon: iconFilter('垃圾桶') + }, + { + type: '2', typename: '公厕', total: 0, icon: iconFilter('公厕') + }, + { + type: '3', typename: '中转站', total: 0, icon: iconFilter('中转站') + }, + { + type: '4', typename: '处理站', total: 0, icon: iconFilter('处理站') + }, + ] + } + getPlacePointList({}).then(res => { + console.log(res.data, '点位') + const initData = res.data.value.filter(item => item.id && item.lon && item.lat) + this.menus.device = this.menus.device.map((item) => { + return { + ...item, + children: initData.filter(citem => citem.typename === item.type).map(citem => ({ ...citem, type: item.type, typename: item.typename })), + total: initData.filter(citem => citem.typename === item.type).length + } + }) + console.log(this.menus.device) + this.markerList = [] + this.menus.device.forEach(element => { + this.markerList = [...this.markerList, ...element.children] + }); + this.markerListBak = JSON.parse(JSON.stringify(this.markerList)) + console.log(this.markerList, 'this.markerList') + // 绘制点位 + this.markerList.forEach((item) => { + AddLabelPoint( + item.id, + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'yl-dev', item, + this.clickMarker) + }) }) }, - // 事件点位 - casePoint() { - console.log(this.time) - getCasePointList(this.time).then(response => { - if(response.code === 200) { - clearUpMap() - const data = [] - response.data.value.forEach(item => { - if(!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) { - data.push(item) - } + menuClick(e) { + console.log(e, '123') + clearResetMap() + this.showPop = false + if (this.currentSelect === e.typename) { + // 退出筛选 + this.markerList = this.markerListBak + this.currentSelect = '' + } + else { + this.markerList = this.markerListBak.filter((item) => item.typename === e.typename) + this.currentSelect = e.typename + } + this.markerList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }, + // 点击点位 + clickMarker(eventArg) { + const showPop = (e) => { + const item = e._data.data + this.showPop = true + console.log(this.$refs.popRef) + // this.$nextTick(() => { + // this.$refs.popRef.initData(item) + // }) + setTimeout(() => { + this.$nextTick(() => { + this.$refs.popRef.initData(item) }) - data.forEach(item => { + }, 100); + } + if (this.showPop) { + this.showPop = false + setTimeout(() => { + showPop(eventArg) + }, 100); + } + else { + showPop(eventArg) + } + }, + // 获取人员 + fetchPerson() { + this.menus = {} + this.menuTab = [] + getPersonList({}).then(res => { + console.log(res.data, '人员') + // iconPerson, personList + personList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconPerson, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取车辆 + fetchCar() { + this.menus = {} + this.menuTab = [] + getCarList({}).then(res => { + // console.log(res.data.value, '车辆') + // const typeList = [...new Map(res.data.value.filter(item => item.id && item.lon && item.lat).map(item => item.typename))] + // console.log(typeList, 'typeList') + + carList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconCar, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取事件 + fetchCase() { + getCaseList(this.time).then(res => { + console.log(res.data, '事件') + // this.caseList = res.data.value || [] + // this.caseTotal = this.caseList.length + res.data.value.forEach(item => { AddLabelPoint( - item.id, + item.id.replaceAll('.', ''), '', this.caseIcon[item.status], [item.lon, item.lat, 0], 'gd-case', item, this.clickCase) }) - } }) }, - // 查询工地点位 - search() { - const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') - const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - getArea({}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - // console.log(item.areaboundary) - // todo : 画范围 - AddLabelPoint( - item.id, - item.name, - item.status === '2' ? iconDoing: iconDone, - [item.lon, item.lat, 0], 'gd', item, - this.clickHw) - }) - } - }) - }, - // 智慧工地-工地近1月综合得分 - score() { - getArea({}).then(response => { - if(response.code === 200) { - response.data.value.forEach(item => { - console.log(item.areaboundary) - // todo : 画范围 - }) - } - }) - }, - // 点击事件icon - clickCase(eventArg) { + // 点击事件icon + clickCase(eventArg) { const item = eventArg._data.data // 恢复上一个marker - if(this.preCase !== null ) { + if (this.preCase !== null) { window.mmManager.removeById(this.preCase.id) AddLabelPoint( this.preCase.id, @@ -215,38 +302,29 @@ } this.searchCaseMarkerList() }, - // 事件换页 - changePage(val) { + searchCaseMarkerList() { + getCaseInfo(this.caseListQuery).then(res => { + console.log(res.data, '事件详情') + this.caseList = res.data.value || [] + this.caseTotal = this.caseList.length + }) + }, + // 事件换页 + changePage(val) { if (val && val.page) { this.caseListQuery.pageNo = val.page } this.searchCaseMarkerList() }, - searchCaseMarkerList() { - // getCaseInfo(this.caseListQuery).then(response => { - getCaseInfo(this.caseListQuery).then(response => { - if(response.code === 200) { - console.log(response.data.value) - // 右侧看板 - this.caseList = response.data.value - // todo - // this.caseTotal = response.data.value.length - this.caseTotal = 12 - } - }) - }, - changeState(v) { - this.ktSelect = v - }, handleTimeRange(time) { this.isListPage = false - if(this.time.startTime !== '') { + if (this.time.startTime !== '') { this.time = time - this.casePoint() + this.fetchCase() } else { this.time = time } - } + }, } } diff --git a/src/pages/ywts/ywts.vue b/src/pages/ywts/ywts.vue index d5cbc8b..99a5d69 100644 --- a/src/pages/ywts/ywts.vue +++ b/src/pages/ywts/ywts.vue @@ -33,12 +33,13 @@ import Jxh from "./cszl/jxh"; import Hw from "./cszl/hw"; import Yl from "./zyhj/yl"; +import Hb from "./zyhj/hb"; import Gw from "./cszl/gw"; import Jt from "./cszl/jt"; import Yj from "./cszl/yj"; export default { - components: {Yj, Jt, Gw, Yl, Hw, Jxh, Gd, Jy, FreedoMap, ListInfo, ListPage, CommonFunction, MenuBtn }, + components: {Yj, Jt, Gw, Yl, Hw, Jxh, Gd, Jy,Hb, FreedoMap, ListInfo, ListPage, CommonFunction, MenuBtn }, data() { var pmtsManager return { diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" new file mode 100644 index 0000000..56e1168 --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" new file mode 100644 index 0000000..40381bf --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" Binary files differ diff --git a/src/pages/ywts/cszl/hw/Pop.vue b/src/pages/ywts/cszl/hw/Pop.vue new file mode 100644 index 0000000..a89fe10 --- /dev/null +++ b/src/pages/ywts/cszl/hw/Pop.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/pages/ywts/cszl/hw/data.js b/src/pages/ywts/cszl/hw/data.js new file mode 100644 index 0000000..93c4970 --- /dev/null +++ b/src/pages/ywts/cszl/hw/data.js @@ -0,0 +1,106 @@ +const iconLJT= require('@/assets/images/layerControl/垃圾桶.png') +const iconGC= require('@/assets/images/layerControl/垃圾桶.png') +const iconZZZ= require('@/assets/images/layerControl/中转站.png') +const iconCLZ= require('@/assets/images/layerControl/垃圾处理站.png') +export const iconPerson = require('@/assets/images/icon/应急/人员/专家.png') +export const iconCar = require('@/assets/images/icon/环卫/车辆.png') +export const iconDict = { + 垃圾桶: iconLJT, + 公厕: iconGC, + 中转站: iconZZZ, + 处理站: iconCLZ, +} + +export const iconFilter = (name) => { + return iconDict[name] +} + +export const personList = [ + { + id: '1', + lon: '114.837249', + lat: '25.746674', + name: '李三春', + location: '江西省赣州市章贡区赣南大道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.83749', '25.74674'], + ['114.837249', '25.74674'], + ['114.83729', '25.74664'] + ] + }, + { + id: '2', + lon: '114.851628', + lat: '25.732745', + name: '石禾', + location: '江西省赣州市章贡区潭口镇938乡道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.851623', '25.795933'], + ['114.8512', '25.795923'], + ['114.85833', '25.79533'] + ] + }, + { + id: '3', + lon: '114.858093', + lat: '25.795923', + name: '罗垇', + location: '江西省赣州市南康区滨江南大道靠近潭东镇解胜村梁明清卫生所', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.858093', '25.795923'], + ['114.858013', '25.795923'], + ['114.858033', '25.795933'] + ] + }, +] +export const carList = [ + { + id: '1', + lon: '114.915698', + lat: '25.784352', + name: '', + location: '江西省赣州市章贡区黄金岭街道仓背岭路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.915198', '25.78432'], + ['114.91568', '25.7843512'], + ['114.91598', '25.7841352'] + ] + }, + { + id: '2', + lon: '114.907709', + lat: '25.780931', + name: '', + location: '江西省赣州市章贡区黄金岭街道玫瑰路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.90709', '25.7801931'], + ['114.9027709', '25.78091'], + ['114.9077109', '25.7820931'] + ] + }, +] diff --git a/src/pages/ywts/cszl/hw/index.vue b/src/pages/ywts/cszl/hw/index.vue index 989a75c..e773b7d 100644 --- a/src/pages/ywts/cszl/hw/index.vue +++ b/src/pages/ywts/cszl/hw/index.vue @@ -1,13 +1,22 @@ @@ -15,21 +24,16 @@ import CommonBtn from "@/components/CommonBtn"; import LayerManagerMix from "@/components/LayerManagerMix"; import TimeManager from "@/components/TimeManager"; +import Pop from './Pop.vue' import { heat } from '@/utils/freedo/heat' -import { clearUpMap, AddLabelPoint } from '@/utils/freedo' -import { - getHeat, - getArea, - getDevList, - getStatistics, - getCasePointList, getCaseInfo -} from "../../../../api/ywts/cszl/gd"; -import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; +import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' +import { AddDivPointHighlight, AddLabel } from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; - +import { getPlacePointList, getOverviewStatistics, getPersonList, getCarList, getCaseList, getCaseInfo } from '@/api/ywts/cszl/hw' +import { iconFilter, iconPerson, personList, carList, iconCar } from './data' export default { name: 'Hw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop }, data() { return { isListPage: false, @@ -45,19 +49,19 @@ }, caseTotal: 0, caseIcon: { - 1: require('@/assets/images/icon/事件/已撤案.png'), - 2: require('@/assets/images/icon/事件/指派中.png'), - 3: require('@/assets/images/icon/事件/处置中.png'), - 4: require('@/assets/images/icon/事件/已办结.png'), - 5: require('@/assets/images/icon/事件/已结案.png'), - }, + 1: require('@/assets/images/icon/事件/已撤案.png'), + 2: require('@/assets/images/icon/事件/指派中.png'), + 3: require('@/assets/images/icon/事件/处置中.png'), + 4: require('@/assets/images/icon/事件/已办结.png'), + 5: require('@/assets/images/icon/事件/已结案.png'), + }, caseColor: { - 1: '#ffffff', - 2: '#fdeb56', - 3: '#85c8ff', - 4: '#ffba74', - 5: '#87f6b3', - }, + 1: '#ffffff', + 2: '#fdeb56', + 3: '#85c8ff', + 4: '#ffba74', + 5: '#87f6b3', + }, time: { startTime: '', endTime: '', @@ -71,125 +75,208 @@ carHover: require('@/assets/images/function/环卫/环卫车辆选中.png'), caseBg: require('@/assets/images/function/物联网/物联事件未选中.png'), caseHover: require('@/assets/images/function/物联网/物联事件选中.png'), - menuTab: [{ - name: '基础设施', - value: 'device' - } - // , { - // name: '环监设备', - // value: 'others' - // } - ], + menuTab: [], menus: { - device: [ - ], + // device: [ + // { type: "1", typename: "****设备", total: "111" }, + // ], // others: [ // {type : "1", typename: "****设备", total: "111"}, // {type : "2", typename: "****设备", total: "111"} // ] - } + }, + markerList: [], + markerListBak: [], + currentSelect: '', + showPop: false, + } }, mounted() { - getStatistics().then(response => { - if(response.code === 200) { - this.menus.device = response.data.value - } - }) - this.search() + clearResetMap() + this.fetchPoint() }, methods: { async btnClick(e) { - clearUpMap() + clearResetMap() this.isListPage = false + this.showPop = false this.selectIndex = e.target.id switch (this.selectIndex) { + case "deviceBtn": + this.fetchPoint() + break + case "personBtn": + this.fetchPerson() + break + case "carBtn": + this.fetchCar() + break case "caseBtn": - this.casePoint() + this.fetchCase() break - case "devBtn": - this.search() - break + // } }, - // 设备图层控制 - layer(item) { - // clearUpMap() - const iconOnline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'在线.png') - const iconOffline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'离线.png') - getDevList({type: item.type}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - AddLabelPoint( - item.id, - '', - item.status === '1'? iconOnline: iconOffline, - [item.lon, item.lat, 0], 'gd-dev', item, - null) - }) + // 获取点位 + fetchPoint() { + this.menuTab = [ + { + name: '基础设施', + value: 'device' } + ] + this.menus = { + device: [ + { + type: '1', typename: '垃圾桶', total: 0, icon: iconFilter('垃圾桶') + }, + { + type: '2', typename: '公厕', total: 0, icon: iconFilter('公厕') + }, + { + type: '3', typename: '中转站', total: 0, icon: iconFilter('中转站') + }, + { + type: '4', typename: '处理站', total: 0, icon: iconFilter('处理站') + }, + ] + } + getPlacePointList({}).then(res => { + console.log(res.data, '点位') + const initData = res.data.value.filter(item => item.id && item.lon && item.lat) + this.menus.device = this.menus.device.map((item) => { + return { + ...item, + children: initData.filter(citem => citem.typename === item.type).map(citem => ({ ...citem, type: item.type, typename: item.typename })), + total: initData.filter(citem => citem.typename === item.type).length + } + }) + console.log(this.menus.device) + this.markerList = [] + this.menus.device.forEach(element => { + this.markerList = [...this.markerList, ...element.children] + }); + this.markerListBak = JSON.parse(JSON.stringify(this.markerList)) + console.log(this.markerList, 'this.markerList') + // 绘制点位 + this.markerList.forEach((item) => { + AddLabelPoint( + item.id, + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'yl-dev', item, + this.clickMarker) + }) }) }, - // 事件点位 - casePoint() { - console.log(this.time) - getCasePointList(this.time).then(response => { - if(response.code === 200) { - clearUpMap() - const data = [] - response.data.value.forEach(item => { - if(!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) { - data.push(item) - } + menuClick(e) { + console.log(e, '123') + clearResetMap() + this.showPop = false + if (this.currentSelect === e.typename) { + // 退出筛选 + this.markerList = this.markerListBak + this.currentSelect = '' + } + else { + this.markerList = this.markerListBak.filter((item) => item.typename === e.typename) + this.currentSelect = e.typename + } + this.markerList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }, + // 点击点位 + clickMarker(eventArg) { + const showPop = (e) => { + const item = e._data.data + this.showPop = true + console.log(this.$refs.popRef) + // this.$nextTick(() => { + // this.$refs.popRef.initData(item) + // }) + setTimeout(() => { + this.$nextTick(() => { + this.$refs.popRef.initData(item) }) - data.forEach(item => { + }, 100); + } + if (this.showPop) { + this.showPop = false + setTimeout(() => { + showPop(eventArg) + }, 100); + } + else { + showPop(eventArg) + } + }, + // 获取人员 + fetchPerson() { + this.menus = {} + this.menuTab = [] + getPersonList({}).then(res => { + console.log(res.data, '人员') + // iconPerson, personList + personList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconPerson, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取车辆 + fetchCar() { + this.menus = {} + this.menuTab = [] + getCarList({}).then(res => { + // console.log(res.data.value, '车辆') + // const typeList = [...new Map(res.data.value.filter(item => item.id && item.lon && item.lat).map(item => item.typename))] + // console.log(typeList, 'typeList') + + carList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconCar, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取事件 + fetchCase() { + getCaseList(this.time).then(res => { + console.log(res.data, '事件') + // this.caseList = res.data.value || [] + // this.caseTotal = this.caseList.length + res.data.value.forEach(item => { AddLabelPoint( - item.id, + item.id.replaceAll('.', ''), '', this.caseIcon[item.status], [item.lon, item.lat, 0], 'gd-case', item, this.clickCase) }) - } }) }, - // 查询工地点位 - search() { - const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') - const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - getArea({}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - // console.log(item.areaboundary) - // todo : 画范围 - AddLabelPoint( - item.id, - item.name, - item.status === '2' ? iconDoing: iconDone, - [item.lon, item.lat, 0], 'gd', item, - this.clickHw) - }) - } - }) - }, - // 智慧工地-工地近1月综合得分 - score() { - getArea({}).then(response => { - if(response.code === 200) { - response.data.value.forEach(item => { - console.log(item.areaboundary) - // todo : 画范围 - }) - } - }) - }, - // 点击事件icon - clickCase(eventArg) { + // 点击事件icon + clickCase(eventArg) { const item = eventArg._data.data // 恢复上一个marker - if(this.preCase !== null ) { + if (this.preCase !== null) { window.mmManager.removeById(this.preCase.id) AddLabelPoint( this.preCase.id, @@ -215,38 +302,29 @@ } this.searchCaseMarkerList() }, - // 事件换页 - changePage(val) { + searchCaseMarkerList() { + getCaseInfo(this.caseListQuery).then(res => { + console.log(res.data, '事件详情') + this.caseList = res.data.value || [] + this.caseTotal = this.caseList.length + }) + }, + // 事件换页 + changePage(val) { if (val && val.page) { this.caseListQuery.pageNo = val.page } this.searchCaseMarkerList() }, - searchCaseMarkerList() { - // getCaseInfo(this.caseListQuery).then(response => { - getCaseInfo(this.caseListQuery).then(response => { - if(response.code === 200) { - console.log(response.data.value) - // 右侧看板 - this.caseList = response.data.value - // todo - // this.caseTotal = response.data.value.length - this.caseTotal = 12 - } - }) - }, - changeState(v) { - this.ktSelect = v - }, handleTimeRange(time) { this.isListPage = false - if(this.time.startTime !== '') { + if (this.time.startTime !== '') { this.time = time - this.casePoint() + this.fetchCase() } else { this.time = time } - } + }, } } diff --git a/src/pages/ywts/ywts.vue b/src/pages/ywts/ywts.vue index d5cbc8b..99a5d69 100644 --- a/src/pages/ywts/ywts.vue +++ b/src/pages/ywts/ywts.vue @@ -33,12 +33,13 @@ import Jxh from "./cszl/jxh"; import Hw from "./cszl/hw"; import Yl from "./zyhj/yl"; +import Hb from "./zyhj/hb"; import Gw from "./cszl/gw"; import Jt from "./cszl/jt"; import Yj from "./cszl/yj"; export default { - components: {Yj, Jt, Gw, Yl, Hw, Jxh, Gd, Jy, FreedoMap, ListInfo, ListPage, CommonFunction, MenuBtn }, + components: {Yj, Jt, Gw, Yl, Hw, Jxh, Gd, Jy,Hb, FreedoMap, ListInfo, ListPage, CommonFunction, MenuBtn }, data() { var pmtsManager return { diff --git a/src/pages/ywts/zyhj/hb/index.vue b/src/pages/ywts/zyhj/hb/index.vue new file mode 100644 index 0000000..84ae2d5 --- /dev/null +++ b/src/pages/ywts/zyhj/hb/index.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" new file mode 100644 index 0000000..56e1168 --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" new file mode 100644 index 0000000..40381bf --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" Binary files differ diff --git a/src/pages/ywts/cszl/hw/Pop.vue b/src/pages/ywts/cszl/hw/Pop.vue new file mode 100644 index 0000000..a89fe10 --- /dev/null +++ b/src/pages/ywts/cszl/hw/Pop.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/pages/ywts/cszl/hw/data.js b/src/pages/ywts/cszl/hw/data.js new file mode 100644 index 0000000..93c4970 --- /dev/null +++ b/src/pages/ywts/cszl/hw/data.js @@ -0,0 +1,106 @@ +const iconLJT= require('@/assets/images/layerControl/垃圾桶.png') +const iconGC= require('@/assets/images/layerControl/垃圾桶.png') +const iconZZZ= require('@/assets/images/layerControl/中转站.png') +const iconCLZ= require('@/assets/images/layerControl/垃圾处理站.png') +export const iconPerson = require('@/assets/images/icon/应急/人员/专家.png') +export const iconCar = require('@/assets/images/icon/环卫/车辆.png') +export const iconDict = { + 垃圾桶: iconLJT, + 公厕: iconGC, + 中转站: iconZZZ, + 处理站: iconCLZ, +} + +export const iconFilter = (name) => { + return iconDict[name] +} + +export const personList = [ + { + id: '1', + lon: '114.837249', + lat: '25.746674', + name: '李三春', + location: '江西省赣州市章贡区赣南大道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.83749', '25.74674'], + ['114.837249', '25.74674'], + ['114.83729', '25.74664'] + ] + }, + { + id: '2', + lon: '114.851628', + lat: '25.732745', + name: '石禾', + location: '江西省赣州市章贡区潭口镇938乡道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.851623', '25.795933'], + ['114.8512', '25.795923'], + ['114.85833', '25.79533'] + ] + }, + { + id: '3', + lon: '114.858093', + lat: '25.795923', + name: '罗垇', + location: '江西省赣州市南康区滨江南大道靠近潭东镇解胜村梁明清卫生所', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.858093', '25.795923'], + ['114.858013', '25.795923'], + ['114.858033', '25.795933'] + ] + }, +] +export const carList = [ + { + id: '1', + lon: '114.915698', + lat: '25.784352', + name: '', + location: '江西省赣州市章贡区黄金岭街道仓背岭路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.915198', '25.78432'], + ['114.91568', '25.7843512'], + ['114.91598', '25.7841352'] + ] + }, + { + id: '2', + lon: '114.907709', + lat: '25.780931', + name: '', + location: '江西省赣州市章贡区黄金岭街道玫瑰路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.90709', '25.7801931'], + ['114.9027709', '25.78091'], + ['114.9077109', '25.7820931'] + ] + }, +] diff --git a/src/pages/ywts/cszl/hw/index.vue b/src/pages/ywts/cszl/hw/index.vue index 989a75c..e773b7d 100644 --- a/src/pages/ywts/cszl/hw/index.vue +++ b/src/pages/ywts/cszl/hw/index.vue @@ -1,13 +1,22 @@ @@ -15,21 +24,16 @@ import CommonBtn from "@/components/CommonBtn"; import LayerManagerMix from "@/components/LayerManagerMix"; import TimeManager from "@/components/TimeManager"; +import Pop from './Pop.vue' import { heat } from '@/utils/freedo/heat' -import { clearUpMap, AddLabelPoint } from '@/utils/freedo' -import { - getHeat, - getArea, - getDevList, - getStatistics, - getCasePointList, getCaseInfo -} from "../../../../api/ywts/cszl/gd"; -import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; +import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' +import { AddDivPointHighlight, AddLabel } from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; - +import { getPlacePointList, getOverviewStatistics, getPersonList, getCarList, getCaseList, getCaseInfo } from '@/api/ywts/cszl/hw' +import { iconFilter, iconPerson, personList, carList, iconCar } from './data' export default { name: 'Hw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop }, data() { return { isListPage: false, @@ -45,19 +49,19 @@ }, caseTotal: 0, caseIcon: { - 1: require('@/assets/images/icon/事件/已撤案.png'), - 2: require('@/assets/images/icon/事件/指派中.png'), - 3: require('@/assets/images/icon/事件/处置中.png'), - 4: require('@/assets/images/icon/事件/已办结.png'), - 5: require('@/assets/images/icon/事件/已结案.png'), - }, + 1: require('@/assets/images/icon/事件/已撤案.png'), + 2: require('@/assets/images/icon/事件/指派中.png'), + 3: require('@/assets/images/icon/事件/处置中.png'), + 4: require('@/assets/images/icon/事件/已办结.png'), + 5: require('@/assets/images/icon/事件/已结案.png'), + }, caseColor: { - 1: '#ffffff', - 2: '#fdeb56', - 3: '#85c8ff', - 4: '#ffba74', - 5: '#87f6b3', - }, + 1: '#ffffff', + 2: '#fdeb56', + 3: '#85c8ff', + 4: '#ffba74', + 5: '#87f6b3', + }, time: { startTime: '', endTime: '', @@ -71,125 +75,208 @@ carHover: require('@/assets/images/function/环卫/环卫车辆选中.png'), caseBg: require('@/assets/images/function/物联网/物联事件未选中.png'), caseHover: require('@/assets/images/function/物联网/物联事件选中.png'), - menuTab: [{ - name: '基础设施', - value: 'device' - } - // , { - // name: '环监设备', - // value: 'others' - // } - ], + menuTab: [], menus: { - device: [ - ], + // device: [ + // { type: "1", typename: "****设备", total: "111" }, + // ], // others: [ // {type : "1", typename: "****设备", total: "111"}, // {type : "2", typename: "****设备", total: "111"} // ] - } + }, + markerList: [], + markerListBak: [], + currentSelect: '', + showPop: false, + } }, mounted() { - getStatistics().then(response => { - if(response.code === 200) { - this.menus.device = response.data.value - } - }) - this.search() + clearResetMap() + this.fetchPoint() }, methods: { async btnClick(e) { - clearUpMap() + clearResetMap() this.isListPage = false + this.showPop = false this.selectIndex = e.target.id switch (this.selectIndex) { + case "deviceBtn": + this.fetchPoint() + break + case "personBtn": + this.fetchPerson() + break + case "carBtn": + this.fetchCar() + break case "caseBtn": - this.casePoint() + this.fetchCase() break - case "devBtn": - this.search() - break + // } }, - // 设备图层控制 - layer(item) { - // clearUpMap() - const iconOnline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'在线.png') - const iconOffline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'离线.png') - getDevList({type: item.type}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - AddLabelPoint( - item.id, - '', - item.status === '1'? iconOnline: iconOffline, - [item.lon, item.lat, 0], 'gd-dev', item, - null) - }) + // 获取点位 + fetchPoint() { + this.menuTab = [ + { + name: '基础设施', + value: 'device' } + ] + this.menus = { + device: [ + { + type: '1', typename: '垃圾桶', total: 0, icon: iconFilter('垃圾桶') + }, + { + type: '2', typename: '公厕', total: 0, icon: iconFilter('公厕') + }, + { + type: '3', typename: '中转站', total: 0, icon: iconFilter('中转站') + }, + { + type: '4', typename: '处理站', total: 0, icon: iconFilter('处理站') + }, + ] + } + getPlacePointList({}).then(res => { + console.log(res.data, '点位') + const initData = res.data.value.filter(item => item.id && item.lon && item.lat) + this.menus.device = this.menus.device.map((item) => { + return { + ...item, + children: initData.filter(citem => citem.typename === item.type).map(citem => ({ ...citem, type: item.type, typename: item.typename })), + total: initData.filter(citem => citem.typename === item.type).length + } + }) + console.log(this.menus.device) + this.markerList = [] + this.menus.device.forEach(element => { + this.markerList = [...this.markerList, ...element.children] + }); + this.markerListBak = JSON.parse(JSON.stringify(this.markerList)) + console.log(this.markerList, 'this.markerList') + // 绘制点位 + this.markerList.forEach((item) => { + AddLabelPoint( + item.id, + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'yl-dev', item, + this.clickMarker) + }) }) }, - // 事件点位 - casePoint() { - console.log(this.time) - getCasePointList(this.time).then(response => { - if(response.code === 200) { - clearUpMap() - const data = [] - response.data.value.forEach(item => { - if(!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) { - data.push(item) - } + menuClick(e) { + console.log(e, '123') + clearResetMap() + this.showPop = false + if (this.currentSelect === e.typename) { + // 退出筛选 + this.markerList = this.markerListBak + this.currentSelect = '' + } + else { + this.markerList = this.markerListBak.filter((item) => item.typename === e.typename) + this.currentSelect = e.typename + } + this.markerList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }, + // 点击点位 + clickMarker(eventArg) { + const showPop = (e) => { + const item = e._data.data + this.showPop = true + console.log(this.$refs.popRef) + // this.$nextTick(() => { + // this.$refs.popRef.initData(item) + // }) + setTimeout(() => { + this.$nextTick(() => { + this.$refs.popRef.initData(item) }) - data.forEach(item => { + }, 100); + } + if (this.showPop) { + this.showPop = false + setTimeout(() => { + showPop(eventArg) + }, 100); + } + else { + showPop(eventArg) + } + }, + // 获取人员 + fetchPerson() { + this.menus = {} + this.menuTab = [] + getPersonList({}).then(res => { + console.log(res.data, '人员') + // iconPerson, personList + personList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconPerson, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取车辆 + fetchCar() { + this.menus = {} + this.menuTab = [] + getCarList({}).then(res => { + // console.log(res.data.value, '车辆') + // const typeList = [...new Map(res.data.value.filter(item => item.id && item.lon && item.lat).map(item => item.typename))] + // console.log(typeList, 'typeList') + + carList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconCar, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取事件 + fetchCase() { + getCaseList(this.time).then(res => { + console.log(res.data, '事件') + // this.caseList = res.data.value || [] + // this.caseTotal = this.caseList.length + res.data.value.forEach(item => { AddLabelPoint( - item.id, + item.id.replaceAll('.', ''), '', this.caseIcon[item.status], [item.lon, item.lat, 0], 'gd-case', item, this.clickCase) }) - } }) }, - // 查询工地点位 - search() { - const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') - const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - getArea({}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - // console.log(item.areaboundary) - // todo : 画范围 - AddLabelPoint( - item.id, - item.name, - item.status === '2' ? iconDoing: iconDone, - [item.lon, item.lat, 0], 'gd', item, - this.clickHw) - }) - } - }) - }, - // 智慧工地-工地近1月综合得分 - score() { - getArea({}).then(response => { - if(response.code === 200) { - response.data.value.forEach(item => { - console.log(item.areaboundary) - // todo : 画范围 - }) - } - }) - }, - // 点击事件icon - clickCase(eventArg) { + // 点击事件icon + clickCase(eventArg) { const item = eventArg._data.data // 恢复上一个marker - if(this.preCase !== null ) { + if (this.preCase !== null) { window.mmManager.removeById(this.preCase.id) AddLabelPoint( this.preCase.id, @@ -215,38 +302,29 @@ } this.searchCaseMarkerList() }, - // 事件换页 - changePage(val) { + searchCaseMarkerList() { + getCaseInfo(this.caseListQuery).then(res => { + console.log(res.data, '事件详情') + this.caseList = res.data.value || [] + this.caseTotal = this.caseList.length + }) + }, + // 事件换页 + changePage(val) { if (val && val.page) { this.caseListQuery.pageNo = val.page } this.searchCaseMarkerList() }, - searchCaseMarkerList() { - // getCaseInfo(this.caseListQuery).then(response => { - getCaseInfo(this.caseListQuery).then(response => { - if(response.code === 200) { - console.log(response.data.value) - // 右侧看板 - this.caseList = response.data.value - // todo - // this.caseTotal = response.data.value.length - this.caseTotal = 12 - } - }) - }, - changeState(v) { - this.ktSelect = v - }, handleTimeRange(time) { this.isListPage = false - if(this.time.startTime !== '') { + if (this.time.startTime !== '') { this.time = time - this.casePoint() + this.fetchCase() } else { this.time = time } - } + }, } } diff --git a/src/pages/ywts/ywts.vue b/src/pages/ywts/ywts.vue index d5cbc8b..99a5d69 100644 --- a/src/pages/ywts/ywts.vue +++ b/src/pages/ywts/ywts.vue @@ -33,12 +33,13 @@ import Jxh from "./cszl/jxh"; import Hw from "./cszl/hw"; import Yl from "./zyhj/yl"; +import Hb from "./zyhj/hb"; import Gw from "./cszl/gw"; import Jt from "./cszl/jt"; import Yj from "./cszl/yj"; export default { - components: {Yj, Jt, Gw, Yl, Hw, Jxh, Gd, Jy, FreedoMap, ListInfo, ListPage, CommonFunction, MenuBtn }, + components: {Yj, Jt, Gw, Yl, Hw, Jxh, Gd, Jy,Hb, FreedoMap, ListInfo, ListPage, CommonFunction, MenuBtn }, data() { var pmtsManager return { diff --git a/src/pages/ywts/zyhj/hb/index.vue b/src/pages/ywts/zyhj/hb/index.vue new file mode 100644 index 0000000..84ae2d5 --- /dev/null +++ b/src/pages/ywts/zyhj/hb/index.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/pages/ywts/zyhj/yl/index.vue b/src/pages/ywts/zyhj/yl/index.vue index 674b15c..787d735 100644 --- a/src/pages/ywts/zyhj/yl/index.vue +++ b/src/pages/ywts/zyhj/yl/index.vue @@ -3,7 +3,7 @@
- @@ -14,6 +14,8 @@ v-show="isListPage" @close="isListPage = false" /> + +
@@ -23,6 +25,7 @@ import TimeManager from "@/components/TimeManager"; import YlPop from "./ylPop"; import Pop from './Pop.vue' +import mmPop from './mmPop.vue' import { heat } from '@/utils/freedo/heat' import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' // import { @@ -34,18 +37,19 @@ // } from "../../../../api/ywts/cszl/gd"; import { getPointList } from '@/api/ywts/zyhj/yl' import { AddDivPointHighlight, AddLabel } from "../../../../utils/freedo"; -import { getDevice, getCaseList, getCaseInfo } from '@/api/ywts/zyhj/yl' +import { getDevice, getCaseList, getCaseInfo, getseedlingList } from '@/api/ywts/zyhj/yl' import { iconFilter } from './data' import ListPage from "@/components/ListPage"; export default { name: 'Yl', - components: { YlPop, TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop }, + components: { YlPop, TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop, mmPop }, data() { return { isListPage: false, ktSelect: '', isShow: false, + isShowMM: false, selectIndex: 'ylBtn', currentSelect: '', caseList: [], @@ -124,6 +128,7 @@ this.isListPage = false this.isShow = false this.showPop = false + this.isShowMM = false this.selectIndex = e.target.id switch (this.selectIndex) { case "caseBtn": @@ -369,6 +374,29 @@ ) }) }) + getseedlingList({}).then(res => { + console.log('苗木', res.data) + const initData = res.data.value.filter(item => item.id && item.lon && item.lat) + console.log(initData, 'initData') + initData.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + item.name, + undefined, + [item.lon, item.lat, 0], 'gd', item, + this.clickMM + ) + }) + + }) + }, + // 点击苗木 + clickMM(eventArg) { + const item = eventArg._data.data + this.isShowMM = true + this.$nextTick(() => { + this.$refs.mmpop.initData(item) + }) } } } diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" new file mode 100644 index 0000000..56e1168 --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" new file mode 100644 index 0000000..40381bf --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" Binary files differ diff --git a/src/pages/ywts/cszl/hw/Pop.vue b/src/pages/ywts/cszl/hw/Pop.vue new file mode 100644 index 0000000..a89fe10 --- /dev/null +++ b/src/pages/ywts/cszl/hw/Pop.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/pages/ywts/cszl/hw/data.js b/src/pages/ywts/cszl/hw/data.js new file mode 100644 index 0000000..93c4970 --- /dev/null +++ b/src/pages/ywts/cszl/hw/data.js @@ -0,0 +1,106 @@ +const iconLJT= require('@/assets/images/layerControl/垃圾桶.png') +const iconGC= require('@/assets/images/layerControl/垃圾桶.png') +const iconZZZ= require('@/assets/images/layerControl/中转站.png') +const iconCLZ= require('@/assets/images/layerControl/垃圾处理站.png') +export const iconPerson = require('@/assets/images/icon/应急/人员/专家.png') +export const iconCar = require('@/assets/images/icon/环卫/车辆.png') +export const iconDict = { + 垃圾桶: iconLJT, + 公厕: iconGC, + 中转站: iconZZZ, + 处理站: iconCLZ, +} + +export const iconFilter = (name) => { + return iconDict[name] +} + +export const personList = [ + { + id: '1', + lon: '114.837249', + lat: '25.746674', + name: '李三春', + location: '江西省赣州市章贡区赣南大道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.83749', '25.74674'], + ['114.837249', '25.74674'], + ['114.83729', '25.74664'] + ] + }, + { + id: '2', + lon: '114.851628', + lat: '25.732745', + name: '石禾', + location: '江西省赣州市章贡区潭口镇938乡道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.851623', '25.795933'], + ['114.8512', '25.795923'], + ['114.85833', '25.79533'] + ] + }, + { + id: '3', + lon: '114.858093', + lat: '25.795923', + name: '罗垇', + location: '江西省赣州市南康区滨江南大道靠近潭东镇解胜村梁明清卫生所', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.858093', '25.795923'], + ['114.858013', '25.795923'], + ['114.858033', '25.795933'] + ] + }, +] +export const carList = [ + { + id: '1', + lon: '114.915698', + lat: '25.784352', + name: '', + location: '江西省赣州市章贡区黄金岭街道仓背岭路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.915198', '25.78432'], + ['114.91568', '25.7843512'], + ['114.91598', '25.7841352'] + ] + }, + { + id: '2', + lon: '114.907709', + lat: '25.780931', + name: '', + location: '江西省赣州市章贡区黄金岭街道玫瑰路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.90709', '25.7801931'], + ['114.9027709', '25.78091'], + ['114.9077109', '25.7820931'] + ] + }, +] diff --git a/src/pages/ywts/cszl/hw/index.vue b/src/pages/ywts/cszl/hw/index.vue index 989a75c..e773b7d 100644 --- a/src/pages/ywts/cszl/hw/index.vue +++ b/src/pages/ywts/cszl/hw/index.vue @@ -1,13 +1,22 @@ @@ -15,21 +24,16 @@ import CommonBtn from "@/components/CommonBtn"; import LayerManagerMix from "@/components/LayerManagerMix"; import TimeManager from "@/components/TimeManager"; +import Pop from './Pop.vue' import { heat } from '@/utils/freedo/heat' -import { clearUpMap, AddLabelPoint } from '@/utils/freedo' -import { - getHeat, - getArea, - getDevList, - getStatistics, - getCasePointList, getCaseInfo -} from "../../../../api/ywts/cszl/gd"; -import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; +import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' +import { AddDivPointHighlight, AddLabel } from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; - +import { getPlacePointList, getOverviewStatistics, getPersonList, getCarList, getCaseList, getCaseInfo } from '@/api/ywts/cszl/hw' +import { iconFilter, iconPerson, personList, carList, iconCar } from './data' export default { name: 'Hw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop }, data() { return { isListPage: false, @@ -45,19 +49,19 @@ }, caseTotal: 0, caseIcon: { - 1: require('@/assets/images/icon/事件/已撤案.png'), - 2: require('@/assets/images/icon/事件/指派中.png'), - 3: require('@/assets/images/icon/事件/处置中.png'), - 4: require('@/assets/images/icon/事件/已办结.png'), - 5: require('@/assets/images/icon/事件/已结案.png'), - }, + 1: require('@/assets/images/icon/事件/已撤案.png'), + 2: require('@/assets/images/icon/事件/指派中.png'), + 3: require('@/assets/images/icon/事件/处置中.png'), + 4: require('@/assets/images/icon/事件/已办结.png'), + 5: require('@/assets/images/icon/事件/已结案.png'), + }, caseColor: { - 1: '#ffffff', - 2: '#fdeb56', - 3: '#85c8ff', - 4: '#ffba74', - 5: '#87f6b3', - }, + 1: '#ffffff', + 2: '#fdeb56', + 3: '#85c8ff', + 4: '#ffba74', + 5: '#87f6b3', + }, time: { startTime: '', endTime: '', @@ -71,125 +75,208 @@ carHover: require('@/assets/images/function/环卫/环卫车辆选中.png'), caseBg: require('@/assets/images/function/物联网/物联事件未选中.png'), caseHover: require('@/assets/images/function/物联网/物联事件选中.png'), - menuTab: [{ - name: '基础设施', - value: 'device' - } - // , { - // name: '环监设备', - // value: 'others' - // } - ], + menuTab: [], menus: { - device: [ - ], + // device: [ + // { type: "1", typename: "****设备", total: "111" }, + // ], // others: [ // {type : "1", typename: "****设备", total: "111"}, // {type : "2", typename: "****设备", total: "111"} // ] - } + }, + markerList: [], + markerListBak: [], + currentSelect: '', + showPop: false, + } }, mounted() { - getStatistics().then(response => { - if(response.code === 200) { - this.menus.device = response.data.value - } - }) - this.search() + clearResetMap() + this.fetchPoint() }, methods: { async btnClick(e) { - clearUpMap() + clearResetMap() this.isListPage = false + this.showPop = false this.selectIndex = e.target.id switch (this.selectIndex) { + case "deviceBtn": + this.fetchPoint() + break + case "personBtn": + this.fetchPerson() + break + case "carBtn": + this.fetchCar() + break case "caseBtn": - this.casePoint() + this.fetchCase() break - case "devBtn": - this.search() - break + // } }, - // 设备图层控制 - layer(item) { - // clearUpMap() - const iconOnline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'在线.png') - const iconOffline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'离线.png') - getDevList({type: item.type}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - AddLabelPoint( - item.id, - '', - item.status === '1'? iconOnline: iconOffline, - [item.lon, item.lat, 0], 'gd-dev', item, - null) - }) + // 获取点位 + fetchPoint() { + this.menuTab = [ + { + name: '基础设施', + value: 'device' } + ] + this.menus = { + device: [ + { + type: '1', typename: '垃圾桶', total: 0, icon: iconFilter('垃圾桶') + }, + { + type: '2', typename: '公厕', total: 0, icon: iconFilter('公厕') + }, + { + type: '3', typename: '中转站', total: 0, icon: iconFilter('中转站') + }, + { + type: '4', typename: '处理站', total: 0, icon: iconFilter('处理站') + }, + ] + } + getPlacePointList({}).then(res => { + console.log(res.data, '点位') + const initData = res.data.value.filter(item => item.id && item.lon && item.lat) + this.menus.device = this.menus.device.map((item) => { + return { + ...item, + children: initData.filter(citem => citem.typename === item.type).map(citem => ({ ...citem, type: item.type, typename: item.typename })), + total: initData.filter(citem => citem.typename === item.type).length + } + }) + console.log(this.menus.device) + this.markerList = [] + this.menus.device.forEach(element => { + this.markerList = [...this.markerList, ...element.children] + }); + this.markerListBak = JSON.parse(JSON.stringify(this.markerList)) + console.log(this.markerList, 'this.markerList') + // 绘制点位 + this.markerList.forEach((item) => { + AddLabelPoint( + item.id, + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'yl-dev', item, + this.clickMarker) + }) }) }, - // 事件点位 - casePoint() { - console.log(this.time) - getCasePointList(this.time).then(response => { - if(response.code === 200) { - clearUpMap() - const data = [] - response.data.value.forEach(item => { - if(!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) { - data.push(item) - } + menuClick(e) { + console.log(e, '123') + clearResetMap() + this.showPop = false + if (this.currentSelect === e.typename) { + // 退出筛选 + this.markerList = this.markerListBak + this.currentSelect = '' + } + else { + this.markerList = this.markerListBak.filter((item) => item.typename === e.typename) + this.currentSelect = e.typename + } + this.markerList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }, + // 点击点位 + clickMarker(eventArg) { + const showPop = (e) => { + const item = e._data.data + this.showPop = true + console.log(this.$refs.popRef) + // this.$nextTick(() => { + // this.$refs.popRef.initData(item) + // }) + setTimeout(() => { + this.$nextTick(() => { + this.$refs.popRef.initData(item) }) - data.forEach(item => { + }, 100); + } + if (this.showPop) { + this.showPop = false + setTimeout(() => { + showPop(eventArg) + }, 100); + } + else { + showPop(eventArg) + } + }, + // 获取人员 + fetchPerson() { + this.menus = {} + this.menuTab = [] + getPersonList({}).then(res => { + console.log(res.data, '人员') + // iconPerson, personList + personList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconPerson, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取车辆 + fetchCar() { + this.menus = {} + this.menuTab = [] + getCarList({}).then(res => { + // console.log(res.data.value, '车辆') + // const typeList = [...new Map(res.data.value.filter(item => item.id && item.lon && item.lat).map(item => item.typename))] + // console.log(typeList, 'typeList') + + carList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconCar, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取事件 + fetchCase() { + getCaseList(this.time).then(res => { + console.log(res.data, '事件') + // this.caseList = res.data.value || [] + // this.caseTotal = this.caseList.length + res.data.value.forEach(item => { AddLabelPoint( - item.id, + item.id.replaceAll('.', ''), '', this.caseIcon[item.status], [item.lon, item.lat, 0], 'gd-case', item, this.clickCase) }) - } }) }, - // 查询工地点位 - search() { - const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') - const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - getArea({}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - // console.log(item.areaboundary) - // todo : 画范围 - AddLabelPoint( - item.id, - item.name, - item.status === '2' ? iconDoing: iconDone, - [item.lon, item.lat, 0], 'gd', item, - this.clickHw) - }) - } - }) - }, - // 智慧工地-工地近1月综合得分 - score() { - getArea({}).then(response => { - if(response.code === 200) { - response.data.value.forEach(item => { - console.log(item.areaboundary) - // todo : 画范围 - }) - } - }) - }, - // 点击事件icon - clickCase(eventArg) { + // 点击事件icon + clickCase(eventArg) { const item = eventArg._data.data // 恢复上一个marker - if(this.preCase !== null ) { + if (this.preCase !== null) { window.mmManager.removeById(this.preCase.id) AddLabelPoint( this.preCase.id, @@ -215,38 +302,29 @@ } this.searchCaseMarkerList() }, - // 事件换页 - changePage(val) { + searchCaseMarkerList() { + getCaseInfo(this.caseListQuery).then(res => { + console.log(res.data, '事件详情') + this.caseList = res.data.value || [] + this.caseTotal = this.caseList.length + }) + }, + // 事件换页 + changePage(val) { if (val && val.page) { this.caseListQuery.pageNo = val.page } this.searchCaseMarkerList() }, - searchCaseMarkerList() { - // getCaseInfo(this.caseListQuery).then(response => { - getCaseInfo(this.caseListQuery).then(response => { - if(response.code === 200) { - console.log(response.data.value) - // 右侧看板 - this.caseList = response.data.value - // todo - // this.caseTotal = response.data.value.length - this.caseTotal = 12 - } - }) - }, - changeState(v) { - this.ktSelect = v - }, handleTimeRange(time) { this.isListPage = false - if(this.time.startTime !== '') { + if (this.time.startTime !== '') { this.time = time - this.casePoint() + this.fetchCase() } else { this.time = time } - } + }, } } diff --git a/src/pages/ywts/ywts.vue b/src/pages/ywts/ywts.vue index d5cbc8b..99a5d69 100644 --- a/src/pages/ywts/ywts.vue +++ b/src/pages/ywts/ywts.vue @@ -33,12 +33,13 @@ import Jxh from "./cszl/jxh"; import Hw from "./cszl/hw"; import Yl from "./zyhj/yl"; +import Hb from "./zyhj/hb"; import Gw from "./cszl/gw"; import Jt from "./cszl/jt"; import Yj from "./cszl/yj"; export default { - components: {Yj, Jt, Gw, Yl, Hw, Jxh, Gd, Jy, FreedoMap, ListInfo, ListPage, CommonFunction, MenuBtn }, + components: {Yj, Jt, Gw, Yl, Hw, Jxh, Gd, Jy,Hb, FreedoMap, ListInfo, ListPage, CommonFunction, MenuBtn }, data() { var pmtsManager return { diff --git a/src/pages/ywts/zyhj/hb/index.vue b/src/pages/ywts/zyhj/hb/index.vue new file mode 100644 index 0000000..84ae2d5 --- /dev/null +++ b/src/pages/ywts/zyhj/hb/index.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/pages/ywts/zyhj/yl/index.vue b/src/pages/ywts/zyhj/yl/index.vue index 674b15c..787d735 100644 --- a/src/pages/ywts/zyhj/yl/index.vue +++ b/src/pages/ywts/zyhj/yl/index.vue @@ -3,7 +3,7 @@
- @@ -14,6 +14,8 @@ v-show="isListPage" @close="isListPage = false" /> + +
@@ -23,6 +25,7 @@ import TimeManager from "@/components/TimeManager"; import YlPop from "./ylPop"; import Pop from './Pop.vue' +import mmPop from './mmPop.vue' import { heat } from '@/utils/freedo/heat' import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' // import { @@ -34,18 +37,19 @@ // } from "../../../../api/ywts/cszl/gd"; import { getPointList } from '@/api/ywts/zyhj/yl' import { AddDivPointHighlight, AddLabel } from "../../../../utils/freedo"; -import { getDevice, getCaseList, getCaseInfo } from '@/api/ywts/zyhj/yl' +import { getDevice, getCaseList, getCaseInfo, getseedlingList } from '@/api/ywts/zyhj/yl' import { iconFilter } from './data' import ListPage from "@/components/ListPage"; export default { name: 'Yl', - components: { YlPop, TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop }, + components: { YlPop, TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop, mmPop }, data() { return { isListPage: false, ktSelect: '', isShow: false, + isShowMM: false, selectIndex: 'ylBtn', currentSelect: '', caseList: [], @@ -124,6 +128,7 @@ this.isListPage = false this.isShow = false this.showPop = false + this.isShowMM = false this.selectIndex = e.target.id switch (this.selectIndex) { case "caseBtn": @@ -369,6 +374,29 @@ ) }) }) + getseedlingList({}).then(res => { + console.log('苗木', res.data) + const initData = res.data.value.filter(item => item.id && item.lon && item.lat) + console.log(initData, 'initData') + initData.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + item.name, + undefined, + [item.lon, item.lat, 0], 'gd', item, + this.clickMM + ) + }) + + }) + }, + // 点击苗木 + clickMM(eventArg) { + const item = eventArg._data.data + this.isShowMM = true + this.$nextTick(() => { + this.$refs.mmpop.initData(item) + }) } } } diff --git a/src/pages/ywts/zyhj/yl/mmPop.vue b/src/pages/ywts/zyhj/yl/mmPop.vue new file mode 100644 index 0000000..1ad9bc2 --- /dev/null +++ b/src/pages/ywts/zyhj/yl/mmPop.vue @@ -0,0 +1,272 @@ + + + + + diff --git a/src/api/ywts/cszl/hw.js b/src/api/ywts/cszl/hw.js new file mode 100644 index 0000000..4051710 --- /dev/null +++ b/src/api/ywts/cszl/hw.js @@ -0,0 +1,53 @@ +/** + * 环卫接口 + */ +import request from '@/utils/request' + +// 场所点位列表 +export function getPlacePointList(data) { + return request({ + url: 'zhhw-gktj/zhhw/csdwlb', + method: 'post', + data, + }) +} +// 概括统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhw-gktj/zhhw/gktj', + method: 'post', + data, + }) +} +// 环保人员 +export function getPersonList(data) { + return request({ + url: 'zhhw-gktj/zhhw/rydwlb', + method: 'post', + data, + }) +} +// 车辆 +export function getCarList(data) { + return request({ + url: 'zhhw-gktj/zhhw/cldwlb', + method: 'post', + data, + }) +} +// 环卫事件 +export function getCaseList(data) { + return request({ + url: 'zhhw-gktj/zhhw/sjdwlb', + method: 'post', + data, + }) +} +// 事件详情 +export function getCaseInfo(data) { + return request({ + url: 'zhhw-gktj/zhhw/hwsjxq', + method: 'post', + data, + }) +} diff --git a/src/api/ywts/zyhj/hb.js b/src/api/ywts/zyhj/hb.js new file mode 100644 index 0000000..5e598d1 --- /dev/null +++ b/src/api/ywts/zyhj/hb.js @@ -0,0 +1,21 @@ +/** + * 资源环境-环保接口 + */ +import request from '@/utils/request' + +// 概况统计 +export function getOverviewStatistics(data) { + return request({ + url: 'zhhb-gktj/zhhb/gktj', + method: 'post', + data + }) +} +// 环保点位列表 +export function getPointList(data) { + return request({ + url: 'zhhb-gktj/zhhb/hbdwlb', + method: 'post', + data + }) +} diff --git a/src/api/ywts/zyhj/yl.js b/src/api/ywts/zyhj/yl.js index 530fdf8..63d7ad2 100644 --- a/src/api/ywts/zyhj/yl.js +++ b/src/api/ywts/zyhj/yl.js @@ -90,3 +90,11 @@ data, }) } +// 苗木点位列表 +export function getseedlingList(data) { + return request({ + url: 'zhyl-gktjljk/zhyl/mmdwlb', + method: 'post', + data, + }) +} diff --git "a/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" new file mode 100644 index 0000000..a20d586 --- /dev/null +++ "b/src/assets/images/icon/\347\216\257\345\215\253/\350\275\246\350\276\206.png" Binary files differ diff --git "a/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" new file mode 100644 index 0000000..c59e09b --- /dev/null +++ "b/src/assets/images/layerControl/\344\270\255\350\275\254\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\205\254\345\216\225.png" "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" new file mode 100644 index 0000000..da79403 --- /dev/null +++ "b/src/assets/images/layerControl/\345\205\254\345\216\225.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" new file mode 100644 index 0000000..56e1168 --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\345\244\204\347\220\206\347\253\231.png" Binary files differ diff --git "a/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" new file mode 100644 index 0000000..40381bf --- /dev/null +++ "b/src/assets/images/layerControl/\345\236\203\345\234\276\346\241\266.png" Binary files differ diff --git a/src/pages/ywts/cszl/hw/Pop.vue b/src/pages/ywts/cszl/hw/Pop.vue new file mode 100644 index 0000000..a89fe10 --- /dev/null +++ b/src/pages/ywts/cszl/hw/Pop.vue @@ -0,0 +1,323 @@ + + + + + diff --git a/src/pages/ywts/cszl/hw/data.js b/src/pages/ywts/cszl/hw/data.js new file mode 100644 index 0000000..93c4970 --- /dev/null +++ b/src/pages/ywts/cszl/hw/data.js @@ -0,0 +1,106 @@ +const iconLJT= require('@/assets/images/layerControl/垃圾桶.png') +const iconGC= require('@/assets/images/layerControl/垃圾桶.png') +const iconZZZ= require('@/assets/images/layerControl/中转站.png') +const iconCLZ= require('@/assets/images/layerControl/垃圾处理站.png') +export const iconPerson = require('@/assets/images/icon/应急/人员/专家.png') +export const iconCar = require('@/assets/images/icon/环卫/车辆.png') +export const iconDict = { + 垃圾桶: iconLJT, + 公厕: iconGC, + 中转站: iconZZZ, + 处理站: iconCLZ, +} + +export const iconFilter = (name) => { + return iconDict[name] +} + +export const personList = [ + { + id: '1', + lon: '114.837249', + lat: '25.746674', + name: '李三春', + location: '江西省赣州市章贡区赣南大道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.83749', '25.74674'], + ['114.837249', '25.74674'], + ['114.83729', '25.74664'] + ] + }, + { + id: '2', + lon: '114.851628', + lat: '25.732745', + name: '石禾', + location: '江西省赣州市章贡区潭口镇938乡道', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.851623', '25.795933'], + ['114.8512', '25.795923'], + ['114.85833', '25.79533'] + ] + }, + { + id: '3', + lon: '114.858093', + lat: '25.795923', + name: '罗垇', + location: '江西省赣州市南康区滨江南大道靠近潭东镇解胜村梁明清卫生所', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '保洁员', + trajectory: [ + ['114.858093', '25.795923'], + ['114.858013', '25.795923'], + ['114.858033', '25.795933'] + ] + }, +] +export const carList = [ + { + id: '1', + lon: '114.915698', + lat: '25.784352', + name: '', + location: '江西省赣州市章贡区黄金岭街道仓背岭路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.915198', '25.78432'], + ['114.91568', '25.7843512'], + ['114.91598', '25.7841352'] + ] + }, + { + id: '2', + lon: '114.907709', + lat: '25.780931', + name: '', + location: '江西省赣州市章贡区黄金岭街道玫瑰路', + time: '', + status: '', + statusName: '', + type: '1', + typeName: '洒水车', + trajectory: [ + ['114.90709', '25.7801931'], + ['114.9027709', '25.78091'], + ['114.9077109', '25.7820931'] + ] + }, +] diff --git a/src/pages/ywts/cszl/hw/index.vue b/src/pages/ywts/cszl/hw/index.vue index 989a75c..e773b7d 100644 --- a/src/pages/ywts/cszl/hw/index.vue +++ b/src/pages/ywts/cszl/hw/index.vue @@ -1,13 +1,22 @@ @@ -15,21 +24,16 @@ import CommonBtn from "@/components/CommonBtn"; import LayerManagerMix from "@/components/LayerManagerMix"; import TimeManager from "@/components/TimeManager"; +import Pop from './Pop.vue' import { heat } from '@/utils/freedo/heat' -import { clearUpMap, AddLabelPoint } from '@/utils/freedo' -import { - getHeat, - getArea, - getDevList, - getStatistics, - getCasePointList, getCaseInfo -} from "../../../../api/ywts/cszl/gd"; -import {AddDivPointHighlight, AddLabel} from "../../../../utils/freedo"; +import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' +import { AddDivPointHighlight, AddLabel } from "../../../../utils/freedo"; import ListPage from "@/components/ListPage"; - +import { getPlacePointList, getOverviewStatistics, getPersonList, getCarList, getCaseList, getCaseInfo } from '@/api/ywts/cszl/hw' +import { iconFilter, iconPerson, personList, carList, iconCar } from './data' export default { name: 'Hw', - components: { TimeManager, LayerManagerMix, ListPage, CommonBtn }, + components: { TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop }, data() { return { isListPage: false, @@ -45,19 +49,19 @@ }, caseTotal: 0, caseIcon: { - 1: require('@/assets/images/icon/事件/已撤案.png'), - 2: require('@/assets/images/icon/事件/指派中.png'), - 3: require('@/assets/images/icon/事件/处置中.png'), - 4: require('@/assets/images/icon/事件/已办结.png'), - 5: require('@/assets/images/icon/事件/已结案.png'), - }, + 1: require('@/assets/images/icon/事件/已撤案.png'), + 2: require('@/assets/images/icon/事件/指派中.png'), + 3: require('@/assets/images/icon/事件/处置中.png'), + 4: require('@/assets/images/icon/事件/已办结.png'), + 5: require('@/assets/images/icon/事件/已结案.png'), + }, caseColor: { - 1: '#ffffff', - 2: '#fdeb56', - 3: '#85c8ff', - 4: '#ffba74', - 5: '#87f6b3', - }, + 1: '#ffffff', + 2: '#fdeb56', + 3: '#85c8ff', + 4: '#ffba74', + 5: '#87f6b3', + }, time: { startTime: '', endTime: '', @@ -71,125 +75,208 @@ carHover: require('@/assets/images/function/环卫/环卫车辆选中.png'), caseBg: require('@/assets/images/function/物联网/物联事件未选中.png'), caseHover: require('@/assets/images/function/物联网/物联事件选中.png'), - menuTab: [{ - name: '基础设施', - value: 'device' - } - // , { - // name: '环监设备', - // value: 'others' - // } - ], + menuTab: [], menus: { - device: [ - ], + // device: [ + // { type: "1", typename: "****设备", total: "111" }, + // ], // others: [ // {type : "1", typename: "****设备", total: "111"}, // {type : "2", typename: "****设备", total: "111"} // ] - } + }, + markerList: [], + markerListBak: [], + currentSelect: '', + showPop: false, + } }, mounted() { - getStatistics().then(response => { - if(response.code === 200) { - this.menus.device = response.data.value - } - }) - this.search() + clearResetMap() + this.fetchPoint() }, methods: { async btnClick(e) { - clearUpMap() + clearResetMap() this.isListPage = false + this.showPop = false this.selectIndex = e.target.id switch (this.selectIndex) { + case "deviceBtn": + this.fetchPoint() + break + case "personBtn": + this.fetchPerson() + break + case "carBtn": + this.fetchCar() + break case "caseBtn": - this.casePoint() + this.fetchCase() break - case "devBtn": - this.search() - break + // } }, - // 设备图层控制 - layer(item) { - // clearUpMap() - const iconOnline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'在线.png') - const iconOffline = require('@/assets/images/icon/工地地图点位/'+item.typename.replace(/ /g,'')+'离线.png') - getDevList({type: item.type}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - AddLabelPoint( - item.id, - '', - item.status === '1'? iconOnline: iconOffline, - [item.lon, item.lat, 0], 'gd-dev', item, - null) - }) + // 获取点位 + fetchPoint() { + this.menuTab = [ + { + name: '基础设施', + value: 'device' } + ] + this.menus = { + device: [ + { + type: '1', typename: '垃圾桶', total: 0, icon: iconFilter('垃圾桶') + }, + { + type: '2', typename: '公厕', total: 0, icon: iconFilter('公厕') + }, + { + type: '3', typename: '中转站', total: 0, icon: iconFilter('中转站') + }, + { + type: '4', typename: '处理站', total: 0, icon: iconFilter('处理站') + }, + ] + } + getPlacePointList({}).then(res => { + console.log(res.data, '点位') + const initData = res.data.value.filter(item => item.id && item.lon && item.lat) + this.menus.device = this.menus.device.map((item) => { + return { + ...item, + children: initData.filter(citem => citem.typename === item.type).map(citem => ({ ...citem, type: item.type, typename: item.typename })), + total: initData.filter(citem => citem.typename === item.type).length + } + }) + console.log(this.menus.device) + this.markerList = [] + this.menus.device.forEach(element => { + this.markerList = [...this.markerList, ...element.children] + }); + this.markerListBak = JSON.parse(JSON.stringify(this.markerList)) + console.log(this.markerList, 'this.markerList') + // 绘制点位 + this.markerList.forEach((item) => { + AddLabelPoint( + item.id, + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'yl-dev', item, + this.clickMarker) + }) }) }, - // 事件点位 - casePoint() { - console.log(this.time) - getCasePointList(this.time).then(response => { - if(response.code === 200) { - clearUpMap() - const data = [] - response.data.value.forEach(item => { - if(!data.map(da => da.id).includes(item.id) && !data.map(da => da.lon).includes(item.lon) && item.id !== null) { - data.push(item) - } + menuClick(e) { + console.log(e, '123') + clearResetMap() + this.showPop = false + if (this.currentSelect === e.typename) { + // 退出筛选 + this.markerList = this.markerListBak + this.currentSelect = '' + } + else { + this.markerList = this.markerListBak.filter((item) => item.typename === e.typename) + this.currentSelect = e.typename + } + this.markerList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}-${item.typename}`, + iconFilter(item.typename), + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }, + // 点击点位 + clickMarker(eventArg) { + const showPop = (e) => { + const item = e._data.data + this.showPop = true + console.log(this.$refs.popRef) + // this.$nextTick(() => { + // this.$refs.popRef.initData(item) + // }) + setTimeout(() => { + this.$nextTick(() => { + this.$refs.popRef.initData(item) }) - data.forEach(item => { + }, 100); + } + if (this.showPop) { + this.showPop = false + setTimeout(() => { + showPop(eventArg) + }, 100); + } + else { + showPop(eventArg) + } + }, + // 获取人员 + fetchPerson() { + this.menus = {} + this.menuTab = [] + getPersonList({}).then(res => { + console.log(res.data, '人员') + // iconPerson, personList + personList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconPerson, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取车辆 + fetchCar() { + this.menus = {} + this.menuTab = [] + getCarList({}).then(res => { + // console.log(res.data.value, '车辆') + // const typeList = [...new Map(res.data.value.filter(item => item.id && item.lon && item.lat).map(item => item.typename))] + // console.log(typeList, 'typeList') + + carList.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + `${item.name}`, + iconCar, + [item.lon, item.lat, 0], 'gd', item, + this.clickMarker + ) + }) + }) + }, + // 获取事件 + fetchCase() { + getCaseList(this.time).then(res => { + console.log(res.data, '事件') + // this.caseList = res.data.value || [] + // this.caseTotal = this.caseList.length + res.data.value.forEach(item => { AddLabelPoint( - item.id, + item.id.replaceAll('.', ''), '', this.caseIcon[item.status], [item.lon, item.lat, 0], 'gd-case', item, this.clickCase) }) - } }) }, - // 查询工地点位 - search() { - const iconDone = require('@/assets/images/icon/工地地图点位/工地已完成.png') - const iconDoing = require('@/assets/images/icon/工地地图点位/工地进行中.png') - getArea({}).then(response => { - if(response.code === 200) { - clearUpMap() - response.data.value.forEach(item => { - // console.log(item.areaboundary) - // todo : 画范围 - AddLabelPoint( - item.id, - item.name, - item.status === '2' ? iconDoing: iconDone, - [item.lon, item.lat, 0], 'gd', item, - this.clickHw) - }) - } - }) - }, - // 智慧工地-工地近1月综合得分 - score() { - getArea({}).then(response => { - if(response.code === 200) { - response.data.value.forEach(item => { - console.log(item.areaboundary) - // todo : 画范围 - }) - } - }) - }, - // 点击事件icon - clickCase(eventArg) { + // 点击事件icon + clickCase(eventArg) { const item = eventArg._data.data // 恢复上一个marker - if(this.preCase !== null ) { + if (this.preCase !== null) { window.mmManager.removeById(this.preCase.id) AddLabelPoint( this.preCase.id, @@ -215,38 +302,29 @@ } this.searchCaseMarkerList() }, - // 事件换页 - changePage(val) { + searchCaseMarkerList() { + getCaseInfo(this.caseListQuery).then(res => { + console.log(res.data, '事件详情') + this.caseList = res.data.value || [] + this.caseTotal = this.caseList.length + }) + }, + // 事件换页 + changePage(val) { if (val && val.page) { this.caseListQuery.pageNo = val.page } this.searchCaseMarkerList() }, - searchCaseMarkerList() { - // getCaseInfo(this.caseListQuery).then(response => { - getCaseInfo(this.caseListQuery).then(response => { - if(response.code === 200) { - console.log(response.data.value) - // 右侧看板 - this.caseList = response.data.value - // todo - // this.caseTotal = response.data.value.length - this.caseTotal = 12 - } - }) - }, - changeState(v) { - this.ktSelect = v - }, handleTimeRange(time) { this.isListPage = false - if(this.time.startTime !== '') { + if (this.time.startTime !== '') { this.time = time - this.casePoint() + this.fetchCase() } else { this.time = time } - } + }, } } diff --git a/src/pages/ywts/ywts.vue b/src/pages/ywts/ywts.vue index d5cbc8b..99a5d69 100644 --- a/src/pages/ywts/ywts.vue +++ b/src/pages/ywts/ywts.vue @@ -33,12 +33,13 @@ import Jxh from "./cszl/jxh"; import Hw from "./cszl/hw"; import Yl from "./zyhj/yl"; +import Hb from "./zyhj/hb"; import Gw from "./cszl/gw"; import Jt from "./cszl/jt"; import Yj from "./cszl/yj"; export default { - components: {Yj, Jt, Gw, Yl, Hw, Jxh, Gd, Jy, FreedoMap, ListInfo, ListPage, CommonFunction, MenuBtn }, + components: {Yj, Jt, Gw, Yl, Hw, Jxh, Gd, Jy,Hb, FreedoMap, ListInfo, ListPage, CommonFunction, MenuBtn }, data() { var pmtsManager return { diff --git a/src/pages/ywts/zyhj/hb/index.vue b/src/pages/ywts/zyhj/hb/index.vue new file mode 100644 index 0000000..84ae2d5 --- /dev/null +++ b/src/pages/ywts/zyhj/hb/index.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/pages/ywts/zyhj/yl/index.vue b/src/pages/ywts/zyhj/yl/index.vue index 674b15c..787d735 100644 --- a/src/pages/ywts/zyhj/yl/index.vue +++ b/src/pages/ywts/zyhj/yl/index.vue @@ -3,7 +3,7 @@
- @@ -14,6 +14,8 @@ v-show="isListPage" @close="isListPage = false" /> + +
@@ -23,6 +25,7 @@ import TimeManager from "@/components/TimeManager"; import YlPop from "./ylPop"; import Pop from './Pop.vue' +import mmPop from './mmPop.vue' import { heat } from '@/utils/freedo/heat' import { clearUpMap, clearResetMap, AddLabelPoint } from '@/utils/freedo' // import { @@ -34,18 +37,19 @@ // } from "../../../../api/ywts/cszl/gd"; import { getPointList } from '@/api/ywts/zyhj/yl' import { AddDivPointHighlight, AddLabel } from "../../../../utils/freedo"; -import { getDevice, getCaseList, getCaseInfo } from '@/api/ywts/zyhj/yl' +import { getDevice, getCaseList, getCaseInfo, getseedlingList } from '@/api/ywts/zyhj/yl' import { iconFilter } from './data' import ListPage from "@/components/ListPage"; export default { name: 'Yl', - components: { YlPop, TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop }, + components: { YlPop, TimeManager, LayerManagerMix, ListPage, CommonBtn, Pop, mmPop }, data() { return { isListPage: false, ktSelect: '', isShow: false, + isShowMM: false, selectIndex: 'ylBtn', currentSelect: '', caseList: [], @@ -124,6 +128,7 @@ this.isListPage = false this.isShow = false this.showPop = false + this.isShowMM = false this.selectIndex = e.target.id switch (this.selectIndex) { case "caseBtn": @@ -369,6 +374,29 @@ ) }) }) + getseedlingList({}).then(res => { + console.log('苗木', res.data) + const initData = res.data.value.filter(item => item.id && item.lon && item.lat) + console.log(initData, 'initData') + initData.forEach(item => { + AddLabelPoint( + item.id || new Date().getTime(), + item.name, + undefined, + [item.lon, item.lat, 0], 'gd', item, + this.clickMM + ) + }) + + }) + }, + // 点击苗木 + clickMM(eventArg) { + const item = eventArg._data.data + this.isShowMM = true + this.$nextTick(() => { + this.$refs.mmpop.initData(item) + }) } } } diff --git a/src/pages/ywts/zyhj/yl/mmPop.vue b/src/pages/ywts/zyhj/yl/mmPop.vue new file mode 100644 index 0000000..1ad9bc2 --- /dev/null +++ b/src/pages/ywts/zyhj/yl/mmPop.vue @@ -0,0 +1,272 @@ + + + + + diff --git a/src/utils/freedo/index.js b/src/utils/freedo/index.js index 334bb54..7488999 100644 --- a/src/utils/freedo/index.js +++ b/src/utils/freedo/index.js @@ -269,3 +269,27 @@ }); return } +export function AddPolygonLine(positions, color, callback, id) { + console.log(positions, 'positions') + window.mmManager.add('Line', { + // id: item.id, + pts: [positions], + lineColor: [255, 255, 255, 1] + // pts: positions, + // // fillColor: color, // 面颜色 + // // outline: true, // 是否显示边线 + // // outlineColor: [255, 255, 255, 1], // 边线颜色 + // // lineWidth: 2.0, // 边线宽度 + // clampToGround: true, //是否贴地显示 + // pointOption: { + // show: true, //点显示与否 + // }, + // data: { + // pop: true, + // callback: callback, + // id, + // }, + // maxDistance: 5000000 + }); + return +}