|
@@ -2,23 +2,22 @@
|
|
<div class="single-container">
|
|
<div class="single-container">
|
|
<el-form>
|
|
<el-form>
|
|
<div class="operation-row">
|
|
<div class="operation-row">
|
|
- <el-checkbox-group size="small" v-if="type==2">
|
|
|
|
- <el-checkbox-button :label="0">文字输入框占位符</el-checkbox-button>
|
|
|
|
|
|
+ <el-checkbox-group size="small">
|
|
|
|
+ <el-checkbox-button :label="0" @change="handlePlaceholder(0)">文字输入框占位符</el-checkbox-button>
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
- <el-checkbox-group size="small" v-if="type==2">
|
|
|
|
- <el-checkbox-button :label="0">数字输入框占位符</el-checkbox-button>
|
|
|
|
|
|
+ <el-checkbox-group size="small">
|
|
|
|
+ <el-checkbox-button :label="0" @change="handlePlaceholder(1)">数字输入框占位符</el-checkbox-button>
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
- <el-checkbox-group size="small" v-if="type==1&&ascription!=1">
|
|
|
|
- <el-checkbox-button :label="0">互斥项</el-checkbox-button>
|
|
|
|
|
|
+ <el-checkbox-group size="small" v-if="type==2">
|
|
|
|
+ <el-checkbox-button :label="0" @change="handleExclu">互斥项</el-checkbox-button>
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
- <span v-if="type == 11" class="tip">可输入中文全角括号"()", 当作可输入内容的占位符</span>
|
|
|
|
<el-button type="danger" size="small" class="del" @click="delRow">删除</el-button>
|
|
<el-button type="danger" size="small" class="del" @click="delRow">删除</el-button>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
- <div class="main-area">
|
|
|
|
|
|
+ <div class="main-area" v-if="type!=3">
|
|
<el-col class="col-title">
|
|
<el-col class="col-title">
|
|
<span><i>*</i>填写单医生界面展示标准内容</span>
|
|
<span><i>*</i>填写单医生界面展示标准内容</span>
|
|
- <span>填写单医生界面展示通俗内容</span>
|
|
|
|
|
|
+ <span>填写单患者界面展示通俗内容</span>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col v-for="(it,i) in rows" :key="i">
|
|
<el-col v-for="(it,i) in rows" :key="i">
|
|
<div class="inps">
|
|
<div class="inps">
|
|
@@ -35,10 +34,24 @@
|
|
@input="HandleInputName(i, rows[i].description)"
|
|
@input="HandleInputName(i, rows[i].description)"
|
|
@blur="emitValues"></el-input>
|
|
@blur="emitValues"></el-input>
|
|
</div>
|
|
</div>
|
|
- <el-tag v-if="it.isExclu" type="info" size="mini" @click="">互斥项</el-tag>
|
|
|
|
|
|
+ <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
|
|
</el-col>
|
|
</el-col>
|
|
<el-button @click="addRow">+</el-button>
|
|
<el-button @click="addRow">+</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="main-area" v-if="type==3">
|
|
|
|
+ <el-col v-for="(it,i) in rows" :key="i">
|
|
|
|
+ <div class="inps">
|
|
|
|
+ <el-input v-model="rows[i].name"
|
|
|
|
+ v-bind:class="{select:focusOn==i}"
|
|
|
|
+ @focus="selectRow(i)"
|
|
|
|
+ ref = "inputName"
|
|
|
|
+ @input="HandleInputName(i, rows[i].name,true)"
|
|
|
|
+ @blur="emitValues"></el-input>
|
|
|
|
+ </div>
|
|
|
|
+ <el-tag v-if="it.exclusion" type="info" size="mini">互斥项</el-tag>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-button @click="addRow" class="little">+</el-button>
|
|
|
|
+ </div>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -68,7 +81,7 @@
|
|
}
|
|
}
|
|
.operation-row{
|
|
.operation-row{
|
|
margin-left:150px;
|
|
margin-left:150px;
|
|
- text-align: right;
|
|
|
|
|
|
+ /*text-align: right;*/
|
|
.del{
|
|
.del{
|
|
margin-left: 150px;
|
|
margin-left: 150px;
|
|
}
|
|
}
|
|
@@ -77,7 +90,8 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.main-area{
|
|
.main-area{
|
|
- width: 420px;
|
|
|
|
|
|
+ width: 80%;
|
|
|
|
+ min-width: 400px;
|
|
margin:20px 150px;
|
|
margin:20px 150px;
|
|
.inps{
|
|
.inps{
|
|
display: inline-block;
|
|
display: inline-block;
|
|
@@ -90,7 +104,7 @@
|
|
margin-bottom:10px;
|
|
margin-bottom:10px;
|
|
span{
|
|
span{
|
|
display: inline-block;
|
|
display: inline-block;
|
|
- width: 210px;
|
|
|
|
|
|
+ width: calc(50% - 30px);
|
|
font-size:12px;
|
|
font-size:12px;
|
|
i{
|
|
i{
|
|
color: #f56c6c;
|
|
color: #f56c6c;
|
|
@@ -114,6 +128,9 @@
|
|
.el-button{
|
|
.el-button{
|
|
width: calc(100% - 60px);
|
|
width: calc(100% - 60px);
|
|
border-radius: 0;
|
|
border-radius: 0;
|
|
|
|
+ &.little{
|
|
|
|
+ width: calc(50% - 30px);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
@@ -191,6 +208,38 @@
|
|
this.focusOn = index;
|
|
this.focusOn = index;
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ handlePlaceholder(type){ //占位符类型,type=0文本输入框,type=1数字输入框
|
|
|
|
+ const i = this.focusOn;
|
|
|
|
+ if(i==-1){
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请先选中要操作的行',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ showClose: true,
|
|
|
|
+ });
|
|
|
|
+ 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];
|
|
|
|
+ },
|
|
|
|
+ handleExclu(){
|
|
|
|
+ const i = this.focusOn;
|
|
|
|
+ if(i==-1){
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请先选中要操作的行',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ showClose: true,
|
|
|
|
+ });
|
|
|
|
+ return ;
|
|
|
|
+ }
|
|
|
|
+ this.rows.map((it,x)=>{
|
|
|
|
+ if(x===i){
|
|
|
|
+ it.exclusion = 1;
|
|
|
|
+ }else{
|
|
|
|
+ it.exclusion = 0;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
emitValues(i,type,flag){
|
|
emitValues(i,type,flag){
|
|
if(typeof i =='number'&&this.focusOn == -1){
|
|
if(typeof i =='number'&&this.focusOn == -1){
|
|
this.$message({
|
|
this.$message({
|