CertificateManagement.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. <template>
  2. <a-card :bordered="false" >
  3. <!-- 查询 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. <a-col :md="6" :sm="12">
  8. <a-form-item label="证件名称">
  9. <!--<a-input placeholder="请输入账号查询" v-model="queryParam.username"></a-input>-->
  10. <a-input placeholder="输入证件名称查询" v-model="queryParam.name"></a-input>
  11. </a-form-item>
  12. </a-col>
  13. <a-col :md="6" :sm="12">
  14. <a-form-item label="起始日期">
  15. <a-date-picker
  16. style="width: 100%"
  17. placeholder="请选择购买日期"
  18. v-model="queryParam.beginDate"
  19. />
  20. </a-form-item>
  21. </a-col>
  22. <a-col :md="6" :sm="12">
  23. <a-form-item label="到期时间">
  24. <a-date-picker
  25. style="width: 100%"
  26. placeholder="请选择购买日期"
  27. v-model="queryParam.endDate"
  28. />
  29. </a-form-item>
  30. </a-col>
  31. <template v-if="toggleSearchStatus">
  32. <a-col :md="6" :sm="12">
  33. <a-form-item label="证件编号">
  34. <a-input placeholder="输入证件编号查询" v-model="queryParam.code"></a-input>
  35. </a-form-item>
  36. </a-col>
  37. </template>
  38. <a-col :md="6" :sm="8">
  39. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  40. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  41. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  42. <a @click="handleToggleSearch" style="margin-left: 8px">
  43. {{ toggleSearchStatus ? '收起' : '展开' }}
  44. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  45. </a>
  46. </span>
  47. </a-col>
  48. </a-row>
  49. </a-form>
  50. </div>
  51. <!-- 操作按钮区域 -->
  52. <div class="table-operator" style="border-top: 5px">
  53. <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>
  54. <a-button @click="handleDelete" type="primary" icon="plus">删除</a-button>
  55. </div>
  56. <!-- table区域-begin -->
  57. <div>
  58. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  59. <i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项&nbsp;&nbsp;
  60. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  61. </div>
  62. <a-table
  63. ref="table"
  64. bordered
  65. size="middle"
  66. rowKey="id"
  67. :columns="columns"
  68. :dataSource="dataSource"
  69. :pagination="ipagination"
  70. :loading="loading"
  71. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  72. @change="handleTableChange">
  73. <span slot="operation" slot-scope="text, record">
  74. <a @click="handleEdit(record)">编辑</a>
  75. </span>
  76. </a-table>
  77. </div>
  78. <!-- 新增框 -->
  79. <add-certificate-management ref='AddCertificateManagement'></add-certificate-management>
  80. </a-card>
  81. </template>
  82. <script>
  83. import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  84. import AddCertificateManagement from './modules/AddCertificateManagement'
  85. export default {
  86. name: "CertificateManagement",
  87. mixins: [JeecgListMixin],
  88. components: {
  89. AddCertificateManagement
  90. },
  91. data() {
  92. return {
  93. queryParam:{ //查询条件
  94. },
  95. // 表头
  96. columns:[
  97. {
  98. title: '证件名称',
  99. align: "center",
  100. dataIndex: 'name',
  101. width: 120
  102. },
  103. {
  104. title: '证件所有人',
  105. align: "center",
  106. dataIndex: 'userId',
  107. width: 120
  108. },
  109. {
  110. title: '证件编号',
  111. align: "center",
  112. dataIndex: 'code',
  113. width: 120
  114. },
  115. {
  116. title: '起始日期',
  117. align: "center",
  118. dataIndex: 'beginDate',
  119. width: 120
  120. },
  121. {
  122. title: '到期时间',
  123. align: "center",
  124. dataIndex: 'endDate',
  125. width: 120
  126. },
  127. {
  128. title: '管理人',
  129. align: "center",
  130. dataIndex: 'manageId',
  131. width: 120
  132. },
  133. {
  134. title: '提前通知时间/月',
  135. align: "center",
  136. dataIndex: 'noticeMonth',
  137. width: 120
  138. },
  139. {
  140. title: '备注',
  141. align: "center",
  142. dataIndex: 'remarks',
  143. width: 120
  144. },
  145. {
  146. title: '操作',
  147. align: "center",
  148. dataIndex: 'operation',
  149. scopedSlots: { customRender: 'operation' },
  150. width: 120
  151. },
  152. ]
  153. }
  154. },
  155. computed: {
  156. },
  157. created(){
  158. this.getData()
  159. },
  160. methods: {
  161. // 查询
  162. searchQuery(){
  163. },
  164. //重置
  165. searchReset(){
  166. this.queryParam={}
  167. },
  168. // 获取数据
  169. getData(){
  170. },
  171. // 删除
  172. handleDelete(){
  173. },
  174. // 添加
  175. handleAdd(){
  176. this.$refs.AddCertificateManagement.visible = true
  177. },
  178. //编辑
  179. handleEdit(record){
  180. this.$refs.AddCertificateManagement.visible = true
  181. this.$refs.AddCertificateManagement.defult = 'edit'
  182. this.$refs.AddCertificateManagement.formState = record
  183. }
  184. }
  185. }
  186. </script>
  187. <style scoped>
  188. @import '~@assets/less/common.less'
  189. </style>