293fec8debaa2d6c399d3cb91ba4879753d528fe.svn-base 8.8 KB

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