md
This commit is contained in:
parent
f55e3ff034
commit
3db93bd737
@ -2,7 +2,7 @@
|
|||||||
<el-select
|
<el-select
|
||||||
multiple
|
multiple
|
||||||
filterable
|
filterable
|
||||||
collapse-tags
|
|
||||||
clearable
|
clearable
|
||||||
ref="selectRef"
|
ref="selectRef"
|
||||||
remote
|
remote
|
||||||
@ -14,6 +14,8 @@
|
|||||||
@focus="onFocus"
|
@focus="onFocus"
|
||||||
|
|
||||||
class="mutiSelect"
|
class="mutiSelect"
|
||||||
|
@change="onChange"
|
||||||
|
@visible-change="reverseArrow"
|
||||||
>
|
>
|
||||||
<!-- @change="onChange" -->
|
<!-- @change="onChange" -->
|
||||||
<!-- collapse-tags -->
|
<!-- collapse-tags -->
|
||||||
@ -25,7 +27,7 @@
|
|||||||
<el-button type="primary" size="mini" style="padding:2px 10px" @click="confirmOk">确定</el-button>
|
<el-button type="primary" size="mini" style="padding:2px 10px" @click="confirmOk">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</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-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
@ -66,7 +68,7 @@ watch: {
|
|||||||
value(newVal) {
|
value(newVal) {
|
||||||
if(this.value) {
|
if(this.value) {
|
||||||
this.svalue = this.value.split(',');
|
this.svalue = this.value.split(',');
|
||||||
this.queryData(null,this.value,this.value);
|
// this.queryData(null,this.value,this.value);
|
||||||
}
|
}
|
||||||
// this.queryParams.sortCodeStr=this.value;
|
// this.queryParams.sortCodeStr=this.value;
|
||||||
// console.log("xxxx===>xxx2:",this.queryParams)
|
// console.log("xxxx===>xxx2:",this.queryParams)
|
||||||
@ -84,7 +86,6 @@ methods: {
|
|||||||
confirmOk(){
|
confirmOk(){
|
||||||
|
|
||||||
let selCodeStr="";
|
let selCodeStr="";
|
||||||
let selNameStr="";
|
|
||||||
if(this.svalue&&this.svalue.length>0){
|
if(this.svalue&&this.svalue.length>0){
|
||||||
selCodeStr=this.svalue.join(',');
|
selCodeStr=this.svalue.join(',');
|
||||||
}
|
}
|
||||||
@ -96,13 +97,20 @@ methods: {
|
|||||||
this.$refs.selectRef.blur();
|
this.$refs.selectRef.blur();
|
||||||
},
|
},
|
||||||
onFocus(){
|
onFocus(){
|
||||||
|
let selCodeStr=null;
|
||||||
if(this.svalue&&this.svalue.length>0){
|
if(this.svalue&&this.svalue.length>0){
|
||||||
let selCodeStr=this.svalue.join(',');
|
selCodeStr=this.svalue.join(',');
|
||||||
this.queryData(null,null,sortCodeStr);
|
|
||||||
}
|
}
|
||||||
|
this.queryData(null,null,selCodeStr);
|
||||||
},
|
},
|
||||||
onChange(val) {
|
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) {
|
queryData(val,key,sortCodeStr) {
|
||||||
this.queryParams.pageNum=1;
|
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>
|
</script>
|
||||||
|
|||||||
@ -92,7 +92,7 @@
|
|||||||
:on-change="fileChange"
|
:on-change="fileChange"
|
||||||
:before-upload="beforeUpload">
|
:before-upload="beforeUpload">
|
||||||
<el-button slot="trigger" plain class="filter-item" size="mini" type="primary" >选择文件</el-button>
|
<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>
|
<div v-if="uploadExcelDataInfo !=''" style="color: black;font-size: 12px;font-weight: 800;">{{ fileName }} {{ uploadExcelDataInfo }}</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-alert
|
<el-alert
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user