Browse Source

车位管理

Shannon_mu 3 years ago
parent
commit
a54fc75f80

+ 1 - 1
operationSupport/src/views/deviceManagement/index.vue

@@ -49,7 +49,7 @@
                             <i v-else class="zoniot_font zoniot-icon-baofei redText" @click="Scrap(scope.row.id)"></i>
                         </el-tooltip>
                         <el-tooltip effect="light" placement="bottom" content="下载二维码">
-                            <i class="zoniot_font zoniot-icon-erweimachakan" @click="lookImg(scope.row)"></i>
+                            <i class="zoniot_font zoniot-icon-erweimaxiazai" @click="lookImg(scope.row)"></i>
                         </el-tooltip>
                     </div>
                 </template>

+ 1 - 1
operationSupport/src/views/deviceManagement/indexFacilities.vue

@@ -46,7 +46,7 @@
                             <i v-else class="zoniot_font zoniot-icon-baofei redText" @click="Scrap(scope.row.id)"></i>
                         </el-tooltip>
                         <el-tooltip effect="light" placement="bottom" content="下载二维码">
-                            <i class="zoniot_font zoniot-icon-erweimachakan" @click="lookImg(scope.row)"></i>
+                            <i class="zoniot_font zoniot-icon-erweimaxiazai" @click="lookImg(scope.row)"></i>
                         </el-tooltip>
                     </div>
                 </template>

+ 12 - 68
operationSupport/src/views/parkingLotAdministration/garageList.vue

@@ -1,16 +1,12 @@
 <template>
     <div class="main">
         <div class="search">
-            <el-input v-model="query.garageName" placeholder="车位号" class="search-input"></el-input>
-            <el-select v-model="query.communityName" placeholder="请选择社区名称">
+            <el-input v-model="mixins_query.garageName" placeholder="车库名称" class="search-input" clearable></el-input>
+            <el-select v-model="mixins_query.communityId" placeholder="请选择社区名称" clearable>
                 <el-option v-for="(item, index) in communityList" :label="item.label" :value="item.id" :key="index"></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>
+            <el-button type="primary" @click="mixins_search" class="search-btn" icon="el-icon-search">查询 </el-button>
             <div class="search-icon">
-                <!-- 删除 新增 -->
                 <i class="iconfont" @click="deleteRow" v-txt-tip data-txt="删除">&#xe63b;</i>
                 <i class="iconfont" @click="addOrEdit('add')" v-left-txt-tip data-txt="新增">&#xe641;</i>
             </div>
@@ -19,8 +15,8 @@
             <zz-table
                 :cols="cols"
                 :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+                :data="mixins_list"
                 :loading="mixins_onQuery"
-                :data="tableData"
                 :pageset="mixins_pageset"
                 @page-change="pageChange"
                 @selection-change="selectionChange"
@@ -53,7 +49,7 @@
                         </el-tooltip>
 
                         <el-tooltip effect="light" placement="bottom" content="分区管理">
-                            <i class="zoniot_font zoniot-icon-bianji" @click="partitionManagement(scope)"></i>
+                            <i class="zoniot_font zoniot-icon-fenquguanli" @click="partitionManagement(scope)"></i>
                         </el-tooltip>
                     </div>
                 </template>
@@ -72,10 +68,6 @@ export default {
             communityList: [], //社区名称下拉列表
             communityId: '', //社区id
             selectName: 'parkingLot',
-            query: {
-                communityName: '', //社区名称
-                garageName: '' //车库名称
-            },
             cols: [
                 {
                     label: '所属社区',
@@ -99,20 +91,10 @@ export default {
                     slot: 'opt'
                 }
             ],
-            // tableData: []
-            selectRow: []
+            selectRow: [],
+            mixins_post: 'post'
         };
     },
-    props: {
-        tableData: {
-            type: Array,
-            default: ''
-        },
-        tableTotal: {
-            type: Number,
-            default: ''
-        }
-    },
     methods: {
         //获取社区名称下拉列表
         communityNameList() {
@@ -128,36 +110,6 @@ export default {
                 });
             });
         },
-
-        mixins_search() {
-            console.log(this.query.communityName);
-            this.communityId = this.query.communityName;
-            this.garageLotList();
-        },
-
-        //获取列表数据
-        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) => {
@@ -168,7 +120,6 @@ export default {
                     this.addEditPopUps(title, row, todo);
                 } else {
                     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);
                     });
@@ -185,7 +136,7 @@ export default {
                 height: '420px',
                 props: {
                     data: row,
-                    communityList:this.communityList,
+                    communityList: this.communityList,
                     todo: todo,
                     callback: this.mixins_search
                 }
@@ -196,7 +147,7 @@ export default {
         partitionManagement(scope) {
             sessionStorage.setItem('communityId', scope.row.communityId);
             sessionStorage.setItem('garageId', scope.row.id);
-            this.$router.push({ name: '/parkingLotAdministration/pageJump/partitionManagement' });
+            this.$router.push({ path: '/parkingLotAdministration/pageJump/partitionManagement' });
         },
         //单个删除
         deleteOne(ids) {
@@ -251,16 +202,9 @@ export default {
     },
     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
-            };
-        }
+        this.mixins_dataUrl = '/assets/garage/page';
+        this.mixins_query = {};
+        this.mixins_search();
     }
 };
 </script>

+ 20 - 67
operationSupport/src/views/parkingLotAdministration/index.vue

@@ -1,80 +1,33 @@
 <template>
     <div class="main">
-        <el-tabs v-model="selectName" @tab-click="handleClick">
+        <el-tabs v-model="selectName">
             <el-tab-pane label="车位管理" name="parkingLot">
-                 <parking-space-list :tableData="tableData" :tableTotal="tableTotal"></parking-space-list>
+                <parking-space-list></parking-space-list>
             </el-tab-pane>
             <el-tab-pane label="车库管理" name="garage">
-                <garage-list :tableData="tableData" :tableTotal="tableTotal"></garage-list>
+                <garage-list></garage-list>
             </el-tab-pane>
         </el-tabs>
     </div>
 </template>
 
 <script>
-    import parkingSpaceList from './parkingSpaceList.vue'
-    import garageList from './garageList.vue'
+import parkingSpaceList from './parkingSpaceList.vue';
+import garageList from './garageList.vue';
 
-    export default {
-        data() {
-            return {
-                selectName: 'parkingLot',
-                tableData:[],
-                tableTotal:'',//表格总条数
-            };
-        },
-        components: {
-            parkingSpaceList,
-            garageList
-        },
-        methods: {
-            handleClick(tab, event) {
-                console.log(tab, event);
-                if(tab.index=='0'){
-                    this.parkingLotList()
-                }else if(tab.index=='1'){
-                    this.garageManagementList();
-                }
-            },
-            //获取列表数据
-            parkingLotList(){
-                let submitData={
-                    "pageNum": 1,
-                    "pageSize": 10
-                }
-                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 () {
-
-                });
-            },
-            garageManagementList(){
-                let submitData={
-                    "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.tableTotal=parseInt(res.data.total)
-
-                    // this.mixins_list=data.data.list;
-                    // this.mixins_onQuery=false;
-                }).catch(function () {
-
-                });
-            }
-        },
-        created() {
-           this.parkingLotList()
-        }
-    };
+export default {
+    data() {
+        return {
+            selectName: 'parkingLot',
+            tableData: [],
+            tableTotal: '' //表格总条数
+        };
+    },
+    components: {
+        parkingSpaceList,
+        garageList
+    },
+    methods: {},
+    created() {}
+};
 </script>

+ 4 - 3
operationSupport/src/views/parkingLotAdministration/pageJump/garageSaveEdits.vue

@@ -15,13 +15,14 @@
                             </el-select>
                         </el-form-item>
                         <el-form-item label="车库名称" prop="garageName">
-                            <el-input v-model="ruleForm.garageName"></el-input>
+                            <el-input v-model="ruleForm.garageName" placeholder="请输入车库名称"></el-input>
                         </el-form-item>
                         <el-form-item label="车位数量">
-                            <el-input v-model="ruleForm.parkingNumber"></el-input>
+                            <el-input v-model="ruleForm.parkingNumber" placeholder="请输入车库数量"></el-input>
                         </el-form-item>
                         <el-form-item label="备注信息">
-                            <el-input type="textarea" :rows="4" v-model="ruleForm.remarks" maxlength="300"> </el-input>
+                            <el-input type="textarea" :rows="4" v-model="ruleForm.remarks" maxlength="300" placeholder="请输入备注">
+                            </el-input>
                             <span style="position: absolute; bottom: 0; right: 10px">{{ ruleForm.remarks.length }}/300</span>
                         </el-form-item>
                     </el-col>

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

@@ -4,41 +4,56 @@
             <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm">
                 <el-row>
                     <el-col :span="12">
-                        <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 v-for="(item,index) in communityList" :label="item.label" :value="item.id" :key="index"></el-option>
+                        <el-form-item label="社区名称" prop="communityId">
+                            <el-select v-model="ruleForm.communityId" placeholder="请选择社区名称" @change="communityChoice">
+                                <el-option
+                                    v-for="(item, index) in communityList"
+                                    :label="item.label"
+                                    :value="item.id"
+                                    :key="index"
+                                ></el-option>
                             </el-select>
                         </el-form-item>
                         <el-form-item label="车库区域">
-                            <el-select v-model="ruleForm.garageArea" placeholder="请选择车库区域" @change="garageAreaChoice">
-                                <el-option v-for="(item,index) in garageAreaList" :label="item.label" :value="item.id" :key="index"></el-option>
+                            <el-select v-model="ruleForm.garageAreaId" placeholder="请选择车库区域" @change="garageAreaChoice">
+                                <el-option
+                                    v-for="(item, index) in garageAreaList"
+                                    :label="item.label"
+                                    :value="item.id"
+                                    :key="index"
+                                ></el-option>
                             </el-select>
                         </el-form-item>
-                        <el-form-item label="前缀名称" prop="prefixName" v-if="codingStatus==false">
-                            <el-input v-model="ruleForm.prefixName"></el-input>
+                        <el-form-item label="前缀名称">
+                            <el-input v-model="ruleForm.prefix"></el-input>
                         </el-form-item>
-                        <el-form-item label="起始编号" v-if="codingStatus==false">
-                            <el-input v-model="ruleForm.parkingBeginNumber" prop="parkingBeginNumber"></el-input>
+                        <el-form-item label="起始编号" v-if="codingStatus" prop="parkingBeginNumber">
+                            <el-input v-model="ruleForm.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 label="车位编号" v-if="!codingStatus" prop="parkingNumber">
+                            <el-input v-model="ruleForm.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="请选择车库名称" @change="garageChoice">
-                                <el-option v-for="(item,index) in garageList" :label="item.label" :value="item.id" :key="index"></el-option>
+                        <el-form-item label="车库名称" prop="garageId">
+                            <el-select v-model="ruleForm.garageId" placeholder="请选择车库名称" @change="garageChoice">
+                                <el-option
+                                    v-for="(item, index) in garageList"
+                                    :label="item.label"
+                                    :value="item.id"
+                                    :key="index"
+                                ></el-option>
                             </el-select>
                         </el-form-item>
                         <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-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.parkingArea"></el-input>
                         </el-form-item>
-                        <el-form-item label="结束编号" prop="parkingEndNumber" v-if="codingStatus==false">
+                        <el-form-item label="结束编号" prop="parkingEndNumber" v-if="codingStatus">
                             <el-input v-model="ruleForm.parkingEndNumber"></el-input>
                         </el-form-item>
                     </el-col>
@@ -46,9 +61,10 @@
                 <el-row>
                     <el-col :span="24">
                         <el-form-item label="备注信息">
-                            <el-input type="textarea" :rows="4" v-model="ruleForm.remarks" maxlength="300">
-                            </el-input>
-                            <span style="position:absolute;bottom:0;right:10px">{{ruleForm.remarks.length}}/300</span>
+                            <el-input type="textarea" :rows="4" v-model="ruleForm.remarks" maxlength="300"> </el-input>
+                            <span style="position: absolute; bottom: 0; right: 10px" v-if="ruleForm.remarks"
+                                >{{ ruleForm.remarks.length }}/300</span
+                            >
                         </el-form-item>
                     </el-col>
                 </el-row>
@@ -57,224 +73,149 @@
     </div>
 </template>
 <script>
-    export default {
-        props: ["params"],
-        data() {
-            return {
-                communityList:[],//社区名称下拉列表
-                garageList:[],//车库名称下拉列表
-                garageAreaList:[],//车库区域下拉列表
-                codingStatus:false,//编码状态
-                ruleForm: {
-                    communityName: '',//社区名称
-                    communityId:'',//社区id
-                    garageArea:'',//车位区域
-                    garageAreaId:'',//车库区域id
-                    prefixName:'',//前缀名称
-                    parkingBeginNumber:'',//车位起始编号
-                    parkingEndNumber:'',//车位结束编号
-                    parkingNumber:'',//车位编号
-                    garageName:'',//车库名称
-                    garageId:'',//车库名称id
-                    parkingType:'1',//车位类别
-                    parkingArea:'',//车位面积
-                    remarks:'',//备注
-                },
-                rules: {
-                    communityName: [
-                        { required: true, message: '请输入社区名称', trigger: 'change' },
-                        // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
-                    ],
-                    prefixName:[{ 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',
-            }
-        },
-        components:{
-
-        },
-        computed: {},
-        methods: {
-            //保存
-            submit() {
-                let formData='';
-                this.$refs['ruleForm'].validate((valid) => {
-                    if (valid) {
-                        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;
-                    }
-                });
-
+export default {
+    props: ['params'],
+    data() {
+        return {
+            communityList: [], //社区名称下拉列表
+            garageList: [], //车库名称下拉列表
+            garageAreaList: [], //车库区域下拉列表
+            codingStatus: true, //编码状态
+            ruleForm: {
+                communityId: '', //社区id
+                garageAreaId: '', //车库区域id
+                prefix: '', //前缀名称
+                parkingBeginNumber: '', //车位起始编号
+                parkingEndNumber: '', //车位结束编号
+                garageId: '', //车库名称id
+                parkingType: 1, //车位类别
+                parkingArea: '', //车位面积
+                remarks: '' //备注
             },
-            resetForm(formName) {
-                this.$refs[formName].resetFields();
+            rules: {
+                communityId: [
+                    { required: true, message: '请输入社区名称', trigger: 'change' }
+                    // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+                ],
+                garageId: [{ 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' }]
             },
-
-            handleAvatarSuccess(res, file) {
-                this.imageUrl = URL.createObjectURL(file.raw);
-            },
-            beforeAvatarUpload(file) {
-                const isJPG = file.type === 'image/jpeg';
-                const isLt2M = file.size / 1024 / 1024 < 2;
-
-                if (!isJPG) {
-                    this.$message.error('上传头像图片只能是 JPG 格式!');
-                }
-                if (!isLt2M) {
-                    this.$message.error('上传头像图片大小不能超过 2MB!');
+            radio: '1'
+        };
+    },
+    components: {},
+    computed: {},
+    methods: {
+        //保存
+        submit() {
+            this.$refs['ruleForm'].validate((valid) => {
+                if (valid) {
+                    var loading = this.$loading();
+                    let url = '/assets/garage/parking/add';
+                    if (this.params.todo == 'edit') {
+                        url = '/assets/garage/parking/update';
+                    }
+                    this.$http
+                        .post(url, this.ruleForm)
+                        .then(({ status, msg }) => {
+                            if (status == 0) {
+                                this.$message.success(msg);
+                                this.params.callback();
+                                this.$emit('close');
+                            }
+                            loading.close();
+                        })
+                        .catch(() => {
+                            loading.close();
+                        });
+                } else {
+                    console.log('error submit!!');
+                    return false;
                 }
-                return isJPG && isLt2M;
-            },
-            coordinateClick(){
-                this.$confirm('确认关闭?')
-                    .then(_ => {
-                        done();
-                    })
-                    .catch(_ => {});
-            },
-            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)
-                    })
+        //获取社区名称下拉列表
+        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();
-            },
+        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)
-                    })
+        //获取车库名称下拉列表
+        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()
-            },
+        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)
-                    })
+        garageAreaListQuery() {
+            this.garageAreaList = [];
+            let onOption = '';
+            this.$http.post('/assets/garage/area/list', { communityId: this.ruleForm.garageId }).then((res) => {
+                debugger;
+                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()
+
+        garageAreaChoice(e) {
+            this.ruleForm.garageAreaId = e;
+        }
+    },
+    created() {
+        //获取社区名称下拉列表
+        this.communityNameList();
+        if (this.params.todo == 'edit') {
+            this.codingStatus = false;
+            this.ruleForm = this.params.data;
         }
-    };
+    }
+};
 </script>
 <style lang='scss'>
-    .alert-body__main_content{
-        .blockName{
-            padding:20px;
-            i{
-                color:red;
-            }
+.alert-body__main_content {
+    .blockName {
+        padding: 20px;
+        i {
+            color: red;
         }
-
     }
+}
 </style>

+ 146 - 169
operationSupport/src/views/parkingLotAdministration/pageJump/partitionManagement.vue

@@ -1,10 +1,8 @@
 <template>
     <div class="main">
         <div class="search">
-            <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>
+            <el-input v-model="mixins_query.areaName" placeholder="分区名称" class="search-input"></el-input>
+            <el-button type="primary" @click="mixins_search" class="search-btn" icon="el-icon-search">查询 </el-button>
             <div class="search-icon">
                 <!-- 删除 新增 -->
                 <i class="iconfont" @click="addOrEdit('add')" v-left-txt-tip data-txt="新增">&#xe641;</i>
@@ -13,17 +11,23 @@
         </div>
         <div>
             <zz-table
-                    :cols="cols"
-                    :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
-                    :loading="mixins_onQuery"
-                    :data="tableData"
-                    :pageset="mixins_pageset"
-                    @page-change="pageChange"
-                    @selection-change="selectionChange"
+                :cols="cols"
+                :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+                :data="mixins_list"
+                :loading="mixins_onQuery"
+                :pageset="mixins_pageset"
+                @page-change="pageChange"
+                @selection-change="selectionChange"
             >
-                <template slot-scope="scope" slot="opt">
-                    <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 slot-scope="scope" slot="opt" class="opt">
+                    <div class="opt">
+                        <el-tooltip effect="light" placement="bottom" content="编辑">
+                            <i class="zoniot_font zoniot-icon-bianji" @click="addOrEdit('edit', scope)"></i>
+                        </el-tooltip>
+                        <el-tooltip effect="light" placement="bottom" content="删除">
+                            <i class="zoniot_font zoniot-icon-shanchu redText" @click="deleteOne(scope.row.id)"></i>
+                        </el-tooltip>
+                    </div>
                 </template>
             </zz-table>
         </div>
@@ -31,168 +35,141 @@
 </template>
 
 <script>
-    import list from '@utils/list.js';
-    export default {
-        mixins: [list],
-        data() {
-            return {
-                areaName:'',
-                communityId:'',//社区id
-                garageId:'',//车库id
-                selectName: 'parkingLot',
-                cols: [
-                   {
-                        label: '车库名称',
-                        prop: 'garageName'
-                    },{
-                        label: '分区名称',
-                        prop: 'areaName'
-                    },{
-                        label: '车位数量',
-                        prop: 'parkingNumber'
-                    },{
-                        label: '备注',
-                        prop: 'remarks'
-                    },{
-                        label: '操作',
-                        prop: 'opt',
-                        slot: 'opt'
-                    }
-                ],
-                tableData: [],
-                selectRow: [],
-            };
+import list from '@utils/list.js';
+export default {
+    mixins: [list],
+    data() {
+        return {
+            areaName: '',
+            communityId: '', //社区id
+            garageId: '', //车库id
+            selectName: 'parkingLot',
+            cols: [
+                {
+                    label: '车库名称',
+                    prop: 'garageName'
+                },
+                {
+                    label: '分区名称',
+                    prop: 'areaName'
+                },
+                {
+                    label: '车位数量',
+                    prop: 'parkingNumber'
+                },
+                {
+                    label: '备注',
+                    prop: 'remarks'
+                },
+                {
+                    label: '操作',
+                    prop: 'opt',
+                    slot: 'opt'
+                }
+            ],
+            tableData: [],
+            selectRow: [],
+            mixins_post: 'post'
+        };
+    },
+    methods: {
+        //新增与编辑弹出框
+        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 {
+                    this.$http
+                        .get('/assets/garage/area/find/' + scope.row.id, {})
+                        .then((res) => {
+                            row = res.data;
+                            this.addEditPopUps(title, row, todo);
+                        })
+                        .catch(function () {});
+                }
+            }).then(() => {});
         },
-        methods: {
-            handleClick(tab, event) {
-                console.log(tab, event);
-            },
 
-            //查询
-            mixins_search(){
-                let submitData={
-                    "areaName":this.areaName,
-                    "garageId":this.garageId,
-                    "pageNum": 1,
-                    "pageSize": 10
+        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
                 }
-                this.garageManagementList(submitData)
-            },
-            //新增与编辑弹出框
-            addOrEdit(todo, scope) {
-                new Promise((resolve) => {
-                    let row,
-                        title = '分区编辑';
-                    if ('add' == todo) {
-                        title = '分区添加';
-                        row={
-                            communityId:this.communityId,
-                            garageId:this.garageId
+            });
+        },
+        //单个删除
+        deleteOne(ids) {
+            this.$msgBox(`刪除字典`, '删除后将无法恢复,请问是否继续?')
+                .then(() => {
+                    this.$http.post('/sc-community-web/assets/garage/area/delete', [ids]).then(({ status }) => {
+                        if (0 === status) {
+                            this.$message({
+                                type: 'success',
+                                message: '删除成功!'
+                            });
+                            this.mixins_search();
+                        } else {
+                            this.$message.error('删除失败!');
                         }
-                        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/area/find/'+scope.row.id, {}).then(res=> {
-                            row=res.data;
-                            this.addEditPopUps(title,row,todo)
-                        }).catch(function () {
-
-                        });
-                    }
-                }).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('/sc-community-web/assets/garage/area/delete', [ids]).then(({ status}) => {
-                            if (0 === status) {
-                                this.$message({
-                                    type: 'success',
-                                    message: '删除成功!'
-                                });
-                                this.mixins_search();
-                            } else {
-                                this.$message.error('删除失败!');
-                            }
-                        });
-                    })
-                    .catch(() => {
-                        this.$message({
-                            type: 'info',
-                            message: '已取消删除'
-                        });
                     });
-            },
-            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);
+                })
+                .catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
                 });
-                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
+        deleteRow() {
+            // 获取选中列表的ids
+            let ids = [];
+            if (!this.selectRow.length) {
+                this.$message.error('您尚未选择要删除的记录,请选择后再操作批量删除');
+                return;
             }
-            this.garageManagementList(submitData)
+            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'));
+
+        this.mixins_dataUrl = '/assets/garage/area/page';
+        this.mixins_query = {
+            garageId: this.garageId
+        };
+        this.mixins_search();
+    }
+};
 </script>

+ 85 - 141
operationSupport/src/views/parkingLotAdministration/pageJump/zoneAddEdit.vue

@@ -4,10 +4,14 @@
             <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm">
                 <el-row>
                     <el-col :span="24">
-                        <el-form-item label="车库名称" prop="garageName">
-                            <el-select v-model="ruleForm.garageName" placeholder="请选择车库名称">
-                                <el-option label="清空" value=""></el-option>
-                                <el-option v-for="(item,index) in garageList" :label="item.label" :value="item.id"></el-option>
+                        <el-form-item label="车库名称" prop="garageId">
+                            <el-select v-model="ruleForm.garageId" placeholder="请选择车库名称">
+                                <el-option
+                                    v-for="(item, index) in garageList"
+                                    :label="item.label"
+                                    :value="item.id"
+                                    :key="index"
+                                ></el-option>
                             </el-select>
                         </el-form-item>
                         <el-form-item label="分区名称" prop="areaName">
@@ -17,9 +21,8 @@
                             <el-input v-model="ruleForm.parkingNumber"></el-input>
                         </el-form-item>
                         <el-form-item label="备注信息">
-                            <el-input type="textarea" :rows="4" v-model="ruleForm.remarks" maxlength="300">
-                            </el-input>
-                            <span style="position:absolute;bottom:0;right:10px">{{ruleForm.remarks.length}}/300</span>
+                            <el-input type="textarea" :rows="4" v-model="ruleForm.remarks" maxlength="300"> </el-input>
+                            <span style="position: absolute; bottom: 0; right: 10px">{{ ruleForm.remarks.length }}/300</span>
                         </el-form-item>
                     </el-col>
                 </el-row>
@@ -28,145 +31,86 @@
     </div>
 </template>
 <script>
-    export default {
-        props: ["params"],
-        data() {
-            return {
-                garageList:[],//车库名称下拉列表
-                ruleForm: {
-                    garageName:'',//车库名称
-                    areaName:'',//分区名称
-                    parkingNumber:'',//车位数量
-                    remarks:'',//备注
-                },
-                rules: {
-                    garageName:[{ required: true, message: '请输入车库名称', trigger: 'change' }],
-                    areaName:[{ required: true, message: '请输入分区名称', trigger: 'change' }],
-                },
-                radio: '1',
-            }
-        },
-        components:{
-
-        },
-        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) {
-                        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 {
-                        this.$message.error('验证失败');
-                        return false;
-                    }
-                });
-            },
-            resetForm(formName) {
-                this.$refs[formName].resetFields();
-            },
-
-            handleAvatarSuccess(res, file) {
-                this.imageUrl = URL.createObjectURL(file.raw);
-            },
-            beforeAvatarUpload(file) {
-                const isJPG = file.type === 'image/jpeg';
-                const isLt2M = file.size / 1024 / 1024 < 2;
-
-                if (!isJPG) {
-                    this.$message.error('上传头像图片只能是 JPG 格式!');
-                }
-                if (!isLt2M) {
-                    this.$message.error('上传头像图片大小不能超过 2MB!');
-                }
-                return isJPG && isLt2M;
+export default {
+    props: ['params'],
+    data() {
+        return {
+            garageList: [], //车库名称下拉列表
+            ruleForm: {
+                garageId: '', //车库名称
+                areaName: '', //分区名称
+                parkingNumber: '', //车位数量
+                remarks: '', //备注
+                communityId: this.params.data.communityId
             },
-            coordinateClick(){
-                this.$confirm('确认关闭?')
-                    .then(_ => {
-                        done();
-                    })
-                    .catch(_ => {});
+            rules: {
+                garageId: [{ required: true, message: '请输入车库名称', trigger: 'change' }],
+                areaName: [{ required: true, message: '请输入分区名称', trigger: 'change' }]
             },
-            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='';
-                }
-            },
-
-
+            radio: '1'
+        };
+    },
+    components: {},
+    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);
+                });
+            });
         },
-        created() {
-           this.garageNameList();
-            this.addEditPresentation();
+        submit() {
+            this.$refs['ruleForm'].validate((valid) => {
+                if (valid) {
+                    var loading = this.$loading();
+                    let url = '/assets/garage/area/add';
+                    if (this.params.todo == 'edit') {
+                        url = '/assets/garage/area/update';
+                    }
+                    this.$http
+                        .post(url, this.ruleForm)
+                        .then(({ status, msg }) => {
+                            if (status == 0) {
+                                this.$message.success(msg);
+                                this.params.callback();
+                                this.$emit('close');
+                            }
+                            loading.close();
+                        })
+                        .catch(() => {
+                            loading.close();
+                        });
+                } else {
+                    this.$message.error('验证失败');
+                    return false;
+                }
+            });
+        }
+    },
+    created() {
+        this.garageNameList();
+        if (this.params.todo == 'edit') {
+            this.ruleForm = this.params.data;
         }
-    };
+        this.ruleForm.communityId = this.params.data.communityId;
+    }
+};
 </script>
 <style lang='scss'>
-    .alert-body__main_content{
-    .blockName{
-        padding:20px;
-    i{
-        color:red;
-    }
-    }
-
+.alert-body__main_content {
+    .blockName {
+        padding: 20px;
+        i {
+            color: red;
+        }
     }
+}
 </style>

+ 20 - 76
operationSupport/src/views/parkingLotAdministration/parkingSpaceList.vue

@@ -1,8 +1,8 @@
 <template>
     <div class="main">
         <div class="search">
-            <el-input placeholder="车位号" class="search-input"></el-input>
-            <el-select v-model="communityName" placeholder="请选择社区名称" @change="communityChoice">
+            <el-input placeholder="车位号" class="search-input" v-model="mixins_query.parkingNumber"></el-input>
+            <el-select v-model="mixins_query.communityId" placeholder="请选择社区名称">
                 <el-option
                     v-for="(item, index) in communityList"
                     :label="item.label"
@@ -11,7 +11,7 @@
                     :key="index"
                 ></el-option>
             </el-select>
-            <el-select v-model="garageName" placeholder="请选择车库名称" @change="garageChoice">
+            <el-select v-model="mixins_query.garageId" placeholder="请选择车库名称">
                 <el-option v-for="(item, index) in garageList" :label="item.label" :value="item.id" :key="index"></el-option>
             </el-select>
             <el-button type="primary" @click="mixins_search" class="search-btn" icon="el-icon-search"
@@ -28,8 +28,8 @@
             <zz-table
                 :cols="cols"
                 :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+                :data="mixins_list"
                 :loading="mixins_onQuery"
-                :data="tableData"
                 :pageset="mixins_pageset"
                 @page-change="pageChange"
                 @selection-change="selectionChange"
@@ -50,16 +50,13 @@
 </template>
 
 <script>
+import list from '@utils/list.js';
 export default {
+    mixins: [list],
     data() {
         return {
-            parkingNumber: '',
             communityList: [], //社区名称下拉列表
-            communityName: '', //社区名称
-            communityId: '', //社区id
             garageList: [], //车库名称下拉列表
-            garageName: '', //车库名称
-            selectName: 'parkingLot',
             cols: [
                 {
                     label: '所属社区',
@@ -95,26 +92,17 @@ export default {
                     slot: 'opt'
                 }
             ],
-            // tableData: []
-            selectRow: []
+            selectRow: [],
+            mixins_post: 'post'
         };
     },
-    props: {
-        tableData: {
-            type: Array,
-            default: ''
-        },
-        tableTotal: {
-            type: Number,
-            default: ''
-        }
-    },
     methods: {
         //获取社区名称下拉列表
         communityNameList() {
             this.communityList = [];
             let onOption = '';
             this.$http.get('/assets/community/list', {}).then((res) => {
+                console.log(res);
                 res.data.map((res) => {
                     onOption = {
                         label: res.communityName,
@@ -125,15 +113,13 @@ export default {
             });
         },
         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) => {
+            this.$http.post('/assets/garage/list', {}).then((res) => {
                 res.data.map((res) => {
                     onOption = {
                         label: res.garageName,
@@ -175,57 +161,21 @@ export default {
                 }
             });
         },
-
-        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.get('/assets/garage/parking/delete', { id: ids }).then(({ status }) => {
+        deleteOne(id) {
+            this.$msgBox(`删除`, '删除后将无法恢复,请问是否继续?')
+                .then((_) => {
+                    this.$http.post('/assets/garage/parking/delete', [id]).then(({ status, data, msg }) => {
                         if (0 === status) {
                             this.$message({
                                 type: 'success',
                                 message: '删除成功!'
                             });
                             this.mixins_search();
-                        } else {
-                            this.$message.error('删除失败!');
                         }
                     });
                 })
-                .catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
+                .catch(() => {});
         },
         deleteRow() {
             // 获取选中列表的ids
@@ -239,7 +189,7 @@ export default {
             });
             this.$msgBox(`删除`, '删除后将无法恢复,请问是否继续?')
                 .then((_) => {
-                    this.$http.post('/sc-community-web/assets/garage/parking/delete', ids).then(({ status, data, msg }) => {
+                    this.$http.post('/assets/garage/parking/delete', ids).then(({ status, data, msg }) => {
                         if (0 === status) {
                             this.$message({
                                 type: 'success',
@@ -258,16 +208,10 @@ export default {
     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
-            };
-        }
+        this.garageNameList();
+        this.mixins_dataUrl = '/assets/garage/parking/page';
+        this.mixins_query = {};
+        this.mixins_search();
     }
 };
 </script>