Sfoglia il codice sorgente

Merge branch 'new_web' of http://39.108.172.131:3000/Shannon_mu/SmartCommunity into new_web

Shannon_mu 3 anni fa
parent
commit
4cfbf86b82

+ 3 - 2
operationSupport/src/config/env.development.js

@@ -12,7 +12,8 @@ module.exports = {
 
   baseUrl: "http://114.135.61.188:18093/sc-operation/", // 项目地址
   baseCeAPI:'http://114.135.61.186:21020',
-  baseApi: "http://192.168.0.121:8082/", // 本地api请求地址
+  // baseApi: "http://192.168.0.121:8082/", // 本地api请求地址
+  baseApi: "http://114.135.61.186:21020/", // 本地api请求地址
   baseMapApi: "http://114.135.61.187:38082", // arcgis API
   baseImgApi: "http://114.135.61.186:21020", // 图片api请求地址
   baseExcelApi: "http://114.135.61.187:38082", // excel请求地址
@@ -27,4 +28,4 @@ module.exports = {
     imageSize: 5, // MB
     excelSize: 10 // MB
   },
-};
+};

+ 43 - 2
operationSupport/src/views/buildingManagement/index.vue

@@ -11,7 +11,11 @@
     <div class="main">
         <div>
             <div class="search">
-                <el-input placeholder="请输入资料代码或名称" class="search-input" v-model.trim="mixins_query.keyWords"></el-input>
+                <el-input v-model="query.buildingName" placeholder="请输入楼栋名称" class="search-input" v-model.trim="mixins_query.keyWords"></el-input>
+                <el-select v-model="query.communityName" placeholder="请选择社区名称">
+                    <el-option label="清空" value=""></el-option>
+                    <el-option v-for="(item,index) in communityList" :label="item.label" :value="item.id"></el-option>
+                </el-select>
                 <el-button type="primary" @click="mixins_search" class="search-btn" icon="el-icon-search">查询
                     <!-- <i class="iconfont">&#xe6fc;</i> -->
                 </el-button>
@@ -82,6 +86,11 @@ export default {
     mixins: [list],
     data() {
         return {
+            communityList:[],//社区名称下拉列表
+            query:{
+                buildingName:'',//楼栋名称
+                communityName:'',//社区名称
+            },
             cols: [
                 {
                     label: '所属社区',
@@ -142,6 +151,20 @@ export default {
         // viewDetail
     },
     methods: {
+        //获取社区名称下拉列表
+        communityNameList(){
+            this.communityList=[];
+            let onOption='';
+            this.$http.get('/assets/community/list', {}).then((res) => {
+                res.data.map(res=>{
+                    onOption={
+                        label:res.communityName,
+                        id:res.id
+                    }
+                    this.communityList.push(onOption)
+                })
+            });
+        },
         addCommand(command) {
             if (command === "add") {
                 // this.showaddDialog=true
@@ -205,14 +228,32 @@ export default {
         },
         selectionChange(val) {
             this.selectRow = val;
+        },
+        mixins_search(){
+            this.communityList()
+        },
+        //获取列表数据
+        communityList(){
+            let submitData={
+                "pageNum": 1,
+                "pageSize": 10
+            }
+            this.$http.post('/sc-community-web/assets/building/page', submitData).then((data) => {
+                this.mixins_list=data.data.list;
+                this.mixins_onQuery=false;
+            }).catch(function () {
+
+            });
         }
     },
     created() {
+        this.communityNameList();
+        this.communityList();
         this.mixins_dataUrl = '/dict/selectPage';
         this.mixins_query = {
             keyWords: ''
         };
-        this.mixins_search();
+        // this.mixins_search();
     }
 };
 </script>

+ 3 - 3
operationSupport/src/views/communityManagement/pageJump/AddOrEdit.vue

@@ -107,10 +107,10 @@ export default {
             ruleForm: {
                 communityName: '',
                 locationList:[],
-                regionId:'',//所在地区
+                regionId:100000,//所在地区
                 companyOrgList:[],
-                companyOrgId:'',//所属公司
-                deptOrgId:'',//所属部门
+                companyOrgId:2,//所属公司
+                deptOrgId:1,//所属部门
                 coveredArea:'',//占地面积
                 buildingArea:'',//建筑面积
                 commercialArea:'',//商业面积

+ 135 - 37
operationSupport/src/views/parkingLotAdministration/garageList.vue

@@ -1,10 +1,10 @@
 <template>
     <div class="main">
         <div class="search">
-            <el-input placeholder="车位号" class="search-input"></el-input>
-            <el-select placeholder="请选择社区">
-                <el-option label="社区一" value="shanghai"></el-option>
-                <el-option label="社区二" value="beijing"></el-option>
+            <el-input v-model="query.garageName" placeholder="车位号" class="search-input"></el-input>
+            <el-select v-model="query.communityName" placeholder="请选择社区名称">
+                <el-option label="清空" value=""></el-option>
+                <el-option v-for="(item,index) in communityList" :label="item.label" :value="item.id"></el-option>
             </el-select>
             <el-button type="primary" @click="mixins_search" class="search-btn" icon="el-icon-search">查询
                 <!-- <i class="iconfont">&#xe6fc;</i> -->
@@ -26,9 +26,9 @@
                     @selection-change="selectionChange"
             >
                 <template slot-scope="scope" slot="opt">
-                    <i @click="addOrEdit('edit', scope.index)" class="iconfont" style="color:#2787F1;margin-right:30px" v-txt-tip data-txt="编辑">&#xe645;</i>
+                    <i @click="addOrEdit('edit', scope)" class="iconfont" style="color:#2787F1;margin-right:30px" v-txt-tip data-txt="编辑">&#xe645;</i>
                     <i @click="deleteOne(scope.row.id)"  class="iconfont" style="color:#FF7272;margin-right:30px;" v-txt-tip data-txt="删除">&#xe63a;</i>
-                    <i @click="partitionManagement" class="iconfont" style="color:#2787F1;" v-txt-tip data-txt="分区管理">&#xe645;</i>
+                    <i @click="partitionManagement(scope)" class="iconfont" style="color:#2787F1;" v-txt-tip data-txt="分区管理">&#xe645;</i>
                 </template>
             </zz-table>
         </div>
@@ -36,10 +36,19 @@
 </template>
 
 <script>
+    import list from '@utils/list.js';
     export default {
+        mixins: [list],
         data() {
             return {
+                parkingNumber:'',
+                communityList:[],//社区名称下拉列表
+                communityId:'',//社区id
                 selectName: 'parkingLot',
+                query:{
+                    communityName:'',//社区名称
+                    garageName:'',//车库名称
+                },
                 cols: [
                     {
                         label: '所属社区',
@@ -49,7 +58,7 @@
                         prop: 'garageName'
                     },{
                         label: '车位数量',
-                        prop: 'parkingLotQuantity'
+                        prop: 'parkingNumber'
                     },{
                         label: '备注',
                         prop: 'remarks'
@@ -59,52 +68,104 @@
                         slot: 'opt'
                     }
                 ],
-                tableData: [{
-                    communityName: '王小虎',
-                    garageName:'深圳车库',
-                    parkingLotQuantity:'2123',
-                    remarks:'还有很多',
-                }, {
-                    communityName: '王小虎',
-                    garageName:'北京车库',
-                    parkingLotQuantity:'1521',
-                    remarks:'还有不少',
-                }]
+                // tableData: []
+                selectRow: [],
             };
         },
+        props:{
+            tableData:{
+                type: Array,
+                default: "",
+            },
+            tableTotal:{
+                type:Number,
+                default: "",
+            },
+        },
         methods: {
-            handleClick(tab, event) {
-                console.log(tab, event);
+            //获取社区名称下拉列表
+            communityNameList(){
+                this.communityList=[];
+                let onOption='';
+                this.$http.get('/assets/community/list', {}).then((res) => {
+                    res.data.map(res=>{
+                        onOption={
+                            label:res.communityName,
+                            id:res.id
+                        }
+                        this.communityList.push(onOption)
+                    })
+                });
+            },
+
+            mixins_search(){
+                console.log(this.query.communityName)
+                this.communityId=this.query.communityName
+                this.garageLotList();
             },
-            addOrEdit(todo, index) {
+
+            //获取列表数据
+            garageLotList(){
+                let submitData={
+                    "communityId":this.communityId,
+                    "garageName":this.query.garageName,
+                    "pageNum": 1,
+                    "pageSize": 10
+                }
+                this.$http.post('/sc-community/assets/garage/page', submitData).then(res=> {
+                    this.tableData=res.data.list;
+                    this.mixins_pageset = {
+                        total:parseInt(res.data.total),
+                        // pageNum: this.mixins_pageset.pageNum,
+                        // pageSize: this.mixins_pageset.pageSize
+                    };
+                    this.mixins_onQuery=false;
+                    // this.mixins_list=data.data.list;
+                    // this.mixins_onQuery=false;
+                }).catch(function () {
+
+                });
+            },
+            addOrEdit(todo, scope) {
+                let self=this;
                 new Promise((resolve) => {
                     let row,
                         title = '编辑车库';
                     if ('add' == todo) {
                         title = '新增车库';
+                        this.addEditPopUps(title,row,todo)
                     } else {
-                        row = this.mixins_list[index] || {};
-                        row = JSON.parse(JSON.stringify(row));
+                        this.$http.get('/sc-community-web/assets/garage/find/'+scope.row.id, {}).then((res) => {
+                            // sessionStorage.setItem('communityInformation',JSON.stringify(data))
+                            row=res.data;
+                            this.addEditPopUps(title,row,todo)
+                        });
                     }
-                    this.$store.dispatch('openModal', {
-                        url: '/parkingLotAdministration/pageJump/garageSaveEdits.vue',
-                        title: title,
-                        width: '850px',
-                        height: '600px',
-                        props: {
-                            data: row,
-                            todo: todo,
-                            callback: this.mixins_search
-                        }
-                    });
+
                 }).then(() => {
                     this.mixins_search();
                 });
             },
+            addEditPopUps(title,row,todo){
+                this.$store.dispatch('openModal', {
+                    url: '/parkingLotAdministration/pageJump/garageSaveEdits.vue',
+                    title: title,
+                    width: '850px',
+                    height: '600px',
+                    props: {
+                        data: row,
+                        todo: todo,
+                        callback: this.mixins_search
+                    }
+                });
+            },
 
             //分区管理
-            partitionManagement(){
-                this.$router.push('/parkingLotAdministration/pageJump/partitionManagement')
+            partitionManagement(scope){
+                sessionStorage.setItem('communityId',scope.row.communityId);
+                sessionStorage.setItem('garageId',scope.row.id);
+                this.$router.push({ name: '/parkingLotAdministration/pageJump/partitionManagement'})
+
             },
             //单个删除
             deleteOne(ids) {
@@ -129,9 +190,46 @@
                         });
                     });
             },
+            deleteRow() {
+                // 获取选中列表的ids
+                let ids = [];
+                if (!this.selectRow.length) {
+                    this.$message.error('您尚未选择要删除的记录,请选择后再操作批量删除');
+                    return;
+                }
+                this.selectRow.forEach((v) => {
+                    ids.push(v.id);
+                });
+                this.$msgBox(`删除`, '删除后将无法恢复,请问是否继续?')
+                    .then((_) => {
+                        this.$http.post('/sc-community-web/assets/garage/delete', ids).then(({ status, data, msg }) => {
+                            if (0 === status) {
+                                this.$message({
+                                    type: 'success',
+                                    message: '删除成功!'
+                                });
+                                this.mixins_search();
+                            }
+                        });
+                    })
+                    .catch(() => {});
+            },
+            selectionChange(val){
+                this.selectRow = val;
+            }
         },
         created() {
-
+            this.communityNameList();
+            this.mixins_onQuery=false;
+        },
+        watch:{
+            tableTotal(item) {
+                this.mixins_pageset = {
+                    total:item,
+                    // pageNum: this.mixins_pageset.pageNum,
+                    // pageSize: this.mixins_pageset.pageSize
+                };
+            }
         }
     };
 </script>

+ 18 - 5
operationSupport/src/views/parkingLotAdministration/index.vue

@@ -2,10 +2,10 @@
     <div class="main">
         <el-tabs v-model="selectName" @tab-click="handleClick">
             <el-tab-pane label="车位管理" name="parkingLot">
-                 <parking-space-list></parking-space-list>
+                 <parking-space-list :tableData="tableData" :tableTotal="tableTotal"></parking-space-list>
             </el-tab-pane>
             <el-tab-pane label="车库管理" name="garage">
-                <garage-list></garage-list>
+                <garage-list :tableData="tableData" :tableTotal="tableTotal"></garage-list>
             </el-tab-pane>
         </el-tabs>
     </div>
@@ -19,6 +19,8 @@
         data() {
             return {
                 selectName: 'parkingLot',
+                tableData:[],
+                tableTotal:'',//表格总条数
             };
         },
         components: {
@@ -40,9 +42,11 @@
                     "pageNum": 1,
                     "pageSize": 10
                 }
-                this.$http.post('/sc-community/assets/garage/parking/page', submitData).then((data) => {
+                this.$http.post('/sc-community/assets/garage/parking/page', submitData).then(res=> {
+                    this.tableData=res.data.list;
                     // this.mixins_list=data.data.list;
                     // this.mixins_onQuery=false;
+                    this.tableTotal=parseInt(res.data.total)
                 }).catch(function () {
 
                 });
@@ -52,7 +56,16 @@
                     "pageNum": 1,
                     "pageSize": 10
                 }
-                this.$http.post('/sc-community/assets/garage/page', submitData).then((data) => {
+                this.$http.post('/sc-community/assets/garage/page', submitData).then(res => {
+                    this.tableData=res.data.list;
+                    // this.mixins_pageset = {
+                    //     total:parseInt(res.data.total),
+                    //     // pageNum: this.mixins_pageset.pageNum,
+                    //     // pageSize: this.mixins_pageset.pageSize
+                    // };
+                    // this.mixins_onQuery=false;
+                    this.tableTotal=parseInt(res.data.total)
+
                     // this.mixins_list=data.data.list;
                     // this.mixins_onQuery=false;
                 }).catch(function () {
@@ -61,7 +74,7 @@
             }
         },
         created() {
-           // this.parkingLotList()
+           this.parkingLotList()
         }
     };
 </script>

+ 76 - 14
operationSupport/src/views/parkingLotAdministration/pageJump/garageSaveEdits.vue

@@ -5,21 +5,21 @@
                 <el-row>
                     <el-col :span="24">
                         <el-form-item label="社区名称" prop="communityName">
-                            <el-input v-model="ruleForm.communityName"></el-input>
+                            <el-select v-model="ruleForm.communityName" placeholder="请选择社区名称" @change="communityChoice">
+                                <el-option label="清空" value=""></el-option>
+                                <el-option v-for="(item,index) in communityList" :label="item.label" :value="item.id"></el-option>
+                            </el-select>
                         </el-form-item>
                         <el-form-item label="车库名称" prop="garageName">
-                            <el-select v-model="ruleForm.garageName" placeholder="请选择车库名称">
-                                <el-option label="北京车库" value="shanghai"></el-option>
-                                <el-option label="上海车库" value="beijing"></el-option>
-                            </el-select>
+                            <el-input v-model="ruleForm.garageName"></el-input>
                         </el-form-item>
                         <el-form-item label="车位数量">
-                            <el-input v-model="ruleForm.parkingLotQuantity"></el-input>
+                            <el-input v-model="ruleForm.parkingNumber"></el-input>
                         </el-form-item>
                         <el-form-item label="备注信息">
-                            <el-input type="textarea" :rows="4" v-model="ruleForm.remark" maxlength="300">
+                            <el-input type="textarea" :rows="4" v-model="ruleForm.remarks" maxlength="300">
                             </el-input>
-                            <span style="position:absolute;bottom:0;right:10px">{{ruleForm.remark.length}}/300</span>
+                            <span style="position:absolute;bottom:0;right:10px">{{ruleForm.remarks.length}}/300</span>
                         </el-form-item>
                     </el-col>
                 </el-row>
@@ -29,13 +29,19 @@
 </template>
 <script>
     export default {
+        props: ["params"],
         data() {
             return {
+                // parkingNumber:'',
+                communityList:[],//社区名称下拉列表
+                // communityName:'',//社区名称
+                // communityId:'',//社区id
                 ruleForm: {
                     communityName: '',//社区名称
+                    communityList:[],//社区名称下拉列表
                     garageName:'',//车库名称
-                    parkingLotQuantity:'',//车位数量
-                    remark:'',//备注
+                    parkingNumber:'',//车位数量
+                    remarks:'',//备注
                 },
                 rules: {
                     communityName: [
@@ -52,10 +58,52 @@
         },
         computed: {},
         methods: {
+            //获取社区名称下拉列表
+            communityNameList(){
+                this.communityList=[];
+                let onOption='';
+                this.$http.get('/assets/community/list', {}).then((res) => {
+                    res.data.map(res=>{
+                        onOption={
+                            label:res.communityName,
+                            id:res.id
+                        }
+                        this.communityList.push(onOption)
+                    })
+                });
+            },
+            communityChoice(e){
+                console.log(e)
+                this.communityId=e;
+                // this.garageNameList();
+            },
             submit() {
+                let formData='';
                 this.$refs['ruleForm'].validate((valid) => {
                     if (valid) {
-                        alert('submit!');
+                        if(this.params.todo=='edit'){
+                            formData={
+                                "communityId": this.communityId,
+                                "garageName": this.ruleForm.garageName,
+                                "id": 0,
+                                "parkingNumber":this.ruleForm.parkingNumber,
+                                "remarks":this.ruleForm.remarks,
+                            }
+                            this.$http.post('/assets/garage/update', formData).then((res) => {
+
+                            });
+                        }else{
+                            formData={
+                                "communityId": this.communityId,
+                                "garageName": this.ruleForm.garageName,
+                                "id": 0,
+                                "parkingNumber":this.ruleForm.parkingNumber,
+                                "remarks":this.ruleForm.remarks,
+                            }
+                            this.$http.post('/assets/garage/add', formData).then((res) => {
+
+                            });
+                        }
                     } else {
                         console.log('error submit!!');
                         return false;
@@ -90,12 +138,26 @@
             },
             addressQueryClick(){
                 this.mapPopUpStatus=true;
-            }
-
+            },
 
+            //展示添加和编辑
+            addEditPresentation(){
+                if(this.params.todo=='edit'){
+                    this.ruleForm.communityName=this.params.data.communityId;
+                    this.ruleForm.garageName=this.params.data.garageName;
+                    this.ruleForm.parkingNumber=this.params.data.parkingNumber;
+                    this.ruleForm.remarks=this.params.data.remarks;
+                }else{
+                    this.ruleForm.communityName='';
+                    this.ruleForm.garageName='';
+                    this.ruleForm.parkingNumber='';
+                    this.ruleForm.remarks='';
+                }
+            },
         },
         created() {
-
+            this.communityNameList();
+            this.addEditPresentation()
         }
     };
 </script>

+ 165 - 24
operationSupport/src/views/parkingLotAdministration/pageJump/parkingLotSaveEdits.vue

@@ -5,43 +5,50 @@
                 <el-row>
                     <el-col :span="12">
                         <el-form-item label="社区名称" prop="communityName">
-                            <el-input v-model="ruleForm.communityName"></el-input>
+<!--                            <el-input v-model="ruleForm.communityName"></el-input>-->
+                            <el-select v-model="ruleForm.communityName" placeholder="请选择社区名称" @change="communityChoice">
+                                <el-option v-for="(item,index) in communityList" :label="item.label" :value="item.id"></el-option>
+                            </el-select>
                         </el-form-item>
                         <el-form-item label="车库区域">
-                            <el-select v-model="ruleForm.garageArea" placeholder="请选择车库区域">
-                                <el-option label="1车库区域" value="shanghai"></el-option>
-                                <el-option label="2车库区域" value="beijing"></el-option>
+                            <el-select v-model="ruleForm.garageArea" placeholder="请选择车库区域" @change="garageAreaChoice">
+                                <el-option v-for="(item,index) in garageAreaList" :label="item.label" :value="item.id"></el-option>
                             </el-select>
                         </el-form-item>
-                        <el-form-item label="前缀名称" prop="prefixName">
+                        <el-form-item label="前缀名称" prop="prefixName" v-if="codingStatus==false">
                             <el-input v-model="ruleForm.prefixName"></el-input>
                         </el-form-item>
-                        <el-form-item label="车位编号">
-                            <el-input v-model="ruleForm.parkingSpaceNumber"></el-input>
+                        <el-form-item label="起始编号" v-if="codingStatus==false">
+                            <el-input v-model="ruleForm.parkingBeginNumber" prop="parkingBeginNumber"></el-input>
+                        </el-form-item>
+                        <el-form-item label="车位编号" v-if="codingStatus==true">
+                            <el-input v-model="ruleForm.parkingNumber" prop="parkingNumber"></el-input>
                         </el-form-item>
                     </el-col>
                     <el-col :span="12">
                         <el-form-item label="车库名称" prop="garageName">
-                            <el-select v-model="ruleForm.garageName" placeholder="请选择车库名称">
-                                <el-option label="北京车库" value="shanghai"></el-option>
-                                <el-option label="上海车库" value="beijing"></el-option>
+                            <el-select v-model="ruleForm.garageName" placeholder="请选择车库名称" @change="garageChoice">
+                                <el-option v-for="(item,index) in garageList" :label="item.label" :value="item.id"></el-option>
                             </el-select>
                         </el-form-item>
-                        <el-form-item label="车位类别" prop="parkingLotCategory">
-                            <el-radio v-model="radio" label="1">公共车位</el-radio>
-                            <el-radio v-model="radio" label="2">私人车位</el-radio>
+                        <el-form-item label="车位类别" prop="parkingType">
+                            <el-radio v-model="ruleForm.parkingType" label="1">公共车位</el-radio>
+                            <el-radio v-model="ruleForm.parkingType" label="2">私人车位</el-radio>
                         </el-form-item>
                         <el-form-item label="车位面积">
-                            <el-input v-model="ruleForm.useArea"></el-input>
+                            <el-input v-model="ruleForm.parkingArea"></el-input>
+                        </el-form-item>
+                        <el-form-item label="结束编号" prop="parkingEndNumber" v-if="codingStatus==false">
+                            <el-input v-model="ruleForm.parkingEndNumber"></el-input>
                         </el-form-item>
                     </el-col>
                 </el-row>
                 <el-row>
                     <el-col :span="24">
                         <el-form-item label="备注信息">
-                            <el-input type="textarea" :rows="4" v-model="ruleForm.remark" maxlength="300">
+                            <el-input type="textarea" :rows="4" v-model="ruleForm.remarks" maxlength="300">
                             </el-input>
-                            <span style="position:absolute;bottom:0;right:10px">{{ruleForm.remark.length}}/300</span>
+                            <span style="position:absolute;bottom:0;right:10px">{{ruleForm.remarks.length}}/300</span>
                         </el-form-item>
                     </el-col>
                 </el-row>
@@ -51,16 +58,27 @@
 </template>
 <script>
     export default {
+        props: ["params"],
         data() {
             return {
+                communityList:[],//社区名称下拉列表
+                garageList:[],//车库名称下拉列表
+                garageAreaList:[],//车库区域下拉列表
+                codingStatus:false,//编码状态
                 ruleForm: {
                     communityName: '',//社区名称
+                    communityId:'',//社区id
                     garageArea:'',//车位区域
+                    garageAreaId:'',//车库区域id
                     prefixName:'',//前缀名称
-                    parkingSpaceNumber:'',//车位编号
+                    parkingBeginNumber:'',//车位起始编号
+                    parkingEndNumber:'',//车位结束编号
+                    parkingNumber:'',//车位编号
                     garageName:'',//车库名称
-                    parkingLotCategory:'',//车位类别
-                    remark:'',//备注
+                    garageId:'',//车库名称id
+                    parkingType:'1',//车位类别
+                    parkingArea:'',//车位面积
+                    remarks:'',//备注
                 },
                 rules: {
                     communityName: [
@@ -68,8 +86,11 @@
                         // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
                     ],
                     prefixName:[{ required: true, message: '请输入前缀名称', trigger: 'change' }],
-                    garageName:[{ required: true, message: '请输入前缀名称', trigger: 'change' }],
-                    parkingLotCategory:[{ required: true, message: '请输入前缀名称', trigger: 'change' }],
+                    garageName:[{ required: true, message: '请选择车库名称', trigger: 'change' }],
+                    parkingType:[{ required: true, message: '请选择车位类别', trigger: 'change' }],
+                    parkingBeginNumber:[{ required: true, message: '请填写起始编码', trigger: 'change' }],
+                    parkingEndNumber:[{ required: true, message: '请填写结束编码', trigger: 'change' }],
+                    parkingNumber:[{ required: true, message: '请填写车位编号', trigger: 'change' }],
                 },
                 radio: '1',
             }
@@ -79,15 +100,51 @@
         },
         computed: {},
         methods: {
+            //保存
             submit() {
+                let formData='';
                 this.$refs['ruleForm'].validate((valid) => {
                     if (valid) {
-                        alert('submit!');
+                        if(this.params.todo=='edit'){
+                            formData={
+                                "communityId": this.ruleForm.communityId,
+                                "garageAreaId": this.ruleForm.garageAreaId,
+                                "garageId": this.ruleForm.garageId,
+                                "id": this.params.data.id,
+                                "parkingArea": this.ruleForm.parkingArea,
+                                // "parkingBeginNumber": this.ruleForm.parkingBeginNumber,
+                                // "parkingEndNumber": this.ruleForm.parkingEndNumber,
+                                "parkingNumber": this.ruleForm.parkingNumber,
+                                "parkingType": this.ruleForm.parkingType,
+                                // "prefix": this.ruleForm.prefixName,
+                                "remarks": this.ruleForm.remarks
+                            }
+                            this.$http.post('/assets/garage/parking/update', formData).then((res) => {
+
+                            });
+                        }else{
+                            formData={
+                                "communityId": this.ruleForm.communityId,
+                                "garageAreaId": this.ruleForm.garageAreaId,
+                                "garageId": this.ruleForm.garageId,
+                                "id": 0,
+                                "parkingArea": this.ruleForm.parkingArea,
+                                "parkingBeginNumber": this.ruleForm.parkingBeginNumber,
+                                "parkingEndNumber": this.ruleForm.parkingEndNumber,
+                                "parkingType": this.ruleForm.parkingType,
+                                "prefix": this.ruleForm.prefixName,
+                                "remarks": this.ruleForm.remarks
+                            }
+                            this.$http.post('/assets/garage/parking/add', formData).then((res) => {
+
+                            });
+                        }
                     } else {
                         console.log('error submit!!');
                         return false;
                     }
                 });
+
             },
             resetForm(formName) {
                 this.$refs[formName].resetFields();
@@ -117,12 +174,96 @@
             },
             addressQueryClick(){
                 this.mapPopUpStatus=true;
-            }
+            },
+
+            //获取社区名称下拉列表
+            communityNameList(){
+                this.communityList=[];
+                let onOption='';
+                this.$http.get('/assets/community/list', {}).then((res) => {
+                    res.data.map(res=>{
+                        onOption={
+                            label:res.communityName,
+                            id:res.id
+                        }
+                        this.communityList.push(onOption)
+                    })
+                });
+            },
+
+
+            communityChoice(e){
+                console.log(e)
+                this.ruleForm.communityId=e;
+                this.garageNameList();
+            },
 
+            //获取车库名称下拉列表
+            garageNameList(){
+                this.garageList=[];
+                let onOption='';
+                this.$http.post('/assets/garage/list', {communityId:this.ruleForm.communityId}).then((res) => {
+                    res.data.map(res=>{
+                        onOption={
+                            label:res.garageName,
+                            id:res.id
+                        }
+                        this.garageList.push(onOption)
+                    })
+                });
+            },
+
+            garageChoice(e){
+                console.log(e)
+                this.ruleForm.garageId=e;
+                this.garageAreaListQuery()
+            },
 
+            garageAreaListQuery(){
+                this.garageAreaList=[];
+                let onOption='';
+                this.$http.post('/assets/garage/area/list', {communityId:this.ruleForm.garageId}).then((res) => {
+                    res.data.map(res=>{
+                        onOption={
+                            label:res.areaName,
+                            id:res.id
+                        }
+                        this.garageAreaList.push(onOption)
+                    })
+                });
+            },
+
+            garageAreaChoice(e){
+                this.ruleForm.garageAreaId=e;
+            },
+
+
+            //展示添加和编辑
+            addEditPresentation(){
+                if(this.params.todo=='edit'){
+                    this.codingStatus=true;
+                    this.ruleForm.communityName=this.params.data.communityId;
+                    this.ruleForm.parkingBeginNumber=this.params.data.parkingBeginNumber;
+                    this.ruleForm.parkingEndNumber=this.params.data.parkingEndNumber;
+                    this.ruleForm.parkingType=String(this.params.data.parkingType);
+                    this.ruleForm.parkingArea=this.params.data.parkingArea;
+                    this.ruleForm.parkingNumber=this.params.data.parkingNumber;
+                    this.ruleForm.remarks=this.params.data.remarks;
+                }else{
+                    this.codingStatus=true;
+                    this.ruleForm.communityName='';
+                    this.ruleForm.parkingBeginNumber='';
+                    this.ruleForm.parkingEndNumber=this.params.data.parkingEndNumber;
+                    this.ruleForm.parkingType='1';
+                    this.ruleForm.parkingArea='';
+                    this.ruleForm.remarks='';
+                }
+            },
         },
         created() {
-
+            //获取社区名称下拉列表
+            this.communityNameList();
+            this.addEditPresentation()
         }
     };
 </script>

+ 102 - 31
operationSupport/src/views/parkingLotAdministration/pageJump/partitionManagement.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="main">
         <div class="search">
-            <el-input placeholder="分区名称" class="search-input"></el-input>
+            <el-input v-model="areaName" placeholder="分区名称" class="search-input"></el-input>
             <el-button type="primary" @click="mixins_search" class="search-btn" icon="el-icon-search">查询
                 <!-- <i class="iconfont">&#xe6fc;</i> -->
             </el-button>
@@ -22,7 +22,7 @@
                     @selection-change="selectionChange"
             >
                 <template slot-scope="scope" slot="opt">
-                    <i @click="addOrEdit('edit', scope.index)" class="iconfont" style="color:#2787F1;margin-right:30px" v-txt-tip data-txt="编辑">&#xe645;</i>
+                    <i @click="addOrEdit('edit', scope)" class="iconfont" style="color:#2787F1;margin-right:30px" v-txt-tip data-txt="编辑">&#xe645;</i>
                     <i @click="deleteOne(scope.row.id)"  class="iconfont" style="color:#FF7272;margin-right:30px;" v-txt-tip data-txt="删除">&#xe63a;</i>
                 </template>
             </zz-table>
@@ -31,9 +31,14 @@
 </template>
 
 <script>
+    import list from '@utils/list.js';
     export default {
+        mixins: [list],
         data() {
             return {
+                areaName:'',
+                communityId:'',//社区id
+                garageId:'',//车库id
                 selectName: 'parkingLot',
                 cols: [
                    {
@@ -41,10 +46,10 @@
                         prop: 'garageName'
                     },{
                         label: '分区名称',
-                        prop: 'garageName'
+                        prop: 'areaName'
                     },{
                         label: '车位数量',
-                        prop: 'parkingLotQuantity'
+                        prop: 'parkingNumber'
                     },{
                         label: '备注',
                         prop: 'remarks'
@@ -54,53 +59,70 @@
                         slot: 'opt'
                     }
                 ],
-                tableData: [{
-                    communityName: '王小虎',
-                    garageName:'深圳车库',
-                    parkingLotQuantity:'2123',
-                    remarks:'还有很多',
-                }, {
-                    communityName: '王小虎',
-                    garageName:'北京车库',
-                    parkingLotQuantity:'1521',
-                    remarks:'还有不少',
-                }]
+                tableData: [],
+                selectRow: [],
             };
         },
         methods: {
             handleClick(tab, event) {
                 console.log(tab, event);
             },
-            addOrEdit(todo, index) {
+
+            //查询
+            mixins_search(){
+                let submitData={
+                    "areaName":this.areaName,
+                    "garageId":this.garageId,
+                    "pageNum": 1,
+                    "pageSize": 10
+                }
+                this.garageManagementList(submitData)
+            },
+            //新增与编辑弹出框
+            addOrEdit(todo, scope) {
                 new Promise((resolve) => {
                     let row,
                         title = '分区编辑';
                     if ('add' == todo) {
                         title = '分区添加';
+                        row={
+                            communityId:this.communityId,
+                            garageId:this.garageId
+                        }
+                        this.addEditPopUps(title,row,todo)
                     } else {
-                        row = this.mixins_list[index] || {};
-                        row = JSON.parse(JSON.stringify(row));
+                        // row = this.mixins_list[index] || {};
+                        // row = JSON.parse(JSON.stringify(row));
+                        this.$http.get('/sc-community-web/assets/garage/area/find/'+scope.row.id, {}).then(res=> {
+                            row=res.data;
+                            this.addEditPopUps(title,row,todo)
+                        }).catch(function () {
+
+                        });
                     }
-                    this.$store.dispatch('openModal', {
-                        url: '/parkingLotAdministration/pageJump/zoneAddEdit.vue',
-                        title: title,
-                        width: '850px',
-                        height: '600px',
-                        props: {
-                            data: row,
-                            todo: todo,
-                            callback: this.mixins_search
-                        }
-                    });
                 }).then(() => {
 
                 });
             },
+
+            addEditPopUps(title,row,todo){
+                this.$store.dispatch('openModal', {
+                    url: '/parkingLotAdministration/pageJump/zoneAddEdit.vue',
+                    title: title,
+                    width: '850px',
+                    height: '600px',
+                    props: {
+                        data: row,
+                        todo: todo,
+                        callback: this.mixins_search
+                    }
+                });
+            },
             //单个删除
             deleteOne(ids) {
                 this.$msgBox(`刪除字典`, '删除后将无法恢复,请问是否继续?')
                     .then(() => {
-                        this.$http.post('/dict/delete', [ids]).then(({ status, data, msg }) => {
+                        this.$http.post('/sc-community-web/assets/garage/area/delete', [ids]).then(({ status}) => {
                             if (0 === status) {
                                 this.$message({
                                     type: 'success',
@@ -119,9 +141,58 @@
                         });
                     });
             },
+            garageManagementList(submitData){
+                this.$http.post('/sc-community-web/assets/garage/area/page', submitData).then(res => {
+                    if(res.status==0){
+                        this.tableData=res.data.list;
+                        this.mixins_pageset = {
+                            total:parseInt(res.data.total),
+                            // pageNum: this.mixins_pageset.pageNum,
+                            // pageSize: this.mixins_pageset.pageSize
+                        };
+                        this.mixins_onQuery=false;
+                    }
+                }).catch(function () {
+
+                });
+            },
+            deleteRow() {
+                // 获取选中列表的ids
+                let ids = [];
+                if (!this.selectRow.length) {
+                    this.$message.error('您尚未选择要删除的记录,请选择后再操作批量删除');
+                    return;
+                }
+                this.selectRow.forEach((v) => {
+                    ids.push(v.id);
+                });
+                this.$msgBox(`删除`, '删除后将无法恢复,请问是否继续?')
+                    .then((_) => {
+                        this.$http.post('/sc-community-web/assets/garage/area/delete', ids).then(({ status, data, msg }) => {
+                            if (0 === status) {
+                                this.$message({
+                                    type: 'success',
+                                    message: '删除成功!'
+                                });
+                                this.mixins_search();
+                            }
+                        });
+                    })
+                    .catch(() => {});
+            },
+            selectionChange(val){
+                this.selectRow = val;
+            }
         },
         created() {
-
+            this.communityId=parseInt(sessionStorage.getItem('communityId'));
+                this.garageId=parseInt(sessionStorage.getItem('garageId'));
+            let submitData={
+                "garageId":this.garageId,
+                "pageNum": 1,
+                "pageSize": 10
+            }
+            this.garageManagementList(submitData)
         }
     };
 </script>

+ 78 - 19
operationSupport/src/views/parkingLotAdministration/pageJump/zoneAddEdit.vue

@@ -6,44 +6,42 @@
                     <el-col :span="24">
                         <el-form-item label="车库名称" prop="garageName">
                             <el-select v-model="ruleForm.garageName" placeholder="请选择车库名称">
-                                <el-option label="北京车库" value="shanghai"></el-option>
-                                <el-option label="上海车库" value="beijing"></el-option>
+                                <el-option label="清空" value=""></el-option>
+                                <el-option v-for="(item,index) in garageList" :label="item.label" :value="item.id"></el-option>
                             </el-select>
                         </el-form-item>
-                        <el-form-item label="分区名称" prop="partitionName">
-                            <el-input v-model="ruleForm.partitionName"></el-input>
+                        <el-form-item label="分区名称" prop="areaName">
+                            <el-input v-model="ruleForm.areaName"></el-input>
                         </el-form-item>
                         <el-form-item label="车位数量">
-                            <el-input v-model="ruleForm.parkingLotQuantity"></el-input>
+                            <el-input v-model="ruleForm.parkingNumber"></el-input>
                         </el-form-item>
                         <el-form-item label="备注信息">
-                            <el-input type="textarea" :rows="4" v-model="ruleForm.remark" maxlength="300">
+                            <el-input type="textarea" :rows="4" v-model="ruleForm.remarks" maxlength="300">
                             </el-input>
-                            <span style="position:absolute;bottom:0;right:10px">{{ruleForm.remark.length}}/300</span>
+                            <span style="position:absolute;bottom:0;right:10px">{{ruleForm.remarks.length}}/300</span>
                         </el-form-item>
                     </el-col>
                 </el-row>
             </el-form>
         </div>
-        <!--        <div style="text-align: right;">-->
-        <!--            <el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>-->
-        <!--            <el-button>取消</el-button>-->
-        <!--        </div>-->
     </div>
 </template>
 <script>
     export default {
+        props: ["params"],
         data() {
             return {
+                garageList:[],//车库名称下拉列表
                 ruleForm: {
                     garageName:'',//车库名称
-                    partitionName:'',//分区名称
-                    parkingLotQuantity:'',//车位数量
-                    remark:'',//备注
+                    areaName:'',//分区名称
+                    parkingNumber:'',//车位数量
+                    remarks:'',//备注
                 },
                 rules: {
                     garageName:[{ required: true, message: '请输入车库名称', trigger: 'change' }],
-                    partitionName:[{ required: true, message: '请输入分区名称', trigger: 'change' }],
+                    areaName:[{ required: true, message: '请输入分区名称', trigger: 'change' }],
                 },
                 radio: '1',
             }
@@ -53,12 +51,58 @@
         },
         computed: {},
         methods: {
+            //获取车库名称下拉列表
+            garageNameList(){
+                this.garageList=[];
+                let onOption='';
+                this.$http.post('/assets/garage/list', {communityId:''}).then((res) => {
+                    res.data.map(res=>{
+                        onOption={
+                            label:res.garageName,
+                            id:res.id
+                        }
+                        this.garageList.push(onOption)
+                    })
+                });
+            },
             submit() {
                 this.$refs['ruleForm'].validate((valid) => {
                     if (valid) {
-                        alert('submit!');
+                        if(this.params.todo=="edit"){
+                            let submitData={
+                                "areaName": this.ruleForm.areaName,
+                                "communityId": this.params.data.communityId,
+                                "garageId": this.ruleForm.garageName,
+                                "id": this.params.data.id,
+                                "parkingNumber": this.ruleForm.parkingNumber,
+                                "remarks": this.ruleForm.remarks,
+                            }
+                            this.$http.post('/sc-community-web/assets/garage/area/update', submitData).then(res => {
+                                if(res.status==0){
+                                    // this.tableData=res.data.list;
+                                }
+                            }).catch(function () {
+
+                            });
+                        }else{
+                            let submitData={
+                                "areaName": this.ruleForm.areaName,
+                                "communityId": this.params.data.communityId,
+                                "garageId": this.ruleForm.garageName,
+                                "id": 0,
+                                "parkingNumber": this.ruleForm.parkingNumber,
+                                "remarks": this.ruleForm.remarks,
+                            }
+                            this.$http.post('/sc-community-web/assets/garage/area/add', submitData).then(res => {
+                                if(res.status==0){
+                                    // this.tableData=res.data.list;
+                                }
+                            }).catch(function () {
+
+                            });
+                        }
                     } else {
-                        console.log('error submit!!');
+                        this.$message.error('验证失败');
                         return false;
                     }
                 });
@@ -91,12 +135,27 @@
             },
             addressQueryClick(){
                 this.mapPopUpStatus=true;
-            }
+            },
+            //展示添加和编辑
+            addEditPresentation(){
+                if(this.params.todo=='edit'){
+                    this.ruleForm.garageName=this.params.data.garageId;
+                    this.ruleForm.areaName=this.params.data.areaName;
+                    this.ruleForm.parkingNumber=this.params.data.parkingNumber;
+                    this.ruleForm.remarks=this.params.data.remarks;
+                }else{
+                    this.ruleForm.garageName=parseInt(this.params.data.garageId);
+                    this.ruleForm.areaName='';
+                    this.ruleForm.parkingNumber='';
+                    this.ruleForm.remarks='';
+                }
+            },
 
 
         },
         created() {
-
+           this.garageNameList();
+            this.addEditPresentation();
         }
     };
 </script>

+ 155 - 65
operationSupport/src/views/parkingLotAdministration/parkingSpaceList.vue

@@ -2,13 +2,13 @@
     <div class="main">
         <div class="search">
             <el-input placeholder="车位号" class="search-input"></el-input>
-            <el-select placeholder="请选择社区">
-                <el-option label="社区一" value="shanghai"></el-option>
-                <el-option label="社区二" value="beijing"></el-option>
+            <el-select v-model="communityName" placeholder="请选择社区名称" @change="communityChoice">
+                <el-option label="清空" value=""></el-option>
+                <el-option v-for="(item,index) in communityList" :label="item.label" :value="item.id" @change="communityChoice"></el-option>
             </el-select>
-            <el-select placeholder="所属车库">
-                <el-option label="车库一" value="shanghai"></el-option>
-                <el-option label="车库二" value="beijing"></el-option>
+            <el-select v-model="garageName" placeholder="请选择车库名称" @change="garageChoice">
+                <el-option label="清空" value=""></el-option>
+                <el-option v-for="(item,index) in garageList" :label="item.label" :value="item.id"></el-option>
             </el-select>
             <el-button type="primary" @click="mixins_search" class="search-btn" icon="el-icon-search">查询
                 <!-- <i class="iconfont">&#xe6fc;</i> -->
@@ -30,7 +30,7 @@
                     @selection-change="selectionChange"
             >
                 <template slot-scope="scope" slot="opt">
-                    <i @click="addOrEdit('edit', scope.index)" class="iconfont" style="color:#2787F1;margin-right:30px" v-txt-tip data-txt="编辑">&#xe645;</i>
+                    <i @click="addOrEdit('edit', scope)" class="iconfont" style="color:#2787F1;margin-right:30px" v-txt-tip data-txt="编辑">&#xe645;</i>
                     <i @click="deleteOne(scope.row.id)"  class="iconfont" style="color:#FF7272" v-txt-tip data-txt="删除">&#xe63a;</i>
                 </template>
             </zz-table>
@@ -42,9 +42,14 @@
     export default {
         data() {
             return {
+                parkingNumber:'',
+                communityList:[],//社区名称下拉列表
+                communityName:'',//社区名称
+                communityId:'',//社区id
+                garageList:[],//车库名称下拉列表
+                garageName:'',//车库名称
                 selectName: 'parkingLot',
-                cols: [
-                    {
+                cols: [{
                         label: '所属社区',
                         prop: 'communityName'
                     },
@@ -54,23 +59,23 @@
                     },
                     {
                         label: '所在地区',
-                        prop: 'region'
+                        prop: 'garageAreaName'
                     },
                     {
                         label: '车库区域',
-                        prop: 'garageArea'
+                        prop: 'garageAreaName'
                     },
                     {
                         label: '车位号',
-                        prop: 'parkingSpaceNumber'
+                        prop: 'parkingNumber'
                     },
                     {
                         label: '车位类别',
-                        prop: 'parkingSpaceCategory'
+                        prop: 'parkingType'
                     },
                     {
                         label: '车位面积',
-                        prop: 'parkingSpaceArea'
+                        prop: 'parkingArea'
                     },
                     {
                         label: '操作',
@@ -78,75 +83,120 @@
                         slot: 'opt'
                     }
                 ],
-                tableData: [{
-                    communityName: '王小虎',
-                    garageName:'深圳车库',
-                    region:'深圳',
-                    garageArea:'宝安区',
-                    parkingSpaceNumber:'001',
-                    parkingSpaceCategory:'丰田',
-                    parkingSpaceArea:'2.5米'
-                }, {
-                    communityName: '王小虎',
-                    garageName:'北京车库',
-                    region:'北京',
-                    garageArea:'定海区',
-                    parkingSpaceNumber:'002',
-                    parkingSpaceCategory:'红旗',
-                    parkingSpaceArea:'2.5米'
-                }, {
-                    communityName: '王小虎',
-                    garageName:'上海车库',
-                    region:'上海',
-                    garageArea:'闵行区',
-                    parkingSpaceNumber:'003',
-                    parkingSpaceCategory:'大众',
-                    parkingSpaceArea:'2.5米'
-                }, {
-                    communityName: '王小虎',
-                    garageName:'广州车库',
-                    region:'广州',
-                    garageArea:'天河区',
-                    parkingSpaceNumber:'004',
-                    parkingSpaceCategory:'本田',
-                    parkingSpaceArea:'2.5米'
-                }]
+                // tableData: []
+                selectRow: [],
             };
         },
+        props:{
+            tableData:{
+                type: Array,
+                default: "",
+            },
+            tableTotal:{
+                type:Number,
+                default: "",
+            },
+        },
         methods: {
-            handleClick(tab, event) {
-                console.log(tab, event);
+            //获取社区名称下拉列表
+            communityNameList(){
+                this.communityList=[];
+                let onOption='';
+                this.$http.get('/assets/community/list', {}).then((res) => {
+                    res.data.map(res=>{
+                        onOption={
+                            label:res.communityName,
+                            id:res.id
+                        }
+                        this.communityList.push(onOption)
+                    })
+                });
+            },
+            communityChoice(e){
+                console.log(e)
+                this.communityId=e;
+                this.garageNameList();
+            },
+            //获取车库名称下拉列表
+            garageNameList(){
+                this.garageList=[];
+                let onOption='';
+                this.$http.post('/assets/garage/list', {communityId:this.communityId}).then((res) => {
+                    res.data.map(res=>{
+                        onOption={
+                            label:res.garageName,
+                            id:res.id
+                        }
+                        this.garageList.push(onOption)
+                    })
+                });
             },
-            addOrEdit(todo, index) {
+            addOrEdit(todo, scope) {
+                let self=this;
                 new Promise((resolve) => {
                     let row,
                         title = '编辑车位';
                     if ('add' == todo) {
                         title = '新增车位';
+                        this.addEditPopUps(title,row,todo)
                     } else {
-                        row = this.mixins_list[index] || {};
-                        row = JSON.parse(JSON.stringify(row));
+                        this.$http.get('/assets/garage/parking/find/'+scope.row.id, {}).then((res) => {
+                            // sessionStorage.setItem('communityInformation',JSON.stringify(data))
+                            row=res.data;
+                            this.addEditPopUps(title,row,todo)
+                        });
                     }
-                    this.$store.dispatch('openModal', {
-                        url: '/parkingLotAdministration/pageJump/parkingLotSaveEdits.vue',
-                        title: title,
-                        width: '850px',
-                        height: '600px',
-                        props: {
-                            data: row,
-                            todo: todo,
-                            callback: this.mixins_search
-                        }
-                    });
                 }).then(() => {
                     this.mixins_search();
                 });
             },
+            addEditPopUps(title,row,todo){
+                this.$store.dispatch('openModal', {
+                    url: '/parkingLotAdministration/pageJump/parkingLotSaveEdits.vue',
+                    title: title,
+                    width: '850px',
+                    height: '600px',
+                    props: {
+                        data: row,
+                        todo: todo,
+                        callback: this.mixins_search
+                    }
+                });
+            },
+
+            mixins_search(){
+                this.parkingLotList();
+            },
+
+
+            //获取列表数据
+            parkingLotList(){
+                let submitData={
+                    "communityId":this.communityId,
+                    "garageId":this.garageId,
+                    "parkingNumber":this.parkingNumber,
+                    "pageNum": 1,
+                    "pageSize": 10
+                }
+                this.$http.post('/sc-community/assets/garage/parking/page', submitData).then(res=> {
+                    this.tableData=res.data.list;
+                    this.mixins_pageset = {
+                        total:parseInt(res.data.total),
+                        // pageNum: this.mixins_pageset.pageNum,
+                        // pageSize: this.mixins_pageset.pageSize
+                    };
+                    this.mixins_onQuery=false;
+                    // this.mixins_list=data.data.list;
+                    // this.mixins_onQuery=false;
+                }).catch(function () {
+
+                });
+            },
             //单个删除
             deleteOne(ids) {
                 this.$msgBox(`刪除字典`, '删除后将无法恢复,请问是否继续?')
                     .then(() => {
-                        this.$http.post('/dict/delete', [ids]).then(({ status, data, msg }) => {
+                        this.$http.get('/assets/garage/parking/delete', {id:ids}).then(({ status }) => {
                             if (0 === status) {
                                 this.$message({
                                     type: 'success',
@@ -165,9 +215,49 @@
                         });
                     });
             },
+            deleteRow() {
+                // 获取选中列表的ids
+                let ids = [];
+                if (!this.selectRow.length) {
+                    this.$message.error('您尚未选择要删除的记录,请选择后再操作批量删除');
+                    return;
+                }
+                this.selectRow.forEach((v) => {
+                    ids.push(v.id);
+                });
+                this.$msgBox(`删除`, '删除后将无法恢复,请问是否继续?')
+                    .then((_) => {
+                        this.$http.post('/sc-community-web/assets/garage/parking/delete', ids).then(({ status, data, msg }) => {
+                            if (0 === status) {
+                                this.$message({
+                                    type: 'success',
+                                    message: '删除成功!'
+                                });
+                                this.mixins_search();
+                            }
+                        });
+                    })
+                    .catch(() => {});
+            },
+            selectionChange(val){
+                this.selectRow = val;
+            }
         },
-        created() {
+        mounted(){
 
+        },
+        created() {
+           this.communityNameList();
+            this.mixins_onQuery=false;
+        },
+        watch:{
+            tableTotal(item) {
+                this.mixins_pageset = {
+                    total:item,
+                    // pageNum: this.mixins_pageset.pageNum,
+                    // pageSize: this.mixins_pageset.pageSize
+                };
+            }
         }
     };
 </script>