“dzb”
2022-10-13 5cd763edc85f3b14bc98af906828521d65276f48
src/components/dispatch/index.vue
@@ -15,7 +15,7 @@
            <!-- 选择执法车 -->
            <el-form-item label="选择执法车:" prop="enforcementCar">
                <el-select v-model="dispatch.enforcementCar" placeholder="请选择">
                    <el-option v-for="item in carOptions" :key="item.value" :label="item.label" :value="item.value">
                    <el-option v-for="item in carOptions" :key="item.id" :label="item.carNumber" :value="item.id">
                    </el-option>
                </el-select>
            </el-form-item>
@@ -74,7 +74,7 @@
    components: {
        MyMap
    },
    props: ['id', 'changeDialog', 'refresh', 'mytype'],
    props: ['id', 'changeDialog', 'refresh', 'mytype'],
    created() {
        // 判断车辆类型
        this.mytype === 1 ? this.getLawCarList() : this.getSoilCarList();
@@ -118,14 +118,14 @@
            if (value) {
                callback();
            } else {
                callback(new Error('执法人员不能为空'))
                callback()
            }
        }
        const checkNumber = (rule, value, callback) => {
            if (value) {
                callback();
            } else {
                callback(new Error('执法人员编号不能为空'))
                callback()
            }
        }
        return {
@@ -143,7 +143,7 @@
            rules: {
                contactWay: [
                    {
                        required: true, trigger: 'blur', validator: checkPhone
                        required: false, trigger: 'blur', validator: checkPhone
                    }
                ],
                dispatchOpinion: [
@@ -159,7 +159,7 @@
                    { required: true, trigger: 'change', validator: checkPerson }
                ],
                lawEnforcerName: [
                    { required: true, trigger: 'change', validator: checkNumber }
                    { required: false, trigger: 'change', validator: checkNumber }
                ],
            },
            carOptions: [
@@ -232,8 +232,8 @@
                url: `sccg/car_Manage/query_enforce?current=1&size=1000`
            })
                .then(res => {
                    this.carOptions = res.data.orders;
                    console.log(res);
                    this.carOptions = res.data.records;
                    console.log(res,this.carOptions);
                })
        },
        // 获取渣土车辆
@@ -243,7 +243,7 @@
                url: `sccg/car_Manage/query_slag?current=1&size=1000`
            })
                .then(res => {
                    this.carOptions = res.data.orders;
                    this.carOptions = res.data.records;
                    console.log(res);
                })
        },
@@ -291,7 +291,9 @@
            this.dispatch.lawEnforcer = '';
            this.dispatch.enforcementTeam = '';
            await this.getTeamList(id);
            await this.getDepartUserList(id);
            if(this.squadronOptions.length===0){
                await this.getDepartUserList(id);
            }
        },
        // 中队更改
        async handleMidChange(id) {