6cc4121aae5a61ed5037c2a78e6895be6d84f3f3.svn-base 10 KB

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