(window.webpackJsonp=window.webpackJsonp||[]).push([[122],{569:function(e,t,a){},919:function(e,t,a){"use strict";var s=a(569);a.n(s).a},962:function(e,t,a){"use strict";a.r(t);var s,n=a(0),i=a.n(n),l=(a(8),a(1)),r=a.n(l),c=(a(91),a(203)),o=a.n(c),p=(a(205),a(29),a(206)),u=(a(207),a(208)),m=(a(209),a(210)),d=(a(212),a(211)),f=(a(34),a(216),a(217)),b={props:["visible","field"],components:(s={},o()(s,f.a.name,f.a),o()(s,d.a.name,d.a),o()(s,m.a.name,m.a),o()(s,u.a.name,u.a),o()(s,p.a.name,p.a),s),data:function(){return{name:"",describe:"",type:"",ops:[{key:"int",label:"整数",icon:"icon-number"},{key:"float",label:"小数",icon:"icon-decimal"},{key:"string",label:"字符串",icon:"icon-word"},{key:"time",label:"时间",icon:"icon-calendar"}],autosize:{minRows:3,maxRows:3}}},computed:{prefixFn:function(){var e=this,t=this.ops.find((function(t){return t.key===e.type}));return t?t.icon:"int"}},methods:{submit:function(){var e=this;return r()(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.name){t.next=3;break}return e.$message({type:"warning",message:"字段名称不可为空"}),t.abrupt("return");case 3:return t.prev=3,t.next=6,e.$store.dispatch({type:"setField",id:"".concat(e.field.origin,"/").concat(e.field.key),data:{name:e.name,describe:e.describe,type:e.type}});case 6:e.$message({type:"success",message:"修改成功"}),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),e.$message({type:"error",message:"修改失败"});case 12:e.close();case 13:case"end":return t.stop()}}),t,null,[[3,9]])})))()},close:function(){this.$emit("close")}},watch:{field:{handler:function(e){e&&(this.name=e.name,this.describe=e.describe,this.type=e.type)},immediate:!0,deep:!0}}},y=(a(919),a(88)),w=Object(y.a)(b,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"编辑",visible:e.visible,width:"484px","append-to-body":""},on:{close:e.close}},[a("div",{staticClass:"rename"},[a("el-row",{staticClass:"rename__row",attrs:{type:"flex",justify:"space-between",align:"middle"}},[a("el-col",{attrs:{span:6}},[a("span",[e._v("新字段名")])]),a("el-col",{attrs:{span:18}},[a("el-input",{attrs:{placeholder:"重命名",size:"large"},model:{value:e.name,callback:function(t){e.name=t},expression:"name"}})],1)],1),a("el-row",{staticClass:"rename__row",attrs:{type:"flex",justify:"space-between",align:"middle"}},[a("el-col",{attrs:{span:6}},[a("span",[e._v("原字段名")])]),a("el-col",{attrs:{span:18}},[a("span",[e._v(e._s(e.field?e.field.baseName:""))])])],1),a("el-row",{staticClass:"rename__row",attrs:{type:"flex",justify:"space-between",align:"middle"}},[a("el-col",{attrs:{span:6}},[a("span",[e._v("字段类型")])]),a("el-col",{attrs:{span:18}},[a("el-select",{attrs:{placeholder:"字段描述",size:"large"},model:{value:e.type,callback:function(t){e.type=t},expression:"type"}},[a("i",{staticClass:"el-input__icon",class:[e.prefixFn],attrs:{slot:"prefix"},slot:"prefix"}),e._l(e.ops,(function(t){return a("el-option",{key:t.key,attrs:{label:t.label,value:t.key}},[a("i",{staticClass:"rename__icon",class:t.icon}),a("span",[e._v(e._s(t.label))])])}))],2)],1)],1),a("el-row",{staticClass:"rename__row",attrs:{type:"flex",justify:"space-between",align:"middle"}},[a("el-col",{attrs:{span:6}},[a("span",[e._v("字段描述")])]),a("el-col",{attrs:{span:18}},[a("el-input",{attrs:{placeholder:"字段描述",type:"textarea",resize:"none",autosize:e.autosize,rows:"3"},model:{value:e.describe,callback:function(t){e.describe=t},expression:"describe"}})],1)],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,"3fd6b4fa",null);t.default=w.exports}}]);