webpackJsonp([18],{LXMB:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a("mvHQ"),o=a.n(r),s=(a("ftAF"),{created:function(){var t=this;this.$route.query.id&&this.$http.get({url:"/testAaa/getOne",data:{id:this.$route.query.id}}).then(function(e){e.success&&(t.formData=e.data)})},data:function(){return{saving:!1,formData:{},rules:{}}},methods:{onSave:function(){var t=this;this.$refs.form.validate(function(e){if(!e)return!1;t.submit()})},submit:function(){var t=this,e=JSON.parse(o()(this.formData));this.$http.post({url:this.formData.id?"/testAaa/update":"/testAaa/save",data:e}).then(function(e){e.success?(t.$message.success("成功"),t.$router.go(-1)):t.$message.warning("失败")})},onDelete:function(){var t=this;this.$alert("删除将无法恢复，确认要删除么？","警告",{type:"error"}).then(function(){return t.$http.post({url:"/testAaa/del",data:{id:t.formData.id}})}).then(function(){t.$message.success("删除成功"),t.$router.go(-1)}).catch(function(e){"cancel"===e?t.$message.info("删除取消"):t.$message.error("删除失败")})}}}),i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"form",staticStyle:{"max-width":"500px"},attrs:{model:t.formData,rules:t.rules,"label-width":"80px","label-position":"right",size:"small"}},[a("el-form-item",{attrs:{prop:"delFlag",label:"删除标识"}},[a("el-input",{model:{value:t.formData.delFlag,callback:function(e){t.$set(t.formData,"delFlag",e)},expression:"formData.delFlag"}})],1),t._v(" "),a("el-form-item",{attrs:{prop:"testName",label:"名字"}},[a("el-input",{model:{value:t.formData.testName,callback:function(e){t.$set(t.formData,"testName",e)},expression:"formData.testName"}})],1),t._v(" "),a("el-form-item",{attrs:{prop:"remark",label:"备注"}},[a("el-input",{model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,"remark",e)},expression:"formData.remark"}})],1),t._v(" "),a("el-form-item",{attrs:{prop:"imageUrl",label:"image_url"}},[a("el-input",{model:{value:t.formData.imageUrl,callback:function(e){t.$set(t.formData,"imageUrl",e)},expression:"formData.imageUrl"}})],1),t._v(" "),a("el-form-item",{attrs:{prop:"testTime",label:"test_time"}},[a("el-input",{model:{value:t.formData.testTime,callback:function(e){t.$set(t.formData,"testTime",e)},expression:"formData.testTime"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{loading:t.$store.state.fetchingData,type:"primary"},on:{click:t.onSave}},[t._v("保存")]),t._v(" "),t.formData.id?a("el-button",{attrs:{type:"danger"},on:{click:t.onDelete}},[t._v("删除")]):t._e(),t._v(" "),a("el-button",{on:{click:function(e){t.$router.go(-1)}}},[t._v("取消")])],1)],1)],1)},staticRenderFns:[]};var l=a("VU/8")(s,i,!1,function(t){a("yIT1")},"data-v-9dc333f4",null);e.default=l.exports},yIT1:function(t,e){}});
//# sourceMappingURL=18.299d44b1de406982420a.js.map