|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
- <span class="select-component" style="display: flex">
|
|
|
+ <span class="select-component" style="display:inline-flex;">
|
|
|
<el-select
|
|
|
v-model="value"
|
|
|
size="small"
|
|
|
:placeholder="configuration.placeholder"
|
|
|
- style="width: 80%;border-right: none;"
|
|
|
+ style="width: 90%;border-right: none;"
|
|
|
:disabled="disabled?disabled:false"
|
|
|
:multiple="configuration.multiple?configuration.multiple:false"
|
|
|
:collapse-tags="configuration.collapseTags?configuration.collapseTags:false">
|
|
@@ -15,7 +15,8 @@
|
|
|
:value="item.id"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- <el-button icon="el-icon-edit" size="small" @click="dialogVisible = true" :disabled="disabled?disabled:false" style="width: 20%"></el-button>
|
|
|
+ <el-button slot="append" icon="el-icon-edit" size="mini" @click="dialogVisible = true"
|
|
|
+ :disabled="disabled?disabled:false"></el-button>
|
|
|
<el-dialog
|
|
|
title="导入客户"
|
|
|
:visible.sync="dialogVisible"
|
|
@@ -55,7 +56,8 @@
|
|
|
</el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="confirmSelection" :disabled="configuration.multipleChoices === true?false:selection.length === 1?false:true">确 定</el-button>
|
|
|
+ <el-button type="primary" @click="confirmSelection"
|
|
|
+ :disabled="configuration.multipleChoices === true?false:selection.length === 1?false:true">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</span>
|
|
@@ -67,25 +69,25 @@ import {customerList, typeSave, deleteDetails, getDeptLazyTree} from "@/api/basi
|
|
|
|
|
|
export default {
|
|
|
name: "customerInformation",
|
|
|
- props:{
|
|
|
- disabled:Boolean,
|
|
|
- value:String,
|
|
|
- configuration:Object,
|
|
|
+ props: {
|
|
|
+ disabled: Boolean,
|
|
|
+ value: String,
|
|
|
+ configuration: Object,
|
|
|
},
|
|
|
- model:{
|
|
|
- prop:'value',
|
|
|
- event:'returnBack'
|
|
|
+ model: {
|
|
|
+ prop: 'value',
|
|
|
+ event: 'returnBack'
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
form: {},
|
|
|
- dicData:[],
|
|
|
+ dicData: [],
|
|
|
dialogVisible: false,
|
|
|
- value:'',
|
|
|
+ value: '',
|
|
|
option: option,
|
|
|
parentId: 0,
|
|
|
dataList: [],
|
|
|
- selection:[],
|
|
|
+ selection: [],
|
|
|
treeOption: {
|
|
|
nodeKey: 'id',
|
|
|
lazy: true,
|
|
@@ -118,11 +120,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.option.searchShow = this.configuration.searchShow?this.configuration.searchShow:false
|
|
|
+ this.option.searchShow = this.configuration.searchShow ? this.configuration.searchShow : false
|
|
|
},
|
|
|
methods: {
|
|
|
//刷新触发
|
|
|
- refreshChange(){
|
|
|
+ refreshChange() {
|
|
|
this.page = {
|
|
|
pageSize: 10,
|
|
|
pagerCount: 5,
|
|
@@ -130,25 +132,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
//确认导出触发
|
|
|
- confirmSelection(){
|
|
|
- if (this.configuration.multipleChoices === true){
|
|
|
+ confirmSelection() {
|
|
|
+ if (this.configuration.multipleChoices === true) {
|
|
|
let value = []
|
|
|
- for (let item in this.selection){
|
|
|
- this.dicData.push({id:this.selection[item].id,cname:this.selection[item].cname})
|
|
|
+ for (let item in this.selection) {
|
|
|
+ this.dicData.push({id: this.selection[item].id, cname: this.selection[item].cname})
|
|
|
value.push(this.selection[item].id)
|
|
|
}
|
|
|
this.value = value
|
|
|
- }else {
|
|
|
- this.dicData.push({id:this.selection[0].id,cname:this.selection[0].cname})
|
|
|
+ } else {
|
|
|
+ this.dicData.push({id: this.selection[0].id, cname: this.selection[0].cname})
|
|
|
this.value = this.selection[0].id
|
|
|
}
|
|
|
this.selection = []
|
|
|
- this.$emit('returnBack',this.value)
|
|
|
+ this.$emit('returnBack', this.value)
|
|
|
this.dialogVisible = false
|
|
|
- this.$emit('receiveList',this.dicData)
|
|
|
},
|
|
|
//选中触发
|
|
|
- selectionChange(selection){
|
|
|
+ selectionChange(selection) {
|
|
|
this.selection = selection
|
|
|
},
|
|
|
nodeClick(data) {
|