8bea5e4c7d433ec25c61f529a3ed6ccf0ecd9127.svn-base 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  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.hlmc"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  14. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  15. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  16. <!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
  17. <!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
  18. <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
  19. <!-- </a>-->
  20. </span>
  21. </a-col>
  22. </a-row>
  23. </a-form>
  24. </div>
  25. <!-- 查询区域-END -->
  26. <!-- 操作按钮区域 -->
  27. <div class="table-operator">
  28. <a-button @click="handleAdd" v-has="'hlxx:add'" type="primary" icon="plus">新增</a-button>
  29. <a-button v-has="'hlxx:dc'" type="primary" icon="download" @click="handleExportXls('河流信息表')">导出</a-button>
  30. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  31. <a-button v-has="'hlxx:dr'" type="primary" icon="import">导入</a-button>
  32. </a-upload>
  33. <!-- 高级查询区域 -->
  34. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  35. <a-dropdown v-if="selectedRowKeys.length > 0">
  36. <a-menu slot="overlay">
  37. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  38. </a-menu>
  39. <a-button style="margin-left: 8px" v-has="'hlxx:pldelete'"> 批量操作 <a-icon type="down" /></a-button>
  40. </a-dropdown>
  41. </div>
  42. <!-- table区域-begin -->
  43. <div>
  44. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  45. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  46. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  47. </div>
  48. <a-table
  49. ref="table"
  50. size="middle"
  51. :scroll="{x:true}"
  52. bordered
  53. rowKey="id"
  54. :columns="columns"
  55. :dataSource="dataSource"
  56. :pagination="ipagination"
  57. :loading="loading"
  58. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  59. class="j-table-force-nowrap"
  60. @change="handleTableChange">
  61. <template slot="hlmc" slot-scope="text,record">
  62. <a @click="handleDetail(record)">{{ text }}</a>
  63. </template>
  64. <template slot="htmlSlot" slot-scope="text">
  65. <div v-html="text"></div>
  66. </template>
  67. <template slot="imgSlot" slot-scope="text">
  68. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  69. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  70. </template>
  71. <template slot="pcaSlot" slot-scope="text">
  72. <div>{{ getPcaText(text) }}</div>
  73. </template>
  74. <template slot="fileSlot" slot-scope="text">
  75. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  76. <a-button
  77. v-else
  78. :ghost="true"
  79. type="primary"
  80. icon="download"
  81. size="small"
  82. @click="downloadFile(text)">
  83. 下载
  84. </a-button>
  85. </template>
  86. <span slot="action" slot-scope="text, record">
  87. <a-space>
  88. <a-button @click='handleEdit(record)' v-has="'hlxx:bj'" size='small' type='primary'>编辑</a-button>
  89. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  90. <a-button size='small' v-has="'hlxx:delete'" type='danger'>删除</a-button>
  91. </a-popconfirm>
  92. </a-space>
  93. <!-- <a-divider type="vertical" />-->
  94. <!-- <a-dropdown>-->
  95. <!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
  96. <!-- <a-menu slot="overlay">-->
  97. <!-- <a-menu-item>-->
  98. <!-- <a @click="handleDetail(record)">详情</a>-->
  99. <!-- </a-menu-item>-->
  100. <!-- <a-menu-item>-->
  101. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  102. <!-- <a>删除</a>-->
  103. <!-- </a-popconfirm>-->
  104. <!-- </a-menu-item>-->
  105. <!-- </a-menu>-->
  106. <!-- </a-dropdown>-->
  107. </span>
  108. </a-table>
  109. </div>
  110. <rm-river-modal ref="modalForm" @ok="modalFormOk"></rm-river-modal>
  111. </a-card>
  112. </template>
  113. <script>
  114. import '@/assets/less/TableExpand.less'
  115. import { mixinDevice } from '@/utils/mixin'
  116. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  117. import RmRiverModal from './modules/RmRiverModal'
  118. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  119. import Area from '@/components/_util/Area'
  120. export default {
  121. name: 'RmRiverList',
  122. mixins:[JeecgListMixin, mixinDevice],
  123. components: {
  124. RmRiverModal
  125. },
  126. data () {
  127. return {
  128. description: '河流信息表管理页面',
  129. // 表头
  130. columns: [
  131. {
  132. title: '序号',
  133. dataIndex: '',
  134. key:'rowIndex',
  135. width:60,
  136. align:"center",
  137. customRender:function (t,r,index) {
  138. return parseInt(index)+1;
  139. }
  140. },
  141. {
  142. title:'河流名称',
  143. align:"center",
  144. dataIndex: 'hlmc',
  145. scopedSlots: { customRender: 'hlmc' }
  146. },
  147. {
  148. title:'河流长度(km)',
  149. align:"center",
  150. dataIndex: 'hlcd'
  151. },
  152. {
  153. title:'境内河流长度(km)',
  154. align:"center",
  155. dataIndex: 'jnhlcd'
  156. },
  157. {
  158. title:'流域面积(km²)',
  159. align:"center",
  160. dataIndex: 'lymj'
  161. },
  162. {
  163. title:'河流类别',
  164. align:"center",
  165. dataIndex: 'hllb_dictText'
  166. },
  167. {
  168. title:'更新时间',
  169. align:"center",
  170. dataIndex: 'updateTime'
  171. },
  172. {
  173. title: '操作',
  174. dataIndex: 'action',
  175. align:"center",
  176. fixed:"right",
  177. width:147,
  178. scopedSlots: { customRender: 'action' }
  179. }
  180. ],
  181. url: {
  182. list: "/hzz.hlxx/rmRiver/list",
  183. delete: "/hzz.hlxx/rmRiver/delete",
  184. deleteBatch: "/hzz.hlxx/rmRiver/deleteBatch",
  185. exportXlsUrl: "/hzz.hlxx/rmRiver/exportXls",
  186. importExcelUrl: "hzz.hlxx/rmRiver/importExcel",
  187. },
  188. ipagination: {
  189. current: 1,
  190. pageSize: 10,
  191. pageSizeOptions: ['10', '50', '100'],
  192. showTotal: (total, range) => {
  193. return range[0] + "-" + range[1] + " 共" + total + "条"
  194. },
  195. showQuickJumper: true,
  196. showSizeChanger: true,
  197. total: 0
  198. },
  199. dictOptions:{},
  200. pcaData:'',
  201. superFieldList:[],
  202. }
  203. },
  204. created() {
  205. this.pcaData = new Area()
  206. this.getSuperFieldList();
  207. },
  208. computed: {
  209. importExcelUrl: function(){
  210. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  211. },
  212. },
  213. methods: {
  214. getPcaText(code){
  215. return this.pcaData.getText(code);
  216. },
  217. initDictConfig(){
  218. },
  219. getSuperFieldList(){
  220. let fieldList=[];
  221. fieldList.push({type:'string',value:'id',text:'主键',dictCode:''})
  222. fieldList.push({type:'string',value:'hlmc',text:'河流名称',dictCode:''})
  223. fieldList.push({type:'string',value:'hlbm',text:'河流编码',dictCode:''})
  224. fieldList.push({type:'string',value:'hljj',text:'河流简介',dictCode:''})
  225. fieldList.push({type:'string',value:'ly',text:'流域',dictCode:'liuyu'})
  226. fieldList.push({type:'string',value:'sx',text:'水系',dictCode:'shuixi'})
  227. fieldList.push({type:'string',value:'hlcd',text:'河流长度',dictCode:''})
  228. fieldList.push({type:'string',value:'jnhlcd',text:'境内河流长度',dictCode:''})
  229. fieldList.push({type:'string',value:'lymj',text:'流域面积',dictCode:''})
  230. fieldList.push({type:'string',value:'ljxsq',text:'流经县(市、区)',dictCode:''})
  231. fieldList.push({type:'string',value:'yfhbhdx',text:'有防洪保护对象(目标)或规划设计中有防洪任务',dictCode:'yn'})
  232. fieldList.push({type:'string',value:'yplsyd',text:'有排涝受益的村庄和农田',dictCode:'yn'})
  233. fieldList.push({type:'string',value:'shydf',text:'是否有堤防',dictCode:'yn'})
  234. fieldList.push({type:'string',value:'hllb',text:'河流类别',dictCode:'hllb'})
  235. fieldList.push({type:'string',value:'hldj',text:'河流等级',dictCode:'hldj'})
  236. fieldList.push({type:'string',value:'hllx',text:'河流类型',dictCode:'hllx'})
  237. fieldList.push({type:'string',value:'ab',text:'岸别',dictCode:'anbie'})
  238. fieldList.push({type:'string',value:'szjm',text:'水准基面',dictCode:''})
  239. fieldList.push({type:'string',value:'hygc',text:'河源高程',dictCode:''})
  240. fieldList.push({type:'string',value:'hlbh',text:'河流标绘',dictCode:''})
  241. fieldList.push({type:'double',value:'hyjd',text:'河源经度',dictCode:''})
  242. fieldList.push({type:'string',value:'hywd',text:'河源纬度',dictCode:''})
  243. fieldList.push({type:'pca',value:'hyszxzqh',text:'河源所在行政区划'})
  244. fieldList.push({type:'string',value:'hydm',text:'河源地名',dictCode:''})
  245. fieldList.push({type:'double',value:'hkjd',text:'河口经度',dictCode:''})
  246. fieldList.push({type:'double',value:'hkwd',text:'河口纬度',dictCode:''})
  247. fieldList.push({type:'pca',value:'hkszxzqh',text:'河口所在行政区划'})
  248. fieldList.push({type:'string',value:'hkdm',text:'河口地名',dictCode:''})
  249. fieldList.push({type:'string',value:'hlpjbj',text:'河流平均比降(‰)',dictCode:''})
  250. fieldList.push({type:'string',value:'dnpjnjss',text:'多年平均年降水深(mm)',dictCode:''})
  251. fieldList.push({type:'string',value:'swzhswz',text:'水文站和水位站',dictCode:''})
  252. fieldList.push({type:'string',value:'schdczdhs',text:'实测和调查最大洪水',dictCode:''})
  253. fieldList.push({type:'string',value:'hlgk',text:'河流概况',dictCode:''})
  254. fieldList.push({type:'string',value:'zrgk',text:'自然概况',dictCode:''})
  255. fieldList.push({type:'string',value:'bz',text:'备注',dictCode:''})
  256. fieldList.push({type:'string',value:'sxt',text:'水系图',dictCode:''})
  257. this.superFieldList = fieldList
  258. }
  259. }
  260. }
  261. </script>
  262. <style scoped>
  263. @import '~@assets/less/common.less';
  264. </style>