tb-person-visit-record-list.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>人员出入记录-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  8. <!-- 所有的 css & js 资源 -->
  9. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  10. <link rel="stylesheet" href="../../static/sa.css">
  11. <script src="../../static/kj/vue.min.js"></script>
  12. <script src="../../static/kj/element-ui/index.js"></script>
  13. <script src="../../static/kj/httpVueLoader.js"></script>
  14. <script src="../../static/kj/jquery.min.js"></script>
  15. <script src="../../static/kj/layer/layer.js"></script>
  16. <script src="../../static/sa.js"></script>
  17. </head>
  18. <body>
  19. <div class="vue-box" style="display: none;" :style="'display: block;'">
  20. <div class="c-panel">
  21. <!-- ------------- 检索参数 ------------- -->
  22. <div class="c-title">检索参数</div>
  23. <el-form ref="form" :model='p' @submit.native.prevent>
  24. <el-row>
  25. <el-col :span="20">
  26. <div>
  27. <sa-item type="text" name="姓名" v-model="p.name"></sa-item>
  28. <sa-item type="enum" name="出入场" v-model="p.direction" :jv="{1: '入场', 2: '离场'}" jtype="4"
  29. def="不限">
  30. </sa-item>
  31. <sa-item type="enum" name="健康码" v-model="p.healthStatus"
  32. :jv="{'绿码': '绿码', '黄码': '黄码', '红码': '红码'}" jtype="4" def="全部">
  33. </sa-item>
  34. <sa-item type="enum" name="是否放行" v-model="p.allowPass"
  35. :jv="{1: '放行', 0: '禁止'}" jtype="4" def="全部">
  36. </sa-item>
  37. </div>
  38. <div>
  39. <sa-item type="datetime" name="开始时间" v-model="p.startTime"></sa-item>
  40. <sa-item type="datetime" name="结束时间" v-model="p.endTime"></sa-item>
  41. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询
  42. </el-button>
  43. <el-button type="info" icon="el-icon-refresh"
  44. @click="p.direction='';p.name='';p.allowPass='';p.healthStatus='';p.startTime='';p.endTime='';f5()">
  45. 重置</el-button>
  46. <el-button type="primary" v-if="sa.isAuth('tb-person-visit-record-export')"
  47. icon="el-icon-s-unfold" @click="exportFn">导出</el-button>
  48. </div>
  49. <div>
  50. <el-button type="primary" icon="el-icon-plus" @click="add" v-if="sa.isAuth('tb-person-visit-record-add')">新增</el-button>
  51. </div>
  52. </el-col>
  53. <el-col :span="4">
  54. </el-col>
  55. </el-row>
  56. </el-form>
  57. <!-- ------------- 快捷按钮 ------------- -->
  58. <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 10px;">
  59. <sa-td name="序号" type="index"></sa-td>
  60. <sa-td name="组织" prop="deptName" width="120"></sa-td>
  61. <sa-td name="姓名" prop="name"></sa-td>
  62. <sa-td name="联系号码" prop="phone" width="120"></sa-td>
  63. <sa-td name="图片" prop="picture" type="img"></sa-td>
  64. <sa-td name="场所/通道" prop="channel"></sa-td>
  65. <sa-td name="出/入" prop="direction" type="enum" :jv="{1: '入场', 2: '离场'}"></sa-td>
  66. <sa-td name="体温" prop="temperature"></sa-td>
  67. <sa-td name="健康码" prop="healthStatus"></sa-td>
  68. <sa-td name="检测设备" prop="terminalName"></sa-td>
  69. <sa-td name="检测时间" prop="visitDate" width="160"></sa-td>
  70. <sa-td name="是否放行" prop="allowPass">
  71. <template slot-scope="s">
  72. <label v-if="s.row.allowPass">放行</label>
  73. <label v-else>禁止通行</label>
  74. </template>
  75. </sa-td>
  76. <sa-td name="分类" prop="type" type="enum" :jv="{1: '补录', 2: '设备上传'}"></sa-td>
  77. <el-table-column label="操作" fixed="right" width="240px">
  78. <template slot-scope="s">
  79. <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看
  80. </el-button>
  81. <el-button v-if="sa.isAuth('tb-person-visit-record-edit')" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>
  82. <el-button v-if="sa.isAuth('tb-person-visit-record-del')" class="c-btn" type="danger" icon="el-icon-delete"
  83. @click="del(s.row)">删除</el-button>
  84. </template>
  85. </el-table-column>
  86. </el-table>
  87. <!-- ------------- 分页 ------------- -->
  88. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  89. </sa-item>
  90. </div>
  91. </div>
  92. <script>
  93. var app = new Vue({
  94. components: {
  95. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  96. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  97. },
  98. el: '.vue-box',
  99. data: {
  100. healthStatusList: [{
  101. name: '全部',
  102. value: ''
  103. },
  104. {
  105. name: '绿码',
  106. value: '绿码'
  107. },
  108. {
  109. name: '红码',
  110. value: '红码'
  111. },
  112. {
  113. name: '黄码',
  114. value: '黄码'
  115. },
  116. ],
  117. p: { // 查询参数
  118. id: '', // 主键
  119. direction: '', // 出入(1=入场,2=离场)
  120. deptName: '', // 部门名称
  121. allowPass:'',
  122. startTime: '',
  123. endTime: '',
  124. name: '', // 姓名
  125. idCard: '', // 身份证
  126. channel: '', // 通过通道
  127. venues: '', // 场所
  128. temperature: '', // 体温
  129. healthStatus: '', // 健康码
  130. pageNo: 1, // 当前页
  131. pageSize: 10, // 页大小
  132. sortType: 0 // 排序方式
  133. },
  134. dataCount: 0,
  135. dataList: [], // 数据集合
  136. },
  137. methods: {
  138. exportFn() {
  139. sa.confirm('是否导出符合条件的记录?', function() {
  140. sa.ajax('/TbPersonVisitRecord/export', sa.removeNull(this.p), function(res) {
  141. window.location.href = res.data;
  142. }.bind(this));
  143. }.bind(this));
  144. },
  145. // 刷新
  146. f5: function() {
  147. sa.ajax('/TbPersonVisitRecord/getList', sa.removeNull(this.p), function(res) {
  148. this.dataList = res.data; // 数据
  149. this.dataCount = res.dataCount; // 数据总数
  150. sa.f5TableHeight(); // 刷新表格高度
  151. }.bind(this));
  152. },
  153. add(){
  154. sa.showIframe('新增数据', 'tb-person-visit-record-add.html?id=-1', '1200px', '90%');
  155. },
  156. // 查看
  157. get: function(data) {
  158. sa.showIframe('数据详情', 'tb-person-visit-record-info.html?id=' + data.id, '700px', '70%');
  159. },
  160. // 查看 - 根据选中的
  161. getBySelect: function(data) {
  162. var selection = this.$refs['data-table'].selection;
  163. if (selection.length == 0) {
  164. return sa.msg('请选择一条数据')
  165. }
  166. this.get(selection[0]);
  167. },
  168. // 修改
  169. update: function(data) {
  170. sa.showIframe('修改数据', 'tb-person-visit-record-edit.html?id=' + data.id, '900px', '70%');
  171. },
  172. // 删除
  173. del: function(data) {
  174. sa.confirm('是否删除,此操作不可撤销', function() {
  175. sa.ajax('/TbPersonVisitRecord/delete?id=' + data.id, function(res) {
  176. sa.arrayDelete(this.dataList, data);
  177. sa.ok('删除成功');
  178. sa.f5TableHeight(); // 刷新表格高度
  179. }.bind(this))
  180. }.bind(this));
  181. },
  182. },
  183. created: function() {
  184. this.f5();
  185. sa.onInputEnter();
  186. }
  187. })
  188. </script>
  189. </body>
  190. </html>