Commit 62f3cf9b authored by 邓超's avatar 邓超

fix: build打包配置修改,完善地图范围配置

parent bd565915
Pipeline #50099 skipped with stages
...@@ -11,10 +11,7 @@ module.exports = require('./webpack.base.babel')({ ...@@ -11,10 +11,7 @@ module.exports = require('./webpack.base.babel')({
mode: 'production', mode: 'production',
// In production, we skip all hot-reloading stuff // In production, we skip all hot-reloading stuff
entry: [ entry: [require.resolve('react-app-polyfill/ie11'), path.join(process.cwd(), 'src/app.js')],
require.resolve('react-app-polyfill/ie11'),
path.join(process.cwd(), 'src/app.js'),
],
// Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets // Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
// [chunkhash:8] [chunkhash:8] // [chunkhash:8] [chunkhash:8]
...@@ -25,44 +22,42 @@ module.exports = require('./webpack.base.babel')({ ...@@ -25,44 +22,42 @@ module.exports = require('./webpack.base.babel')({
optimization: { optimization: {
minimize: true, minimize: true,
minimizer: [ // minimizer: [
new TerserPlugin({ // new TerserPlugin({
terserOptions: { // terserOptions: {
warnings: false, // warnings: false,
compress: { // compress: {
comparisons: false, // comparisons: false,
}, // },
parse: {}, // parse: {},
mangle: true, // mangle: true,
output: { // output: {
comments: false, // comments: false,
ascii_only: true, // ascii_only: true,
}, // },
}, // },
parallel: true, // parallel: true,
cache: true, // cache: true,
sourceMap: true, // sourceMap: true,
}), // }),
], // ],
nodeEnv: 'production', nodeEnv: 'production',
sideEffects: true, sideEffects: true,
concatenateModules: true, concatenateModules: true,
runtimeChunk: 'single', runtimeChunk: 'single',
splitChunks: { splitChunks: {
chunks: 'all', chunks: 'all',
maxInitialRequests: 10, // maxInitialRequests: 10,
minSize: 0, // minSize: 0,
cacheGroups: { // cacheGroups: {
vendor: { // vendor: {
test: /[\\/]node_modules[\\/]/, // test: /[\\/]node_modules[\\/]/,
name(module) { // name(module) {
const packageName = module.context.match( // const packageName = module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/)[1];
/[\\/]node_modules[\\/](.*?)([\\/]|$)/, // return `npm.${packageName.replace('@', '')}`;
)[1]; // },
return `npm.${packageName.replace('@', '')}`; // },
}, // },
},
},
}, },
}, },
...@@ -145,7 +140,6 @@ module.exports = require('./webpack.base.babel')({ ...@@ -145,7 +140,6 @@ module.exports = require('./webpack.base.babel')({
], ],
performance: { performance: {
assetFilter: assetFilename => assetFilter: assetFilename => !/(\.map$)|(^(main\.|favicon\.))/.test(assetFilename),
!/(\.map$)|(^(main\.|favicon\.))/.test(assetFilename),
}, },
}); });
...@@ -90,9 +90,9 @@ ...@@ -90,9 +90,9 @@
"@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.78", "@wisdom-cesium/cesium": "^1.0.78",
"@wisdom-map/Amap": "^1.0.49-18", "@wisdom-map/Amap": "^1.0.49-21",
"@wisdom-map/arcgismap": "^1.0.79-32", "@wisdom-map/Map": "^1.0.12-34",
"@wisdom-map/Map": "^1.0.12-32", "@wisdom-map/arcgismap": "^1.0.79-34",
"@esri/arcgis-html-sanitizer": "2.9.1", "@esri/arcgis-html-sanitizer": "2.9.1",
"@esri/calcite-colors": "6.0.3", "@esri/calcite-colors": "6.0.3",
"ace-builds": "^1.4.12", "ace-builds": "^1.4.12",
......
...@@ -111,7 +111,18 @@ class PicturesWall extends React.Component<PicturesWallType> { ...@@ -111,7 +111,18 @@ class PicturesWall extends React.Component<PicturesWallType> {
} }
if (imgBed != state.prevProps.uploadContext?.imgBed) { if (imgBed != state.prevProps.uploadContext?.imgBed) {
const activeKeys = {}; const activeKeys = {};
imgBed.forEach(item => activeKeys[item.moduleName] = item.child.map(c => c.moduleName)); const imgArr = JSON.parse(JSON.stringify(imgBed))
imgArr.forEach(item => {
if(item.fileUrls.length > 0) {
item.child.unshift({
moduleName: item.moduleName,
fileUrls: item.fileUrls,
child: [],
baseUrl: item.baseUrl
})
}
activeKeys[item.moduleName] = item.child.map(c => c.moduleName)
});
return { return {
prevProps: props, prevProps: props,
imgBed, imgBed,
...@@ -451,7 +462,7 @@ class PicturesWall extends React.Component<PicturesWallType> { ...@@ -451,7 +462,7 @@ class PicturesWall extends React.Component<PicturesWallType> {
if (item.moduleName == picType || item.moduleName == 'CityTemp') { if (item.moduleName == picType || item.moduleName == 'CityTemp') {
const child = [...item.child] || []; const child = [...item.child] || [];
if (item.fileUrls.length > 0) { if (item.fileUrls.length > 0) {
child.push({ child.unshift({
moduleName: item.moduleName, moduleName: item.moduleName,
fileUrls: item.fileUrls, fileUrls: item.fileUrls,
child: [], child: [],
......
...@@ -74,7 +74,7 @@ const AddModal = props => { ...@@ -74,7 +74,7 @@ const AddModal = props => {
'平铺值选择器', '平铺值选择器',
'站点选择器', '站点选择器',
'人员选择器', '人员选择器',
'人员选择器新', // '人员选择器新',
'城市选择器', '城市选择器',
'台账选择器', '台账选择器',
'附件', '附件',
......
...@@ -19,7 +19,6 @@ const AddModal = props => { ...@@ -19,7 +19,6 @@ const AddModal = props => {
const [keepData, setKeepData] = useState(''); const [keepData, setKeepData] = useState('');
const [form] = Form.useForm(); const [form] = Form.useForm();
useEffect(() => { useEffect(() => {
console.log(title);
form.resetFields(); form.resetFields();
setStartNodeIndex(null); setStartNodeIndex(null);
setEndNodeIndex(null); setEndNodeIndex(null);
...@@ -28,7 +27,7 @@ const AddModal = props => { ...@@ -28,7 +27,7 @@ const AddModal = props => {
if (modalType === 'edit') { if (modalType === 'edit') {
getFormData(); getFormData();
} else { } else {
form.setFieldsValue({ FlowName: title }); form.setFieldsValue({ FlowName: title, TimeLimitInt: 0, TimeUnit: '小时' });
} }
} }
}, [visible]); }, [visible]);
...@@ -71,21 +70,14 @@ const AddModal = props => { ...@@ -71,21 +70,14 @@ const AddModal = props => {
}; };
// 获取表单回显 // 获取表单回显
const getFormData = () => { const getFormData = () => {
console.log(msg);
form.setFieldsValue({ ...msg, FlowName: title }); form.setFieldsValue({ ...msg, FlowName: title });
}; };
// 表单监听 // 表单监听
const onValuesChange = val => { const onValuesChange = val => {
console.log(val);
console.log(Object.keys(val)[0]);
console.log(flowNodes);
if (Object.keys(val)[0] === 'StartNode') { if (Object.keys(val)[0] === 'StartNode') {
reloadFlowNodes({ flowName: title }).then(res => { reloadFlowNodes({ flowName: title }).then(res => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data[0].Items);
let aa = res.data[0].Items.find(i => i.name == val.StartNode); let aa = res.data[0].Items.find(i => i.name == val.StartNode);
console.log(val.StartNode);
console.log(aa.extendTableName);
getLimitadFlowNodes(aa.extendTableName); getLimitadFlowNodes(aa.extendTableName);
// 存入需要展开得节点 // 存入需要展开得节点
} }
...@@ -99,10 +91,7 @@ const AddModal = props => { ...@@ -99,10 +91,7 @@ const AddModal = props => {
if (Object.keys(val)[0] === 'EndNode') { if (Object.keys(val)[0] === 'EndNode') {
reloadFlowNodes({ flowName: title }).then(res => { reloadFlowNodes({ flowName: title }).then(res => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data[0].Items);
let aa = res.data[0].Items.find(i => i.name == val.EndNode); let aa = res.data[0].Items.find(i => i.name == val.EndNode);
console.log(val.EndNode);
console.log(aa.extendTableName);
getLimitadFlowNodesEnd(aa.extendTableName); getLimitadFlowNodesEnd(aa.extendTableName);
// 存入需要展开得节点 // 存入需要展开得节点
} }
...@@ -119,7 +108,6 @@ const AddModal = props => { ...@@ -119,7 +108,6 @@ const AddModal = props => {
form.validateFields().then(validate => { form.validateFields().then(validate => {
if (validate) { if (validate) {
let obj = {}; let obj = {};
console.log(modalType);
if (modalType === 'add') { if (modalType === 'add') {
obj = { ...validate, ID: 0 }; obj = { ...validate, ID: 0 };
} else { } else {
...@@ -154,17 +142,18 @@ const AddModal = props => { ...@@ -154,17 +142,18 @@ const AddModal = props => {
}; };
return ( return (
<Modal <Modal
title="流程节点辅助视图配置" title="流程时限规则配置"
visible={visible} visible={visible}
onOk={onFinish} onOk={onFinish}
onCancel={handleCancel} onCancel={handleCancel}
maskClosable={false} maskClosable={false}
destroyOnClose destroyOnClose
width={550}
> >
<Form <Form
form={form} form={form}
labelCol={{ span: 6 }} labelCol={{ span: 5 }}
wrapperCol={{ span: 18 }} wrapperCol={{ span: 19 }}
initialValues={{ remember: true }} initialValues={{ remember: true }}
onValuesChange={onValuesChange} onValuesChange={onValuesChange}
> >
...@@ -241,31 +230,39 @@ const AddModal = props => { ...@@ -241,31 +230,39 @@ const AddModal = props => {
</Form.Item> </Form.Item>
</div> </div>
</Form.Item> </Form.Item>
<Form.Item <Form.Item label="时限指派字段" required>
label="时限指派字段" <Form.Item
name="TimeLimitField" name="TimeLimitField"
rules={[{ required: true, message: '请选择时限指派字段' }]} rules={[{ required: true, message: '请选择时限指派字段' }]}
> >
<Select> <Select>
{timeLimitFlowNodes.map(item => ( {timeLimitFlowNodes.map(item => (
<Option value={item.Name} key={item.ID}> <Option value={item.Name} key={item.ID}>
<span>{item.Name}</span> <span>{item.Name}</span>
</Option> </Option>
))} ))}
</Select> </Select>
</Form.Item>
<div style={{ marginTop: '-15px' }}>
● 来自起始节点工单表,可以为选择器,配置读取字典表;可以为日期/时间控件,用户自行选择。
</div>
</Form.Item> </Form.Item>
<Form.Item <Form.Item label="超时记录字段" required>
label="超时记录字段" <Form.Item
name="TimeoutField" name="TimeoutField"
rules={[{ required: true, message: '请选择超时记录字段' }]} rules={[{ required: true, message: '请选择超时记录字段' }]}
> >
<Select> <Select>
{timeLimitFlowNodesEnd.map(item => ( {timeLimitFlowNodesEnd.map(item => (
<Option value={item.Name} key={item.ID}> <Option value={item.Name} key={item.ID}>
<span>{item.Name}</span> <span>{item.Name}</span>
</Option> </Option>
))} ))}
</Select> </Select>
</Form.Item>
<div style={{ marginTop: '-15px' }}>
● 来自终止节点工单表,由系统自动填写该工单是否超时。
</div>
</Form.Item> </Form.Item>
</Form> </Form>
</Modal> </Modal>
......
...@@ -219,7 +219,7 @@ const FlowNode = () => { ...@@ -219,7 +219,7 @@ const FlowNode = () => {
), ),
}, },
{ {
title: '级移交', title: '级移交',
dataIndex: 'tranferable', dataIndex: 'tranferable',
align: 'center', align: 'center',
width: 80, width: 80,
......
...@@ -28,9 +28,9 @@ const SchemeConfig = () => { ...@@ -28,9 +28,9 @@ 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> */} </TabPane>
</Tabs> </Tabs>
</div> </div>
</PageContainer> </PageContainer>
......
/* eslint-disable no-new */ /* eslint-disable no-new */
import React, { useEffect, useState, useRef } from 'react'; import React, { useEffect, useState, useRef } from 'react';
import { ArcGISMap, Drawtool, geomUtils } from '@wisdom-map/arcgismap'; import { ArcGISMap, Drawtool, geomUtils } from '@wisdom-map/arcgismap';
import { isDev } from '@/utils/tools'; import {
import { Form, Input, Slider, InputNumber, Select, Button, Cascader, notification } from 'antd'; Form,
Input,
Slider,
InputNumber,
Select,
Button,
Cascader,
notification,
Tooltip,
} from 'antd';
import { EnvironmentOutlined } from '@ant-design/icons';
import classnames from 'classnames'; import classnames from 'classnames';
import { GetWebSiteConfig } from '@/services/gis/gis'; import { GetWebSiteConfig } from '@/services/gis/gis';
import { SetServiceConfig } from '@/services/webConfig/api'; import { SetServiceConfig } from '@/services/webConfig/api';
...@@ -24,16 +34,17 @@ const Map = props => { ...@@ -24,16 +34,17 @@ const Map = props => {
const [schemeList, setSchemeList] = useState([]); const [schemeList, setSchemeList] = useState([]);
const [options, setOptions] = useState([]); const [options, setOptions] = useState([]);
const [mapsettings, setMapsettings] = useState({}); const [mapsettings, setMapsettings] = useState({});
const [setttingsSave, setSetttingsSave] = useState({});
const [flag, setFlag] = useState(0); const [flag, setFlag] = useState(0);
const mapRef = useRef(); const mapRef = useRef();
const mapInfo = useRef(null); const mapInfo = useRef(null);
// const iframeUrl =
// '/web4/?widget=product/Tool/EditBoundary/EditBoundary&serverCollextion=luanzhou,jiangninggwtest&solution=熊猫智慧水务平台';
useEffect(() => { useEffect(() => {
GetWebSiteConfig({ client: 'sandbox' }).then(res => { GetWebSiteConfig({ client: 'sandbox' }).then(res => {
console.log(res.data[0].mapsettings, 'res.data[0].mapsettings'); console.log(res.data[0].mapsettings, 'res.data[0].mapsettings');
setSchemeList(res.data[0].mapsettings.layers); setSchemeList(res.data[0].mapsettings.layers);
setMapsettings(res.data[0].mapsettings); setMapsettings(res.data[0].mapsettings);
setSetttingsSave(res.data[0].mapsettings);
let setttings = {}; let setttings = {};
res.data[0].mapsettings.layers.forEach(item => { res.data[0].mapsettings.layers.forEach(item => {
if (item.layerType === 'PipenetLayer') { if (item.layerType === 'PipenetLayer') {
...@@ -88,7 +99,7 @@ const Map = props => { ...@@ -88,7 +99,7 @@ const Map = props => {
return; return;
} }
console.log(changedFields, 'changedFields[0].name[0]'); console.log(changedFields, 'changedFields[0].name[0]');
let obj = JSON.parse(JSON.stringify(mapsettings)); let obj = JSON.parse(JSON.stringify(setttingsSave));
const index = obj.layers.findIndex( const index = obj.layers.findIndex(
item => item.schemename === form.getFieldValue('schemename'), item => item.schemename === form.getFieldValue('schemename'),
); );
...@@ -195,7 +206,7 @@ const Map = props => { ...@@ -195,7 +206,7 @@ const Map = props => {
mapObj.layers[index].backgroundColor = obj.backgroundColor; mapObj.layers[index].backgroundColor = obj.backgroundColor;
mapObj.layers[index].extent = form.getFieldValue('extent'); mapObj.layers[index].extent = form.getFieldValue('extent');
console.log(mapObj); console.log(mapObj);
setMapsettings(mapObj); setSetttingsSave(mapObj);
Drawtool.deactivate(false); Drawtool.deactivate(false);
} else { } else {
notification.error({ notification.error({
...@@ -215,17 +226,11 @@ const Map = props => { ...@@ -215,17 +226,11 @@ const Map = props => {
return ( return (
<div> <div>
<div className={styles.mapContent}> <div className={styles.mapContent}>
{/* <iframe
title="范围配置"
src={`${isDev ? 'http://192.168.12.140:8081' : window.location.origin}${iframeUrl}`}
width="99%"
height="99%"
/> */}
<div className={styles.mapTool}> <div className={styles.mapTool}>
<Form <Form
form={form} form={form}
labelCol={{ span: 8 }} labelCol={{ span: 6 }}
wrapperCol={{ span: 16 }} wrapperCol={{ span: 18 }}
onFieldsChange={changeValue} onFieldsChange={changeValue}
onFinish={onFinish} onFinish={onFinish}
> >
...@@ -238,7 +243,7 @@ const Map = props => { ...@@ -238,7 +243,7 @@ const Map = props => {
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item label="地区" name="areaName"> <Form.Item label="地区选择" name="areaName">
<Cascader <Cascader
fieldNames={{ fieldNames={{
label: 'name', label: 'name',
...@@ -253,7 +258,7 @@ const Map = props => { ...@@ -253,7 +258,7 @@ const Map = props => {
/> />
</Form.Item> </Form.Item>
<Form.Item label="背景颜色" name="backgroundColor"> <Form.Item label="遮罩颜色" name="backgroundColor">
<div className={styles.colorContent}> <div className={styles.colorContent}>
{colorArr.map(item => ( {colorArr.map(item => (
<div <div
...@@ -267,19 +272,28 @@ const Map = props => { ...@@ -267,19 +272,28 @@ const Map = props => {
))} ))}
</div> </div>
</Form.Item> </Form.Item>
<Form.Item label="透明度修改" name="backgroundOpacity"> <Form.Item label="透明度(%)" name="backgroundOpacity">
<Slider min={0} max={100} /> <Slider min={0} max={100} />
</Form.Item> </Form.Item>
<Form.Item label="边界宽度修改" name="boundWidth"> <Form.Item label="边界宽度" name="boundWidth">
<InputNumber min={1} max={10} /> <InputNumber min={1} max={10} />
</Form.Item> </Form.Item>
<Form.Item wrapperCol={{ offset: 8, span: 16 }}> <Form.Item label="复位范围">
<Button type="primary" onClick={e => onTangleClick(e)}> <div style={{ display: 'flex' }}>
复位范围修改 <Form.Item name="extent" style={{ marginBottom: '0', width: '100%' }}>
</Button> <Input.TextArea style={{ resize: 'none', height: '76px' }} disabled />
</Form.Item>
<Tooltip title="复位范围框选">
<Button
style={{ height: '76px', borderLeft: 'none' }}
icon={<EnvironmentOutlined style={{ marginTop: '5px' }} />}
onClick={e => onTangleClick(e)}
/>
</Tooltip>
</div>
</Form.Item> </Form.Item>
<Form.Item wrapperCol={{ offset: 8, span: 16 }}> <Form.Item wrapperCol={{ offset: 6, span: 18 }}>
<Button type="primary" htmlType="submit"> <Button type="primary" htmlType="submit">
提交 提交
</Button> </Button>
......
...@@ -172,7 +172,7 @@ const CardData = props => { ...@@ -172,7 +172,7 @@ const CardData = props => {
<p> <p>
<span className={styles.schemeName}>矢量</span> {props.item.servicename} <span className={styles.schemeName}>矢量</span> {props.item.servicename}
</p> </p>
<div> {/* <div>
<span className={styles.schemeName}>范围</span> <span className={styles.schemeName}>范围</span>
<Button <Button
style={{ width: '12rem', marginBottom: '0.5rem' }} style={{ width: '12rem', marginBottom: '0.5rem' }}
...@@ -180,7 +180,7 @@ const CardData = props => { ...@@ -180,7 +180,7 @@ const CardData = props => {
> >
选择范围 选择范围
</Button> </Button>
</div> </div> */}
<div className={styles.schemeItem}> <div className={styles.schemeItem}>
<span className={styles.schemeName}>瓦片</span> <span className={styles.schemeName}>瓦片</span>
<Button className={styles.schemeBtn} onClick={() => addTile(props.item)}> <Button className={styles.schemeBtn} onClick={() => addTile(props.item)}>
......
...@@ -1373,13 +1373,13 @@ const UserManage = () => { ...@@ -1373,13 +1373,13 @@ const UserManage = () => {
<Menu.Item key="4" onClick={deleteOrg} icon={<DeleteOutlined style={{ marginTop: '5px' }} />}> <Menu.Item key="4" onClick={deleteOrg} icon={<DeleteOutlined style={{ marginTop: '5px' }} />}>
删除当前机构 删除当前机构
</Menu.Item> </Menu.Item>
<Menu.Item {/* <Menu.Item
key="5" key="5"
onClick={EditOrgScope} onClick={EditOrgScope}
icon={<BorderlessTableOutlined style={{ marginTop: '5px' }} />} icon={<BorderlessTableOutlined style={{ marginTop: '5px' }} />}
> >
编辑机构范围 编辑机构范围
</Menu.Item> </Menu.Item> */}
</Menu> </Menu>
); );
// 用户批量操作 // 用户批量操作
......
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