|
@@ -62,7 +62,7 @@ export default {
|
|
// 参照内外映射
|
|
// 参照内外映射
|
|
dataMapping: Object,
|
|
dataMapping: Object,
|
|
},
|
|
},
|
|
- emits: ['hide'],
|
|
|
|
|
|
+ emits: ["hide"],
|
|
components: {
|
|
components: {
|
|
TableDialog: () => import("./components/index.vue"),
|
|
TableDialog: () => import("./components/index.vue"),
|
|
},
|
|
},
|
|
@@ -100,7 +100,7 @@ export default {
|
|
handleAdd(prop) {
|
|
handleAdd(prop) {
|
|
this.data = prop;
|
|
this.data = prop;
|
|
this.handleUpdate(this.data);
|
|
this.handleUpdate(this.data);
|
|
- this.$emit('hide', prop)
|
|
|
|
|
|
+ this.$emit("hide", prop);
|
|
},
|
|
},
|
|
// 删除操作
|
|
// 删除操作
|
|
handleDelete(prop) {
|
|
handleDelete(prop) {
|
|
@@ -129,7 +129,7 @@ export default {
|
|
this.$emit("update:source", source);
|
|
this.$emit("update:source", source);
|
|
}
|
|
}
|
|
//
|
|
//
|
|
- this.$emit("change", prop);
|
|
|
|
|
|
+ this.$emit("change", prop, source);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -138,45 +138,77 @@ export default {
|
|
this.width = clientWidth;
|
|
this.width = clientWidth;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- mounted() { },
|
|
|
|
- destroyed() { },
|
|
|
|
|
|
+ mounted() {},
|
|
|
|
+ destroyed() {},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<template>
|
|
<template>
|
|
<div ref="PopoverSelect" style="position: relative">
|
|
<div ref="PopoverSelect" style="position: relative">
|
|
- <el-input v-model="showValue" :size="size" :disabled="disabled" :clearable="clearable" :placeholder="placeholder"
|
|
|
|
- readonly style="width: 100%; cursor: pointer" @click.native.stop="handleAsyncOpenDialog">
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="showValue"
|
|
|
|
+ :size="size"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ :clearable="clearable"
|
|
|
|
+ :placeholder="placeholder"
|
|
|
|
+ readonly
|
|
|
|
+ style="width: 100%; cursor: pointer"
|
|
|
|
+ @click.native.stop="handleAsyncOpenDialog"
|
|
|
|
+ >
|
|
<template #suffix>
|
|
<template #suffix>
|
|
<el-icon class="el-icon-more"></el-icon>
|
|
<el-icon class="el-icon-more"></el-icon>
|
|
</template>
|
|
</template>
|
|
</el-input>
|
|
</el-input>
|
|
- <div v-if="multiple && data.length" style="
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-if="multiple && data.length"
|
|
|
|
+ style="
|
|
position: absolute;
|
|
position: absolute;
|
|
left: 10px;
|
|
left: 10px;
|
|
top: 50%;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
transform: translateY(-50%);
|
|
padding-right: 30px;
|
|
padding-right: 30px;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
- ">
|
|
|
|
|
|
+ "
|
|
|
|
+ >
|
|
<div style="width: 150px; display: flex">
|
|
<div style="width: 150px; display: flex">
|
|
- <el-popover :offset="-10" :width="width" :visible-arrow="false" title="" content="" trigger="click"
|
|
|
|
- placement="bottom-start">
|
|
|
|
|
|
+ <el-popover
|
|
|
|
+ :offset="-10"
|
|
|
|
+ :width="width"
|
|
|
|
+ :visible-arrow="false"
|
|
|
|
+ title=""
|
|
|
|
+ content=""
|
|
|
|
+ trigger="click"
|
|
|
|
+ placement="bottom-start"
|
|
|
|
+ >
|
|
<el-tag slot="reference" :size="size" style="margin-right: 10px">
|
|
<el-tag slot="reference" :size="size" style="margin-right: 10px">
|
|
+ {{ data.length }}
|
|
+ {{ data.length }}
|
|
</el-tag>
|
|
</el-tag>
|
|
- <el-tag v-for="(item, index) in data" :size="size" hit closable style="
|
|
|
|
|
|
+ <el-tag
|
|
|
|
+ v-for="(item, index) in data"
|
|
|
|
+ :size="size"
|
|
|
|
+ hit
|
|
|
|
+ closable
|
|
|
|
+ style="
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
align-items: center;
|
|
margin: 0 0 5px 0;
|
|
margin: 0 0 5px 0;
|
|
- " @close="handleDelete(index)">
|
|
|
|
|
|
+ "
|
|
|
|
+ @close="handleDelete(index)"
|
|
|
|
+ >
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
</el-tag>
|
|
</el-tag>
|
|
</el-popover>
|
|
</el-popover>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <table-dialog v-model="data" ref="TableDialogFef" :type="type" :title="title" :multiple="multiple"
|
|
|
|
- :queryParams="queryParams" @confirm="handleAdd"></table-dialog>
|
|
|
|
|
|
+ <table-dialog
|
|
|
|
+ v-model="data"
|
|
|
|
+ ref="TableDialogFef"
|
|
|
|
+ :type="type"
|
|
|
|
+ :title="title"
|
|
|
|
+ :multiple="multiple"
|
|
|
|
+ :queryParams="queryParams"
|
|
|
|
+ @confirm="handleAdd"
|
|
|
|
+ ></table-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<style scoped></style>
|
|
<style scoped></style>
|