chunk-c05c0c06.7ce43e8d.js 2.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c05c0c06","chunk-2d0ac361"],{1925:function(t,e,o){"use strict";o.r(e),o.d(e,"searchApi",(function(){return a}));var n=o("b775"),a=function(t){return Object(n["default"])({url:"/user/search",method:"post",data:t})}},"5f17":function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"common-wrapper"},[o("el-select",{attrs:{"collapse-tags":"",placeholder:"请选择",clearable:""},on:{clear:t.setValueNull},nativeOn:{click:function(e){return t.dropDownSearch()}},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}},[o("div",{staticClass:"el-input",staticStyle:{width:"90%","margin-left":"5%"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.dropDownValue,expression:"dropDownValue"}],staticClass:"el-input__inner",attrs:{type:"text",placeholder:"请输入"},domProps:{value:t.dropDownValue},on:{input:function(e){e.target.composing||(t.dropDownValue=e.target.value)}}})]),t._l(t.optionsMetaShow,(function(t,e){return o("el-option",{key:e,attrs:{value:t,label:t.name}})}))],2)],1)},a=[],i=(o("b0c0"),o("1925")),r={data:function(){return{dropDownValue:"",keyword:this.info,optionsMetaShow:[],defaultList:!1}},props:{info:{type:String,default:""},type:{type:String,default:"user"}},watch:{info:function(t){t&&(this.keyword=this.info)},keyword:function(t){t&&t.id&&(this.$emit("select",this.keyword),this.keyword=t.name)},dropDownValue:function(t){this.dropDownSearch(t)}},methods:{setValueNull:function(){this.$emit("select",{id:0,name:""})},dropDownSearch:function(t){var e=this,o=t||this.dropDownValue;o||!this.defaultList?Object(i["searchApi"])({type:this.type,keyword:o}).then((function(t){console.log("searchApi",t),200==t.code&&(e.optionsMetaShow=t.data||[],e.defaultList||(e.defaultList=e.optionsMetaShow))})):this.optionsMetaShow=this.defaultList}}},s=r,l=(o("bdc5"),o("2877")),c=Object(l["a"])(s,n,a,!1,null,null,null);e["default"]=c.exports},bdc5:function(t,e,o){"use strict";var n=o("f324"),a=o.n(n);a.a},f324:function(t,e,o){}}]);