summaryrefslogtreecommitdiff
path: root/front-end/src/component
diff options
context:
space:
mode:
authorHongyuan Ma2018-06-08 18:14:43 +0000
committerHongyuan Ma2018-06-08 18:14:43 +0000
commitc2e89c270e2869a6a0de5736db7295b236fe53b2 (patch)
tree5115b65096aa3ab725ead167315dbc7ea5931ce8 /front-end/src/component
parent55c155231749c83a482c403b79969e25a416a656 (diff)
add machine serialler;render test list data;
Diffstat (limited to 'front-end/src/component')
-rw-r--r--front-end/src/component/client-box/index.css6
-rw-r--r--front-end/src/component/client-box/index.jsx32
-rw-r--r--front-end/src/component/result-filter/index.jsx9
3 files changed, 40 insertions, 7 deletions
diff --git a/front-end/src/component/client-box/index.css b/front-end/src/component/client-box/index.css
new file mode 100644
index 0000000..b96f59e
--- /dev/null
+++ b/front-end/src/component/client-box/index.css
@@ -0,0 +1,6 @@
+.improve{
+ background-color: #d9f7be;
+}
+.decline{
+ background-color: #ffccc7;
+} \ No newline at end of file
diff --git a/front-end/src/component/client-box/index.jsx b/front-end/src/component/client-box/index.jsx
new file mode 100644
index 0000000..5fc6599
--- /dev/null
+++ b/front-end/src/component/client-box/index.jsx
@@ -0,0 +1,32 @@
+import React from 'react';
+import './index.css';
+import classNames from 'classnames';
+class ClientBox extends React.Component {
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ isImprove: true,
+ };
+
+ }
+
+ render() {
+ let imgSrc = require('image/client-icon/' + this.props.clientNum + '.png');
+ let std = this.props.std;
+ let median = this.props.median;
+ let boxClass = classNames({
+ 'client-box': true,
+ 'improve': median > std,
+ 'decline': (median <= std)
+ });
+
+ return (
+ <div className={boxClass}>
+ <img src={imgSrc} alt=""/>
+ </div>
+ );
+ }
+}
+
+export default ClientBox; \ No newline at end of file
diff --git a/front-end/src/component/result-filter/index.jsx b/front-end/src/component/result-filter/index.jsx
index fbbc4cf..77bfe28 100644
--- a/front-end/src/component/result-filter/index.jsx
+++ b/front-end/src/component/result-filter/index.jsx
@@ -76,14 +76,9 @@ class ResultFilter extends React.Component {
// selected: newArr,
isClear: false
});
- this.handleIsLoading();
-
- console.log(this.props.isLoading)
- }
-
- handleIsLoading(e) {
- // console.log(e.target.value)
this.props.onIsLoadingChange(true);
+ this.props.onApplyBtnClick(true);
+ console.log('isLoading:' + this.props.isLoading)
}
resetButtonClick() {