e56251a09c2646b5f25875a1e701453ceb298049.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-modal
  6. title="请谨慎操作!"
  7. :visible="visible"
  8. :confirm-loading="confirmLoading"
  9. @ok="handleOk"
  10. @cancel="handleCancel"
  11. >
  12. <p>{{ ModalText }}</p>
  13. </a-modal>
  14. <a-form layout="inline" @keyup.enter.native="searchQuery">
  15. <a-row :gutter="24">
  16. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  17. <a-form-item label="水闸名称">
  18. <a-input placeholder="请输入水闸名称" v-model="queryParam.szmc"></a-input>
  19. </a-form-item>
  20. </a-col>
  21. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  22. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  23. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  24. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  25. <!--
  26. -->
  27. </span>
  28. </a-col>
  29. </a-row>
  30. </a-form>
  31. </div>
  32. <!-- 查询区域-END -->
  33. <!-- 操作按钮区域 -->
  34. <div class="table-operator">
  35. <a-button @click="handleAdd" v-has="'zbgc:add'" type="primary" icon="plus">新增</a-button>
  36. <a-button v-has="'zbgc:dc'" type="primary" icon="download" @click="handleExportXls('闸坝工程')">导出</a-button>
  37. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  38. <a-button v-has="'zbgc:dr'" type="primary" icon="import">导入</a-button>
  39. </a-upload>
  40. <a-button v-has="'zbgc:sctx'" type="primary" icon="download" @click="showModal">生成图形</a-button>
  41. <!-- 高级查询区域 -->
  42. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  43. <a-dropdown v-if="selectedRowKeys.length > 0">
  44. <a-menu slot="overlay">
  45. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  46. </a-menu>
  47. <a-button style="margin-left: 8px" v-has="'zbgc:pldelete'"> 批量操作 <a-icon type="down" /></a-button>
  48. </a-dropdown>
  49. </div>
  50. <!-- table区域-begin -->
  51. <div>
  52. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  53. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  54. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  55. </div>
  56. <a-table
  57. ref="table"
  58. size="middle"
  59. :scroll="{x:true}"
  60. bordered
  61. rowKey="id"
  62. :columns="columns"
  63. :dataSource="dataSource"
  64. :pagination="ipagination"
  65. :loading="loading"
  66. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  67. class="j-table-force-nowrap"
  68. @change="handleTableChange">
  69. <template slot="szmc" slot-scope="text,record">
  70. <a @click="handleDetail(record)">{{ text }}</a>
  71. </template>
  72. <template slot="htmlSlot" slot-scope="text">
  73. <div v-html="text"></div>
  74. </template>
  75. <template slot="imgSlot" slot-scope="text">
  76. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  77. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  78. </template>
  79. <template slot="pcaSlot" slot-scope="text">
  80. <div>{{ getPcaText(text) }}</div>
  81. </template>
  82. <template slot="fileSlot" slot-scope="text">
  83. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  84. <a-button
  85. v-else
  86. :ghost="true"
  87. type="primary"
  88. icon="download"
  89. size="small"
  90. @click="downloadFile(text)">
  91. 下载
  92. </a-button>
  93. </template>
  94. <span slot="action" slot-scope="text, record">
  95. <a-space>
  96. <a-button @click='handleEdit(record)' v-has="'zbgc:bj'" size='small' type='primary'>编辑</a-button>
  97. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  98. <a-button size='small' v-has="'zbgc:delete'" type='danger'>删除</a-button>
  99. </a-popconfirm>
  100. </a-space>
  101. <!-- <a-divider type="vertical" />-->
  102. <!-- <a-dropdown>-->
  103. <!-- <a-button class="ant-dropdown-link" v-has="'zbgc:delete'" type="primary" icon="plus">更多 <a-icon type="down" /></a-button>-->
  104. <!-- <a-menu slot="overlay">-->
  105. <!-- <a-menu-item>-->
  106. <!-- <a @click="handleDetail(record)">详情</a>-->
  107. <!-- </a-menu-item>-->
  108. <!-- <a-menu-item>-->
  109. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  110. <!-- <a>删除</a>-->
  111. <!-- </a-popconfirm>-->
  112. <!-- </a-menu-item>-->
  113. <!-- </a-menu>-->
  114. <!-- </a-dropdown>-->
  115. </span>
  116. </a-table>
  117. </div>
  118. <rm-zbgc-modal ref="modalForm" @ok="modalFormOk"></rm-zbgc-modal>
  119. </a-card>
  120. </template>
  121. <script>
  122. import '@/assets/less/TableExpand.less'
  123. import { mixinDevice } from '@/utils/mixin'
  124. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  125. import RmZbgcModal from './modules/RmZbgcModal'
  126. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  127. import Area from '@/components/_util/Area'
  128. import {getAction} from "../../../../api/manage";
  129. export default {
  130. name: 'RmZbgcList',
  131. mixins:[JeecgListMixin, mixinDevice],
  132. components: {
  133. RmZbgcModal
  134. },
  135. data () {
  136. return {
  137. ModalText: '',
  138. visible: false,
  139. confirmLoading: false,
  140. description: '闸坝工程管理页面',
  141. // 表头
  142. columns: [
  143. {
  144. title: '序号',
  145. dataIndex: '',
  146. key:'rowIndex',
  147. width:60,
  148. align:"center",
  149. customRender:function (t,r,index) {
  150. return parseInt(index)+1;
  151. }
  152. },
  153. {
  154. title:'水闸名称',
  155. align:"center",
  156. dataIndex: 'szmc',
  157. scopedSlots: { customRender: 'szmc' }
  158. },
  159. {
  160. title:'行政区划',
  161. align:"center",
  162. dataIndex: 'xzqh',
  163. scopedSlots: {customRender: 'pcaSlot'}
  164. },
  165. {
  166. title:'水闸类型',
  167. align:"center",
  168. dataIndex: 'szlx_dictText'
  169. },
  170. {
  171. title:'工程等别',
  172. align:"center",
  173. dataIndex: 'gcdb_dictText'
  174. },
  175. {
  176. title:'建设情况',
  177. align:"center",
  178. dataIndex: 'gcjsqk_dictText'
  179. },
  180. {
  181. title:'泵站管理单位',
  182. align:"center",
  183. dataIndex: 'bzgldwmc'
  184. },
  185. {
  186. title: '操作',
  187. dataIndex: 'action',
  188. align:"center",
  189. fixed:"right",
  190. width:147,
  191. scopedSlots: { customRender: 'action' }
  192. }
  193. ],
  194. url: {
  195. list: "/hzz.shjsgc.zbgc/rmZbgc/list",
  196. delete: "/hzz.shjsgc.zbgc/rmZbgc/delete",
  197. deleteBatch: "/hzz.shjsgc.zbgc/rmZbgc/deleteBatch",
  198. exportXlsUrl: "/hzz.shjsgc.zbgc/rmZbgc/exportXls",
  199. importExcelUrl: "hzz.shjsgc.zbgc/rmZbgc/importExcel",
  200. },
  201. dictOptions:{},
  202. pcaData:'',
  203. superFieldList:[],
  204. }
  205. },
  206. created() {
  207. this.pcaData = new Area()
  208. this.getSuperFieldList();
  209. },
  210. computed: {
  211. importExcelUrl: function(){
  212. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  213. },
  214. },
  215. methods: {
  216. //显示模态框
  217. showModal() {
  218. this.visible = true;
  219. },
  220. //点击ok
  221. handleOk(e) {
  222. this.ModalText = '确定生成图形吗?';
  223. this.confirmLoading = true;
  224. this.xmjgsb();
  225. setTimeout(() => {
  226. this.visible = false;
  227. this.confirmLoading = false;
  228. }, 5000);
  229. this.loadData()
  230. },
  231. //点击cancel
  232. handleCancel(e) {
  233. console.log('Clicked cancel button');
  234. this.visible = false;
  235. },
  236. xmjgsb(){
  237. getAction("/hzz.shjsgc.zbgc/rmZbgc/genarateGeo").then(res=>{
  238. if (res.success) {
  239. this.ModalText="生成图形成功"
  240. }else{
  241. this.ModalText="生成图形失败,请联系管理员"
  242. }
  243. })
  244. },
  245. getPcaText(code){
  246. return this.pcaData.getText(code);
  247. },
  248. initDictConfig(){
  249. },
  250. getSuperFieldList(){
  251. let fieldList=[];
  252. fieldList.push({type:'string',value:'szbm',text:'水闸编码',dictCode:''})
  253. fieldList.push({type:'string',value:'szmc',text:'水闸名称',dictCode:''})
  254. fieldList.push({type:'pca',value:'xzqh',text:'行政区划'})
  255. fieldList.push({type:'string',value:'szlx',text:'水闸类型',dictCode:'szlx'})
  256. fieldList.push({type:'double',value:'jd',text:'经度',dictCode:''})
  257. fieldList.push({type:'double',value:'wd',text:'纬度',dictCode:''})
  258. fieldList.push({type:'string',value:'szszysjq',text:'所在水资源三级区',dictCode:'szszysjq'})
  259. fieldList.push({type:'string',value:'sfwzzgc',text:'是否为闸站工程',dictCode:'yn'})
  260. fieldList.push({type:'string',value:'ly',text:'流域',dictCode:'ly'})
  261. fieldList.push({type:'string',value:'sx',text:'水系',dictCode:'sx'})
  262. fieldList.push({type:'string',value:'hdmc',text:'河段名称',dictCode:''})
  263. fieldList.push({type:'string',value:'szhllx',text:'所在河流(湖泊、水库、渠道)类型',dictCode:'szhllx'})
  264. fieldList.push({type:'string',value:'szhlmc',text:'所在(湖泊、水库、渠道)名称',dictCode:''})
  265. fieldList.push({type:'string',value:'szgqlx',text:'所在灌区(引调水工程)类型',dictCode:'szgqlx'})
  266. fieldList.push({type:'string',value:'szgq',text:'所在灌区(引调水工程)',dictCode:''})
  267. fieldList.push({type:'string',value:'sfwtzgc',text:'是否为套闸工程',dictCode:'yn'})
  268. fieldList.push({type:'string',value:'gcjsqk',text:'工程建设情况',dictCode:'gcjsqk'})
  269. fieldList.push({type:'date',value:'kgny',text:'开工年月'})
  270. fieldList.push({type:'date',value:'jcny',text:'建成年月'})
  271. fieldList.push({type:'string',value:'zygn',text:'主要功能',dictCode:''})
  272. fieldList.push({type:'string',value:'gcdb',text:'工程等别',dictCode:'gcdb'})
  273. fieldList.push({type:'string',value:'jzwaqlb',text:'建筑物安全类别',dictCode:'jzwaq'})
  274. fieldList.push({type:'date',value:'jdrq',text:'鉴定日期'})
  275. fieldList.push({type:'string',value:'zmxs',text:'闸门型式',dictCode:''})
  276. fieldList.push({type:'string',value:'zksl',text:'闸孔数量(个)',dictCode:''})
  277. fieldList.push({type:'string',value:'zkzjk',text:'闸孔总净宽(m)',dictCode:''})
  278. fieldList.push({type:'string',value:'fzzksl',text:'副闸闸孔数量(个)',dictCode:''})
  279. fieldList.push({type:'string',value:'fzzkzjk',text:'副闸闸孔总净宽(m)',dictCode:''})
  280. fieldList.push({type:'string',value:'qbjts',text:'启闭机台数(个)',dictCode:''})
  281. fieldList.push({type:'string',value:'qbjxs',text:'启闭机型式',dictCode:''})
  282. fieldList.push({type:'string',value:'sjhsbz',text:'设计洪水标准(年)',dictCode:''})
  283. fieldList.push({type:'string',value:'jhhsbz',text:'校核洪水标准(年)',dictCode:''})
  284. fieldList.push({type:'string',value:'gzll',text:'过闸流量',dictCode:''})
  285. fieldList.push({type:'string',value:'jhgzll',text:'校核过闸流量(m³/s)',dictCode:''})
  286. fieldList.push({type:'string',value:'zdzll',text:'最大闸流量(m³/s)',dictCode:''})
  287. fieldList.push({type:'string',value:'zdgzll',text:'最大过闸流量发生日期',dictCode:''})
  288. fieldList.push({type:'string',value:'sjdzld',text:'设计地震烈度',dictCode:''})
  289. fieldList.push({type:'string',value:'jtqbz',text:'交通桥标准',dictCode:''})
  290. fieldList.push({type:'string',value:'sfypsxz',text:'是否引排双向闸',dictCode:'yn'})
  291. fieldList.push({type:'string',value:'ysnl',text:'引水能力',dictCode:''})
  292. fieldList.push({type:'string',value:'ysyt',text:'引水用途',dictCode:''})
  293. fieldList.push({type:'string',value:'ysytgqmc',text:'引水用途灌区名称',dictCode:''})
  294. fieldList.push({type:'string',value:'zcdj',text:'注册登记',dictCode:''})
  295. fieldList.push({type:'string',value:'frdb',text:'法人代表',dictCode:''})
  296. fieldList.push({type:'string',value:'zcdjjg',text:'注册登记机构',dictCode:''})
  297. fieldList.push({type:'string',value:'bzgldwmc',text:'泵站管理单位名称',dictCode:''})
  298. fieldList.push({type:'string',value:'bzgldwdm',text:'泵站管理单位代码',dictCode:''})
  299. fieldList.push({type:'string',value:'gldwqs',text:'管理单位权属',dictCode:''})
  300. fieldList.push({type:'string',value:'zgbm',text:'主管部门',dictCode:''})
  301. fieldList.push({type:'string',value:'bzgkglbm',text:'泵站归口管理部门',dictCode:'bzgkglbm'})
  302. fieldList.push({type:'Text',value:'zcshyj',text:'注册审核意见',dictCode:''})
  303. fieldList.push({type:'date',value:'yxqz',text:'有效期至'})
  304. fieldList.push({type:'string',value:'sfwchj',text:'是否完成划界',dictCode:'yn'})
  305. fieldList.push({type:'string',value:'sfwcqq',text:'是否完成确权',dictCode:'yn'})
  306. fieldList.push({type:'string',value:'scwj',text:'上传审批文件',dictCode:'yn'})
  307. this.superFieldList = fieldList
  308. }
  309. }
  310. }
  311. </script>
  312. <style scoped>
  313. @import '~@assets/less/common.less';
  314. </style>