b5fa0bfd5f4335410307758ffea0a2514ae31b6f.svn-base 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <template>
  2. <a-card :bordered="false" :class="'cust-erp-sub-tab'">
  3. <!-- 操作按钮区域 -->
  4. <div class="table-operator" v-if="mainId">
  5. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  6. <a-button type="primary" icon="download" @click="handleExportXls('河段主要指标')">导出</a-button>
  7. <a-upload
  8. name="file"
  9. :showUploadList="false"
  10. :multiple="false"
  11. :headers="tokenHeader"
  12. :action="importExcelUrl"
  13. @change="handleImportExcel">
  14. <a-button type="primary" icon="import">导入</a-button>
  15. </a-upload>
  16. <!-- 高级查询区域 -->
  17. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  18. <a-dropdown v-if="selectedRowKeys.length > 0">
  19. <a-menu slot="overlay">
  20. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  21. </a-menu>
  22. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  23. </a-dropdown>
  24. </div>
  25. <!-- table区域-begin -->
  26. <div>
  27. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  28. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  29. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  30. </div>
  31. <a-table
  32. ref="table"
  33. size="middle"
  34. bordered
  35. rowKey="id"
  36. :scroll="{x:true}"
  37. :columns="columns"
  38. :dataSource="dataSource"
  39. :pagination="ipagination"
  40. :loading="loading"
  41. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  42. @change="handleTableChange">
  43. <template slot="htmlSlot" slot-scope="text">
  44. <div v-html="text"></div>
  45. </template>
  46. <template slot="imgSlot" slot-scope="text">
  47. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  48. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  49. </template>
  50. <template slot="fileSlot" slot-scope="text">
  51. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  52. <a-button
  53. v-else
  54. :ghost="true"
  55. type="primary"
  56. icon="download"
  57. size="small"
  58. @click="downloadFile(text)">
  59. 下载
  60. </a-button>
  61. </template>
  62. <span slot="action" slot-scope="text, record">
  63. <a @click="handleEdit(record)">编辑</a>
  64. <a-divider type="vertical" />
  65. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  66. <a>删除</a>
  67. </a-popconfirm>
  68. </span>
  69. </a-table>
  70. </div>
  71. <rmAxhdzyzb-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></rmAxhdzyzb-modal>
  72. </a-card>
  73. </template>
  74. <script>
  75. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  76. import RmAxhdzyzbModal from './modules/RmAxhdzyzbModal'
  77. export default {
  78. name: "RmAxhdzyzbList",
  79. mixins:[JeecgListMixin],
  80. components: { RmAxhdzyzbModal },
  81. props:{
  82. mainId:{
  83. type:String,
  84. default:'',
  85. required:false
  86. }
  87. },
  88. watch:{
  89. mainId:{
  90. immediate: true,
  91. handler(val) {
  92. if(!this.mainId){
  93. this.clearList()
  94. }else{
  95. this.queryParam['mainId'] = val
  96. this.loadData(1);
  97. }
  98. }
  99. }
  100. },
  101. data () {
  102. return {
  103. description: '岸线占用项目管理管理页面',
  104. disableMixinCreated:true,
  105. // 表头
  106. columns: [
  107. {
  108. title: '序号',
  109. dataIndex: '',
  110. key:'rowIndex',
  111. width:60,
  112. align:"center",
  113. customRender:function (t,r,index) {
  114. return parseInt(index)+1;
  115. }
  116. },
  117. {
  118. title:'河(渠)名称',
  119. align:"center",
  120. dataIndex: 'hqmc'
  121. },
  122. {
  123. title:'防洪标准',
  124. align:"center",
  125. dataIndex: 'fhbz'
  126. },
  127. // {
  128. // title:'现状',
  129. // align:"center",
  130. // dataIndex: 'xza'
  131. // },
  132. // {
  133. // title:'设计',
  134. // align:"center",
  135. // dataIndex: 'sja'
  136. // },
  137. // {
  138. // title:'规划',
  139. // align:"center",
  140. // dataIndex: 'gha'
  141. // },
  142. {
  143. title:'设计防洪水位',
  144. align:"center",
  145. dataIndex: 'sjfhsw'
  146. },
  147. {
  148. title:'相应防洪流量',
  149. align:"center",
  150. dataIndex: 'xyfhll'
  151. },
  152. {
  153. title:'排涝标准',
  154. align:"center",
  155. dataIndex: 'plbz'
  156. },
  157. {
  158. title:'设计排涝水位',
  159. align:"center",
  160. dataIndex: 'sjplsw'
  161. },
  162. {
  163. title:'相应排涝流量',
  164. align:"center",
  165. dataIndex: 'xyplll'
  166. },
  167. {
  168. title:'河底比降',
  169. align:"center",
  170. dataIndex: 'hdbj'
  171. },
  172. {
  173. title:'河道底宽(m)',
  174. align:"center",
  175. dataIndex: 'hddk'
  176. },
  177. {
  178. title:'河道(堤防)边坡',
  179. align:"center",
  180. dataIndex: 'hddfbp'
  181. },
  182. {
  183. title:'堤顶高程(m)',
  184. align:"center",
  185. dataIndex: 'dfgc'
  186. },
  187. {
  188. title:'堤顶宽度(m)',
  189. align:"center",
  190. dataIndex: 'dfkd'
  191. },
  192. {
  193. title:'堤外地面高程(m)',
  194. align:"center",
  195. dataIndex: 'dwdmgc'
  196. },
  197. {
  198. title:'设计输水流量',
  199. align:"center",
  200. dataIndex: 'sjssll'
  201. },
  202. {
  203. title:'相应输入水位',
  204. align:"center",
  205. dataIndex: 'xysrsw'
  206. },
  207. {
  208. title: '操作',
  209. dataIndex: 'action',
  210. align:"center",
  211. fixed:"right",
  212. width:147,
  213. scopedSlots: { customRender: 'action' },
  214. }
  215. ],
  216. url: {
  217. list: "/hzz.axgh.axzyxm/rmAxzyxmb/listRmAxhdzyzbByMainId",
  218. delete: "/hzz.axgh.axzyxm/rmAxzyxmb/deleteRmAxhdzyzb",
  219. deleteBatch: "/hzz.axgh.axzyxm/rmAxzyxmb/deleteBatchRmAxhdzyzb",
  220. exportXlsUrl: "/hzz.axgh.axzyxm/rmAxzyxmb/exportRmAxhdzyzb",
  221. importUrl: "/hzz.axgh.axzyxm/rmAxzyxmb/importRmAxhdzyzb",
  222. },
  223. dictOptions:{
  224. },
  225. superFieldList:[],
  226. }
  227. },
  228. created() {
  229. this.getSuperFieldList();
  230. },
  231. computed: {
  232. importExcelUrl(){
  233. return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
  234. }
  235. },
  236. methods: {
  237. clearList(){
  238. this.dataSource=[]
  239. this.selectedRowKeys=[]
  240. this.ipagination.current = 1
  241. },
  242. getSuperFieldList(){
  243. let fieldList=[];
  244. fieldList.push({type:'string',value:'sqdwmc',text:'申请单位名称',dictCode:''})
  245. fieldList.push({type:'string',value:'frdb',text:'法人代表(或委托代理人)',dictCode:''})
  246. fieldList.push({type:'string',value:'tyshxydm',text:'统一社会信用代码',dictCode:''})
  247. fieldList.push({type:'string',value:'sqdwtxdz',text:'申请单位通讯地址',dictCode:''})
  248. fieldList.push({type:'string',value:'lxr',text:'联系人',dictCode:''})
  249. fieldList.push({type:'string',value:'yzbm',text:'邮政编码',dictCode:''})
  250. fieldList.push({type:'string',value:'bgdh',text:'办公电话',dictCode:''})
  251. fieldList.push({type:'string',value:'sjh',text:'手机号',dictCode:''})
  252. fieldList.push({type:'string',value:'cz',text:'传真',dictCode:''})
  253. fieldList.push({type:'string',value:'dzyx',text:'电子邮箱',dictCode:''})
  254. fieldList.push({type:'string',value:'zgbm',text:'主管部门',dictCode:''})
  255. fieldList.push({type:'string',value:'txdz',text:'通讯地址',dictCode:''})
  256. this.superFieldList = fieldList
  257. }
  258. }
  259. }
  260. </script>
  261. <style scoped>
  262. @import '~@assets/less/common.less'
  263. </style>