authenticationInfos.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  2. <html>
  3. <head>
  4. <jsp:include page="head.jsp"/>
  5. <title>领先共享汽车</title>
  6. </head>
  7. <body>
  8. <jsp:include page="contentBefore.jsp"/>
  9. <template>
  10. <div class="filters">
  11. <div class="num"> 共{{totalNumber}}认证</div>
  12. </div>
  13. <el-table :data="rows"
  14. ref="table"
  15. style="width: 100%"
  16. element-loading-text="拼命加载中"
  17. stripe
  18. v-loading="loading">
  19. <el-table-column
  20. type="index"
  21. width="70"
  22. align="center">
  23. </el-table-column>
  24. <el-table-column
  25. prop="userId"
  26. label="用户Id"
  27. align="center">
  28. </el-table-column>
  29. <el-table-column
  30. prop="isForeign"
  31. label="是否外籍"
  32. align="center">
  33. </el-table-column>
  34. <el-table-column
  35. prop="licenseCard"
  36. label="驾驶证号"
  37. align="center">
  38. </el-table-column>
  39. <el-table-column
  40. label="驾驶证"
  41. align="center">
  42. <template scope="scope">
  43. <img class="singleImg" :src="scope.row.realLicenseImg">
  44. </template>
  45. </el-table-column>
  46. <el-table-column
  47. label="驾照状态"
  48. align="center"
  49. width="150"
  50. inline-template >
  51. <div>
  52. <el-button v-if="row.licenseStatus==0" size="small" @click="passLicense(row)">通过</el-button>
  53. <el-button v-if="row.licenseStatus==0" size="small" type="danger" @click="failLicense(row)">失败</el-button>
  54. <span v-if="row.licenseStatus==1">成功</span>
  55. <span v-if="row.licenseStatus==2">失败</span>
  56. </div>
  57. </el-table-column>
  58. <el-table-column
  59. prop="realName"
  60. label="真实姓名"
  61. align="center">
  62. </el-table-column>
  63. <el-table-column
  64. prop="idCard"
  65. label="身份证"
  66. align="center">
  67. </el-table-column>
  68. <el-table-column
  69. label="身份证正面"
  70. align="center">
  71. <template scope="scope">
  72. <img class="singleImg" :src="scope.row.realIdCardFace">
  73. </template>
  74. </el-table-column>
  75. <el-table-column
  76. label="身份证背面"
  77. align="center">
  78. <template scope="scope">
  79. <img class="singleImg" :src="scope.row.realIdCardBack">
  80. </template>
  81. </el-table-column>
  82. <el-table-column
  83. label="身份证状态"
  84. align="center"
  85. width="150"
  86. inline-template >
  87. <div>
  88. <el-button v-if="row.idStatus==0" size="small" @click="passId(row)">通过</el-button>
  89. <el-button v-if="row.idStatus==0" size="small" type="danger" @click="failId(row)">失败</el-button>
  90. <span v-if="row.idStatus==1">成功</span>
  91. <span v-if="row.idStatus==2">失败</span>
  92. </div>
  93. </el-table-column>
  94. <el-table-column
  95. :context="_self"
  96. width="80"
  97. inline-template
  98. label="操作"
  99. align="center">
  100. <div>
  101. <el-button size="small" type="danger" @click="deleteRow(row)">删除</el-button>
  102. </div>
  103. </el-table-column>
  104. </el-table>
  105. <div class="pagination-wrapper" v-show="!loading">
  106. <el-pagination layout="sizes, prev, pager, next" :page-size="pageSize" :total="totalNumber"
  107. :page-size="pageSize"
  108. :current-page="currentPage" @current-change="pageChange" @size-change="sizeChange">
  109. </el-pagination>
  110. </div>
  111. </template>
  112. <jsp:include page="contentAfter.jsp"/>
  113. </body>
  114. <script>
  115. new Vue({
  116. el: '#app',
  117. created: function () {
  118. this.getRows();
  119. },
  120. data: function () {
  121. return {
  122. menu: '16-1',
  123. user: {
  124. id: '',
  125. username: 'admin',
  126. avatar: ''
  127. },
  128. loading: false,
  129. totalNumber: 0,
  130. totalPage: 10,
  131. currentPage: 1,
  132. pageSize: 20,
  133. rows: []
  134. };
  135. },
  136. methods: {
  137. logout: function () {
  138. this.$confirm('确定要注销吗?', '提示', {
  139. confirmButtonText: '确定',
  140. cancelButtonText: '取消',
  141. type: 'info'
  142. }).then(function () {
  143. localStorage.removeItem('user');
  144. this.$router.push({path: '/login'});
  145. }.bind(this)).catch(function (e) {
  146. });
  147. },
  148. getRows: function () {
  149. $.get({
  150. url: '../authenticationInfo/page',
  151. data: {
  152. currentPage: this.currentPage,
  153. pageNumber: this.pageSize
  154. }
  155. }).then(function (res) {
  156. if (res.success) {
  157. this.totalNumber = res.data.page.totalNumber;
  158. this.rows = res.data.pp;
  159. }
  160. }.bind(this))
  161. },
  162. pageChange: function (page) {
  163. this.currentPage = page;
  164. this.getRows();
  165. },
  166. sizeChange: function (size) {
  167. this.pageSize = size;
  168. this.getRows();
  169. },
  170. editRow: function (row) {
  171. window.location = 'authenticationInfo?id=' + row.id;
  172. },
  173. deleteRow: function (row) {
  174. this.$confirm('确定要删除吗?', '提示', {
  175. confirmButtonText: '删除',
  176. cancelButtonText: '取消',
  177. type: 'warning'
  178. }).then(function () {
  179. return $.post({
  180. url: '../authenticationInfo/del',
  181. data: {
  182. id: row.id
  183. }
  184. })
  185. }.bind(this)).then(function (res) {
  186. if (res.success) {
  187. this.$message.success('删除成功');
  188. this.getRows();
  189. } else {
  190. this.$message.error('删除失败');
  191. }
  192. }.bind(this)).catch(function () {
  193. });
  194. },
  195. create: function () {
  196. window.location = 'labelInfo';
  197. },
  198. passLicense: function (row) {
  199. this.$confirm('确定要通过驾照吗?', '提示', {
  200. confirmButtonText: '添加',
  201. cancelButtonText: '取消',
  202. type: 'warning'
  203. }).then(function () {
  204. return $.post({
  205. url: '../authenticationInfo/pass',
  206. data: {
  207. id : row.id,
  208. typeFlag : 0,
  209. }
  210. })
  211. }.bind(this)).then(function (res) {
  212. if (res.success) {
  213. this.$message.success('成功');
  214. this.getRows();
  215. } else {
  216. this.$message.error('失败');
  217. }
  218. }.bind(this)).catch(function () {
  219. });
  220. },
  221. failLicense : function (row) {
  222. this.$confirm('确定要失败驾照吗?', '提示', {
  223. confirmButtonText: '添加',
  224. cancelButtonText: '取消',
  225. type: 'warning'
  226. }).then(function () {
  227. return $.post({
  228. url: '../authenticationInfo/fail',
  229. data: {
  230. id : row.id,
  231. typeFlag : 0,
  232. }
  233. })
  234. }.bind(this)).then(function (res) {
  235. if (res.success) {
  236. this.$message.success('成功');
  237. this.getRows();
  238. } else {
  239. this.$message.error('失败');
  240. }
  241. }.bind(this)).catch(function () {
  242. });
  243. },
  244. passId: function (row) {
  245. this.$confirm('确定要通过身份证吗?', '提示', {
  246. confirmButtonText: '添加',
  247. cancelButtonText: '取消',
  248. type: 'warning'
  249. }).then(function () {
  250. return $.post({
  251. url: '../authenticationInfo/pass',
  252. data: {
  253. id : row.id,
  254. typeFlag : 1,
  255. }
  256. })
  257. }.bind(this)).then(function (res) {
  258. if (res.success) {
  259. this.$message.success('成功');
  260. this.getRows();
  261. } else {
  262. this.$message.error('失败');
  263. }
  264. }.bind(this)).catch(function () {
  265. });
  266. },
  267. failId: function (row) {
  268. this.$confirm('确定要失败身份证吗?', '提示', {
  269. confirmButtonText: '添加',
  270. cancelButtonText: '取消',
  271. type: 'warning'
  272. }).then(function () {
  273. return $.post({
  274. url: '../authenticationInfo/fail',
  275. data: {
  276. id : row.id,
  277. typeFlag : 1,
  278. }
  279. })
  280. }.bind(this)).then(function (res) {
  281. if (res.success) {
  282. this.$message.success('成功');
  283. this.getRows();
  284. } else {
  285. this.$message.error('失败');
  286. }
  287. }.bind(this)).catch(function () {
  288. });
  289. },
  290. }
  291. })
  292. </script>
  293. </html>