提交 d157880d authored 作者: zhouhuan's avatar zhouhuan

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

# Conflicts: # src/routes/main/houseinfo/ObligeeInfo.js # src/routes/main/houseinfo/listhouse.js
上级 01212947
......@@ -82,14 +82,22 @@
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/multi-dex" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
......
......@@ -7,6 +7,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Fri Oct 27 18:29:04 CST 2017
#sdk.dir=D\:\\AppData\\Local\\Android\\sdk1
sdk.dir=D\:\\Android\\sdk
#Tue Nov 07 11:03:02 CST 2017
sdk.dir=D\:\\AppData\\Local\\Android\\sdk1
Scanning folders for symlinks in D:\szApp\manager-app-sz\node_modules (44ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to D:\AppData\Local\Android\sdk1\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to D:\AppData\Local\Android\sdk1\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
Incremental java compilation is an incubating feature.
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to D:\AppData\Local\Android\sdk1\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:app:prepareComAndroidSupportAppcompatV72531Library
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library
:app:prepareComAndroidSupportSupportCompat2531Library
:app:prepareComAndroidSupportSupportCoreUi2531Library
:app:prepareComAndroidSupportSupportCoreUtils2531Library
:app:prepareComAndroidSupportSupportFragment2531Library
:app:prepareComAndroidSupportSupportMediaCompat2531Library
:app:prepareComAndroidSupportSupportV42531Library
:app:prepareComAndroidSupportSupportVectorDrawable2531Library
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library
:app:prepareComFacebookFrescoDrawee130Library
:app:prepareComFacebookFrescoFbcore130Library
:app:prepareComFacebookFrescoFresco130Library
:app:prepareComFacebookFrescoImagepipeline130Library
:app:prepareComFacebookFrescoImagepipelineBase130Library
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library
:app:prepareComFacebookReactReactNative0495Library
:app:prepareComFacebookSoloaderSoloader010Library
:app:prepareComGoogleAndroidGmsPlayServicesBase1001Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement1001Library
:app:prepareComGoogleAndroidGmsPlayServicesGcm1001Library
:app:prepareComGoogleAndroidGmsPlayServicesIid1001Library
:app:prepareComGoogleAndroidGmsPlayServicesTasks1001Library
:app:prepareOrgWebkitAndroidJscR174650Library
:react-native-device-info:preBuild UP-TO-DATE
:react-native-device-info:preReleaseBuild UP-TO-DATE
:react-native-device-info:checkReleaseManifest
:react-native-device-info:preDebugAndroidTestBuild UP-TO-DATE
:react-native-device-info:preDebugBuild UP-TO-DATE
:react-native-device-info:preDebugUnitTestBuild UP-TO-DATE
:react-native-device-info:preReleaseUnitTestBuild UP-TO-DATE
:react-native-device-info:prepareComAndroidSupportAppcompatV72301Library
:react-native-device-info:prepareComAndroidSupportSupportV42400Library
:react-native-device-info:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library
:react-native-device-info:prepareComFacebookFrescoDrawee130Library
:react-native-device-info:prepareComFacebookFrescoFbcore130Library
:react-native-device-info:prepareComFacebookFrescoFresco130Library
:react-native-device-info:prepareComFacebookFrescoImagepipeline130Library
:react-native-device-info:prepareComFacebookFrescoImagepipelineBase130Library
:react-native-device-info:prepareComFacebookFrescoImagepipelineOkhttp3130Library
:react-native-device-info:prepareComFacebookReactReactNative0495Library
:react-native-device-info:prepareComFacebookSoloaderSoloader010Library
:react-native-device-info:prepareComGoogleAndroidGmsPlayServicesBase1001Library
:react-native-device-info:prepareComGoogleAndroidGmsPlayServicesBasement1001Library
:react-native-device-info:prepareComGoogleAndroidGmsPlayServicesGcm1001Library
:react-native-device-info:prepareComGoogleAndroidGmsPlayServicesIid1001Library
:react-native-device-info:prepareComGoogleAndroidGmsPlayServicesTasks1001Library
:react-native-device-info:prepareOrgWebkitAndroidJscR174650Library
:react-native-device-info:prepareReleaseDependencies
:react-native-device-info:compileReleaseAidl
:react-native-device-info:compileReleaseNdk UP-TO-DATE
:react-native-device-info:compileLint
:react-native-device-info:copyReleaseLint UP-TO-DATE
:react-native-device-info:compileReleaseRenderscript
:react-native-device-info:generateReleaseBuildConfig UP-TO-DATE
:react-native-device-info:generateReleaseResValues
:react-native-device-info:generateReleaseResources
:react-native-device-info:mergeReleaseResources UP-TO-DATE
:react-native-device-info:processReleaseManifest
:react-native-device-info:processReleaseResources UP-TO-DATE
:react-native-device-info:generateReleaseSources
:react-native-device-info:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:react-native-device-info:javaPreCompileRelease
:react-native-device-info:compileReleaseJavaWithJavac UP-TO-DATE
:react-native-device-info:extractReleaseAnnotations UP-TO-DATE
:react-native-device-info:mergeReleaseShaders
:react-native-device-info:compileReleaseShaders
:react-native-device-info:generateReleaseAssets
:react-native-device-info:mergeReleaseAssets
:react-native-device-info:mergeReleaseProguardFiles
:react-native-device-info:packageReleaseRenderscript UP-TO-DATE
:react-native-device-info:packageReleaseResources
:react-native-device-info:processReleaseJavaRes UP-TO-DATE
:react-native-device-info:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:react-native-device-info:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:react-native-device-info:mergeReleaseJniLibFolders UP-TO-DATE
:react-native-device-info:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
:react-native-device-info:transformNativeLibsWithSyncJniLibsForRelease UP-TO-DATE
:react-native-device-info:bundleRelease UP-TO-DATE
:react-native-vector-icons:preBuild UP-TO-DATE
:react-native-vector-icons:preReleaseBuild UP-TO-DATE
:react-native-vector-icons:checkReleaseManifest
:react-native-vector-icons:preDebugAndroidTestBuild UP-TO-DATE
:react-native-vector-icons:preDebugBuild UP-TO-DATE
:react-native-vector-icons:preDebugUnitTestBuild UP-TO-DATE
:react-native-vector-icons:preReleaseUnitTestBuild UP-TO-DATE
:react-native-vector-icons:prepareComAndroidSupportAppcompatV72301Library
:react-native-vector-icons:prepareComAndroidSupportSupportV42301Library
:react-native-vector-icons:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library
:react-native-vector-icons:prepareComFacebookFrescoDrawee130Library
:react-native-vector-icons:prepareComFacebookFrescoFbcore130Library
:react-native-vector-icons:prepareComFacebookFrescoFresco130Library
:react-native-vector-icons:prepareComFacebookFrescoImagepipeline130Library
:react-native-vector-icons:prepareComFacebookFrescoImagepipelineBase130Library
:react-native-vector-icons:prepareComFacebookFrescoImagepipelineOkhttp3130Library
:react-native-vector-icons:prepareComFacebookReactReactNative0495Library
:react-native-vector-icons:prepareComFacebookSoloaderSoloader010Library
:react-native-vector-icons:prepareOrgWebkitAndroidJscR174650Library
:react-native-vector-icons:prepareReleaseDependencies
:react-native-vector-icons:compileReleaseAidl
:react-native-vector-icons:compileReleaseNdk UP-TO-DATE
:react-native-vector-icons:compileLint
:react-native-vector-icons:copyReleaseLint UP-TO-DATE
:react-native-vector-icons:compileReleaseRenderscript
:react-native-vector-icons:generateReleaseBuildConfig UP-TO-DATE
:react-native-vector-icons:generateReleaseResValues
:react-native-vector-icons:generateReleaseResources
:react-native-vector-icons:mergeReleaseResources UP-TO-DATE
:react-native-vector-icons:processReleaseManifest
:react-native-vector-icons:processReleaseResources UP-TO-DATE
:react-native-vector-icons:generateReleaseSources
:react-native-vector-icons:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:react-native-vector-icons:javaPreCompileRelease
:react-native-vector-icons:compileReleaseJavaWithJavac UP-TO-DATE
:react-native-vector-icons:extractReleaseAnnotations UP-TO-DATE
:react-native-vector-icons:mergeReleaseShaders
:react-native-vector-icons:compileReleaseShaders
:react-native-vector-icons:generateReleaseAssets
:react-native-vector-icons:mergeReleaseAssets
:react-native-vector-icons:mergeReleaseProguardFiles
:react-native-vector-icons:packageReleaseRenderscript UP-TO-DATE
:react-native-vector-icons:packageReleaseResources
:react-native-vector-icons:processReleaseJavaRes UP-TO-DATE
:react-native-vector-icons:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:react-native-vector-icons:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:react-native-vector-icons:mergeReleaseJniLibFolders UP-TO-DATE
:react-native-vector-icons:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
:react-native-vector-icons:transformNativeLibsWithSyncJniLibsForRelease UP-TO-DATE
:react-native-vector-icons:bundleRelease UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:bundleDebugJsAndAssets SKIPPED
:app:copyDebugIconFonts UP-TO-DATE
:app:processDebugManifest
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Cannot create directory D:\szApp\manager-app-sz\android\app\build\generated\source\r\debug\org\webkit\android_jsc
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 14.654 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
import React, { PureComponent } from 'react';
import { View } from 'react-native';
import { WhiteSpace, List, Picker } from 'antd-mobile';
import { createAction } from '../utils/index';
class PickerComponent extends PureComponent {
onClick = () => {
this.props.dispatch(createAction('domain/fetch')());
this.props.onClick();
};
onPickerChange = (val) => {
let colNum = 1;
const d = [...this.props.data];
const asyncValue = [...val];
if (val[0] !== undefined) {
d.forEach((i) => {
if (i.value === 'zj') {
colNum = 2;
if (!i.children) {
i.children = [{
value: 'zj-nb',
label: '宁波',
}, {
value: 'zj-hz',
label: '杭州',
}];
asyncValue.push('zj-nb');
} else if (val[1] === 'zj-hz') {
i.children.forEach((j) => {
if (j.value === 'zj-hz') {
j.children = [{
value: 'zj-hz-xh',
label: '西湖区',
}];
asyncValue.push('zj-hz-xh');
}
});
colNum = 3;
}
}
});
} else {
colNum = 1;
}
this.props.onPickerChange(val);
};
render() {
const { data, pathVal, cols } = this.props;
return (
<View>
<WhiteSpace size="lg" />
<List style={{ backgroundColor: 'white' }} className="picker-list">
<Picker
data={this.props.data}
cols={this.props.cols}
value={this.props.asyncValue}
data={data}
cols={3}
value={pathVal}
onPickerChange={this.onPickerChange}
onOk={v => console.log(v)}
>
<List.Item arrow="horizontal" onClick={this.onClick}>当前基地</List.Item>
</Picker>
......
......@@ -46,7 +46,7 @@ export default {
},
*getDSRList({ payload }, { take, put, call, select }) {
const { clear, pName } = payload;
console.info(payload);
// console.info(payload);
if (clear === 'clear') {
yield put({ type: 'clearList', payload: {} });
}
......@@ -58,8 +58,8 @@ export default {
datasourceName: 'QueryDSRInfoTable',
};
const result = yield call(getData, coordinate, { pst: size, psz: 10, params: { pName } });
console.info('查询的结果');
console.info(result);
// console.info('查询的结果');
// console.info(result);
const meta = yield call(getMeta, coordinate);
yield put({ type: 'setMetas', payload: meta });
// const result = yield call('', 'query-DSRFWInfo', 'QueryfwTable', { pst: size, psz: 10 });
......
/* eslint-disable prefer-destructuring,guard-for-in */
import { fetchDomains, switchDomain, currentDomain } from '../services/domain';
import { getDomain, setDomain } from '../utils/auth';
const findTarget = (list, dmpath) => {
// 循环 list,元素el
// 如果 el.value == dmpath, return el;
// 否则 findTarget(el.children, dmpath)
// 如果找到,返回找到的
// 如果没找到,继续循环
// 循环结束: return null;
for (let i = 0; i < list.length; i++) {
if (list[i].value === dmpath) {
return list[i];
} else {
const data = findTarget(list[i].children, dmpath);
// console.log(data);
if (data) {
return data;
}
}
}
return null;
};
const createData = async (list, dmpath, payload) => {
console.log(list);
console.log(dmpath);
// 根据path用fetchDomains 查出children
let childrens;
let pathArray;
if (dmpath !== '/') {
childrens = await fetchDomains(dmpath);
console.log(childrens);
const childrenPath = childrens[0].path;
pathArray = [...payload, childrenPath];
} else {
pathArray = [...payload];
}
const childrenData = [];
childrens.map(({ name, path }) => {
childrenData.push({ label: name, value: path, children: [] });
return childrenData;
});
// 根据path在list查出需要添加children的对象target
const findData = findTarget(list, dmpath);
findData.children = childrenData;
console.log(findData);
const data = list;
console.log(list);
return { data, pathArray };
};
export default {
namespace: 'domain',
......@@ -8,6 +56,9 @@ export default {
state: {
init: undefined,
list: [],
listChildren: [],
arrayPath: [],
cols: '',
},
subscriptions: {
......@@ -20,16 +71,33 @@ export default {
const domain = yield call(getDomain);
const init = domain ? domain.path : undefined;
const list = yield call(fetchDomains, '/', true);
const datas = [];
list.map(({ name, path }) => {
datas.push({ label: name, value: path, children: [] });
return datas;
});
yield put({ type: 'queryInit', payload: init });
yield put({ type: 'queryList', payload: list });
yield put({ type: 'queryArryPath', payload: ['/'] });
yield put({ type: 'queryList', payload: datas });
},
*fetchParam(dmpath, { put, call }) {
const domain = yield call(getDomain);
const init = domain ? domain.path : undefined;
const list = yield call(fetchDomains, dmpath);
yield put({ type: 'queryInit', payload: init });
yield put({ type: 'queryList', payload: list });
*fetchParam({ payload }, { put, call, select }) {
console.log(payload);
let dmpath = '';
if (payload.length === 1) {
dmpath = payload[0];
} else if (payload.length === 2) {
dmpath = payload[1];
} else {
dmpath = payload[2];
}
const { list } = yield select(state => state.domain);
// const target = yield call(findTarget, list, dmpath);
// console.log(target);
const datas = yield call(createData, list, dmpath, payload);
console.log(datas);
yield put({ type: 'queryList', payload: datas.data });
yield put({ type: 'queryArryPath', payload: datas.pathArray });
},
*switch({ payload: domainPath }, { put, call }) {
yield call(switchDomain, domainPath);
......@@ -52,6 +120,18 @@ export default {
list,
};
},
queryListChildren(state, { payload: listChildren }) {
return {
...state,
listChildren,
};
},
queryArryPath(state, { payload: arrayPath }) {
return {
...state,
arrayPath,
};
},
},
};
......@@ -7,6 +7,7 @@ import DSRInfo from './dangshireninfo/dsrinfo';
import DSRInfoDetail from './dangshireninfo/dsrinfodetail';
import peopleInfo from './peopleInfo/peopleInfo';
import domain from './domain';
import userInfo from './userinfo/userinfo';
export default [
welcome,
......@@ -18,4 +19,5 @@ export default [
DSRInfo,
DSRInfoDetail,
peopleInfo,
userInfo,
];
......@@ -30,7 +30,7 @@ class DSRInfoScreeen extends Component {
onEndReached = () => {
// 以下是制造新数据
if (!this.props.loading) {
console.info('执行了上啦加载');
// console.info('执行了上啦加载');
this.props.dispatch(createAction('DSRInfo/getDSRList')({ clear: '', pName: this.props.DSRInfo.searchValue }));
}
};
......
......@@ -61,20 +61,20 @@ const Content = TabNavigator({
),
},
},
// UserInfoPageScreen: {
// screen: userInfoPageScreen,
// navigationOptions: {
// lazy: true,
// tabBarLabel: '个人中心',
// // Note: By default the icon is only shown on iOS. Search the showIcon option below.
// tabBarIcon: () => (
// <Image
// source={chatsIcon}
// style={[styles.icon]}
// />
// ),
// },
// },
UserInfoPageScreen: {
screen: userInfoPageScreen,
navigationOptions: {
lazy: true,
tabBarLabel: '个人中心',
// Note: By default the icon is only shown on iOS. Search the showIcon option below.
tabBarIcon: () => (
<Image
source={chatsIcon}
style={[styles.icon]}
/>
),
},
},
}, {
lazy: true,
tabBarPosition: 'bottom',
......
......@@ -24,6 +24,9 @@ class AddPeopleInfo extends React.Component {
}
});
};
onEditBack = () => {
this.props.dispatch(createAction('peopleInfo/onEBack')('clear'));
};
validateNoNull = (rule, value, callback) => {
if (value) {
callback();
......@@ -31,9 +34,6 @@ class AddPeopleInfo extends React.Component {
callback(new Error('At least four charactors for account'));
}
};
onEditBack = () => {
this.props.dispatch(createAction('peopleInfo/onEBack')('clear'));
};
render() {
const { getFieldProps } = this.props.form;
const { detailData, metas } = this.props.peopleInfo;
......
/**
* Created by zhouhuan on 2017/11/9.
*/
import { StackNavigator } from 'react-navigation';
import PeopleInfo from './peopelInfo';
import PeopleDetailInfo from './peopleDetailInfo';
import AddPeopleInfo from './addPeopleInfo';
const quanshuInfoErJiScreen = StackNavigator(
{
peopleInfoList: {
screen: PeopleInfo,
},
peopleInfoDetail: {
screen: PeopleDetailInfo,
},
addPeoppleInfo: {
screen: AddPeopleInfo,
},
},
{
headerMode: 'none',
navigationOptions: {
gesturesEnabled: false,
},
},
);
export default quanshuInfoErJiScreen;
/* eslint-disable prefer-destructuring */
import React, { PureComponent } from 'react';
import { View, StyleSheet, Dimensions, ScrollView, Text } from 'react-native';
import { connect } from 'react-redux';
import PickerComponent from '../../../components/pickerComponent';
import { createAction } from '../../../utils/index';
const width = Dimensions.get('window').width;
const height = Dimensions.get('window').height;
// create a component
@connect(({ userInfo }) => ({ userInfo }))
@connect(({ userInfo, domain }) => ({ userInfo, domain }))
class UserInfoHomeScreen extends PureComponent {
onClick = () => {
console.log('666');
this.props.dispatch(createAction('domain/fetch')());
};
onPickerChange =(path) => {
// console.log(path);
this.props.dispatch(createAction('domain/fetchParam')(path));
};
render() {
const { list, listChildren, arrayPath, cols } = this.props.domain;
console.log(arrayPath);
let datas = [];
if (listChildren.length === 0) {
datas = list;
} else {
datas = listChildren;
}
return (
<View style={{ flex: 1, backgroundColor: '#06C1AE' }}>
<View style={{ position: 'absolute', width, height, backgroundColor: '#06C1AE' }} />
......@@ -25,7 +42,7 @@ class UserInfoHomeScreen extends PureComponent {
<Text style={{ color: 'white', marginTop: 4 }}>个人信息</Text>
</View>
</View>
<PickerComponent />
<PickerComponent onClick={this.onClick} onPickerChange={this.onPickerChange} data={datas} pathVal={arrayPath} cols={cols} />
</View>
</ScrollView>
</View>
......
......@@ -39,7 +39,7 @@ const config = {
productId: 'manager-app-sz',
footerText: '上海铂蓝信息科技有限公司',
contextPath: '',
apiContextPath: 'http://14.21.68.149:9089/test',
apiContextPath: 'http://192.168.1.22:8080/bm',
defaultDateFormat,
defaultTimeFormat,
defaultDateTimeFormat,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论