897921eb4ff1d26d550fd1ceba813a6fbe39dae0.svn-base 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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="'wykzx:add'" type="primary" icon="plus">新增</a-button>
  39. <a-button v-has="'wykzx:dc'" type="primary" icon="download" @click="handleExportXls('wykzx')">导出</a-button>
  40. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
  41. :action="importExcelUrl" @change="handleImportExcel">
  42. <a-button v-has="'wykzx: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="'wykzx: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="'wykzx:bj'" size='small' type='primary'>编辑</a-button>
  105. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  106. <a-button size='small' v-has="'wykzx:delete'" type='danger'>删除</a-button>
  107. </a-popconfirm>
  108. </a-space>
  109. </span>
  110. </a-table>
  111. </div>
  112. <wykzx-modal ref="modalForm" @ok="modalFormOk"></wykzx-modal>
  113. </a-card>
  114. </template>
  115. <script>
  116. import '@/assets/less/TableExpand.less'
  117. import {mixinDevice} from '@/utils/mixin'
  118. import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  119. import WykzxModal from './modules/WykzxModal'
  120. export default {
  121. name: 'WykzxList',
  122. mixins: [JeecgListMixin, mixinDevice],
  123. components: {
  124. WykzxModal
  125. },
  126. data() {
  127. return {
  128. description: 'wykzx管理页面',
  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: 'hhmc',
  145. scopedSlots: {customRender: 'hhmc'}
  146. },
  147. {
  148. title: '河湖编码',
  149. align: "center",
  150. dataIndex: 'hhbm'
  151. },
  152. {
  153. title: '河湖类型',
  154. align: "center",
  155. dataIndex: 'hhlx'
  156. },
  157. {
  158. title: '县区编码',
  159. align: "center",
  160. dataIndex: 'xqbm'
  161. },
  162. {
  163. title: '县区名称',
  164. align: "center",
  165. dataIndex: 'xqmc'
  166. },
  167. {
  168. title: '岸别',
  169. align: "center",
  170. dataIndex: 'zya'
  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.axgh.axghgnq/wykzx/list_wy",
  183. delete: "/hzz.axgh.axghgnq/wykzx/delete",
  184. deleteBatch: "/hzz.axgh.axghgnq/wykzx/deleteBatch",
  185. exportXlsUrl: "/hzz.axgh.axghgnq/wykzx/exportXls",
  186. importExcelUrl: "hzz.axgh.axghgnq/wykzx/importExcel",
  187. },
  188. dictOptions: {},
  189. superFieldList: [],
  190. isorter: {
  191. column: 'hhmc',
  192. order: 'asc',
  193. }
  194. }
  195. },
  196. created() {
  197. this.getSuperFieldList();
  198. },
  199. computed: {
  200. importExcelUrl: function () {
  201. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  202. },
  203. },
  204. methods: {
  205. initDictConfig() {
  206. },
  207. getSuperFieldList() {
  208. let fieldList = [];
  209. fieldList.push({type: 'string', value: 'hhbm', text: '河湖编码', dictCode: ''})
  210. fieldList.push({type: 'string', value: 'hhlx', text: '河湖类型', dictCode: ''})
  211. fieldList.push({type: 'string', value: 'hhmc', text: '河湖名称', dictCode: ''})
  212. fieldList.push({type: 'string', value: 'xqbm', text: '县区编码', dictCode: ''})
  213. fieldList.push({type: 'string', value: 'xqmc', text: '县区名称', dictCode: ''})
  214. fieldList.push({type: 'string', value: 'zya', text: '岸别', dictCode: 'ab'})
  215. // fieldList.push({type:'string',value:'geom',text:'geom',dictCode:''})
  216. this.superFieldList = fieldList
  217. }
  218. }
  219. }
  220. </script>
  221. <style scoped>
  222. @import '~@assets/less/common.less';
  223. </style>