webpackJsonp([31],{"g+yF":function(e,t){},zBaJ:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("mvHQ"),o=a.n(r),s=(a("ftAF"),{created:function(){var e=this;this.$route.query.id&&this.$http.get({url:"/housingTrust/getOne",data:{id:this.$route.query.id}}).then(function(t){t.success&&(e.formData=t.data)})},data:function(){return{saving:!1,formData:{},rules:{}}},methods:{onSave:function(){var e=this;this.$refs.form.validate(function(t){if(!t)return!1;e.submit()})},submit:function(){var e=this,t=JSON.parse(o()(this.formData));this.$http.post({url:this.formData.id?"/housingTrust/update":"/housingTrust/save",data:t}).then(function(t){t.success?(e.$message.success("成功"),e.$router.go(-1)):e.$message.warning("失败")})},onDelete:function(){var e=this;this.$alert("删除将无法恢复，确认要删除么？","警告",{type:"error"}).then(function(){return e.$http.post({url:"/housingTrust/del",data:{id:e.formData.id}})}).then(function(){e.$message.success("删除成功"),e.$router.go(-1)}).catch(function(t){"cancel"===t?e.$message.info("删除取消"):e.$message.error("删除失败")})}}}),l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-form",{ref:"form",staticStyle:{"max-width":"500px"},attrs:{model:e.formData,rules:e.rules,"label-width":"80px","label-position":"right",size:"small"}},[a("el-form-item",{attrs:{prop:"userId",label:"用户ID"}},[a("el-input",{model:{value:e.formData.userId,callback:function(t){e.$set(e.formData,"userId",t)},expression:"formData.userId"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"userName",label:"用户名"}},[a("el-input",{model:{value:e.formData.userName,callback:function(t){e.$set(e.formData,"userName",t)},expression:"formData.userName"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"realName",label:"姓名"}},[a("el-input",{model:{value:e.formData.realName,callback:function(t){e.$set(e.formData,"realName",t)},expression:"formData.realName"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"telephone",label:"联系电话"}},[a("el-input",{model:{value:e.formData.telephone,callback:function(t){e.$set(e.formData,"telephone",t)},expression:"formData.telephone"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"address",label:"地址区域"}},[a("el-input",{model:{value:e.formData.address,callback:function(t){e.$set(e.formData,"address",t)},expression:"formData.address"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"addressDetail",label:"详细地址"}},[a("el-input",{model:{value:e.formData.addressDetail,callback:function(t){e.$set(e.formData,"addressDetail",t)},expression:"formData.addressDetail"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"remark",label:"备注"}},[a("el-input",{model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{loading:e.$store.state.fetchingData,type:"primary"},on:{click:e.onSave}},[e._v("保存")]),e._v(" "),e.formData.id?a("el-button",{attrs:{type:"danger"},on:{click:e.onDelete}},[e._v("删除")]):e._e(),e._v(" "),a("el-button",{on:{click:function(t){e.$router.go(-1)}}},[e._v("取消")])],1)],1)],1)},staticRenderFns:[]};var n=a("VU/8")(s,l,!1,function(e){a("g+yF")},"data-v-70b880d2",null);t.default=n.exports}});
//# sourceMappingURL=31.c9279ce17bd20a8aef5e.js.map