ReceivedMainList.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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.communicationsUnit"></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.receivedName"></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-date placeholder="请选择收文日期" v-model="queryParam.receivedDate" style="width: 100%;"></j-date>
  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.documentDate" style="width: 100%;"></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. <a-input placeholder="请输入收文份数" v-model="queryParam.receivedNum"></a-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.documentSymbol"></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="{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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  107. <a>删除</a>
  108. </a-popconfirm>
  109. <a-divider type="vertical" />
  110. <a @click="print(record)" :href="printMouldUrl" target="_blank">打印</a>
  111. <!-- <a-dropdown>
  112. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  113. <a-menu slot="overlay">
  114. <a-menu-item>
  115. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  116. <a>删除</a>
  117. </a-popconfirm>
  118. </a-menu-item>
  119. </a-menu>
  120. </a-dropdown> -->
  121. </span>
  122. </a-table>
  123. </div>
  124. <receivedMain-modal ref="modalForm" @ok="modalFormOk"></receivedMain-modal>
  125. </a-card>
  126. </template>
  127. <script>
  128. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  129. import ReceivedMainModal from './modules/ReceivedMainModal'
  130. import JDate from '@/components/jeecg/JDate.vue'
  131. import JInput from '@/components/jeecg/JInput.vue'
  132. export default {
  133. name: "ReceivedMainList",
  134. mixins:[JeecgListMixin],
  135. components: {
  136. JDate,
  137. JInput,
  138. ReceivedMainModal
  139. },
  140. data () {
  141. return {
  142. description: '收文登记管理页面',
  143. printMouldUrl:'',
  144. // 表头
  145. columns: [
  146. {
  147. title: '#',
  148. dataIndex: '',
  149. key:'rowIndex',
  150. width:60,
  151. align:"center",
  152. customRender:function (t,r,index) {
  153. return parseInt(index)+1;
  154. }
  155. },
  156. {
  157. title:'来文单位',
  158. align:"center",
  159. dataIndex: 'communicationsUnit'
  160. },
  161. {
  162. title:'收文名称',
  163. align:"center",
  164. dataIndex: 'receivedName'
  165. },
  166. {
  167. title:'收文日期',
  168. align:"center",
  169. dataIndex: 'receivedDate',
  170. customRender:function (text) {
  171. return !text?"":(text.length>10?text.substr(0,10):text)
  172. }
  173. },
  174. {
  175. title:'公文流转日期',
  176. align:"center",
  177. dataIndex: 'documentDate',
  178. customRender:function (text) {
  179. return !text?"":(text.length>10?text.substr(0,10):text)
  180. }
  181. },
  182. {
  183. title:'收文份数',
  184. align:"center",
  185. dataIndex: 'receivedNum'
  186. },
  187. {
  188. title:'文号',
  189. align:"center",
  190. dataIndex: 'documentSymbol'
  191. },
  192. {
  193. title: '操作',
  194. dataIndex: 'action',
  195. align:"center",
  196. scopedSlots: { customRender: 'action' },
  197. }
  198. ],
  199. url: {
  200. list: "/received/receivedMain/list",
  201. delete: "/received/receivedMain/delete",
  202. deleteBatch: "/received/receivedMain/deleteBatch",
  203. exportXlsUrl: "/received/receivedMain/exportXls",
  204. importExcelUrl: "received/receivedMain/importExcel",
  205. },
  206. dictOptions:{},
  207. }
  208. },
  209. computed: {
  210. importExcelUrl: function(){
  211. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  212. }
  213. },
  214. methods: {
  215. initDictConfig(){
  216. },
  217. print(record){
  218. this.printMouldUrl = window._CONFIG['domianURL']+'/jmreport/shareView/834346213321297920'+'?id='+record.id
  219. }
  220. }
  221. }
  222. </script>
  223. <style scoped lang="less">
  224. @import '~@assets/less/common.less';
  225. /deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item>.ant-form-item-label{
  226. width: 26% ;
  227. }
  228. </style>