kongdeqiang
2023-01-16 0d846fafce55573aacba349935c1f10c6dfc638d
src/components/page/whiteList/index.vue
@@ -50,8 +50,8 @@
                <el-form-item label="月票结束日期" prop="endTime" v-if="flag2">
                    <el-date-picker placeholder="选择时间" v-model="formData.endTime"></el-date-picker>
                </el-form-item>
                <el-form-item label="停车场" prop="parkId" v-if="flag2">
                    <el-select v-model="formData.parkId">
                <el-form-item label="停车场" prop="parkIds" v-if="flag2">
                    <el-select v-model="ids" multiple clearable>
                        <el-option v-for="item in table1" :key="item.id" :label="item.name" :value="item.id"></el-option>
                    </el-select>
                </el-form-item>
@@ -80,8 +80,10 @@
                    type: 0,
                    endTime: '',
                    startTime: '',
                    parkId:null
                    parkIds: '',
                    name: ''
                },
                ids:[],
                urlPath:this.$systemconfig.basePath + '/whiteList/',
                table1:[],
            }
@@ -103,6 +105,7 @@
            onSave(){
                this.$refs['formData'].validate((valid) => {
                    if (valid) {
                      this.formData.parkIds = this.ids.join(",")
                        this.$byutil.postData(this, this.urlPath+'save', this.formData, res => {
                            this.$refs['formData'].resetFields();
                            this.flag=false;
@@ -115,7 +118,7 @@
                });
            },
            loadData() {
                this.$byutil.loadPageData(this, this.urlPath+'findPage', this.searchForm);
                this.$byutil.loadPageData(this, this.urlPath+'findPageNew', this.searchForm);
            },
            onSearch() {
                this.pageData = this.$byutil.defaultPageData();
@@ -130,14 +133,19 @@
                    type: 0,
                    endTime: '',
                    startTime: '',
                    parkId:null
                    parkIds: null
                }
            },
            onEdit(row) {
                this.flag=true;
                this.ids = []
                this.formData  = row;
                if(row.type==1){
                    this.flag2=true;
                  this.ids = this.formData.parkIds.split(",")
                  this.ids = this.ids.map(function(data){
                    return +data;
                  });
                  this.flag2=true;
                }
            },
            onDelete(row) {