83d4a5de8b3c2ca9d50f0b41e28b4cd5626187e6.svn-base 10 KB

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