|
|
@@ -112,35 +112,35 @@ export default function Component(props: { records: any[] }) {
|
|
|
top: -rpxToPx(10)
|
|
|
}}>More</Text>
|
|
|
}
|
|
|
- <View style={{backgroundColor:'#1C1C1C',marginLeft:rpxToPx(46),marginRight:rpxToPx(46),borderRadius:rpxToPx(24)}}>
|
|
|
+ <View style={{ backgroundColor: '#1C1C1C', marginLeft: rpxToPx(46), marginRight: rpxToPx(46), borderRadius: rpxToPx(24) }}>
|
|
|
|
|
|
- {
|
|
|
- selReference.categories.map((item, index) => {
|
|
|
- var cellClassName = 'cell_full1'
|
|
|
- var showLine = false
|
|
|
- if (selReference.categories.length > 1) {
|
|
|
- if (index == 0) {
|
|
|
- cellClassName = 'cell_top'
|
|
|
- showLine = true
|
|
|
- }
|
|
|
- else if (index == selReference.categories.length - 1) {
|
|
|
- cellClassName = 'cell_bottom'
|
|
|
- showLine = false
|
|
|
- }
|
|
|
- else {
|
|
|
- cellClassName = 'cell_center'
|
|
|
- showLine = true
|
|
|
- }
|
|
|
- }
|
|
|
- return <View className={cellClassName} style={{marginLeft:0,marginRight:0}} key={index}>
|
|
|
- <Text className="cell_title" style={{ color: global.selMetricItem.theme_color }}>{item.value_range}</Text>
|
|
|
- <Text className="cell_value" style={{ color: '#fff' }}>{item.category}</Text>
|
|
|
- {
|
|
|
- showLine && <View className="cell_line" style={{position:'absolute',left:0,right:0,bottom:0,marginLeft:rpxToPx(40)}}></View>
|
|
|
+ {
|
|
|
+ selReference.categories.map((item, index) => {
|
|
|
+ var cellClassName = 'cell_full1'
|
|
|
+ var showLine = false
|
|
|
+ if (selReference.categories.length > 1) {
|
|
|
+ if (index == 0) {
|
|
|
+ cellClassName = 'cell_top'
|
|
|
+ showLine = true
|
|
|
+ }
|
|
|
+ else if (index == selReference.categories.length - 1) {
|
|
|
+ cellClassName = 'cell_bottom'
|
|
|
+ showLine = false
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ cellClassName = 'cell_center'
|
|
|
+ showLine = true
|
|
|
+ }
|
|
|
}
|
|
|
- </View>
|
|
|
- })
|
|
|
- }
|
|
|
+ return <View className={cellClassName} style={{ marginLeft: 0, marginRight: 0 }} key={index}>
|
|
|
+ <Text className="cell_title" style={{ color: global.selMetricItem.theme_color }}>{item.value_range}</Text>
|
|
|
+ <Text className="cell_value" style={{ color: '#fff' }}>{item.category}</Text>
|
|
|
+ {
|
|
|
+ showLine && <View className="cell_line" style={{ position: 'absolute', left: 0, right: 0, bottom: 0, marginLeft: rpxToPx(40) }}></View>
|
|
|
+ }
|
|
|
+ </View>
|
|
|
+ })
|
|
|
+ }
|
|
|
</View>
|
|
|
|
|
|
</View>
|
|
|
@@ -150,7 +150,7 @@ export default function Component(props: { records: any[] }) {
|
|
|
var lastYearStr = '2050年'
|
|
|
return <View style={{ display: 'flex', flexDirection: 'column' }} onClick={() => { setSelIndex([-1, -1]) }}>
|
|
|
{
|
|
|
- user.test_user && <Text style={{ color: '#fff', position: 'absolute', right: 50, top: 0 }} onClick={() => {
|
|
|
+ user.test_user && <Text style={{ color: '#fff', position: 'absolute', right: 50, top: 0, zIndex: 1000 }} onClick={() => {
|
|
|
global.clearHistory()
|
|
|
}}>删除全部</Text>
|
|
|
}
|
|
|
@@ -164,20 +164,20 @@ export default function Component(props: { records: any[] }) {
|
|
|
(list as any).map((item, index) => {
|
|
|
var showYear = lastYearStr != TimeFormatter.getYearByDate(item.date)
|
|
|
lastYearStr = TimeFormatter.getYearByDate(item.date)
|
|
|
- return <View style={{ display: 'flex', flexDirection: 'column', paddingBottom: index < list.length - 1 ? 0 : 80,zIndex:index==selIndex[0]?1:0 }}>
|
|
|
+ return <View style={{ display: 'flex', flexDirection: 'column', paddingBottom: index < list.length - 1 ? 0 : 80, zIndex: index == selIndex[0] ? 1 : 0 }}>
|
|
|
{
|
|
|
showYear && <Text className="year" style={{ backgroundColor: global.isDebug ? 'red' : 'transparent' }}>{TimeFormatter.getYearByDate(item.date)}</Text>
|
|
|
}
|
|
|
<Text className="operate_day" style={{ backgroundColor: global.isDebug ? 'red' : 'transparent' }}>{TimeFormatter.getMonthAndDayByDate(item.date)}</Text>
|
|
|
{
|
|
|
item.records.map((record, j) => {
|
|
|
- return <View style={{ position: 'relative',zIndex:j==selIndex[1]?3:2 }} key={j}><RecordItem delete={() => deleteRecord(record)}>
|
|
|
- <View className="operate_item1" onClick={(e) => {
|
|
|
- if (process.env.TARO_ENV == 'weapp') {
|
|
|
- e.stopPropagation()
|
|
|
- }
|
|
|
- tapItem(index, j)
|
|
|
- }} style={{ position: 'relative', zIndex: 100 }}>
|
|
|
+ return <View style={{ position: 'relative', zIndex: j == selIndex[1] ? 3 : 2 }} key={j}><RecordItem delete={() => deleteRecord(record)} onClick={(e) => {
|
|
|
+ if (process.env.TARO_ENV == 'weapp') {
|
|
|
+ e.stopPropagation()
|
|
|
+ }
|
|
|
+ tapItem(index, j)
|
|
|
+ }}>
|
|
|
+ <View className="operate_item1" style={{ position: 'relative', zIndex: 100 }}>
|
|
|
|
|
|
{
|
|
|
record.items[0].special == 'FT_IN' ?
|
|
|
@@ -206,39 +206,39 @@ export default function Component(props: { records: any[] }) {
|
|
|
</View>
|
|
|
</RecordItem>
|
|
|
{
|
|
|
- index == selIndex[0] && j == selIndex[1] &&
|
|
|
- <View style={{ display: 'flex', flexDirection: 'column',zIndex:10, position: 'absolute', alignItems: 'center', top: rpxToPx(125), left: 30 }}>
|
|
|
- <Image src={require('@assets/images/pointer.png')} style={{ width: 32, height: 12, marginBottom: -2 }} />
|
|
|
- <View style={{
|
|
|
- backgroundColor: '#505050',
|
|
|
- width: 82,
|
|
|
- borderRadius: 12,
|
|
|
- boxSizing: 'border-box',
|
|
|
- flexDirection: 'column',
|
|
|
- display: 'flex'
|
|
|
- }}>
|
|
|
- {
|
|
|
- global.selMetricItem.schemas[0].unit_options.map((obj, k) => {
|
|
|
- return <View key={k * 1000} style={{
|
|
|
- height: 28,
|
|
|
- display: 'flex',
|
|
|
- flexDirection: 'row',
|
|
|
- alignItems: 'center',
|
|
|
- borderBottomWidth: 1,
|
|
|
- borderBottomColor: k < global.selMetricItem.schemas[0].unit_options.length - 1 ? '#FFFFFF33' : 'transparent',
|
|
|
- borderBottomStyle: 'solid'
|
|
|
- }} onClick={() => {
|
|
|
- changeUnit(k)
|
|
|
- setSelIndex([-1, -1])
|
|
|
- }}>
|
|
|
- <View style={{ width: 12 }} />
|
|
|
- <Image style={{ width: 12, height: 9, marginRight: 7, opacity: record.items[0].unit == obj.unit ? 1 : 0 }} src={require('@assets/images/check_white.png')} />
|
|
|
- <Text style={{ color: '#fff', fontSize: 12 }}>{obj.special == 'FT_IN' ? 'ft in' : obj.unit}</Text>
|
|
|
- </View>
|
|
|
- })
|
|
|
- }
|
|
|
- </View>
|
|
|
+ index == selIndex[0] && j == selIndex[1] &&
|
|
|
+ <View style={{ display: 'flex', flexDirection: 'column', zIndex: 10, position: 'absolute', alignItems: 'center', top: rpxToPx(125), left: 30 }}>
|
|
|
+ <Image src={require('@assets/images/pointer.png')} style={{ width: 32, height: 12, marginBottom: -2 }} />
|
|
|
+ <View style={{
|
|
|
+ backgroundColor: '#505050',
|
|
|
+ width: 82,
|
|
|
+ borderRadius: 12,
|
|
|
+ boxSizing: 'border-box',
|
|
|
+ flexDirection: 'column',
|
|
|
+ display: 'flex'
|
|
|
+ }}>
|
|
|
+ {
|
|
|
+ global.selMetricItem.schemas[0].unit_options.map((obj, k) => {
|
|
|
+ return <View key={k * 1000} style={{
|
|
|
+ height: 28,
|
|
|
+ display: 'flex',
|
|
|
+ flexDirection: 'row',
|
|
|
+ alignItems: 'center',
|
|
|
+ borderBottomWidth: 1,
|
|
|
+ borderBottomColor: k < global.selMetricItem.schemas[0].unit_options.length - 1 ? '#FFFFFF33' : 'transparent',
|
|
|
+ borderBottomStyle: 'solid'
|
|
|
+ }} onClick={() => {
|
|
|
+ changeUnit(k)
|
|
|
+ setSelIndex([-1, -1])
|
|
|
+ }}>
|
|
|
+ <View style={{ width: 12 }} />
|
|
|
+ <Image style={{ width: 12, height: 9, marginRight: 7, opacity: record.items[0].unit == obj.unit ? 1 : 0 }} src={require('@assets/images/check_white.png')} />
|
|
|
+ <Text style={{ color: '#fff', fontSize: 12 }}>{obj.special == 'FT_IN' ? 'ft in' : obj.unit}</Text>
|
|
|
+ </View>
|
|
|
+ })
|
|
|
+ }
|
|
|
</View>
|
|
|
+ </View>
|
|
|
|
|
|
|
|
|
}
|