modify the i18
parent
53d4b3dc58
commit
4639ebc6cf
|
@ -56,7 +56,6 @@
|
|||
"react-es6-progressbar.js": "^1.1.0",
|
||||
"react-flatpickr": "^3.10.6",
|
||||
"react-hook-form": "^4.10.2",
|
||||
"react-html-parser": "^2.0.2",
|
||||
"react-i18next": "^11.7.0",
|
||||
"react-image-lightbox": "^5.1.1",
|
||||
"react-image-video-lightbox": "^3.0.0",
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
<svg version="1.1" id="svg_01" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 1920 912" enable-background="new 0 0 1920 912" xml:space="preserve">
|
||||
|
||||
<image id="1" onclick="test()" overflow="visible" width="80" height="80" xlink:href="meter.png" transform="translate(100.0,100.0)"> </image>
|
||||
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<ellipse fill="#FFFFFF" cx="1137.5" cy="457.4" rx="44" ry="37.8"/>
|
||||
<path d="M1137.5,420c24,0,43.5,16.7,43.5,37.3s-19.5,37.3-43.5,37.3s-43.5-16.7-43.5-37.3S1113.5,420,1137.5,420 M1137.5,419
|
||||
c-24.6,0-44.5,17.2-44.5,38.3s19.9,38.3,44.5,38.3s44.5-17.2,44.5-38.3S1162.1,419,1137.5,419L1137.5,419z"/>
|
||||
</g>
|
||||
<ellipse fill="none" cx="1146" cy="460.1" rx="31" ry="31.4"/>
|
||||
|
||||
<text transform="matrix(0.7175 0 0 1 1120.8711 472.938)" stroke="#000000" stroke-miterlimit="10" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="50.1724px">A</text>
|
||||
</g>
|
||||
<text transform="matrix(0.7175 0 0 1 1077.3623 554.2559)" font-family="'AdobeSongStd-Light-GBpc-EUC-H'" font-size="50.1724px">FFF2</text>
|
||||
</g>
|
||||
|
||||
</svg>
|
Before Width: | Height: | Size: 1.1 KiB |
|
@ -20,11 +20,8 @@ import RealtimeChart from './RealtimeChart';
|
|||
import { getCookieValue, createCookie } from '../../../helpers/utils';
|
||||
import withRedirect from '../../../hoc/withRedirect';
|
||||
import { withTranslation } from 'react-i18next';
|
||||
import uuid from 'uuid/v1';
|
||||
import { toast } from 'react-toastify';
|
||||
import { APIBaseURL } from '../../../config';
|
||||
import ButtonIcon from '../../common/ButtonIcon';
|
||||
import ReactHtmlParser from 'react-html-parser';
|
||||
|
||||
const SvgSystem = ({ setRedirect, setRedirectUrl, t }) => {
|
||||
useEffect(() => {
|
||||
|
@ -45,21 +42,18 @@ const SvgSystem = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
createCookie('token', token, 1000 * 60 * 60 * 8);
|
||||
}
|
||||
});
|
||||
let table = createRef();
|
||||
|
||||
// Svg List
|
||||
const [svgSystemList, setSvgSystemList] = useState([]);
|
||||
|
||||
// Svg Content
|
||||
const [svgSystemContent, setSvgSystemContent] = useState(undefined);
|
||||
const [svgSystemContentDict, setSvgSystemContentDict] = useState(undefined);
|
||||
|
||||
// Query Parameters
|
||||
const [selectedSvgSystemID, setSelectedSvgSystemID] = useState(undefined);
|
||||
|
||||
//Results
|
||||
const [images, setImages] = useState([]);
|
||||
const [spinnerHidden, setSpinnerHidden] = useState(false);
|
||||
// Results
|
||||
const [svgSystemContent, setSvgSystemContent] = useState(undefined);
|
||||
const [svgSystemContentDict, setSvgSystemContentDict] = useState(undefined);
|
||||
|
||||
// Init: Get svgs and set the first svg
|
||||
useEffect(() => {
|
||||
let isResponseOK = false;
|
||||
fetch(APIBaseURL + '/svgs', {
|
||||
|
@ -81,7 +75,6 @@ const SvgSystem = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
.then(json => {
|
||||
console.log(json);
|
||||
if (isResponseOK) {
|
||||
console.log('svgs', json);
|
||||
setSvgSystemList(json);
|
||||
setSelectedSvgSystemID(json[0].id);
|
||||
getSvgContent(json[0].id);
|
||||
|
@ -96,12 +89,11 @@ const SvgSystem = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
|
||||
const labelClasses = 'ls text-uppercase text-600 font-weight-semi-bold mb-0';
|
||||
|
||||
let onSvgSystemChange = event => {
|
||||
const onSvgSystemChange = event => {
|
||||
setSelectedSvgSystemID(event.target.value);
|
||||
console.log('onSvgSystemChange ID', event.target.value);
|
||||
console.log('You Change the Svg ID', event.target.value);
|
||||
// Get Svg Content
|
||||
getSvgContent(event.target.value);
|
||||
|
||||
};
|
||||
|
||||
const getSvgContent = svgId => {
|
||||
|
@ -125,9 +117,8 @@ const SvgSystem = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
.then(json => {
|
||||
console.log(json);
|
||||
if (isResponseOK) {
|
||||
console.log('getSvgContent', json.content);
|
||||
setSvgSystemContent(json.content);
|
||||
setSvgSystemContentDict({__html: json.content});
|
||||
setSvgSystemContentDict({ __html: json.content });
|
||||
} else {
|
||||
toast.error(json.description);
|
||||
}
|
||||
|
@ -156,13 +147,6 @@ const SvgSystem = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
console.log('svgSystemContentDict', svgSystemContentDict);
|
||||
}, [svgSystemContentDict]);
|
||||
|
||||
const showData = (e) =>{
|
||||
console.log("showData", e);
|
||||
}
|
||||
|
||||
function test() {
|
||||
console.log("Hello World")
|
||||
}
|
||||
return (
|
||||
<Fragment>
|
||||
<div>
|
||||
|
@ -199,21 +183,9 @@ const SvgSystem = ({ setRedirect, setRedirectUrl, t }) => {
|
|||
</Form>
|
||||
</CardBody>
|
||||
</Card>
|
||||
<Row noGutters>
|
||||
<Col lg="10" className="pr-lg-2">
|
||||
<div dangerouslySetInnerHTML={svgSystemContentDict} />
|
||||
</Col>
|
||||
</Row>
|
||||
<Modal>
|
||||
<ModalHeader> {t('Data Show')} </ModalHeader>
|
||||
<ModalBody>
|
||||
|
||||
</ModalBody>
|
||||
|
||||
<ModalFooter>
|
||||
|
||||
</ModalFooter>
|
||||
</Modal>
|
||||
<Card className="bg-light">
|
||||
<div dangerouslySetInnerHTML={svgSystemContentDict} />
|
||||
</Card>
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB |
|
@ -46,6 +46,7 @@ const resources = {
|
|||
'Tenant Bill': 'Tenant Bill',
|
||||
'Energy Flow Diagram': 'Energy Flow Diagram',
|
||||
'Distribution System':'Distribution System',
|
||||
'Svg System': 'Flat Data Show System',
|
||||
'Fault Statistics': 'Fault Statistics',
|
||||
'Space Faults Data': 'Space Faults',
|
||||
'Equipment Faults Data': 'Equipment Faults',
|
||||
|
@ -845,6 +846,7 @@ const resources = {
|
|||
'Tenant Bill': 'Mieter Rechnung',
|
||||
'Energy Flow Diagram': 'Energieflussdiagramm',
|
||||
'Distribution System': 'Vertriebssystem',
|
||||
'Svg System': 'Flache Datenanzeige',
|
||||
'Fault Statistics': 'Fehlerstatistik',
|
||||
'Space Faults Data': 'Platz Fehler',
|
||||
'Equipment Faults Data': 'Ausrüstung Fehler',
|
||||
|
@ -1655,6 +1657,7 @@ const resources = {
|
|||
'Tenant Bill': '租户账单',
|
||||
'Energy Flow Diagram': '能流图',
|
||||
'Distribution System': '配电系统',
|
||||
'Svg System': '平面数据展示系统',
|
||||
'Fault Statistics': '故障统计分析',
|
||||
'Space Faults Data': '空间故障分析',
|
||||
'Equipment Faults Data': '设备故障分析',
|
||||
|
|
Loading…
Reference in New Issue