tb-person-visit-temperature-list.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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="text" name="联系电话" v-model="p.phone">
  29. </sa-item>
  30. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询
  31. </el-button>
  32. <el-button type="info" icon="el-icon-refresh"
  33. @click="p.name='';p.phone='';f5()">
  34. 重置</el-button>
  35. </div>
  36. </el-col>
  37. <el-col :span="4">
  38. </el-col>
  39. </el-row>
  40. </el-form>
  41. <!-- ------------- 快捷按钮 ------------- -->
  42. <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 10px;">
  43. <sa-td name="序号" type="index"></sa-td>
  44. <sa-td name="组织" prop="deptName"></sa-td>
  45. <sa-td name="姓名" prop="name"></sa-td>
  46. <sa-td name="联系号码" prop="phone"></sa-td>
  47. <sa-td name="场所" prop="channel"></sa-td>
  48. <sa-td name="图片" prop="picture" type="img"></sa-td>
  49. <sa-td name="体温" prop="temperature"></sa-td>
  50. <sa-td name="时间" prop="visitDate" width="160"></sa-td>
  51. </el-table>
  52. <!-- ------------- 分页 ------------- -->
  53. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  54. </sa-item>
  55. </div>
  56. </div>
  57. <script>
  58. var app = new Vue({
  59. components: {
  60. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  61. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  62. },
  63. el: '.vue-box',
  64. data: {
  65. healthStatusList: [{
  66. name: '全部',
  67. value: ''
  68. },
  69. {
  70. name: '绿码',
  71. value: '绿码'
  72. },
  73. {
  74. name: '红码',
  75. value: '红码'
  76. },
  77. {
  78. name: '黄码',
  79. value: '黄码'
  80. },
  81. ],
  82. p: { // 查询参数
  83. id: '', // 主键
  84. phone: '', // 出入(1=入场,2=离场)
  85. name: '', // 姓名
  86. type:2,
  87. pageNo: 1, // 当前页
  88. pageSize: 10, // 页大小
  89. sortType: 0 // 排序方式
  90. },
  91. dataCount: 0,
  92. dataList: [], // 数据集合
  93. },
  94. methods: {
  95. exportFn() {
  96. sa.confirm('是否导出符合条件的记录?', function() {
  97. sa.ajax('/TbPersonVisitRecord/export', sa.removeNull(this.p), function(res) {
  98. window.location.href = res.data;
  99. }.bind(this));
  100. }.bind(this));
  101. },
  102. // 刷新
  103. f5: function() {
  104. sa.ajax('/TbPersonVisitRecord/getList', sa.removeNull(this.p), function(res) {
  105. this.dataList = res.data; // 数据
  106. this.dataCount = res.dataCount; // 数据总数
  107. sa.f5TableHeight(); // 刷新表格高度
  108. }.bind(this));
  109. },
  110. // 查看
  111. get: function(data) {
  112. sa.showIframe('数据详情', 'tb-person-visit-record-info.html?id=' + data.id, '1050px', '90%');
  113. },
  114. // 查看 - 根据选中的
  115. getBySelect: function(data) {
  116. var selection = this.$refs['data-table'].selection;
  117. if (selection.length == 0) {
  118. return sa.msg('请选择一条数据')
  119. }
  120. this.get(selection[0]);
  121. },
  122. // 修改
  123. update: function(data) {
  124. sa.showIframe('修改数据', 'tb-person-visit-record-add.html?id=' + data.id, '1000px', '90%');
  125. },
  126. // 新增
  127. add: function(data) {
  128. sa.showIframe('新增数据', 'tb-person-visit-record-add.html?id=-1', '1000px', '90%');
  129. },
  130. // 删除
  131. del: function(data) {
  132. sa.confirm('是否删除,此操作不可撤销', function() {
  133. sa.ajax('/TbPersonVisitRecord/delete?id=' + data.id, function(res) {
  134. sa.arrayDelete(this.dataList, data);
  135. sa.ok('删除成功');
  136. sa.f5TableHeight(); // 刷新表格高度
  137. }.bind(this))
  138. }.bind(this));
  139. },
  140. // 批量删除
  141. deleteByIds: function() {
  142. // 获取选中元素的id列表
  143. let selection = this.$refs['data-table'].selection;
  144. let ids = sa.getArrayField(selection, 'id');
  145. if (selection.length == 0) {
  146. return sa.msg('请至少选择一条数据')
  147. }
  148. // 提交删除
  149. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  150. sa.ajax('/TbPersonVisitRecord/deleteByIds', {
  151. ids: ids.join(',')
  152. }, function(res) {
  153. sa.arrayDelete(this.dataList, selection);
  154. sa.ok('删除成功');
  155. sa.f5TableHeight(); // 刷新表格高度
  156. }.bind(this))
  157. }.bind(this));
  158. },
  159. },
  160. created: function() {
  161. this.f5();
  162. sa.onInputEnter();
  163. }
  164. })
  165. </script>
  166. </body>
  167. </html>