(window.webpackJsonp=window.webpackJsonp||[]).push([[115],{530:function(e,t,a){},874:function(e,t,a){"use strict";var s=a(530);a.n(s).a},969:function(e,t,a){"use strict";a.r(t);var s,i,n=a(0),r=a.n(n),l=(a(91),a(12)),o=a.n(l),c=(a(43),a(8),a(1)),u=a.n(c),p=a(203),m=a.n(p),f=(a(224),a(29),a(223)),d=(a(212),a(211)),b=(a(209),a(210)),h=(a(34),a(216),a(217)),v={props:["show","alias","commit","config","target","field-key"],components:(s={},m()(s,h.a.name,h.a),m()(s,b.a.name,b.a),m()(s,d.a.name,d.a),m()(s,f.a.name,f.a),s),data:function(){return{name:"",text:"",visible:!1,autosize:{minRows:3,maxRows:3},origin:"来源：加载中..."}},mounted:function(){var e=this;return u()(r.a.mark((function t(){var a,s,i,n,l,c,u,p,m;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.fieldKey.split(">"),s=1<i.length?(n=i.pop(),a=n.split("(")[0],n.split(").").pop()):(l=e.fieldKey.split("."),c=o()(l,2),a=c[0],c[1]),t.next=4,e.$store.dispatch({type:"getTable",id:a});case 4:return u=t.sent,t.next=7,e.$store.dispatch({type:"getTableField",id:a});case 7:p=t.sent,m=p.find((function(e){return e.key===s})),e.origin="来源：".concat(u.tableName," - ").concat(m.name);case 10:case"end":return t.stop()}}),t)})))()},methods:{submit:function(){var e=this;return u()(r.a.mark((function t(){var a,s,i,n,l;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("criteria"===e.target){t.next=19;break}if(e.name===e.alias){t.next=19;break}a=e.config.data,s=a.group,i=a.value,n=0;case 4:if(!(n<s.length)){t.next=11;break}if(e.name===s[n].alias)return e.$message({type:"error",message:"字段名重复，请修改字段名称"}),t.abrupt("return");t.next=8;break;case 8:n++,t.next=4;break;case 11:l=0;case 12:if(!(l<i.length)){t.next=19;break}if(e.name===i[l].alias)return e.$message({type:"error",message:"字段名重复，请修改字段名称"}),t.abrupt("return");t.next=16;break;case 16:l++,t.next=12;break;case 19:e.$emit("setItem",[{target:"alias",value:e.name},{target:"commit",value:{show:e.visible,value:e.text}}]),e.close();case 21:case"end":return t.stop()}}),t)})))()},close:function(){this.$emit("close")}},watch:{show:{handler:(i=u()(r.a.mark((function e(t,a){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.name="",this.text="",this.visible=!1,t&&(this.name=this.alias,this.commit&&(this.text=this.commit.value,this.visible=this.commit.show));case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)}),immediate:!0}}},x=(a(874),a(88)),w=Object(x.a)(v,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"设置字段显示名称",visible:e.show,width:"420px","append-to-body":""},on:{close:e.close}},[a("div",{staticClass:"rename"},[a("el-row",{staticClass:"title",attrs:{type:"flex",justify:"space-between",align:"middle"}},[a("span",[e._v("显示名称")])]),a("el-row",{staticClass:"input",attrs:{type:"flex",align:"middle"}},[a("el-input",{attrs:{placeholder:"重命名"},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}})],1),a("el-row",{staticClass:"tip",attrs:{type:"flex",align:"middle"}},[a("span",[e._v(e._s(e.origin))])]),a("el-row",{staticClass:"title",attrs:{type:"flex",justify:"space-between",align:"middle"}},[a("span",[e._v("字段描述")]),a("el-checkbox",{model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[e._v("在表格中显示")])],1),a("el-row",[a("el-input",{attrs:{type:"textarea",clearable:"",resize:"none",rows:"3",autosize:e.autosize},model:{value:e.text,callback:function(t){e.text=t},expression:"text"}})],1)],1),a("template",{slot:"footer"},[a("el-button",{attrs:{size:"small",plain:""},on:{click:e.close}},[e._v("取消")]),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.submit}},[e._v("确定")])],1)],2)}),[],!1,null,"2ab01417",null);t.default=w.exports}}]);