Commit c9796a25 authored by 涂伟's avatar 涂伟
parents 7a754d79 46fd6d9d
Pipeline #95415 failed with stages
......@@ -94,9 +94,11 @@
"@wangeditor/editor-for-react": "^1.0.6",
"@wisdom-cesium/cesium": "1.1.12",
"@wisdom-cesium/krpano": "^1.0.29-60",
"@wisdom-map/amap":"^2.0.15",
"@wisdom-map/arcgismap":"^2.0.97",
"@wisdom-map/basemap":"^2.0.4",
"@wisdom-map/gis-component": "^1.0.25",
"@wisdom-map/gis-utils": "^1.0.20",
"@wisdom-map/pd-map": "^1.0.106",
"@wisdom-utils/components": "0.1.337",
"@wisdom-utils/utils": "0.1.377",
"ace-builds": "^1.4.12",
......@@ -129,7 +131,7 @@
"jszip": "^3.10.1",
"lodash": "4.17.11",
"minimist": "1.2.0",
"panda-xform": "6.10.69",
"panda-xform": "6.10.87",
"parseForm": "^2.3.8",
"prop-types": "15.7.2",
"qrcode.react": "^3.1.0",
......
......@@ -8,7 +8,6 @@ import 'sanitize.css/sanitize.css';
import React from 'react';
import ReactDOM from 'react-dom';
// import { ArcGISMap as MapComponent } from '@wisdom-map/arcgismap';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/es/locale/zh_CN';
import { ConnectedRouter } from 'connected-react-router/immutable';
......
/* eslint-disable no-new */
import React, { useEffect, useState, useRef } from 'react';
import { ArcGISMap, Drawtool, geomUtils } from '@wisdom-map/arcgismap';
// import { AMapScene, PointLayer } from '@wisdom-map/Amap';
import {
Modal,
Form,
......@@ -114,12 +112,12 @@ const Map = props => {
mapRef.current.changeBoundWidthValue(obj.layers[index].boundWidth);
break;
case 'areaName':
Drawtool.deactivate(false);
// Drawtool.deactivate(false);
obj.layers[index].areaName = changedFields[0].value[changedFields[0].value.length - 1];
mapRef.current.changeAreaName(obj.layers[index].areaName);
break;
case 'schemename':
Drawtool.deactivate(false);
// Drawtool.deactivate(false);
let setttings;
obj.layers.forEach(item => {
if (item.schemename === changedFields[0].value) {
......@@ -146,36 +144,36 @@ const Map = props => {
};
// 选择范围
const onTangleClick = e => {
Drawtool.activate({
view: mapInfo.current,
action: 'extent',
drawEnd: data => {
const geom = geomUtils.toGeometry({
type: 'extent',
xmin: data.rings[0][0][0],
xmax: data.rings[0][2][0],
ymin: data.rings[0][0][1],
ymax: data.rings[0][1][1],
});
form.setFieldsValue({
extent: `${data.rings[0][0][0]},${data.rings[0][0][1]},${data.rings[0][2][0]},${data.rings[0][1][1]
}`,
});
mapRef.current.gotoGeometry(geom);
},
});
// Drawtool.activate({
// view: mapInfo.current,
// action: 'extent',
// drawEnd: data => {
// const geom = geomUtils.toGeometry({
// type: 'extent',
// xmin: data.rings[0][0][0],
// xmax: data.rings[0][2][0],
// ymin: data.rings[0][0][1],
// ymax: data.rings[0][1][1],
// });
// form.setFieldsValue({
// extent: `${data.rings[0][0][0]},${data.rings[0][0][1]},${data.rings[0][2][0]},${data.rings[0][1][1]
// }`,
// });
// mapRef.current.gotoGeometry(geom);
// },
// });
};
const onFinish = () => {
console.log(form.getFieldValue('extent'));
console.log(Drawtool.graphic, 'Drawtool');
if (!Drawtool.graphic) {
notification.error({
message: '提示',
duration: 3,
description: '请选择复位范围再保存',
});
return;
}
// console.log(form.getFieldValue('extent'));
// console.log(Drawtool.graphic, 'Drawtool');
// if (!Drawtool.graphic) {
// notification.error({
// message: '提示',
// duration: 3,
// description: '请选择复位范围再保存',
// });
// return;
// }
const obj = form.getFieldsValue();
const jsConfig = {
......@@ -271,7 +269,7 @@ const Map = props => {
</div>
<div className={styles.mapBox}>
{canLoadMap && (
<ArcGISMap ref={mapRef} getMapInfo={e => getMapInfo(e)} config={mapsettings} />
// <ArcGISMap ref={mapRef} getMapInfo={e => getMapInfo(e)} config={mapsettings} />
)}
</div>
</div>
......
......@@ -822,16 +822,16 @@ const BookConfigNew = props => {
<Select style={{ width: 100 }} options={pagingOptions} />
</Form.Item>
</Col>
<Col span={3}>
{/* <Col span={3}>
<Form.Item
{...switchLayout}
valuePropName="checked"
label="时间筛选"
name="EnableTimeFilter"
>
<Switch checkedChildren="是" unCheckedChildren="否" />
<Switch checkedChildren="是" unCheckedChildren="否" disabled/>
</Form.Item>
</Col>
</Col> */}
<Col span={3}>
<Form.Item
{...switchLayout}
......
This diff was suppressed by a .gitattributes entry.
import React, { useRef } from 'react';
import { useState, useEffect, useMemo } from 'react';
import { Button, Input, Checkbox, Tooltip, Modal, Pagination, Spin } from 'antd';
import styles from './index.less';
import QRCode from 'qrcode.react';
import { GetAllDeviceDetails } from '@/services/flow/flow';
import html2canvas from 'html2canvas';
import JSZip from 'jszip';
import { saveAs } from 'file-saver';
const downloadFileUrl = '/PandaWorkFlow/WorkFlow/AccountManage/DownloadFiles';
const QRCodeView = props => {
const { style, values, size, id } = props;
const QRCodeValue = useMemo(() => {
return `${
window.location.origin
}/civ_mobile/product/workflow/equipment/devicePatrol?DeviceCode=${
values.deviceCode
}&AccountName=${values.accountName}`;
}, [values.deviceCode, values.accountName]);
return (
<div className={styles.QRCode} style={style || {}} id={id}>
<div className={styles.company}>{values.corporateName || '智慧水务'}</div>
<div className={styles.title}>{values.title || '设备二维码'}</div>
<div className={styles.QR}>
<QRCode
value={QRCodeValue}
size={size || 290} // 二维码的大小
level="H" // 设置容错等级为最高
fgColor="#000000" // 二维码的颜色
style={{ margin: 'auto' }}
/>
<div className={styles.QRLogo}>
{values.isSystemLogo === '系统LOGO' ? (
<img
style={{ width: '100%', height: '100%' }}
src={`${
window.origin
}/civweb4/assets/images/icon/%E7%86%8A%E7%8C%AB-%E8%93%9D%E8%89%B2.png`}
/>
) : (
<img
style={{
width: '100%',
height: '100%',
display: values.labelLogoUrl ? 'block' : 'none',
}}
src={`${window.origin}${downloadFileUrl}?filePath=${values.labelLogoUrl}`}
/>
)}
</div>
</div>
<div className={styles.pandaLogo}>
<div
className={styles.pandaLogoC}
style={{ display: values.isPandaLogo ? 'block' : 'none' }}
>
<img
style={{ width: '100%', height: '100%' }}
src={require('@/assets/images/bsmanager/patrolMaintenance/maintenance/熊猫logo.png')}
/>
</div>
</div>
<div className={styles.info}>
<div className={styles.DeviceName}>{values.deviceName}</div>
<div style={{ margin: '2%' }} />
<div className={styles.DeviceCode}>{values.deviceCode}</div>
</div>
</div>
);
};
const QRCodeViewSuzhou = props => {
const { style, values, size, id } = props;
const QRCodeValue = useMemo(() => {
return `${
window.location.origin
}/civ_mobile/product/workflow/equipment/devicePatrol?DeviceCode=${
values.deviceCode
}&AccountName=${values.accountName}`;
}, [values.deviceCode, values.accountName]);
return (
<div className={styles.QRCodeSuzhou} style={style || {}} id={id}>
<div className={styles.info}>
<div className={styles.DeviceName}>{values.deviceName}</div>
<div style={{ margin: '2%' }} />
<div className={styles.DeviceCode}>{values.deviceCode}</div>
<div className={styles.infoTip}>
<img
src={require('@/assets/images/bsmanager/patrolMaintenance/maintenance/宿州tip.png')}
/>
</div>
</div>
<div className={styles.QR}>
{/* 8888888 */}
<QRCode
value={QRCodeValue}
size={size || 310}
level="H"
fgColor="#000000"
style={{ margin: 'auto' }}
/>
<div className={styles.QRLogo}>
{values.isSystemLogo === '系统LOGO' ? (
<img
alt="系统logo"
style={{ width: '100%', height: '100%' }}
src={`${
window.origin
}/civweb4/assets/images/icon/%E7%86%8A%E7%8C%AB-%E8%93%9D%E8%89%B2.png`}
/>
) : (
<img
alt="自定义logo"
style={{
width: '100%',
height: '100%',
display: values.labelLogoUrl ? 'block' : 'none',
}}
src={`${window.origin}${downloadFileUrl}?filePath=${values.labelLogoUrl}`}
/>
)}
</div>
</div>
<div className={styles.company}>{values.corporateName}</div>
</div>
);
};
const QrcodeManager = () => {
const [keys, setKeys] = useState([]);
const [dataSource, setDataSource] = useState([]);
const [checkedData, setCheckedData] = useState([]);
const [card, setCard] = useState(null);
const [show, setShow] = useState(false);
const [page, setPage] = useState({ pageIndex: 1, pageSize: 20 });
const [total, setTotal] = useState(0);
const [searchVal, setSearchVal] = useState('');
const [loadding, setLoadding] = useState(false);
useEffect(() => {
getData({ ...page, ...searchVal });
}, []);
const getData = async params => {
const res = await GetAllDeviceDetails(params);
if (res.code === 0) {
setDataSource(res.data.list || []);
setTotal(res.data.totalCount);
}
};
const itemCheck = (e, item) => {
let checked = e.target.checked;
if (checked) {
setKeys([...keys, item.deviceCode]);
setCheckedData([...checkedData, item]);
} else {
setKeys(keys.filter(k => k !== item.deviceCode));
setCheckedData(checkedData.filter(v => v.deviceCode !== item.deviceCode));
}
};
const checkAll = e => {
let checked = e.target.checked;
setKeys(checked ? dataSource.map(v => v.deviceCode) : []);
setCheckedData(checked ? dataSource : []);
};
const showPreview = v => {
setCard(v);
setShow(true);
};
const onSearch = value => {
setSearchVal(value);
setPage({ pageIndex: 1, pageSize: 20 });
getData({ pageIndex: 1, pageSize: 20, accountName: value });
};
const pageChange = (pageIndex, pageSize) => {
setPage({ pageIndex, pageSize });
getData({ pageIndex, pageSize, accountName: searchVal });
};
const Allexport = async () => {
setLoadding(true);
let zip = new JSZip();
if (checkedData.length) {
for (let i = 0; i < checkedData.length; i++) {
let row = checkedData[i];
const canvas = document.getElementById(row.deviceCode);
const can = await html2canvas(canvas, {
allowTaint: false,
useCORS: true,
width: 610,
scale: 6,
});
let img = new Image();
img.src = can.toDataURL('image/png');
zip.file(`${row.deviceName}_${row.deviceCode}.png`, dataURLtoBlob(img.src));
}
}
zip.generateAsync({ type: 'blob' }).then(res => {
saveAs(res, `${searchVal || '批量下载'}.zip`);
setLoadding(false);
});
};
const dataURLtoBlob = dataurl => {
var arr = dataurl.split(',');
var mime = arr[0].match(/:(.*?);/)[1];
var bstr = atob(arr[1]);
var n = bstr.length;
var u8arr = new Uint8Array(n);
while (n--) {
u8arr[n] = bstr.charCodeAt(n);
}
return new Blob([u8arr], { type: mime });
};
return (
<div className={styles.valvePanel}>
<div className={styles.mainPage}>
<div className={styles.top}>
<div className={styles.pleft}>
<Checkbox style={{ width: '100px' }} onChange={e => checkAll(e)}>
全选
</Checkbox>
<Input.Search
style={{ minWidth: '280px' }}
placeholder="请输入检索内容"
onSearch={onSearch}
allowClear
/>
<Button style={{ marginLeft: '10px' }} type="primary" onClick={() => Allexport()}>
批量下载二维码
</Button>
</div>
</div>
<div className={styles.bottom}>
<Spin spinning={loadding} tip="下载中...">
<div className={styles.cards}>
{dataSource.map(v => {
return (
<div className={styles.card} key={`${v.deviceCode}`}>
<div className={styles.cardBg}>
<div className={styles.header}>
<div className={styles.rleft}>
<span className={styles.ticon} />
<span>{v.deviceName}</span>
<span>{`(${v.deviceCode})`}</span>
</div>
<div className={styles.rright}>
<Checkbox
checked={keys.some(s => s === v.deviceCode)}
onChange={e => itemCheck(e, v)}
/>
</div>
</div>
<div className={styles.content}>
<div
className={styles.timg}
onClick={() => {
showPreview(v);
}}
>
{v.template === 'default' || !v.template ? (
<QRCodeView style={{ zoom: 0.2 }} size={330} values={v} />
) : (
<QRCodeViewSuzhou style={{ zoom: 0.2 }} size={330} values={v} />
)}
</div>
<div className={styles.items}>
<div className={styles.item}>
<div className={styles.label}>台账名称</div>
<div className={styles.value}>
<Tooltip title={v.accountName}>{v.accountName}</Tooltip>
</div>
</div>
<div className={styles.item}>
<div className={styles.label}>设备名称</div>
<div className={styles.value}>
<Tooltip title={v.deviceName}>{v.deviceName}</Tooltip>
</div>
</div>
<div className={styles.item}>
<div className={styles.label}>设备编码</div>
<div className={styles.value}>{v.deviceCode}</div>
</div>
<div className={styles.item}>
<div className={styles.label}>设备类型</div>
<div className={styles.value}>
<Tooltip title={v.deviceType}>{v.deviceType}</Tooltip>
</div>
</div>
{/* <div className={styles.item}>
<div className={styles.label}>最近维护</div>
<div className={styles.value} style={{ overflow: 'hidden' }}>{v.lastModified}</div>
</div> */}
</div>
</div>
</div>
</div>
);
})}
</div>
</Spin>
<div className={styles.footer}>
<Pagination
pageSizeOptions={[10, 20, 50, 100, 200]}
current={page.pageIndex}
pageSize={page.pageSize}
total={total}
showSizeChanger
showTotal={count => `共计 ${count} 条`}
onChange={pageChange}
/>
</div>
</div>
</div>
<Modal
wrapClassName={styles.QRCodeMinModal}
onCancel={() => setShow(false)}
visible={show}
footer={null}
width={620}
bodyStyle={{ width: '100%', height: '980px', padding: '0' }}
>
{card?.template === 'default' || !card?.template ? (
<QRCodeView values={card} />
) : (
<QRCodeViewSuzhou values={card} />
)}
</Modal>
<div
id={'QRCodeBoxs'}
style={{ position: 'fixed', left: '-1200px', top: '-1200px', background: '#fff' }}
>
{checkedData.map((row, i) => {
const Component =
row.template === 'default' || !row.template ? QRCodeView : QRCodeViewSuzhou;
return (
<Component
key={i}
id={row.deviceCode}
values={row}
style={{ width: '610px', height: '980px', margin: '0 auto' }}
/>
);
})}
</div>
</div>
);
};
export default QrcodeManager;
@imgSrc: '@/assets/images/bsmanager/patrolMaintenance/maintenance';
.valvePanel {
width: 100%;
height: 100%;
padding: 0.3%;
.mainPage {
width: 100%;
height: 100%;
.top {
width: 100%;
height: 50px;
padding: 0 10px;
background: white;
display: flex;
align-items: center;
justify-content: space-between;
.pleft {
display: flex;
align-items: center;
}
}
.bottom {
width: 100%;
height: calc(100% - 115px);
overflow: auto;
.cards {
width: 100%;
display: flex;
flex-wrap: wrap;
.card {
margin-top: 7px;
width: 24.7%;
height: 240px;
border: 1px solid #96C5FB;
border-radius: 5px;
margin-left: 0.3%;
background: linear-gradient(to bottom, #D8EBFF, #FFFFFF);
.cardBg {
width: 100%;
height: 100%;
padding: 10px;
background: url('./img/卡片背景.png') no-repeat;
background-size: 50% 50%;
background-position: right 0 top 0;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
.rleft {
display: flex;
align-items: center;
padding-left: 10px;
// .ticon {
// display: inline-block;
// width: 30px;
// height: 28px;
// background: url('@{imgSrc}/阀门.png');
// background-size: 100% 100%;
// margin-right: 5px;
// }
}
}
.content {
margin-top: 2px;
width: 100%;
height: calc(100% - 29px);
display: flex;
.timg {
width: 140px;
height: 100%;
display: flex;
justify-content: center;
position: relative;
transition: all 0.3s ease-in-out;
&:hover {
cursor: pointer;
transform: scale(1.1);
}
.timgtext {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: white;
opacity: 0.8;
}
}
.items {
flex: 1;
margin-left: 5px;
padding: 15px 5px;
.item {
display: flex;
height: 31.5px;
line-height: 31.5px;
&:nth-child(1) {
border-top: 1px solid #D9E1EA;
}
.label {
width: 80px;
background: #F1F7FD;
border: 1px solid #D9E1EA;
border-top: none;
border-right: none;
padding-left: 7px;
}
.value {
flex: 1;
background: white;
border: 1px solid #D9E1EA;
border-top: none;
padding-left: 7px;
overflow: hidden;
}
}
}
}
}
}
.lists {
height: 100%;
background: white;
padding: 10px;
.rowLayerName {
background: #EEF6FF;
color: #2B8FFF;
padding: 2px 7px;
border-radius: 3px;
border: 1px solid;
}
.fileView {
display: flex;
justify-content: center;
align-items: center;
.imgSpan {
position: relative;
transition: all 0.2s ease-in;
&:hover {
cursor: pointer;
transform: scale(1.2);
}
.img {
max-width: 40px;
max-height: 40px;
}
.imgSub {
position: absolute;
top: 0;
right: 0;
background: red;
color: white;
width: 14px;
height: 14px;
text-align: center;
line-height: 14px;
font-size: 12px;
border-radius: 50%;
}
}
}
:global {
.@{ant-prefix}-table-wrapper {
height: 100%;
.@{ant-prefix}-spin-nested-loading {
height: 100%;
}
.@{ant-prefix}-spin-container {
height: 100%;
}
.@{ant-prefix}-table {
height: 100%;
.@{ant-prefix}-table-container {
height: 100%;
}
}
}
.@{ant-prefix}-table.@{ant-prefix}-table-bordered>.@{ant-prefix}-table-container {
border-left: 1px solid #dbe7fb;
.ant-table-header>table {
border-top: 1px solid #dbe7fb;
}
}
.@{ant-prefix}-table-thead>tr {
height: 40px;
th {
text-align: center;
border-top: 1px solid #dbe7fb;
font-weight: bold;
overflow: inherit;
user-select: none;
border-bottom: 1px solid #dbe7fb;
background: linear-gradient(to bottom, #FFFFFF, #E5F0FD);
&:nth-child(1) {
border-left: 1px solid #dbe7fb;
}
&:last-child {
border-right: 1px solid #dbe7fb;
}
}
}
.@{ant-prefix}-table-tbody>tr {
&:nth-child(2n-1) {
td {
background: #f6f9fe;
}
}
td {
border-bottom: 1px solid #dbe7fb;
border-right: 1px solid #dbe7fb !important;
&:nth-child(1) {
border-left: 1px solid #dbe7fb;
}
&:last-child {
border-right: 1px solid #dbe7fb;
}
}
&:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) {
td {
background: rgb(237, 242, 255) !important;
}
}
}
.@{ant-prefix}-table-body {
overflow-x: scroll;
&::-webkit-scrollbar {
width: 0;
height: 12px;
}
&::-webkit-scrollbar {
width: 0;
height: 6px;
}
&::-webkit-scrollbar-thumb {
background: rgb(41, 166, 255);
}
&::-webkit-scrollbar-track {
background: #f7f4f5;
padding: 0 3px;
}
}
}
}
.footer {
height: 50px;
padding-right: 10px;
background: white;
display: flex;
align-items: center;
justify-content: flex-end;
position: absolute;
width: 100%;
bottom: 0;
}
}
}
}
.QRCode {
width: 100%;
height: 100%;
background: url('@{imgSrc}/二维码背景.png');
background-size: 100% 100%;
position: relative;
.company {
height: 100px;
color: white;
padding: 3%;
text-align: center;
font-size: 40px;
}
.title {
text-align: center;
color: white;
font-weight: 700;
font-size: 52px;
font-style: italic;
}
.QR {
position: absolute;
top: 37.5%;
left: 26.2%;
width: 47.3%;
height: 29.7%;
overflow: hidden;
.QRLogo {
z-index: 99;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 86px;
height: 86px;
.systemLogo {
width: 100%;
height: 100%;
background: url('@{imgSrc}/熊猫-蓝色.png');
background-size: 100% 100%;
}
}
}
.pandaLogo {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 22%;
width: 47%;
height: 5%;
.pandaLogoC {
// width: 100%;
// height: 100%;
// background: url('@{imgSrc}/熊猫logo.png');
// background-size: 100% 100%;
}
}
.info {
position: absolute;
left: 50%;
bottom: 6%;
transform: translateX(-50%);
width: 84%;
height: 10%;
.tag {
margin-left: 29%;
padding: 4px 20px;
border-radius: 2px;
}
.DeviceName {
text-align: center;
font-weight: bold;
font-size: 30px;
}
.DeviceCode {
text-align: center;
font-weight: bold;
font-size: 30px;
}
}
}
.QRCodeSuzhou {
width: 100%;
height: 100%;
background: url('@{imgSrc}/宿州二维码背景.png');
background-size: 100% 90%;
position: relative;
.company {
height: 100px;
width: 100%;
color: #0086D1;
padding: 3%;
text-align: center;
background: white;
position: absolute;
bottom: 0;
font-family: 'FZZYK', sans-serif;
font-size: 40px;
}
.title {
text-align: center;
color: white;
font-weight: 700;
font-style: italic;
font-size: 52px;
}
.QR {
position: absolute;
top: 32.5%;
left: 22%;
// transform: translate(-50%, -50%);
width: 56.3%;
height: 35.7%;
overflow: hidden;
background: #fff;
border-radius: 25px;
display: flex;
justify-content: center;
align-items: center;
// position: absolute;
// top: 37.5%;
// left: 26.2%;
// width: 47.3%;
// height: 29.7%;
// overflow: hidden;
.QRLogo {
z-index: 99;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 86px;
height: 86px;
.systemLogo {
width: 100%;
height: 100%;
background: url('@{imgSrc}/熊猫-蓝色.png');
background-size: 100% 100%;
}
}
}
.pandaLogo {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 22%;
width: 47%;
height: 5%;
}
.info {
position: absolute;
left: 50%;
top: 6%;
transform: translateX(-50%);
width: 84%;
height: 15%;
background: url('@{imgSrc}/宿州标题.png');
background-size: 100% 40%;
background-repeat: no-repeat;
background-position-y: 100%;
text-align: center;
.infoTip {
position: absolute;
bottom: 5px;
left: 50%;
transform: translate(-50%, 120%);
img {
width: 60px;
}
}
.tag {
// margin-left: 29%;
padding: 4px 20px;
border-radius: 2px;
}
.DeviceName {
text-align: center;
font-weight: bold;
color: #fff;
font-size: 30px;
}
.DeviceCode {
text-align: center;
font-weight: bold;
color: #0086D1;
position: absolute;
left: 50%;
bottom: 4px;
font-size: 30px;
transform: translateX(-50%);
}
}
}
.QRCodeMinModal {
.ant-modal {
zoom: 0.5;
}
.ant-modal-close-x {
width: 40px;
height: 40px;
color: white;
}
}
\ No newline at end of file
......@@ -412,7 +412,7 @@ const FlowChart = props => {
ExtendPageList: [],
FlowNodeBackfillConfigs: [],
FlowTimerList: [],
TurnOnCc: 1,
TurnOnCc: 0,
NodeAliasName: '',
TableName: '',
Fields: '',
......
......@@ -70,7 +70,7 @@ const ConfigOperate = (props, ref) => {
}
loadRollbackNodes({ flowNodeId: editMsg.ActivityId }).then(res => {
if (res.code === 0) {
setBackNodes(res.data);
setBackNodes([...res.data, { Name: '自定义节点', AliasName: '自定义节点' }]);
}
});
};
......
......@@ -328,3 +328,15 @@
.schemeBox {
height: calc(100% - 51px);
}
.layerTitle{
display: flex;
align-items: center;
gap: 5px;
cursor: pointer;
.layerTitle_icon{
width: 3px;
border-radius: 2px;
height: 16px;
background-color: #4699f4;
}
}
......@@ -5,24 +5,11 @@
/* eslint-disable no-new */
import React, { useEffect, useState, useRef, useMemo } from 'react';
import { SketchPicker } from 'react-color';
import {
ArcGISMap,
ArcGISSceneMap,
Drawtool,
EditTool,
geomUtils,
PipenetStylesCenter,
MapImageLayer,
GraphicsLayer,
watchUtils,
SimpleFillSymbol,
Graphic,
EditAndDrawPanel,
Handles,
ImageTileLayer
} from '@wisdom-map/arcgismap';
import { checkInternalNetwork } from '@/utils/utils';
import { getPipenetLayer } from '@wisdom-map/basemap';
import {PdMap} from '@wisdom-map/pd-map'
import { mapConfig } from '@wisdom-map/gis-utils'
import { PipenetStylesCenter , EditPanel as EditAndDrawPanel } from '@wisdom-map/gis-component'
import mapDataJson from './mapData.json';
import {
Form,
......@@ -57,6 +44,7 @@ import { GetWebSiteConfig } from '@/services/gis/gis';
import { SetServiceConfig, GetSpriteSheet } from '@/services/webConfig/api';
import { formatTimeStr } from 'antd/lib/statistic/utils';
import styles from './index.less';
import { isString } from 'lodash';
const { Option } = Select;
const defaultMap = {
basemaps: [
......@@ -152,6 +140,12 @@ const widgets = [
bottom: 45,
config: {},
},
{
label: '滤镜',
right: 20,
bottom: 150,
config: {},
}
];
const Map = props => {
const { visible, onCancel, schemename } = props;
......@@ -173,12 +167,18 @@ const Map = props => {
const [name, setName] = useState('');
const [Schemename, setSchemename] = useState({});
const [radio, setRadio] = useState();
const mapRef = useRef();
// const mapRef = useRef();
const PdSceneRef = useRef(null)
const mapApiRef = useRef(null)
const viewRef = useRef(null)
const styleRef = useRef();
const mapInfo = useRef(null);
const [keep, setKeep] = useState('');
const [keepSave, setKeepSave] = useState('');
const [map, setMap] = useState(null);
// const [map, setMap] = useState(null);
const [PdScene, setPdScene] = useState(null)
const [color, setColor] = useState('');
const [colorList, setColorList] = useState('');
const [keepColor, setKeepColor] = useState('');
......@@ -202,7 +202,7 @@ const Map = props => {
const [hide, setHide] = useState(false);
const [hideChange, setHideChange] = useState(null);
const [keepNameCustomPointExtent, setKeepNameCustomPointExtent] = useState(''); // 保存方案初始自定义区域
const mapHandles = useRef(new Handles())
const mapHandles = useRef(null)
useEffect(() => {
GetWebSiteConfig({ client: 'sandbox' })
......@@ -268,7 +268,7 @@ const Map = props => {
});
let hh = {};
hh.rings = rings;
data.geometry = geomUtils.toGeometry(hh);
data.geometry = hh;
setResultData({ ...data });
}
} else {
......@@ -419,7 +419,7 @@ const Map = props => {
});
let hh = {};
hh.rings = rings;
data.geometry = geomUtils.toGeometry(hh);
data.geometry = PdSceneRef.current.geomUtils.toGeometry(hh);
setResultData({ ...data });
}
} else {
......@@ -510,25 +510,78 @@ const Map = props => {
aa = i.id;
}
});
// const pandagis1 = new ImageTileLayer({
// id: aa,
// url: `/PandaGIS/MapServer/${aa}`,
// layerType: 'PipenetLayertest',
// title: aa,
// customParameters : {}
// });
viewObject.map.add(pandagis1);
}
}
setRadio1(form.getFieldsValue().customFlag);
setAreaFlag(0);
};
const getPdScene = PdScene => {
PdSceneRef.current = PdScene
mapApiRef.current = PdScene.getApi({
productName : "webgis",
version : "1.0.4"
})
const view = PdScene.mapView.getMapInstance()
viewRef.current = view
view.map.layers.map(item => {
if (item.layerType && item.layerType == 'PipenetLayertest') {
view.map.remove(item);
}
})
setPdScene(PdScene)
if (form.getFieldsValue().exportScheme == 'pandagis') {
let data = view.map.layers.find(
item => item.layerType && item.layerType == 'PipenetLayertest',
);
if (!data) {
// 用户自定义创建的管网图
let aa = '';
mapsettings.map(i => {
if (i.schemename == form.getFieldsValue().schemename) {
aa = i.id;
}
});
const {ImageTileLayer} = mapApiRef.current
const pandagis1 = new ImageTileLayer({
id: aa,
url: `/PandaGIS/MapServer/${aa}`,
layerType: 'PipenetLayertest',
title: aa,
customParameters : {}
});
viewObject.map.add(pandagis1);
exportScheme: 'pandagis',
customParameters : {
cityCode : PdScene.extentInfos.cityCode,
scheme : PdScene.extentInfos.scheme,
layerInfo : PdScene.layerInfo
}
})
view.map.add(pandagis1);
}
}
setRadio1(form.getFieldsValue().customFlag);
setAreaFlag(0);
};
}
// 选择颜色
const checkColor = color => {
form.setFieldsValue({ backgroundColor: color });
setColor(color);
mapRef.current.updateAreaColor(color);
PdSceneRef.current.changeMapBaseConfig({
type: "areaColor",
data: {
"color": color
}
})
// mapRef.current.updateAreaColor(color);
};
// 表单修改后对地图进行配置
......@@ -541,11 +594,23 @@ const Map = props => {
switch (changedFields[0].name[0]) {
case 'backgroundOpacity':
obj[index].backgroundOpacity = changedFields[0].value / 100;
mapRef.current.changeBackgroundOpacity(obj[index].backgroundOpacity);
// mapRef.current.changeBackgroundOpacity(obj[index].backgroundOpacity);
PdSceneRef.current.changeMapBaseConfig({
type: "backgroundOpacity",
data: {
"opacity": obj[index].backgroundOpacity
}
})
break;
case 'boundWidth':
obj[index].boundWidth = changedFields[0].value;
mapRef.current.changeBoundWidthValue(obj[index].boundWidth);
// mapRef.current.changeBoundWidthValue(obj[index].boundWidth);
PdSceneRef.current.changeMapBaseConfig({
type: "boundWidth",
data: {
"width": obj[index].boundWidth
}
})
break;
case 'areaName':
obj[index].areaName = changedFields[0].value[changedFields[0].value.length - 1];
......@@ -554,22 +619,47 @@ const Map = props => {
if (radio == 1) {
if (keepNameArea === changedFields[0].value[changedFields[0].value.length - 1]) {
if (keepNameArea !== '') {
mapRef.current.changeAreaName(keepNameArea, keepDraw);
PdSceneRef.current.changeMapBaseConfig({
type: "areaName",
data: {
"areaName": keepNameArea,
geom : keepDraw
}
})
// mapRef.current.changeAreaName(keepNameArea, keepDraw);
setDraw(1);
} else {
setDraw(0);
mapRef.current.changeAreaName(obj[index].areaName);
// mapRef.current.changeAreaName(obj[index].areaName);
PdSceneRef.current.changeMapBaseConfig({
type: "areaName",
data: {
"areaName": obj[index].areaName,
}
})
}
} else {
setDraw(0);
mapRef.current.changeAreaName(obj[index].areaName);
// mapRef.current.changeAreaName(obj[index].areaName);
PdSceneRef.current.changeMapBaseConfig({
type: "areaName",
data: {
"areaName": obj[index].areaName,
}
})
}
setAreaFlag(1);
setFlag(0);
Drawtool.deactivate(false);
PdSceneRef.current.mapView.DrawTool.deactivate(false);
setArea('');
} else {
mapRef.current.changeAreaName(obj[index].areaName);
PdSceneRef.current.changeMapBaseConfig({
type: "areaName",
data: {
"areaName": obj[index].areaName,
}
})
// mapRef.current.changeAreaName(obj[index].areaName);
}
setNewDraw(0);
......@@ -592,11 +682,11 @@ const Map = props => {
// setFirstList({ ...aa });
break;
case 'schemename':
const filterLyrs = mapInfo.current?.map.layers.filter(item => {
const filterLyrs = viewRef.current?.map.layers.filter(item => {
return item.pipenetImark;
});
if (filterLyrs.length) {
mapInfo.current.map.removeMany(filterLyrs);
viewRef.current.map.removeMany(filterLyrs);
}
setKeepDataDraw([]);
setRadio1('');
......@@ -631,7 +721,10 @@ const Map = props => {
});
let list = {};
list.layers = dalist;
mapRef.current.mapchange(dalist);
const pipentLayer = list.layers.find(i => i.layerType.toLowerCase() == "pipenetlayer")
PdSceneRef.current.changePipePlan(pipentLayer.schemename,list.layers)
// mapRef.current.mapchange(dalist);
// setFirstList({ ...list });
})
.catch(err => {
......@@ -650,7 +743,7 @@ const Map = props => {
}
});
setArea('');
Drawtool.deactivate(false);
PdSceneRef.current.mapView.DrawTool.deactivate(false);
let setttings;
obj.forEach(item => {
......@@ -695,7 +788,7 @@ const Map = props => {
});
let hh = {};
hh.rings = rings;
data.geometry = geomUtils.toGeometry(hh);
data.geometry = PdSceneRef.current.geomUtils.toGeometry(hh);
setResultData({ ...data });
}
} else {
......@@ -724,8 +817,10 @@ const Map = props => {
setRadio(setttings.exportScheme || 'pandagis');
}
setRadio1(setttings.customFlag);
mapRef.current.mapchange(obj);
// debugger
const pipentLayer = obj.find(i => i.layerType.toLowerCase() == "pipenetlayer")
PdSceneRef.current.changePipePlan(pipentLayer.schemename,obj)
// mapRef.current.mapchange(obj);
break;
default:
......@@ -736,14 +831,14 @@ const Map = props => {
// 选择范围
const onTangleClick = e => {
let aa = 0;
Drawtool.activate({
view: mapInfo.current,
PdScene.mapView.DrawTool.activate({
view: viewRef.current,
action: 'extent',
drawEnd: data => {
aa = 1;
setLoad(false);
setArea(data);
const geom1 = geomUtils.toGeometry({
const geom1 = PdSceneRef.current.geomUtils.toGeometry({
type: 'extent',
xmin: data.rings[0][0][0],
xmax: data.rings[0][2][0],
......@@ -754,7 +849,9 @@ const Map = props => {
extent: `${data.rings[0][0][0]},${data.rings[0][1][1]},${data.rings[0][2][0]},${data.rings[0][0][1]
}`,
});
mapRef.current.gotoGeometry(geom1);
PdSceneRef.current.gotoGeometry({
geometry : geom1
})
},
});
setTimeout(() => {
......@@ -763,13 +860,17 @@ const Map = props => {
};
useEffect(() => {
if(!map) return
const viewObject = map
if(!(PdScene && mapApiRef.current)) return
const {Handles, watchUtils} = mapApiRef.current
// const viewObject = map
if(!mapHandles.current) {
mapHandles.current = new Handles()
}
if(mapHandles.current) {
mapHandles.current.removeAll()
mapHandles.current.add(watchUtils.watch(viewObject, ['zoom'], newzoom => {
mapHandles.current.add(watchUtils.watch(viewRef.current, ['zoom'], newzoom => {
// 鼠标滚动隐藏管网图
viewObject.map.layers.find(layer => {
viewRef.current.map.layers.find(layer => {
if (layer.layerType == 'PipenetLayer') {
layer.visible = false;
}
......@@ -779,7 +880,7 @@ const Map = props => {
return () => {
mapHandles.current && mapHandles.current.removeAll()
}
}, [map])
}, [PdScene])
useEffect(() => {
if (name && !hide) {
......@@ -798,7 +899,14 @@ const Map = props => {
});
let area1 = form.getFieldsValue().areaName;
mapRef.current.changeAreaName(area1[area1.length - 1], geom1);
PdSceneRef.current.changeMapBaseConfig({
type: "areaName",
data: {
"areaName": area1[area1.length - 1],
geom : geom1
}
})
// mapRef.current.changeAreaName(area1[area1.length - 1], geom1);
form.setFieldsValue({
customPointExtent: geom1,
});
......@@ -824,7 +932,7 @@ const Map = props => {
let aa = JSON.parse(form.getFieldsValue().customPointExtent);
form.setFieldsValue({ customPointExtent: aa.geometry });
}
Drawtool.deactivate(false);
PdSceneRef.current.mapView.DrawTool.deactivate(false);
};
// 提交
......@@ -945,7 +1053,7 @@ const Map = props => {
setDraw(0);
}
setSetttingsSave(mapObj);
Drawtool.deactivate(false);
PdSceneRef.current.mapView.DrawTool.deactivate(false);
// setArea('');
setKeepSave('');
......@@ -960,29 +1068,46 @@ const Map = props => {
});
};
const pandagis = useMemo(() => new ImageTileLayer({
const pandagis = useMemo(() => {
if(!(PdScene && mapApiRef.current)) return
const {ImageTileLayer} = mapApiRef.current
const image = new ImageTileLayer({
id: keep.id,
url: `/PandaGIS/MapServer/${keep.id}`,
layerType: 'PipenetLayertest',
title: keep.id,
customParameters : {}
}), [keep])
exportScheme: 'pandagis',
customParameters : {
cityCode : PdScene.extentInfos.cityCode,
scheme : PdScene.extentInfos.scheme,
layerInfo : PdScene.layerInfo
}
})
return image
}, [keep, PdScene])
const onChange = e => {
const { layer } = getPipenetLayer(mapInfo.current?.map);
if (layer) {
layer.visible = false;
const layers = PdSceneRef.current?.pipentImage?.data?.layers
if(layers) {
layers.map(layer => {
layer.visible = false
})
}
// const { layer } = getPipenetLayer(mapInfo.current?.map);
// if (layer) {
// layer.visible = false;
// }
if (e.target.value == 'arcgis') {
// 选择前端绘制时,如果界面有自定义的管网图就隐藏,打开组件自动生成前端管网图
mapInfo.current.map.layers.forEach(item => {
viewRef.current.map.layers.forEach(item => {
if (item.layerType && item.layerType == 'PipenetLayertest') {
mapInfo.current.map.remove(item);
viewRef.current.map.remove(item);
}
});
} else {
// 选择后端绘制时创建自定义的管网图,前端管网被组件关闭自动销毁
mapInfo.current.map.add(pandagis);
// mapInfo.current.map.add(pandagis);
viewRef.current.map.add(pandagis)
}
setRadio(e.target.value);
};
......@@ -991,14 +1116,27 @@ const Map = props => {
setResultData(null);
if (e.target.value == 0) {
let data = form.getFieldsValue().areaName;
mapRef.current.changeAreaName(data[data.length - 1]);
// mapRef.current.changeAreaName(data[data.length - 1]);
PdSceneRef.current.changeMapBaseConfig({
type: "areaName",
data: {
"areaName": data[data.length - 1],
}
})
setButState(false);
Drawtool.deactivate();
PdSceneRef.current.mapView.DrawTool.deactivate();
setRadio1(e.target.value);
} else {
if (keepDraw) {
let area1 = form.getFieldsValue().areaName;
mapRef.current.changeAreaName(area1[area1.length - 1], keepDraw);
// mapRef.current.changeAreaName(area1[area1.length - 1], keepDraw);
PdSceneRef.current.changeMapBaseConfig({
type: "areaName",
data: {
"areaName": area1[area1.length - 1],
geom : keepDraw
}
})
let data = {};
data.type = keepType;
let rings = [];
......@@ -1007,7 +1145,7 @@ const Map = props => {
});
let hh = {};
hh.rings = rings;
data.geometry = geomUtils.toGeometry(hh);
data.geometry = PdSceneRef.current.geomUtils.toGeometry(hh);
setResultData({ ...data });
}
if (draw == 0) {
......@@ -1038,10 +1176,33 @@ const Map = props => {
// 颜色选择
const colorChange = value => {
form.setFieldsValue({ boundColor: value.hex });
mapRef.current.changeBoundColor(value.hex);
PdSceneRef.current.changeMapBaseConfig({
type: "boundColor",
data: {
"color": value.hex
}
})
// mapRef.current.changeBoundColor(value.hex);
setColorList(value.hex);
};
const getDrawDefaultGraphic = (resultData) => {
if(isString(resultData)) {
return resultData
}
if(resultData.geometry ) {
if(!(resultData.geometry.clone && resultData.geometry.spatialReference)) {
return {
...resultData,
geometry : PdSceneRef.current.geomUtils.toGeometry(resultData.geometry)
}
} else {
return resultData
}
}
return mapConfig.layer_name_edgelayer_arcgismap
}
return (
<div className={styles.mapContent}>
<div
......@@ -1213,7 +1374,13 @@ const Map = props => {
}}
onCancel={() => {
form.setFieldsValue({ boundColor: keepColor });
mapRef.current.changeBoundColor(keepColor);
PdSceneRef.current.changeMapBaseConfig({
type: "boundColor",
data: {
"color": value.hex
}
})
// mapRef.current.changeBoundColor(keepColor);
setColorList(keepColor);
}}
>
......@@ -1352,33 +1519,33 @@ const Map = props => {
</div>
<div className={styles.mapBox}>
{canLoadMap && (
<ArcGISSceneMap
ref={mapRef}
filterMap={true}
getMapInfo={e => getMapInfo(e)}
widgets={widgets}
config={firstList}
client="sandbox"
<PdMap
getPdScene = {getPdScene}
widgets = {widgets}
config = {firstList?.layers}
client = "sandbox"
/>
)}
{radio == 'arcgis' && map && name && Schemename? (
{radio == 'arcgis' && PdScene && name && Schemename ? (
<PipenetStylesCenter
schemeName={Schemename.schemename}
mapServerName={name}
view={map}
schemeName={PdScene.pipenetLayer.schemename}
mapServerName={PdScene.pipenetLayer.id}
view={PdScene.mapView.getMapInstance()}
savaCallback={onSave}
ref={styleRef}
pipenetLayer={Schemename}
pipenetLayer={PdScene.pipenetLayer}
PdScene = {PdScene}
/>
) : (
<></>
)}
{radio1 == 1 && butState ? (
{radio1 == 1 && butState && PdScene? (
<>
<EditAndDrawPanel
view={mapInfo.current}
PdScene = {PdScene}
view={viewRef.current}
editType={['POLYGON', 'EXTENT', 'CIRCLE']}
defaultGraphic={resultData || 'edgelayer-arcgismap'}
defaultGraphic={getDrawDefaultGraphic(resultData || mapConfig.layer_name_edgelayer_arcgismap)}
areaName={
form.getFieldsValue().areaName &&
form.getFieldsValue().areaName[form.getFieldsValue().areaName.length - 1]
......
import React, { useEffect, useState, useRef } from 'react';
import { Spin, notification, Table, Modal, Tooltip } from 'antd';
import { Spin, notification, Table, Modal, Tooltip, message } from 'antd';
import { ApartmentOutlined, PartitionOutlined } from '@ant-design/icons';
import Tree from '@/components/ExpendableTree';
import { GetLayerList, GetMetaDataPreview, GetLayerMetaDataPreview } from '@/services/gis/gis';
import { GetLayerList, GetMetaDataPreview, GetLayerMetaDataPreview, EditLayerMetaDataInfo } from '@/services/gis/gis';
import { set } from 'lodash';
import styles from '../SchemeConfig.less';
const MeteDataModal = props => {
......@@ -12,8 +12,8 @@ const MeteDataModal = props => {
const [isLoading, setIsLoading] = useState(false);
const [loading, setLoading] = useState(false);
const [expendKey, setExpendKey] = useState(''); // 保存默认展开项
const [recored, setRecored] = useState('');
const setRowClassName = e => (e.layerID === recored.layerID ? styles.clickRowStyle : '');
const [selectLayerIds,setSelectLayerIds] = useState ([])
const layerList = useRef([])
useEffect(() => {
if (visible) {
......@@ -24,12 +24,52 @@ const MeteDataModal = props => {
}
}, [visible]);
const handleLayerTree = (list) =>{
let treeList = []
list.forEach(i=>{
if(i.parentLayerId == -1){
let param= {
title:<span onClick={()=>{onSelect(i)}}>{i.title}</span>,
key:i.key,
children:list.filter(j=>j.parentLayerId === i.layerID).map(k=>{
return {
title: <span onClick={()=>{onSelect(k)}}>{k.title}</span>,
key:k.key,
children:[]
}
})
}
treeList.push(param)
}
})
return treeList
}
const getMeteData = () => {
setIsLoading(true)
GetLayerList({ serviceName: metaData.GISServerProjectName }).then(res => {
setIsLoading(false)
if (res.success) {
getTree();
setMetedataList(res.root);
setRecored(res.root[0]);
let allKeys = []
let roots = []
res.root.forEach(i=>{
if(i.layerID){
let key = `${i.parentLayerId}_${i.layerID}`
let params = {
...i,
title:i.layerName,
key,
}
if(i.defaultVisibility && i.parentLayerId != -1){
allKeys.push(key)
}
roots.push(params)
}
})
layerList.current = roots
setSelectLayerIds(allKeys)
setMetedataList(handleLayerTree(roots));
} else {
notification.error({
message: '提示',
......@@ -43,21 +83,15 @@ const MeteDataModal = props => {
const getTree = () => {
setLoading(true);
GetMetaDataPreview({ serviceName: metaData.GISServerProjectName }).then(res => {
console.log(res);
setExpendKey('0-0');
setLoading(false);
setCurrentMeta(res);
});
};
const columns = [
{
title: '图层',
dataIndex: 'layerName',
width: 150,
key: 'layerName',
},
];
const handleCheck = (keys) =>{
setSelectLayerIds(keys)
}
// 渲染机构树
const mapTree = org => {
......@@ -95,10 +129,8 @@ const MeteDataModal = props => {
};
const onSelect = e => {
console.log(e);
setRecored(e);
setLoading(true);
if (e.layerID != null) {
if (e?.layerID != null) {
GetLayerMetaDataPreview({
serviceName: metaData.GISServerProjectName,
layerID: e.layerID,
......@@ -111,7 +143,30 @@ const MeteDataModal = props => {
}
};
const onSubmit = () => {};
const onSubmit = () => {
let items = [];
layerList.current.forEach(i => {
let defaultVisibility = selectLayerIds.includes(i.key)
if(i.parentLayerId == -1 ){
defaultVisibility = selectLayerIds.some(j=>j.includes(`${i.layerID}_`))
}
let name = i.layerName.split(':')[1]
items.push({
name,
infos: {
defaultVisibility,
},
});
});
EditLayerMetaDataInfo(metaData.GISServerProjectName,items).then(res=>{
if(res.code ==0){
onCancel()
return message.success(res.data)
}else{
return message.info(res?.data || '元数据信息修改失败!')
}
})
};
return (
<Modal
visible={visible}
......@@ -128,22 +183,25 @@ const MeteDataModal = props => {
<Spin spinning={isLoading}>
<div style={{ width: '1000px', height: '640px', display: 'flex' }}>
<div style={{ width: '300px' }}>
<Table
onRow={record => ({
onClick: e => {
onSelect(record);
}, // 点击行
})}
bordered
rowClassName={setRowClassName}
pagination={false}
style={{ width: '300px' }}
columns={columns}
dataSource={metedataList}
size="small"
scroll={{
y: '600px',
<div
className={styles.layerTitle}
onClick={() => {
onSelect();
}}
>
<div className={styles.layerTitle_icon} />
<span>地图文档</span>
</div>
<Tree
showIcon="true"
blockNode
defaultExpandAll
treeData={metedataList}
checkable
autoExpandParent={true}
onCheck={handleCheck}
checkedKeys={selectLayerIds}
expandedKeys = {metedataList?.[0]?.key || ''}
/>
</div>
<Spin spinning={loading}>
......
......@@ -3,9 +3,8 @@ import React, { useEffect, useState, useRef } from 'react';
import SiteModal from '@/components/Modal/SiteModa';
import { Spin } from 'antd';
import { GetMetaDataPreview, GetTransformationGeom } from '@/services/gis/gis';
import { ArcGISSceneMap } from '@wisdom-map/arcgismap';
import {PdMap} from '@wisdom-map/pd-map'
import axios from 'axios';
import { getConditionList } from '@wisdom-map/basemap';
const VectorPreviewModal = props => {
const { metaData, visible } = props;
......@@ -67,7 +66,7 @@ const VectorPreviewModal = props => {
id: metaData?.GISServerProjectName,
title: metaData?.GISServerProjectName,
icon: '',
layerType: '',
layerType: 'PipenetLayer',
url: `/PandaGIS/MapServer/${metaData?.GISServerProjectName}`,
opacity: '1.0',
showLegend: true,
......@@ -80,7 +79,7 @@ const VectorPreviewModal = props => {
origin: '',
tileMatrix: '',
wmtsUrl: '',
schemename: '',
schemename: '测试方案',
roles: '',
areaName: '',
boundColor: '#86c8f8',
......@@ -141,9 +140,9 @@ const VectorPreviewModal = props => {
<Spin spinning={isLoading}>
<div style={{ width: '1000px', height: '500px' }}>
{currentMeta && (
<ArcGISSceneMap
getMapInfo={e => getMapInfo(e)}
config={currentMeta}
<PdMap
getPdScene={e => getMapInfo(e)}
config={currentMeta?.layers}
client="sandbox"
widgets={[]}
/>
......
......@@ -38,7 +38,7 @@ const ChangePasswordModal = props => {
email: currentUser.email || '',
});
passwordForm.setFieldsValue({
oldPassword: currentUser.password,
// oldPassword: currentUser.password,
newPassword: '',
passwordConfirm: '',
});
......@@ -121,7 +121,7 @@ const ChangePasswordModal = props => {
// 提交-修改密码
const submitChangePassword = () => {
const oldPassword = passwordForm.getFieldValue('oldPassword');
// const oldPassword = passwordForm.getFieldValue('oldPassword');
const newPassword = passwordForm.getFieldValue('newPassword');
const passwordConfirm = passwordForm.getFieldValue('passwordConfirm');
if (
......@@ -133,7 +133,7 @@ const ChangePasswordModal = props => {
) {
updateUserPassword({
UserId: +currentUser.userId,
OldPassWord: oldPassword,
// OldPassWord: oldPassword,
NewPassWord: encipher(newPassword, pasType ? pasType : '').toUpperCase(),
})
.then(res => {
......@@ -152,7 +152,7 @@ const ChangePasswordModal = props => {
});
}
passwordForm.setFieldsValue({
oldPassword: currentUser.password,
// oldPassword: currentUser.password,
newPassword: '',
passwordConfirm: '',
});
......@@ -214,9 +214,9 @@ const ChangePasswordModal = props => {
>
<div className={styles.modalContent}>
<Form form={passwordForm} labelCol={{ span: 4 }} onFieldsChange={changeValue}>
<Form.Item name="oldPassword" label="原始密码">
{/* <Form.Item name="oldPassword" label="原始密码">
<Input disabled />
</Form.Item>
</Form.Item> */}
<div className={styles.formBox}>
<Form.Item
name="newPassword"
......
......@@ -157,6 +157,9 @@ const Holidays = asyncComponent(() => import('@/pages/bsmanager/workOrder/holida
const Maintenance = asyncComponent(() =>
import('@/pages/bsmanager/patrolMaintenance/maintenance/maintenance'),
);
const QrcodeManager = asyncComponent(() =>
import('@/pages/bsmanager/patrolMaintenance/qrcodeManager'),
);
const MaintenanceOld = asyncComponent(() =>
import('@/pages/bsmanager/patrolMaintenance/maintenance/maintenanceOld'),
);
......@@ -392,6 +395,11 @@ export default {
name: '设备巡检(旧)',
component: MaintenanceOld,
},
{
path: '/biz/patrolMaintenance/qrcodeManger',
name: '二维码管理',
component: QrcodeManager,
},
],
},
],
......
......@@ -5,7 +5,7 @@
* @LastEditTime: 2022-08-17 10:10:50
* @LastEditors: leizhe
*/
import { get, post, PUBLISH_SERVICE, PANDA_GIS } from '@/services/index';
import { get, post, PUBLISH_SERVICE, PANDA_GIS, PANDAWORKFLOW } from '@/services/index';
// 工单流程列表查询
export const reloadFlows = param =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_Flow_ReloadFlows`, param);
......@@ -120,3 +120,5 @@ export const BatchEditDeviceQRCodeConfig = query => post(`${PUBLISH_SERVICE}/Wor
//修改流程节点顺序
export const UpdateFlowNodeOrder = query => get(`${PUBLISH_SERVICE}/WorkOrderCenter/UpdateFlowNodeOrder`, query);
export const GetAllDeviceDetails = query => get(`${PANDAWORKFLOW}/DevicePatrol/GetAllDeviceDetails`, query);
import { get, post, PUBLISH_SERVICE, CITY_SERVICE, PANDA_GIS } from '@/services/index';
import { request } from '@wisdom-utils/utils';
// 1.获取全部地图方案配置
export const GetAllConfig = param => get(`${CITY_SERVICE}/OMS.svc/GetAllConfig`, param);
// 2.获取元数据
......@@ -26,3 +29,16 @@ export const GetLayerMetaDataPreview = param =>
// 查看
export const LayerSetting = param => get(`${PANDA_GIS}/MapLayer/LayerSetting`, param);
// 编辑图层元数据信息
export const EditLayerMetaDataInfo = (mapServerName,data) =>
request({
url:`${PANDA_GIS}/MetaData/EditLayerMetaDataInfo?mapServerName=${mapServerName}`,
method: 'post',
headers: {
accept: 'text/plain',
'Content-Type': 'application/json',
},
data: JSON.stringify(data),
})
......@@ -16,6 +16,7 @@ const WebSERVICE = '/PandaConfiguration/Raw';
const CoreSERVICE = '/PandaCore/GCK';
const PANDA_GIS = '/PandaGIS/MapServer';
const PandaCore = '/PandaCore/GateWay';
const PANDAWORKFLOW = '/PandaWorkFlow/WorkFlow';
const get = async (url, params, options = {}) =>
request({
url,
......@@ -48,4 +49,5 @@ export {
CoreSERVICE,
PANDA_GIS,
PandaCore,
PANDAWORKFLOW
};
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