System.register(["./vendor-legacy-2701520b.js","./index-legacy-2b663974.js"],(function(e,l){"use strict";var t,r,i;return{setters:[function(e){t=e.r,r=e.i},function(e){i=e.n}],execute:function(){e("c",i({__name:"customFieldDialog",emits:["saveCustomField"],setup:function(e,l){var i=l.expose,o=l.emit,a=t(!1),n=t(),u=r({name:"",key:"custom",type:"",dropdown_value:"",length_limit:10,is_required:!1}),s=r({name:[{required:!0,message:"请输入字段名称",trigger:"blur"}],type:[{required:!0,message:"请选字段类型",trigger:"change"}],dropdown_value:[{required:!0,message:"请输入字段值",trigger:"blur"}],length_limit:[{required:!0,message:"请输入最大字数",trigger:"blur"}]}),c=t([{name:"单行文本",value:"input"},{name:"多行文本",value:"text"},{name:"数字",value:"number"},{name:"下拉框",value:"select"},{name:"日期",value:"date"},{name:"日期区间",value:"dateRange"}]);function m(){p(),a.value=!0}function p(){u.name="",u.type="",u.dropdown_value=""}return i({init:m}),{__sfc:!0,transferDialogVisible:a,emits:o,clueFormRef:n,clueForm:u,clueRules:s,optionList:c,init:m,resetForm:p,saveField:function(){n.value.validate((function(e){if(!e)return!1;o("saveCustomField",u),a.value=!1}))}}}},(function(){var e=this,l=e._self._c,t=e._self._setupProxy;return l("el-dialog",{attrs:{"append-to-body":!0,title:"自定义字段","close-on-click-modal":!1,visible:t.transferDialogVisible,width:"500px"},on:{"update:visible":function(e){t.transferDialogVisible=e}}},[l("div",{staticStyle:{padding:"5px 25px 5px 0"}},[l("el-form",{ref:"clueFormRef",attrs:{model:t.clueForm,rules:t.clueRules,"label-width":"90px"}},[l("el-form-item",{attrs:{label:"字段名称",prop:"name"}},[l("el-input",{model:{value:t.clueForm.name,callback:function(l){e.$set(t.clueForm,"name",l)},expression:"clueForm.name"}})],1),l("el-form-item",{attrs:{label:"类型",prop:"type"}},[l("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:t.clueForm.type,callback:function(l){e.$set(t.clueForm,"type",l)},expression:"clueForm.type"}},e._l(t.optionList,(function(e){return l("el-option",{key:e.value,attrs:{label:e.name,value:e.value}})})),1)],1),["input","text"].includes(t.clueForm.type)?l("el-form-item",{attrs:{label:"最大字数",prop:"length_limit"}},[l("el-input",{model:{value:t.clueForm.length_limit,callback:function(l){e.$set(t.clueForm,"length_limit",l)},expression:"clueForm.length_limit"}})],1):e._e(),["select"].includes(t.clueForm.type)?l("el-form-item",{attrs:{label:"下拉选项",prop:"dropdown_value"}},[l("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入下拉的值，并用“、”隔开"},model:{value:t.clueForm.dropdown_value,callback:function(l){e.$set(t.clueForm,"dropdown_value",l)},expression:"clueForm.dropdown_value"}})],1):e._e(),l("el-form-item",{attrs:{label:""}},[l("el-checkbox",{model:{value:t.clueForm.is_required,callback:function(l){e.$set(t.clueForm,"is_required",l)},expression:"clueForm.is_required"}},[e._v("设为必填")])],1)],1)],1),l("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.saveField()}}},[e._v("保 存")]),l("el-button",{on:{click:function(e){t.transferDialogVisible=!1}}},[e._v("取 消")])],1)])}),[],!1,null,"4a66b5ed",null,null).exports)}}}));
