webpackJsonp([49],{NSIN:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("mvHQ"),o=r.n(a),s=(r("ftAF"),{created:function(){var e=this;this.$route.query.id&&this.$http.get({url:"/contactRecord/getOne",data:{id:this.$route.query.id}}).then(function(t){t.success&&(e.formData=t.data)})},data:function(){return{saving:!1,formData:{showFlag:"Y"},rules:{userId:[{required:!0,message:"请输入用户ID",trigger:"blur"}],houseId:[{required:!0,message:"请输入房源ID",trigger:"blur"}],housekeeper:[{required:!0,message:"请输入管家ID",trigger:"blur"}]}}},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?"/contactRecord/update":"/contactRecord/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:"/contactRecord/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("删除失败")})}}}),n={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-form",{ref:"form",staticStyle:{"max-width":"500px"},attrs:{model:e.formData,rules:e.rules,"label-width":"80px","label-position":"right",size:"small"}},[r("el-form-item",{attrs:{prop:"userId",label:"用户"}},[r("el-input",{model:{value:e.formData.userId,callback:function(t){e.$set(e.formData,"userId",t)},expression:"formData.userId"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"houseId",label:"房源"}},[r("el-input",{model:{value:e.formData.houseId,callback:function(t){e.$set(e.formData,"houseId",t)},expression:"formData.houseId"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"housekeeper",label:"管家"}},[r("el-input",{model:{value:e.formData.housekeeper,callback:function(t){e.$set(e.formData,"housekeeper",t)},expression:"formData.housekeeper"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"showFlag",label:"用户显示"}},[r("el-input",{model:{value:e.formData.showFlag,callback:function(t){e.$set(e.formData,"showFlag",t)},expression:"formData.showFlag"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{loading:e.$store.state.fetchingData,type:"primary"},on:{click:e.onSave}},[e._v("保存")]),e._v(" "),e.formData.id?r("el-button",{attrs:{type:"danger"},on:{click:e.onDelete}},[e._v("删除")]):e._e(),e._v(" "),r("el-button",{on:{click:function(t){e.$router.go(-1)}}},[e._v("取消")])],1)],1)],1)},staticRenderFns:[]};var i=r("VU/8")(s,n,!1,function(e){r("spB5")},"data-v-3bd4c124",null);t.default=i.exports},spB5:function(e,t){}});
//# sourceMappingURL=49.68388b213bfdb25701b2.js.map