index.vue
6.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<template>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button :class="{'el-button':true, 'el-button--primary':this.queryParams.status==0}" size="mini" @click="getData(1);" >失信驾驶员</el-button>
</el-col>
<el-col :span="1.5">
<el-button :class="{'el-button':true,'el-button--primary':this.queryParams.status==1}" size="mini" @click="getHistoryData(1);">历史驾驶员</el-button>
</el-col>
</el-row>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
<el-row type="flex" justify="center">
<el-col>
<el-form-item label="驾驶员姓名" prop="name"
style="float:right;">
<el-select v-model="queryParams.name"
filterable
reserve-keyword
placeholder="驾驶员姓名"
size="small"
:loading="loading">
<el-option
v-for="item in dictNames"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="失信日期" prop="time" v-show="queryParams.status==0">
<el-date-picker size="small" style="width: 200px" v-model="queryParams.time" type="date"
value-format="yyyy-MM-dd" placeholder="失信日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['driver:credit:add']" v-if="queryParams.status==0
&& checkPer(['businessmanage.credit.DriverCredit.add'])">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="handleQuery">查询</el-button>
</el-col>
<el-col :span="1.5">
<el-button size="mini" @click="resetQuery">重置</el-button>
</el-col>
</el-row>
<el-card class="box-card" v-for="item in creditList" style="margin-bottom: 10px;"
>
<el-row class="card_row">
<el-col :span="24" class="card_grid">
<div class="card_title" style="font-weight: bold;">驾驶员姓名:{{ item.name }}</div>
</el-col>
</el-row>
<el-row class="card_row" style="margin-top:10px;margin-bottom:10px;">
<el-col :span="24">
<span >证件号码:{{item.idNumber}}</span>
</el-col>
</el-row>
<el-row class="card_row" >
<el-col :span="24">
<span >失信时间:{{ item.time }}</span>
</el-col>
</el-row>
<el-row class="card_row">
<el-col :span="24">
<span >失信原因:{{item.reason}}</span>
</el-col>
</el-row>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(item)" v-hasPermi="['Company:credit:edit']"
v-if="queryParams.status==0&& checkPer(['businessmanage.credit.DriverCredit.revoke'])">撤销失信</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="getDataInfo(item)" v-hasPermi="['Company:credit:edit']" v-if="queryParams.status==1">查看</el-button>
</el-card>
<h5Page v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改工地对话框 -->
<el-dialog :title="title" :visible.sync="open" width="300px" append-to-body v-loading="loading">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="驾驶员姓名" prop="name">
<el-select
v-model="form.name"
filterable
reserve-keyword
placeholder="驾驶员姓名"
@change="getObjId">
<el-option
v-if="dictNames.indexOf(item.name) == -1"
v-for="item in driverList"
:key="item.id"
:label="item.name"
:value="item.name">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="证件号码" prop="idNumber">
<el-input v-model="form.idNumber" placeholder="证件号码" disabled/>
</el-form-item>
<el-form-item label="失信原因" prop="reason">
<el-input v-model="form.reason" placeholder="失信原因" />
</el-form-item>
<el-input v-model="form.lostCredit" value="1" type="hidden" />
<el-input v-model="form.objectId" type="hidden" />
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">保存</el-button>
<el-button @click="cancel">退出</el-button>
</div>
</el-dialog>
<el-dialog title="撤销失信" :visible.sync="isEdit" width="300px" append-to-body v-loading="loading">
<el-form ref="form" :model="updateForm" :rules="rules" label-width="80px">
<el-form-item label="情况说明" prop="reason">
<el-input v-model="updateForm.reason" type="textarea" maxlength="200" show-word-limit/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">保存</el-button>
<el-button @click="cancel">退出</el-button>
</div>
</el-dialog>
<el-dialog title="历史失信" :visible.sync="infoDialog" width="300px" append-to-body>
<el-table v-loading="loading" :data="creditListInfo" :cell-style="colStyle" border>
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="失信时间" align="center" prop="time" width="100">
</el-table-column>
<el-table-column label="情况说明" align="center" prop="reason" />
<el-table-column label="操作历史" align="center" prop="lostCredit">
<template slot-scope="scope">
<span>{{ scope.row.lostCredit== 0 ? "撤销失信" : "失信" }}</span>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<style scope>
.el-select-dropdown__item{
width:300px;
}
</style>
<script src="../../../api/driver_credit.js" />