index.vue
6.57 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
<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-form-item label="车牌号码" prop="licensePlate">
<el-select v-model="queryParams.licensePlate" 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-form-item label="运输企业" prop="companyId">
<el-select v-model="queryParams.companyId" filterable reserve-keyword placeholder="运输企业"
size="small" :loading="loading">
<el-option v-for="item in dictCompanys" :label="item" :value="item">
</el-option>
</el-select>
</el-form-item>
<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-row>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="handleAdd" v-hasPermi="['truck:credit:add']"
v-if="queryParams.status==0">新增</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.companyId }}</div>
</el-col>
</el-row>
<el-row class="card_row" style="margin-top:10px;margin-bottom:10px;">
<el-col :span="24">
<span >车牌号码:{{ item.licensePlate }}</span>
</el-col>
</el-row>
<el-row class="card_row" style="margin-top:10px;margin-bottom:10px;">
<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">撤销失信</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>
<pagination 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" v-if="open">
<el-form-item label="运输企业" prop="companyId">
<el-select v-model="form.companyId" filterable reserve-keyword placeholder="运输企业">
<el-option v-for="item in companyList" @click.native="form.licensePlate=null;" :key="item.name" :label="item.name" :value="item.name">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="车牌号码" prop="licensePlate">
<el-select v-model="form.licensePlate" filterable reserve-keyword placeholder="车牌号码">
<el-option @click.native="getObjId(item)" v-for="item in truckList" :key="item.id" :label="item.licenseplateNo" :value="item.licenseplateNo" v-if="!form.companyId || form.companyId==item.companyName">
</el-option>
</el-select>
</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="updateForm" :model="updateForm" :rules="rules2" label-width="80px" v-if="isEdit">
<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 center="true">
<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 ? "撤销失信" : scope.row.lostCredit == 1 ? "失信" : "保密" }}</span>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script src="../../../api/truck_credit.js" />
<style scope>
.el-select-dropdown__item{
width:300px;
}
</style>