Kaynağa Gözat

Merge branch 'CommonTemplate' into dev/new1

luolei 5 yıl önce
ebeveyn
işleme
80c4839f78

+ 4 - 2
src/common/components/ConfirmModal/index.jsx

@@ -69,6 +69,7 @@ const defaultProps = {
     cancelBg: '#fff',
     width: '300px',
     height: '200px',
+    borderBtm:'0'
 };
 
 class ConfirmModal extends Component {
@@ -123,7 +124,8 @@ class ConfirmModal extends Component {
             height, 
             closable, 
             noFooter,
-            icon
+            icon,
+            borderBtm
         } = this.props;
         const marginLeft = -parseInt(width)/2
         const marginTop = -parseInt(height)/2
@@ -131,7 +133,7 @@ class ConfirmModal extends Component {
             <NewPortal visible={visible}>
                 <div className={styles['modal-wrapper']} id='confirm'>
                     <div className={styles[['modal']]} style = {{width: width, marginLeft:marginLeft, minHeight:height, marginTop:marginTop}}>
-                        <div className={styles['modal-title']} style={{background: titleBg}}>
+                        <div className={styles['modal-title']} style={{background: titleBg,borderBottom:borderBtm}}>
                             {icon?<img src={icon} className={styles['icon']}/>:''}
                             {title ? title : ''} 
                             {closable ? <img onClick={this.closeModal} className={styles['modal-close']} src = {close}/> : false}

+ 6 - 4
src/common/components/ConfirmModal/index.less

@@ -8,15 +8,16 @@
     margin: auto;
     border-radius: 5px;
     background: #fff;
-    overflow: hidden;
+    // overflow: hidden;
 }
 
 .modal-title {
     width: 100%;
-    height: 50px;
-    line-height: 50px;
+    height: 46px;
+    line-height: 46px;
     padding: 0 10px;
-    background: #e5e5e5
+    background: #e5e5e5;
+    border-radius: 5px 5px 0 0;
 }
 
 .icon{
@@ -27,6 +28,7 @@
 .modal-close {
     position: absolute;
     right: 0px;
+    top: 2px;
     width: 40px;
     height: 40px;
     cursor: pointer;

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

@@ -8,11 +8,11 @@ class CaseQuailty extends Component {
     this.$cont = React.createRef();
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-148;
+    const height = getWindowInnerHeight()-149;
     this.$cont.current.style.height = height+"px";
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-148;
+        const height = getWindowInnerHeight()-149;
         this.$cont.current.style.height = height+"px";
       }
     });

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

@@ -115,12 +115,12 @@ class MedicalInfo extends Component {
     });
   }
   componentDidMount(){
-    const height = getWindowInnerHeight()-148;
+    const height = getWindowInnerHeight()-149;
     this.$cont.current.style.height = height+"px";
     this.props.getFilters();
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
-        const height = getWindowInnerHeight()-148;
+        const height = getWindowInnerHeight()-149;
         this.$cont.current.style.height = height+"px";
       }
       if(this.$ul.current){

+ 3 - 2
src/components/NumberDrop/index.jsx

@@ -209,10 +209,11 @@ class NumberDrop extends Component{
   }
   getSpanClass(nospecial){       //将被替换的文字选中状态显示
     const {isSelectAll,isExtBlue,show,mouseSelect} = this.props;
-    const selectedArea = mouseSelect?style['selected-area']:'';
     const val = this.state.value;
+    const selectedArea = mouseSelect?style['selected-area']:'';
     const cls = this.props.show?style['blued']:style['nol'];
-    return className(show?style['blued']:(style['nol'],setFontColorSize(val?'2,6':isSelectAll?'2,6':isExtBlue?2:1)),selectedArea);
+    // return cls+' '+setFontColorSize(nospecial?'':2);
+    return className(show?style['blued']:(style['nol'],setFontColorSize(val?'2,6':isSelectAll?'2,6':isExtBlue?2:1)),selectedArea)
   }
   stopBubble(e){
     e.stopPropagation();

BIN
src/components/Operation/Search/imgs/clear.png


BIN
src/components/Operation/Search/imgs/search.png


+ 107 - 0
src/components/Operation/Search/index.jsx

@@ -0,0 +1,107 @@
+import React from 'react';
+import styles from './index.less';
+import clear from './imgs/clear.png';
+import search from './imgs/search.png';
+import config from '@config/index';
+import $ from 'jquery';
+/**
+ * 前提条件父元素有定位
+ * visible  搜索显示隐藏
+ * handleChangeValue  函数参数为输入框的value值
+ */
+class SearchList extends React.Component {
+    constructor(props) {
+        super(props);
+        this.state = {
+            val:'',
+            border:'',
+            show:false,
+            timer:null
+        }
+        this.textInput = React.createRef();
+        this.handleClearVal = this.handleClearVal.bind(this);
+        this.handleFocus = this.handleFocus.bind(this);
+        this.handleBlur = this.handleBlur.bind(this);
+    }
+    componentDidMount(){
+      this.props.handleChangeValue('');
+    //   this.textInput.current.focus();
+      const {windowHeight,pageTop,height,refreshScroller} = this.props;
+    }
+    handleClearVal(){
+        const { handleChangeValue } = this.props;
+        this.textInput.current.value = '';
+        this.textInput.current.focus();
+        this.setState({
+            val:'',
+            show:false
+        });
+        handleChangeValue('');
+    }
+    handleInput(e){
+      const { handleChangeValue,handleChangeIpt } = this.props;
+        clearTimeout(this.state.timer);
+        let timer = setTimeout(()=>{
+            clearTimeout(this.state.timer);
+            if(e.target.value.trim() == ''){
+                this.setState({
+                    show:false
+                })
+                return  handleChangeValue('');
+            }
+            this.setState({
+                val:e.target.value,
+                show:true
+            })
+            handleChangeValue(e.target.value);
+            handleChangeIpt(e.target.value);
+        },config.delayTime);
+        this.setState({
+            timer
+        });
+    }
+    handleFocus(){
+      if(this.state.val.trim() != ''){
+        return;
+      }else{
+          this.setState({border:true})
+      }
+    }
+    handleBlur(){
+      this.setState({border:false,val:''})
+    }
+    componentWillReceiveProps(next){
+        console.log(next.value)
+        if(next.value&&(next.value != this.props.value)){
+            this.textInput.current.value = next.value;
+        }
+    }
+    render() {
+        const { children,visible } = this.props;
+        const { show } = this.state;
+        return (
+            <div id="searchOption" className={styles.search}>
+                <img style={{display:show?'block':'none'}} className={styles.clearVal} src={clear} onClick={this.handleClearVal} alt="清空" />
+                <input
+                    className={this.state.border ?`${styles.border}`:`${styles.borderNone}`}
+                    type="text"
+                    maxLength="30"
+                    ref={this.textInput}
+                    onFocus={this.handleFocus}
+                    onBlur={this.handleBlur}
+                    onInput={(e) => { 
+                        this.handleInput(e)
+                    }}
+                    onPropertyChange={(e) => {  // 兼容ie
+                        this.handleInput(e)
+                    }}
+                    placeholder="搜索"
+                />
+                <div className={styles.autoList}>
+                    {children}
+                </div>
+            </div>
+        )
+    }
+}
+export default SearchList;

+ 38 - 0
src/components/Operation/Search/index.less

@@ -0,0 +1,38 @@
+@import "~@less/variables.less";
+
+.search {
+    .contentZIndex1;
+    width: 240px;
+    box-sizing: border-box;
+    position: relative;
+    background-color: #fff;
+    display: inline-block !important;
+    margin-right: 20px;
+
+    input {
+        width: 100%;
+        height: 30px;
+        line-height: 30px;
+        padding: 0 30px 0 10px;
+        box-sizing: border-box;
+        border: 1px solid #ccc;
+    }
+    .border {
+        // border: 1px solid @blue;
+    }
+    .borderNone {
+        border: 1px solid #ccc;
+    }
+    img {
+        position: absolute;
+        top: 5px;
+    }
+    .clearVal{
+        cursor: pointer;
+        right: 5px;
+    }
+}
+
+.hide {
+    display: none;
+}

+ 82 - 34
src/components/Operation/index.jsx

@@ -7,9 +7,11 @@ import cancelTag from '@common/images/icon_back.png';
 import PrintPreviewContainer from '@containers/PrintPreviewContainer';
 import PreviewContainer from '@containers/PreviewContainer';
 import { ConfirmModal, Notify } from '@commonComp';
+import Search from './Search';
 import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
 import {getAllDataList,getAllDataStringList,isAllPartClear,isAllClear,filterDataArr,readyKeepHistory} from '@utils/tools';
+
 import {dragBox} from '@utils/drag';
 import store from '@store';
 import $ from 'jquery';
@@ -28,6 +30,8 @@ class Operation extends Component {
       zIndex:40,
       sex:'3',
       le:'',
+      deptId:'',//科室id
+      value:''
     }
     this.showPrint = this.showPrint.bind(this);
     this.closePrint = this.closePrint.bind(this);
@@ -37,6 +41,8 @@ class Operation extends Component {
     this.clearAll = this.clearAll.bind(this);
     this.saveHis = this.saveHis.bind(this);
     this.keypress = this.keypress.bind(this);
+    this.setDeptId = this.setDeptId.bind(this);
+    this.handleChangeIpt = this.handleChangeIpt.bind(this);
   }
 
   showPrint() {
@@ -87,7 +93,6 @@ class Operation extends Component {
         oKBg: '#3B9ED0',
         msg: <p className={style['msg']}>是否保存该病历?</p>
       })
-      
       this.props.diagShowTmp(true)
     }
   }
@@ -151,8 +156,8 @@ class Operation extends Component {
     let jsonData = getAllDataList(baseList);
     let jsonStr = getAllDataStringList(baseList);
     let whichSign = baseList.typeConfig.mode;
-    let tmpLis = baseList.tabTemplate.items;
-    let flg = isAllClear(jsonStr)
+    let tmpLis = [];
+    let flg = isAllClear(jsonStr);
     if(!flg){
       Notify.info('模板数据不能为空')
       return false
@@ -160,6 +165,11 @@ class Operation extends Component {
     // console.log(jsonStr.chief,'文本')
     // console.log(jsonData,'结构')       //测试需要用到,不要删了
     // console.log(tmpLis,'接口返回的')
+    if(this.props.admin){
+      tmpLis = baseList.tabTemplate.adminItems;
+    }else{
+      tmpLis = baseList.tabTemplate.items;
+    }
     for(let i = 0;i <tmpLis.length;i++){
       let dataStr = tmpLis[i].preview;
       if(
@@ -180,24 +190,31 @@ class Operation extends Component {
   }
   changeTitle() {
     return <div className={style['box']}>
-      <input className={style['ipt']}
-        placeholder="请输入模板名称"
-        type="text"
-        maxLength='30'
-        onInput={(e) => {
-          this.handleInput(e)
-        }}
-        onPropertyChange={(e) => {  // 兼容ie
-          this.handleInput(e)
-        }}
-        onKeyPress={e => this.keypress(e)}
-      />
-      <div className={style['line']}></div>
+      {/* <div className={style.titleTip}></div> */}
       <div className={style['iptWrap']}>
-        <p>请选择模板性别归属(错误引用,显示可能有误)</p>
-        <span className={style['commonSex']} id="commonSex" onClick={this.changeRadio.bind(this,1)}><img src={check_right} alt=""/><i style={{color:'#000'}}>通用</i></span>
-        <span id="maleSex" onClick={this.changeRadio.bind(this,2)}><img src={check_circle} alt=""/><i>男</i></span>
-        <span id="femaleSex" onClick={this.changeRadio.bind(this,3)}><img src={check_circle} alt=""/><i>女</i></span>
+        <div className={style.name}>
+          <span>模版名称:</span>
+          <input className={style['ipt']}
+            placeholder="请输入模板名称"
+            type="text"
+            maxLength='30'
+            onInput={(e) => {
+              this.handleInput(e)
+            }}
+            onPropertyChange={(e) => {  // 兼容ie
+              this.handleInput(e)
+            }}
+            onKeyPress={e => this.keypress(e)}
+          />
+        </div>
+        <div className={style.male}>
+          <span>性别归属:</span>
+          <span className={style['commonSex']} id="commonSex" onClick={this.changeRadio.bind(this,1)}><img src={check_right} alt=""/><i style={{color:'#000'}}>通用</i></span>
+          <span id="maleSex" onClick={this.changeRadio.bind(this,2)}><img src={check_circle} alt=""/><i>男</i></span>
+          <span id="femaleSex" onClick={this.changeRadio.bind(this,3)}><img src={check_circle} alt=""/><i>女</i></span>
+          <span style={{paddingRight:0,color:'#777777'}}>(注:错误引用,显示可能有误)</span>
+        </div>
+        {/* <p>请选择模板性别归属(错误引用,显示可能有误)</p> */}
       </div>
     </div>
   }
@@ -229,8 +246,8 @@ class Operation extends Component {
     }
   }
   makeSure() {
-    const { save, clear, saveDataAll,diagShowTmp ,chronicMagItem,chronicDesease} = this.props;
-    const { type } = this.state;
+    const { save, clear, saveDataAll,saveDataAlls,diagShowTmp ,chronicMagItem,chronicDesease,admin} = this.props;
+    const { type,deptId,sex,title } = this.state;
     if (type == 1) {
       diagShowTmp(false)
       this.setState({ title: '' })
@@ -250,8 +267,15 @@ class Operation extends Component {
       if (this.state.title.trim() == '') {
         Notify.error('请输入模板名称')
         return;
+      }else if(admin&&deptId == ''){
+        Notify.error('请选择科室')
+        return;
+      }
+      if(admin){
+        saveDataAlls(title,sex,deptId);
+      }else{
+        saveDataAll(title,sex);
       }
-      saveDataAll(this.state.title,this.state.sex);
     }
   }
   closeDiagBox(){
@@ -265,15 +289,16 @@ class Operation extends Component {
       this.setState({ title: '' }) 
     }
   }
+  setDeptId(id,name){
+    this.props.handleClearValue()
+    this.setState({
+      deptId :id,
+      value:name
+    })
+  }
   componentWillReceiveProps(next){//监听滚动事件
     const that = this;
     if(next.winWidth <= 1024){
-      /*$(document).on('scroll',function(){
-        let left = -($(document).scrollLeft() - 10) + 'px';
-        that.setState({
-          le:left
-        })
-      })*/
       $(window).scroll(function(){
         let scrollLeft = document.body.scrollLeft || document.documentElement.scrollLeft;
         let left = -(scrollLeft - 10) +'px';
@@ -283,12 +308,16 @@ class Operation extends Component {
       })
     }
   }
-
+  handleChangeIpt(val){
+    this.setState({
+      value:val
+    })
+  }
   render() {
-    const { showPrint, closePrint, showPreview, closePreview } = this;
+    const { showPrint, closePrint, showPreview, closePreview,handleChangeIpt } = this;
     const { visible, preVisible,diagShow } = this.props.print;
-    const {winWidth,cancelDelTag} = this.props;
-    const {zIndex,type,le} = this.state;
+    const {winWidth,cancelDelTag,departLis,handleChangeValue,admin} = this.props;
+    const {zIndex,type,le,value} = this.state;
     return <div className={style['container']} style={{left:le}}>
       <span className={style['button']} onClick={showPrint}><img src={printImg} /> 打印病历</span>
       <span className={style['preButton']} onClick={showPreview}><img src={preview} /> 预览</span>
@@ -306,12 +335,31 @@ class Operation extends Component {
         cancel={() => {this.closeDiagBox()}}
         okText={this.state.okText}
         height={type==3?228:200}
-        width={type==3?400:300}
+        width={type==3?545:300}
         okBorderColor={this.state.borderColor}
         okColor={this.state.okColor}
         oKBg={this.state.oKBg}
+        borderBtm={type==3?'1px solid #f5f5f5':null}
+        title={type==3?'保存病历模板':null}
       >
         {this.state.msg}
+        {
+          admin&&type==3?<div className={style.department}>
+              <span>科室归属:</span>
+              <Search handleChangeValue={handleChangeValue} handleChangeIpt={handleChangeIpt} value={value} visible={true}>
+                <ul className={style.departLis}>
+                  {
+                    departLis.map((item,idx)=>{
+                      return <li onClick={()=>this.setDeptId(item.id,item.conceptDeptName)}>
+                        {item.conceptDeptName}
+                      </li>
+                    })
+                  }
+                </ul>
+              </Search>
+              <span style={{paddingRight:0,color:'#777777'}}>(支持汉字关键字搜索)</span>
+          </div>:null
+        }
       </ConfirmModal>
     </div>;
   }

+ 57 - 17
src/components/Operation/index.less

@@ -117,10 +117,18 @@
     }
 }
 .iptWrap {
-  width: 320px;
+   padding: 0 15px;
   line-height: 18px;
-  margin: 10px auto;
-  text-align: center;
+  margin: 18px auto;
+  text-align: left;
+  .name {
+      text-align: left;
+      input {
+          border: 1px solid #CCCCCC;
+          padding: 5px 10px;
+          width: 240px;
+      }
+  }
   p {
     text-align: left;
     font-size: 12px;
@@ -130,7 +138,7 @@
   span {
     display: inline-block;
     cursor: pointer;
-    padding-right: 24px;
+    padding-right: 20px;
     font-size: 14px;
     i {
       color: #6b6969;
@@ -149,23 +157,55 @@
     padding-bottom: 50px;
 }
 .box {
-    padding-top: 10px;
     box-sizing: border-box;
-    height: 110px;
+    height: 88px;
 }
-.ipt {
-    font-size: 16px;
-    width: 320px;
-    height: 20px;
-    line-height: 18px;
-    display: block;
-    margin: 0 auto;
+
+.department {
+    position: relative;
     text-align: left;
+    padding: 0 0 30px 16px;
+    span {
+        padding-right: 20px;
+    }
+}
+.male {
+    padding: 15px 0;
 }
 .line {
-    width: 332px;
     height: 1px;
-    margin: 8px auto 0 auto;
-    background: #D8D8D8;
+    background-color: #979797;
+    position: relative;
+    top: -2px;
 }
-
+.titleTip {
+    position: absolute;
+    top:15px;
+    left: 20px;
+}
+.departLis {
+    position: absolute;
+    top: 29px;
+    left: 0;
+    max-height: 200px;
+    overflow: auto;
+    background-color: #fff;
+    width: 240px;
+    // box-shadow: 0 10px 20px 0 #989DA3;
+    border: 1px solid #dedede;
+    li {
+        height: 36px;
+        line-height: 36px;
+        padding: 0 30px;
+        padding-top: 0;
+        box-sizing: border-box;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        border: 1px solid transparent;
+        cursor: pointer;
+    }
+    li:hover {
+        border: 1px solid #3B9ED0;
+    }
+}

+ 58 - 19
src/components/PushContainer/index.jsx

@@ -1,8 +1,8 @@
 import React, { Component } from 'react';
 import style from './index.less';
 import { Tab, ConfirmModal, Notify } from '@commonComp';
-import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow } from '@store/actions/tabTemplate';
-import { initItemList, delItem, delBatchItem, changeTitleAsync, setPageView } from '@store/async-actions/tabTemplate';
+import { tabChange, allChecked, changeVisible, keepPushData, allCheckedShow,allCheckedAdmin,allCheckedShowAdmin } from '@store/actions/tabTemplate';
+import { initItemList, delItem,delItemAdmin, delBatchItem, delBatchItemAdmin,changeTitleAsync, setPageView,changeTitleAsyncAdmin,setPageViewAdmin } from '@store/async-actions/tabTemplate';
 import { connect } from "react-redux";
 import store from '@store';
 import { billing } from '@store/async-actions/pushMessage';
@@ -51,7 +51,9 @@ class PushContainer extends Component {
     this.handleTemplateDel = this.handleTemplateDel.bind(this)
     this.handleTitleChange = this.handleTitleChange.bind(this)
     this.handleAllCheckbox = this.handleAllCheckbox.bind(this)
+    this.handleAllCheckboxAdmin = this.handleAllCheckboxAdmin.bind(this)
     this.handleMangerTemplate = this.handleMangerTemplate.bind(this)
+    this.handleMangerTemplateAdmin = this.handleMangerTemplateAdmin.bind(this)
     this.handleDelList = this.handleDelList.bind(this)
     this.makeSure = this.makeSure.bind(this)
     this.handleClose = this.handleClose.bind(this);
@@ -178,6 +180,22 @@ class PushContainer extends Component {
     })
   }
 
+  handleAllCheckboxAdmin() {        //全.反选
+    let tmpFlg = this.props.allCheckedAdmin;
+    if (this.props.checkItemsAdmin.length < this.props.adminItems.length && this.props.allCheckedAdmin) {
+      tmpFlg = false;
+    } else if (this.props.checkItemsAdmin.length == this.props.adminItems.length && !this.props.allCheckedAdmin) {
+      tmpFlg = true;
+    }  //两种特殊情况处理
+    store.dispatch(allCheckedAdmin(!tmpFlg))
+  }
+
+  handleMangerTemplateAdmin() {      //管理
+    let tmpFlg = this.props.allCheckShowAdmin;
+    store.dispatch(allCheckedAdmin(false))
+    store.dispatch(allCheckedShowAdmin(!tmpFlg))
+  }
+
   handleAllCheckbox() {        //全.反选
     let tmpFlg = this.props.allChecked;
     if (this.props.checkItems.length < this.props.items.length && this.props.allChecked) {
@@ -211,10 +229,18 @@ class PushContainer extends Component {
   
   makeSure() {
     if (this.state.type == 1) {
-      store.dispatch(delItem(this.state.id))
+      if(this.props.admin){
+        store.dispatch(delItemAdmin(this.state.id))
+      }else{
+        store.dispatch(delItem(this.state.id))
+      }
       store.dispatch(changeVisible(false))
     } else if (this.state.type == 2) {
-      store.dispatch(delBatchItem(this.props.checkItems))
+      if(this.props.admin){
+        store.dispatch(delBatchItemAdmin(this.props.checkItemsAdmin))
+      }else{
+        store.dispatch(delBatchItem(this.props.checkItems))
+      }
       store.dispatch(changeVisible(false))
     } else if (this.state.type == 3) {
       if (this.state.title == this.state.text) {
@@ -222,24 +248,25 @@ class PushContainer extends Component {
         Notify.success('标题修改成功');
         return;
       }
+      if ((this.state.title).trim() == '') {
+        Notify.info('请输入模板名称');
+        return;
+      }
       let tempObj = {
         id: this.state.currId,
         title: this.state.title
       }
-      store.dispatch(changeTitleAsync(tempObj))
+      if(this.props.admin){
+        store.dispatch(changeTitleAsyncAdmin(tempObj))
+      }else{
+        store.dispatch(changeTitleAsync(tempObj))
+      }
     } else if (this.state.type == 4) {        //模板引入
-      const { items } = this.props;
-      store.dispatch(setPageView(this.state.id))
-      // items && items.map((part) => {
-      //   if (this.state.id == part.id) {
-      //     let typeConfig = part.type;
-      //     // store.dispatch(keepPushData(part, 'part'))//引用数据的存储,用于保存模板是判断数据是否变化
-      //     // pushAllDataList(typeConfig, 'push', part, 'template')//引用
-      //     // if (didPushParamChange()) {
-      //       // store.dispatch(billing())
-      //     // }
-      //   }
-      // })
+      if(this.props.admin){
+        store.dispatch(setPageViewAdmin(this.state.id))
+      }else{
+        store.dispatch(setPageView(this.state.id))
+      }
       store.dispatch(changeVisible(false))
     }
   }
@@ -247,7 +274,7 @@ class PushContainer extends Component {
     store.dispatch(changeVisible(false));
   }
   render() {
-    const { activeId, checkItems, visible, showMsg,hasMore,current, items, allCheckShow } = this.props;
+    const { activeId, checkItems, visible, showMsg,hasMore,current, items, allCheckShow,allCheckShowAdmin,adminItems,admin,checkItemsAdmin } = this.props;
     return <div className={style["container"]} ref={this.$cont} >
       <Tab tabs={this.state.tabs}
         activeId={activeId}
@@ -258,10 +285,16 @@ class PushContainer extends Component {
           <CaseQuailty></CaseQuailty>
           <TemplateItems
             items={items}
+            adminItems={adminItems}
+            admin={admin}
+            handleAllCheckboxAdmin={this.handleAllCheckboxAdmin}
+            handleMangerTemplateAdmin={this.handleMangerTemplateAdmin}
             current={current}
             hasMore={hasMore}
             checkItems={checkItems}
+            checkItemsAdmin={checkItemsAdmin}
             allCheckShow={allCheckShow}
+            allCheckShowAdmin={allCheckShowAdmin}
             handleContentClick={this.handleContentClick}
             handleTemplateDel={this.handleTemplateDel}
             handleTitleChange={this.handleTitleChange}
@@ -291,9 +324,11 @@ class PushContainer extends Component {
   }
 }
 
-const mapStateToProps = (state) => {
+const mapStateToProps = (state) => {//console.log(state)
   return {
     items: state.tabTemplate.items,
+    adminItems: state.tabTemplate.adminItems,
+    admin: state.homePage.admin,
     current: state.tabTemplate.current,
     hasMore: state.tabTemplate.hasMore,
     activeId: state.tabTemplate.activeId,
@@ -302,6 +337,10 @@ const mapStateToProps = (state) => {
     visible: state.tabTemplate.visible,
     showMsg: state.tabTemplate.showMsg,
     allCheckShow: state.tabTemplate.allCheckShow,
+
+    allCheckedAdmin: state.tabTemplate.allCheckedAdmin,
+    allCheckShowAdmin: state.tabTemplate.allCheckShowAdmin,
+    checkItemsAdmin: state.tabTemplate.checkItemsAdmin,
   }
 }
 

+ 0 - 1
src/components/PushItems/index.jsx

@@ -138,7 +138,6 @@ class PushItems extends Component {
   componentDidMount() {
     const height = getWindowInnerHeight() - 190;
     this.$cont.current.style.height = height + "px";
-
     windowEventHandler('resize', ()=>{
       if(this.$cont.current){
         const height = getWindowInnerHeight() - 190;

+ 78 - 22
src/components/TemplateItems/TemplateItem/index.jsx

@@ -11,7 +11,7 @@ import editing_icon from './img/edit_blue.png';
 import check_circle from './img/check-circle.png';
 import check_right from './img/check-right.png';
 import store from '@store'
-import { checkItems } from '@store/actions/tabTemplate';
+import { checkItems,checkItemsAdmin } from '@store/actions/tabTemplate';
 import $ from 'jquery';
 
 class TemplateItem extends React.Component {
@@ -26,6 +26,8 @@ class TemplateItem extends React.Component {
     };
     this.isConfirmClick = false;
     this.handleTitleClick = this.handleTitleClick.bind(this)
+    this.getStyleFst = this.getStyleFst.bind(this)
+    this.getStyleSec = this.getStyleSec.bind(this)
   }
 
   getArrow() {
@@ -40,15 +42,27 @@ class TemplateItem extends React.Component {
   handleCheckboxClick(e, id) {          //点击复选框
     e.stopPropagation();
     let tempCheck = this.state.checkBox;
-    this.setState({
-      checkBox: !tempCheck
-    })
-    store.dispatch(checkItems(id))
+    let sign = this.props.admin;
+    // this.setState({
+    //   checkBox: !tempCheck
+    // })
+    if(sign){
+      store.dispatch(checkItemsAdmin(id))
+    }else{
+      store.dispatch(checkItems(id))
+    }
   }
 
   getCheckIcon() {
-    let tempCheckItems = this.props.checkItems;
-    if (tempCheckItems.indexOf(this.props.id) != -1) {
+    const {checkItemsAdmin,checkItems,admin,adminflg,id} = this.props
+    if(admin||adminflg){
+      if (checkItemsAdmin.indexOf(id) != -1) {
+        return [check_right, 'title-wrapper-bg']
+      } else {
+        return [check_circle, '']
+      }
+    }
+    if (checkItems.indexOf(id) != -1) {
       return [check_right, 'title-wrapper-bg']
     } else {
       return [check_circle, '']
@@ -147,24 +161,66 @@ class TemplateItem extends React.Component {
       }
     }
   }
-
+  getStyleFst() {
+    const { allCheckShow, id, name, preview, sex,admin,checkItemsAdmin,allCheckShowAdmin,adminflg } = this.props;
+    if(admin) {
+      if(allCheckShowAdmin){
+        return `${style["title-wrapper"]} ${style["clearfix"]} ${style[this.getCheckIcon()[1]]}`
+      }
+      return `${style["title-wrapper"]} ${style["clearfix"]}`
+    }else{
+      if(adminflg){
+        if(allCheckShowAdmin){
+          return `${style["title-wrapper"]} ${style["clearfix"]} ${style[this.getCheckIcon()[1]]}`
+        }
+        return `${style["title-wrapper"]} ${style["clearfix"]}`
+      }
+      if(allCheckShow){
+        return `${style["title-wrapper"]} ${style["clearfix"]} ${style[this.getCheckIcon()[1]]}`
+      }
+      return `${style["title-wrapper"]} ${style["clearfix"]}`
+    }
+  }
+  getStyleSec(){
+    const { allCheckShow, id, name, preview, sex,admin,checkItemsAdmin,allCheckShowAdmin,adminflg } = this.props;
+    if(admin) {
+      if(allCheckShowAdmin){
+        return <div className={style['check-wrap']} onClick={(e) => { this.handleCheckboxClick(e, id) }}>
+        <img className={`${style['fl-element']} ${style['check-box']}`}
+          src={this.getCheckIcon()[0]}
+        /></div>
+      }
+      return null
+    }else{
+      if(adminflg){
+        if(allCheckShowAdmin){
+          return <div className={style['check-wrap']} onClick={(e) => { this.handleCheckboxClick(e, id) }}>
+          <img className={`${style['fl-element']} ${style['check-box']}`}
+            src={this.getCheckIcon()[0]}
+          /></div>
+        }
+        return null
+      }
+      if(allCheckShow){
+        return <div className={style['check-wrap']} onClick={(e) => { this.handleCheckboxClick(e, id) }}>
+        <img className={`${style['fl-element']} ${style['check-box']}`}
+          src={this.getCheckIcon()[0]}
+        /></div>
+      }
+      return null
+    }
+  }
   render() {
-    const { allCheckShow, id, name, preview, sex } = this.props;
+    const { allCheckShow, id, name, preview,conceptDeptName, sex,admin,checkItemsAdmin,allCheckShowAdmin,adminflg } = this.props;
     let previewJson = JSON.parse(preview);
-    let sexStr = sex == 2 ? ' (女)' : sex == 1 ? ' (男)' : ' (通用)';
+    let sexStr = sex == 2 ? ' (女'+(conceptDeptName&&admin?'-'+conceptDeptName:'')+')' : sex == 1 ? ' (男'+(conceptDeptName&&admin?'-'+conceptDeptName:'')+')' : ' (通用'+(conceptDeptName&&admin?'-'+conceptDeptName:'')+')';
     return (
       <div className={style.wrapper}>
-        <div className={
-          allCheckShow ?
-            `${style["title-wrapper"]} ${style["clearfix"]} ${style[this.getCheckIcon()[1]]}` :
-            `${style["title-wrapper"]} ${style["clearfix"]}`}
+        <div className={this.getStyleFst()}
           onClick={this.handleTitleClick}
         >
           {
-            allCheckShow ? <div className={style['check-wrap']} onClick={(e) => { this.handleCheckboxClick(e, id) }}>
-              <img className={`${style['fl-element']} ${style['check-box']}`}
-                src={this.getCheckIcon()[0]}
-              /></div> : null
+            this.getStyleSec()
           }
           <i
             className={style['title']}
@@ -173,22 +229,22 @@ class TemplateItem extends React.Component {
             {name + sexStr}
           </i>
           <img className={style.arrow} src={arrow_icon} />
-          <img title={'删除模板'}
+          {!admin&&adminflg?null:<img title={'删除模板'}
             className={style.del}
             style={{ display: allCheckShow ? 'none' : 'block' }}
             src={this.getDelIcon()}
             onMouseEnter={() => this.handleDelIconMouseEnter()}
             onMouseLeave={() => this.handleDelIconMouseLeave()}
             onClick={(e) => this.handleTemplateDel(e)}
-          />
+          />}
           <span className={style.quote} onClick={(e) => this.handleContentClick(e, sex)}>引用</span>
-          <img title={'修改模板标题'}
+          {!admin&&adminflg?null:<img title={'修改模板标题'}
             className={style.edit}
             src={this.getEditIcon()}
             onMouseEnter={() => this.handleEditIconMouseEnter()}
             onMouseLeave={() => this.handleEditIconMouseLeave()}
             onClick={(e) => this.handleEditIconClick(e, name)}
-          />
+          />}
         </div>
         <div
           ref={(content) => this.content = content}

+ 1 - 1
src/components/TemplateItems/TemplateItem/index.less

@@ -33,7 +33,7 @@
     position: relative;
     height: 45px;
     line-height: 45px;
-    padding: 0 15px;
+    padding: 0 10px;
     cursor: pointer;
     img {
         display: inline-block;

+ 97 - 30
src/components/TemplateItems/index.jsx

@@ -14,9 +14,11 @@ class TemplateItems extends React.Component {
         super(props);
         this.state = {
             msg:'还没有保存模板',
-            val:''
+            val:'',
+            height:''
         }
         this.$cont = React.createRef();
+        this.$conts = React.createRef();
         this.$search = React.createRef();
         this.genItems = this.genItems.bind(this);
         this.templateSearch = this.templateSearch.bind(this);
@@ -26,17 +28,22 @@ class TemplateItems extends React.Component {
     }  
     componentDidMount(){
         const height = getWindowInnerHeight()-195;
-        this.$cont.current.style.height = height+"px";
+        this.setState({
+            height:height
+        })
         windowEventHandler('resize', ()=>{
-            if(this.$cont.current){
+            if(this.$conts.current){
                 const height = getWindowInnerHeight()-195;
-                this.$cont.current.style.height = height+"px";
+                this.setState({
+                    height:height
+                })
             }
         });
     }
-    genItems() {
+    genItems(items,flg) {
         const Items = [];
-        this.props.items.forEach((v,idx) => {
+        const {admin,adminItems,checkItemsAdmin} = this.props;
+        items.forEach((v,idx) => {
             Items.push(
                 <TemplateItem
                     {...v}
@@ -47,13 +54,26 @@ class TemplateItems extends React.Component {
                     handleContentClick={this.props.handleContentClick}
                     handleTemplateDel={this.props.handleTemplateDel}
                     handleTitleChange={this.props.handleTitleChange}
+
+                    admin={this.props.admin}
+                    adminflg={flg}
+                    checkItemsAdmin={checkItemsAdmin}
+                    allCheckShowAdmin={this.props.allCheckShowAdmin}
                 />
             );
         });
         return Items;
     }
     getCheckIcon() {
-        if (this.props.items.length == this.props.checkItems.length && this.props.checkItems.length != 0) {
+        const {admin,checkItems,items,checkItemsAdmin,adminItems} = this.props;
+        if(admin){
+            if (adminItems.length == checkItemsAdmin.length && checkItemsAdmin.length != 0) {
+                return check_right;
+            } else {
+                return check_circle;
+            }
+        }
+        if (items.length == checkItems.length && checkItems.length != 0) {
             return check_right;
         } else {
             return check_circle;
@@ -83,16 +103,10 @@ class TemplateItems extends React.Component {
         const value = (this.$search.current.value).substring(0,30);
         // this.$search.current.value = value
         setTimeout(() => {
-            
             this.setState({
                 val: value
             });
         }, 30);
-        // if (value === '') {
-        //     this.setState({
-        //         val: ''
-        //     });
-        // }
     }
 
     clear(){
@@ -100,25 +114,24 @@ class TemplateItems extends React.Component {
         this.setState({
             val:''
         })
-        
         this.$search.current.focus();
     }
 
     render() {
-        const { allCheckShow, handleMangerTemplate,handleClickGetMore, handleDelList, handleAllCheckbox, items,checkItems,current,hasMore } = this.props;
-        // console.log(allCheckShow,7877877)
+        const { checkItemsAdmin,handleAllCheckboxAdmin,handleMangerTemplateAdmin,allCheckShowAdmin,admin,adminItems,allCheckShow, handleMangerTemplate,handleClickGetMore, handleDelList, handleAllCheckbox, items,checkItems,current,hasMore } = this.props;
+        const {height} = this.state
         return (
-            <div className={style.wrapper}>
-                {
-                    items ? (allCheckShow ?
+            <div className={style.wrapper} >
+                {//管理员操作
+                    adminItems&&admin ? (allCheckShowAdmin ?
                         <div className={style.wrapperTop}>
-                            <div className={style['check-wrap']} onClick={handleAllCheckbox}>
+                            <div className={style['check-wrap']} onClick={handleAllCheckboxAdmin} style={{paddingLeft:'10px'}}>
                                 <img className={`${style['fl-element']} ${style['check-box']}`} src={this.getCheckIcon()} />
                             </div>
-                            <span onClick={handleAllCheckbox}>全选</span>
-                            <span className={`${style['fr-element']} ${style['done']}`} onClick={handleMangerTemplate}>完成</span>
+                            <span onClick={handleAllCheckboxAdmin}>全选</span>
+                            <span className={`${style['fr-element']} ${style['done']}`} onClick={handleMangerTemplateAdmin}>完成</span>
                             {
-                                checkItems.length>0?<span className={`${style['fr-element']} ${style['del-items']}`} onClick={handleDelList}>删除</span>:
+                                checkItemsAdmin.length>0?<span className={`${style['fr-element']} ${style['del-items']}`} onClick={handleDelList}>删除</span>:
                                 <span className={`${style['fr-element']} ${style['del-items-gray']}`}>删除</span>
                             }
                         </div> :
@@ -129,19 +142,73 @@ class TemplateItems extends React.Component {
                                 <div className={style.search} onClick={this.templateSearch}>搜索</div>
                             </div>
                             {
-                                items.length > 0&&<span className={`${style['fr-element']} ${style['manger']}`} onClick={handleMangerTemplate}>管理</span>
+                                adminItems.length > 0&&<span className={`${style['fr-element']} ${style['manger']}`} onClick={handleMangerTemplateAdmin}>管理</span>
+                            }
+                    </div>) : null
+                }
+                {//个人
+                    items&&!admin ? 
+                        <div className={style.wrapperTop}>
+                            <div className={style.templateSearch}>
+                                <input placeholder="模板搜索" maxLength="30" ref={this.$search} type="text" onInput={this.handleChange} onPropertyChange={this.handleChange} onKeyUp={this.handleEnter}/>
+                                {this.state.val?<img src={delIcon} alt="清空" onClick={this.clear}/>:''}
+                                <div className={style.search} onClick={this.templateSearch}>搜索</div>
+                            </div>
+                    </div> : null
+                }
+                {
+                    <div className={style.comAdminWrp}>
+                        <div className={`${style.tempLists} ${style.tempListsP}`} ref={this.$cont} style={{display:admin?'none':'block',border:'1px solid #EAEDF1'}}>
+                            {//个人
+                                allCheckShow&&!admin ?<div className={`${style.wrapperTop} ${style.wrapperTopM} ${style.personalTmp}`}>
+                                    <i></i>
+                                    <i></i>
+                                    <div className={style['check-wrap']} onClick={handleAllCheckbox}>
+                                        <img className={`${style['fl-element']} ${style['check-box']}`} src={this.getCheckIcon()} />
+                                    </div>
+                                    <span onClick={handleAllCheckbox}>全选</span>
+                                    <span className={`${style['fr-element']} ${style['done']}`} onClick={handleMangerTemplate}>完成</span>
+                                    {
+                                        checkItems.length>0?<span className={`${style['fr-element']} ${style['del-items']}`} onClick={handleDelList}>删除</span>:
+                                        <span className={`${style['fr-element']} ${style['del-items-gray']}`}>删除</span>
+                                    }
+                                </div>:null
+                            }
+                            {
+                                !allCheckShow&&<div className={`${style.personalTmp} clearfix`}>
+                                    <span className={style.tip}>个人模板</span>
+                                    <i></i>
+                                    {
+                                        items.length > 0&&<span className={`${style['fr-element']} ${style['manger']}`} onClick={handleMangerTemplate}>管理</span>
+                                    }
+                                </div>
+                            }
+                            {
+                                <div style={{height:height/2-42+'px',overflow:'auto'}}>
+                                    {this.genItems(items).length > 0?this.genItems(items): <Empty message={this.state.msg}></Empty>}
+                                </div>
+                            }
+                        </div>
+                        <div className={style.tempLists} ref={this.$conts} style={{border:admin?'0':'1px solid #EAEDF1'}}>
+                            {
+                                !admin?!allCheckShowAdmin&&<div className={`${style.personalTmp}`}>标准模板</div>:''
+                            }
+                            {
+                                <div style={{height:admin?height+'px':(height-20)/2-42+'px',overflow:'auto'}}>
+                                    {this.genItems(adminItems,true).length > 0?this.genItems(adminItems,true): <Empty message={this.state.msg}></Empty>}
+                                </div>
                             }
-                    </div>) : <div style={{height:'36px'}}></div>
+                        </div>
+                    </div>
                 }
-                <div className={style.tempLists} ref={this.$cont}>
+                {/* <div className={style.tempLists} ref={this.$cont}>
                     {
                         this.genItems().length > 0?this.genItems(): <Empty message={this.state.msg}></Empty>
                     }
-                    {/* {//注释掉的暂时没有分也功能
+                    {//注释掉的暂时没有分也功能
                       hasMore?<p onClick={()=>handleClickGetMore(current)} className={style.loadMore}>点击查看更多</p>:null
-                    } */}
-                    
-                </div>
+                    } 
+                </div> */}
             </div>
         )
     }

+ 38 - 6
src/components/TemplateItems/index.less

@@ -9,8 +9,12 @@
     .tempLists {
         overflow-y: auto;
         background-color: #fff;
+        position: relative;
         // margin-top: 15px;
     }
+    .tempListsP {
+        margin-bottom: 10px;
+    }
     .emptyWrap {
         padding: 0 20px;
         margin-top: 15px;
@@ -25,7 +29,7 @@
     .wrapperTop {
         height: 46px;
         padding: 0 15px;
-        margin-top: 10px;
+        // margin-top: 10px;
         // background-color: #EAEDF1;
         cursor: pointer;
         .check-box {
@@ -38,7 +42,6 @@
         }
         .check-wrap{
             height: 36px;
-            padding-right: 10px;
             float: left;
         }
         span {
@@ -65,6 +68,9 @@
             color: @template-color;
         }
     }
+    .wrapperTopM {
+        padding: 0 10px;
+    }
     .loadMore {
       text-align: center;
       color: #2a9bd5;
@@ -80,7 +86,7 @@
         }
         input {
             box-sizing: border-box;
-            width: 270px;
+            width: 300px;
             display: inline-block;
             line-height: 34px;
             height: 34px;
@@ -94,16 +100,42 @@
             text-align: center;
             background-color: #2A9BD5;
             color: #fff;
-            height: 35px;
-            line-height: 35px;
+            height: 34px;
+            line-height: 34px;
         }
         img {
             position: absolute;
             width: 15px;
-            left: 264px;
+            left: 294px;
             top: 10px;
             cursor: pointer;
         }
     }
+    
+    .comAdminWrp {
+        padding: 0 15px;
+    }
+}
+
+
+.fr-element {
+    // float: right;
+    color: #3B9ED0;
+    display: inline-block;
+    height: 36px;
+    line-height: 36px;
 }
+.personalTmp {
+    width: 100%;
+    height: 40px !important;
+    line-height: 40px !important;
+    background-color: #EDF8FF;
+    padding: 0 10px;
+    box-sizing: border-box;
+    .tip {
 
+    }
+    .manger {
+        float: right;
+    }
+}

+ 13 - 1
src/containers/OperationContainer.js

@@ -9,7 +9,8 @@ import {
     DIAG_SHOW
 } from "../store/types/print";
 import {saveMessage,clearMessages} from "../store/async-actions/print";
-import {saveTemplateDetail} from '@store/async-actions/tabTemplate';
+import {saveTemplateDetail,getDepartments,saveAdminTemplateDetail } from '@store/async-actions/tabTemplate';
+import {getDptLis} from '@store/actions/tabTemplate';
 import {saveClickNum,getInitModules} from '@store/async-actions/homePage';
 import {getOtherHisRecord} from '@store/async-actions/fetchModules';
 import {RECOVER_TAG_MAIN} from '@store/types/mainSuit';
@@ -27,13 +28,21 @@ function mapStateToProps(state) {
     return ({
         print,
         winWidth:homePage.windowWidth,
+        admin:homePage.admin,
         chronicMagItem: state.diagnosticList.chronicMagItem,//慢病疾病
         chronicDesease:state.mainSuit.chronicDesease,//主诉存的慢病
+        departLis:state.tabTemplate.departLis,
     });
 }
 
 function mapDispatchToProps(dispatch) {
     return {
+        handleClearValue:()=> {
+          dispatch(dispatch(getDptLis([])))
+        },
+        handleChangeValue:(val)=> {
+          val&&dispatch(getDepartments(val))
+        },
         showPrintPreview: () => {
             dispatch({
                 type: SHOW_PRINT_PREVIEW
@@ -66,6 +75,9 @@ function mapDispatchToProps(dispatch) {
                 dispatch(getInitModules);
             }
         },
+        saveDataAlls(val,sex,id){
+          dispatch(saveAdminTemplateDetail(val,sex,id))
+        },
         saveDataAll(val,sex){
           dispatch(saveTemplateDetail(val,sex))
         },

+ 41 - 1
src/store/actions/tabTemplate.js

@@ -10,12 +10,24 @@ import {
     SHOW_MESSAGE,
     KEEP_PUSH_DATA,
     ALL_CHECKED_SHOW,
+    GET_DPT_LIS,
+    INIT_ADMIN_ITEMS,
+    ALL_CHECKED_ADMIN,
+    ALL_CHECKED_SHOW_ADMIN,
+    CKECK_ITEMS_ADMIN,
+    DEL_ITEMS_ADMIN,
+    BATCH_DEL_ITEMS_ADMIN,
+    CHANGE_TITLE_ADMIN
 } from '@store/types/tabTemplate';
 
 export const delItems = (id) => ({ //删除模板
     type: DEL_ITEMS,
     id
 });
+export const delItemsAdmin = (id) => ({ //删除模板
+    type: DEL_ITEMS_ADMIN,
+    id
+});
 export const tabChange = (idx) => ({ //tab切换
     type: TAB_CHANGE,
     idx
@@ -24,22 +36,42 @@ export const initItems = (state) => ({ //数据初始化
     type: INIT_ITEMS,
     state
 });
+export const initAdminItems = (state) => ({ //数据初始化
+    type: INIT_ADMIN_ITEMS,
+    state
+});
 export const checkItems = (id) => ({ //选中的模板
     type: CKECK_ITEMS,
     id
 });
+export const checkItemsAdmin = (id) => ({ //选中的模板
+    type: CKECK_ITEMS_ADMIN,
+    id
+});
 export const batchDelItems = (ids) => ({ //删除选中的模板
     type: BATCH_DEL_ITEMS,
     ids
 });
+export const batchDelItemsAdmin = (ids) => ({ //删除选中的模板
+    type: BATCH_DEL_ITEMS_ADMIN,
+    ids
+});
 export const allChecked = (bool, flg) => ({ //全选反选
     type: ALL_CHECKED,
     bool
 });
-export const changeTitle = (obj) => ({ //全选反选
+export const allCheckedAdmin = (bool, flg) => ({ //全选反选
+    type: ALL_CHECKED_ADMIN,
+    bool
+});
+export const changeTitle = (obj) => ({ 
     type: CHANGE_TITLE,
     obj
 });
+export const changeTitleAdmin = (obj) => ({ 
+    type: CHANGE_TITLE_ADMIN,
+    obj
+});
 export const changeVisible = (bool) => ({ //弹窗
     type: CHANGE_VISIBLE,
     bool
@@ -56,4 +88,12 @@ export const showMsg = (bool) => ({ //tip提示
 export const allCheckedShow = (bool) => ({ 
     type: ALL_CHECKED_SHOW,
     bool
+});
+export const allCheckedShowAdmin = (bool) => ({ 
+    type: ALL_CHECKED_SHOW_ADMIN,
+    bool
+});
+export const getDptLis = (list) => ({ 
+    type: GET_DPT_LIS,
+    list
 });

+ 20 - 1
src/store/async-actions/patInfo.js

@@ -5,7 +5,7 @@ import {getInfos} from '@store/actions/getInfoByUuid';
 import {getUrlArgObject,pushAllDataList,getAllDataList,storageLocal} from '@utils/tools';
 import {getInitModules,getCommonList} from '@store/async-actions/homePage.js';
 import store from '@store'
-import {ISREAD,MODI_LOADING,SETPRE,SETPREDATA} from "../types/homePage";
+import {ISREAD,MODI_LOADING,SETPRE,SETPREDATA,SETADMIN} from "../types/homePage";
 import { initItemList } from '@store/async-actions/tabTemplate';
 import config from '@config/index';
 import {Notify} from '@commonComp';
@@ -17,6 +17,7 @@ const api = {
     getPreMsg:'/api/prec/inquiryInfo/getInquiryDetail',
     getPreMsgLis:'/api/prec/inquiryInfo/hisInquirys',
     getDoctorConfig:'/doctorPageMode/getDoctorPageModes',       //获取医生设置
+    getAdminCheckout:'/sysSet/getAdminCheckout',     //获取管理员身份
 };
 
 //获取预问诊信息
@@ -47,6 +48,23 @@ export const getPreMsg = (dispatch, getState) => {
         }
     })
 }
+//获取管理员身份
+export const getAdminCheckout = (val1,val2,dispatch) => {
+    json(api.getAdminCheckout, {
+      "doctorId": val1,
+      "hospitalId": val2
+    }).then((res) => {
+        const data = res.data;
+        if (data.code == 0) {
+            dispatch({
+              type: SETADMIN,
+              admin:data.data
+            });
+        } else {
+            console.log(res)
+        }
+    })
+}
 //获取医院id
 export const initHospitalInfo = (dispatch, getState) => {
     let baseList = getState();
@@ -167,6 +185,7 @@ export async function getPatientMessage(dispatch, getState){
   let data1 = {},data2 = {};
   if(res1.data.code=='0'){
     data1 = res1.data.data;
+    getAdminCheckout(data1.doctorId,data1.hospitalId,dispatch)
     getDoctorConfig(data1.doctorId,dispatch);
   }
   if(res2.data.code=='0'){

+ 13 - 0
src/store/async-actions/print.js

@@ -55,6 +55,17 @@ export const realSaveData = (bool,list) => {
     let jsonData = getAllDataList(baseList);
     const lisData = baseList.inspect.pushItem;
     const lisArr = transferIndexData(lisData);
+    //分出体征和非体征标签单独传
+    const checkBody = baseList.checkBody.data;
+    let vitalTags = [],unVitalTags=[];
+    checkBody&&checkBody.map((it)=>{
+        if(it.specFlag===4){
+          vitalTags.push(it);
+        }else{
+          unVitalTags.push(it);
+        }
+    });
+
     const haveAssess = Object.keys(baseList.assessResult.data).length>0;
     let otherData = {},pacsData={};
     const docConfigs = dConfig.readConfig===-1||!dConfig.readConfig?dConfig.typeConfig:dConfig.readConfig;
@@ -81,6 +92,8 @@ export const realSaveData = (bool,list) => {
         "dataJson": JSON.stringify(Object.assign({haveAssess:haveAssess,docConfigs:docConfigs},jsonData)),
         "indexData":lisArr,
         "inquiryEvaluation":evaluation,
+        "vitalSigns":JSON.stringify(vitalTags||[]),
+        "physicalExcVs":JSON.stringify(unVitalTags||[]),
         "detailList": [{
             "content": jsonStr.chief,
             "contentValue":filterDataArr(JSON.parse(jsonStr.chief)),

+ 199 - 6
src/store/async-actions/tabTemplate.js

@@ -5,7 +5,12 @@ import {
   batchDelItems,
   changeTitle,
   keepPushData,
-  changeVisible
+  changeVisible,
+  getDptLis,
+  initAdminItems,
+  delItemsAdmin,
+  batchDelItemsAdmin,
+  changeTitleAdmin,
 } from '@store/actions/tabTemplate';
 import {DIAG_SHOW} from "@store/types/print";
 import Notify from '@commonComp/Notify';
@@ -14,11 +19,21 @@ import {
   getAllDataList,
   getAllDataStringList,
   pushAllDataList,
+  getUrlArgObject,
   didPushParamChange
 } from '@utils/tools';
 import { billing } from '@store/async-actions/pushMessage';
 
-export const initItemList = (current,name) => { //初始化数据
+export const initItemList = (current,name) => {
+  let admin = store.getState().homePage.admin;
+  if(admin){
+    return initAdminItemList(current,name)
+  }else{
+    return initCommonItemList(current,name)
+  }
+}
+
+export const initCommonItemList = (current,name) => { //初始化数据
   let baseList = store.getState();
   let state = baseList.patInfo.message;
 
@@ -27,6 +42,7 @@ export const initItemList = (current,name) => { //初始化数据
       "doctorId": state.doctorId,
       "hospitalDeptId": state.hospitalDeptId,
       "hospitalId": state.hospitalId,
+      "hospitalCode": state.hospitalCode,
       "current": current,
       "sex":[1,2,3],
       "size": 9999,
@@ -42,6 +58,30 @@ export const initItemList = (current,name) => { //初始化数据
     })
   }
 };
+export const initAdminItemList = (current,name) => { //初始化数据
+  let baseList = store.getState();
+  let state = baseList.patInfo.message;
+  return (dispatch) => {
+    axios.json('/templateAdmin/getTemplatePageAlls', {
+      "doctorId": state.doctorId,
+      "hospitalDeptId": '',
+      "hospitalId": state.hospitalId,
+      "hospitalCode": state.hospitalCode,
+      "current": current,
+      "sex":[1,2,3],
+      "size": 9999,
+      "name":name||''
+    }).then((res) => {
+      const data = res.data;
+      if (data.code == 0) {
+        // data.data.flg = flg||false  //获取下一页,暂时不用
+        dispatch(initAdminItems(data.data));
+      } else {
+        Notify.error(data.msg)
+      }
+    })
+  }
+};
 
 export const saveTemplateDetail = (val,sex) => { //保存为模板
   let baseList = store.getState();
@@ -104,6 +144,67 @@ export const saveTemplateDetail = (val,sex) => { //保存为模板
     })
   }
 };
+export const saveAdminTemplateDetail = (val,sex,id) => { //保存为模板
+  let baseList = store.getState();
+  let jsonData = getAllDataList(baseList);
+  let jsonStr = getAllDataStringList(baseList);
+  const dConfig = baseList.typeConfig;
+  const readMode = dConfig.readMode;          //回读模式
+  let whichSign = readMode===-1||readMode===null?dConfig.mode:readMode;
+  const docConfigs = dConfig.readConfig===-1||!dConfig.readConfig?dConfig.typeConfig:dConfig.readConfig;
+  jsonData.docConfigs=docConfigs;     //保存当时的设置引用
+  let state = baseList.patInfo.message;
+  let preview = {
+    "chief": jsonStr.chief,
+    "present": jsonStr.present,
+    "other": jsonStr.other,
+    "vital": jsonStr.vital,
+    "lis": jsonStr.lis,
+    "pacs": jsonStr.pacs,
+    "diag": jsonStr.diag,
+    "advice": jsonStr.advice,
+  }
+  function getdata(idx){
+    let tmpObj = {
+      "doctorId": state.doctorId,
+      "hospitalDeptId": id,
+      "hospitalId": state.hospitalId,
+      "dataJson": JSON.stringify(jsonData),
+      "modeName": val,
+      "modeType": whichSign,
+      "preview": idx ? JSON.stringify(preview):preview,
+      "sex":sex
+    }
+    return tmpObj;
+  }
+  return (dispatch) => {
+    axios.json('/templateAdmin/saveTemplateAdmin', getdata()).then((res) => {
+      const data = res.data;
+      if (data.code == 0) {
+        Notify.success('模板保存成功');
+        dispatch(initItemList(1,""));
+        dispatch(keepPushData(getdata(1),'part'));
+        dispatch({
+          type: DIAG_SHOW,
+          data:false
+        });
+      } else {
+        if(data.msg == '该模板名存在'){         //存在不关闭弹窗
+          dispatch({
+            type: DIAG_SHOW,
+            data:true
+          });
+        }else{
+          dispatch({
+            type: DIAG_SHOW,
+            data:false
+          });
+        }
+        Notify.error(data.msg);
+      }
+    })
+  }
+};
 
 export const delItem = (id) => { //删除
   return (dispatch) => {
@@ -120,6 +221,24 @@ export const delItem = (id) => { //删除
     })
   }
 };
+export const delItemAdmin = (id) => { //删除
+  let baseList = store.getState().patInfo.message;
+  return (dispatch) => {
+    axios.json('/templateAdmin/cancelTemplateAdminb', {
+      "ids": id, 
+      "doctorId": baseList.doctorId,
+      "hospitalId": baseList.hospitalId,
+    }).then((res) => {
+      let data = res.data;
+      if (data.code == 0) {
+        dispatch(delItemsAdmin(id));
+        Notify.success('模板删除成功');
+      } else {
+        Notify.error(data.msg);
+      }
+    })
+  }
+};
 export const delBatchItem = (ids) => { //批量删除
   return (dispatch) => {
     axios.json('/templateInfo/cancelTemplateInfos', {
@@ -134,15 +253,53 @@ export const delBatchItem = (ids) => { //批量删除
     })
   }
 };
+export const delBatchItemAdmin = (ids) => { //批量删除
+  let baseList = store.getState().patInfo.message;
+  return (dispatch) => {
+    axios.json('/templateAdmin/cancelTemplateAdminb', {
+      "ids": ids.join(","), 
+      "doctorId": baseList.doctorId,
+      "hospitalId": baseList.hospitalId,
+    }).then((res) => {
+      let data = res.data;
+      if (data.code == 0) {
+        dispatch(batchDelItemsAdmin(ids));
+      } else {
+        Notify.error(data.msg);
+      }
+    })
+  }
+};
 
-export const changeTitleAsync = (obj) => { //改标题
+export const changeTitleAsyncAdmin = (obj) => { //改标题
   let baseList = store.getState();
   let whichSign = baseList.typeConfig.mode;
   let state = baseList.patInfo.message;
-  if (obj.title.trim() == '') {
-    Notify.info('请输入模板名称');
-    return;
+  return (dispatch) => {
+    axios.json('/templateAdmin/updateByAdminNames', {
+      "doctorId": state.doctorId,
+      "hospitalDeptId": state.hospitalDeptId,
+      "hospitalId": state.hospitalId,
+      "id": obj.id,
+      "modeName": obj.title,
+      "type": whichSign
+    }).then((res) => {
+      let data = res.data;
+      if (data.code == 0) {
+        dispatch(changeTitleAdmin(obj));
+        Notify.success('标题修改成功');
+        store.dispatch(changeVisible(false))
+      } else {
+        // console.log(data)
+        Notify.error(data.msg)
+      }
+    })
   }
+};
+export const changeTitleAsync = (obj) => { //改标题
+  let baseList = store.getState();
+  let whichSign = baseList.typeConfig.mode;
+  let state = baseList.patInfo.message;
   return (dispatch) => {
     axios.json('/templateInfo/updateByIdUsNames', {
       "doctorId": state.doctorId,
@@ -182,4 +339,40 @@ export const setPageView = (id) => { //获取模板结构化数据
       }
     })
   }
+};
+export const setPageViewAdmin = (id) => { //获取模板结构化数据
+  return (dispatch) => {
+    axios.json('/templateAdmin/getTemplateIdAlls', {
+      id: id
+    }).then((res) => {
+      let data = res.data;
+      if (data.code == 0) {
+        //模板列表不筛选模式后,单个模式引用时看本身的模式
+        pushAllDataList(data.data.type, 'push', data.data, 'template')//引用
+        if(didPushParamChange()){     //诊断变化时会调推送,避免重复调
+          dispatch(billing())
+        }
+      } else {
+        Notify.error(data.msg);
+      }
+    })
+  }
+};
+
+export const getDepartments = (value) => { //获取模板结构化数据
+  return (dispatch) => {
+    axios.json('/doctorInfo/getHospitalDeptInfoAll', {
+      "deptInfoName": value,
+      "hospitalCode": getUrlArgObject('hospitalId'),
+      "thirdpartyName": ""
+    }).then((res) => {
+      let data = res.data;
+      if (data.code == 0) {
+        console.log(data)
+        dispatch(getDptLis(data.data))
+      } else {
+        Notify.error(data.msg);
+      }
+    })
+  }
 };

+ 2 - 1
src/store/reducers/currentIll.js

@@ -2,7 +2,8 @@
 import {RECOVER_TAG_CURRENT,SET_CURRENT,CURRENT_CONFIRM,INSERT_PROCESS,SET_CURRENT_DATA,SET_LABEL_MODULE,SETMAINCHECKBOX,
   CURRENT_RADIO,CURRENT_NUMBER,CURRENT_TEXT_LABEL,CLEAR_CURRENT_ILL,SETTEXTMODEVALUE,CURRENT_GET_BIGDATAPUSH,CURRENT_CLEAR,
   SET_CURRENT_SEARCH,SETCURRENTTEXT,CURRENT_FOCUS_INDEX,SELECT_SEARCHDATA,CLEAR_CURRENT_EDIT,CURRENTADDLABELITEM,
-  SETCURRENTINPUT,DEL_CURRENT,REMOVE_CURR_ID,CURRENT_MUL,DEL_CURRENT_LABLE,SET_RADIO_INPUT_VALUE,CURRENT_CHRONIC,SAVE_CURR_FREE,DELETE_CURRENT_SELECTED_TAGS,SHOW_COMMON_ON_CURRENT} from '../types/currentIll';
+  SETCURRENTINPUT,DEL_CURRENT,REMOVE_CURR_ID,CURRENT_MUL,DEL_CURRENT_LABLE,SET_RADIO_INPUT_VALUE,CURRENT_CHRONIC,
+  SAVE_CURR_FREE,SHOW_COMMON_ON_CURRENT,DELETE_CURRENT_SELECTED_TAGS} from '../types/currentIll';
 import {confirm,insertProcess,setData,setCheckBox,changeLabelVal,clearCurrentIll,
   setTextModeValue,setModule,bigDataSymptom,insertLabelData,clearCurrentEdit,
   backspaceText,removeId,multipleComfirn,delSingleLable,fillChronicModule} from '../actions/currentIll';

+ 6 - 3
src/store/reducers/homePage.js

@@ -1,6 +1,5 @@
 import {HIDE,RESET,SETINITDATA,SETDROPSHOW,SETADDITEMINIT,SETT0EDIT,SETREADDITEMS,SETPREDATA,
-  HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,GET_INSPECT_LIST,GET_ASSIST_LIST,
-  SETALLMODULES,SETSYSTEMCONFIG,SETPRE,RESET_SELECT_TAG,SET_SELECTED_AREA} from '../types/homePage.js';
+  HIDEDROP,CLICKCOUNT,ISREAD,SETOTHERHISTORY,SETMINSCREEN,MODI_LOADING,GET_INSPECT_LIST,GET_ASSIST_LIST,SETALLMODULES,SETSYSTEMCONFIG,SETPRE,RESET_SELECT_TAG,SET_SELECTED_AREA,SETADMIN} from '../types/homePage.js';
 import {showDrop,setAddItemInit,setLabelToEdit,confirmHide,clickNum,getInspectList,getAssistList,setSelectArea,resetSelectArea} from '../actions/homePage.js';
 
 const initState = {
@@ -21,7 +20,8 @@ const initState = {
   sysConfig:{},
   showPre:false,
   preData:{},
-  item:{}
+  item:{},
+  admin:false
 };
 
 export default function (state=initState,action) {
@@ -84,6 +84,9 @@ export default function (state=initState,action) {
       res.preData = action.preData;
       res.item = action.item;
       return res;
+    case SETADMIN:
+      res.admin = action.admin;
+      return res;
     case SET_SELECTED_AREA:
       return setSelectArea(state,action);
     case RESET_SELECT_TAG:

+ 108 - 7
src/store/reducers/tabTemplate.js

@@ -10,6 +10,14 @@ import {
   SHOW_MESSAGE,
   KEEP_PUSH_DATA,
   ALL_CHECKED_SHOW,
+  GET_DPT_LIS,
+  INIT_ADMIN_ITEMS,
+  ALL_CHECKED_ADMIN,
+  ALL_CHECKED_SHOW_ADMIN,
+  CKECK_ITEMS_ADMIN,
+  DEL_ITEMS_ADMIN,
+  BATCH_DEL_ITEMS_ADMIN,
+  CHANGE_TITLE_ADMIN,
 } from '../types/tabTemplate';
 
 
@@ -22,23 +30,43 @@ const initDataList = {
     type: ''
   },
   items: [],
+  adminItems:[],
   allChecked: false, //全选反选
+  allCheckedAdmin:false,//全选反选管理员模板
   checkItems: [], //选中要删除的元素
+  checkItemsAdmin: [], //选中要删除的元素管理员
   activeItem: {}, //引用的模板
   activeItemHis: {}, //引用的历史病例
   allCheckShow: false, //全选反选是否显示
+  allCheckShowAdmin: false, //全选反选是否显示管理员
   current:1,//当前页
   hasMore:true,//是否显示更多
+  departLis:[],//搜索的科室列表
 }
 export default (state = initDataList, action) => {
+  if (action.type === GET_DPT_LIS) {
+    const newState = Object.assign({}, state);
+    newState.departLis = action.list;
+    return newState;
+  }
   if (action.type === DEL_ITEMS) {
     const newState = Object.assign({}, state);
     let tempArr = newState.items;
     tempArr.splice(tempArr.findIndex(item => item.id == action.id), 1)
     newState.items = [...tempArr];
-    // if(tempArr.length == 0){
-    //   newState.allCheckShow = false
-    // }
+    if(tempArr.length == 0){
+      newState.allCheckShow = false
+    }
+    return newState;
+  }
+  if (action.type === DEL_ITEMS_ADMIN) {
+    const newState = Object.assign({}, state);
+    let tempArr = newState.adminItems;
+    tempArr.splice(tempArr.findIndex(item => item.id == action.id), 1)
+    newState.adminItems = [...tempArr];
+    if(tempArr.length == 0){
+      newState.allCheckShowAdmin = false
+    }
     return newState;
   }
   if (action.type === BATCH_DEL_ITEMS) {
@@ -49,12 +77,26 @@ export default (state = initDataList, action) => {
       tempArr.splice(tempArr.findIndex(item => item.id == currentId), 1)
     }
     newState.items = [...tempArr];
-    // if(tempArr.length == 0){
-    //   newState.allCheckShow = false
-    // }
+    if(tempArr.length == 0){
+      newState.allCheckShow = false
+    }
     newState.checkItems = [];
     return newState;
   }
+  if (action.type === BATCH_DEL_ITEMS_ADMIN) {
+    const newState = Object.assign({}, state);
+    let tempArr = newState.adminItems;
+    for (let i = 0; i < action.ids.length; i++) {
+      let currentId = action.ids[i];
+      tempArr.splice(tempArr.findIndex(item => item.id == currentId), 1)
+    }
+    newState.adminItems = [...tempArr];
+    if(tempArr.length == 0){
+      newState.allCheckShowAdmin = false
+    }
+    newState.checkItemsAdmin = [];
+    return newState;
+  }
   if (action.type === INIT_ITEMS) {
     const newState = Object.assign({}, state);
     // let tmpItems = JSON.parse(JSON.stringify(newState.items))
@@ -65,7 +107,23 @@ export default (state = initDataList, action) => {
     // }else{
     //   newState.items = tmpItems.concat(action.state.records);
     // }
-    newState.items = action.state.records
+    newState.items = action.state.personalTemplate.records
+    newState.adminItems = action.state.adminTemplate.records
+    newState.current = action.state.current;
+    newState.hasMore = action.state.current<action.state.pages;
+    return newState;
+  }
+  if (action.type === INIT_ADMIN_ITEMS) {
+    const newState = Object.assign({}, state);
+    // let tmpItems = JSON.parse(JSON.stringify(newState.items))
+    // let tmpCurrent = JSON.parse(JSON.stringify(newState.current))
+    // console.log(action.state.flg,action.state.pages,tmpCurrent,45544)
+    // if(action.state.current == 1&&!action.state.flg){//进入页面会调取分页相关先去掉
+    //   newState.items = action.state.records
+    // }else{
+    //   newState.items = tmpItems.concat(action.state.records);
+    // }
+    newState.adminItems = action.state.records
     newState.current = action.state.current;
     newState.hasMore = action.state.current<action.state.pages;
     return newState;
@@ -96,6 +154,17 @@ export default (state = initDataList, action) => {
     newState.items = [...tempArr];
     return newState;
   }
+  if (action.type === CHANGE_TITLE_ADMIN) {
+    const newState = Object.assign({}, state);
+    let tempArr = newState.adminItems;
+    for (let i = 0; i < tempArr.length; i++) {
+      if (tempArr[i].id == action.obj.id) {
+        tempArr[i].name = action.obj.title
+      }
+    }
+    newState.adminItems = [...tempArr];
+    return newState;
+  }
   if (action.type === CKECK_ITEMS) {
     const newState = Object.assign({}, state);
     if (newState.checkItems.indexOf(action.id) == -1) {
@@ -109,6 +178,19 @@ export default (state = initDataList, action) => {
     }
     return newState;
   }
+  if (action.type === CKECK_ITEMS_ADMIN) {
+    const newState = Object.assign({}, state);
+    if (newState.checkItemsAdmin.indexOf(action.id) == -1) {
+      let tempArr = newState.checkItemsAdmin;
+      tempArr.push(action.id);
+      newState.checkItemsAdmin = [...tempArr]
+    } else {
+      let tempArr = newState.checkItemsAdmin;
+      tempArr.splice(tempArr.findIndex(item => item === action.id), 1)
+      newState.checkItemsAdmin = [...tempArr]
+    }
+    return newState;
+  }
   if (action.type === KEEP_PUSH_DATA) {
     const newState = Object.assign({}, state);
     action.flg == 'his' ? (newState.activeItemHis = action.data) : (newState.activeItem = action.data);
@@ -127,6 +209,20 @@ export default (state = initDataList, action) => {
     newState.allChecked = action.bool;
     newState.checkItems = [...tempArr];
     return newState;
+  }  
+  if (action.type === ALL_CHECKED_ADMIN) {//管理员全选反选
+    const newState = Object.assign({}, state);
+    let tempArr = [];
+    if (action.bool) {
+      newState.adminItems.forEach((val) => {
+        tempArr.push(val.id)
+      })
+    } else {
+      tempArr = []
+    }
+    newState.allCheckedAdmin = action.bool;
+    newState.checkItemsAdmin = [...tempArr];
+    return newState;
   }
 
   if (action.type === ALL_CHECKED_SHOW) {
@@ -134,5 +230,10 @@ export default (state = initDataList, action) => {
     newState.allCheckShow = action.bool;
     return newState;
   }
+  if (action.type === ALL_CHECKED_SHOW_ADMIN) {
+    const newState = Object.assign({}, state);
+    newState.allCheckShowAdmin = action.bool;
+    return newState;
+  }
   return state;
 }

+ 1 - 1
src/store/types/checkBody.js

@@ -20,5 +20,5 @@ export const SET_CK_RADIO_INPUT_VAL = 'SET_CK_RADIO_INPUT_VAL';
 export const SET_IMPORT_CHECKBODY_LABEL='SET_IMPORT_CHECKBODY_LABEL';
 export const PRESET = 'PRESET_CHECKBODY_DATA';
 export const RECOVER_TAG_CHECK = 'RECOVER_TAG_CHECK';     //恢复已删除标签
+export const DELETE_CHECK_SELECTED_TAGS='DELETE_CHECK_SELECTED_TAGS';
 export const REPUSH_CHECK_LABELS = 'REPUSH_CHECK_LABELS';   //重新获取查体
-export const DELETE_CHECK_SELECTED_TAGS='DELETE_CHECK_SELECTED_TAGS';

+ 1 - 0
src/store/types/homePage.js

@@ -18,5 +18,6 @@ export const SETALLMODULES = 'SETALLMODULES';    //储存所有模板数据
 export const SETSYSTEMCONFIG = 'SETSYSTEMCONFIG';   //设置配置数据
 export const SETPRE = 'SETPRE';   //设置预问诊引用弹窗
 export const SETPREDATA = 'SETPREDATA';   //设置预问诊数据暂存
+export const SETADMIN = 'SETADMIN';   //设置管理员身份
 export const RESET_SELECT_TAG='RESET_SELECT_TAG';   //重置选中标签的各标记
 export const SET_SELECTED_AREA='SET_SELECTED_AREA';

+ 8 - 0
src/store/types/tabTemplate.js

@@ -9,3 +9,11 @@ export const CHANGE_VISIBLE = 'CHANGE_VISIBLE';
 export const SHOW_MESSAGE = 'SHOW_MESSAGE';
 export const KEEP_PUSH_DATA = 'KEEP_PUSH_DATA';
 export const ALL_CHECKED_SHOW = 'ALL_CHECKED_SHOW';
+export const GET_DPT_LIS = 'GET_DPT_LIS';
+export const INIT_ADMIN_ITEMS = 'INIT_ADMIN_ITEMS';
+export const ALL_CHECKED_ADMIN = 'ALL_CHECKED_ADMIN';
+export const ALL_CHECKED_SHOW_ADMIN = 'ALL_CHECKED_SHOW_ADMIN';
+export const CKECK_ITEMS_ADMIN = 'CKECK_ITEMS_ADMIN';
+export const DEL_ITEMS_ADMIN = 'DEL_ITEMS_ADMIN';
+export const BATCH_DEL_ITEMS_ADMIN = 'BATCH_DEL_ITEMS_ADMIN';
+export const CHANGE_TITLE_ADMIN = 'CHANGE_TITLE_ADMIN';

+ 2 - 2
src/utils/config.js

@@ -1,8 +1,8 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
 // const host='http://192.168.2.121:5050';//后端接口访问地址
-// const host='http://192.168.2.236:5050';//后端接口访问地址
-const host='http://192.168.2.241:5050';//后端接口访问地址
+const host='http://192.168.2.236:5050';//后端接口访问地址
+// const host='http://192.168.2.241:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚