Commit fa99b894 authored by 张帆's avatar 张帆

站点修改控制显示

parent e1f44abd
Pipeline #79144 passed with stages
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
"@wisdom-components/basictable": "^1.5.16", "@wisdom-components/basictable": "^1.5.16",
"@wisdom-components/empty": "^1.4.1", "@wisdom-components/empty": "^1.4.1",
"@wisdom-map/amap": "1.1.0-beta.56", "@wisdom-map/amap": "1.1.0-beta.56",
"@wisdom-map/arcgismap": "1.4.0-192", "@wisdom-map/arcgismap": "1.4.0-193",
"@wisdom-map/basemap": "1.1.0-29", "@wisdom-map/basemap": "1.1.0-29",
"@wisdom-map/util": "^1.0.28-0", "@wisdom-map/util": "^1.0.28-0",
"@wisdom-utils/components": "0.1.322", "@wisdom-utils/components": "0.1.322",
......
...@@ -252,6 +252,7 @@ const GlobalHeaderRight = props => { ...@@ -252,6 +252,7 @@ const GlobalHeaderRight = props => {
}; };
useEffect(() => { useEffect(() => {
if (global.userInfo) { if (global.userInfo) {
if(window._changeStation){
roleStationArr.current = global.userInfo.roles.filter(item => item.name.includes('站点_')); roleStationArr.current = global.userInfo.roles.filter(item => item.name.includes('站点_'));
if (roleStationArr.current.length) { if (roleStationArr.current.length) {
let stationname=roleStationArr.current[0].description?roleStationArr.current[0]:roleStationArr.current[0].name let stationname=roleStationArr.current[0].description?roleStationArr.current[0]:roleStationArr.current[0].name
...@@ -282,6 +283,7 @@ const GlobalHeaderRight = props => { ...@@ -282,6 +283,7 @@ const GlobalHeaderRight = props => {
setStationValue(stationname); setStationValue(stationname);
} }
} }
}
}, [global.userInfo]); }, [global.userInfo]);
return ( return (
<div className={className}> <div className={className}>
......
...@@ -110,7 +110,8 @@ ...@@ -110,7 +110,8 @@
} }
.@{ant-prefix}-select-selection-item{ .@{ant-prefix}-select-selection-item{
color: #FEFEFE; color: #FEFEFE;
max-width: 120px; // max-width: 120px;
width: 100%;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
......
...@@ -323,6 +323,13 @@ class Login { ...@@ -323,6 +323,13 @@ class Login {
]) ])
.then(results => { .then(results => {
const promise = results[0]; const promise = results[0];
const site = results[1];
if (site.status == 'fulfilled') {
const respon = site.value;
if (respon.code == 0 && respon.data.length) {
window._changeStation = respon.data[0].changeStation;
}
}
const mqttConfig = { const mqttConfig = {
mqtt_mess: {}, mqtt_mess: {},
mqtt_path: DEFAULT_MQTT_PATH, mqtt_path: DEFAULT_MQTT_PATH,
...@@ -368,7 +375,6 @@ class Login { ...@@ -368,7 +375,6 @@ class Login {
mqttConfig.mqtt_iotIP = `${mqttConfig.mqtt_mess.TcpIP}:${ mqttConfig.mqtt_iotIP = `${mqttConfig.mqtt_mess.TcpIP}:${
mqttConfig.mqtt_mess.TcpPort ? mqttConfig.mqtt_mess.TcpPort : '443' mqttConfig.mqtt_mess.TcpPort ? mqttConfig.mqtt_mess.TcpPort : '443'
}`; }`;
self.globalConfig = Object.assign(self.globalConfig, { self.globalConfig = Object.assign(self.globalConfig, {
...mqttConfig, ...mqttConfig,
}); });
...@@ -582,7 +588,13 @@ class Login { ...@@ -582,7 +588,13 @@ class Login {
} else { } else {
layer.layerType = 'PipenetLayer'; layer.layerType = 'PipenetLayer';
} }
let flag = false;
this.globalConfig.uiwidgets.forEach(item => {
if (item.label == '图层管理') {
flag = true;
}
});
if (!flag) {
if (layers && layers.length > 1 && widgetIndex === -1) { if (layers && layers.length > 1 && widgetIndex === -1) {
this.globalConfig.uiwidgets.push({ this.globalConfig.uiwidgets.push({
bottom: isScale ? MAX_BOTTOM + 70 : MAX_BOTTOM + 35, bottom: isScale ? MAX_BOTTOM + 70 : MAX_BOTTOM + 35,
...@@ -592,6 +604,7 @@ class Login { ...@@ -592,6 +604,7 @@ class Login {
url: 'product/webgisPanda/ToggleProject/ToggleProject', url: 'product/webgisPanda/ToggleProject/ToggleProject',
}); });
} }
}
if (layer.areaName) { if (layer.areaName) {
this.globalConfig.mapsettings.areasettings.areaName = layer.areaName; this.globalConfig.mapsettings.areasettings.areaName = layer.areaName;
} }
......
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