Commit 3502868d authored by 华国豪's avatar 华国豪 🙄

1

parent 52bcf556
var BMapLib=window.BMapLib=BMapLib||{};(function(){BMapLib.CurveLine=CurveLine;function CurveLine(points,opts){var self=this;var curvePoints=getCurvePoints(points);var polyline=new BMap.Polyline(curvePoints,opts);polyline.addEventListener("lineupdate",function(){if(this.isEditing){this.enableEditing()}});polyline.cornerPoints=points;polyline.editMarkers=[];polyline.enableEditing=function(){var self=this;if(self.map){self.disableEditing();for(var i=0;i<self.cornerPoints.length;i++){var marker=new BMap.Marker(self.cornerPoints[i],{icon:new BMap.Icon("http://api.map.baidu.com/library/CurveLine/1.5/src/circle.png",new BMap.Size(16,16)),enableDragging:true,raiseOnDrag:true});marker.addEventListener("dragend",function(){self.cornerPoints.length=0;for(var i=0;i<self.editMarkers.length;i++){self.cornerPoints.push(self.editMarkers[i].getPosition())}var curvePoints=getCurvePoints(self.cornerPoints);self.setPath(curvePoints)});marker.index=i;self.editMarkers.push(marker);self.map.addOverlay(marker)}}self.isEditing=true};polyline.disableEditing=function(){this.isEditing=false;for(var i=0;i<this.editMarkers.length;i++){this.map.removeOverlay(this.editMarkers[i]);this.editMarkers[i]=null}this.editMarkers.length=0};polyline.getPath=function(){return curvePoints};return polyline}function extend(child,parent){for(var p in parent){if(parent.hasOwnProperty(p)){child[p]=parent[p]}}return child}function getCurvePoints(points){var curvePoints=[];for(var i=0;i<points.length-1;i++){var p=getCurveByTwoPoints(points[i],points[i+1]);if(p&&p.length>0){curvePoints=curvePoints.concat(p)}}return curvePoints}function getCurveByTwoPoints(obj1,obj2){if(!obj1||!obj2||!(obj1 instanceof BMap.Point)||!(obj2 instanceof BMap.Point)){return null}var B1=function(x){return 1-2*x+x*x};var B2=function(x){return 2*x-2*x*x};var B3=function(x){return x*x};curveCoordinates=[];var count=30;var isFuture=false;var t,h,h2,lat3,lng3,j,t2;var LnArray=[];var i=0;var inc=0;if(typeof(obj2)=="undefined"){if(typeof(curveCoordinates)!="undefined"){curveCoordinates=[]}return}var lat1=parseFloat(obj1.lat);var lat2=parseFloat(obj2.lat);var lng1=parseFloat(obj1.lng);var lng2=parseFloat(obj2.lng);if(lng2>lng1){if(parseFloat(lng2-lng1)>180){if(lng1<0){lng1=parseFloat(180+180+lng1)}}}if(lng1>lng2){if(parseFloat(lng1-lng2)>180){if(lng2<0){lng2=parseFloat(180+180+lng2)}}}j=0;t2=0;if(lat2==lat1){t=0;h=lng1-lng2}else{if(lng2==lng1){t=Math.PI/2;h=lat1-lat2}else{t=Math.atan((lat2-lat1)/(lng2-lng1));h=(lat2-lat1)/Math.sin(t)}}if(t2==0){t2=(t+(Math.PI/5))}h2=h/2;lng3=h2*Math.cos(t2)+lng1;lat3=h2*Math.sin(t2)+lat1;for(i=0;i<count+1;i++){curveCoordinates.push(new BMap.Point((lng1*B1(inc)+lng3*B2(inc))+lng2*B3(inc),(lat1*B1(inc)+lat3*B2(inc)+lat2*B3(inc))));inc=inc+(1/count)}return curveCoordinates}})();
\ No newline at end of file
/**
* @fileoverview MarkerClusterer标记聚合器用来解决加载大量点要素到地图上产生覆盖现象的问题,并提高性能。
* 主入口类是<a href="symbols/BMapLib.MarkerClusterer.html">MarkerClusterer</a>,
* 基于Baidu Map API 1.2。
*
* @author Baidu Map Api Group
* @version 1.2
*/
/**
* @namespace BMap的所有library类均放在BMapLib命名空间下
*/
var BMapLib = window.BMapLib = BMapLib || {};
(function(){
/**
* 获取一个扩展的视图范围,把上下左右都扩大一样的像素值。
* @param {Map} map BMap.Map的实例化对象
* @param {BMap.Bounds} bounds BMap.Bounds的实例化对象
* @param {Number} gridSize 要扩大的像素值
*
* @return {BMap.Bounds} 返回扩大后的视图范围。
*/
var getExtendedBounds = function(map, bounds, gridSize){
bounds = cutBoundsInRange(bounds);
var pixelNE = map.pointToPixel(bounds.getNorthEast());
var pixelSW = map.pointToPixel(bounds.getSouthWest());
pixelNE.x += gridSize;
pixelNE.y -= gridSize;
pixelSW.x -= gridSize;
pixelSW.y += gridSize;
var newNE = map.pixelToPoint(pixelNE);
var newSW = map.pixelToPoint(pixelSW);
return new BMap.Bounds(newSW, newNE);
};
/**
* 按照百度地图支持的世界范围对bounds进行边界处理
* @param {BMap.Bounds} bounds BMap.Bounds的实例化对象
*
* @return {BMap.Bounds} 返回不越界的视图范围
*/
var cutBoundsInRange = function (bounds) {
var maxX = getRange(bounds.getNorthEast().lng, -180, 180);
var minX = getRange(bounds.getSouthWest().lng, -180, 180);
var maxY = getRange(bounds.getNorthEast().lat, -74, 74);
var minY = getRange(bounds.getSouthWest().lat, -74, 74);
return new BMap.Bounds(new BMap.Point(minX, minY), new BMap.Point(maxX, maxY));
};
/**
* 对单个值进行边界处理。
* @param {Number} i 要处理的数值
* @param {Number} min 下边界值
* @param {Number} max 上边界值
*
* @return {Number} 返回不越界的数值
*/
var getRange = function (i, mix, max) {
mix && (i = Math.max(i, mix));
max && (i = Math.min(i, max));
return i;
};
/**
* 判断给定的对象是否为数组
* @param {Object} source 要测试的对象
*
* @return {Boolean} 如果是数组返回true,否则返回false
*/
var isArray = function (source) {
return '[object Array]' === Object.prototype.toString.call(source);
};
/**
* 返回item在source中的索引位置
* @param {Object} item 要测试的对象
* @param {Array} source 数组
*
* @return {Number} 如果在数组内,返回索引,否则返回-1
*/
var indexOf = function(item, source){
var index = -1;
if(isArray(source)){
if (source.indexOf) {
index = source.indexOf(item);
} else {
for (var i = 0, m; m = source[i]; i++) {
if (m === item) {
index = i;
break;
}
}
}
}
return index;
};
/**
*@exports MarkerClusterer as BMapLib.MarkerClusterer
*/
var MarkerClusterer =
/**
* MarkerClusterer
* @class 用来解决加载大量点要素到地图上产生覆盖现象的问题,并提高性能
* @constructor
* @param {Map} map 地图的一个实例。
* @param {Json Object} options 可选参数,可选项包括:<br />
* markers {Array<Marker>} 要聚合的标记数组<br />
* girdSize {Number} 聚合计算时网格的像素大小,默认60<br />
* maxZoom {Number} 最大的聚合级别,大于该级别就不进行相应的聚合<br />
* minClusterSize {Number} 最小的聚合数量,小于该数量的不能成为一个聚合,默认为2<br />
* isAverangeCenter {Boolean} 聚合点的落脚位置是否是所有聚合在内点的平均值,默认为否,落脚在聚合内的第一个点<br />
* styles {Array<IconStyle>} 自定义聚合后的图标风格,请参考TextIconOverlay类<br />
*/
BMapLib.MarkerClusterer = function(map, options){
if (!map){
return;
}
this._map = map;
this._markers = [];
this._clusters = [];
var opts = options || {};
this._gridSize = opts["gridSize"] || 60;
this._maxZoom = opts["maxZoom"] || 18;
this._minClusterSize = opts["minClusterSize"] || 2;
this._isAverageCenter = false;
if (opts['isAverageCenter'] != undefined) {
this._isAverageCenter = opts['isAverageCenter'];
}
this._styles = opts["styles"] || [];
var that = this;
this._map.addEventListener("zoomend",function(){
that._redraw();
});
this._map.addEventListener("moveend",function(){
that._redraw();
});
var mkrs = opts["markers"];
isArray(mkrs) && this.addMarkers(mkrs);
};
/**
* 添加要聚合的标记数组。
* @param {Array<Marker>} markers 要聚合的标记数组
*
* @return 无返回值。
*/
MarkerClusterer.prototype.addMarkers = function(markers){
for(var i = 0, len = markers.length; i <len ; i++){
this._pushMarkerTo(markers[i]);
}
this._createClusters();
};
/**
* 把一个标记添加到要聚合的标记数组中
* @param {BMap.Marker} marker 要添加的标记
*
* @return 无返回值。
*/
MarkerClusterer.prototype._pushMarkerTo = function(marker){
var index = indexOf(marker, this._markers);
if(index === -1){
marker.isInCluster = false;
this._markers.push(marker);//Marker拖放后enableDragging不做变化,忽略
}
};
/**
* 添加一个聚合的标记。
* @param {BMap.Marker} marker 要聚合的单个标记。
* @return 无返回值。
*/
MarkerClusterer.prototype.addMarker = function(marker) {
this._pushMarkerTo(marker);
this._createClusters();
};
/**
* 根据所给定的标记,创建聚合点,并且遍历所有聚合点
* @return 无返回值
*/
MarkerClusterer.prototype._createClusters = function(){
var mapBounds = this._map.getBounds();
var extendedBounds = getExtendedBounds(this._map, mapBounds, this._gridSize);
for(var i = 0, marker; marker = this._markers[i]; i++){
if(!marker.isInCluster && extendedBounds.containsPoint(marker.getPosition()) ){
this._addToClosestCluster(marker);
}
}
var len = this._markers.length;
for (var i = 0; i < len; i++) {
if(this._clusters[i]){
this._clusters[i].render();
}
}
};
/**
* 根据标记的位置,把它添加到最近的聚合中
* @param {BMap.Marker} marker 要进行聚合的单个标记
*
* @return 无返回值。
*/
MarkerClusterer.prototype._addToClosestCluster = function (marker){
var distance = 4000000;
var clusterToAddTo = null;
var position = marker.getPosition();
for(var i = 0, cluster; cluster = this._clusters[i]; i++){
var center = cluster.getCenter();
if(center){
var d = this._map.getDistance(center, marker.getPosition());
if(d < distance){
distance = d;
clusterToAddTo = cluster;
}
}
}
if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)){
clusterToAddTo.addMarker(marker);
} else {
var cluster = new Cluster(this);
cluster.addMarker(marker);
this._clusters.push(cluster);
}
};
/**
* 清除上一次的聚合的结果
* @return 无返回值。
*/
MarkerClusterer.prototype._clearLastClusters = function(){
for(var i = 0, cluster; cluster = this._clusters[i]; i++){
cluster.remove();
}
this._clusters = [];//置空Cluster数组
this._removeMarkersFromCluster();//把Marker的cluster标记设为false
};
/**
* 清除某个聚合中的所有标记
* @return 无返回值
*/
MarkerClusterer.prototype._removeMarkersFromCluster = function(){
for(var i = 0, marker; marker = this._markers[i]; i++){
marker.isInCluster = false;
}
};
/**
* 把所有的标记从地图上清除
* @return 无返回值
*/
MarkerClusterer.prototype._removeMarkersFromMap = function(){
for(var i = 0, marker; marker = this._markers[i]; i++){
marker.isInCluster = false;
tmplabel = marker.getLabel();
this._map.removeOverlay(marker);
marker.setLabel(tmplabel);
}
};
/**
* 删除单个标记
* @param {BMap.Marker} marker 需要被删除的marker
*
* @return {Boolean} 删除成功返回true,否则返回false
*/
MarkerClusterer.prototype._removeMarker = function(marker) {
var index = indexOf(marker, this._markers);
if (index === -1) {
return false;
}
tmplabel = marker.getLabel();
this._map.removeOverlay(marker);
marker.setLabel(tmplabel);
this._markers.splice(index, 1);
return true;
};
/**
* 删除单个标记
* @param {BMap.Marker} marker 需要被删除的marker
*
* @return {Boolean} 删除成功返回true,否则返回false
*/
MarkerClusterer.prototype.removeMarker = function(marker) {
var success = this._removeMarker(marker);
if (success) {
this._clearLastClusters();
this._createClusters();
}
return success;
};
/**
* 删除一组标记
* @param {Array<BMap.Marker>} markers 需要被删除的marker数组
*
* @return {Boolean} 删除成功返回true,否则返回false
*/
MarkerClusterer.prototype.removeMarkers = function(markers) {
var success = false;
for (var i = 0; i < markers.length; i++) {
var r = this._removeMarker(markers[i]);
success = success || r;
}
if (success) {
this._clearLastClusters();
this._createClusters();
}
return success;
};
/**
* 从地图上彻底清除所有的标记
* @return 无返回值
*/
MarkerClusterer.prototype.clearMarkers = function() {
this._clearLastClusters();
this._removeMarkersFromMap();
this._markers = [];
};
/**
* 重新生成,比如改变了属性等
* @return 无返回值
*/
MarkerClusterer.prototype._redraw = function () {
this._clearLastClusters();
this._createClusters();
};
/**
* 获取网格大小
* @return {Number} 网格大小
*/
MarkerClusterer.prototype.getGridSize = function() {
return this._gridSize;
};
/**
* 设置网格大小
* @param {Number} size 网格大小
* @return 无返回值
*/
MarkerClusterer.prototype.setGridSize = function(size) {
this._gridSize = size;
this._redraw();
};
/**
* 获取聚合的最大缩放级别。
* @return {Number} 聚合的最大缩放级别。
*/
MarkerClusterer.prototype.getMaxZoom = function() {
return this._maxZoom;
};
/**
* 设置聚合的最大缩放级别
* @param {Number} maxZoom 聚合的最大缩放级别
* @return 无返回值
*/
MarkerClusterer.prototype.setMaxZoom = function(maxZoom) {
this._maxZoom = maxZoom;
this._redraw();
};
/**
* 获取聚合的样式风格集合
* @return {Array<IconStyle>} 聚合的样式风格集合
*/
MarkerClusterer.prototype.getStyles = function() {
return this._styles;
};
/**
* 设置聚合的样式风格集合
* @param {Array<IconStyle>} styles 样式风格数组
* @return 无返回值
*/
MarkerClusterer.prototype.setStyles = function(styles) {
this._styles = styles;
this._redraw();
};
/**
* 获取单个聚合的最小数量。
* @return {Number} 单个聚合的最小数量。
*/
MarkerClusterer.prototype.getMinClusterSize = function() {
return this._minClusterSize;
};
/**
* 设置单个聚合的最小数量。
* @param {Number} size 单个聚合的最小数量。
* @return 无返回值。
*/
MarkerClusterer.prototype.setMinClusterSize = function(size) {
this._minClusterSize = size;
this._redraw();
};
/**
* 获取单个聚合的落脚点是否是聚合内所有标记的平均中心。
* @return {Boolean} true或false。
*/
MarkerClusterer.prototype.isAverageCenter = function() {
return this._isAverageCenter;
};
/**
* 获取聚合的Map实例。
* @return {Map} Map的示例。
*/
MarkerClusterer.prototype.getMap = function() {
return this._map;
};
/**
* 获取所有的标记数组。
* @return {Array<Marker>} 标记数组。
*/
MarkerClusterer.prototype.getMarkers = function() {
return this._markers;
};
/**
* 获取聚合的总数量。
* @return {Number} 聚合的总数量。
*/
MarkerClusterer.prototype.getClustersCount = function() {
var count = 0;
for(var i = 0, cluster; cluster = this._clusters[i]; i++){
cluster.isReal() && count++;
}
return count;
};
/**
* @ignore
* Cluster
* @class 表示一个聚合对象,该聚合,包含有N个标记,这N个标记组成的范围,并有予以显示在Map上的TextIconOverlay等。
* @constructor
* @param {MarkerClusterer} markerClusterer 一个标记聚合器示例。
*/
function Cluster(markerClusterer){
this._markerClusterer = markerClusterer;
this._map = markerClusterer.getMap();
this._minClusterSize = markerClusterer.getMinClusterSize();
this._isAverageCenter = markerClusterer.isAverageCenter();
this._center = null;//落脚位置
this._markers = [];//这个Cluster中所包含的markers
this._gridBounds = null;//以中心点为准,向四边扩大gridSize个像素的范围,也即网格范围
this._isReal = false; //真的是个聚合
this._clusterMarker = new BMapLib.TextIconOverlay(this._center, this._markers.length, {"styles":this._markerClusterer.getStyles()});
//this._map.addOverlay(this._clusterMarker);
}
/**
* 向该聚合添加一个标记。
* @param {Marker} marker 要添加的标记。
* @return 无返回值。
*/
Cluster.prototype.addMarker = function(marker){
if(this.isMarkerInCluster(marker)){
return false;
}//也可用marker.isInCluster判断,外面判断OK,这里基本不会命中
if (!this._center){
this._center = marker.getPosition();
this.updateGridBounds();//
} else {
if(this._isAverageCenter){
var l = this._markers.length + 1;
var lat = (this._center.lat * (l - 1) + marker.getPosition().lat) / l;
var lng = (this._center.lng * (l - 1) + marker.getPosition().lng) / l;
this._center = new BMap.Point(lng, lat);
this.updateGridBounds();
}//计算新的Center
}
marker.isInCluster = true;
this._markers.push(marker);
};
/**
* 进行dom操作
* @return 无返回值
*/
Cluster.prototype.render = function(){
var len = this._markers.length;
if (len < this._minClusterSize) {
for (var i = 0; i < len; i++) {
this._map.addOverlay(this._markers[i]);
}
} else {
this._map.addOverlay(this._clusterMarker);
this._isReal = true;
this.updateClusterMarker();
}
}
/**
* 判断一个标记是否在该聚合中。
* @param {Marker} marker 要判断的标记。
* @return {Boolean} true或false。
*/
Cluster.prototype.isMarkerInCluster= function(marker){
if (this._markers.indexOf) {
return this._markers.indexOf(marker) != -1;
} else {
for (var i = 0, m; m = this._markers[i]; i++) {
if (m === marker) {
return true;
}
}
}
return false;
};
/**
* 判断一个标记是否在该聚合网格范围中。
* @param {Marker} marker 要判断的标记。
* @return {Boolean} true或false。
*/
Cluster.prototype.isMarkerInClusterBounds = function(marker) {
return this._gridBounds.containsPoint(marker.getPosition());
};
Cluster.prototype.isReal = function(marker) {
return this._isReal;
};
/**
* 更新该聚合的网格范围。
* @return 无返回值。
*/
Cluster.prototype.updateGridBounds = function() {
var bounds = new BMap.Bounds(this._center, this._center);
this._gridBounds = getExtendedBounds(this._map, bounds, this._markerClusterer.getGridSize());
};
/**
* 更新该聚合的显示样式,也即TextIconOverlay。
* @return 无返回值。
*/
Cluster.prototype.updateClusterMarker = function () {
if (this._map.getZoom() > this._markerClusterer.getMaxZoom()) {
this._clusterMarker && this._map.removeOverlay(this._clusterMarker);
for (var i = 0, marker; marker = this._markers[i]; i++) {
this._map.addOverlay(marker);
}
return;
}
if (this._markers.length < this._minClusterSize) {
this._clusterMarker.hide();
return;
}
this._clusterMarker.setPosition(this._center);
this._clusterMarker.setText(this._markers.length);
var thatMap = this._map;
var thatBounds = this.getBounds();
this._clusterMarker.addEventListener("click", function(event){
thatMap.setViewport(thatBounds);
});
};
/**
* 删除该聚合。
* @return 无返回值。
*/
Cluster.prototype.remove = function(){
for (var i = 0, m; m = this._markers[i]; i++) {
tmplabel = this._markers[i].getLabel();
this._markers[i].getMap() && this._map.removeOverlay(this._markers[i])
this._markers[i].setLabel(tmplabel)
}//清除散的标记点
this._map.removeOverlay(this._clusterMarker);
this._markers.length = 0;
delete this._markers;
}
/**
* 获取该聚合所包含的所有标记的最小外接矩形的范围。
* @return {BMap.Bounds} 计算出的范围。
*/
Cluster.prototype.getBounds = function() {
var bounds = new BMap.Bounds(this._center,this._center);
for (var i = 0, marker; marker = this._markers[i]; i++) {
bounds.extend(marker.getPosition());
}
return bounds;
};
/**
* 获取该聚合的落脚点。
* @return {BMap.Point} 该聚合的落脚点。
*/
Cluster.prototype.getCenter = function() {
return this._center;
};
})();
\ No newline at end of file
......@@ -30,7 +30,7 @@ export default {
@import './assets/css/tablevoerride.css';
@import './assets/global/font.css';
@import '//at.alicdn.com/t/font_1627123_m34imq176cf.css';
@import '//at.alicdn.com/t/font_1627123_s7tjzgwbg5i.css';
@import url('//at.alicdn.com/t/font_1627123_grz80mbm3sv.css');
/* @import './assets/css/common.css'; */
@import './assets/css/init.css';
......
......@@ -7,7 +7,7 @@
<span>客户简报</span>
</div>
<div class="shang-list">
<el-row gutter="5">
<el-row :gutter="5">
<el-col :span="12">
<div class="shang-list-item">
<div class="icon">
......
<style>
.approvalBox{
height: 100%;
position: absolute;
width: 100%;
}
.approvalBox .head{
height: 83px;
background-color: white;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
position: absolute;
top: 0;
width: 100%;
}
.approvalBox .head div{
display: flex;
align-items: center;
font-weight:bold;
}
.approvalBox .head div img{
padding-right: 10px;
}
.approvalBox .body{
padding: 31px 20px;
background:rgba(244,245,249,1);
height: calc(100% - 147px);
box-sizing: border-box;
position: absolute;
top: 83px;
width: 100%;
}
.approvalBox .body .content{
height: calc(100%);
box-sizing: border-box;
padding: 20px;
background-color: white;
overflow: auto;
}
.approvalBox .body .content .top{
display: flex;
align-items: center;
color:rgba(17,17,17,1);
padding-bottom: 15px;
border-bottom: 1px solid rgba(226,226,226,1);
}
.approvalBox .body .content .top>div:nth-child(1){
margin-right: 10px;
}
.approvalBox .body .content .top .contact{
font-size:14px;
font-weight:bold;
margin-bottom: 5px;
}
.approvalBox .body .content .top .phone{
font-size:12px;
font-weight:400;
}
.approvalBox .body .content .top .phone .iconfont{
padding-right: 5px;
font-size:12px;
}
.approvalBox .body .content .bottom .item .tit{
margin-top: 20px;
font-size: 12px;
display: flex;
align-items: center;
}
.approvalBox .body .content .bottom>div{
overflow: auto;
height: 100%;
}
.approvalBox .body .content .bottom .item .tit img{
padding-right: 10px;
}
.approvalBox .body .content .bottom .item .neirong{
padding-top: 10px;
}
.approvalBox .body .content .bottom .item .neirong img{
width: 110px;
height: 110px;
margin-top: 7px;
margin-right: 7px;
}
.approvalBox .body .content .bottom .item .neirong p{
padding: 12px 10px;
font-size:12px;
font-weight:400;
color:rgba(17,17,17,1);
background:rgba(243,246,253,1);
}
.approvalBox .body .content .bottom .item .shenhe .shenhe_top{
margin: 10px 0;
display: flex;
align-items: center;
}
.approvalBox .body .content .bottom .item .shenhe .shenhe_top .pad{
display: inline-block;
padding: 0 5px;
}
.approvalBox .body .content .bottom .item .shenhe .shenhe_top .shenhe_head{
border-radius: 50%;
}
.approvalBox .body .content .bottom .item .shenhe .neirong{
padding-left: 30px;
padding-top: 0;
}
.tongguo{
display: flex;
align-items: center;
text-align: center;
justify-content: space-between;
width: 250px;
margin: 0 auto;
}
.tongguo>div{
line-height: 18px;
color: #333;
font-size: 12px;
text-align: center;
border: 2px solid #fff;
cursor: pointer;
background: #fff;
height: 110px;
width: 110px;
margin-top: 20px;
box-sizing: border-box;
}
.tongguo>div.cked {
border: 2px solid #E95252;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.tongguo>div img {
float: left;
margin: 10px 23px;
width: 63px;
height: 63px;
}
.approvalBox .footer{
height: 54px;
padding-bottom: 10px;
display: flex;
align-items: center;
justify-content: flex-end;
position: absolute;
bottom: 0;
width: 100%;
}
</style>
<template>
<div class="approvalBox" v-if="!loading">
<div class="head">
<div>
<img src="../../assets/img/cust/a-head1.png" alt="">
<h1>{{details.CustomerInfo.CustomerName}}</h1>
</div>
<img src="../../assets/img/cust/close.png" alt="">
</div>
<div class="body">
<div class="content">
<div class="top">
<div>
<img v-if='!details.photo' src="../../assets/img/cust/litheader.png"/>
<img v-if='details.photo' :onerror="defaultImg" :src='details.photo'/>
</div>
<div>
<p class="contact">{{details.CustomerInfo.CustomerName}}</p>
<p class="phone"><i class="iconfont icondianhua"></i>{{details.CustomerInfo.Contact}} {{details.CustomerInfo.ContactNumber}}</p>
</div>
</div>
<div class="bottom">
<div>
<div class="item">
<div class="tit">
<img src="../../assets/img/cust/a_mp.png" alt="">
<span>名片照片</span>
</div>
<div class="neirong" v-if="details.CustomerInfo.BusinessCardPhotos">
<img v-for="(item, index) in details.CustomerInfo.BusinessCardPhotos" :key="index" :src="item" alt="">
</div>
<div v-else class="neirong">
<p></p>
</div>
</div>
<div class="item">
<div class="tit">
<img src="../../assets/img/cust/a-mp1.png" alt="">
<span>门牌照片</span>
</div>
<div class="neirong" v-if="details.CustomerInfo.HousePhotos">
<img v-for="(item, index) in details.CustomerInfo.HousePhotos" :key="index" :src="item" alt="">
</div>
<div v-else class="neirong">
<p></p>
</div>
</div>
<div class="item">
<div class="tit">
<img src="../../assets/img/cust/a-zz.png" alt="">
<span>营业执照</span>
</div>
<div class="neirong" v-if="details.CustomerInfo.Images">
<img v-for="(item, index) in details.CustomerInfo.Images" :key="index" :src="item" alt="">
</div>
<div v-else class="neirong">
<p></p>
</div>
</div>
<div class="item">
<div class="tit">
<img src="../../assets/img/cust/a-zz.png" alt="">
<span>开发说明</span>
</div>
<div class="neirong">
<p>{{details.CustomerInfo.Remark==''?'无':details.CustomerInfo.Remark}}</p>
</div>
</div>
<div class="item">
<div class="tit">
<img src="../../assets/img/cust/a-zz.png" alt="">
<span>拜访结果</span>
</div>
<div class="neirong">
<p>{{details.CustomerInfo.VisitRecord==''?'暂无':details.CustomerInfo.VisitRecord}}</p>
</div>
</div>
<div class="item">
<div class="tit">
<img src="../../assets/img/cust/a-sp.png" alt="">
<span>审批意见</span>
</div>
<div class="shenhe" v-for="(item, index) in answerDetailList" :key="index">
<div class="font-size-12 shenhe_top">
<img v-if='!item.emPhoto' width="24px" height="24px" src="../../assets/img/cust/litheader.png"/>
<img v-else class="shenhe_head" width="24px" height="24px" :src="item.emPhoto" alt="">
<span class="pad">{{item.createBy}}</span>
<span class="pad font-color-info">{{item.createDate}}</span>
<span class="pad font-color-success" v-if="item.adviceStatus==1">审批已通过</span>
<span class="pad font-color-warning" v-if="item.adviceStatus==2">审批已拒绝</span>
</div>
<div class="neirong">
<P>{{item.adviceContent ? item.adviceContent : '无'}}</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer" v-show="CustomerStatus==0||CustomerStatus==1">
<el-button class="crm-btn crm-btn-mini query-btn" @click="addMsg.AdviceStatus=1, dialogTableVisible = true">通过</el-button>
<el-button class="crm-btn query-btn crm-btn-mini easy-btn" @click="addMsg.AdviceStatus=2, dialogTableVisible = true">拒绝</el-button>
</div>
<el-dialog :title="`审批意见(${addMsg.AdviceStatus === 1 ? '通过' : '拒绝'})`" :visible.sync="dialogTableVisible" :modal="false">
<el-form :model="addMsg" ref="addMsg" v-if="addMsg.AdviceStatus === 2">
<el-form-item >
<el-input placeholder="请输入拒绝缘由" type="textarea" v-model="addMsg.AdviceContent" ></el-input>
</el-form-item>
</el-form>
<div v-else class="tongguo">
<div :class="{cked:addMsg.IsMember==2}" @click="addMsg.IsMember=2">
<div>
<img src="../../assets/img/cust/notVip.png" alt="">
</div>
<div>
<span>普通客户</span>
</div>
</div>
<div :class="{cked:addMsg.IsMember==1}" @click="addMsg.IsMember=1">
<div>
<img src="../../assets/img/cust/isVip.png" alt="">
</div>
<div>
<span>会员客户</span>
</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="add-box-btn" @click="addData">确 定</el-button>
<el-button class="add-box-btn add-box-cancel" @click="dialogTableVisible = false, addMsg.AdviceContent = ''">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
props: ['CustomerId', 'CustomerStatus'],
data() {
return {
loading: true,
dialogTableVisible: false,
addMsg:{
CustomerId:0,
AdviceStatus:0,
AdviceContent:'',
FollowupID:-1,
IsMember:2,
},
details: {},
answerDetailList: []
};
},watch:{
CustomerId: {
handler(val, oldVal){
this.getDetails()
this.getsh()
},
deep:true
},
CustomerStatus: {
handler(val, oldVal){
}
}
},
mounted() {
this.getDetails()
this.getsh()
},
methods: {
getDetails(){
this.loading = true
this.apipost('/api/CustomerExamine/GetCustomerAdvice', {CustomerId: this.CustomerId},res=>{
if(res.data.resultCode==1){
this.loading = false
this.details = res.data.data
}else{
this.$message.error(res.data.message)
}
},err=>{})
},
getsh(){
this.apipost2('app_today_visit_GetCustomerAdvice',{CustomerId:this.CustomerId},res=>{
if(res.data.resultCode==1){
this.answerDetailList=res.data.data
}
},err=>{})
},
addData(){
if(this.addMsg.AdviceStatus==1){
this.addMsg.AdviceContent=''
}else{
if(this.addMsg.AdviceContent==='') {
this.$message.error('请输入拒绝缘由!')
return
}
this.addMsg.IsMember=2
}
this.addMsg.CustomerId = this.CustomerId
this.apipost('/api/CustomerExamine/SetCustomerAdvice',this.addMsg,res=>{
if(res.data.resultCode==1){
this.$message.success(res.data.message)
this.dialogTableVisible = false
this.$emit('getList')
}else{
this.$message.error(res.data.message)
}
},err=>{})
},
}
};
</script>
<style>
@import '../../assets/css/customerManage.css';
</style>
<template>
<div class="customerManage">
<div class="tools">
<h1>客户审批</h1>
<div style="width: 340px;">
<el-input placeholder="请输入客户名称/手机" v-model="msg.CustomerName" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="getList"></el-button>
</el-input>
</div>
<div>&nbsp;</div>
</div>
<div class="query-box" :style="{'padding-bottom': '10px'}">
<el-row v-if="!multipleSelection.length" :gutter="30">
<el-col :span="4">
<span class="font-size-12" style="padding-right: 10px">客户类型</span>
<el-select size="mini" v-model="msg.CustomerStatus" placeholder="请选择" @change="getList">
<el-option
v-for="item in WhereTypeList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
</el-row>
<div v-else class="flex-center">
<p class="font-size-12">已选 <span class="font-color-link">{{multipleSelection.length}}</span></p>
<!-- <div class="selection-box">
<el-button v-for="(item, index) in selectionList" :key="index" @click="item.myFun"><i :class="item.class"></i>{{item.name}}</el-button>
</div> -->
</div>
</div>
<div class="page-content">
<el-table
v-if="loading"
v-loading="true"
:data="[]">
<el-table-column
v-for="(item, index) in queryType2" :key="index"
:label="item.label">
</el-table-column>
</el-table>
<el-table
v-if="!loading"
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
height="660"
border
row-class-name="font-size-12"
@selection-change="handleSelectionChange">
<el-table-column fixed type="selection" width="40"></el-table-column>
<el-table-column
fixed
prop="CustomerName"
label="客户名称"
width="120"
show-overflow-tooltip>
<template slot-scope="scope">
<p @click="openDetails(scope)" class="font-color-link cp">{{scope.row.CustomerName}}</p>
</template>
</el-table-column>
<el-table-column
prop="Contact"
label="联系人"
v-if="queryType[1].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="ContactNumber"
label="联系电话"
v-if="queryType[2].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="creatTime"
label="提交时间"
v-if="queryType[3].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="EmName"
label="来源"
v-if="queryType[4].show"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="CustomerStatus"
label="状态"
v-if="queryType[5].show"
show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.CustomerStatus === 0 || scope.row.CustomerStatus === 1" class="font-color-warning">待审批</span>
<span v-if="scope.row.CustomerStatus === 2 || scope.row.CustomerStatus === 3" class="font-color-success">已审批</span>
</template>
</el-table-column>
<el-table-column
width="40"
fixed="right">
<template slot="header" slot-scope="scope">
<el-popover
placement="bottom"
width="240">
<mySelect :queryType="queryType" @listenTochildEvent="showMessageFromChild"/>
<i class="el-icon-s-operation cp" slot="reference"></i>
</el-popover>
</template>
</el-table-column>
</el-table>
</div>
<div>
<el-pagination
class="Mypagination"
background
@current-change="handleCurrentChange"
:page-sizes="[30, 60, 90, 100]"
:page-size="msg.pageSize"
layout="sizes, prev, pager, next"
@size-change="handleSizeChange"
:total="total">
</el-pagination>
</div>
<el-drawer
:with-header="false"
size='30%'
:visible.sync="drawer"
direction="rtl"
:before-close="handleClose">
<approvalBox :CustomerId="CustomerId" :CustomerStatus="CustomerStatus" @getList="reload()"/>
</el-drawer>
</div>
</template>
<script>
import mySelect from "../dialogModel/select";
import approvalBox from "./approvalBox"
export default {
components: {
mySelect,
approvalBox
},
data() {
return {
CustomerId: 0,
queryType2: [
{
label: '客户名称',
show: true,
},{
label: '联系人',
show: true,
},{
label: '电话',
show: true,
},{
label: '提交时间',
show: true,
},{
label: '来源',
show: true,
},{
label: '状态',
show: true,
}
],
queryType: [
{
label: '客户名称',
show: true,
},{
label: '联系人',
show: true,
},{
label: '电话',
show: true,
},{
label: '提交时间',
show: true,
},{
label: '来源',
show: true,
},{
label: '状态',
show: true,
}
],
drawer: false,
loading: true,
tableData: [],
multipleSelection: [],
userInfo: {},
msg:{
pageIndex:1,
pageSize:30,
CustomerStatus:-1,
},
CustomerStatus: 0,
total: 0,
WhereTypeList: [
{
id: -1,
name: '全部'
},{
id: 1,
name: '待审批'
},{
id: 2,
name: '已审批'
}
],
};
},
mounted() {
this.getList()
},
methods: {
reload(){
console.log(1)
this.getList()
this.drawer = false
},
showMessageFromChild(list){
this.mySelectCtrl=!this.mySelectCtrl
if (list) {
this.queryType = list
this.getList()
}
},
getList(){
this.apipost('/api/CustomerExamine/GetMyDeptCustomerList',this.msg,res=>{
if(res.data.resultCode==1){
this.tableData = res.data.data.pageData
this.loading=false
}else{
this.$message.error(res.data.message)
}
},err=>{})
},
handleSizeChange(val) {
this.msg.pageSize = val
this.getList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
handleSelectionChange(val) {
this.multipleSelection = val.map(x=>
x.CustomerId
)
},
handleClose(done) {
done();
},
openDetails(scope){
this.drawer = true
this.CustomerStatus = scope.row.CustomerStatus
this.CustomerId = scope.row.CustomerId
this.CustomerName = scope.row.CustomerName
this.drawer = true
},
}
};
</script>
<style>
.customerMap{
width: 100%;
height: 100%;
}
.color-info{
position: absolute;
left: 30px;
top: 15px;
padding: 10px 20px;
background-color: rgba(206, 206, 206, .5);
}
.color-info>span{
font-size: 14px;
display: flex;
align-items: center;
justify-content: space-around;
width: 120px;
}
.color-info .raius-color{
height: 10px;
width: 10px;
display: inline-block;
background-color: #1eb3ff;
border-radius: 50%;
}
.color-info .g .raius-color{
background-color: #5fffa3;
}
</style>
<template>
<div class="customerMap">
<div :style="{height:'100%',width:'100%'}" ref="myEchart" id="centerMpBaidu"></div>
<div class="color-info">
<span class="b">&nbsp;&nbsp;&nbsp;正式:
<span class="raius-color"></span>
<el-switch
@change="changeSwitch"
size="mini"
v-model="value1">
</el-switch>
</span>
<br>
<span class="g">非正式:
<span class="raius-color"></span>
<el-switch
@change="changeSwitch"
size="mini"
style="display: block"
v-model="value2"
active-color="#13ce66">
</el-switch>
</span>
</div>
</div>
</template>
<script>
export default {
data() {
return {
map: null,
value1: true,
value2: true,
baiduMapData: [],
changebaiduMapData: [],
centerP: null,
options0: {
size: BMAP_POINT_SIZE_BIGGER,
shape: BMAP_POINT_SHAPE_CIRCLE,
color: '#1eb3ff'
},
options1: {
size: BMAP_POINT_SIZE_BIGGER,
shape: BMAP_POINT_SHAPE_CIRCLE,
color: '#5fffa3'
},
list0: [],
list1: [],
};
},
methods: {
changeSwitch(e){
let list = [];
let data = JSON.parse(JSON.stringify(this.baiduMapData));
let value1 = this.value1;
let value2 = this.value2;
if (value1 && value2) {
this.creatMap(data)
} else {
data.forEach(item => {
if(value1 && !value2 && item.type == 0) {
list.push(item)
} else if (!value1 && value2 && item.type == 1){
list.push(item)
}
})
this.creatMap(list)
}
},
creatMap(arr, type){
let _this = this
//实例化,并设置最大最小缩放层级
if(this.map) {
this.map.clearOverlays()
} else {
this.map = new BMap.Map("centerMpBaidu", {
minZoom: 3,
maxZoom: 20,
});
//设置中心点、默认缩放层级
if (_this.centerP) {
this.map.centerAndZoom(new BMap.Point(_this.centerP.Lng, _this.centerP.Lat), 10);
} else {
this.map.centerAndZoom(new BMap.Point(104.0727017791, 30.6643622306), 10);
}
this.map.setMapStyleV2({
styleId: '33046c341768c2774ab011cc7cf013d1'
});
this.map.enableScrollWheelZoom(true);
}
//可以鼠标缩放
const points = arr;
let list0 = [], list1 = [];
points.forEach(item => {
let obj = new BMap.Point(item.Lng, item.Lat)
obj.CustomerId = item.CustomerId
if(item.type == 0) {
list0.push(obj)
} else if (item.type == 1){
list1.push(obj)
}
})
this.list0 = list0;
this.list1 = list1;
this.changePointsColor(this.list0,this.options0);
this.changePointsColor(this.list1,this.options1);
},
changePointsColor(points, options){
var map = this.map;
var pointCollection = new BMap.PointCollection(points, options); // 初始化PointCollection
map.addOverlay(pointCollection); // 添加Overlay
this.markerClick(pointCollection);// 给点添加点击事件
},
markerClick(pointCollection){
var _this = this;
var map = this.map;
var data = this.markdatas;
pointCollection.addEventListener('click', function (e) {
_this.apipost2('financestatistics_post_GetCustomerInfoForB2BKB', {CustomerId: e.point.CustomerId}, res=>{
if(res.data.resultCode == 1) {
const infoWindow = new BMap.InfoWindow(`
<p style="font-size: 14px;">联系人:${res.data.data.Contact}</p>
<p style="font-size: 14px;">联系电话:${res.data.data.ContactNumber}</p>
<p style="font-size: 14px;">门店名称:${res.data.data.CustomerName}</p>
<p style="font-size: 14px;">门店地址:${res.data.data.Address}</p>
<p style="font-size: 14px;">关联销售:${res.data.data.EmName}</p>
`)
_this.map.openInfoWindow(infoWindow, e.point);
}
})
});
}
},
mounted() {
let userInfo = this.getLocalStorage();
let RB_Branch_id = userInfo.RB_Branch_id;
let departState = this.$route.query.departState;
if (departState === 'true') {
RB_Branch_id = -1
}
this.apipost2('admin_get_GetBranchLngLat', {BranchId: RB_Branch_id}, r=>{
if (r.data.resultCode == 1) {
this.centerP = r.data.data[0]
}
})
this.apipost2('financestatistics_post_GetB2BBoardClientAddressList', {BranchId: RB_Branch_id, ProvinceName: ''}, r=>{
if (r.data.resultCode == 1) {
let _this = this;
let data = r.data.data
data.ActivateList.map(x=>{
x.type = 0
})
data.InActiveList.map(x=>{
x.type = 0
})
data.NotVisit.map(x=>{
x.type = 1
})
let baiduMapData = [...data.ActivateList, ...data.InActiveList, ...data.NotVisit];
// let baiduMapData = [...data.NotVisit, ...data.ActivateList];
this.baiduMapData = baiduMapData
this.creatMap(this.baiduMapData)
}
})
}
};
</script>
\ No newline at end of file
<style>
.seb-item{
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 20px;
background-color: white;
border-bottom: 1px solid #f8fafb;
}
.seb-item .cp{
opacity: 0;
transition: all linear .3s;
}
.seb-item:hover .cp{
opacity: 1;
}
.seb-item .cp:hover{
color: #409eff !important;
}
.seb-item .cp{
padding-left: 10px;
}
</style>
<template>
<div class="sceneEditBox">
<template v-for="(item, index) in sceneDataList" >
<div class="seb-item" :key="index">
<span>{{item.SceneName}}</span>
<div>
<i class="el-icon-edit cp" @click="MsgBus.$emit('sceneBoxShow', LableType, 1, item)"></i>
<i class="el-icon-delete cp" @click="deleteRow(item.ID)"></i>
</div>
</div>
</template>
<div style="margin-top: 15px;text-align: right;">
<span class="font-color-link cp" @click="MsgBus.$emit('sceneBoxShow', LableType, 1)">新建场景</span>
</div>
</div>
</template>
<script>
export default {
props: ['LableType', 'sceneData'],
data(){
return {
sceneDataList: [],
}
},
watch: {
LableType:{
handler(val, oldVal){
},
deep:true
},
sceneData: {
handler(val, oldVal){
this.sceneDataList = this.sceneData.filter(x=>
x.WhereType === 0
)
}
}
},beforeCreate(){
},beforeDestroy() {
this.MsgBus.$off('editScene');
},
mounted () {
this.sceneDataList = this.sceneData.filter(x=>
x.WhereType === 0
)
let $this = this
this.MsgBus.$on('editScene', function (){
console.log(1)
$this.GetSceneEmployeeList()
})
},
methods: {
GetSceneEmployeeList(){
this.apipost('/api/Scene/GetSceneEmployeeList', {LableType: this.LableType}, res=>{
if (res.data.resultCode == 1) {
this.sceneDataList = res.data.data.filter(x=>
x.WhereType === 0
)
}
})
},
deleteRow(ID){
this.$confirm('您确定要删除这一条数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/Scene/DelSceneEmployee', {ID: ID}, res=>{
this.MsgBus.$emit('editScene')
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
}
}
</script>
\ No newline at end of file
......@@ -113,7 +113,7 @@
</el-col>
</el-row>
<el-row :gutter="25" class="bottom" >
<el-col :span="15" style="height: 100%;">
<el-col :span="16" style="height: 100%;">
<el-card style="height: 100%;">
<div slot="header" class="clearfix">
<span>数据说明</span>
......@@ -133,7 +133,7 @@
</div>
</el-card>
</el-col>
<el-col :span="9" style="height: 100%;">
<el-col :span="8" style="height: 100%;">
<el-card style="height: 100%;">
<div slot="header" class="clearfix">
<el-row style="width:100%">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment