提交 d1cece8a authored 作者: 吴强's avatar 吴强

Merge branch 'zhouhuan' of ssh://192.168.1.116:29418/bolan-root/frontend/manager-app-sz into wq

# Conflicts: # android/app/src/main/assets/fonts/anticon.ttf
......@@ -129,7 +129,7 @@
<orderEntry type="library" exported="" name="play-services-iid-10.0.1" level="project" />
<orderEntry type="library" exported="" name="soloader-0.1.0" level="project" />
<orderEntry type="library" exported="" name="javax.inject-1" level="project" />
<orderEntry type="library" exported="" name="react-native-0.49.3" level="project" />
<orderEntry type="library" exported="" name="react-native-0.49.5" level="project" />
<orderEntry type="library" exported="" name="play-services-basement-10.0.1" level="project" />
<orderEntry type="library" exported="" name="AraBMApiDev" level="project" />
<orderEntry type="library" exported="" name="okhttp-3.6.0" level="project" />
......
......@@ -78,6 +78,11 @@ project.ext.react = [
apply from: "../../node_modules/react-native/react.gradle"
project.ext.vectoricons = [
iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' ] // Name of the font files you want to copy
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
......@@ -143,6 +148,7 @@ dependencies {
compile "com.android.support:appcompat-v7:25.3.1"
compile 'com.android.support:multidex:1.0.1'
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-vector-icons') // 2017-10-31 wq add
}
// Run this once to be able to run the application with BUCK
......
......@@ -15,6 +15,8 @@ import com.facebook.soloader.SoLoader;
import java.util.Arrays;
import java.util.List;
import com.oblador.vectoricons.VectorIconsPackage;// wq add 2017-10-31
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
......@@ -28,7 +30,8 @@ public class MainApplication extends Application implements ReactApplication {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNDeviceInfo(),
new IDCardReactPackage()
new IDCardReactPackage(),
new VectorIconsPackage()
);
}
......
......@@ -8,4 +8,5 @@
# For customization when using a Version Control System, please read the
# header note.
#Fri Oct 27 18:29:04 CST 2017
sdk.dir=D\:\\Android\\sdk
sdk.dir=D\:\\AppData\\Local\\Android\\sdk1
# sdk.dir=D\:\\Android\\sdk
......@@ -2,4 +2,7 @@ rootProject.name = 'bolanManagerApp'
include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
include ':app'
\ No newline at end of file
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
include ':app'
......@@ -25,9 +25,9 @@
}
},
"acorn": {
"version": "5.1.2",
"resolved": "http://registry.npm.taobao.org/acorn/download/acorn-5.1.2.tgz",
"integrity": "sha1-kRy1PgNoB88Pp3jcXTcPvYZCRtc=",
"version": "5.2.1",
"resolved": "http://registry.npm.taobao.org/acorn/download/acorn-5.2.1.tgz",
"integrity": "sha1-MXrHghgmwixwLWYYmrg1lnXxNdc=",
"dev": true
},
"acorn-globals": {
......@@ -84,9 +84,9 @@
}
},
"ajv-keywords": {
"version": "2.1.0",
"resolved": "http://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-2.1.0.tgz",
"integrity": "sha1-opbhf3v658HOT34N5T0pyzIWLfA=",
"version": "2.1.1",
"resolved": "http://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-2.1.1.tgz",
"integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=",
"dev": true
},
"align-text": {
......@@ -191,35 +191,6 @@
"requires": {
"delegates": "1.0.0",
"readable-stream": "2.3.3"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.3",
"resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.3.tgz",
"integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "1.0.7",
"safe-buffer": "5.1.1",
"string_decoder": "1.0.3",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.0.3.tgz",
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
"requires": {
"safe-buffer": "5.1.1"
}
}
}
},
"argparse": {
......@@ -1885,9 +1856,9 @@
"integrity": "sha1-EdCRMSI5648yyPJa6csAL/6NPCQ="
},
"compressible": {
"version": "2.0.11",
"resolved": "http://registry.npm.taobao.org/compressible/download/compressible-2.0.11.tgz",
"integrity": "sha1-FnGKdd4oPtjmBAQWJaIGRYZ5fYo=",
"version": "2.0.12",
"resolved": "http://registry.npm.taobao.org/compressible/download/compressible-2.0.12.tgz",
"integrity": "sha1-xZpcmdt2dn6YdlAOJx72OzSTvWY=",
"requires": {
"mime-db": "1.30.0"
}
......@@ -1899,7 +1870,7 @@
"requires": {
"accepts": "1.2.13",
"bytes": "2.1.0",
"compressible": "2.0.11",
"compressible": "2.0.12",
"debug": "2.2.0",
"on-headers": "1.0.1",
"vary": "1.0.1"
......@@ -1933,35 +1904,6 @@
"inherits": "2.0.3",
"readable-stream": "2.3.3",
"typedarray": "0.0.6"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.3",
"resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.3.tgz",
"integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "1.0.7",
"safe-buffer": "5.1.1",
"string_decoder": "1.0.3",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.0.3.tgz",
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
"requires": {
"safe-buffer": "5.1.1"
}
}
}
},
"connect": {
......@@ -2446,6 +2388,29 @@
"integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=",
"requires": {
"readable-stream": "1.1.14"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "0.0.1",
"string_decoder": "0.10.31"
}
},
"string_decoder": {
"version": "0.10.31",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"dva-core": {
......@@ -2512,9 +2477,9 @@
}
},
"envinfo": {
"version": "3.4.1",
"resolved": "http://registry.npm.taobao.org/envinfo/download/envinfo-3.4.1.tgz",
"integrity": "sha1-jIDp8u7CzU4q2yxdASfOB6Kqoq4=",
"version": "3.4.2",
"resolved": "http://registry.npm.taobao.org/envinfo/download/envinfo-3.4.2.tgz",
"integrity": "sha1-8GZIg2FVuB4de0ocP8o/a184eJs=",
"requires": {
"minimist": "1.2.0",
"os-name": "2.0.1",
......@@ -2618,14 +2583,14 @@
}
},
"eslint": {
"version": "4.9.0",
"resolved": "http://registry.npm.taobao.org/eslint/download/eslint-4.9.0.tgz",
"integrity": "sha1-doedJ0BoJhsZH+Dy9Wx0wvQgjos=",
"version": "4.10.0",
"resolved": "http://registry.npm.taobao.org/eslint/download/eslint-4.10.0.tgz",
"integrity": "sha1-8l0NeVXIGWjCMJqlyaIp4EUXa7c=",
"dev": true,
"requires": {
"ajv": "5.2.3",
"babel-code-frame": "6.26.0",
"chalk": "2.2.0",
"chalk": "2.3.0",
"concat-stream": "1.6.0",
"cross-spawn": "5.1.0",
"debug": "3.1.0",
......@@ -2639,7 +2604,7 @@
"functional-red-black-tree": "1.0.1",
"glob": "7.1.2",
"globals": "9.18.0",
"ignore": "3.3.5",
"ignore": "3.3.7",
"imurmurhash": "0.1.4",
"inquirer": "3.3.0",
"is-resolvable": "1.0.0",
......@@ -2678,9 +2643,9 @@
}
},
"chalk": {
"version": "2.2.0",
"resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.2.0.tgz",
"integrity": "sha1-R3s78vm4/Vyp5Cl0fjf3JO568kA=",
"version": "2.3.0",
"resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.3.0.tgz",
"integrity": "sha1-tepI78nBeT3MybR2fJORTT8tUro=",
"dev": true,
"requires": {
"ansi-styles": "3.2.0",
......@@ -2924,7 +2889,7 @@
"integrity": "sha1-DJiLirRttTEAoZVK5LqZXd0n2H4=",
"dev": true,
"requires": {
"acorn": "5.1.2",
"acorn": "5.2.1",
"acorn-jsx": "3.0.1"
}
},
......@@ -2982,6 +2947,20 @@
"merge": "1.2.0"
}
},
"execa": {
"version": "0.7.0",
"resolved": "http://registry.npm.taobao.org/execa/download/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"requires": {
"cross-spawn": "5.1.0",
"get-stream": "3.0.0",
"is-stream": "1.1.0",
"npm-run-path": "2.0.2",
"p-finally": "1.0.0",
"signal-exit": "3.0.2",
"strip-eof": "1.0.0"
}
},
"exenv": {
"version": "1.2.2",
"resolved": "http://registry.npm.taobao.org/exenv/download/exenv-1.2.2.tgz",
......@@ -3053,7 +3032,7 @@
"integrity": "sha1-UsJJo5gbm6GHx8rPW+tQvx2Rprw=",
"requires": {
"iconv-lite": "0.4.19",
"jschardet": "1.5.1",
"jschardet": "1.6.0",
"tmp": "0.0.33"
}
},
......@@ -3351,6 +3330,11 @@
"resolved": "http://registry.npm.taobao.org/get-caller-file/download/get-caller-file-1.0.2.tgz",
"integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U="
},
"get-stream": {
"version": "3.0.0",
"resolved": "http://registry.npm.taobao.org/get-stream/download/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"getpass": {
"version": "0.1.7",
"resolved": "http://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz",
......@@ -3692,9 +3676,9 @@
}
},
"ignore": {
"version": "3.3.5",
"resolved": "http://registry.npm.taobao.org/ignore/download/ignore-3.3.5.tgz",
"integrity": "sha1-xOcVRV9gc6jX5drnLS/J1xZj26Y=",
"version": "3.3.7",
"resolved": "http://registry.npm.taobao.org/ignore/download/ignore-3.3.7.tgz",
"integrity": "sha1-YSKJv7PCIOGGpYEYYY1b6MG6sCE=",
"dev": true
},
"image-size": {
......@@ -3733,7 +3717,7 @@
"integrity": "sha1-ndLyrXZdyrH/BEO0kUQqILoifck=",
"requires": {
"ansi-escapes": "3.0.0",
"chalk": "2.2.0",
"chalk": "2.3.0",
"cli-cursor": "2.1.0",
"cli-width": "2.2.0",
"external-editor": "2.0.5",
......@@ -3762,9 +3746,9 @@
}
},
"chalk": {
"version": "2.2.0",
"resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.2.0.tgz",
"integrity": "sha1-R3s78vm4/Vyp5Cl0fjf3JO568kA=",
"version": "2.3.0",
"resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.3.0.tgz",
"integrity": "sha1-tepI78nBeT3MybR2fJORTT8tUro=",
"requires": {
"ansi-styles": "3.2.0",
"escape-string-regexp": "1.0.5",
......@@ -4001,9 +3985,9 @@
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
"isarray": {
"version": "0.0.1",
"resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isexe": {
"version": "2.0.0",
......@@ -4825,9 +4809,9 @@
"optional": true
},
"jschardet": {
"version": "1.5.1",
"resolved": "http://registry.npm.taobao.org/jschardet/download/jschardet-1.5.1.tgz",
"integrity": "sha1-xRn2KfhrOlvtuliojTETCe7Al/k="
"version": "1.6.0",
"resolved": "http://registry.npm.taobao.org/jschardet/download/jschardet-1.6.0.tgz",
"integrity": "sha1-x9GnHtz/KDnbL57DD8XV69PBpng="
},
"jsdom": {
"version": "9.12.0",
......@@ -5053,7 +5037,6 @@
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/locate-path/download/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"dev": true,
"requires": {
"p-locate": "2.0.0",
"path-exists": "3.0.0"
......@@ -5062,8 +5045,7 @@
"path-exists": {
"version": "3.0.0",
"resolved": "http://registry.npm.taobao.org/path-exists/download/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
"dev": true
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
}
}
},
......@@ -5271,6 +5253,14 @@
"resolved": "http://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"mem": {
"version": "1.1.0",
"resolved": "http://registry.npm.taobao.org/mem/download/mem-1.1.0.tgz",
"integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
"requires": {
"mimic-fn": "1.1.0"
}
},
"merge": {
"version": "1.2.0",
"resolved": "http://registry.npm.taobao.org/merge/download/merge-1.2.0.tgz",
......@@ -5282,35 +5272,6 @@
"integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=",
"requires": {
"readable-stream": "2.3.3"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.3",
"resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.3.tgz",
"integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "1.0.7",
"safe-buffer": "5.1.1",
"string_decoder": "1.0.3",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.0.3.tgz",
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
"requires": {
"safe-buffer": "5.1.1"
}
}
}
},
"method-override": {
......@@ -5542,6 +5503,29 @@
"requires": {
"readable-stream": "1.1.14",
"stream-counter": "0.2.0"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "0.0.1",
"string_decoder": "0.10.31"
}
},
"string_decoder": {
"version": "0.10.31",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"multipipe": {
......@@ -5636,6 +5620,14 @@
"resolved": "http://registry.npm.taobao.org/normalize.css/download/normalize.css-7.0.0.tgz",
"integrity": "sha1-q/sd2CRwZ04DIrU86xqvQSk45L8="
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "http://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"requires": {
"path-key": "2.0.1"
}
},
"npmlog": {
"version": "2.0.4",
"resolved": "http://registry.npm.taobao.org/npmlog/download/npmlog-2.0.4.tgz",
......@@ -5795,17 +5787,20 @@
"resolved": "http://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"p-finally": {
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/p-finally/download/p-finally-1.0.0.tgz",
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
},
"p-limit": {
"version": "1.1.0",
"resolved": "http://registry.npm.taobao.org/p-limit/download/p-limit-1.1.0.tgz",
"integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=",
"dev": true
"integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw="
},
"p-locate": {
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/p-locate/download/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
"dev": true,
"requires": {
"p-limit": "1.1.0"
}
......@@ -5865,6 +5860,11 @@
"integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
"dev": true
},
"path-key": {
"version": "2.0.1",
"resolved": "http://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
},
"path-parse": {
"version": "1.0.5",
"resolved": "http://registry.npm.taobao.org/path-parse/download/path-parse-1.0.5.tgz",
......@@ -5877,6 +5877,13 @@
"integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=",
"requires": {
"isarray": "0.0.1"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
}
}
},
"path-type": {
......@@ -6726,9 +6733,9 @@
}
},
"rc-form": {
"version": "1.4.8",
"resolved": "http://registry.npm.taobao.org/rc-form/download/rc-form-1.4.8.tgz",
"integrity": "sha1-4mws2GE32UPC4plkB9c+n6BzscY=",
"version": "1.5.0",
"resolved": "http://registry.npm.taobao.org/rc-form/download/rc-form-1.5.0.tgz",
"integrity": "sha1-nHirk+mY5mrwKSG5nuoSKWxoIFw=",
"requires": {
"async-validator": "1.8.1",
"babel-runtime": "6.26.0",
......@@ -6879,9 +6886,9 @@
}
},
"react-native": {
"version": "0.49.3",
"resolved": "http://registry.npm.taobao.org/react-native/download/react-native-0.49.3.tgz",
"integrity": "sha1-DKRZ7kn5xZ6DJrLO2eNMWTM6LyY=",
"version": "0.49.5",
"resolved": "http://registry.npm.taobao.org/react-native/download/react-native-0.49.5.tgz",
"integrity": "sha1-ifD+k6jaTbJnDEvQ2BExov9hfyc=",
"requires": {
"absolute-path": "0.0.0",
"art": "0.10.1",
......@@ -6900,7 +6907,7 @@
"create-react-class": "15.6.2",
"debug": "2.6.9",
"denodeify": "1.2.1",
"envinfo": "3.4.1",
"envinfo": "3.4.2",
"event-target-shim": "1.1.1",
"fbjs": "0.8.14",
"fbjs-scripts": "0.8.1",
......@@ -7027,17 +7034,158 @@
}
},
"react-native-tab-view": {
"version": "0.0.69",
"resolved": "http://registry.npm.taobao.org/react-native-tab-view/download/react-native-tab-view-0.0.69.tgz",
"integrity": "sha1-9S1DVKmKOC8Q61/PYdtSFskdx+c=",
"version": "0.0.70",
"resolved": "http://registry.npm.taobao.org/react-native-tab-view/download/react-native-tab-view-0.0.70.tgz",
"integrity": "sha1-HdLe0yrNDLa/7zjSblNnXbczs3s=",
"requires": {
"prop-types": "15.6.0"
}
},
"react-native-vector-icons": {
"version": "4.4.2",
"resolved": "http://registry.npm.taobao.org/react-native-vector-icons/download/react-native-vector-icons-4.4.2.tgz",
"integrity": "sha1-CQ9C7gOWxMxOrg3apRgCi6jfQMc=",
"requires": {
"lodash": "4.17.4",
"prop-types": "15.6.0",
"yargs": "8.0.2"
},
"dependencies": {
"camelcase": {
"version": "4.1.0",
"resolved": "http://registry.npm.taobao.org/camelcase/download/camelcase-4.1.0.tgz",
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
},
"cliui": {
"version": "3.2.0",
"resolved": "http://registry.npm.taobao.org/cliui/download/cliui-3.2.0.tgz",
"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
"requires": {
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"wrap-ansi": "2.1.0"
},
"dependencies": {
"string-width": {
"version": "1.0.2",
"resolved": "http://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"strip-ansi": "3.0.1"
}
}
}
},
"find-up": {
"version": "2.1.0",
"resolved": "http://registry.npm.taobao.org/find-up/download/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"requires": {
"locate-path": "2.0.0"
}
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"requires": {
"number-is-nan": "1.0.1"
}
},
"load-json-file": {
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/load-json-file/download/load-json-file-2.0.0.tgz",
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
"requires": {
"graceful-fs": "4.1.11",
"parse-json": "2.2.0",
"pify": "2.3.0",
"strip-bom": "3.0.0"
}
},
"os-locale": {
"version": "2.1.0",
"resolved": "http://registry.npm.taobao.org/os-locale/download/os-locale-2.1.0.tgz",
"integrity": "sha1-QrwpAKa1uL0XN2yOiCtlr8zyS/I=",
"requires": {
"execa": "0.7.0",
"lcid": "1.0.0",
"mem": "1.1.0"
}
},
"path-type": {
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/path-type/download/path-type-2.0.0.tgz",
"integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
"requires": {
"pify": "2.3.0"
}
},
"read-pkg": {
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/read-pkg/download/read-pkg-2.0.0.tgz",
"integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
"requires": {
"load-json-file": "2.0.0",
"normalize-package-data": "2.4.0",
"path-type": "2.0.0"
}
},
"read-pkg-up": {
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/read-pkg-up/download/read-pkg-up-2.0.0.tgz",
"integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
"requires": {
"find-up": "2.1.0",
"read-pkg": "2.0.0"
}
},
"strip-bom": {
"version": "3.0.0",
"resolved": "http://registry.npm.taobao.org/strip-bom/download/strip-bom-3.0.0.tgz",
"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM="
},
"which-module": {
"version": "2.0.0",
"resolved": "http://registry.npm.taobao.org/which-module/download/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
"yargs": {
"version": "8.0.2",
"resolved": "http://registry.npm.taobao.org/yargs/download/yargs-8.0.2.tgz",
"integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=",
"requires": {
"camelcase": "4.1.0",
"cliui": "3.2.0",
"decamelize": "1.2.0",
"get-caller-file": "1.0.2",
"os-locale": "2.1.0",
"read-pkg-up": "2.0.0",
"require-directory": "2.1.1",
"require-main-filename": "1.0.1",
"set-blocking": "2.0.0",
"string-width": "2.1.1",
"which-module": "2.0.0",
"y18n": "3.2.1",
"yargs-parser": "7.0.0"
}
},
"yargs-parser": {
"version": "7.0.0",
"resolved": "http://registry.npm.taobao.org/yargs-parser/download/yargs-parser-7.0.0.tgz",
"integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=",
"requires": {
"camelcase": "4.1.0"
}
}
}
},
"react-navigation": {
"version": "1.0.0-beta.15",
"resolved": "http://registry.npm.taobao.org/react-navigation/download/react-navigation-1.0.0-beta.15.tgz",
"integrity": "sha1-s9Cc5SJDXKxNQKxS32TW3qJd9wU=",
"version": "1.0.0-beta.16",
"resolved": "http://registry.npm.taobao.org/react-navigation/download/react-navigation-1.0.0-beta.16.tgz",
"integrity": "sha1-IOLzQf4XTpvxva+64c0YjG+Y8P8=",
"requires": {
"babel-plugin-transform-define": "1.3.0",
"clamp": "1.0.1",
......@@ -7045,7 +7193,7 @@
"path-to-regexp": "1.7.0",
"prop-types": "15.6.0",
"react-native-drawer-layout-polyfill": "1.3.2",
"react-native-tab-view": "0.0.69"
"react-native-tab-view": "0.0.70"
}
},
"react-proxy": {
......@@ -7123,14 +7271,17 @@
}
},
"readable-stream": {
"version": "1.1.14",
"resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"version": "2.3.3",
"resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.3.tgz",
"integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "0.0.1",
"string_decoder": "0.10.31"
"isarray": "1.0.0",
"process-nextick-args": "1.0.7",
"safe-buffer": "5.1.1",
"string_decoder": "1.0.3",
"util-deprecate": "1.0.2"
}
},
"reduce-css-calc": {
......@@ -7181,9 +7332,9 @@
}
},
"redux-persist": {
"version": "4.10.1",
"resolved": "http://registry.npm.taobao.org/redux-persist/download/redux-persist-4.10.1.tgz",
"integrity": "sha1-T7K3iZQvEPVtUcx60GjZ1r60YSQ=",
"version": "4.10.2",
"resolved": "http://registry.npm.taobao.org/redux-persist/download/redux-persist-4.10.2.tgz",
"integrity": "sha1-jv2xbP6ILFIaeKbQv9/vJDf0n5Y=",
"requires": {
"json-stringify-safe": "5.0.1",
"lodash": "4.17.4",
......@@ -7920,6 +8071,29 @@
"integrity": "sha1-3tJmVWMZyLDiIoErnPOyb6fZR94=",
"requires": {
"readable-stream": "1.1.14"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "0.0.1",
"string_decoder": "0.10.31"
}
},
"string_decoder": {
"version": "0.10.31",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"strict-uri-encode": {
......@@ -7962,9 +8136,12 @@
}
},
"string_decoder": {
"version": "0.10.31",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
"version": "1.0.3",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.0.3.tgz",
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
"requires": {
"safe-buffer": "5.1.1"
}
},
"stringstream": {
"version": "0.0.5",
......@@ -7987,6 +8164,11 @@
"is-utf8": "0.2.1"
}
},
"strip-eof": {
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz",
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
},
"strip-json-comments": {
"version": "2.0.1",
"resolved": "http://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-2.0.1.tgz",
......@@ -8049,8 +8231,8 @@
"dev": true,
"requires": {
"ajv": "5.2.3",
"ajv-keywords": "2.1.0",
"chalk": "2.2.0",
"ajv-keywords": "2.1.1",
"chalk": "2.3.0",
"lodash": "4.17.4",
"slice-ansi": "1.0.0",
"string-width": "2.1.1"
......@@ -8066,9 +8248,9 @@
}
},
"chalk": {
"version": "2.2.0",
"resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.2.0.tgz",
"integrity": "sha1-R3s78vm4/Vyp5Cl0fjf3JO568kA=",
"version": "2.3.0",
"resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.3.0.tgz",
"integrity": "sha1-tepI78nBeT3MybR2fJORTT8tUro=",
"dev": true,
"requires": {
"ansi-styles": "3.2.0",
......@@ -8139,35 +8321,6 @@
"requires": {
"readable-stream": "2.3.3",
"xtend": "4.0.1"
},
"dependencies": {
"isarray": {
"version": "1.0.0",
"resolved": "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"readable-stream": {
"version": "2.3.3",
"resolved": "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.3.tgz",
"integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "1.0.7",
"safe-buffer": "5.1.1",
"string_decoder": "1.0.3",
"util-deprecate": "1.0.2"
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.0.3.tgz",
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
"requires": {
"safe-buffer": "5.1.1"
}
}
}
},
"time-stamp": {
......
/**
* Created by zhouhuan on 2017/10/30.
*/
import { Toast } from 'antd-mobile';
import { NavigationActions } from 'react-navigation';
import { getData } from '../../utils/DataTemplate';
import { datasourceApi } from '../../services/datasource';
export default {
namespace: 'obligeeInfo',
state: {
sourceData: [],
sourceData: {},
detailData: {},
isDetail: false,
editable: false,
disabled: true,
},
effects: {
*getObligeeInfo({ payload }, { put, call, select }) {
if (payload === 'clear') {
yield put({ type: 'clearList', payload: {} });
}
const { sourceData } = yield select(state => state.obligeeInfo);
const size = sourceData.length;
const coordinate = {
containerType: 'module',
containerName: 'query-DSRInfo',
datasourceName: 'QueryDSRInfoTable',
};
const result = yield call(getData, coordinate, { pst: size, psz: 10, params: { pID: payload } });
const singularData = result[0];
yield put({ type: 'setDSRList', payload: { ...singularData } });
},
*getObligeeDetail({ payload }, { put, call }) {
const coordinate = {
containerType: 'module',
containerName: 'query-DSRInfo',
datasourceName: 'QueryDSRInfoDetails',
};
const result = yield call(getData, coordinate, { params: { pID: payload } });
console.log(result);
yield put({ type: 'getDSRDetail', payload: { ...result[0] } });
yield put({ type: 'setDetail', payload: true });
yield put({ type: 'setEdit', payload: false });
},
*updateDSRDetail({ payload }, { call, put }) {
console.log('update');
const coordinate = {
containerType: 'module',
containerName: 'query-DSRInfo',
datasourceName: 'QueryDSRInfoDetails',
};
const api = datasourceApi(coordinate);
yield call(api.update, payload.id, payload.singularData);
Toast.success('修改成功!', 1);
yield put(NavigationActions.navigate({
routeName: 'ObligeeInfo',
}));
yield put({ type: 'setDisabled', payload: true });
yield put({ type: 'setDetail', payload: false });
},
*onEBack({ payload }, { put, call }) {
const coordinate = {
containerType: 'module',
containerName: 'query-DSRInfo',
datasourceName: 'QueryDSRInfoTable',
};
const result = yield call(getData, coordinate, { params: { pID: payload } });
const singularData = result[0];
yield put({ type: 'setDSRList', payload: { ...singularData } });
yield put(NavigationActions.navigate({
routeName: 'ObligeeInfo',
}));
yield put({ type: 'setDisabled', payload: true });
yield put({ type: 'setDetail', payload: false });
},
*setStatus({ payload }, { put }) {
yield put({ type: 'setDisabled', payload: false });
yield put({ type: 'setEdit', payload });
},
},
reducers: {
getDSRDetail(state, { payload }) {
return {
...state,
detailData: payload,
};
},
setDSRList(state, { payload }) {
return {
...state,
sourceData: payload,
};
},
setDetail(state, { payload }) {
return {
...state,
isDetail: payload,
};
},
setEdit(state, { payload }) {
return {
...state,
editable: payload,
};
},
setDisabled(state, { payload }) {
return {
...state,
disabled: payload,
};
},
},
};
......@@ -4,8 +4,16 @@ export default {
namespace: 'ListHouse',
state: {
sourceData: [],
metas: [],
houseID: '',
},
reducers: {
setHouseID(state, { payload }) {
return {
...state,
houseID: payload,
};
},
setList(state, { payload: { arrayData } }) {
return { ...state, sourceData: [...state.sourceData, ...arrayData] };
},
......@@ -13,8 +21,18 @@ export default {
clearList(state) {
return { ...state, sourceData: [] };
},
setMetas(state, { payload }) {
console.info(payload);
return { ...state, metas: payload };
},
},
effects: {
*jumpPage({ payload: id }, { put }) {
yield put({ type: 'setHouseID', payload: id });
yield put(NavigationActions.navigate({
routeName: 'HouseDetail',
}));
},
*getHouseList({ payload }, { take, put, call, select }) {
if (payload === 'clear') {
yield put({ type: 'clearList', payload: {} });
......@@ -28,6 +46,8 @@ export default {
datasourceName: 'QueryfwTable',
};
const result = yield call(getData, coordinate, { pst: size, psz: 10 });
const meta = yield call(getMeta, coordinate);
yield put({ type: 'setMetas', payload: meta });
// const result = yield call('', 'query-DSRFWInfo', 'QueryfwTable', { pst: size, psz: 10 });
for (const row of result) {
yield put({ type: 'addHouse', payload: row });
......
......@@ -2,10 +2,12 @@ import welcome from './welcome';
import login from './login';
import listHouse from './houseinfo/listhouse';
import HouseDetail from './houseinfo/houseDetail';
import obligeeInfo from './houseinfo/ObligeeInfo';
export default [
welcome,
login,
listHouse,
HouseDetail,
obligeeInfo,
];
import React, { Component } from 'react';
import { View, Text, ScrollView, StyleSheet } from 'react-native';
import { Card, WingBlank, WhiteSpace, Button, Icon } from 'antd-mobile';
import { connect } from 'react-redux';
@connect(({ obligeeInfo, loading }) => ({ obligeeInfo, loading: !!loading.effects['obligeeInfo/getObligeeList'] }))
class DSRInfoScreeen extends Component {
render() {
return (
<Card>
<Card.Header
extra={
<View style={{ flexDirection: 'row' }}>
<Button type="primary">新增</Button>
</View>
}
/>
<Card.Body>
<ScrollView >
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title="张三"
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>性别:<Text style={Styles.cardBodyText2}></Text></Text>
<Text style={Styles.cardBodyText}>证件号码:<Text style={Styles.cardBodyText2}>350502199210236034</Text></Text>
<Text style={Styles.cardBodyText}>与户主关系:<Text style={Styles.cardBodyText2}>户主</Text></Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title="张三"
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>性别:</Text>
<Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
<Text style={Styles.cardBodyText}>与户主关系:户主</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title="张三"
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>性别:</Text>
<Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
<Text style={Styles.cardBodyText}>与户主关系:户主</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title="张三"
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>性别:</Text>
<Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
<Text style={Styles.cardBodyText}>与户主关系:户主</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title="张三"
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>性别:</Text>
<Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
<Text style={Styles.cardBodyText}>与户主关系:户主</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
</ScrollView >
</Card.Body>
</Card>
);
}
}
const Styles = StyleSheet.create({
cardText: {
color: '#2196F3',
textAlign: 'right',
},
cardBodyText: {
marginBottom: 10,
marginLeft: 13,
},
});
export default DSRInfoScreeen;
import React, { Component } from 'react';
import { Text, FlatList, View } from 'react-native';
import { Card, WingBlank, WhiteSpace } from 'antd-mobile';
import { connect } from 'react-redux';
import { createAction } from '../../utils';
import FlatListItem from './houseinfo/FlatListItem';
@connect(({ DSRInfo }) => ({ DSRInfo/* , loading: !!loading.effects['obligeeInfo/getObligeeInfo'] */ }))
class DSRInfoScreeen extends Component {
componentDidMount() {
const { dispatch } = this.props;
dispatch(createAction('DSRInfo/getDSRList')());
}
// 上拉加载更多
onEndReached = () => {
// 以下是制造新数据
if (!this.props.loading) {
this.props.dispatch(createAction('DSRInfo/getDSRList')());
}
};
onPressItem = (id) => {
this.props.dispatch(createAction('DSRInfo/jumpPage')(id));
};
getItemLayout = (data, index) => (
{ length: 120, offset: (120 + 1) * index, index }
);
/**
* 此函数用于为给定的item生成一个不重复的Key。
* Key的作用是使React能够区分同类元素的不同个体,以便在刷新时能够确定其变化的位置,减少重新渲染的开销。
* 若不指定此函数,则默认抽取item.key作为key值。
* 若item.key也不存在,则使用数组下标
*
* @param item
* @param index
* @private
*/
// 这里指定使用数组下标作为唯一索引
keyExtractor = item => `${item.id}`;
// Footer布局
renderFooter = () => (
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Body>
<Text>到底了!!!</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
);
// 空布局
renderEmptyView = () => (
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Body>
<Text>当前无内容</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
);
// 下拉刷新
renderRefresh = () => {
if (!this.props.loading) {
console.info('wodewodewode');
this.props.dispatch(createAction('DSRInfo/getDSRList')('clear'));
}
};
/**
* 使用箭头函数防止不必要的re-render;
* 如果使用bind方式来绑定onPressItem,每次都会生成一个新的函数,导致props在===比较时返回false,
* 从而触发自身的一次不必要的重新render,也就是FlatListItem组件每次都会重新渲染。
*
* @param id
* @private
*/
renderItem = ({ item }) => {
return (
<FlatListItem
title={item.dangShiRenXingMing}
meta={this.props.DSRInfo.metas}
item={item}
onPressItem={this.onPressItem}
/>
);
};
render() {
return (
<FlatList
data={this.props.DSRInfo.sourceData}
keyExtractor={this.keyExtractor}
renderItem={this.renderItem}
// 决定当距离内容最底部还有多远时触发onEndReached回调;数值范围0~1,例如:0.5表示可见布局的最底端距离content最底端等于可见布局一半高度的时候调用该回调
onEndReachedThreshold={0.3}
// 当列表被滚动到距离内容最底部不足onEndReacchedThreshold设置的距离时调用
onEndReached={this.onEndReached}
ListFooterComponent={this.renderFooter}
ListEmptyComponent={this.renderEmptyView}
refreshing={this.props.loading || false}
onRefresh={this.renderRefresh}
// 是一个可选的优化,用于避免动态测量内容,+1是加上分割线的高度
/>
);
}
}
export default DSRInfoScreeen;
......@@ -19,13 +19,23 @@ class FlatListItem extends PureComponent {
<WhiteSpace size="lg" />
<Card>
<Card.Header
title={this.props.item.fangWuZuoLuo}
title={this.props.title}
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>编号:<Text style={Styles.cardBodyText2}>{this.props.item.fwBianMa}</Text></Text>
<Text style={Styles.cardBodyText}>面积:<Text style={Styles.cardBodyText2}>350502199210236034</Text></Text>
<Text style={Styles.cardBodyText}>产权人:<Text style={Styles.cardBodyText2}>户主</Text></Text>
{
this.props.meta.map((m) => {
if (this.props.item[m.key] !== this.props.title) {
return (
<Text key={m.label} style={Styles.cardBodyText}>{m.label}:<Text key={m.key} style={Styles.cardBodyText2}>{this.props.item[m.key]}</Text></Text>
);
} else {
return (
<View key={m.key} />
);
}
})
}
</Card.Body>
</Card>
<WhiteSpace size="lg" />
......
......@@ -5,18 +5,18 @@ import { createForm } from 'rc-form';
import { connect } from 'react-redux';
import { createAction } from '../../../utils/index';
@connect(({ HouseDetail }) => ({ HouseDetail }))
@connect(({ HouseDetail, ListHouse }) => ({ HouseDetail, ListHouse }))
class HouseDetail extends Component {
componentDidMount() {
const { dispatch, navigation } = this.props;
dispatch(createAction('HouseDetail/getHouseDetail')(navigation.state.params.id));
const { dispatch, ListHouse } = this.props;
dispatch(createAction('HouseDetail/getHouseDetail')(ListHouse.houseID));
}
onSubmit = () => {
this.props.form.validateFields({ force: true }, (error, value) => {
if (!error) {
// 校验成功执行这里的代码
console.info({ id: this.props.navigation.state.params.id, singularData: value });
this.props.dispatch(createAction('HouseDetail/updateHouseDetail')({ id: this.props.navigation.state.params.id, singularData: value }));
this.props.dispatch(createAction('HouseDetail/updateHouseDetail')({ id: this.props.ListHouse.houseID, singularData: value }));
console.log(this.props.form.getFieldsValue());
} else {
// 执行出现错误,弹出错处理
......
......@@ -2,93 +2,168 @@
* Created by zhouhuan on 2017/10/30.
*/
import React from 'react';
import { createForm } from 'rc-form';
import { View, StyleSheet, FlatList, Text, ScrollView } from 'react-native';
import { Card, WingBlank, WhiteSpace } from 'antd-mobile';
import { connect } from 'react-redux';
import { createAction } from '../../../utils';
@connect(({ obligeeInfo, loading }) => ({ obligeeInfo, loading: !!loading.effects['obligeeInfo/getObligeeList'] }))
@connect(({ obligeeInfo, ListHouse }) => ({ obligeeInfo, ListHouse }))
class ObligeeInfo extends React.Component {
componentDidMount() {
const { houseID } = this.props.ListHouse;
this.props.dispatch(createAction('obligeeInfo/getObligeeInfo')(houseID));
}
onPress = () => {
const ID = this.props.obligeeInfo.sourceData.id;
this.props.dispatch(createAction('obligeeInfo/getObligeeDetail')(ID));
};
onEdit =() => {
this.props.dispatch(createAction('obligeeInfo/setStatus')(true));
};
onSubmit = () => {
this.props.form.validateFields({ force: true }, (error, value) => {
if (!error) {
this.props.dispatch(createAction('obligeeInfo/updateDSRDetail')({ id: this.props.obligeeInfo.sourceData.id, singularData: value }));
} else {
console.log('Validation failed');
}
});
}
onEditBack = () => {
const { houseID } = this.props.ListHouse;
this.props.dispatch(createAction('obligeeInfo/onEBack')(houseID));
}
render() {
return (
<ScrollView >
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title="张三"
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>性别:<Text style={Styles.cardBodyText2}></Text></Text>
<Text style={Styles.cardBodyText}>证件号码:<Text style={Styles.cardBodyText2}>350502199210236034</Text></Text>
<Text style={Styles.cardBodyText}>与户主关系:<Text style={Styles.cardBodyText2}>户主</Text></Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title="张三"
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>性别:</Text>
<Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
<Text style={Styles.cardBodyText}>与户主关系:户主</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title="张三"
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>性别:</Text>
<Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
<Text style={Styles.cardBodyText}>与户主关系:户主</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title="张三"
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>性别:</Text>
<Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
<Text style={Styles.cardBodyText}>与户主关系:户主</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title="张三"
extra={<Text style={Styles.cardText}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>性别:</Text>
<Text style={Styles.cardBodyText}>证件号码:350502199210236034</Text>
<Text style={Styles.cardBodyText}>与户主关系:户主</Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
</ScrollView >
);
const { sourceData, isDetail, detailData, editable, disabled } = this.props.obligeeInfo;
console.log(this.props.obligeeInfo);
const { getFieldProps } = this.props.form;
if (isDetail === false) {
return (
<ScrollView >
<WingBlank size="lg">
<WhiteSpace size="lg" />
<Card>
<Card.Header
title={sourceData.dangShiRenXingMing}
extra={<Text style={Styles.cardText} onPress={this.onPress}>&gt;&gt;详情</Text>}
/>
<Card.Body>
<Text style={Styles.cardBodyText}>当事人编号:<Text style={Styles.cardBodyText2}>{sourceData.dangShiRenBianHao}</Text></Text>
<Text style={Styles.cardBodyText}>证件号码:<Text style={Styles.cardBodyText2}>{sourceData.dangShiRenIdentityCard}</Text></Text>
</Card.Body>
</Card>
<WhiteSpace size="lg" />
</WingBlank>
</ScrollView >
);
} else {
return (
<ScrollView>
<List>
<InputItem
{...getFieldProps('dangShiRenXingMing', {
initialValue: detailData.dangShiRenXingMing,
rules: [
{ required: true, message: '不允许为空' },
{ validator: this.validateFWBianMa },
],
})}
clear
placeholder="请输入"
editable={editable}
ref={(el) => { this.customFocusInst = el; }}
>
姓名
</InputItem>
<InputItem
{...getFieldProps('dangShiRenXingBie', {
initialValue: detailData.dangShiRenXingBie,
})}
clear
placeholder="请输入"
editable={editable}
ref={(el) => { this.customFocusInst = el; }}
>
性别
</InputItem>
<InputItem
{...getFieldProps('dangShiRenTelephone', {
initialValue: detailData.dangShiRenTelephone,
})}
clear
placeholder="请输入"
editable={editable}
ref={(el) => { this.customFocusInst = el; }}
>
电话号码
</InputItem>
<InputItem
{...getFieldProps('dangShiRenIdentityCard', {
initialValue: detailData.dangShiRenIdentityCard,
})}
clear
placeholder="请输入"
editable={editable}
ref={(el) => { this.customFocusInst = el; }}
>
身份证号码
</InputItem>
<InputItem
{...getFieldProps('dangShiRenIdentityCardbak', {
initialValue: detailData.dangShiRenIdentityCardbak,
})}
clear
placeholder="请输入"
editable={editable}
ref={(el) => { this.customFocusInst = el; }}
>
身份证类型
</InputItem>
<InputItem
{...getFieldProps('dangShiRenAddress', {
initialValue: detailData.dangShiRenAddress,
})}
clear
placeholder="请输入"
editable={editable}
ref={(el) => { this.customFocusInst = el; }}
>
地址
</InputItem>
<InputItem
{...getFieldProps('DSRMaritalStatus', {
initialValue: detailData.DSRMaritalStatus,
})}
clear
placeholder="请输入"
editable={editable}
ref={(el) => { this.customFocusInst = el; }}
>
婚姻状态
</InputItem>
<InputItem
{...getFieldProps('DSRCensusType', {
initialValue: detailData.DSRCensusType,
})}
clear
placeholder="请输入"
editable={editable}
ref={(el) => { this.customFocusInst = el; }}
>
是否原村民
</InputItem>
<List.Item>
<View style={{ flexDirection: 'row' }}>
<Button style={{ marginRight: 8 }} type="primary" onClick={this.onEdit}>编辑</Button>
<Button style={{ marginRight: 8 }} onClick={this.onSubmit} disabled={disabled}>保存</Button>
<Button onClick={this.onEditBack}>返回</Button>
</View>
</List.Item>
</List>
</ScrollView>
);
}
}
}
const Styles = StyleSheet.create({
......@@ -101,4 +176,4 @@ const Styles = StyleSheet.create({
marginLeft: 13,
},
});
export default ObligeeInfo;
export default createForm()(ObligeeInfo);
......@@ -20,7 +20,8 @@ class ListHouContent extends Component {
}
};
onPressItem = (id) => {
this.props.navigation.navigate('HouseDetail', { id });
// this.props.navigation.navigate('HouseDetail', { id });
this.props.dispatch(createAction('ListHouse/jumpPage')(id));
};
getItemLayout = (data, index) => (
{ length: 120, offset: (120 + 1) * index, index }
......@@ -83,6 +84,8 @@ class ListHouContent extends Component {
renderItem = ({ item }) => {
return (
<FlatListItem
title={item.fangWuZuoLuo}
meta={this.props.ListHouse.metas}
item={item}
onPressItem={this.onPressItem}
/>
......
......@@ -6,9 +6,57 @@ export const getData = async (coordinate, { pst, psz, params = {}, filters = [],
const options = { pst, psz, params, filters, sortBys, sortTypes };
const api = datasourceApi(coordinate);
const meta = await api.meta();
console.info(meta);
console.info(meta.p)
console.info(3);
console.info(makeColumns(meta));
const dsb = await api.query(options);
return getArrayData(dsb, meta);
};
export const getMeta = async (coordinate) => {
const api = datasourceApi(coordinate);
const meta = await api.meta();
return makeColumns(meta);
};
const parseMetas = (metas) => {
const ret = {};
if (!metas) {
return ret;
}
_.forEach(metas, (value, key) => {
let finalValue;
try {
finalValue = JSON.parse(value);
} catch (err) {
finalValue = value;
}
_.set(ret, key, finalValue);
});
return _.pickBy(ret, _.negate(_.isUndefined));
};
const makeColumns = (meta) => {
return (meta.properties || [])
.filter(property => !property.skip)
.map((property) => {
const props = parseMetas(property.metas);
if (!props.title && props.label) {
props.title = props.label;
}
if (props.order === undefined) {
props.order = 0;
}
if ((props.fixed === true || props.fixed === 'left' || props.fixed === 'right') && props.width === undefined) {
props.width = 150;
}
return _.pickBy({
...props,
key: property.name,
required: property.required,
}, _.negate(_.isUndefined));
})
.filter(c => c.visible !== false);
};
// const tmp = async(ddd) => {
// await
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论