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