Browse Source

Merge remote-tracking branch 'origin/dev/otherHis' into dev/new1

zhouna 6 years ago
parent
commit
0604b24880

+ 4 - 3
src/common/components/NumberPan/index.jsx

@@ -1,6 +1,7 @@
 import React,{Component} from 'react';
 import style from './index.less';
 import ReactDom from "react-dom";
+import backspace from '../../images/backspace.png'
 
 class NumberPan extends Component{
   constructor(props){
@@ -74,19 +75,19 @@ class NumberPan extends Component{
           <td><button onClick={select}>4</button></td>
           <td><button onClick={select}>5</button></td>
           <td><button onClick={select}>6</button></td>
-          <td><button onClick={this.handleBack.bind(this)}>回退</button></td>
+          <td><button onClick={this.handleBack.bind(this)}><img src={backspace} onClick={this.handleBack.bind(this)} /></button></td>
         </tr>
         <tr>
           <td><button onClick={select}>7</button></td>
           <td><button onClick={select}>8</button></td>
           <td><button onClick={select}>9</button></td>
-          <td><button onClick={this.handleClear.bind(this)}>清空</button></td>
+          <td><button onClick={this.handleClear.bind(this)} className={style['clearN']}>清空</button></td>
         </tr>
         <tr>
           <td><button onClick={select}>.</button></td>
           <td><button onClick={select}>0</button></td>
           <td><button onClick={select}>~</button></td>
-          <td><button onClick={this.handleClose.bind(this)}>确定</button></td>
+          <td><button onClick={this.handleClose.bind(this)} className={style['confirm']}>确定</button></td>
         </tr>
       </table>
       </div>

+ 20 - 0
src/common/components/NumberPan/index.less

@@ -21,4 +21,24 @@
   button:hover{
     border-color: @blue;
   }
+  .confirm{
+    color: #3B9ED0;
+    font-weight: bold;
+    text-align: center;
+    padding-left: 14px;
+    font-size: 14px;
+    line-height: normal;
+  }
+  .imgN{
+    text-align: right;
+    vertical-align: middle;
+    padding-right: 8px;
+    cursor: pointer;
+  }
+  .clearN{
+    color:#F6514A;
+    text-align: center;
+    padding-left: 8px;
+    font-weight: bold;
+  }
 }

+ 1 - 1
src/components/CopyRight/index.jsx

@@ -59,7 +59,7 @@ class CopyRight extends Component {
   render() {
     const { number, date, content, copyVisible, disVisible, disContent, hasNewVersion } = this.props.copyRight;
     const { showCopyModal, closeCopyModal, showDisclatmerModal, closeDisclatmerModal } = this;
-    const copyContent = content.map(item => {
+    const copyContent = content&&content.map(item => {
       return (
         <div className={style['message']}>
           {item.title}

+ 12 - 6
src/components/Inspect/index.jsx

@@ -6,8 +6,8 @@ import { getExcelList } from '@store/actions/inspect';
 import Notify from '@commonComp/Notify';
 import store from '@store';
 import $ from 'jquery';
-import { host } from '@utils/config.js';
-import {isIE} from '@utils/tools.js';
+import { host,prefix } from '@utils/config.js';
+import {isIE,getUrlArgObject} from '@utils/tools.js';
 
 
 (function ($) {
@@ -27,9 +27,9 @@ import {isIE} from '@utils/tools.js';
 import "./dists/FileAPI.js";
 
 const isLocal = window.location.hostname.indexOf('localhost')!=-1;
-const qhost = isLocal?host:'';
+const qhost = isLocal?host+prefix:prefix;
 const api = {
-    upload: qhost+'/api/icss/lisExcelRes/lisExcelAnalysis'
+    upload: qhost+'/lisExcelRes/lisExcelAnalysis'
 };
 
 class Inspect extends React.Component {
@@ -78,13 +78,19 @@ class Inspect extends React.Component {
             },
             function (files, rejected){
                 if( files.length ){
-                    console.log(files[0])
+                    //console.log(files[0])
+                  const securityCode = getUrlArgObject("code");
+                  const appKeyId = getUrlArgObject("appI");
+                  const appKeySecret = getUrlArgObject("appS");
                     FileAPI.upload({
                         // url: '/api/icss/lisExcelRes/lisExcelAnalysis',
                         url: api.upload,
                         data:{ hospitalCode:baseData == '{}'? '' : baseData.hospitalCode },
                         files: { uploadfile: files[0] },
                         headers:{
+                          appKeyId:appKeyId,
+                          appKeySecret:appKeySecret,
+                          securityCode:securityCode
                             // 'Content-Type':'Content-Type: multipart/form-data'
                             // 'Content-Type':'application/json;charset=UTF-8'
                             // 'Content-type': "text/plain"
@@ -97,7 +103,7 @@ class Inspect extends React.Component {
                                 let message = res.data.messages;
                                 store.dispatch(getExcelList(res.data));
                                 fetchPushInfos&&fetchPushInfos();
-                                if (message.length != 0) {
+                                if (message&&message.length != 0) {
                                     that.setState({
                                         visible:true,
                                         dom:message,

+ 2 - 2
src/components/PushItems/index.jsx

@@ -450,7 +450,7 @@ class PushItems extends Component {
                               />
                               {item.isReason === 1 && (
                                 <div className={style["warn"]}>
-                                  {tipsDiscalimer.data.data[0].description}
+                                  {tipsDiscalimer.data.data[0]&&tipsDiscalimer.data.data[0].description}
                                 </div>
                               )}
                             </div>
@@ -465,7 +465,7 @@ class PushItems extends Component {
             </div>
           </div>
         </div>
-        {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data[1].description}}></div>}
+        {tipsDiscalimer.data && <div className={style['disTips']} dangerouslySetInnerHTML={{__html: tipsDiscalimer.data.data[1]&&tipsDiscalimer.data.data[1].description}}></div>}
         {showTipsDetails && <DetailsModal  
             showTipsDetails = {showTipsDetails}
             hideTips = {this.hideTips}

+ 2 - 2
src/store/actions/checkBody.js

@@ -345,9 +345,9 @@ export const changeLabelVal = (state,action)=>{//双击标签输入改变值
         }else{
           localStorage.setItem('radio'+item.id,JSON.stringify([li]));
         }
+        //取消原选中状态
+        item.questionDetailList.find((it)=>it.selected==true).selected=false;
       }
-      //取消原选中状态
-      item.questionDetailList.find((it)=>it.selected==true).selected=false;
       item.labelPrefix = prefix||'';
       item.labelSuffix = suffix||'';
       // res.saveText[index] = totalVal;

+ 2 - 2
src/store/actions/currentIll.js

@@ -553,9 +553,9 @@ export const changeLabelVal = (state,action)=>{
         }else{
           localStorage.setItem('radio'+item.id,JSON.stringify([li]));
         }
+        //取消原选中状态
+        item.questionDetailList.find((it)=>it.selected==true).selected=false;
       }
-      //取消原选中状态
-      item.questionDetailList.find((it)=>it.selected==true).selected=false;
       item.labelPrefix = prefix||'';
       item.labelSuffix = suffix||'';
       res.saveText[index] = labText;

+ 2 - 2
src/store/actions/otherHistory.js

@@ -307,9 +307,9 @@ export function changeTextLabel(state,action) {
         }else{
           localStorage.setItem('radio'+item.id,JSON.stringify([li]));
         }
+        //取消原选中状态
+        item.questionDetailList.find((it)=>it.selected==true).selected=false;
       }
-      //取消原选中状态
-      item.questionDetailList.find((it)=>it.selected==true).selected=false;
       item.labelPrefix = prefix||'';
       item.labelSuffix = suffix||'';
       res.saveText[index] = labText;

+ 1 - 1
src/store/async-actions/assistCheck.js

@@ -11,7 +11,7 @@ export const getSearchList = (val) => {
     let baseList = store.getState();
     let sex = baseList.patInfo.message.patientSex;
     return (dispatch) => {
-        axios.json('/api/icss/retrieval/getTagInfos',{
+        axios.json('/retrieval/getTagInfos',{
             type:'6',
             age:baseList.patInfo.message.patientAge,
             inputStr:val,

+ 2 - 2
src/store/async-actions/copyRight.js

@@ -5,7 +5,7 @@ import { storageLocal } from "@utils/tools"
 export const getMessage = (dispatch, getState) => {
     const state = getState();
     // 请求地址
-    post('/api/icss/versionInfo/getVersionInfoAlls')
+    post('/versionInfo/getVersionInfoAlls')
     .then((data) => {
         
         const versionInfo = JSON.parse(storageLocal.get('versionInfo'));
@@ -33,7 +33,7 @@ export const getMessage = (dispatch, getState) => {
 export const getDisMessage = (dispatch, getState) => {
     const state = getState();
     // 请求地址
-    post('/api/icss/disclaimerInformation/getDisclaimerInformations')
+    post('/disclaimerInformation/getDisclaimerInformations')
     .then((data) => {
         dispatch({
             type: GET_DISCLAIMER_MESSAGE,

+ 1 - 1
src/store/async-actions/diagnosticSearch.js

@@ -18,7 +18,7 @@ export const getSearchList = (val) => {
         for(let i = 0; i < diagnosticList.length; i++) {
             noIds.push(diagnosticList[i].id)
         }
-        json('/api/icss/retrieval/getTagInfos',{
+        json('/retrieval/getTagInfos',{
             type:'7',
             age:state.patInfo.message.patientAge,
             inputStr:val,

+ 7 - 7
src/store/async-actions/fetchModules.js

@@ -9,13 +9,13 @@ import {SETOTHERHISTORY} from "../types/homePage";
 import config from "@config/index";
 
 const api={
-  getSpreadModule:'/api/icss/questionInfo/getByIds',
-  getModule:'/api/icss/questionInfo/getById',
-  searchURL: '/api/icss/retrieval/getTagInfos',
-  getOtherHisRecord: '/api/icss/inquiryInfo/getLastOther',
-  getBigPush:'/api/icss/push/pushInner',
-  saveMode:'/api/icss/doctorPageMode/saveDoctorPageModes',
-  getSymptomFeature:'/api/icss/feature/getSymptomFeature'
+  getSpreadModule:'/questionInfo/getByIds',
+  getModule:'/questionInfo/getById',
+  searchURL: '/retrieval/getTagInfos',
+  getOtherHisRecord: '/inquiryInfo/getLastOther',
+  getBigPush:'/push/pushInner',
+  saveMode:'/doctorPageMode/saveDoctorPageModes',
+  getSymptomFeature:'/feature/getSymptomFeature'
 };
 
 export const getFeature = (item)=>{

+ 1 - 1
src/store/async-actions/getInfoByUuid.js

@@ -6,7 +6,7 @@ import { getUrlArgObject } from '@utils/tools';
 
 export const initPersonInfo = () => {        //初始化数据
     return (dispatch) => {
-        axios.json('/api/icss/tranFieldInfo/getInfoByUuid',{
+        axios.json('/tranFieldInfo/getInfoByUuid',{
             "uuid":getUrlArgObject('hospitalId'),
         }).then((res)=>{
             const data =res.data;

+ 1 - 1
src/store/async-actions/historyTemplates.js

@@ -8,7 +8,7 @@ export const initItemList = () => {
     // let whichSign = baseList.typeConfig.typeConfig;
     let state = baseList.patInfo.message;
     return (dispatch) => {
-        axios.json('/api/icss/inquiryInfo/hisInquirys',{
+        axios.json('/inquiryInfo/hisInquirys',{
             "hospitalId": state.hospitalId, 
             "patientId": state.patientId, 
             // "sign":whichSign

+ 2 - 2
src/store/async-actions/homePage.js

@@ -10,8 +10,8 @@ import {getOtherHisRecord,getInitData} from '@store/async-actions/fetchModules.j
 import {initHistoryDetails} from '@store/async-actions/patInfo';
 
 const api = {
-  getModules:'/api/icss/moduleInfo/getAll',
-  clickCount:'/api/icss/buriedSomeStatistical/saveBuriedSomeStatisticals' //埋点统计
+  getModules:'/moduleInfo/getAll',
+  clickCount:'/buriedSomeStatistical/saveBuriedSomeStatisticals' //埋点统计
 };
 
 function modulesParseJson(data){

+ 2 - 2
src/store/async-actions/inspect.js

@@ -12,7 +12,7 @@ export const getSearchList = (val) => {
     let baseList = store.getState();
     let sex = baseList.patInfo.message.patientSex;
     return (dispatch) => {
-        axios.json('/api/icss/retrieval/getTagInfos',{
+        axios.json('/retrieval/getTagInfos',{
             type:'5',
             age:baseList.patInfo.message.patientAge,
             inputStr:val,
@@ -28,7 +28,7 @@ export const getSublableList = (id,idx) => {
     let baseList = store.getState();
     let sex = baseList.patInfo.message.patientSex;
     return (dispatch) => {
-        axios.json('/api/icss/questionInfo/getById',{
+        axios.json('/questionInfo/getById',{
             age:baseList.patInfo.message.patientAge,
             sexType:sex == '男'?'1' : sex == '女'?'2':'3',
             id: id

+ 2 - 2
src/store/async-actions/mainSuit.js

@@ -4,8 +4,8 @@ import {getEMRParams} from '@utils/tools';
 
 const host = '/api/icss/';
 const api = {
-  'getCommSymptoms': host + 'questionUsual/getQuestionUsual',
-  'symptomPush': host +'push/pushInner',
+  'getCommSymptoms': '/questionUsual/getQuestionUsual',
+  'symptomPush':'/push/pushInner',
 }
 
 

+ 4 - 4
src/store/async-actions/patInfo.js

@@ -9,13 +9,13 @@ import {ISREAD,MODI_LOADING} from "../types/homePage";
 import { initItemList } from '@store/async-actions/tabTemplate';
 
 const api = {
-    getPatInfo: '/api/icss/patientInfo/getTopPatientInfo',
-    getPatBaseInfo: '/api/icss/patientInfo/getPatientInfo'
+    getPatInfo: '/patientInfo/getTopPatientInfo',
+    getPatBaseInfo: '/patientInfo/getPatientInfo'
 };
 
 //参数转换
 export const initPersonInfo = (dispatch, getState) => {
-    json('/api/icss/tranFieldInfo/getInfoByUuid', {
+    json('/tranFieldInfo/getInfoByUuid', {
         "uuid": getUrlArgObject('hospitalId'),
     }).then((res) => {
         const data = res.data;
@@ -34,7 +34,7 @@ export const initHistoryDetails = (dispatch) => {
     let baseList = store.getState();
     let state = baseList.patInfo.message;
     return (dispatch) => {
-        json('/api/icss/inquiryInfo/readInquiry', {
+        json('/inquiryInfo/readInquiry', {
             "doctorId": state.doctorId,
             "hospitalDeptId": state.hospitalDeptId,
             "hospitalId": state.hospitalId,

+ 2 - 2
src/store/async-actions/print.js

@@ -18,7 +18,7 @@ export const saveMessage = (bool) => {
     let jsonData = getAllDataList(baseList);
     // console.log(jsonStr.diag,'保存历史病历')
     
-    json('/api/icss/inquiryInfo/saveInquiry', {
+    json('/inquiryInfo/saveInquiry', {
         "doctorId": state.doctorId,
         "hospitalDeptId": state.hospitalDeptId,
         "hospitalId": state.hospitalId,
@@ -73,7 +73,7 @@ export const saveMessage = (bool) => {
         }
     })
     if(bool){
-        json('/api/icss/printRecord/savePrintRecords', {
+        json('/printRecord/savePrintRecords', {
             "dataJson": JSON.stringify(getAllDataList(baseList)),
             "doctorId": state.doctorId,
             "hospitalDeptId": state.hospitalDeptId,

+ 4 - 4
src/store/async-actions/pushMessage.js

@@ -4,8 +4,8 @@ import { SET_CLICK_DIAG } from '../types/diagnosticList';
 import {storageLocal,getEMRParams} from '@utils/tools';
 
 const api={
-  push:'/api/icss/push/pushInner',
-  textPush:'/api/icss/push/pushText'
+  push:'/push/pushInner',
+  textPush:'/push/pushText'
 }
 
 //获取右侧推送信息
@@ -74,7 +74,7 @@ export const getTips = (diagItem) =>{
             type: SET_CLICK_DIAG,
             clickDiag: diagItem
         })
-        const url = '/api/icss/introduceInfo/getByQuestionId';
+        const url = '/introduceInfo/getByQuestionId';
         const params = {
             questionId: diagItem.id,
             type: 7,
@@ -100,7 +100,7 @@ export const getTipsDetails = () => {
         // window.open(`/static/pages/information.html?type=7&&questionId=${state.diagnosticList.clickDiag.id}`);
 
         //弹窗显示
-        const url ='/api/icss/introduceInfo/getByQuestionId'
+        const url ='/introduceInfo/getByQuestionId'
         const imageUrlPrefix = 'http://192.168.2.241:82'
         
         const params = {

+ 5 - 5
src/store/async-actions/tabTemplate.js

@@ -21,7 +21,7 @@ export const initItemList = (type) => { //初始化数据
   let state = baseList.patInfo.message;
 
   return (dispatch) => {
-    axios.json('/api/icss/templateInfo/getByDoctorIdTemplates', {
+    axios.json('/templateInfo/getByDoctorIdTemplates', {
       "doctorId": state.doctorId,
       "hospitalDeptId": state.hospitalDeptId,
       "hospitalId": state.hospitalId,
@@ -67,7 +67,7 @@ export const saveTemplateDetail = (val,sex) => { //保存为模板
     return tmpObj;
   }
   return (dispatch) => {
-    axios.json('/api/icss/templateInfo/saveTemplateInfo', getdata()).then((res) => {
+    axios.json('/templateInfo/saveTemplateInfo', getdata()).then((res) => {
       const data = res.data;
       if (data.code == 0) {
         Notify.success('模板保存成功');
@@ -97,7 +97,7 @@ export const saveTemplateDetail = (val,sex) => { //保存为模板
 
 export const delItem = (id) => { //删除
   return (dispatch) => {
-    axios.json('/api/icss/templateInfo/cancelTemplateInfos', {
+    axios.json('/templateInfo/cancelTemplateInfos', {
       ids: id
     }).then((res) => {
       let data = res.data;
@@ -112,7 +112,7 @@ export const delItem = (id) => { //删除
 };
 export const delBatchItem = (ids) => { //批量删除
   return (dispatch) => {
-    axios.json('/api/icss/templateInfo/cancelTemplateInfos', {
+    axios.json('/templateInfo/cancelTemplateInfos', {
       ids: ids.join(",")
     }).then((res) => {
       let data = res.data;
@@ -133,7 +133,7 @@ export const changeTitleAsync = (obj) => { //改标题
     return;
   }
   return (dispatch) => {
-    axios.json('/api/icss/templateInfo/updateByIdUsNames', {
+    axios.json('/templateInfo/updateByIdUsNames', {
       "doctorId": state.doctorId,
       "hospitalDeptId": state.hospitalDeptId,
       "hospitalId": state.hospitalId,

+ 4 - 4
src/store/async-actions/treat.js

@@ -7,8 +7,8 @@ import {storageLocal,getEMRParams} from '@utils/tools';
 import { isAddMainSuit } from '@store/async-actions/diagnosticList';
 
 const api={
-    push:'/api/icss/push/pushInner',
-    textPush:'/api/icss/push/pushText'
+    push:'/push/pushInner',
+    textPush:'/push/pushText'
 }
 
 export const addDiagnostic = (item) => {
@@ -219,7 +219,7 @@ export const getTreatResult = (item) =>{
 export const getInstroduce = (item)=>{
 
     return (dispatch, getState) =>{
-        const url = '/api/icss/introduceInfo/getByQuestionId';
+        const url = '/introduceInfo/getByQuestionId';
         const params = {
             questionId: item.id,
             type: 8,
@@ -253,7 +253,7 @@ export const  getInstroduceMore = (drugIdList) =>{
     return (dispatch, getState) =>{
         let drugInfoList = [];
         for (let i = 0; i < drugIdList.drugIdList.length; i++ ) {
-            const url = '/api/icss/introduceInfo/getByQuestionId';
+            const url = '/introduceInfo/getByQuestionId';
             const params = {
                 questionId: drugIdList.drugIdList[i],
                 type: 8,

+ 1 - 1
src/store/reducers/inspect.js

@@ -178,7 +178,7 @@ export default (state = initSearchList, action) => {
 
 function getExcelString(action,newState,tmpArr,tmpArr2) {
   let tmpString = '';
-  if(JSON.stringify(action.data) != '{}' && action.data.lisExcelRes.length > 0){
+  if(JSON.stringify(action.data||{}) != '{}' && action.data.lisExcelRes.length > 0){
     action.data.lisExcelRes.map((item)=>{
         item.lisExcelItem.map((part)=>{
             if(part.type == 1){

+ 16 - 8
src/utils/ajax.js

@@ -1,20 +1,24 @@
-import {host} from './config'
+import {host,prefix} from './config'
 import { getUrlArgObject } from "@utils/tools";
 const $ = require('jquery');
 $.support.cors = true;
 const axios=require('axios');
 const qs=require('querystring');
 const isLocal = window.location.hostname.indexOf('localhost')!=-1;
-const qhost = isLocal?host:'';
+const qhost = isLocal?host+prefix:prefix;
 axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
 //axios.defaults.baseURL = host;       //默认地址
 // axios.defaults.timeout = 60000;       //请求超时
 
 
-    // const appkeyId = getUrlArgObject("appkey");
+    const securityCode = getUrlArgObject("code");
+    const appKeyId = getUrlArgObject("appI");
+    const appKeySecret = getUrlArgObject("appS");
     axios.interceptors.request.use(
         req => {
-            // req.headers.appKey = appkeyId;
+          req.headers.appKeyId = appKeyId;
+          req.headers.appKeySecret = appKeySecret;
+          req.headers.securityCode = securityCode;
             return req;
         },
         error => {
@@ -33,10 +37,10 @@ axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded
             if (error.response) {
                 switch (error.response.status) {
                     case 401:
-                        //alert(401)
+                        //alert("服务正在升级,请稍后再试");
                         break;
                     case 500:
-                        //alert(500)
+                        //alert('后台接口报错');
                         break;
                     default:
                         //alert('其他')
@@ -61,7 +65,11 @@ const post=(url,data)=>{
 //json传参
 const json=(url,data)=>{
   //兼容ie8,axios在ie8下content-type设置不成功且会把headers置为null
-  return new Promise((resolve,reject)=>{
+  return axios({
+    method:'post',
+    url:qhost+url,
+    data
+  });/*new Promise((resolve,reject)=>{
     $.ajax({
       method:'post',
       url:qhost+url,
@@ -74,7 +82,7 @@ const json=(url,data)=>{
         reject(error);
       },
     });
-  });
+  });*/
 };
 
 const get=(url)=>{

+ 2 - 1
src/utils/config.js

@@ -6,5 +6,6 @@ const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.117:8080'; //周铁刚
 // const newIcssVisitUrl = '223.93.170.82:13000';    //icss服务访问地址(跳转目的地),不能加http://
 module.exports={
-    host
+    host,
+    prefix:'/api/icssyz'            //带权限验证的api
 };

+ 2 - 2
src/utils/tools.js

@@ -142,7 +142,7 @@ const deepClone = (data)=>{
 };
 
 const getUrlArgObject = (parm) => {  
-    /*let args=new Object();  
+    /*let args=new Object();
     let query=window.location.href;//获取查询串  
     let pairs,arr;
     if(query.indexOf("?") != -1){
@@ -547,7 +547,7 @@ function filterDataArr(arrTmp){   //数据处理
     return trimDots(tmpArr.join(''));      //去掉开头的标点符号,最后的标点保留第一个,中间连续的保留第一个
 }
 //其他史预览数据处理-月经史
-function filterOtherDataArr(arrTmp,jsonArr){console.log(arrTmp,jsonArr)
+function filterOtherDataArr(arrTmp,jsonArr){
   let tmpArr = [];
   let index1 = jsonArr.findIndex((item)=>{
     return item.formulaCode=='yjs_1';