(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b306d"],{"272d":function(t,e,o){"use strict";o.r(e);var r=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"app-container"},[t._m(0),o("div",{staticClass:"app-container--bd"},[o("div",{staticClass:"form-section clearfix"},[o("div",{staticClass:"form-section--bd clearfix"},[o("el-form",{ref:"protocolForm",staticClass:"demo-ruleForm mt-20",attrs:{model:t.protocolForm,rules:t.protocolFormRules,"label-width":"130px"}},[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"适用业务"}},[o("p",[t._v(t._s(t.protocolForm.trade_type_name))])]),o("el-form-item",{attrs:{label:"协议名称",prop:"title"}},[o("el-input",{attrs:{placeholder:"请输入协议名称"},model:{value:t.protocolForm.title,callback:function(e){t.$set(t.protocolForm,"title",e)},expression:"protocolForm.title"}})],1)],1),o("el-col",{attrs:{span:16}},[o("el-form-item",{attrs:{label:"协议内容",prop:"protocol"}},[o("tinymce-editor",{attrs:{content:t.protocolForm.protocol},on:{getContent:t.getEditorContent}})],1)],1),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"移动端签署",prop:"mobile_sign"}},[o("el-radio-group",{model:{value:t.protocolForm.mobile_sign,callback:function(e){t.$set(t.protocolForm,"mobile_sign",e)},expression:"protocolForm.mobile_sign"}},[o("el-radio",{attrs:{label:1}},[t._v(" 开启 ")]),o("el-radio",{attrs:{label:0}},[t._v(" 关闭 ")])],1)],1),o("el-form-item",{attrs:{label:"状态",prop:"status"}},[o("el-radio-group",{model:{value:t.protocolForm.status,callback:function(e){t.$set(t.protocolForm,"status",e)},expression:"protocolForm.status"}},[o("el-radio",{attrs:{label:1}},[t._v(" 有效 ")]),o("el-radio",{attrs:{label:0}},[t._v(" 无效 ")])],1)],1),o("el-form-item",[o("el-button",{on:{click:t.goBack}},[t._v(" 取消 ")]),o("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm("protocolForm")}}},[t._v(" 提交 ")])],1)],1)],1)],1)])])])},a=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"app-container--hd pb-20"},[o("h3",[t._v("协议编辑")])])}],n=(o("2397"),o("96cf"),o("1da1")),i=o("d4ec"),c=o("bee2"),l=o("99de"),s=o("7e84"),u=o("262e"),p=o("9ab4"),m=o("60a3"),d=o("1620"),f=o("432e"),b=o("a312");function h(t,e,o){return e=Object(s["a"])(e),Object(l["a"])(t,v()?Reflect.construct(e,o||[],Object(s["a"])(t).constructor):e.apply(t,o))}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}var _=function(t){function e(){var t;return Object(i["a"])(this,e),t=h(this,e,arguments),t.protocolForm={trade_type_id:"",title:"",status:1,protocol:"",stadium_id:"0",mobile_sign:0},t.protocolFormRules={title:[{required:!0,message:"请输入协议名称!",trigger:"change"}],protocol:[{required:!0,message:"请输入协议内容",trigger:"change"}]},t}return Object(u["a"])(e,t),Object(c["a"])(e,[{key:"stadium_id",get:function(){return this.$route.query.stadium_id}},{key:"mounted",value:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.getProtocolInfo();case 2:this.protocolForm.stadium_id=this.stadium_id;case 3:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"getEditorContent",value:function(t){this.protocolForm.protocol=t}},{key:"getProtocolInfo",value:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){var e,o,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e={trade_type_id:this.$route.query.trade_type_id,stadium_id:this.stadium_id},t.next=3,Object(b["l"])(e);case 3:o=t.sent,r=o.data,this.protocolForm=r;case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"editProtocol",value:function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(b["h"])(this.protocolForm);case 2:e=t.sent,e.data,this.$message({message:"编辑协议设置成功！",type:"success"}),this.$router.push({name:"Params",query:{activeName:"protocol"}});case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"submitForm",value:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return console.log("error submit!!"),!1;e.editProtocol()}))}},{key:"goBack",value:function(){this.$router.push({name:"Params",query:{activeName:"protocol"}})}}]),e}(m["i"]);Object(p["a"])([Object(d["a"])(500)],_.prototype,"submitForm",null),_=Object(p["a"])([Object(m["a"])({name:"EditProtocol",components:{TinymceEditor:f["a"]}})],_);var g=_,y=g,F=o("2877"),k=Object(F["a"])(y,r,a,!1,null,null,null);e["default"]=k.exports}}]);