4fe12ee9720b7663930b973342d907898cf3a1d2.svn-base 10 KB

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