(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f6f30198"],{"93b3":function(t,n,e){"use strict";e.r(n);var o=function(){var t=this,n=t._self._c;return n("a-form-model",{ref:"dynamicValidateForm",attrs:{layout:"inline",model:t.dynamicValidateForm}},[n("a-table",{staticClass:"batch-table",attrs:{pagination:!1,rowKey:function(t){return t.key},columns:t.columns,dataSource:t.dynamicValidateForm.domains,bordered:"",scroll:{x:190*t.listLength+80+(t.record.options.hideSequence?0:60),y:t.record.options.scrollY}},scopedSlots:t._u([t._l(t.record.list,(function(e){return{key:e.key,fn:function(o,i,a){return[n("KFormModelItem",{key:e.key+"1",attrs:{record:e,config:t.config,parentDisabled:t.disabled,index:a,domains:t.dynamicValidateForm.domains,dynamicData:t.dynamicData},on:{input:t.handleInput},model:{value:i[e.model],callback:function(n){t.$set(i,e.model,n)},expression:"record[item.model]"}})]}}})),{key:"dynamic-opr-button",fn:function(e,o){return[t.disabled?t._e():n("a-icon",{staticClass:"dynamic-opr-button",attrs:{title:"复制添加",type:"copy-o"},on:{click:function(n){return t.copyDomain(o)}}}),t.disabled?t._e():n("a-icon",{staticClass:"dynamic-opr-button",attrs:{title:"删除该行",type:"minus-circle-o"},on:{click:function(n){return t.removeDomain(o)}}})]}}],null,!0)}),n("Button",{attrs:{type:"dashed",disabled:t.disabled},on:{click:t.addDomain}},[n("a-icon",{attrs:{type:"plus"}}),t._v("增加 ")],1)],1)},i=[],a=e("5530"),s=e("2909"),r=(e("4de4"),e("d81d"),e("a434"),e("d3b7"),e("159b"),e("b8f0")),d=e("96f9"),c=d["c"].getComponent("aButton").component,l={name:"KBatch",props:["record","value","dynamicData","config","parentDisabled"],components:{KFormModelItem:r["a"],Button:c},watch:{value:{handler:function(t){this.dynamicValidateForm.domains=t||[]},immediate:!0,deep:!0}},data:function(){return{dynamicValidateForm:{domains:[]}}},computed:{listLength:function(){return this.record.list.filter((function(t){return!t.options.hidden})).length},columns:function(){var t=this,n=[];return this.record.options.hideSequence||n.push({title:"序号",dataIndex:"sequence_index_number",width:"60px",align:"center",customRender:function(t,n,e){return e+1}}),n.push.apply(n,Object(s["a"])(this.record.list.filter((function(t){return!t.options.hidden})).map((function(n,e){return{title:n.label,dataIndex:n.key,width:e===t.record.list.length-1?"":"190px",scopedSlots:{customRender:n.key}}})))),n.push({title:"操作",dataIndex:"dynamic-opr-button",fixed:"right",width:"80px",align:"center",scopedSlots:{customRender:"dynamic-opr-button"}}),n},disabled:function(){return this.record.options.disabled||this.parentDisabled}},methods:{validationSubform:function(){var t;return this.$refs.dynamicValidateForm.validate((function(n){t=n})),t},resetForm:function(){this.$refs.dynamicValidateForm.resetFields()},removeDomain:function(t){var n=this.dynamicValidateForm.domains.indexOf(t);-1!==n&&this.dynamicValidateForm.domains.splice(n,1)},copyDomain:function(t){this.dynamicValidateForm.domains.push(Object(a["a"])(Object(a["a"])({},t),{},{key:Date.now()})),this.handleInput()},addDomain:function(){var t={};this.record.list.forEach((function(n){t[n.model]=n.options.defaultValue})),this.dynamicValidateForm.domains.push(Object(a["a"])(Object(a["a"])({},t),{},{key:Date.now()})),this.handleInput()},handleInput:function(){this.$emit("change",this.dynamicValidateForm.domains)}}},m=l,p=e("2877"),u=Object(p["a"])(m,o,i,!1,null,null,null),h=u.exports;n["default"]=h},b8f0:function(t,n,e){"use strict";var o=function(){var t=this,n=t._self._c;return t.record.options.noFormItem?n(t.componentItem,t._b({tag:"component"},"component",t.getComponentProps,!1)):n("a-form-model-item",{attrs:{prop:"domains.".concat(t.record.model),rules:t.record.rules}},[n(t.componentItem,t._b({ref:"inputItem",tag:"component",on:{change:t.handleChange}},"component",t.getComponentProps,!1))],1)},i=[],a=e("5530"),s=e("96f9"),r=e("a6fb"),d=s["c"].getComponents(),c={name:"KFormModelItem",props:["record","domains","index","value","parentDisabled","dynamicData","config"],computed:{getComponentProps:function(){var t=this.record,n=Object(a["a"])(Object(a["a"])({record:t},this.componentOption),{},{config:this.config,disabled:this.disabled||t.options.disabled,parentDisabled:this.disabled||t.options.disabled,allowClear:t.options.clearable,mode:t.options.multiple?"multiple":"",value:this.value||t.options.defaultValue,style:t.options.width&&"width:".concat(t.options.width),height:"undefined"!==typeof t.options.height?t.options.height:"",dynamicData:this.dynamicData,options:t.options.dynamic?this.dynamicData[t.options.dynamicKey]?this.dynamicData[t.options.dynamicKey]:[]:t.options.options});return"textarea"===this.record.type&&(n.autoSize={minRows:t.options.minRows,maxRows:t.options.maxRows}),"alert"===this.record.type&&(n.message=t.label),"number"===this.record.type&&(n.min=t.options.min||0===t.options.min?t.options.min:-1/0,n.max=t.options.max||0===t.options.max?t.options.max:1/0,n.precision=t.options.precision>50||!t.options.precision&&0!==t.options.precision?null:t.options.precision),"select"===this.record.type&&(n.filterOption=!!t.options.showSearch&&function(t,n){return n.componentOptions.children[0].text.toLowerCase().indexOf(t.toLowerCase())>=0}),n},componentItem:function(){return d[this.record.type].component},componentOption:function(){return r.omit(this.record.options,["defaultValue","disabled"])}},methods:{handleChange:function(t){var n=t;t.target&&(n=t.target.value),this.$emit("input",n)}}},l=c,m=e("2877"),p=Object(m["a"])(l,o,i,!1,null,null,null);n["a"]=p.exports}}]);