| | |
| | | <!-- 选择执法车 --> |
| | | <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> |
| | |
| | | components: { |
| | | MyMap |
| | | }, |
| | | props: ['id', 'changeDialog', 'refresh', 'mytype'], |
| | | props: ['id', 'changeDialog', 'refresh', 'mytype'], |
| | | created() { |
| | | // 判断车辆类型 |
| | | this.mytype === 1 ? this.getLawCarList() : this.getSoilCarList(); |
| | |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('执法人员不能为空')) |
| | | callback() |
| | | } |
| | | } |
| | | const checkNumber = (rule, value, callback) => { |
| | | if (value) { |
| | | callback(); |
| | | } else { |
| | | callback(new Error('执法人员编号不能为空')) |
| | | callback() |
| | | } |
| | | } |
| | | return { |
| | |
| | | rules: { |
| | | contactWay: [ |
| | | { |
| | | required: true, trigger: 'blur', validator: checkPhone |
| | | required: false, trigger: 'blur', validator: checkPhone |
| | | } |
| | | ], |
| | | dispatchOpinion: [ |
| | |
| | | { required: true, trigger: 'change', validator: checkPerson } |
| | | ], |
| | | lawEnforcerName: [ |
| | | { required: true, trigger: 'change', validator: checkNumber } |
| | | { required: false, trigger: 'change', validator: checkNumber } |
| | | ], |
| | | }, |
| | | carOptions: [ |
| | |
| | | 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); |
| | | }) |
| | | }, |
| | | // 获取渣土车辆 |
| | |
| | | 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); |
| | | }) |
| | | }, |
| | |
| | | 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) { |