12ad7564160d3a48fbb3d2cda843ae25bddb5cdf.svn-base 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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. <a-input placeholder="请输入河湖编码" v-model="queryParam.hhbm"></a-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. <a-input placeholder="请输入河湖名称" v-model="queryParam.hhmc"></a-input>
  15. </a-form-item>
  16. </a-col>
  17. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18. <a-form-item label="岸别">
  19. <j-dict-select-tag placeholder="请选择岸别" v-model="queryParam.zya" dictCode="ab"/>
  20. </a-form-item>
  21. </a-col>
  22. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  23. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  24. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  25. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  26. <!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
  27. <!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
  28. <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
  29. <!-- </a>-->
  30. </span>
  31. </a-col>
  32. </a-row>
  33. </a-form>
  34. </div>
  35. <!-- 查询区域-END -->
  36. <!-- 操作按钮区域 -->
  37. <div class="table-operator">
  38. <a-button @click="handleAdd" v-has="'axbhq:add'" type="primary" icon="plus">新增</a-button>
  39. <a-button v-has="'axbhq:dc'" type="primary" icon="download" @click="handleExportXls('rm_axghgnqgeo')">导出
  40. </a-button>
  41. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
  42. :action="importExcelUrl" @change="handleImportExcel">
  43. <a-button v-has="'axbhq:dr'" type="primary" icon="import">导入</a-button>
  44. </a-upload>
  45. <!-- 高级查询区域 -->
  46. <j-super-query :fieldList="superFieldList" ref="superQueryModal"
  47. @handleSuperQuery="handleSuperQuery"></j-super-query>
  48. <a-dropdown v-if="selectedRowKeys.length > 0">
  49. <a-menu slot="overlay">
  50. <a-menu-item key="1" @click="batchDel">
  51. <a-icon type="delete"/>
  52. 删除
  53. </a-menu-item>
  54. </a-menu>
  55. <a-button style="margin-left: 8px" v-has="'axbhq:pldelete'"> 批量操作
  56. <a-icon type="down"/>
  57. </a-button>
  58. </a-dropdown>
  59. </div>
  60. <!-- table区域-begin -->
  61. <div>
  62. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  63. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
  64. style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  65. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  66. </div>
  67. <a-table
  68. ref="table"
  69. size="middle"
  70. :scroll="{x:true}"
  71. bordered
  72. rowKey="id"
  73. :columns="columns"
  74. :dataSource="dataSource"
  75. :pagination="ipagination"
  76. :loading="loading"
  77. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  78. class="j-table-force-nowrap"
  79. @change="handleTableChange">
  80. <template slot="hhmc" slot-scope="text,record">
  81. <a @click="handleDetail(record)">{{ text }}</a>
  82. </template>
  83. <template slot="htmlSlot" slot-scope="text">
  84. <div v-html="text"></div>
  85. </template>
  86. <template slot="imgSlot" slot-scope="text">
  87. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  88. <img v-else :src="getImgView(text)" height="25px" alt=""
  89. 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="downloadFile(text)">
  100. 下载
  101. </a-button>
  102. </template>
  103. <span slot="action" slot-scope="text, record">
  104. <a-space>
  105. <a-button @click='handleEdit(record)' v-has="'axbhq:bj'" size='small' type='primary'>编辑</a-button>
  106. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  107. <a-button size='small' v-has="'axbhq:delete'" type='danger'>删除</a-button>
  108. </a-popconfirm>
  109. </a-space>
  110. </span>
  111. </a-table>
  112. </div>
  113. <rm-axghgnqgeo-modal ref="modalForm" @ok="modalFormOk"></rm-axghgnqgeo-modal>
  114. </a-card>
  115. </template>
  116. <script>
  117. import '@/assets/less/TableExpand.less'
  118. import {mixinDevice} from '@/utils/mixin'
  119. import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  120. import RmAxghgnqgeoModal from './modules/RmAxghgnqgeoModal'
  121. export default {
  122. name: 'RmAxghgnqgeoList',
  123. mixins: [JeecgListMixin, mixinDevice],
  124. components: {
  125. RmAxghgnqgeoModal
  126. },
  127. data() {
  128. return {
  129. description: 'rm_axghgnqgeo管理页面',
  130. // 表头
  131. columns: [
  132. {
  133. title: '序号',
  134. dataIndex: '',
  135. key: 'rowIndex',
  136. width: 60,
  137. align: "center",
  138. customRender: function (t, r, index) {
  139. return parseInt(index) + 1;
  140. }
  141. },
  142. {
  143. title: '河湖名称',
  144. align: "center",
  145. dataIndex: 'hhmc',
  146. scopedSlots: {customRender: 'hhmc'}
  147. },
  148. {
  149. title: '河湖编码',
  150. align: "center",
  151. dataIndex: 'hhbm'
  152. },
  153. {
  154. title: '河湖类型',
  155. align: "center",
  156. dataIndex: 'hhlx'
  157. },
  158. {
  159. title: '县区编码',
  160. align: "center",
  161. dataIndex: 'xqbm'
  162. },
  163. {
  164. title: '县区名称',
  165. align: "center",
  166. dataIndex: 'xqmc'
  167. },
  168. {
  169. title: '岸别',
  170. align: "center",
  171. dataIndex: 'zya'
  172. },
  173. {
  174. title: '功能区类型',
  175. align: "center",
  176. dataIndex: 'gnqlx'
  177. },
  178. {
  179. title: '操作',
  180. dataIndex: 'action',
  181. align: "center",
  182. fixed: "right",
  183. width: 147,
  184. scopedSlots: {customRender: 'action'}
  185. }
  186. ],
  187. url: {
  188. list: "/hzz.axgh.axghgnq/rmAxghgnqgeo/list_bh",
  189. delete: "/hzz.axgh.axghgnq/rmAxghgnqgeo/delete",
  190. deleteBatch: "/hzz.axgh.axghgnq/rmAxghgnqgeo/deleteBatch",
  191. exportXlsUrl: "/hzz.axgh.axghgnq/rmAxghgnqgeo/exportXls",
  192. importExcelUrl: "hzz.axgh.axghgnq/rmAxghgnqgeo/importExcel",
  193. },
  194. dictOptions: {},
  195. superFieldList: [],
  196. }
  197. },
  198. created() {
  199. this.getSuperFieldList();
  200. },
  201. computed: {
  202. importExcelUrl: function () {
  203. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  204. },
  205. },
  206. methods: {
  207. initDictConfig() {
  208. },
  209. getSuperFieldList() {
  210. let fieldList = [];
  211. fieldList.push({type: 'string', value: 'hhbm', text: '河湖编码', dictCode: ''})
  212. fieldList.push({type: 'string', value: 'hhlx', text: '河湖类型', dictCode: ''})
  213. fieldList.push({type: 'string', value: 'hhmc', text: '河湖名称', dictCode: ''})
  214. fieldList.push({type: 'string', value: 'xqbm', text: '县区编码', dictCode: ''})
  215. fieldList.push({type: 'string', value: 'xqmc', text: '县区名称', dictCode: ''})
  216. fieldList.push({type: 'string', value: 'zya', text: '岸别', dictCode: 'ab'})
  217. fieldList.push({type: 'string', value: 'gnqlx', text: '功能区类型', dictCode: ''})
  218. this.superFieldList = fieldList
  219. }
  220. }
  221. }
  222. </script>
  223. <style scoped>
  224. @import '~@assets/less/common.less';
  225. </style>