|
@@ -82,7 +82,7 @@ |
|
@@ -82,7 +82,7 @@ |
82
|
<el-table-column label="操作" align="center" width="240" fixed="right">
|
82
|
<el-table-column label="操作" align="center" width="240" fixed="right">
|
83
|
<!-- v-if="isAdmin"-->
|
83
|
<!-- v-if="isAdmin"-->
|
84
|
<template slot-scope="scope">
|
84
|
<template slot-scope="scope">
|
85
|
- <el-button type="warning" size="mini" >出任务</el-button>
|
85
|
+ <el-button type="warning" size="mini" @click="handlOut(scope.$index, scope.row)">出任务</el-button>
|
86
|
<el-button type="success" size="mini" @click="handlEdit(scope.$index, scope.row)">编辑</el-button>
|
86
|
<el-button type="success" size="mini" @click="handlEdit(scope.$index, scope.row)">编辑</el-button>
|
87
|
<el-button type="danger" size="mini" @click="handleDel(scope.$index, scope.row)">删除</el-button>
|
87
|
<el-button type="danger" size="mini" @click="handleDel(scope.$index, scope.row)">删除</el-button>
|
88
|
</template>
|
88
|
</template>
|
|
@@ -286,6 +286,47 @@ |
|
@@ -286,6 +286,47 @@ |
286
|
@click="dialogStatus ==='save'? addSubmit():editSubmit()" v-loading="addloading">保存</el-button>
|
286
|
@click="dialogStatus ==='save'? addSubmit():editSubmit()" v-loading="addloading">保存</el-button>
|
287
|
</div>
|
287
|
</div>
|
288
|
</el-dialog>
|
288
|
</el-dialog>
|
|
|
289
|
+<!-- //出任务-->
|
|
|
290
|
+ <el-dialog title="出任务" :visible.sync="dialogVisible">
|
|
|
291
|
+ <el-form :model="form">
|
|
|
292
|
+ <el-form-item label="" :label-width="formLabelWidth">
|
|
|
293
|
+ <el-col :span="15">
|
|
|
294
|
+ <el-input v-model="form.lisenceNo" autocomplete="off" disabled>
|
|
|
295
|
+ <template slot="prepend">车牌号</template>
|
|
|
296
|
+ </el-input>
|
|
|
297
|
+ </el-col>
|
|
|
298
|
+ </el-form-item>
|
|
|
299
|
+ <el-form-item label="" :label-width="formLabelWidth">
|
|
|
300
|
+ <div class="my-text-area">
|
|
|
301
|
+ <div class="el-input-group__prepend prepand">用户名</div>
|
|
|
302
|
+ <el-col :span="14">
|
|
|
303
|
+ <el-select v-model="form.username"
|
|
|
304
|
+ @click.native="getUsers"
|
|
|
305
|
+ default-first-option
|
|
|
306
|
+ :loading="loading" clearable placeholder="请选择">
|
|
|
307
|
+ <el-option
|
|
|
308
|
+ v-for="item in usernames"
|
|
|
309
|
+ :key="item.username"
|
|
|
310
|
+ :label="item.username"
|
|
|
311
|
+ :value="item.username"
|
|
|
312
|
+ :disabled="item.disabled">
|
|
|
313
|
+ </el-option>
|
|
|
314
|
+ </el-select>
|
|
|
315
|
+ </el-col>
|
|
|
316
|
+ </div>
|
|
|
317
|
+ </el-form-item>
|
|
|
318
|
+ <el-form-item label="" :label-width="formLabelWidth">
|
|
|
319
|
+ <el-col :span="14">
|
|
|
320
|
+ <el-tag v-if="lisenceNoSatus=false" type="success">在线</el-tag>
|
|
|
321
|
+ <el-tag v-else type="info">离线</el-tag>
|
|
|
322
|
+ </el-col>
|
|
|
323
|
+ </el-form-item>
|
|
|
324
|
+ </el-form>
|
|
|
325
|
+ <div slot="footer" class="dialog-footer">
|
|
|
326
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
327
|
+ <el-button @click="saveOut()">确 定</el-button>
|
|
|
328
|
+ </div>
|
|
|
329
|
+ </el-dialog>
|
289
|
</el-card>
|
330
|
</el-card>
|
290
|
</el-main>
|
331
|
</el-main>
|
291
|
</el-container>
|
332
|
</el-container>
|
|
@@ -298,6 +339,8 @@ |
|
@@ -298,6 +339,8 @@ |
298
|
import {isAdmin, loginedUserInfo} from "../../api/user";
|
339
|
import {isAdmin, loginedUserInfo} from "../../api/user";
|
299
|
//获取关锁列表
|
340
|
//获取关锁列表
|
300
|
// import {list as lockList} from "../../api/lock_info/lock_info";
|
341
|
// import {list as lockList} from "../../api/lock_info/lock_info";
|
|
|
342
|
+ import { getUserList } from '../../api/user';
|
|
|
343
|
+ import {selectVehicle, insertSelective, selectHistroy} from '../../api/consigner/vehicle';
|
301
|
|
344
|
|
302
|
export default {
|
345
|
export default {
|
303
|
|
346
|
|
|
@@ -419,7 +462,22 @@ |
|
@@ -419,7 +462,22 @@ |
419
|
veState: [
|
462
|
veState: [
|
420
|
{ required: true, message: '请选择备案状态', trigger: 'blur' }
|
463
|
{ required: true, message: '请选择备案状态', trigger: 'blur' }
|
421
|
]
|
464
|
]
|
422
|
- }
|
465
|
+ },
|
|
|
466
|
+ dialogVisible:false,
|
|
|
467
|
+ form: {
|
|
|
468
|
+ lisenceNo: '',
|
|
|
469
|
+ username: '',
|
|
|
470
|
+ id:'',
|
|
|
471
|
+ starttime:''
|
|
|
472
|
+ },
|
|
|
473
|
+ usernames:[],
|
|
|
474
|
+ queryInfo: {
|
|
|
475
|
+ vno: '',
|
|
|
476
|
+ vnocolor: '2'
|
|
|
477
|
+ },
|
|
|
478
|
+ lisenceNoSatus:'',
|
|
|
479
|
+ formLabelWidth: '120px',
|
|
|
480
|
+ loading:false,
|
423
|
}
|
481
|
}
|
424
|
},
|
482
|
},
|
425
|
mounted() {
|
483
|
mounted() {
|
|
@@ -427,6 +485,56 @@ |
|
@@ -427,6 +485,56 @@ |
427
|
this.getReCord();
|
485
|
this.getReCord();
|
428
|
},
|
486
|
},
|
429
|
methods: {
|
487
|
methods: {
|
|
|
488
|
+ //出任务
|
|
|
489
|
+ handlOut(index,row){
|
|
|
490
|
+ this.dialogVisible=true;
|
|
|
491
|
+ this.form.lisenceNo=row.domesticLisenceNo;
|
|
|
492
|
+ this.getUsers();
|
|
|
493
|
+ this.getLisenceNoStatus(row.domesticLisenceNo)
|
|
|
494
|
+ },
|
|
|
495
|
+ //确定出任务
|
|
|
496
|
+ saveOut() {
|
|
|
497
|
+ const _this = this
|
|
|
498
|
+ insertSelective(this.form).then((response) => {
|
|
|
499
|
+ const res = response.data
|
|
|
500
|
+ if (res.code !== '200') {
|
|
|
501
|
+ return _this.$message.error('出任务,失败!')
|
|
|
502
|
+ }
|
|
|
503
|
+ _this.$message.success('出任务,成功!')
|
|
|
504
|
+ this.dialogVisible=false;
|
|
|
505
|
+ this.$router.push(
|
|
|
506
|
+ {
|
|
|
507
|
+ path:'conveyance'
|
|
|
508
|
+ }
|
|
|
509
|
+ )
|
|
|
510
|
+ }).catch(error => {
|
|
|
511
|
+ // 关闭加载
|
|
|
512
|
+ _this.$message.warning('车辆已出任务')
|
|
|
513
|
+ })
|
|
|
514
|
+ },
|
|
|
515
|
+ //获取用户名
|
|
|
516
|
+ getUsers:function() {
|
|
|
517
|
+ let para = {};
|
|
|
518
|
+ this.listLoading = true;
|
|
|
519
|
+ getUserList(para).then((res) => {
|
|
|
520
|
+ let response = res.data.data;
|
|
|
521
|
+ console.log(response)
|
|
|
522
|
+ this.usernames=res.data.data.list;
|
|
|
523
|
+ }).catch((error) => {
|
|
|
524
|
+ this.$message.error(error.toString());
|
|
|
525
|
+ });
|
|
|
526
|
+
|
|
|
527
|
+ },
|
|
|
528
|
+ //车辆状态
|
|
|
529
|
+ getLisenceNoStatus(lisenceNo){
|
|
|
530
|
+ this.queryInfo.vno=lisenceNo;
|
|
|
531
|
+ selectVehicle(this.queryInfo).then((response) => {
|
|
|
532
|
+ const res = response.data;
|
|
|
533
|
+ this.lisenceNoSatus=res.data.data.firstVcl.offlineState;
|
|
|
534
|
+ }).catch(error => {
|
|
|
535
|
+ this.$message.error('获取车辆状态失败:' + error.toString());
|
|
|
536
|
+ });
|
|
|
537
|
+ },
|
430
|
//获取备案列表
|
538
|
//获取备案列表
|
431
|
getReCord(val) {
|
539
|
getReCord(val) {
|
432
|
let pageSize = this.pageSize;
|
540
|
let pageSize = this.pageSize;
|