32677eb1ddf8a27d3f0192b2828a3336b9dc4fea.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  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.bzmc" ></a-input>
  19. </a-form-item>
  20. </a-col>
  21. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  22. <a-form-item label="建设情况">
  23. <j-dict-select-tag placeholder="请选择建设情况" v-model="queryParam.jsqk" dictCode="gcjsqk"/>
  24. </a-form-item>
  25. </a-col>
  26. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  27. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  28. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  29. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  30. <!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
  31. <!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
  32. <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
  33. <!-- </a>-->
  34. </span>
  35. </a-col>
  36. </a-row>
  37. </a-form>
  38. </div>
  39. <!-- 查询区域-END -->
  40. <!-- 操作按钮区域 -->
  41. <div class="table-operator">
  42. <a-button @click="handleAdd" v-has="'bzgc:add'" type="primary" icon="plus">新增</a-button>
  43. <a-button v-has="'bzgc:dc'" type="primary" icon="download" @click="handleExportXls('泵站工程')">导出</a-button>
  44. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  45. <a-button v-has="'bzgc:dr'" type="primary" icon="import">导入</a-button>
  46. </a-upload>
  47. <a-button v-has="'bzgc:sctx'" type="primary" icon="download" @click="showModal">生成图形</a-button>
  48. <!-- 高级查询区域 -->
  49. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  50. <a-dropdown v-if="selectedRowKeys.length > 0">
  51. <a-menu slot="overlay">
  52. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  53. </a-menu>
  54. <a-button style="margin-left: 8px" v-has="'bzgc:pldelete'"> 批量操作 <a-icon type="down" /></a-button>
  55. </a-dropdown>
  56. </div>
  57. <!-- table区域-begin -->
  58. <div>
  59. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  60. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  61. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  62. </div>
  63. <a-table
  64. ref="table"
  65. size="middle"
  66. :scroll="{x:true}"
  67. bordered
  68. rowKey="id"
  69. :columns="columns"
  70. :dataSource="dataSource"
  71. :pagination="ipagination"
  72. :loading="loading"
  73. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  74. class="j-table-force-nowrap"
  75. @change="handleTableChange">
  76. <template slot="bzmc" slot-scope="text,record">
  77. <a @click="handleDetail(record)">{{ text }}</a>
  78. </template>
  79. <template slot="htmlSlot" slot-scope="text">
  80. <div v-html="text"></div>
  81. </template>
  82. <template slot="imgSlot" slot-scope="text">
  83. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  84. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  85. </template>
  86. <template slot="pcaSlot" slot-scope="text">
  87. <div>{{ getPcaText(text) }}</div>
  88. </template>
  89. <template slot="fileSlot" slot-scope="text">
  90. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  91. <a-button
  92. v-else
  93. :ghost="true"
  94. type="primary"
  95. icon="download"
  96. size="small"
  97. @click="downloadFile(text)">
  98. 下载
  99. </a-button>
  100. </template>
  101. <span slot="action" slot-scope="text, record">
  102. <a-space>
  103. <a-button @click='handleEdit(record)' v-has="'bzgc:bj'" size='small' type='primary'>编辑</a-button>
  104. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  105. <a-button size='small' v-has="'bzgc:delete'" type='danger'>删除</a-button>
  106. </a-popconfirm>
  107. </a-space>
  108. <!-- <a-divider type="vertical" />-->
  109. <!-- <a-dropdown>-->
  110. <!-- <a-button class="ant-dropdown-link" v-has="'bzgc:delete'" type="primary" icon="plus">更多 <a-icon type="down" /></a-button>-->
  111. <!-- <a-menu slot="overlay">-->
  112. <!-- <a-menu-item>-->
  113. <!-- <a @click="handleDetail(record)">详情</a>-->
  114. <!-- </a-menu-item>-->
  115. <!-- <a-menu-item>-->
  116. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  117. <!-- <a>删除</a>-->
  118. <!-- </a-popconfirm>-->
  119. <!-- </a-menu-item>-->
  120. <!-- </a-menu>-->
  121. <!-- </a-dropdown>-->
  122. </span>
  123. </a-table>
  124. </div>
  125. <rm-bzgc-modal ref="modalForm" @ok="modalFormOk"></rm-bzgc-modal>
  126. </a-card>
  127. </template>
  128. <script>
  129. import '@/assets/less/TableExpand.less'
  130. import { mixinDevice } from '@/utils/mixin'
  131. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  132. import RmBzgcModal from './modules/RmBzgcModal'
  133. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  134. import Area from '@/components/_util/Area'
  135. import {getAction} from "../../../../api/manage";
  136. export default {
  137. name: 'RmBzgcList',
  138. mixins:[JeecgListMixin, mixinDevice],
  139. components: {
  140. RmBzgcModal
  141. },
  142. data () {
  143. return {
  144. ModalText: '',
  145. visible: false,
  146. confirmLoading: false,
  147. description: '泵站工程管理页面',
  148. // 表头
  149. columns: [
  150. {
  151. title: '序号',
  152. dataIndex: '',
  153. key:'rowIndex',
  154. width:60,
  155. align:"center",
  156. customRender:function (t,r,index) {
  157. return parseInt(index)+1;
  158. }
  159. },
  160. {
  161. title:'泵站名称',
  162. align:"center",
  163. dataIndex: 'bzmc',
  164. scopedSlots: { customRender: 'bzmc' }
  165. },
  166. {
  167. title:'行政区划',
  168. align:"center",
  169. dataIndex: 'xzqhmc',
  170. scopedSlots: {customRender: 'pcaSlot'}
  171. },
  172. {
  173. title:'管理部门',
  174. align:"center",
  175. dataIndex: 'bzgldwmc'
  176. },
  177. {
  178. title:'所在水资源三级区',
  179. align:"center",
  180. dataIndex: 'szszysjq_dictText'
  181. },
  182. {
  183. title:'工程建设情况',
  184. align:"center",
  185. dataIndex: 'jsqk_dictText'
  186. },
  187. {
  188. title: '操作',
  189. dataIndex: 'action',
  190. align:"center",
  191. fixed:"right",
  192. width:147,
  193. scopedSlots: { customRender: 'action' }
  194. }
  195. ],
  196. url: {
  197. list: "/hzz.shjsgc.bzgc/rmBzgc/list",
  198. delete: "/hzz.shjsgc.bzgc/rmBzgc/delete",
  199. deleteBatch: "/hzz.shjsgc.bzgc/rmBzgc/deleteBatch",
  200. exportXlsUrl: "/hzz.shjsgc.bzgc/rmBzgc/exportXls",
  201. importExcelUrl: "hzz.shjsgc.bzgc/rmBzgc/importExcel",
  202. },
  203. dictOptions:{},
  204. pcaData:'',
  205. superFieldList:[],
  206. }
  207. },
  208. created() {
  209. this.pcaData = new Area()
  210. this.getSuperFieldList();
  211. },
  212. computed: {
  213. importExcelUrl: function(){
  214. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  215. },
  216. },
  217. methods: {
  218. //显示模态框
  219. showModal() {
  220. this.visible = true;
  221. },
  222. //点击ok
  223. handleOk(e) {
  224. this.ModalText = '确定生成图形吗?';
  225. this.confirmLoading = true;
  226. this.xmjgsb();
  227. setTimeout(() => {
  228. this.visible = false;
  229. this.confirmLoading = false;
  230. }, 5000);
  231. this.loadData()
  232. },
  233. //点击cancel
  234. handleCancel(e) {
  235. console.log('Clicked cancel button');
  236. this.visible = false;
  237. },
  238. xmjgsb(){
  239. getAction("/hzz.shjsgc.bzgc/rmBzgc/genarateGeo").then(res=>{
  240. if (res.success) {
  241. this.ModalText="生成图形成功"
  242. }else{
  243. this.ModalText="生成图形失败,请联系管理员"
  244. }
  245. })
  246. },
  247. getPcaText(code){
  248. return this.pcaData.getText(code);
  249. },
  250. initDictConfig(){
  251. },
  252. getSuperFieldList(){
  253. let fieldList=[];
  254. fieldList.push({type:'string',value:'bzmc',text:'泵站名称',dictCode:''})
  255. fieldList.push({type:'string',value:'bzbm',text:'泵站编码',dictCode:''})
  256. fieldList.push({type:'pca',value:'xzqhmc',text:'行政区划名称'})
  257. fieldList.push({type:'string',value:'hdmc',text:'河段名称',dictCode:''})
  258. fieldList.push({type:'double',value:'jd',text:'经度',dictCode:''})
  259. fieldList.push({type:'double',value:'wd',text:'纬度',dictCode:''})
  260. fieldList.push({type:'string',value:'szszysjq',text:'所在水资源三级区',dictCode:'szszysjq'})
  261. fieldList.push({type:'string',value:'bzlx',text:'泵站类型',dictCode:'bzlx'})
  262. fieldList.push({type:'string',value:'ly',text:'流域',dictCode:'ly'})
  263. fieldList.push({type:'string',value:'sx',text:'水系',dictCode:'sx'})
  264. fieldList.push({type:'string',value:'szhllx',text:'所在河流(湖泊)类型',dictCode:'szhllx'})
  265. fieldList.push({type:'string',value:'szhlmc',text:'所在河流(湖泊、水库、渠道)名称',dictCode:''})
  266. fieldList.push({type:'string',value:'szgqlx',text:'所在灌区(引调水工程)类型',dictCode:'szgqlx'})
  267. fieldList.push({type:'string',value:'szgqmc',text:'所在灌区(引调水工程)名称',dictCode:''})
  268. fieldList.push({type:'string',value:'sfwzzgc',text:'是否为闸站工程',dictCode:'yn'})
  269. fieldList.push({type:'string',value:'sfwyqgc',text:'是否为引泉工程',dictCode:'yn'})
  270. fieldList.push({type:'string',value:'jsqk',text:'建设情况',dictCode:'gcjsqk'})
  271. fieldList.push({type:'string',value:'gcrw',text:'工程任务',dictCode:''})
  272. fieldList.push({type:'date',value:'kgny',text:'开工年月'})
  273. fieldList.push({type:'date',value:'jcny',text:'建成年月'})
  274. fieldList.push({type:'string',value:'gcdb',text:'工程等别',dictCode:'gcdb'})
  275. fieldList.push({type:'string',value:'jzwjb',text:'建筑物级别',dictCode:'jzwaq'})
  276. fieldList.push({type:'string',value:'zjll',text:'装机流量',dictCode:''})
  277. fieldList.push({type:'string',value:'zjgl',text:'装机功率',dictCode:''})
  278. fieldList.push({type:'string',value:'sjyc',text:'设计扬程',dictCode:''})
  279. fieldList.push({type:'string',value:'bzsl',text:'泵站数量',dictCode:''})
  280. fieldList.push({type:'string',value:'bzgldwmc',text:'泵站管理单位名称',dictCode:''})
  281. fieldList.push({type:'string',value:'bzgldwdm',text:'泵站管理单位代码',dictCode:''})
  282. fieldList.push({type:'string',value:'bzgkglbm',text:'泵站归口管理部门',dictCode:'bzgkglbm'})
  283. fieldList.push({type:'string',value:'sfwcqq',text:'是否完成确权',dictCode:'yn'})
  284. fieldList.push({type:'string',value:'sfwchj',text:'是否完成划界',dictCode:'yn'})
  285. fieldList.push({type:'string',value:'scwj',text:'上传审批文件',dictCode:''})
  286. this.superFieldList = fieldList
  287. }
  288. }
  289. }
  290. </script>
  291. <style scoped>
  292. @import '~@assets/less/common.less';
  293. </style>