|
@@ -42,6 +42,7 @@ class Operation extends Component {
|
|
|
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() {
|
|
@@ -153,8 +154,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
|
|
@@ -162,6 +163,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(
|
|
@@ -181,7 +187,6 @@ class Operation extends Component {
|
|
|
return true;
|
|
|
}
|
|
|
changeTitle() {
|
|
|
- const {handleChangeValue} = this.props;
|
|
|
return <div className={style['box']}>
|
|
|
{/* <div className={style.titleTip}></div> */}
|
|
|
<div className={style['iptWrap']}>
|
|
@@ -292,12 +297,6 @@ class Operation extends Component {
|
|
|
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';
|
|
@@ -307,9 +306,13 @@ 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,departLis,handleChangeValue,admin} = this.props;
|
|
|
const {zIndex,type,le,value} = this.state;
|
|
@@ -341,7 +344,7 @@ class Operation extends Component {
|
|
|
{
|
|
|
admin&&type==3?<div className={style.department}>
|
|
|
<span>科室归属:</span>
|
|
|
- <Search handleChangeValue={handleChangeValue} value={value} visible={true}>
|
|
|
+ <Search handleChangeValue={handleChangeValue} handleChangeIpt={handleChangeIpt} value={value} visible={true}>
|
|
|
<ul className={style.departLis}>
|
|
|
{
|
|
|
departLis.map((item,idx)=>{
|