health-code-record-list.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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. <div class="c-item">
  28. <label class="c-label">数据类型:</label>
  29. <el-select v-model="p.dataType" placeholder="请选择">
  30. <el-option label="-全部-" value=""> </el-option>
  31. <el-option label="健康码正常" value="0"> </el-option>
  32. <el-option label="健康码异常" value="1"> </el-option>
  33. </el-select>
  34. </div>
  35. <sa-item type="text" name="姓名" v-model="p.name"></sa-item>
  36. <sa-item type="enum" name="出入场" v-model="p.direction" :jv="{1: '入场', 2: '离场'}" jtype="4"
  37. def="不限">
  38. </sa-item>
  39. </div>
  40. <div>
  41. <div class="c-item">
  42. <label class="c-label">健康码:</label>
  43. <el-select v-model="p.healthStatus" placeholder="请选择">
  44. <el-option label="-全部-" value=""> </el-option>
  45. <el-option label="绿码" value="绿码"> </el-option>
  46. <el-option label="黄码" value="黄码"> </el-option>
  47. <el-option label="红码" value="红码"> </el-option>
  48. </el-select>
  49. </div>
  50. <sa-item type="datetime" name="开始时间" v-model="p.startTime"></sa-item>
  51. <sa-item type="datetime" name="结束时间" v-model="p.endTime"></sa-item>
  52. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询
  53. </el-button>
  54. <el-button type="info" icon="el-icon-refresh"
  55. @click="p.direction='';p.name='';p.healthStatus='';p.startTime='';p.endTime='';f5()">
  56. 重置
  57. </el-button>
  58. </div>
  59. <div>
  60. <el-button type="primary" icon="el-icon-plus" @click="add"
  61. v-if="sa.isAuth('health-code-record-add')">手工补录
  62. </el-button>
  63. </div>
  64. </el-col>
  65. <el-col :span="4">
  66. </el-col>
  67. </el-row>
  68. </el-form>
  69. <!-- ------------- 快捷按钮 ------------- -->
  70. <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 10px;">
  71. <sa-td name="序号" type="index"></sa-td>
  72. <!-- <sa-td name="组织" prop="deptName" width="120"></sa-td>-->
  73. <sa-td name="姓名" prop="name"></sa-td>
  74. <sa-td name="联系号码" prop="phone"></sa-td>
  75. <!-- <sa-td name="图片" prop="picture" type="img"></sa-td>-->
  76. <!-- <sa-td name="体温" prop="temperature"></sa-td>-->
  77. <sa-td name="健康码" prop="healthStatus"></sa-td>
  78. <sa-td name="场所/通道" prop="channel"></sa-td>
  79. <sa-td name="出/入" prop="direction" type="enum" :jv="{1: '入场', 2: '离场'}"></sa-td>
  80. <!-- <sa-td name="检测设备" prop="terminalName"></sa-td>-->
  81. <sa-td name="检测时间" prop="visitDate" width="160"></sa-td>
  82. <!-- <sa-td name="分类" prop="type" type="enum" :jv="{1: '补录', 2: '设备上传'}"></sa-td>-->
  83. <sa-td name="通知状态" prop="isNotify" type="enum" :jv="{1: '未通知', 2: '已通知', 0: '-'}"></sa-td>
  84. <sa-td name="处置状态" prop="isSolve" type="enum" :jv="{1: '未处置', 2: '已处置', 0: '-'}"></sa-td>
  85. <sa-td name="处置方法" prop="way"></sa-td>
  86. <el-table-column label="操作" width="240px">
  87. <template slot-scope="s">
  88. <el-button v-if="s.row.isSolve == 1" class="c-btn" type="primary"
  89. @click="solveFn1(s.row.id)">处置
  90. </el-button>
  91. <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看
  92. </el-button>
  93. <el-button v-if="sa.isAuth('health-code-record-add')" class="c-btn" type="primary"
  94. icon="el-icon-edit" @click="update(s.row)">修改
  95. </el-button>
  96. <el-button v-if="sa.isAuth('health-code-record-del')" class="c-btn" type="danger"
  97. icon="el-icon-delete"
  98. @click="del(s.row)">删除
  99. </el-button>
  100. </template>
  101. </el-table-column>
  102. </el-table>
  103. <!-- ------------- 分页 ------------- -->
  104. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  105. </sa-item>
  106. </div>
  107. <el-dialog title="请填写处置方法" :visible.sync="solveDate.visible" width="38%">
  108. <sa-item type="textarea" name="处置方法" v-model="solveDate.form.way"></sa-item>
  109. <span slot="footer" class="dialog-footer">
  110. <el-button @click="solveDate.visible = false">取 消</el-button>
  111. <el-button type="primary" @click="solve">保 存</el-button>
  112. </span>
  113. </el-dialog>
  114. </div>
  115. <script>
  116. var app = new Vue({
  117. components: {
  118. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  119. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  120. },
  121. el: '.vue-box',
  122. data: {
  123. healthStatusList: [{
  124. name: '全部',
  125. value: ''
  126. },
  127. {
  128. name: '绿码',
  129. value: '绿码'
  130. },
  131. {
  132. name: '红码',
  133. value: '红码'
  134. },
  135. {
  136. name: '黄码',
  137. value: '黄码'
  138. },
  139. ],
  140. p: { // 查询参数
  141. id: '', // 主键
  142. direction: '', // 出入(1=入场,2=离场)
  143. deptName: '', // 部门名称
  144. startTime: '',
  145. endTime: '',
  146. name: '', // 姓名
  147. idCard: '', // 身份证
  148. channel: '', // 通过通道
  149. venues: '', // 场所
  150. temperature: '', // 体温
  151. healthStatus: '', // 健康码
  152. unhealthy: '',
  153. dataType: "",
  154. pageNo: 1, // 当前页
  155. pageSize: 10, // 页大小
  156. sortType: 0 // 排序方式
  157. },
  158. dataCount: 0,
  159. dataList: [], // 数据集合
  160. solveDate: {
  161. visible: false,
  162. form: {
  163. id:'',
  164. way: '',
  165. },
  166. },
  167. },
  168. methods: {
  169. solveFn1(id){
  170. this.solveDate.visible = true;
  171. this.solveDate.form.id = id;
  172. },
  173. solve(){
  174. sa.ajax('/TbPersonVisitRecord/solve?' , this.solveDate.form, function(res) {
  175. sa.alert('保存成功');
  176. this.solveDate.visible = false;
  177. this.f5();
  178. }.bind(this))
  179. },
  180. // 刷新
  181. f5: function () {
  182. sa.ajax('/TbPersonVisitRecord/getList', sa.removeNull(this.p), function (res) {
  183. this.dataList = res.data; // 数据
  184. this.dataCount = res.dataCount; // 数据总数
  185. sa.f5TableHeight(); // 刷新表格高度
  186. }.bind(this));
  187. },
  188. add() {
  189. sa.showIframe('新增数据', 'health-code-record-add.html?id=-1', '1200px', '90%');
  190. },
  191. // 查看
  192. get: function (data) {
  193. sa.showIframe('数据详情', 'health-code-record-info.html?id=' + data.id, '700px', '70%');
  194. },
  195. // 查看 - 根据选中的
  196. getBySelect: function (data) {
  197. var selection = this.$refs['data-table'].selection;
  198. if (selection.length == 0) {
  199. return sa.msg('请选择一条数据')
  200. }
  201. this.get(selection[0]);
  202. },
  203. // 修改
  204. update: function (data) {
  205. sa.showIframe('修改数据', 'health-code-record-edit.html?id=' + data.id, '900px', '70%');
  206. },
  207. // 删除
  208. del: function (data) {
  209. sa.confirm('是否删除,此操作不可撤销', function () {
  210. sa.ajax('/TbPersonVisitRecord/deleteHealthRecord?id=' + data.id, function (res) {
  211. sa.arrayDelete(this.dataList, data);
  212. sa.ok('删除成功');
  213. sa.f5TableHeight(); // 刷新表格高度
  214. }.bind(this))
  215. }.bind(this));
  216. },
  217. },
  218. created: function () {
  219. this.f5();
  220. sa.onInputEnter();
  221. }
  222. })
  223. </script>
  224. </body>
  225. </html>