123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import React from 'react';
- import {connect} from 'react-redux';
- import {SETRADIO,CLEARSELECTED,CONFIRMSELECTED,SETOTHERINPUT} from '@types/otherHistory';
- import {SETMAININPUT} from '@types/mainSuit';
- import {SETCURRENTINPUT} from '@types/currentIll';
- import {SETCHECKINPUT} from "@types/checkBody";
- import InlineTag from "../common/components/InlineTag";
- import {getLabelIndex} from "@common/js/func";
- import {CLICKCOUNT} from '@types/homePage.js';
- function mapStateToProps(state){
- return {}
- }
- const tagInpActions = {
- 1:SETMAININPUT,
- 2:SETCURRENTINPUT,
- 3:SETOTHERINPUT,
- 4:SETCHECKINPUT
- };
- function mapDispatchToProps(dispatch,store){
- return {
- handleInput(params) {
- const type = params.ikey.substr(0,1); //当前所在的项目
- const {ikey,text,prefix,suffix} = params;
- const i = getLabelIndex(ikey);
- const inner = params.ikey.substr(-1);
- dispatch({
- type:tagInpActions[+type],
- i,
- text,
- prefix,
- suffix,
- subIndex:inner
- })
- },
- handledbClick(obj){
- dispatch({
- type:CLICKCOUNT,
- data:obj,
- clickType:'双击',
- num:1
- });
- }
- }
- }
- const InlineTagCont = connect(mapStateToProps,mapDispatchToProps)(InlineTag);
- export default InlineTagCont;
|