Commit b28aaee8 authored by 皮倩雯's avatar 皮倩雯
parents add3f04e ced7b425
Pipeline #49718 skipped with stages
# PUBLIC_PATH = reactOMS, 默认转发 /cityinterface # PUBLIC_PATH = reactOMS, 默认转发 /cityinterface
PROXY=/Cityinterface:http://192.168.12.116:8015;/PandaOMS:http://192.168.12.116:8015;/Publish:http://192.168.12.116:8015;/Web4:http://192.168.19.105:8049;/CityTemp:http://192.168.19.105:8049 PROXY=/PandaGIS:http://192.168.12.140:8081;/Cityinterface:http://192.168.12.140:8081;/PandaOMS:http://192.168.12.140:8081;/Publish:http://192.168.12.140:8081;/Web4:http://192.168.12.140:8081;/CityTemp:http://192.168.12.140:8081
# PROXY=/Cityinterface:http://192.168.12.121:8082;/PandaOMS:http://192.168.12.121:8082;/Web4:http://192.168.12.121:8082;/CityTemp:http://192.168.12.121:8082 # PROXY=/Cityinterface:http://192.168.12.121:8082;/PandaOMS:http://192.168.12.121:8082;/Web4:http://192.168.12.121:8082;/CityTemp:http://192.168.12.121:8082
# 可设置第二个代理,test为转发前缀,后面为代理转发的地址 # 可设置第二个代理,test为转发前缀,后面为代理转发的地址
# PROXY2 = test : http://localhost:8006/ # PROXY2 = test : http://localhost:8006/
...@@ -8,4 +8,4 @@ PROXY=/Cityinterface:http://192.168.12.116:8015;/PandaOMS:http://192.168.12.116: ...@@ -8,4 +8,4 @@ PROXY=/Cityinterface:http://192.168.12.116:8015;/PandaOMS:http://192.168.12.116:
HOST = 127.0.0.1 HOST = 127.0.0.1
# 本地应用启动的端口 # 本地应用启动的端口
PORT = 3001 PORT = 3002
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
"@babel/polyfill": "7.4.3", "@babel/polyfill": "7.4.3",
"@babel/preset-typescript": "^7.12.1", "@babel/preset-typescript": "^7.12.1",
"@babel/runtime": "^7.10.5", "@babel/runtime": "^7.10.5",
"@wisdom-cesium/cesium": "^1.0.29", "@wisdom-cesium/cesium": "^1.0.78",
"@wisdom-map/Amap": "^1.0.49-18", "@wisdom-map/Amap": "^1.0.49-18",
"@wisdom-map/arcgismap": "^1.0.79-32", "@wisdom-map/arcgismap": "^1.0.79-32",
"@wisdom-map/Map": "^1.0.12-32", "@wisdom-map/Map": "^1.0.12-32",
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
}, },
"devDependencies": { "devDependencies": {
"@ant-design/icons": "^4.0.0", "@ant-design/icons": "^4.0.0",
"@ant-design/pro-layout": "^6.4.1", "@ant-design/pro-layout": "6.36.0",
"@ant-design/pro-table": "^2.5.3", "@ant-design/pro-table": "^2.5.3",
"@babel/cli": "7.4.3", "@babel/cli": "7.4.3",
"@babel/core": "7.4.3", "@babel/core": "7.4.3",
......
...@@ -19,8 +19,8 @@ const app = express(); ...@@ -19,8 +19,8 @@ const app = express();
// In production we need to pass these values in instead of relying on webpack // In production we need to pass these values in instead of relying on webpack
setup(app, { setup(app, {
outputPath: resolve(process.cwd(), 'build'), outputPath: resolve(process.cwd(), 'civmanage'),
publicPath: '/', publicPath: process.env.NODE_ENV === 'production' ?'/civmanage': '/',
}); });
// get the intended host and port number, use localhost and port 3000 if not provided // get the intended host and port number, use localhost and port 3000 if not provided
......
...@@ -4,13 +4,14 @@ const compression = require('compression'); ...@@ -4,13 +4,14 @@ const compression = require('compression');
module.exports = function addProdMiddlewares(app, options) { module.exports = function addProdMiddlewares(app, options) {
const publicPath = options.publicPath || '/'; const publicPath = options.publicPath || '/';
const outputPath = options.outputPath || path.resolve(process.cwd(), 'build'); const outputPath = options.outputPath || path.resolve(process.cwd(), 'civmanage');
const { addProxyMiddleware } = require('../proxy');
// compression middleware compresses your server responses which makes them // compression middleware compresses your server responses which makes them
// smaller (applies also to assets). You can read more about that technique // smaller (applies also to assets). You can read more about that technique
// and other good practices on official Express.js docs http://mxs.is/googmy // and other good practices on official Express.js docs http://mxs.is/googmy
app.use(compression()); app.use(compression());
app.use(publicPath, express.static(outputPath)); app.use(publicPath, express.static(outputPath));
addProxyMiddleware(app)
app.get('*', (req, res) => app.get('*', (req, res) =>
res.sendFile(path.resolve(outputPath, 'index.html')), res.sendFile(path.resolve(outputPath, 'index.html')),
......
...@@ -52,7 +52,7 @@ const BasicLayout = props => { ...@@ -52,7 +52,7 @@ const BasicLayout = props => {
// footerRender={() => defaultFooterDom} // footerRender={() => defaultFooterDom}
rightContentRender={() => <RightContent />} rightContentRender={() => <RightContent />}
title="熊猫运维平台" title="熊猫运维平台"
fixedHeader // fixedHeader
route={ route={
{ {
// routes: config.routes, // routes: config.routes,
......
...@@ -311,7 +311,7 @@ const TableManager = props => { ...@@ -311,7 +311,7 @@ const TableManager = props => {
title: '名称', title: '名称',
dataIndex: 'tableName', dataIndex: 'tableName',
key: 'tableName', key: 'tableName',
width: 300, width: 400,
render: (text, record) => ( render: (text, record) => (
<div onClick={e => fieldsConfig(record, e)}>{searchStyle(text)}</div> <div onClick={e => fieldsConfig(record, e)}>{searchStyle(text)}</div>
), ),
...@@ -382,24 +382,24 @@ const TableManager = props => { ...@@ -382,24 +382,24 @@ const TableManager = props => {
style={{ fontSize: '20px', color: '#1890FF' }} style={{ fontSize: '20px', color: '#1890FF' }}
/> />
</Tooltip> </Tooltip>
<Tooltip title="字段配置"> {/* <Tooltip title="字段配置">
<FontColorsOutlined <FontColorsOutlined
onClick={e => fieldsConfig(record, e)} onClick={e => fieldsConfig(record, e)}
style={{ fontSize: '16px', color: '#1890FF' }} style={{ fontSize: '16px', color: '#1890FF' }}
/> />
</Tooltip> </Tooltip> */}
<Tooltip title="附加"> {/* <Tooltip title="附加">
<PlusSquareOutlined <PlusSquareOutlined
onClick={() => add(record)} onClick={() => add(record)}
style={{ fontSize: '16px', color: '#1890FF' }} style={{ fontSize: '16px', color: '#1890FF' }}
/> />
</Tooltip> </Tooltip> */}
<Tooltip title="分组与排序"> {/* <Tooltip title="分组与排序">
<SortDescendingOutlined <SortDescendingOutlined
onClick={() => sort(record)} onClick={() => sort(record)}
style={{ fontSize: '16px', color: '#1890FF' }} style={{ fontSize: '16px', color: '#1890FF' }}
/> />
</Tooltip> </Tooltip> */}
<div onClick={e => e.stopPropagation()}> <div onClick={e => e.stopPropagation()}>
<Popconfirm <Popconfirm
title="是否删除该表?" title="是否删除该表?"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: * @Description:
* @Author: leizhe * @Author: leizhe
* @Date: 2022-01-13 10:47:32 * @Date: 2022-01-13 10:47:32
* @LastEditTime: 2022-05-06 15:32:33 * @LastEditTime: 2022-05-07 18:46:40
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
*/ */
import { Tabs, Button } from 'antd'; import { Tabs, Button } from 'antd';
...@@ -14,12 +14,15 @@ import VectorData from './VectorData/VectorData'; ...@@ -14,12 +14,15 @@ import VectorData from './VectorData/VectorData';
import ProjectMessage from './projectMessage/projectMessage'; import ProjectMessage from './projectMessage/projectMessage';
import SolutionConfig from './solutionConfig/solutionConfig'; import SolutionConfig from './solutionConfig/solutionConfig';
import ScopeMap from './ScopeMap/index'; import ScopeMap from './ScopeMap/index';
import { isDev } from '@/utils/tools';
const { TabPane } = Tabs; const { TabPane } = Tabs;
const SchemeConfig = () => { const SchemeConfig = () => {
const callback = () => {}; const callback = () => {};
const iframeUrl =
'/web4/?widget=product/Tool/EditBoundary/EditBoundary&serverCollextion=luanzhou,jiangninggwtest&solution=熊猫智慧水务平台';
console.log(process.env.HOST, 'process.env.PROXY');
return ( return (
<PageContainer> <PageContainer>
<div className={styles.container}> <div className={styles.container}>
...@@ -36,9 +39,21 @@ const SchemeConfig = () => { ...@@ -36,9 +39,21 @@ const SchemeConfig = () => {
<TabPane tab="方案配置" key="4"> <TabPane tab="方案配置" key="4">
<SolutionConfig /> <SolutionConfig />
</TabPane> </TabPane>
{/* <TabPane tab="范围配置" key="5"> <TabPane tab="范围配置" key="5">
<ScopeMap /> <ScopeMap />
</TabPane> */} {/* <div
style={{
width: '100%',
height: 'calc(100vh - 160px)',
}}
>
<iframe
src={`${isDev ? 'http://192.168.12.140:8081' : window.location.origin}${iframeUrl}`}
width="99%"
height="99%"
/>
</div> */}
</TabPane>
</Tabs> </Tabs>
</div> </div>
</PageContainer> </PageContainer>
......
...@@ -66,6 +66,7 @@ const Map = props => { ...@@ -66,6 +66,7 @@ const Map = props => {
districtSearch.search('中国', (status, result) => { districtSearch.search('中国', (status, result) => {
// 查询成功时,result即为对应的行政区信息 // 查询成功时,result即为对应的行政区信息
console.log(result, '行政区划信息'); console.log(result, '行政区划信息');
result.districtList[0].districtList.push({ adcode: '100000', name: '中华人民共和国' });
setOptions(result.districtList[0].districtList); setOptions(result.districtList[0].districtList);
}); });
}); });
...@@ -82,6 +83,10 @@ const Map = props => { ...@@ -82,6 +83,10 @@ const Map = props => {
}; };
// 表单修改后对地图进行配置 // 表单修改后对地图进行配置
const changeValue = changedFields => { const changeValue = changedFields => {
if (changedFields.length === 0) {
return;
}
console.log(changedFields, 'changedFields[0].name[0]');
let obj = JSON.parse(JSON.stringify(mapsettings)); let obj = JSON.parse(JSON.stringify(mapsettings));
const index = obj.layers.findIndex( const index = obj.layers.findIndex(
item => item.schemename === form.getFieldValue('schemename'), item => item.schemename === form.getFieldValue('schemename'),
...@@ -179,6 +184,18 @@ const Map = props => { ...@@ -179,6 +184,18 @@ const Map = props => {
duration: 3, duration: 3,
description: '保存成功', description: '保存成功',
}); });
let mapObj = JSON.parse(JSON.stringify(mapsettings));
const index = mapObj.layers.findIndex(
item => item.schemename === form.getFieldValue('schemename'),
);
mapObj.layers[index].backgroundOpacity = obj.backgroundOpacity / 100;
mapObj.layers[index].boundWidth = `${obj.boundWidth}px`;
mapObj.layers[index].areaName = obj.areaName[obj.areaName.length - 1];
mapObj.layers[index].backgroundColor = obj.backgroundColor;
mapObj.layers[index].extent = form.getFieldValue('extent');
console.log(mapObj);
setMapsettings(mapObj);
Drawtool.deactivate(false);
} else { } else {
notification.error({ notification.error({
message: '提示', message: '提示',
......
...@@ -3,11 +3,12 @@ import React from 'react'; ...@@ -3,11 +3,12 @@ import React from 'react';
import { import {
DatabaseOutlined, DatabaseOutlined,
UsergroupAddOutlined, UsergroupAddOutlined,
SettingOutlined,
HomeOutlined,
SolutionOutlined, SolutionOutlined,
TableOutlined, TableOutlined,
CopyOutlined, CreditCardOutlined,
FileTextOutlined,
AppstoreOutlined,
FundProjectionScreenOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
// 菜单 // 菜单
import UserLayout from '@/layouts/UserLayout'; import UserLayout from '@/layouts/UserLayout';
...@@ -64,7 +65,7 @@ import { USER_MODE } from '@/utils/constants'; ...@@ -64,7 +65,7 @@ import { USER_MODE } from '@/utils/constants';
const superAuthority = [USER_MODE.SUPER]; const superAuthority = [USER_MODE.SUPER];
const adminAuthority = [...superAuthority, USER_MODE.ADMIN]; const adminAuthority = [...superAuthority, USER_MODE.ADMIN];
const iconStyle = { verticalAlign: '0.125em' }; const iconStyle = { verticalAlign: 'middle' };
export default { export default {
routes: [ routes: [
{ {
...@@ -144,7 +145,7 @@ export default { ...@@ -144,7 +145,7 @@ export default {
path: '/platformCenter', path: '/platformCenter',
component: BlankLayout, component: BlankLayout,
name: '平台中心', name: '平台中心',
icon: <SettingOutlined style={iconStyle} />, icon: <FundProjectionScreenOutlined style={iconStyle} />,
routes: [ routes: [
{ {
path: '/platformCenter/gis', path: '/platformCenter/gis',
...@@ -235,7 +236,7 @@ export default { ...@@ -235,7 +236,7 @@ export default {
path: '/bsmanger', path: '/bsmanger',
component: BlankLayout, component: BlankLayout,
name: '业务中心', name: '业务中心',
icon: <CopyOutlined style={iconStyle} />, icon: <CreditCardOutlined style={iconStyle} />,
routes: [ routes: [
{ {
path: '/bsmanger/base', path: '/bsmanger/base',
...@@ -311,7 +312,7 @@ export default { ...@@ -311,7 +312,7 @@ export default {
path: '/productCenter', path: '/productCenter',
component: BlankLayout, component: BlankLayout,
name: '应用中心', name: '应用中心',
icon: <HomeOutlined style={iconStyle} />, icon: <AppstoreOutlined style={iconStyle} />,
routes: [ routes: [
{ {
path: '/productCenter/product', path: '/productCenter/product',
...@@ -347,7 +348,7 @@ export default { ...@@ -347,7 +348,7 @@ export default {
path: '/log', path: '/log',
component: BlankLayout, component: BlankLayout,
name: '系统日志', name: '系统日志',
icon: <CopyOutlined style={iconStyle} />, icon: <FileTextOutlined style={iconStyle} />,
routes: [ routes: [
{ {
path: '/log/service', path: '/log/service',
......
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