(("undefined"!==typeof self?self:this)["webpackJsonpvehicle_management_sm"]=("undefined"!==typeof self?self:this)["webpackJsonpvehicle_management_sm"]||[]).push([[10],{"4a77":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{directives:[{name:"dialogDrag",rawName:"v-dialogDrag"}],staticClass:"large-dialog",attrs:{title:"update"===e.operateType?"编辑车辆":"新增车辆",visible:e.dialogVisible,"close-on-click-modal":!1,width:"1200px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("BasicCom",{ref:"basicForm",attrs:{deviceList:e.deviceList},on:{finallySub:e.finallySub}}),a("div",{staticClass:"text-center",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary",size:"small",loading:e.optionLoad},on:{click:e.subData}},[e._v(e._s(e.$t("保存")))]),a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("取消")))])],1)],1)},s=[],n=a("3835"),o=a("c7eb"),r=a("1da1"),c=a("f10f"),l=a("94af"),u=new c["CarApi"],d={name:"add-car",components:{BasicCom:l["a"]},props:{visible:{default:!1,type:Boolean},operateData:{type:Object,default:function(){}},operateType:{type:String,default:""},deviceList:{type:Array,default:function(){return[]}}},computed:{dialogVisible:{get:function(){return this.visible},set:function(e){this.$emit("update:visible",e)}}},data:function(){return{optionLoad:!1}},mounted:function(){var e=this;"update"===this.operateType&&this.$nextTick((function(){e.$refs.basicForm.detailShow(e.operateData)}))},methods:{subData:function(){var e=this;return Object(r["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs.basicForm.submitData();case 1:case"end":return t.stop()}}),t)})))()},finallySub:function(e){var t=this;return Object(r["a"])(Object(o["a"])().mark((function a(){var i,s,r;return Object(o["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(t.optionLoad=!0,"update"===t.operateType&&(e.id=t.operateData.id),"update"!==t.operateType){a.next=8;break}return a.next=5,u.update({body:e});case 5:a.t0=a.sent,a.next=11;break;case 8:return a.next=10,u.insert({body:e});case 10:a.t0=a.sent;case 11:i=a.t0,s=Object(n["a"])(i,2),r=s[0],s[1],t.optionLoad=!1,r||(t.$message.success("提交成功"),t.dialogVisible=!1,t.$emit("success"));case 17:case"end":return a.stop()}}),a)})))()}}},p=d,f=a("2877"),b=Object(f["a"])(p,i,s,!1,null,"7a53987d",null);t["default"]=b.exports}}]);