(window.webpackJsonp=window.webpackJsonp||[]).push([[73],{661:function(e,t,n){"use strict";n.r(t),n(21);var a,r=n(0),s=n.n(r),o=(n(30),n(91),n(142),n(22),n(16),n(8),n(1)),i=n.n(o),c=n(203),l=n.n(c),d=(n(367),n(29),n(331)),u=(n(271),n(272)),f=(n(273),n(274)),p=(n(34),n(275),n(278)),m={components:(a={},l()(a,p.a.name,p.a),l()(a,f.a.name,f.a),l()(a,u.a.name,u.a),l()(a,"InteractDrag",d.a),l()(a,"DCalc",(function(){return n.e(12).then(n.bind(null,945))})),a),props:["field","type","itemIndex","config"],data:function(){return{iconClass:{string:"icon-word",int:"icon-number",float:"icon-decimal",time:"icon-calendar"},dropConfig:{key:this.itemIndex,title:this.field.name,extra:!1},show:!1,is:""}},computed:{menus:function(){return"calc"===this.type?[{key:"calc",label:"编辑计算字段"},{key:"del",label:"删除"}]:[{key:"group",label:"编辑计算字段"},{key:"del",label:"删除"}]}},methods:{select:function(e){var t=this;return i()(s.a.mark((function n(){return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.delegateYield(s.a.mark((function n(){var a,r,o,i,c;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=e.key,n.next="del"===n.t0?3:22;break;case 3:a=!0,o=r=null,i=["criteria","group","value"],c=t.config.render,n.t1=c,n.next="detail"===n.t1?11:"map"===n.t1?13:15;break;case 11:return i=["criteria","value"],n.abrupt("break",15);case 13:return i=["criteria","group","value","location"],n.abrupt("break",15);case 15:if(Reflect.has(t.config.customFields[t.type],t.field.table)&&function(){for(var e=new RegExp("".concat(t.field.table,"((.+))?.").concat(t.field.key)),n=function(n){Reflect.get(t.config.data,i[n]).find((function(t,s){if(a)return r=s,o=i[n],a=!e.test(t.key),e.test(t.key)}))},s=0;s<i.length;s++)n(s)}(),a){n.next=20;break}return n.next=19,t.$confirm("该字段已拖入数值维度栏中，请问是否还需要删除","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showClose:!1,cancelButtonClass:"el-button--small plain",confirmButtonClass:"el-button--small"});case 19:t.$store.dispatch({type:"popItem",config:t.config,target:o,itemIndex:r});case 20:return t.$store.dispatch({type:"popCustom",config:t.config,target:t.type,table:t.field.table,itemIndex:t.itemIndex,delIndex:r}),n.abrupt("break",25);case 22:t.title=e.label,t.is="d-".concat(e.key),t.show=!0;case 25:case"end":return n.stop()}}),n)}))(),"t0",1);case 1:case"end":return n.stop()}}),n)})))()},submit:function(e){var t=this;return i()(s.a.mark((function n(){return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.$store.dispatch({type:"setCustom",config:t.config,table:t.field.table,target:"calc",itemIndex:t.itemIndex,value:Object.assign({},e)});case 2:t.close();case 3:case"end":return n.stop()}}),n)})))()},close:function(){this.show=!1}}},b=n(88),g=Object(b.a)(m,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("interact-drag",{attrs:{"class-name":["drag-field-node"],config:e.dropConfig}},[n("el-row",{staticClass:"node",attrs:{type:"flex",align:"middle"}},[n("svg",{staticClass:"node__svg",attrs:{xmlns:"http://www.w3.org/2000/svg"}},[n("line",{attrs:{x1:"50%",y1:"100%",x2:"100%",y2:"100%",stroke:"#b8b8b8","stroke-width":"1","stroke-dasharray":"3,2"}}),n("line",{attrs:{x1:"50%",y1:"1",x2:"50%",y2:"100%",stroke:"#b8b8b8","stroke-width":"1","stroke-dasharray":"3,2"}})]),n("div",{staticClass:"node__icon"},[n("i",{class:[e.iconClass[e.field.type]]})]),n("div",{staticClass:"node__title"},[e._v(e._s(e.field.name))]),n("el-dropdown",{on:{command:e.select}},[n("i",{staticClass:"node__tool icon-add"}),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.menus,(function(t){return n("el-dropdown-item",{key:t.key,attrs:{command:t}},[e._v(e._s(t.label))])})),1)],1),n("d-calc",{attrs:{visible:e.show,table:e.field.table,rule:e.field,mode:"edit"},on:{submit:e.submit,close:e.close}})],1)],1)}),[],!1,null,"06e182ac",null);t.default=g.exports}}]);