(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21d0a3"],{d034:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("Modal",{attrs:{width:550,"mask-closable":!1,title:"条件设置"},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[i("CheckboxGroup",{model:{value:e.fieldSelect,callback:function(t){e.fieldSelect=t},expression:"fieldSelect"}},e._l(e.fieldlist,(function(t,n){return i("Checkbox",{key:n,attrs:{label:n}},[e._v(e._s(t.f_name))])})),1),i("Divider",[e._v("条件")]),e.fieldSelect.length?e._e():i("div",{staticStyle:{"text-align":"center"}},[e._v("无")]),e._l(e.fieldSelect,(function(t,n){return i("div",{key:t},[i("Form",{ref:"formValidate"+n,refInFor:!0,attrs:{model:e.fieldlist[t],"label-width":100}},[i("FormItem",{attrs:{label:e.fieldlist[t].f_name,prop:"f_if",rules:[{required:!0,type:"array",message:"至少选择一个选项",trigger:"change"}]}},[i("CheckboxGroup",{model:{value:e.fieldlist[t]["f_if"],callback:function(i){e.$set(e.fieldlist[t],"f_if",i)},expression:"fieldlist[item]['f_if']"}},e._l(e.fieldlist[t].f_json.option,(function(e,t){return i("Checkbox",{key:t,attrs:{label:e.name}})})),1)],1)],1)],1)})),i("div",{attrs:{slot:"footer"},slot:"footer"},[i("Button",{attrs:{type:"text",size:"large"},on:{click:function(t){e.show=!1}}},[e._v("关闭")]),i("Button",{attrs:{type:"primary",size:"large",loading:e.loading},on:{click:e.submitForm}},[e._v("确定")])],1)],2)],1)},l=[],r=i("5412"),a=i.n(r);function s(e,t,i,n,l,r,a){try{var s=e[r](a),o=s.value}catch(c){return void i(c)}s.done?t(o):Promise.resolve(o).then(n,l)}function o(e){return function(){var t=this,i=arguments;return new Promise((function(n,l){var r=e.apply(t,i);function a(e){s(r,n,l,a,o,"next",e)}function o(e){s(r,n,l,a,o,"throw",e)}a(void 0)}))}}var c={props:{selectTable:Object,data:Array},data:function(){return{loading:!1,show:!0,fieldSelect:[],fieldlist:[],selectIf:{}}},created:function(){var e=this;if(this.fieldlist=this.JSONs(this.data).filter((function(t){return t.f_if=[],/^(radio|select|checkbox)$/.test(t.f_type)&&e.selectTable.id!==t.id})),this.selectTable.f_if){var t=this.selectTable.f_if,i=t.map((function(e){return e.id}));this.fieldlist.map((function(n,l){var r=i.indexOf(n.id);r>-1&&(e.$set(n,"f_if",t[r].text),e.fieldSelect.push(l))}))}},watch:{show:function(){this.$emit("close")}},methods:{submitForm:function(){var e=o(a.a.mark((function e(){var t,i=this;return a.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.fieldSelect.length>0?(t=this.fieldSelect.map((function(e,t){return i.$refs["formValidate"+t][0].validate()})),Promise.all(t).then(function(){var e=o(a.a.mark((function e(t){var n;return a.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.indexOf(!1)<0&&(n=i.fieldSelect.map((function(e){return{id:i.fieldlist[e].id,text:i.fieldlist[e].f_if}})),i.$emit("update",n),i.$emit("close"));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())):(this.$emit("update",""),this.$emit("close"));case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}},f=c,u=i("9ca4"),d=Object(u["a"])(f,n,l,!1,null,null,null);t["default"]=d.exports}}]);