3efadef1418f0fecc6f6c1e320b673442faa4ca4.svn-base 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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-row>
  8. </a-form>
  9. </div>
  10. <!-- 查询区域-END -->
  11. <!-- 操作按钮区域 -->
  12. <div class="table-operator">
  13. <a-button @click="handleAdd" v-has="'axzyxm:add'" type="primary" icon="plus">新增</a-button>
  14. <a-button v-has="'axzyxm:dc'" type="primary" icon="download" @click="handleExportXls('岸线占用项目管理')">导出</a-button>
  15. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  16. <a-button v-has="'axzyxm:dr'" type="primary" icon="import">导入</a-button>
  17. </a-upload>
  18. <!-- 高级查询区域 -->
  19. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  20. </div>
  21. <!-- table区域-begin -->
  22. <div>
  23. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  24. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  25. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  26. </div>
  27. <a-table
  28. ref="table"
  29. size="middle"
  30. bordered
  31. rowKey="id"
  32. class="j-table-force-nowrap"
  33. :scroll="{x:true}"
  34. :columns="columns"
  35. :dataSource="dataSource"
  36. :pagination="ipagination"
  37. :loading="loading"
  38. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'radio'}"
  39. :customRow="clickThenSelect"
  40. @change="handleTableChange">
  41. <template slot="sqdwmc" slot-scope="text,record">
  42. <a @click="handleDetail(record)">{{ text }}</a>
  43. </template>
  44. <template slot="htmlSlot" slot-scope="text">
  45. <div v-html="text"></div>
  46. </template>
  47. <template slot="imgSlot" slot-scope="text">
  48. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  49. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  50. </template>
  51. <template slot="fileSlot" slot-scope="text">
  52. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  53. <a-button
  54. v-else
  55. :ghost="true"
  56. type="primary"
  57. icon="download"
  58. size="small"
  59. @click="downloadFile(text)">
  60. 下载
  61. </a-button>
  62. </template>
  63. <span slot="action" slot-scope="text, record">
  64. <a-space>
  65. <a-button @click='handleEdit(record)' v-has="'axzyxm:bj'" size='small' type='primary'>编辑</a-button>
  66. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  67. <a-button size='small' v-has="'axzyxm:delete'" type='danger'>删除</a-button>
  68. </a-popconfirm>
  69. </a-space>
  70. <!-- <a-divider type="vertical" />-->
  71. <!-- <a-dropdown>-->
  72. <!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
  73. <!-- <a-menu slot="overlay">-->
  74. <!-- <a-menu-item>-->
  75. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  76. <!-- <a>删除</a>-->
  77. <!-- </a-popconfirm>-->
  78. <!-- </a-menu-item>-->
  79. <!-- </a-menu>-->
  80. <!-- </a-dropdown>-->
  81. </span>
  82. </a-table>
  83. </div>
  84. <a-tabs defaultActiveKey="1">
  85. <a-tab-pane tab="项目信息" key="1" >
  86. <RmAxxmxxList :mainId="selectedMainId" />
  87. </a-tab-pane>
  88. <a-tab-pane tab="河段主要指标" key="2" forceRender>
  89. <RmAxhdzyzbList :mainId="selectedMainId" />
  90. </a-tab-pane>
  91. <a-tab-pane tab="涉河部分工程信息" key="3" forceRender>
  92. <RmAxshbfgcxxbList :mainId="selectedMainId" />
  93. </a-tab-pane>
  94. <a-tab-pane tab="分析计算主要成果" key="4" forceRender>
  95. <RmAxfxjszycgbList :mainId="selectedMainId" />
  96. </a-tab-pane>
  97. <a-tab-pane tab="涉河工程主要指标表" key="5" forceRender>
  98. <RmAxshgczyzbbList :mainId="selectedMainId" />
  99. </a-tab-pane>
  100. </a-tabs>
  101. <rmAxzyxmb-modal ref="modalForm" @ok="modalFormOk"></rmAxzyxmb-modal>
  102. </a-card>
  103. </template>
  104. <script>
  105. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  106. import RmAxzyxmbModal from './modules/RmAxzyxmbModal'
  107. import { getAction } from '@/api/manage'
  108. import RmAxxmxxList from './RmAxxmxxList'
  109. import RmAxhdzyzbList from './RmAxhdzyzbList'
  110. import RmAxshbfgcxxbList from './RmAxshbfgcxxbList'
  111. import RmAxfxjszycgbList from './RmAxfxjszycgbList'
  112. import RmAxshgczyzbbList from './RmAxshgczyzbbList'
  113. import '@/assets/less/TableExpand.less'
  114. export default {
  115. name: "RmAxzyxmbList",
  116. mixins:[JeecgListMixin],
  117. components: {
  118. RmAxxmxxList,
  119. RmAxhdzyzbList,
  120. RmAxshbfgcxxbList,
  121. RmAxfxjszycgbList,
  122. RmAxshgczyzbbList,
  123. RmAxzyxmbModal
  124. },
  125. data () {
  126. return {
  127. description: '岸线占用项目管理管理页面',
  128. // 表头
  129. columns: [
  130. {
  131. title:'申请单位名称',
  132. align:"center",
  133. dataIndex: 'sqdwmc',
  134. scopedSlots: { customRender: 'sqdwmc' }
  135. },
  136. {
  137. title:'法人代表(或委托代理人)',
  138. align:"center",
  139. dataIndex: 'frdb'
  140. },
  141. {
  142. title:'统一社会信用代码',
  143. align:"center",
  144. dataIndex: 'tyshxydm'
  145. },
  146. {
  147. title:'申请单位通讯地址',
  148. align:"center",
  149. dataIndex: 'sqdwtxdz'
  150. },
  151. {
  152. title:'联系人',
  153. align:"center",
  154. dataIndex: 'lxr'
  155. },
  156. {
  157. title:'邮政编码',
  158. align:"center",
  159. dataIndex: 'yzbm'
  160. },
  161. {
  162. title:'办公电话',
  163. align:"center",
  164. dataIndex: 'bgdh'
  165. },
  166. {
  167. title:'手机号',
  168. align:"center",
  169. dataIndex: 'sjh'
  170. },
  171. {
  172. title:'传真',
  173. align:"center",
  174. dataIndex: 'cz'
  175. },
  176. {
  177. title:'电子邮箱',
  178. align:"center",
  179. dataIndex: 'dzyx'
  180. },
  181. {
  182. title:'主管部门',
  183. align:"center",
  184. dataIndex: 'zgbm'
  185. },
  186. {
  187. title:'通讯地址',
  188. align:"center",
  189. dataIndex: 'txdz'
  190. },
  191. {
  192. title: '操作',
  193. dataIndex: 'action',
  194. align:"center",
  195. fixed:"right",
  196. width:147,
  197. scopedSlots: { customRender: 'action' },
  198. }
  199. ],
  200. url: {
  201. list: "/hzz.axgh.axzyxm/rmAxzyxmb/list",
  202. delete: "/hzz.axgh.axzyxm/rmAxzyxmb/delete",
  203. deleteBatch: "/hzz.axgh.axzyxm/rmAxzyxmb/deleteBatch",
  204. exportXlsUrl: "/hzz.axgh.axzyxm/rmAxzyxmb/exportXls",
  205. importExcelUrl: "hzz.axgh.axzyxm/rmAxzyxmb/importExcel",
  206. },
  207. dictOptions:{
  208. },
  209. /* 分页参数 */
  210. ipagination:{
  211. current: 1,
  212. pageSize: 5,
  213. pageSizeOptions: ['5', '10', '50'],
  214. showTotal: (total, range) => {
  215. return range[0] + "-" + range[1] + " 共" + total + "条"
  216. },
  217. showQuickJumper: true,
  218. showSizeChanger: true,
  219. total: 0
  220. },
  221. selectedMainId:'',
  222. superFieldList:[],
  223. }
  224. },
  225. created() {
  226. this.getSuperFieldList();
  227. },
  228. computed: {
  229. importExcelUrl: function(){
  230. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  231. }
  232. },
  233. methods: {
  234. initDictConfig(){
  235. },
  236. clickThenSelect(record) {
  237. return {
  238. on: {
  239. click: () => {
  240. this.onSelectChange(record.id.split(","), [record]);
  241. }
  242. }
  243. }
  244. },
  245. onClearSelected() {
  246. this.selectedRowKeys = [];
  247. this.selectionRows = [];
  248. this.selectedMainId=''
  249. },
  250. onSelectChange(selectedRowKeys, selectionRows) {
  251. this.selectedMainId=selectedRowKeys[0]
  252. this.selectedRowKeys = selectedRowKeys;
  253. this.selectionRows = selectionRows;
  254. },
  255. loadData(arg) {
  256. if(!this.url.list){
  257. this.$message.error("请设置url.list属性!")
  258. return
  259. }
  260. //加载数据 若传入参数1则加载第一页的内容
  261. if (arg === 1) {
  262. this.ipagination.current = 1;
  263. }
  264. this.onClearSelected()
  265. var params = this.getQueryParams();//查询条件
  266. this.loading = true;
  267. getAction(this.url.list, params).then((res) => {
  268. if (res.success) {
  269. this.dataSource = res.result.records;
  270. this.ipagination.total = Number(res.result.total);
  271. }
  272. if(res.code===510){
  273. this.$message.warning(res.message)
  274. }
  275. this.loading = false;
  276. })
  277. },
  278. getSuperFieldList(){
  279. let fieldList=[];
  280. fieldList.push({type:'string',value:'sqdwmc',text:'申请单位名称',dictCode:''})
  281. fieldList.push({type:'string',value:'frdb',text:'法人代表(或委托代理人)',dictCode:''})
  282. fieldList.push({type:'string',value:'tyshxydm',text:'统一社会信用代码',dictCode:''})
  283. fieldList.push({type:'string',value:'sqdwtxdz',text:'申请单位通讯地址',dictCode:''})
  284. fieldList.push({type:'string',value:'lxr',text:'联系人',dictCode:''})
  285. fieldList.push({type:'string',value:'yzbm',text:'邮政编码',dictCode:''})
  286. fieldList.push({type:'string',value:'bgdh',text:'办公电话',dictCode:''})
  287. fieldList.push({type:'string',value:'sjh',text:'手机号',dictCode:''})
  288. fieldList.push({type:'string',value:'cz',text:'传真',dictCode:''})
  289. fieldList.push({type:'string',value:'dzyx',text:'电子邮箱',dictCode:''})
  290. fieldList.push({type:'string',value:'zgbm',text:'主管部门',dictCode:''})
  291. fieldList.push({type:'string',value:'txdz',text:'通讯地址',dictCode:''})
  292. this.superFieldList = fieldList
  293. }
  294. }
  295. }
  296. </script>
  297. <style scoped>
  298. @import '~@assets/less/common.less'
  299. </style>