|
@@ -57,9 +57,8 @@ class DesktopHome extends Component {
|
|
|
|
|
|
dianYaRender = (item, index) => {
|
|
|
const assetID = item.assetID.slice(7, 21)
|
|
|
- const districtText = item.districtText.split('-')[0]
|
|
|
const releaseDates = item.releaseDate.split('-')
|
|
|
- const releaseDate = releaseDates[0]+"年"+releaseDates[1]+"月"
|
|
|
+ const releaseDate = releaseDates[0] + "年" + releaseDates[1] + "月"
|
|
|
return (
|
|
|
<View
|
|
|
key={index}
|
|
@@ -74,18 +73,28 @@ class DesktopHome extends Component {
|
|
|
<Text style={styles.textColor3}>绕组数量:{item.secondWindingCount}</Text>
|
|
|
</View>
|
|
|
<View style={styles.betweenView}>
|
|
|
- <Text style={styles.textColor3}>二次电压</Text>
|
|
|
+ <Text style={styles.textColor4}>二次电压</Text>
|
|
|
<View style={styles.centerWidth}>
|
|
|
- <Text style={styles.textColor3}>准确等级</Text>
|
|
|
+ <Text style={styles.textColor4}>准确等级</Text>
|
|
|
</View>
|
|
|
- <Text style={styles.textColor3}>生产日期</Text>
|
|
|
+ <View style={styles.rightWidth}>
|
|
|
+ <Text style={styles.textColor4}>功率因数</Text>
|
|
|
+ </View>
|
|
|
+ <Text style={styles.textColor4}>生产日期</Text>
|
|
|
</View>
|
|
|
<View style={styles.betweenView}>
|
|
|
- <Text style={styles.textColor3}>{item.secondVoltage}</Text>
|
|
|
+ <View style={styles.centerView}>
|
|
|
+ <Text style={styles.textColor4}>{item.secondVoltage}</Text>
|
|
|
+ </View>
|
|
|
<View style={styles.centerWidth}>
|
|
|
- <Text style={styles.textColor3}>{item.accuracy}</Text>
|
|
|
+ <Text style={styles.textColor4}>{item.accuracy}</Text>
|
|
|
+ </View>
|
|
|
+ <View style={styles.rightWidth}>
|
|
|
+ <Text style={styles.textColor4}>{item.powerFactor}</Text>
|
|
|
+ </View>
|
|
|
+ <View style={styles.centerView}>
|
|
|
+ <Text style={styles.textColor4}>{releaseDate}</Text>
|
|
|
</View>
|
|
|
- <Text style={styles.textColor3}>{releaseDate}</Text>
|
|
|
</View>
|
|
|
<View style={styles.betweenView}>
|
|
|
<Text style={styles.textColor3}>安装场所:{item.place}</Text>
|
|
@@ -95,7 +104,9 @@ class DesktopHome extends Component {
|
|
|
<Text style={styles.textColor3}>电压因数:{item.voltageFactor}</Text>
|
|
|
</View>
|
|
|
<View style={styles.betweenView}>
|
|
|
- <Text style={styles.textColor3}>{item.manufacturer}</Text>
|
|
|
+ <View style={styles.centerView}>
|
|
|
+ <Text style={styles.textColor3}>{item.manufacturer}</Text>
|
|
|
+ </View>
|
|
|
<View style={{
|
|
|
width: (screenW - 10) / 3 * 2,
|
|
|
borderLeftWidth: 0.5,
|
|
@@ -108,15 +119,15 @@ class DesktopHome extends Component {
|
|
|
<View style={{
|
|
|
flex: 1,
|
|
|
}}>
|
|
|
- <Text style={[styles.textColor, {textAlign: 'left'}]}>国网{districtText}电力</Text>
|
|
|
+ <Text style={[styles.textColor, {textAlign: 'left'}]}>{item.districtText}</Text>
|
|
|
</View>
|
|
|
- <Text style={[styles.textColor, {textAlign: 'right'}]}>NO.{assetID}</Text>
|
|
|
+ <Text style={[styles.textColor, {textAlign: 'right', paddingRight: 5}]}>NO.{assetID}</Text>
|
|
|
</View>
|
|
|
<View style={{
|
|
|
marginHorizontal: 5,
|
|
|
}}>
|
|
|
<Barcode value={item.assetID} format="CODE128" height={35} width={1.1}/>
|
|
|
- <Text style={[styles.textColor]}>{item.assetID}</Text>
|
|
|
+ <Text style={styles.textColor}>{item.assetID}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
</View>
|
|
@@ -127,9 +138,8 @@ class DesktopHome extends Component {
|
|
|
|
|
|
dianLiuRender = (item, index) => {
|
|
|
const assetID = item.assetID.slice(7, 21)
|
|
|
- const districtText = item.districtText.split('-')[0]
|
|
|
const releaseDates = item.releaseDate.split('-')
|
|
|
- const releaseDate = releaseDates[0]+"年"+releaseDates[1]+"月"
|
|
|
+ const releaseDate = releaseDates[0] + "年" + releaseDates[1] + "月"
|
|
|
return (
|
|
|
<View
|
|
|
key={index}
|
|
@@ -144,18 +154,28 @@ class DesktopHome extends Component {
|
|
|
<Text style={styles.textColor3}>绕组数量:{item.secondWindingCount}</Text>
|
|
|
</View>
|
|
|
<View style={styles.betweenView}>
|
|
|
- <Text style={styles.textColor3}>一次电流</Text>
|
|
|
+ <Text style={styles.textColor4}>一次电流</Text>
|
|
|
<View style={styles.centerWidth}>
|
|
|
- <Text style={styles.textColor3}>二次电流</Text>
|
|
|
+ <Text style={styles.textColor4}>二次电流</Text>
|
|
|
+ </View>
|
|
|
+ <View style={styles.rightWidth}>
|
|
|
+ <Text style={styles.textColor4}>功率因数</Text>
|
|
|
</View>
|
|
|
- <Text style={styles.textColor3}>生产日期</Text>
|
|
|
+ <Text style={styles.textColor4}>生产日期</Text>
|
|
|
</View>
|
|
|
<View style={styles.betweenView}>
|
|
|
- <Text style={styles.textColor3}>{item.firstCurrent}</Text>
|
|
|
+ <View style={styles.centerView}>
|
|
|
+ <Text style={styles.textColor4}>{item.firstCurrent}</Text>
|
|
|
+ </View>
|
|
|
<View style={styles.centerWidth}>
|
|
|
- <Text style={styles.textColor3}>{item.senondCurrent}</Text>
|
|
|
+ <Text style={styles.textColor4}>{item.senondCurrent}</Text>
|
|
|
+ </View>
|
|
|
+ <View style={styles.rightWidth}>
|
|
|
+ <Text style={styles.textColor4}>{item.powerFactor}</Text>
|
|
|
+ </View>
|
|
|
+ <View style={styles.centerView}>
|
|
|
+ <Text style={styles.textColor4}>{releaseDate}</Text>
|
|
|
</View>
|
|
|
- <Text style={styles.textColor3}>{releaseDate}</Text>
|
|
|
</View>
|
|
|
<View style={styles.betweenView}>
|
|
|
<Text style={styles.textColor3}>安装场所:{item.place}</Text>
|
|
@@ -165,7 +185,9 @@ class DesktopHome extends Component {
|
|
|
<Text style={styles.textColor3}>准确等级:{item.accuracy}</Text>
|
|
|
</View>
|
|
|
<View style={styles.betweenView}>
|
|
|
- <Text style={styles.textColor3}>{item.manufacturer}</Text>
|
|
|
+ <View style={styles.centerView}>
|
|
|
+ <Text style={styles.textColor3}>{item.manufacturer}</Text>
|
|
|
+ </View>
|
|
|
<View style={{
|
|
|
width: (screenW - 10) / 3 * 2,
|
|
|
borderLeftWidth: 0.5,
|
|
@@ -178,15 +200,15 @@ class DesktopHome extends Component {
|
|
|
<View style={{
|
|
|
flex: 1,
|
|
|
}}>
|
|
|
- <Text style={[styles.textColor, {textAlign: 'left'}]}>国网{districtText}电力</Text>
|
|
|
+ <Text style={[styles.textColor, {textAlign: 'left'}]}>{item.districtText}</Text>
|
|
|
</View>
|
|
|
- <Text style={[styles.textColor, {textAlign: 'right'}]}>NO.{assetID}</Text>
|
|
|
+ <Text style={[styles.textColor, {textAlign: 'right', paddingRight: 5}]}>NO.{assetID}</Text>
|
|
|
</View>
|
|
|
<View style={{
|
|
|
marginHorizontal: 5,
|
|
|
}}>
|
|
|
<Barcode value={item.assetID} format="CODE128" height={35} width={1.1}/>
|
|
|
- <Text style={[styles.textColor]}>{item.assetID}</Text>
|
|
|
+ <Text style={styles.textColor}>{item.assetID}</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
</View>
|
|
@@ -284,6 +306,12 @@ const styles = StyleSheet.create({
|
|
|
textAlign: 'center',
|
|
|
width: (screenW - 9) / 3,
|
|
|
|
|
|
+ },
|
|
|
+ textColor4: {
|
|
|
+ color: '#333',
|
|
|
+ textAlign: 'center',
|
|
|
+ width: (screenW - 8) / 4,
|
|
|
+
|
|
|
},
|
|
|
textColor2: {
|
|
|
color: '#333',
|
|
@@ -300,13 +328,24 @@ const styles = StyleSheet.create({
|
|
|
justifyContent: 'space-between',
|
|
|
borderTopWidth: 0.5,
|
|
|
borderTopColor: '#7b7b7b',
|
|
|
- alignItems: 'center',
|
|
|
},
|
|
|
centerWidth: {
|
|
|
borderLeftWidth: 0.5,
|
|
|
borderRightWidth: 0.5,
|
|
|
borderLeftColor: '#7b7b7b',
|
|
|
borderRightColor: '#7b7b7b',
|
|
|
+ alignItems: 'center',
|
|
|
+ flexDirection: 'row',
|
|
|
+ },
|
|
|
+ centerView: {
|
|
|
+ alignItems: 'center',
|
|
|
+ flexDirection: 'row',
|
|
|
+ },
|
|
|
+ rightWidth: {
|
|
|
+ borderRightWidth: 0.5,
|
|
|
+ borderRightColor: '#7b7b7b',
|
|
|
+ alignItems: 'center',
|
|
|
+ flexDirection: 'row',
|
|
|
},
|
|
|
})
|
|
|
|