(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1a891981"],{f37b:function(e,t,r){"use strict";r.r(t);var a=(r("d3b7"),r("7db0"),r("159b"),r("ac1f"),r("1276"),{name:"drawer-form",props:{showForm:Boolean,title:String,sizeDrawer:{type:String,default:"70%"},wLabel:{type:String,default:"140px"},originForm:Array,editData:{type:Object,default:void 0},sectionData:{type:Array,default:function(){return[]}}},data:function(){return{formData:{},formRules:{},resetData:{},options:[]}},computed:{isShow:{set:function(e){this.$emit("update:showForm",e)},get:function(){return this.showForm}}},watch:{},filters:{},created:function(){var e={},t=this.originForm.reduce((function(t,r){return e[r.prop]=r.rule,t[r.prop]=r.value,t}),{});this.resetData=t,this.formRules=e},mounted:function(){},methods:{submitForm:function(){var e=this;this.$refs.domForm.validate((function(t){t&&(e.isShow=!1,e.formData.remark=e.formData.remark?e.formData.remark:"",e.$emit("handleSubmit",e.formData))}))},resetForm:function(){this.$refs.domForm&&this.$refs.domForm.resetFields(),this.formData=Object.assign({},this.resetData,this.editData)},nameSelect:function(e){var t=this,r=this.sectionData.find((function(t){return t.userid==e}));this.originForm.forEach((function(e){if("部门"==e.label)t.formData.userDept=r.deptname,t.formData.userDeptID=r.deptIdInfo;else if("用户编号"==e.label){var a=r.userid.split("-");t.formData.userId=a[0],t.formData.userName=r.username}}))}}}),o=(r("fa56"),r("2877")),i=Object(o.a)(a,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"comp"},[r("el-drawer",{attrs:{title:e.title,visible:e.isShow,direction:"rtl",size:e.sizeDrawer},on:{"update:visible":function(t){e.isShow=t},open:e.resetForm}},[r("el-form",{ref:"domForm",attrs:{inline:!0,model:e.formData,rules:e.formRules,"label-width":e.wLabel}},[e._l(e.originForm,(function(t){return r("el-form-item",{key:t.prop,attrs:{label:t.label,prop:t.prop}},[t.slot?e._t("default"):t.slot||t.sele?e._e():r("el-input",{attrs:{disabled:t.forbid,placeholder:t.place?t.place:"请输入"+t.label},model:{value:e.formData[t.prop],callback:function(r){e.$set(e.formData,t.prop,r)},expression:"formData[orgin.prop]"}}),t.sele?r("el-select",{attrs:{placeholder:"请选择",filterable:""},on:{change:function(r){return e.nameSelect(e.formData[t.prop])}},model:{value:e.formData[t.prop],callback:function(r){e.$set(e.formData,t.prop,r)},expression:"formData[orgin.prop]"}},[e._l(e.sectionData,(function(a,o){return 1==t.type||null==t.type?r("el-option",{key:o,attrs:{label:a.username,value:a.userid}}):e._e()})),e._l(t.options,(function(a,o){return 2==t.type?r("el-option",{key:o,attrs:{label:a.label,value:a.value}}):e._e()}))],2):e._e()],2)})),r("div",{staticClass:"comp-form-oper"},[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("保存")]),r("el-button",{attrs:{type:"plain"},on:{click:e.resetForm}},[e._v("重置")])],1)],2)],1)],1)}),[],!1,null,"46a2638c",null);t.default=i.exports},fa4e:function(e,t,r){},fa56:function(e,t,r){"use strict";r("fa4e")}}]);