|
@@ -23,13 +23,13 @@
|
|
|
<div class="inps">
|
|
|
<el-input v-model="rows[i].name"
|
|
|
v-bind:class="{select:focusOn==i}"
|
|
|
- @focus="selectRow(i)"
|
|
|
+ @focus="selectRow(i,'name')"
|
|
|
ref = "inputName"
|
|
|
@input="HandleInputName(i, rows[i].name,true)"
|
|
|
@blur="emitValues"></el-input>
|
|
|
<el-input v-model="rows[i].description"
|
|
|
v-bind:class="{select:focusOn==i}"
|
|
|
- @focus="selectRow(i)"
|
|
|
+ @focus="selectRow(i,'description')"
|
|
|
ref = "inputDesc"
|
|
|
@input="HandleInputName(i, rows[i].description)"
|
|
|
@blur="emitValues"></el-input>
|
|
@@ -43,7 +43,7 @@
|
|
|
<div class="inps">
|
|
|
<el-input v-model="rows[i].name"
|
|
|
v-bind:class="{select:focusOn==i}"
|
|
|
- @focus="selectRow(i)"
|
|
|
+ @focus="selectRow(i,'name')"
|
|
|
ref = "inputName"
|
|
|
@input="HandleInputName(i, rows[i].name,true)"
|
|
|
@blur="emitValues"></el-input>
|
|
@@ -147,6 +147,7 @@
|
|
|
return {
|
|
|
rows:[...initRows],
|
|
|
focusOn:-1, //聚焦的行index
|
|
|
+ focusName:'name', //是否聚焦医生界面输入框
|
|
|
}
|
|
|
},
|
|
|
mounted(){
|
|
@@ -197,9 +198,9 @@
|
|
|
addRow(){
|
|
|
this.rows.push(Object.assign({},initRow,{orderNo:this.rows.length}));
|
|
|
},
|
|
|
- selectRow(index){
|
|
|
+ selectRow(index,name){
|
|
|
this.focusOn = index;
|
|
|
-
|
|
|
+ this.focusName = name;
|
|
|
},
|
|
|
handlePlaceholder(type){ //占位符类型,type=0文本输入框,type=1数字输入框
|
|
|
const i = this.focusOn;
|
|
@@ -212,8 +213,9 @@
|
|
|
return ;
|
|
|
}
|
|
|
const maps = {0:'${input_输入}',1:'${number_输入}'};
|
|
|
- this.rows[i].name = this.rows[i].name+maps[type];
|
|
|
- this.rows[i].description = this.rows[i].description+maps[type];
|
|
|
+ const key = this.focusName;
|
|
|
+ this.rows[i][key] = this.rows[i][key]+maps[type];
|
|
|
+ //this.rows[i].description = this.rows[i].description+maps[type];
|
|
|
},
|
|
|
handleExclu(){
|
|
|
const i = this.focusOn;
|