SealDestroyList.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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 :xl="6" :lg="7" :md="8" :sm="24">
  8. <a-form-item label="印章名称">
  9. <j-input placeholder="请输入印章名称" v-model="queryParam.sealName"></j-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13. <a-form-item label="印制材质">
  14. <j-input placeholder="请输入印制材质" v-model="queryParam.sealMaterial"></j-input>
  15. </a-form-item>
  16. </a-col>
  17. <template v-if="toggleSearchStatus">
  18. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  19. <a-form-item label="印章尺寸">
  20. <j-input placeholder="请输入印章尺寸" v-model="queryParam.sealSize"></j-input>
  21. </a-form-item>
  22. </a-col>
  23. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  24. <a-form-item label="销毁日期">
  25. <j-date placeholder="请选择销毁日期" v-model="queryParam.destroyDate"></j-date>
  26. </a-form-item>
  27. </a-col>
  28. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  29. <a-form-item label="经办人">
  30. <j-input placeholder="请输入经办人" v-model="queryParam.handlingPerson"></j-input>
  31. </a-form-item>
  32. </a-col>
  33. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  34. <a-form-item label="经办部门">
  35. <j-input placeholder="请输入经办部门" v-model="queryParam.handlingDept"></j-input>
  36. </a-form-item>
  37. </a-col>
  38. </template>
  39. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  40. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  41. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  42. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  43. <a @click="handleToggleSearch" style="margin-left: 8px">
  44. {{ toggleSearchStatus ? '收起' : '展开' }}
  45. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  46. </a>
  47. </span>
  48. </a-col>
  49. </a-row>
  50. </a-form>
  51. </div>
  52. <!-- 查询区域-END -->
  53. <!-- 操作按钮区域 -->
  54. <div class="table-operator">
  55. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  56. <!-- <a-button type="primary" icon="download" @click="handleExportXls('销毁印章登记')">导出</a-button>-->
  57. <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
  58. <!-- <a-button type="primary" icon="import">导入</a-button>-->
  59. <!-- </a-upload>-->
  60. <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
  61. <a-menu slot="overlay">
  62. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  63. </a-menu>
  64. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  65. </a-dropdown> -->
  66. </div>
  67. <!-- table区域-begin -->
  68. <div>
  69. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  70. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  71. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  72. </div>
  73. <a-table
  74. ref="table"
  75. size="middle"
  76. bordered
  77. rowKey="id"
  78. :columns="columns"
  79. :dataSource="dataSource"
  80. :pagination="ipagination"
  81. :loading="loading"
  82. :rowSelection="{fixed:true,selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  83. @change="handleTableChange">
  84. <template slot="htmlSlot" slot-scope="text">
  85. <div v-html="text"></div>
  86. </template>
  87. <template slot="imgSlot" slot-scope="text">
  88. <span v-if="!text" style="font-size: 12px;font-style: italic;">无此图片</span>
  89. <img v-else :src="getImgView(text)" height="25px" alt="图片不存在" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  90. </template>
  91. <template slot="fileSlot" slot-scope="text">
  92. <span v-if="!text" style="font-size: 12px;font-style: italic;">无此文件</span>
  93. <a-button
  94. v-else
  95. :ghost="true"
  96. type="primary"
  97. icon="download"
  98. size="small"
  99. @click="uploadFile(text)">
  100. 下载
  101. </a-button>
  102. </template>
  103. <span slot="action" slot-scope="text, record">
  104. <a @click="handleEdit(record)">编辑</a>
  105. <!-- <a-divider type="vertical" />
  106. <a-dropdown>
  107. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  108. <a-menu slot="overlay">
  109. <a-menu-item>
  110. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  111. <a>删除</a>
  112. </a-popconfirm>
  113. </a-menu-item>
  114. </a-menu>
  115. </a-dropdown> -->
  116. </span>
  117. </a-table>
  118. </div>
  119. <sealDestroy-modal ref="modalForm" @ok="modalFormOk"></sealDestroy-modal>
  120. </a-card>
  121. </template>
  122. <script>
  123. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  124. import SealDestroyModal from './modules/SealDestroyModal'
  125. import JDate from '@/components/jeecg/JDate.vue'
  126. import JInput from '@/components/jeecg/JInput.vue'
  127. export default {
  128. name: "SealDestroyList",
  129. mixins:[JeecgListMixin],
  130. components: {
  131. JDate,
  132. JInput,
  133. SealDestroyModal
  134. },
  135. data () {
  136. return {
  137. description: '销毁印章登记管理页面',
  138. // 表头
  139. columns: [
  140. {
  141. title: '#',
  142. dataIndex: '',
  143. key:'rowIndex',
  144. width:60,
  145. align:"center",
  146. customRender:function (t,r,index) {
  147. return parseInt(index)+1;
  148. }
  149. },
  150. {
  151. title:'印章名称',
  152. align:"center",
  153. dataIndex: 'sealName'
  154. },
  155. {
  156. title:'印制材质',
  157. align:"center",
  158. dataIndex: 'sealMaterial'
  159. },
  160. {
  161. title:'印章尺寸',
  162. align:"center",
  163. dataIndex: 'sealSize'
  164. },
  165. {
  166. title:'销毁日期',
  167. align:"center",
  168. dataIndex: 'destroyDate',
  169. customRender:function (text) {
  170. return !text?"":(text.length>10?text.substr(0,10):text)
  171. }
  172. },
  173. {
  174. title:'经办人',
  175. align:"center",
  176. dataIndex: 'handlingPerson'
  177. },
  178. {
  179. title:'经办部门',
  180. align:"center",
  181. dataIndex: 'handlingDept'
  182. },
  183. {
  184. title: '操作',
  185. dataIndex: 'action',
  186. align:"center",
  187. scopedSlots: { customRender: 'action' }
  188. }
  189. ],
  190. url: {
  191. list: "/sealDestroy/sealDestroy/list",
  192. delete: "/sealDestroy/sealDestroy/delete",
  193. deleteBatch: "/sealDestroy/sealDestroy/deleteBatch",
  194. exportXlsUrl: "/sealDestroy/sealDestroy/exportXls",
  195. importExcelUrl: "sealDestroy/sealDestroy/importExcel",
  196. },
  197. dictOptions:{},
  198. }
  199. },
  200. computed: {
  201. importExcelUrl: function(){
  202. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  203. }
  204. },
  205. methods: {
  206. initDictConfig(){
  207. },
  208. handleAdd: function () {
  209. this.$refs.modalForm.add();
  210. this.$refs.modalForm.title = "销毁印章登记";
  211. this.$refs.modalForm.disableSubmit = false;
  212. },
  213. }
  214. }
  215. </script>
  216. <style scoped lang="less">
  217. @import '~@assets/less/common.less';
  218. /deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item>.ant-form-item-label{
  219. width: 26% ;
  220. }
  221. </style>