e1668ce7455ed87f5e5b50e262e27afcb8a5dcf2.svn-base 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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" v-has="'glfwx:add'" type="primary" icon="plus">新增</a-button>
  14. <a-button v-has="'glfwx:dc'" type="primary" icon="download" @click="handleExportXls('rm_hhglfwx')">导出</a-button>
  15. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  16. <a-button v-has="'glfwx:dr'" 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 v-has="'glfwx:pldelete'" 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="rvcd" slot-scope="text,record">
  47. <a @click="handleDetail(record)">{{ text }}</a>
  48. </template>
  49. <template slot="htmlSlot" slot-scope="text">
  50. <div v-html="text"></div>
  51. </template>
  52. <template slot="imgSlot" slot-scope="text">
  53. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  54. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  55. </template>
  56. <template slot="fileSlot" slot-scope="text">
  57. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  58. <a-button
  59. v-else
  60. :ghost="true"
  61. type="primary"
  62. icon="download"
  63. size="small"
  64. @click="downloadFile(text)">
  65. 下载
  66. </a-button>
  67. </template>
  68. <span slot="action" slot-scope="text, record">
  69. <a-space>
  70. <a-button @click='handleEdit(record)' v-has="'glfwx:bj'" size='small' type='primary'>编辑</a-button>
  71. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  72. <a-button size='small' v-has="'glfwx:delete'" type='danger'>删除</a-button>
  73. </a-popconfirm>
  74. </a-space>
  75. </span>
  76. </a-table>
  77. </div>
  78. <rm-hhglfwx-modal ref="modalForm" @ok="modalFormOk"></rm-hhglfwx-modal>
  79. </a-card>
  80. </template>
  81. <script>
  82. import '@/assets/less/TableExpand.less'
  83. import { mixinDevice } from '@/utils/mixin'
  84. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  85. import RmHhglfwxModal from './modules/RmHhglfwxModal'
  86. export default {
  87. name: 'RmHhglfwxList',
  88. mixins:[JeecgListMixin, mixinDevice],
  89. components: {
  90. RmHhglfwxModal
  91. },
  92. data () {
  93. return {
  94. description: 'rm_hhglfwx管理页面',
  95. // 表头
  96. columns: [
  97. {
  98. title: '序号',
  99. dataIndex: '',
  100. key:'rowIndex',
  101. width:60,
  102. align:"center",
  103. customRender:function (t,r,index) {
  104. return parseInt(index)+1;
  105. }
  106. },
  107. {
  108. title:'河道编码',
  109. align:"center",
  110. dataIndex: 'rvcd',
  111. scopedSlots: { customRender: 'rvcd' }
  112. },
  113. {
  114. title:'河湖名称',
  115. align:"center",
  116. dataIndex: 'name'
  117. },
  118. {
  119. title:'河湖类型',
  120. align:"center",
  121. dataIndex: 'hhlx'
  122. },
  123. {
  124. title:'河湖级别',
  125. align:"center",
  126. dataIndex: 'hhjb'
  127. },
  128. {
  129. title:'行政区编号',
  130. align:"center",
  131. dataIndex: 'areaId'
  132. },
  133. {
  134. title:'行政区划',
  135. align:"center",
  136. dataIndex: 'areaName'
  137. },
  138. {
  139. title:'备注',
  140. align:"center",
  141. dataIndex: 'bak'
  142. },
  143. // {
  144. // title:'工程类型',
  145. // align:"center",
  146. // dataIndex: 'gclx'
  147. // },
  148. // {
  149. // title:'图形',
  150. // align:"center",
  151. // dataIndex: 'geom'
  152. // },
  153. {
  154. title: '操作',
  155. dataIndex: 'action',
  156. align:"center",
  157. fixed:"right",
  158. width:147,
  159. scopedSlots: { customRender: 'action' }
  160. }
  161. ],
  162. url: {
  163. list: "/hzz.hhhj.glfwx/rmHhglfwx/list",
  164. delete: "/hzz.hhhj.glfwx/rmHhglfwx/delete",
  165. deleteBatch: "/hzz.hhhj.glfwx/rmHhglfwx/deleteBatch",
  166. exportXlsUrl: "/hzz.hhhj.glfwx/rmHhglfwx/exportXls",
  167. importExcelUrl: "hzz.hhhj.glfwx/rmHhglfwx/importExcel",
  168. },
  169. dictOptions:{},
  170. superFieldList:[],
  171. isorter:{
  172. column: 'name',
  173. order: 'asc',
  174. }
  175. }
  176. },
  177. created() {
  178. this.getSuperFieldList();
  179. },
  180. computed: {
  181. importExcelUrl: function(){
  182. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  183. },
  184. },
  185. methods: {
  186. initDictConfig(){
  187. },
  188. getSuperFieldList(){
  189. let fieldList=[];
  190. fieldList.push({type:'string',value:'rvcd',text:'rvcd'})
  191. fieldList.push({type:'string',value:'name',text:'name'})
  192. fieldList.push({type:'string',value:'hhlx',text:'hhlx'})
  193. fieldList.push({type:'string',value:'hhjb',text:'hhjb'})
  194. fieldList.push({type:'number',value:'areaId',text:'areaId'})
  195. fieldList.push({type:'string',value:'areaName',text:'areaName'})
  196. fieldList.push({type:'string',value:'bak',text:'bak'})
  197. fieldList.push({type:'string',value:'gclx',text:'gclx'})
  198. // fieldList.push({type:'string',value:'geom',text:'geom'})
  199. this.superFieldList = fieldList
  200. }
  201. }
  202. }
  203. </script>
  204. <style scoped>
  205. @import '~@assets/less/common.less';
  206. </style>