<template>
	<div>
		<el-input placeholder="请选择机构名称" v-model="value" class="input-organizationName" size="small" clearable
			:readonly="true">
			<el-button slot="append" icon="el-icon-more" @click="handleSupplier"></el-button>
		</el-input>
		<!-- 选择机构名称 -->
		<supplier-modal ref="supplierModal" @confirm="confirm" />
	</div>
</template>

<script lang="ts">
	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
	@Component
	export default class Focus extends Vue {
		@Prop()
		propValue : any;
		value : any = '';
		@Watch('propValue')
		propValueChange(v : any) {
			this.value = v;
		}

		handleSupplier() {
			(this.$refs.supplierModal as any).setShow(true);
		}
		// 确定机构名称
		confirm(e : any) {
			this.value = e[0].name;
			this.$emit('onChange', e[0].name)
			
		}
	}
</script>

<style scoped>
	.el-input__inner{
		font-size: 12px !important;
	}
</style>