tb-person-filing-list.html 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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. <sa-item type="text" name="姓名" v-model="p.name"></sa-item>
  25. <sa-item type="enum" name="类型" v-model="p.type" :jv="{1: '临时', 2: '内部'}" jtype="2" def="不限">
  26. </sa-item>
  27. <sa-item type="text" name="身份证" v-model="p.idCard"></sa-item>
  28. <sa-item type="enum" name="审核状态" v-model="p.judgeState" :jv="{0: '未审核', 1: '通过',2:'不通过'}" jtype="4"
  29. def="全部">
  30. </sa-item>
  31. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  32. <el-button type="info" icon="el-icon-refresh"
  33. @click="p.name='',p.type='',p.idCard='',p.judgeState='',f5()">重置</el-button>
  34. <el-button type="primary" icon="el-icon-plus" @click="add" v-if="sa.isAuth('tb-person-filing-add')">
  35. 新增</el-button>
  36. </el-form>
  37. <!-- ------------- 数据列表 ------------- -->
  38. <el-table class="data-table" ref="data-table" :data="dataList">
  39. <sa-td name="序号" type="index"></sa-td>
  40. <sa-td name="姓名" prop="name"></sa-td>
  41. <sa-td name="组织" prop="deptName"></sa-td>
  42. <sa-td name="联系号码" prop="phone"></sa-td>
  43. <sa-td name="身份证" prop="idCadStr" width="150"></sa-td>
  44. <sa-td type="img" name="人脸" prop="photo"> </sa-td>
  45. <sa-td name="类型" prop="type" type="enum" :jv="{1: '临时', 2: '内部'}"></sa-td>
  46. <sa-td name="来访事由" prop="visitReason"></sa-td>
  47. <sa-td name="审核状态" prop="judgeState" type="enum" :jv="{0: '未审核', 1: '通过', 2: '不通过'}"></sa-td>
  48. <sa-td name="审核时间" prop="judgeTime" not="-" width="140"></sa-td>
  49. <sa-td name="创建时间" prop="createTime" width="140"></sa-td>
  50. <sa-td name="更新时间" prop="updateTime" width="140"></sa-td>
  51. <el-table-column label="操作" fixed="right" width="240px">
  52. <template slot-scope="s">
  53. <el-button v-if="sa.isAuth('tb-person-filing-judge')&&s.row.judgeState==0" class="c-btn" type="success"
  54. @click="judgeFn(s.row)">审核
  55. </el-button>
  56. <el-button class="c-btn" type="success" @click="get(s.row)">查看
  57. </el-button>
  58. <el-button v-if="sa.isAuth('tb-person-filing-edit')" class="c-btn" type="primary"
  59. @click="update(s.row)">修改
  60. </el-button>
  61. <el-button v-if="sa.isAuth('tb-person-filing-del')" class="c-btn" type="danger"
  62. @click="del(s.row)">删除
  63. </el-button>
  64. </template>
  65. </el-table-column>
  66. </el-table>
  67. <!-- ------------- 分页 ------------- -->
  68. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  69. </sa-item>
  70. </div>
  71. </div>
  72. <script>
  73. var app = new Vue({
  74. components: {
  75. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  76. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  77. },
  78. el: '.vue-box',
  79. data: {
  80. p: { // 查询参数
  81. id: '', //
  82. judgeState: '', // 部门ID
  83. name: '', // 姓名
  84. type: '', // 类型(1=临时,2=内部)
  85. idCard: '', // 身份证
  86. pageSize: 15, // 页大小
  87. sortType: 0 // 排序方式
  88. },
  89. dataCount: 0,
  90. dataList: [], // 数据集合
  91. },
  92. methods: {
  93. judgeFn(data) {
  94. sa.showIframe('审核', 'tb-person-filing-judge.html?id=' + data.id, '700px', '70%');
  95. },
  96. // 刷新
  97. f5: function() {
  98. sa.ajax('/TbPersonFiling/getList', sa.removeNull(this.p), function(res) {
  99. this.dataList = res.data; // 数据
  100. this.dataCount = res.dataCount; // 数据总数
  101. sa.f5TableHeight(); // 刷新表格高度
  102. }.bind(this));
  103. },
  104. // 查看
  105. get: function(data) {
  106. sa.showIframe('数据详情', 'tb-person-filing-info.html?id=' + data.id, '700px', '70%');
  107. },
  108. // 查看 - 根据选中的
  109. getBySelect: function(data) {
  110. var selection = this.$refs['data-table'].selection;
  111. if (selection.length == 0) {
  112. return sa.msg('请选择一条数据')
  113. }
  114. this.get(selection[0]);
  115. },
  116. // 修改
  117. update: function(data) {
  118. sa.showIframe('修改数据', 'tb-person-filing-add.html?id=' + data.id, '700px', '80%');
  119. },
  120. // 新增
  121. add: function(data) {
  122. sa.showIframe('新增数据', 'tb-person-filing-add.html?id=-1', '700px', '80%');
  123. },
  124. // 删除
  125. del: function(data) {
  126. sa.confirm('是否删除,此操作不可撤销', function() {
  127. sa.ajax('/TbPersonFiling/delete?id=' + data.id, function(res) {
  128. sa.arrayDelete(this.dataList, data);
  129. sa.ok('删除成功');
  130. sa.f5TableHeight(); // 刷新表格高度
  131. }.bind(this))
  132. }.bind(this));
  133. },
  134. // 批量删除
  135. deleteByIds: function() {
  136. // 获取选中元素的id列表
  137. let selection = this.$refs['data-table'].selection;
  138. let ids = sa.getArrayField(selection, 'id');
  139. if (selection.length == 0) {
  140. return sa.msg('请至少选择一条数据')
  141. }
  142. // 提交删除
  143. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  144. sa.ajax('/TbPersonFiling/deleteByIds', {
  145. ids: ids.join(',')
  146. }, function(res) {
  147. sa.arrayDelete(this.dataList, selection);
  148. sa.ok('删除成功');
  149. sa.f5TableHeight(); // 刷新表格高度
  150. }.bind(this))
  151. }.bind(this));
  152. },
  153. },
  154. created: function() {
  155. this.f5();
  156. sa.onInputEnter();
  157. }
  158. })
  159. </script>
  160. </body>
  161. </html>