cee8d00189819142683440b27a18281fb5adec68.svn-base 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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="'axlh: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="'axlh:dr'" type="primary" icon="import">导入</a-button>
  34. </a-upload>
  35. <a-button v-has="'axlh:dc'" type="primary" icon="download" @click="handleExportXls('rm_axlh')">导出</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="'axlh: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="'axlh: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="'axlh:bj'" size='small' type='primary'>编辑</a-button>
  101. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  102. <a-button size='small' v-has="'axlh:delete'" type='danger'>删除</a-button>
  103. </a-popconfirm>
  104. </a-space>
  105. <!-- <a-divider type="vertical" />-->
  106. <!-- <a-dropdown>-->
  107. <!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
  108. <!-- <a-menu slot="overlay">-->
  109. <!-- <a-menu-item>-->
  110. <!-- <a @click="handleDetail(record)">详情</a>-->
  111. <!-- </a-menu-item>-->
  112. <!-- <a-menu-item>-->
  113. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  114. <!-- <a>删除</a>-->
  115. <!-- </a-popconfirm>-->
  116. <!-- </a-menu-item>-->
  117. <!-- </a-menu>-->
  118. <!-- </a-dropdown>-->
  119. </span>
  120. </a-table>
  121. </div>
  122. <rm-axlh-modal ref="modalForm" @ok="modalFormOk"></rm-axlh-modal>
  123. </a-card>
  124. </template>
  125. <script>
  126. import '@/assets/less/TableExpand.less'
  127. import {mixinDevice} from '@/utils/mixin'
  128. import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  129. import RmAxlhModal from './modules/RmAxlhModal'
  130. export default {
  131. name: 'RmAxlhList',
  132. mixins: [JeecgListMixin, mixinDevice],
  133. components: {
  134. RmAxlhModal
  135. },
  136. data() {
  137. return {
  138. description: 'rm_axlh管理页面',
  139. // 表头
  140. columns: [
  141. {
  142. title: '序号',
  143. dataIndex: '',
  144. key: 'rowIndex',
  145. width: 60,
  146. align: "center",
  147. customRender: function (t, r, index) {
  148. return parseInt(index) + 1;
  149. }
  150. },
  151. {
  152. title: '河流名称',
  153. align: "center",
  154. dataIndex: 'hlmc',
  155. scopedSlots: {customRender: 'hlmc'}
  156. },
  157. {
  158. title: '河流编码',
  159. align: "center",
  160. dataIndex: 'hlbm'
  161. },
  162. {
  163. title: '岸别',
  164. align: "center",
  165. dataIndex: 'ab'
  166. },
  167. {
  168. title: '绿化长度',
  169. align: "center",
  170. dataIndex: 'lhcd'
  171. },
  172. {
  173. title: '绿化宽度',
  174. align: "center",
  175. dataIndex: 'lhkd'
  176. },
  177. // {
  178. // title:'图形',
  179. // align:"center",
  180. // dataIndex: 'geom'
  181. // },
  182. {
  183. title: '操作',
  184. dataIndex: 'action',
  185. align: "center",
  186. fixed: "right",
  187. width: 147,
  188. scopedSlots: {customRender: 'action'}
  189. }
  190. ],
  191. url: {
  192. list: "/hzz.axgh.axlh/rmAxlh/list",
  193. delete: "/hzz.axgh.axlh/rmAxlh/delete",
  194. deleteBatch: "/hzz.axgh.axlh/rmAxlh/deleteBatch",
  195. exportXlsUrl: "/hzz.axgh.axlh/rmAxlh/exportXls",
  196. importExcelUrl: "hzz.axgh.axlh/rmAxlh/importExcel",
  197. importShapefile: "hzz.axgh.axlh/rmAxlh/importShapefile"
  198. },
  199. dictOptions: {},
  200. superFieldList: [],
  201. }
  202. },
  203. created() {
  204. this.getSuperFieldList();
  205. },
  206. computed: {
  207. importExcelUrl: function () {
  208. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  209. },
  210. importShp:function () {
  211. return `${window._CONFIG['domianURL']}/${this.url.importShapefile}`;
  212. }
  213. },
  214. methods: {
  215. initDictConfig() {
  216. },
  217. getSuperFieldList() {
  218. let fieldList = [];
  219. fieldList.push({
  220. type: 'popup',
  221. value: 'hlmc',
  222. text: '河流名称',
  223. popup: {code: 'hllist', field: 'hlmc', orgFields: 'hlmc,hlbm', destFields: 'hlmc,hlbm'}
  224. })
  225. fieldList.push({type: 'string', value: 'hlbm', text: '河流编码'})
  226. fieldList.push({type: 'string', value: 'ab', text: '岸别'})
  227. fieldList.push({type: 'number', value: 'lhcd', text: '绿化长度'})
  228. fieldList.push({type: 'number', value: 'lhkd', text: '绿化宽度'})
  229. fieldList.push({type: 'string', value: 'geom', text: '图形'})
  230. fieldList.push({type: 'string', value: 'geopath', text: '矢量文件保存路径'})
  231. this.superFieldList = fieldList
  232. }
  233. }
  234. }
  235. </script>
  236. <style scoped>
  237. @import '~@assets/less/common.less';
  238. </style>