|
@@ -7,7 +7,7 @@ import {RESET,SETDROPSHOW,HIDEDROP,CLICKCOUNT,ISREAD} from '@store/types/homePag
|
|
|
import {getModules as fetchModules} from '@store/async-actions/fetchModules.js';
|
|
|
import {getCommSymptomPush} from '@store/async-actions/mainSuit.js'
|
|
|
import {GET_BIGDATAPUSH,MIX_CONFIRM,COMM_CONFIRM,CHANGE_LABELVAL} from '@store/types/mainSuit';
|
|
|
-import {SETCHECKBOX,CHANGECHECKTEXTLABEL} from '@types/checkBody';
|
|
|
+import {SETCHECKBOX,CHANGECHECKTEXTLABEL,CHECKCONFIRMSELECTED} from '@types/checkBody';
|
|
|
import {CURRENT_CONFIRM,SETMAINCHECKBOX,CURRENT_TEXT_LABEL,CURRENT_GET_BIGDATAPUSH} from '@types/currentIll';
|
|
|
import {getLabelIndex,fullfillText,getIds} from '@common/js/func.js';
|
|
|
import {billing} from '@store/async-actions/pushMessage';
|
|
@@ -130,7 +130,7 @@ function otherHisConfirm(dispatch,store,params){
|
|
|
}
|
|
|
let existsId = getIds(exists);
|
|
|
let withsId = getIds(withs);
|
|
|
- const ids = existsId.join(",")+withsId.join(",");
|
|
|
+ const ids = existsId.join(",")+','+withsId.join(",");
|
|
|
if(!ids&&nones){ //只有无的项目
|
|
|
dispatch({
|
|
|
type: CONFIRMSELECTED,
|
|
@@ -165,7 +165,51 @@ function otherHisConfirm(dispatch,store,params){
|
|
|
}
|
|
|
|
|
|
function checkBodyConfirm(dispatch,store,params){
|
|
|
- console.log(params)
|
|
|
+ const {nones,exists,withs,exclusion,excluName,copyType} = params;
|
|
|
+ // const ikey = params.ikey.substr(1,1);
|
|
|
+ const index = params.ikey;
|
|
|
+ let ikey = getLabelIndex(index);
|
|
|
+ if(params.exclusion){
|
|
|
+ dispatch({
|
|
|
+ type: CHECKCONFIRMSELECTED,
|
|
|
+ data:{exclusion,excluName,ikey,copyType}
|
|
|
+ });
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ let existsId = getIds(exists);
|
|
|
+ let withsId = getIds(withs);
|
|
|
+ const ids = existsId.join(",")+','+withsId.join(",");
|
|
|
+ if(!ids&&nones){ //只有无的项目
|
|
|
+ dispatch({
|
|
|
+ type: CHECKCONFIRMSELECTED,
|
|
|
+ data: {exists:[],withs:[],nones:nones,ikey,copyType}
|
|
|
+ });
|
|
|
+ dispatch({
|
|
|
+ type:ISREAD
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // const ids = exists.join(",")+withs.join(",");
|
|
|
+ let has = [],wes=[];
|
|
|
+ //获取选中项目模板
|
|
|
+ fetchModules(ids).then((res)=>{
|
|
|
+ if(+res.data.code===0){
|
|
|
+ const list = res.data.data;
|
|
|
+ existsId.map((i)=>{
|
|
|
+ has.push(...list[i].questionMapping);
|
|
|
+ });
|
|
|
+ withsId.map((i)=>{
|
|
|
+ wes.push(...list[i].questionMapping);
|
|
|
+ });
|
|
|
+ dispatch({
|
|
|
+ type: CHECKCONFIRMSELECTED,
|
|
|
+ data: {exists:fullfillText(has,false,false).newArr,withs:fullfillText(wes,false,false).newArr,nones:nones,ikey,copyType}
|
|
|
+ });
|
|
|
+ dispatch({
|
|
|
+ type:ISREAD
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
//在不同模块(主诉、现病史等)下拉选中调用不同事件
|