Browse Source

人资相关配置

caipin 5 years ago
parent
commit
844bc5bd12

+ 6 - 0
config/webpack.common.config.js

@@ -8,6 +8,7 @@ module.exports = {
     framework: ['react','react-dom','redux','react-redux'],
     staff:'./src/staff/index.js',
     workbench:'./src/workbench/index.js',
+    hr:'./src/human-resource/index.js',
   },
   output: {
     filename: 'js/bundle.js',
@@ -61,6 +62,11 @@ module.exports = {
       filename: 'staff/index.html',
       chunks:['staff','framework']
     }),
+    new HtmlWebpackPlugin({
+      template: 'public/sub_index.html',
+      filename: 'hr/index.html',
+      chunks:['hr','framework']
+    }),
   ]
 
 

+ 4 - 1
config/webpack.prod.config.js

@@ -88,7 +88,10 @@ module.exports = merge(common, {
     hot: true,
     historyApiFallback: {
       rewrites: [
-        { from: /^\/company/, to: '/' },
+        { 
+          from: /^\/company/, to: '/',
+          
+        },
       ]
     }
   },

File diff suppressed because it is too large
+ 1 - 1
dist/api/submenuList.json


+ 5 - 2
public/index.html

@@ -117,7 +117,10 @@
       </aside>
       <!-- END 侧栏主菜单 -->
       <div class="page-content-wrapper">
-        <div id="root"></div>
+        <div id="root">
+
+          
+        </div>
 
 
 
@@ -2052,7 +2055,7 @@
                       </a>
                     </li>
                     <li>
-                      <a href="#" class="app-list-item text-white">
+                      <a href="/hr" class="app-list-item text-white">
                         <div class='icon-stack'>
                           <i class="base base-15 icon-stack-3x opacity-100 color-fusion-200"></i> <i class="base base-10 icon-stack-2x opacity-100 color-fusion-500"></i> <i class="fas fa-users icon-stack-1x opacity-100 color-white"></i>
                         </div>

+ 7 - 4
public/sub_index.html

@@ -117,7 +117,10 @@
       </aside>
       <!-- END 侧栏主菜单 -->
       <div class="page-content-wrapper">
-        <div id="root"></div>
+        <div id="root">
+
+          
+        </div>
 
 
 
@@ -1989,7 +1992,7 @@
               <div class="modal-body">
                   <ul class="app-list w-auto h-auto p-0 text-left">
                     <li>
-                      <a href="/index.html" class="app-list-item text-white">
+                      <a href="/" class="app-list-item text-white">
                         <div class='icon-stack'>
                           <i class="base base-11 icon-stack-3x opacity-100 color-primary-700"></i> <i class="base base-7 icon-stack-2x opacity-100 color-primary-500"></i> <i class="fas fa-chess icon-stack-1x opacity-100 color-white"></i>
                         </div>
@@ -1999,7 +2002,7 @@
                       </a>
                     </li>
                     <li>
-                      <a href="/contact/contact.html" class="app-list-item text-white">
+                      <a href="/contact" class="app-list-item text-white">
                         <div class='icon-stack'>
                           <i class="base base-4 icon-stack-3x opacity-100 color-info-700"></i> <i class="base base-12 icon-stack-2x opacity-100 color-info-500"></i> <i class="fas fa-address-book icon-stack-1x opacity-100 color-white"></i>
                         </div>
@@ -2052,7 +2055,7 @@
                       </a>
                     </li>
                     <li>
-                      <a href="#" class="app-list-item text-white">
+                      <a href="/hr" class="app-list-item text-white">
                         <div class='icon-stack'>
                           <i class="base base-15 icon-stack-3x opacity-100 color-fusion-200"></i> <i class="base base-10 icon-stack-2x opacity-100 color-fusion-500"></i> <i class="fas fa-users icon-stack-1x opacity-100 color-white"></i>
                         </div>

+ 1 - 1
src/app.css

@@ -10,4 +10,4 @@
     font-size: 16px;
     color: #fff;
   }
-  
+

+ 0 - 0
src/human-resource/hr.css


+ 23 - 0
src/human-resource/hr.js

@@ -0,0 +1,23 @@
+import React, { Component } from 'react';
+import { Provider } from 'react-redux';
+
+
+import './hr.css';
+
+class Hr extends Component {
+  render() {
+    //console.log(this.props.store);
+    return (
+      
+        <div>
+         
+          <div >Hello hr react!!!!</div>
+        </div>
+     
+    );
+  }
+}
+
+export default Hr;
+
+

+ 6 - 0
src/human-resource/index.js

@@ -0,0 +1,6 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import Hr from './hr';
+
+
+ReactDOM.render(<Hr />, document.getElementById('root'));

+ 1 - 1
src/workbench/app.js

@@ -20,7 +20,7 @@ class App extends Component {
       <Provider store={store}>
         <div>
           <Submenu />
-          <div className="App">Hello workbench react!!!!</div>
+          <div className="App">Hello workbench2323 react!!!!</div>
         </div>
       </Provider>
     );

+ 2 - 3
src/workbench/index.js

@@ -1,7 +1,6 @@
 import React from 'react';
 import ReactDOM from 'react-dom';
-import App from './App';
+import Workbench from './workbench';
 
 
-//ReactDOM.render('heelo', document.getElementById('root'));
-ReactDOM.render(<App />, document.getElementById('root'));
+ReactDOM.render(<Workbench />, document.getElementById('root'));

+ 3 - 4
src/workbench/submenu/index.js

@@ -41,9 +41,9 @@ class Submenu extends PureComponent {
         if (true) {
             return (
                 <div>
-                    {
+                   {
                     list.map((item) => {
-                        return <div key={item}>{item}</div>
+                        return <span className='ispan' type="text" key={item} >{item}</span>
                     })
                 }
                 </div>
@@ -64,7 +64,6 @@ class Submenu extends PureComponent {
                     <ul>
                         <li><Link to='/'>首页</Link></li>
                         <li><Link to='/company'>关于</Link></li>
-                       
                     </ul>
 
 	      			{/* <Route path='/' exact component={Home}></Route>
@@ -75,7 +74,7 @@ class Submenu extends PureComponent {
 	      		</div>
                 </BrowserRouter>
                 {/* innerRef */}
-                {inputValue}
+                <div >{inputValue}</div>
                 <input onFocus={() => handleInputFocus(list)} ref={(input)=>{this.ivalue=input}} onChange={()=>handleInputChange(this.ivalue)}  />
                 {menu}
                 <div>{this.getListArea()}</div>

+ 3 - 1
src/workbench/submenu/store/constants.js

@@ -1,3 +1,5 @@
 export const SEARCH_FOCUS = 'submenu/SEARCH_FOCUS';
 export const CHANGE_LIST ='submenu/CHANGE_LIST';
-export const CHANGE_INPUTVALUE ='submenu/CHANGE_INPUTVALUE';
+export const CHANGE_INPUTVALUE ='submenu/CHANGE_INPUTVALUE';
+
+

+ 4 - 1
src/workbench/submenu/store/reducer.js

@@ -4,9 +4,10 @@ import { fromJS } from 'immutable';
 
 
 const defaultState = fromJS({
-    menu: 'hello submenu-t00022323222!!!',
+    menu: 'hello submenu-t!!!',
     list:[],
     inputValue:'',
+
 });
 
 
@@ -36,6 +37,8 @@ export default (state = defaultState, action) => {
 
     }
 
+
+
     if(action.type===constants.SEARCH_FOCUS){
         return state.set('menu','clicke me');
         // return {