tb-pass-record-list.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>放行日志-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <!-- 所有的 css & js 资源 -->
  8. <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
  9. <link rel="stylesheet" href="../../static/sa.css">
  10. <script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
  11. <script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
  12. <script src="https://unpkg.com/http-vue-loader@1.4.2/src/httpVueLoader.js"></script>
  13. <script src="https://unpkg.com/jquery@3.4.1/dist/jquery.js"></script>
  14. <script src="https://www.layuicdn.com/layer-v3.1.1/layer.js"></script>
  15. <script src="../../static/sa.js"></script>
  16. </head>
  17. <body>
  18. <div class="vue-box" style="display: none;" :style="'display: block;'">
  19. <div class="c-panel">
  20. <!-- ------------- 检索参数 ------------- -->
  21. <div class="c-title">检索参数</div>
  22. <el-form ref="form" :model='p' @submit.native.prevent>
  23. <sa-item type="text" name="企业名称" v-model="p.customerName"></sa-item>
  24. <sa-item type="text" name="车牌号码" v-model="p.cardNo"></sa-item>
  25. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  26. <br />
  27. </el-form>
  28. <!-- ------------- 快捷按钮 ------------- -->
  29. <sa-item type="fast-btn" show="reset"></sa-item>
  30. <!-- ------------- 数据列表 ------------- -->
  31. <el-table class="data-table" ref="data-table" :data="dataList" >
  32. <sa-td type="selection"></sa-td>
  33. <!-- <sa-td name="主键" prop="id" type="num"></sa-td>-->
  34. <!-- <sa-td name="业务id" prop="businessId" ></sa-td>-->
  35. <!-- <sa-td name="客户id" prop="customerId" ></sa-td>-->
  36. <sa-td name="企业名称" prop="customerName" ></sa-td>
  37. <sa-td name="车牌号码" prop="cardNo" ></sa-td>
  38. <sa-td name="车牌国籍" prop="carCountryName" ></sa-td>
  39. <sa-td name="入场时间" prop="inTime" ></sa-td>
  40. <sa-td name="出场时间" prop="outTime" ></sa-td>
  41. <sa-td name="状态" prop="status" type="enum" :jv="{1: '未入场', 2: '已入场', 3: '已出场'}"></sa-td>
  42. <sa-td name="停车时长(分钟)" prop="partTime" ></sa-td>
  43. <!-- <sa-td name="更新时间" prop="updateTime" ></sa-td>-->
  44. <!-- <el-table-column label="操作" fixed="right" width="240px">-->
  45. <!-- <template slot-scope="s">-->
  46. <!-- <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>-->
  47. <!-- </template>-->
  48. <!-- </el-table-column>-->
  49. </el-table>
  50. <!-- ------------- 分页 ------------- -->
  51. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
  52. </div>
  53. </div>
  54. <script>
  55. var app = new Vue({
  56. components: {
  57. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  58. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  59. },
  60. el: '.vue-box',
  61. data: {
  62. p: { // 查询参数
  63. id: '', // 主键
  64. businessId: '', // 业务id
  65. customerId: '', // 客户id
  66. customerName: '', // 客户名称
  67. cardNo: '', // 车牌号
  68. carCountryName: '', //车牌国籍
  69. status: '', // 状态(=未入场, 2=已入场, 3=已出场)
  70. inTime: '', // 进境时间
  71. outTime: '', // 离境时间
  72. updateTime: '', // 更新时间
  73. pageNo: 1, // 当前页
  74. pageSize: 10, // 页大小
  75. sortType: 9 // 排序方式
  76. },
  77. dataCount: 0,
  78. dataList: [], // 数据集合
  79. },
  80. methods: {
  81. // 刷新
  82. f5: function() {
  83. sa.ajax('/TbPassRecord/getList', sa.removeNull(this.p), function(res) {
  84. this.dataList = res.data; // 数据
  85. this.dataCount = res.dataCount; // 数据总数
  86. sa.f5TableHeight(); // 刷新表格高度
  87. }.bind(this));
  88. },
  89. // 查看
  90. get: function(data) {
  91. sa.showIframe('数据详情', 'tb-pass-record-info.html?id=' + data.id, '1050px', '90%');
  92. },
  93. // 查看 - 根据选中的
  94. getBySelect: function(data) {
  95. var selection = this.$refs['data-table'].selection;
  96. if(selection.length == 0) {
  97. return sa.msg('请选择一条数据')
  98. }
  99. this.get(selection[0]);
  100. },
  101. },
  102. created: function() {
  103. this.f5();
  104. sa.onInputEnter();
  105. }
  106. })
  107. </script>
  108. </body>
  109. </html>