md
This commit is contained in:
parent
f55e3ff034
commit
3db93bd737
@ -2,7 +2,7 @@
|
||||
<el-select
|
||||
multiple
|
||||
filterable
|
||||
collapse-tags
|
||||
|
||||
clearable
|
||||
ref="selectRef"
|
||||
remote
|
||||
@ -14,6 +14,8 @@
|
||||
@focus="onFocus"
|
||||
|
||||
class="mutiSelect"
|
||||
@change="onChange"
|
||||
@visible-change="reverseArrow"
|
||||
>
|
||||
<!-- @change="onChange" -->
|
||||
<!-- collapse-tags -->
|
||||
@ -25,7 +27,7 @@
|
||||
<el-button type="primary" size="mini" style="padding:2px 10px" @click="confirmOk">确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-option v-for="item in optionItems" :key="item.id" :label="item.name" :value="item.code">
|
||||
<el-option v-for="item in optionItems.filter(el=> !svalue.includes(el.code) )" :key="item.id" :label="item.name" :value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
@ -66,7 +68,7 @@ watch: {
|
||||
value(newVal) {
|
||||
if(this.value) {
|
||||
this.svalue = this.value.split(',');
|
||||
this.queryData(null,this.value,this.value);
|
||||
// this.queryData(null,this.value,this.value);
|
||||
}
|
||||
// this.queryParams.sortCodeStr=this.value;
|
||||
// console.log("xxxx===>xxx2:",this.queryParams)
|
||||
@ -84,7 +86,6 @@ methods: {
|
||||
confirmOk(){
|
||||
|
||||
let selCodeStr="";
|
||||
let selNameStr="";
|
||||
if(this.svalue&&this.svalue.length>0){
|
||||
selCodeStr=this.svalue.join(',');
|
||||
}
|
||||
@ -96,13 +97,20 @@ methods: {
|
||||
this.$refs.selectRef.blur();
|
||||
},
|
||||
onFocus(){
|
||||
let selCodeStr=null;
|
||||
if(this.svalue&&this.svalue.length>0){
|
||||
let selCodeStr=this.svalue.join(',');
|
||||
this.queryData(null,null,sortCodeStr);
|
||||
selCodeStr=this.svalue.join(',');
|
||||
}
|
||||
this.queryData(null,null,selCodeStr);
|
||||
},
|
||||
onChange(val) {
|
||||
// this.confirmOk()
|
||||
let selCodeStr="";
|
||||
if(this.svalue&&this.svalue.length>0){
|
||||
selCodeStr=this.svalue.join(',');
|
||||
}
|
||||
// this.queryData(null,null,selCodeStr);
|
||||
this.$emit('input', selCodeStr)
|
||||
this.$emit('onChange',selCodeStr)
|
||||
},
|
||||
queryData(val,key,sortCodeStr) {
|
||||
this.queryParams.pageNum=1;
|
||||
@ -122,6 +130,16 @@ methods: {
|
||||
|
||||
});
|
||||
},
|
||||
reverseArrow(flag) {
|
||||
let rulesDom = this.$refs["selectRef"].$el.querySelector(
|
||||
".el-input .el-input__suffix .el-input__suffix-inner .el-input__icon"
|
||||
); // 找到dom
|
||||
if (flag) {
|
||||
rulesDom.classList.add("is-reverse"); // 对dom新增class
|
||||
} else {
|
||||
rulesDom.classList.remove("is-reverse"); // 对dom新增class
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -92,7 +92,7 @@
|
||||
:on-change="fileChange"
|
||||
:before-upload="beforeUpload">
|
||||
<el-button slot="trigger" plain class="filter-item" size="mini" type="primary" >选择文件</el-button>
|
||||
<el-link type="primary" style="line-height: 28px;font-size:13px;color:blue" href="/static/tpl/batch_import_order.xls">下载导入Excel模板</el-link>
|
||||
<el-link type="primary" style="line-height: 28px;font-size:13px;color:blue" href="/static/tpl/import_sit_batch_rule_tpl.xls">下载导入Excel模板</el-link>
|
||||
<div v-if="uploadExcelDataInfo !=''" style="color: black;font-size: 12px;font-weight: 800;">{{ fileName }} {{ uploadExcelDataInfo }}</div>
|
||||
</el-upload>
|
||||
<el-alert
|
||||
|
||||
Loading…
Reference in New Issue
Block a user