notificationDetail.js
5.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/**
* Created by Cassie on 2018/05/14
* 公告详情
*/
import React, { Component } from 'react';
import {
StyleSheet,
View,
Image,
ScrollView,
Text,
TextInput,
TouchableOpacity,
InteractionManager
} from 'react-native';
import {StackNavigator} from 'react-navigation';
import ScrollableTabView,{DefaultTabBar} from 'react-native-scrollable-tab-view';
import {width,height,zoomW,zoomH} from '../../utils/getSize';
import {xnToast,xnBorderWidth} from '../../utils/utils';
import NotificationList from './notificationList';
const back = require('../../img/returnB.png');
const search = require('../../img/search.png');
const allDel = require('../../img/allDel.png');
const bread = require('../../img/bread.png');
const avatar = require('../../img/avatar.png');
const addTarget = require('../../img/addTarget.png');
const withdraw = require('../../img/withdraw.png');
export default class NotificationDetail extends Component {
static navigationOptions = ({ navigation, screenProps }) => ({
title: "公告详情",
headerLeft:(<View style={{display:'flex',flexDirection:'row'}} >
<TouchableOpacity style={styles.topIcon} onPress={navigation.state.params?navigation.state.params.back:null}>
<Image source={back} style={{width:(16/zoomH),height:(16/zoomH)}} resizeMode="contain" />
</TouchableOpacity>
</View>),
headerRight:(
<View style = {{flexDirection:'row',display:'flex',paddingLeft:(10/zoomW), paddingRight:(10/zoomW)}}>
<TouchableOpacity onPress = {navigation.state.params?navigation.state.params.forwarding:null}>
<Image source={addTarget} style={{width:(29/zoomH),height:(29/zoomH),marginRight:(10/zoomW)}} resizeMode="contain"/>
</TouchableOpacity>
<TouchableOpacity onPress = {navigation.state.params?navigation.state.params.withdraw:null}>
<Image source={addTarget} style={{width:(29/zoomH),height:(29/zoomH)}} resizeMode="contain"/>
</TouchableOpacity>
</View>)
});
constructor(props) {
super(props);
this.state = {
sheetList: [1, 2, 3],
unconfirmedList:[1,1],
confirmedList:[2,1,1,1,1,1,1,1,1,1],
};
}
componentDidMount(){
this.props.navigation.setParams({
//转发
forwarding:() => {
InteractionManager.runAfterInteractions(() => {this.props.navigation.navigate('addPeople');})
},
//撤回
withdraw:()=>{
alert('撤回');
},
back:()=>{
this.props.navigation.goBack();
}
});
};
/*显示确认人员页面*/
toNotificationPage() {
this.props.navigation.navigate('Notifications');
}
render(){
return(
<View style={{display:'flex',flex:1}}>
<ScrollView style={styles.background}>
<View style={styles.title}>
<View style = {{backgroundColor:'#ffffff',padding:(15/zoomW)}}>
<Text style={{fontSize:21,color:'#000000'}}>UED部门月度总结大会</Text>
<Text style={{fontSize:14,color:'#999999'}}>Alice 3月22日 16:05</Text>
<Text style={{fontSize:16,color:'#333333',marginTop:(25/zoomH)}}>不少设计师开始利用诸如斑点和小气泡这样的装饰性元素,分散在网页的各个角落。这些装饰性的元素大多以小圆点的形式呈现,它们的形态多种多样,但是总体上有着吸引视线、丰富视觉的功能。即使是基于相同的设计概念,不同的气泡和斑点,让每个设计项目都有着不同的性格。</Text>
<TouchableOpacity style = {styles.btnConfirm} onPress = {() =>{this.toNotificationPage()}}>
<View style = {{width:(340/zoomW),height:(39/zoomH),flexDirection:'row',alignItems:'center',justifyContent:'center'}}>
<Text style={{fontSize:14,color:'#EE5E53'}}>一人未确认</Text>
</View>
</TouchableOpacity>
</View>
<Text style = {{height:(28/zoomH),includeFontPadding:false, textAlignVertical:'center',paddingLeft:(15/zoomW),textAlign:'left',fontSize :12,color:'#999999',backgroundColor:'#ECECF1'}}>评论</Text>
</View>
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
topIcon:{
paddingLeft:(10/zoomW),
paddingRight:(10/zoomW),
height:'100%',
display:'flex',
alignItems:'center'
},
background:{
width:'100%',
height:'100%',
backgroundColor:'#DDDDDD',
},
title:{
marginTop:(20/zoomH),
marginBottom:(20/zoomH),
},
btnConfirm:{
marginLeft:(20/zoomW),
marginRight:(20/zoomW),
marginTop:(20/zoomW),
marginBottom:7,
backgroundColor:'#EEEEEE',
borderRadius:180,
borderWidth:1,
borderColor:'#EEEEEE',
borderStyle:'solid'
}
})