c3767e6d7a70068d0f93823ac7dd03853c2481c9.svn-base 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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="'axkflyq:add'" type="primary" icon="plus">新增</a-button>
  39. <a-button v-has="'axkflyq: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="'axkflyq: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="'axkflyq: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="'axkflyq:bj'" size='small' type='primary'>编辑</a-button>
  106. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  107. <a-button size='small' v-has="'axkflyq:delete'" type='danger'>删除</a-button>
  108. </a-popconfirm>
  109. </a-space>
  110. <!-- <a-divider type="vertical" />-->
  111. <!-- <a-dropdown>-->
  112. <!-- <a-button class="ant-dropdown-link" v-has="'axkflyq:delete'" type="primary" icon="plus">更多 <a-icon type="down" /></a-button>-->
  113. <!-- <a-menu slot="overlay">-->
  114. <!-- <a-menu-item>-->
  115. <!-- <a @click="handleDetail(record)">详情</a>-->
  116. <!-- </a-menu-item>-->
  117. <!-- <a-menu-item>-->
  118. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  119. <!-- <a>删除</a>-->
  120. <!-- </a-popconfirm>-->
  121. <!-- </a-menu-item>-->
  122. <!-- </a-menu>-->
  123. <!-- </a-dropdown>-->
  124. </span>
  125. </a-table>
  126. </div>
  127. <rm-axghgnqgeo-modal ref="modalForm" @ok="modalFormOk"></rm-axghgnqgeo-modal>
  128. </a-card>
  129. </template>
  130. <script>
  131. import '@/assets/less/TableExpand.less'
  132. import {mixinDevice} from '@/utils/mixin'
  133. import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  134. import RmAxghgnqgeoModal from './modules/RmAxghgnqgeoModal'
  135. export default {
  136. name: 'RmAxghgnqgeoList',
  137. mixins: [JeecgListMixin, mixinDevice],
  138. components: {
  139. RmAxghgnqgeoModal
  140. },
  141. data() {
  142. return {
  143. description: 'rm_axghgnqgeo管理页面',
  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: 'hhmc',
  160. scopedSlots: {customRender: 'hhmc'}
  161. },
  162. {
  163. title: '河湖编码',
  164. align: "center",
  165. dataIndex: 'hhbm',
  166. },
  167. {
  168. title: '河湖类型',
  169. align: "center",
  170. dataIndex: 'hhlx'
  171. },
  172. {
  173. title: '县区编码',
  174. align: "center",
  175. dataIndex: 'xqbm'
  176. },
  177. {
  178. title: '县区名称',
  179. align: "center",
  180. dataIndex: 'xqmc'
  181. },
  182. {
  183. title: '岸别',
  184. align: "center",
  185. dataIndex: 'zya'
  186. },
  187. {
  188. title: '功能区类型',
  189. align: "center",
  190. dataIndex: 'gnqlx'
  191. },
  192. {
  193. title: '操作',
  194. dataIndex: 'action',
  195. align: "center",
  196. fixed: "right",
  197. width: 147,
  198. scopedSlots: {customRender: 'action'}
  199. }
  200. ],
  201. url: {
  202. list: "/hzz.axgh.axghgnq/rmAxghgnqgeo/list_kf",
  203. delete: "/hzz.axgh.axghgnq/rmAxghgnqgeo/delete",
  204. deleteBatch: "/hzz.axgh.axghgnq/rmAxghgnqgeo/deleteBatch",
  205. exportXlsUrl: "/hzz.axgh.axghgnq/rmAxghgnqgeo/exportXls",
  206. importExcelUrl: "hzz.axgh.axghgnq/rmAxghgnqgeo/importExcel",
  207. },
  208. dictOptions: {},
  209. superFieldList: [],
  210. }
  211. },
  212. created() {
  213. this.getSuperFieldList();
  214. },
  215. computed: {
  216. importExcelUrl: function () {
  217. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  218. },
  219. },
  220. methods: {
  221. initDictConfig() {
  222. },
  223. getSuperFieldList() {
  224. let fieldList = [];
  225. fieldList.push({type: 'string', value: 'hhbm', text: '河湖编码', dictCode: ''})
  226. fieldList.push({type: 'string', value: 'hhlx', text: '河湖类型', dictCode: ''})
  227. fieldList.push({type: 'string', value: 'hhmc', text: '河湖名称', dictCode: ''})
  228. fieldList.push({type: 'string', value: 'xqbm', text: '县区编码', dictCode: ''})
  229. fieldList.push({type: 'string', value: 'xqmc', text: '县区名称', dictCode: ''})
  230. fieldList.push({type: 'string', value: 'zya', text: '岸别', dictCode: 'ab'})
  231. fieldList.push({type: 'string', value: 'gnqlx', text: '功能区类型', dictCode: ''})
  232. this.superFieldList = fieldList
  233. }
  234. }
  235. }
  236. </script>
  237. <style scoped>
  238. @import '~@assets/less/common.less';
  239. </style>