864d8683abe59fd5ddf22755cef0a1d75eafced2.svn-base 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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-row>
  8. </a-form>
  9. </div>
  10. <!-- 查询区域-END -->
  11. <!-- 操作按钮区域 -->
  12. <div class="table-operator">
  13. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  14. <a-button type="primary" icon="download" @click="handleExportXls('zjxzq')">导出</a-button>
  15. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  16. <a-button type="primary" icon="import">导入</a-button>
  17. </a-upload>
  18. <!-- 高级查询区域 -->
  19. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  20. <a-dropdown v-if="selectedRowKeys.length > 0">
  21. <a-menu slot="overlay">
  22. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  23. </a-menu>
  24. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  25. </a-dropdown>
  26. </div>
  27. <!-- table区域-begin -->
  28. <div>
  29. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  30. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  31. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  32. </div>
  33. <a-table
  34. ref="table"
  35. size="middle"
  36. :scroll="{x:true}"
  37. bordered
  38. rowKey="id"
  39. :columns="columns"
  40. :dataSource="dataSource"
  41. :pagination="ipagination"
  42. :loading="loading"
  43. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  44. class="j-table-force-nowrap"
  45. @change="handleTableChange">
  46. <template slot="htmlSlot" slot-scope="text">
  47. <div v-html="text"></div>
  48. </template>
  49. <template slot="imgSlot" slot-scope="text">
  50. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  51. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  52. </template>
  53. <template slot="fileSlot" slot-scope="text">
  54. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  55. <a-button
  56. v-else
  57. :ghost="true"
  58. type="primary"
  59. icon="download"
  60. size="small"
  61. @click="downloadFile(text)">
  62. 下载
  63. </a-button>
  64. </template>
  65. <span slot="action" slot-scope="text, record">
  66. <a @click="handleEdit(record)">编辑</a>
  67. <a-divider type="vertical" />
  68. <a-dropdown>
  69. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  70. <a-menu slot="overlay">
  71. <a-menu-item>
  72. <a @click="handleDetail(record)">详情</a>
  73. </a-menu-item>
  74. <a-menu-item>
  75. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  76. <a>删除</a>
  77. </a-popconfirm>
  78. </a-menu-item>
  79. </a-menu>
  80. </a-dropdown>
  81. </span>
  82. </a-table>
  83. </div>
  84. <zjxzq-modal ref="modalForm" @ok="modalFormOk"></zjxzq-modal>
  85. </a-card>
  86. </template>
  87. <script>
  88. import '@/assets/less/TableExpand.less'
  89. import { mixinDevice } from '@/utils/mixin'
  90. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  91. import ZjxzqModal from './modules/ZjxzqModal'
  92. export default {
  93. name: 'ZjxzqList',
  94. mixins:[JeecgListMixin, mixinDevice],
  95. components: {
  96. ZjxzqModal
  97. },
  98. data () {
  99. return {
  100. description: 'zjxzq管理页面',
  101. // 表头
  102. columns: [
  103. {
  104. title: '#',
  105. dataIndex: '',
  106. key:'rowIndex',
  107. width:60,
  108. align:"center",
  109. customRender:function (t,r,index) {
  110. return parseInt(index)+1;
  111. }
  112. },
  113. {
  114. title:'bsm',
  115. align:"center",
  116. dataIndex: 'bsm'
  117. },
  118. {
  119. title:'ysdm',
  120. align:"center",
  121. dataIndex: 'ysdm'
  122. },
  123. {
  124. title:'xzqdm',
  125. align:"center",
  126. dataIndex: 'xzqdm'
  127. },
  128. {
  129. title:'xzqmc',
  130. align:"center",
  131. dataIndex: 'xzqmc'
  132. },
  133. {
  134. title:'kzmj',
  135. align:"center",
  136. dataIndex: 'kzmj'
  137. },
  138. {
  139. title:'jsmj',
  140. align:"center",
  141. dataIndex: 'jsmj'
  142. },
  143. {
  144. title:'mssm',
  145. align:"center",
  146. dataIndex: 'mssm'
  147. },
  148. {
  149. title:'geom',
  150. align:"center",
  151. dataIndex: 'geom'
  152. },
  153. {
  154. title:'geoinfo',
  155. align:"center",
  156. dataIndex: 'geoinfo'
  157. },
  158. {
  159. title: '操作',
  160. dataIndex: 'action',
  161. align:"center",
  162. fixed:"right",
  163. width:147,
  164. scopedSlots: { customRender: 'action' }
  165. }
  166. ],
  167. url: {
  168. list: "/hzz.xzqh.zjxzq/zjxzq/list",
  169. delete: "/hzz.xzqh.zjxzq/zjxzq/delete",
  170. deleteBatch: "/hzz.xzqh.zjxzq/zjxzq/deleteBatch",
  171. exportXlsUrl: "/hzz.xzqh.zjxzq/zjxzq/exportXls",
  172. importExcelUrl: "hzz.xzqh.zjxzq/zjxzq/importExcel",
  173. },
  174. dictOptions:{},
  175. superFieldList:[],
  176. }
  177. },
  178. created() {
  179. this.getSuperFieldList();
  180. },
  181. computed: {
  182. importExcelUrl: function(){
  183. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  184. },
  185. },
  186. methods: {
  187. initDictConfig(){
  188. },
  189. getSuperFieldList(){
  190. let fieldList=[];
  191. fieldList.push({type:'number',value:'bsm',text:'bsm'})
  192. fieldList.push({type:'string',value:'ysdm',text:'ysdm'})
  193. fieldList.push({type:'string',value:'xzqdm',text:'xzqdm'})
  194. fieldList.push({type:'string',value:'xzqmc',text:'xzqmc'})
  195. fieldList.push({type:'number',value:'kzmj',text:'kzmj'})
  196. fieldList.push({type:'number',value:'jsmj',text:'jsmj'})
  197. fieldList.push({type:'string',value:'mssm',text:'mssm'})
  198. fieldList.push({type:'string',value:'geom',text:'geom'})
  199. fieldList.push({type:'string',value:'geoinfo',text:'geoinfo'})
  200. this.superFieldList = fieldList
  201. }
  202. }
  203. }
  204. </script>
  205. <style scoped>
  206. @import '~@assets/less/common.less';
  207. </style>