You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
11 KiB
2 lines
11 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e9b65"],{"8f67":function(e,t,l){"use strict";l.r(t);var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"main-content"},[e._m(0),t("div",{staticClass:"content"},[t("div",{staticClass:"content-btn"},[t("el-button",{staticClass:"init-button",attrs:{icon:"el-icon-plus"},on:{click:function(t){return e.add()}}},[e._v("新增车辆")])],1),t("VueTable",{ref:"table",attrs:{config:e.config},on:{tableCheck:e.tableCheck}},[t("template",{slot:"footer"},[t("div",{staticClass:"table-footer"},[t("button",{on:{click:function(t){return e.revises(e.table_row)}}},[e._v("修改")]),t("button",{on:{click:function(t){return e.del(e.table_row)}}},[e._v("删除")])])])],2)],1),t("Drawer",{attrs:{drawerTitle:e.drawerTitle,drawerVrisible:e.drawer_vrisible},on:{drawerClose:e.drawerClose}},[t("div",{staticStyle:{padding:"30px"}},[t("FromCard",[t("template",{slot:"title"},[e._v("基本信息")]),[t("VueForm",{ref:"childFrom",attrs:{formObj:e.addEidtForm},on:{ruleSuccess:e.addRuleSuccess},scopedSlots:e._u([{key:"hours",fn:function(){return[t("el-select",{staticStyle:{width:"30%","margin-right":"16px"},attrs:{filterable:"",placeholder:"幢"},model:{value:e.buildValue,callback:function(t){e.buildValue=t},expression:"buildValue"}},e._l(e.buildOptions,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),t("el-select",{staticStyle:{width:"30%","margin-right":"16px"},attrs:{filterable:"",placeholder:"单元"},model:{value:e.unitValue,callback:function(t){e.unitValue=t},expression:"unitValue"}},e._l(e.unitOptions,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1),t("el-select",{staticStyle:{width:"30%"},attrs:{filterable:"",placeholder:"房间号"},model:{value:e.buildingUnitEstateId,callback:function(t){e.buildingUnitEstateId=t},expression:"buildingUnitEstateId"}},e._l(e.hoursOptions,(function(e){return t("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)]},proxy:!0},{key:"cpmParkingSpaceList",fn:function(){return[t("el-select",{staticStyle:{width:"240px"},attrs:{"remote-method":e.remoteMethod,loading:e.loading,remote:"",filterable:"",placeholder:"请选择"},on:{change:e.change,focus:e.sefocus},model:{value:e.addEidtForm.ruleForm.parkingSpaceId,callback:function(t){e.$set(e.addEidtForm.ruleForm,"parkingSpaceId",t)},expression:"addEidtForm.ruleForm.parkingSpaceId"}},e._l(e.parkOptions,(function(e){return t("el-option",{key:e.id,attrs:{label:e.code,value:e.id}})})),1)]},proxy:!0}])})]],2)],1),t("div",{attrs:{slot:"footer"},slot:"footer"},[t("button",{staticClass:"btn-orange",on:{click:function(t){return e.onSubmit()}}},[t("span",[t("i",{staticClass:"el-icon-circle-check"}),e._v("提交")])]),t("button",{staticClass:"btn-gray",on:{click:e.drawerClose}},[t("span",[e._v("取消")])])])])],1)},a=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"main-titel"},[t("span",[e._v("车辆档案")])])}],i=l("2b74"),o={data(){return{buildValue:null,buildOptions:[],unitValue:null,unitOptions:[],hoursOptions:[],parkOptions:[],loading:!1,userName:"",drawerTitle:"",drawer_vrisible:!1,table_row:[],addEidtForm:{ruleForm:{id:null,code:null,parkingSpaceId:null,owner:null,tel:null,idType:null,idNumber:null,status:null,cpmParkingSpaceList:null,type:null,brand:null,model:null,color:null,hours:null},form_item:[{type:"Input",label:"车牌号",placeholder:"请输入车牌号",width:"50%",prop:"code"},{type:"Slot",label:"车位号",placeholder:"请输入车位号",width:"50%",prop:"parkingSpaceId",slotName:"cpmParkingSpaceList"},{type:"Input",label:"所属人",placeholder:"请输入",width:"50%",prop:"owner"},{type:"Input",label:"手机号",placeholder:"请输入",width:"50%",prop:"tel"},{type:"Select",label:"证件类型",placeholder:"请输入",options:[{value:1,label:"身份证"},{value:2,label:"营业执照"}],width:"50%",prop:"idType"},{type:"Input",label:"证件号码\t",placeholder:"请输入",width:"50%",prop:"idNumber"},{type:"Select",label:"状态",placeholder:"请输入",options:[],options:[{value:1,label:"产权车位"},{value:2,label:"包年"},{value:3,label:"包月"},{value:4,label:"临时"}],width:"50%",prop:"status"},{type:"Slot",label:"房屋信息",placeholder:"请输入",width:"70%",slotName:"hours",prop:"hours"},{type:"Select",label:"车辆类型",placeholder:"请输入",options:[{label:"私家车",value:1},{label:"货车",value:2},{label:"大巴",value:3},{label:"牵引汽车",value:4},{label:"其他",value:5}],width:"50%",prop:"type"},{type:"Input",label:"车辆品牌",placeholder:"请输入",width:"50%",prop:"brand"},{type:"Input",label:"车辆型号",placeholder:"请输入",width:"50%",prop:"model"},{type:"Select",label:"车辆颜色",placeholder:"请输入",options:[{label:"红",value:1},{label:"橙",value:2},{label:"黄",value:3},{label:"绿",value:4},{label:"青",value:5},{label:"蓝",value:6},{label:"紫",value:7},{label:"黑",value:8},{label:"白",value:9},{label:"灰",value:10},{label:"金",value:11},{label:"磨砂",value:12},{label:"其他",value:13}],width:"50%",prop:"color"}],rules:{code:[{required:!0,message:"请输入车牌号",trigger:"blur"}],parkingSpaceId:[{required:!0,message:"请输入车位号",trigger:"blur"}],owner:[{required:!0,message:"请输入所属人",trigger:"blur"}],tel:[{required:!0,message:"请输入手机号",trigger:"blur"}],idType:[{required:!0,message:"请选择证件类型",trigger:"blur"}],idNumber:[{required:!0,message:"请输入证件号",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"blur"}],hours:[{required:!0,message:"请填写房屋信息",trigger:"blur"}]}},config:{search_item:[{type:"Input",label:"所属手机号",placeholder:"请输入所属手机号",prop:"tel"},{type:"Input",label:"车牌号",placeholder:"请输入车牌号",prop:"code"},{type:"Input",label:"车位号",placeholder:"请输入车位号",prop:"parkingSpaceCode"}],thead:[{label:"序号",type:"index",width:"80"},{label:"车牌号",prop:"code",width:"auto"},{label:"姓名",prop:"owner",width:"auto"},{label:"手机号",prop:"tel",width:"auto"},{label:"状态",prop:"status",width:"auto",type:"function",callback(e,t){switch(e.status){case 1:return"产权车位";case 2:return"包年";case 3:return"包月";case 4:return"临时"}}},{label:"截止时间",prop:"effectiveTimeEnd",width:"auto"},{label:"车位号",prop:"parkingSpaceCode",width:"auto"},{label:"房屋信息",prop:"roomName",width:"auto"},{label:"证件类型",prop:"idType",width:"auto",type:"function",callback(e,t){switch(e.status){case 1:return"身份证";case 2:return"营业执照"}}},{label:"证件号码",prop:"idNumber",width:"auto"},{label:"车辆类型",prop:"type",width:"auto",type:"function",callback:(e,t)=>{switch(e.type){case 1:return"私家车";case 2:return"货车";case 3:return"大巴";case 4:return"牵引汽车";case 5:return"其他";default:break}}},{label:"车辆品牌",prop:"brand",width:"auto"},{label:"车辆型号",prop:"model",width:"auto"},{label:"车辆颜色",prop:"color",width:"auto",type:"function",callback:(e,t)=>{switch(e.color){case 1:return"红";case 2:return"橙";case 3:return"黄";case 4:return"绿";case 5:return"青";case 6:return"蓝";case 7:return"紫";case 8:return"黑";case 9:return"白";case 10:return"灰";case 11:return"金";case 12:return"磨砂";case 13:return"其他";default:break}}}],url:"vehicleList",data:{pageNum:1,size:10}},options:[],buildingUnitEstateId:null}},mounted(){Object(i["m"])().then(e=>{this.buildOptions=e}),Object(i["z"])().then(e=>{console.log(e);let t=e.map(e=>({label:e.showName,value:e.showValue}));console.log(t),this.addEidtForm.form_item[6].options=t})},computed:{sHours(){return{buildValue:this.buildValue,unitValue:this.unitValue,buildingUnitEstateId:this.buildingUnitEstateId}}},methods:{getUserList(e){let t={pageNum:1,size:20};this.loading=!0,Object(i["r"])(t).then(e=>{console.log(e),this.parkOptions=e.tableList,this.loading=!1})},remoteMethod(e){this.getUserList(e)},sefocus(){this.getUserList()},change(e){console.log(e)},onSubmit(){console.log("-----------------"),console.log("增加车辆"),this.$refs.childFrom.submitForm()},addRuleSuccess(e){let t={id:"",buildingUnitEstateId:this.buildingUnitEstateId,code:this.addEidtForm.ruleForm.code,parkingSpaceId:this.addEidtForm.ruleForm.parkingSpaceId,type:1,owner:this.addEidtForm.ruleForm.owner,tel:this.addEidtForm.ruleForm.tel,idType:this.addEidtForm.ruleForm.idType,idNumber:this.addEidtForm.ruleForm.idNumber,status:this.addEidtForm.ruleForm.status,type:this.addEidtForm.ruleForm.type,brand:this.addEidtForm.ruleForm.brand,model:this.addEidtForm.ruleForm.model,color:this.addEidtForm.ruleForm.color},l=null;if("新增车辆"==this.drawerTitle){if(null==this.buildingUnitEstateId||""==this.buildingUnitEstateId)return void this.$message.error("请选择房产");l=i["R"]}else t.id=this.addEidtForm.ruleForm.id,l=i["S"];l(t).then(e=>{e.status&&(this.$message({message:e.message,type:"success"}),this.drawerClose(),this.$refs.table.loadData())})},drawerClose(){this.drawer_vrisible=!1,this.$refs.childFrom.reset(),this.buildValue=null,this.unitValue=null,this.buildingUnitEstateId=null},revises(e){if(console.log(e[0]),!e.length)return void this.$message.error("请选中需要修改的数据");if(e.length>1)return void this.$message.error("只能单条数据修改");this.drawerTitle="修改车辆",this.drawer_vrisible=!0;let t={id:e[0].id};Object(i["Q"])(t).then(l=>{console.log(t),this.addEidtForm.ruleForm.id=e[0].id,this.addEidtForm.ruleForm.code=l.code,this.addEidtForm.ruleForm.parkingSpaceId=l.parkingSpaceId,this.addEidtForm.ruleForm.owner=l.owner,this.addEidtForm.ruleForm.tel=l.tel,this.addEidtForm.ruleForm.idType=l.idType,this.addEidtForm.ruleForm.idNumber=l.idNumber,this.addEidtForm.ruleForm.status=l.carStatus,this.addEidtForm.ruleForm.type=l.type,this.addEidtForm.ruleForm.brand=l.brand,this.addEidtForm.ruleForm.model=l.model,this.addEidtForm.ruleForm.color=l.color,this.buildValue=l.buildingId,this.unitValue=l.buildingUnitId,this.buildingUnitEstateId=l.buildingUnitEstateId})},add(){this.drawerTitle="新增车辆",this.drawer_vrisible=!0},handleClose(){this.drawer_vrisible=!1},tableCheck(e){console.log(e),this.table_row=e},getData(){this.$refs.table.loadData()},del(e){if(e.length){let e=[];for(let t=0;t<this.table_row.length;t++)e.push(this.table_row[t].id);this.$confirm("是否确认删除?删除不可恢复","删除",{confirmButtonText:"确定",cancelButtonText:"取消",confirmButtonClass:"confirmButton",cancelButtonClass:"cancelButton"}).then(()=>{this.$refs.table.tableDelete(e)}).catch(e=>{})}else this.$message.error("请选中需要删除的数据")},unitData(e){let t={id:e};Object(i["v"])(t).then(e=>{this.unitOptions=e})},hoursData(e){let t={id:e};Object(i["w"])(t).then(e=>{console.log(e),this.hoursOptions=e})}},watch:{buildValue:{handler(e){this.unitData(e)},deep:!0},unitValue:{handler(e){this.hoursData(e)},deep:!0},sHours:{handler(e){e.buildingUnitEstateId?this.addEidtForm.ruleForm.hours=1:this.addEidtForm.ruleForm.hours=0},deep:!0},hoursValue:{handler(e){this.addForm.ruleForm.hours=e,console.log(this.addForm.ruleForm.hours)},deep:!0}}},s=o,d=l("2877"),u=Object(d["a"])(s,r,a,!1,null,"78117f74",null);t["default"]=u.exports}}]);
|
|
//# sourceMappingURL=chunk-2d0e9b65.7244605c.js.map
|