170 lines
4.1 KiB
JavaScript
170 lines
4.1 KiB
JavaScript
import React from 'react';
|
|
import {
|
|
SafeAreaView,
|
|
Text,
|
|
View,
|
|
TouchableOpacity,
|
|
StyleSheet,
|
|
Image,
|
|
ImageBackground,
|
|
ScrollView
|
|
} from 'react-native';
|
|
var _ = require('lodash');
|
|
import { width, height } from '../../services/screen';
|
|
import { colors } from '../../assets/styles/colors-theme';
|
|
import Loading from '../../components/Loading';
|
|
import Toast, { DURATION } from 'react-native-easy-toast';
|
|
import { inject, observer } from "mobx-react"
|
|
import { Col, Grid, Row } from "react-native-easy-grid";
|
|
import TitleBar from '../../components/titleBar'
|
|
import { observable, makeObservable } from 'mobx'
|
|
import { WebView } from 'react-native-webview';
|
|
import Carousel, { Pagination } from 'react-native-snap-carousel';
|
|
import ListTitle from '../../components/listTitle';
|
|
import I18n from '../../services/i18n'
|
|
import { s, vs, ms, mvs } from 'react-native-size-matters';
|
|
import { images } from '../../assets/images/imageIndex';
|
|
import RenderProducts from '../../components/renderProducts';
|
|
import HTMLView from 'react-native-htmlview';
|
|
import moment from 'moment';
|
|
import ProgressiveFastImage from "@freakycoder/react-native-progressive-fast-image";
|
|
import CamMethods from './api/camMethods';
|
|
import Common from './api/common';
|
|
const camMethods = new CamMethods()
|
|
const common = new Common()
|
|
|
|
const alarmInfoFakeData = [
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-16 12:08:53',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-16 11:42:14',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-16 11:41:32',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-16 11:41:26',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-16 09:44:04',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-16 07:47:05',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-15 15:47:14',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-15 15:47:08',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-15 15:44:49',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-15 15:43:19',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-15 15:42:49',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-15 15:40:47',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-15 15:28:38',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-15 15:28:34',
|
|
'Channel': '1'
|
|
},
|
|
{
|
|
'type': 'Fall Detection',
|
|
'time': '2023-05-15 15:28:15',
|
|
'Channel': '1'
|
|
},
|
|
]
|
|
|
|
const Testui = inject("appStore")(observer(class Testui extends React.Component {
|
|
|
|
|
|
constructor(props) {
|
|
super(props);
|
|
this.store = props.appStore;
|
|
makeObservable(this, {
|
|
|
|
|
|
})
|
|
}
|
|
|
|
|
|
async componentWillMount() {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
return (
|
|
|
|
<ImageBackground resizeMode='cover' style={{ flex: 1, backgroundColor: colors.bgc, justifyContent: 'center', alignItems: 'center' }} source={require('../../assets/images/background.png')} >
|
|
|
|
<TouchableOpacity onPress={() => { camMethods.get_states_of_Alarm_Output_Channels() }}>
|
|
<Text>
|
|
get channel
|
|
</Text>
|
|
</TouchableOpacity>
|
|
|
|
<TouchableOpacity onPress={() => { common.convertToBinary(1) }}>
|
|
<Text>
|
|
test
|
|
</Text>
|
|
</TouchableOpacity>
|
|
|
|
|
|
</ImageBackground>
|
|
|
|
);
|
|
}
|
|
}))
|
|
const styles = StyleSheet.create({
|
|
titleText: {
|
|
color: colors.fontColor,
|
|
fontSize: 13,
|
|
fontWeight: '800'
|
|
},
|
|
content: {
|
|
margin: 20,
|
|
br: { marginTop: -30, fontSize: 18, },
|
|
},
|
|
});
|
|
|
|
export default Testui
|