9e817d12edc61e68b66508b008fdc7618fc3934a.svn-base 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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. <a-input placeholder="请输入堤防名称" v-model="queryParam.dfmc"></a-input>
  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="'dfgc:add'" type="primary" icon="plus">新增</a-button>
  29. <a-button v-has="'dfgc:dc'" type="primary" icon="download" @click="handleExportXls('堤防工程')">导出</a-button>
  30. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
  31. :action="importExcelUrl" @change="handleImportExcel">
  32. <a-button v-has="'dfgc:dr'" type="primary" icon="import">导入</a-button>
  33. </a-upload>
  34. <!-- <a-button v-has="'dfgc:sctx'" type="primary" icon="download" @click="showModal">生成图形</a-button>-->
  35. <!-- 高级查询区域 -->
  36. <j-super-query :fieldList="superFieldList" ref="superQueryModal"
  37. @handleSuperQuery="handleSuperQuery"></j-super-query>
  38. <a-dropdown v-if="selectedRowKeys.length > 0">
  39. <a-menu slot="overlay">
  40. <a-menu-item key="1" @click="batchDel">
  41. <a-icon type="delete"/>
  42. 删除
  43. </a-menu-item>
  44. </a-menu>
  45. <a-button style="margin-left: 8px"> 批量操作
  46. <a-icon type="down"/>
  47. </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
  54. style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  55. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  56. </div>
  57. <a-table
  58. ref="table"
  59. size="middle"
  60. :scroll="{x:true}"
  61. bordered
  62. rowKey="id"
  63. :columns="columns"
  64. :dataSource="dataSource"
  65. :pagination="ipagination"
  66. :loading="loading"
  67. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  68. class="j-table-force-nowrap"
  69. @change="handleTableChange">
  70. <template slot="dfmc" slot-scope="text,record">
  71. <a @click="handleDetail(record)">{{ text }}</a>
  72. </template>
  73. <template slot="htmlSlot" slot-scope="text">
  74. <div v-html="text"></div>
  75. </template>
  76. <template slot="imgSlot" slot-scope="text">
  77. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  78. <img v-else :src="getImgView(text)" height="25px" alt=""
  79. style="max-width:80px;font-size: 12px;font-style: italic;"/>
  80. </template>
  81. <template slot="pcaSlot" slot-scope="text">
  82. <div>{{ getPcaText(text) }}</div>
  83. </template>
  84. <template slot="fileSlot" slot-scope="text">
  85. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  86. <a-button
  87. v-else
  88. :ghost="true"
  89. type="primary"
  90. icon="download"
  91. size="small"
  92. @click="downloadFile(text)">
  93. 下载
  94. </a-button>
  95. </template>
  96. <span slot="action" slot-scope="text, record">
  97. <a-space>
  98. <a-button @click='handleEdit(record)' v-has="'dfgc:bj'" size='small' type='primary'>编辑</a-button>
  99. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  100. <a-button size='small' v-has="'dfgc:delete'" type='danger'>删除</a-button>
  101. </a-popconfirm>
  102. </a-space>
  103. <!-- <a-divider type="vertical" />-->
  104. <!-- <a-dropdown>-->
  105. <!-- <a-button class="ant-dropdown-link" v-has="'dfgc:delete'" type="primary" icon="plus">更多 <a-icon type="down" /></a-button>-->
  106. <!-- <a-menu slot="overlay">-->
  107. <!-- <a-menu-item>-->
  108. <!-- <a @click="handleDetail(record)">详情</a>-->
  109. <!-- </a-menu-item>-->
  110. <!-- <a-menu-item>-->
  111. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  112. <!-- <a>删除</a>-->
  113. <!-- </a-popconfirm>-->
  114. <!-- </a-menu-item>-->
  115. <!-- </a-menu>-->
  116. <!-- </a-dropdown>-->
  117. </span>
  118. </a-table>
  119. </div>
  120. <rm-dfgc-modal ref="modalForm" @ok="modalFormOk"></rm-dfgc-modal>
  121. </a-card>
  122. </template>
  123. <script>
  124. import '@/assets/less/TableExpand.less'
  125. import {mixinDevice} from '@/utils/mixin'
  126. import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  127. import RmDfgcModal from './modules/RmDfgcModal'
  128. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  129. import Area from '@/components/_util/Area'
  130. export default {
  131. name: 'RmDfgcList',
  132. mixins: [JeecgListMixin, mixinDevice],
  133. components: {
  134. RmDfgcModal
  135. },
  136. data() {
  137. return {
  138. description: '堤防工程管理页面',
  139. // 表头
  140. columns: [
  141. {
  142. title: '序号',
  143. dataIndex: '',
  144. key: 'rowIndex',
  145. width: 60,
  146. align: "center",
  147. customRender: function (t, r, index) {
  148. return parseInt(index) + 1;
  149. }
  150. },
  151. {
  152. title: '堤防名称',
  153. align: "center",
  154. dataIndex: 'dfmc',
  155. scopedSlots: {customRender: 'dfmc'}
  156. },
  157. {
  158. title: '堤防级别',
  159. align: "center",
  160. dataIndex: 'dfjb_dictText'
  161. },
  162. {
  163. title: '堤防类型',
  164. align: "center",
  165. dataIndex: 'dflx_dictText'
  166. },
  167. {
  168. title: '跨界情况',
  169. align: "center",
  170. dataIndex: 'dfkjqk_dictText'
  171. },
  172. {
  173. title: '建设情况',
  174. align: "center",
  175. dataIndex: 'gcjsqk_dictText'
  176. },
  177. {
  178. title: '长度',
  179. align: "center",
  180. dataIndex: 'dfcd'
  181. },
  182. {
  183. title: '管理单位名称',
  184. align: "center",
  185. dataIndex: 'dfgcgldwmc'
  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.dfgc/rmDfgc/list",
  198. delete: "/hzz.shjsgc.dfgc/rmDfgc/delete",
  199. deleteBatch: "/hzz.shjsgc.dfgc/rmDfgc/deleteBatch",
  200. exportXlsUrl: "/hzz.shjsgc.dfgc/rmDfgc/exportXls",
  201. importExcelUrl: "hzz.shjsgc.dfgc/rmDfgc/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.dfgc/rmDfgc/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: 'dfbm', text: '堤防编码', dictCode: ''})
  255. fieldList.push({type: 'string', value: 'dfmc', text: '堤防名称', dictCode: ''})
  256. fieldList.push({type: 'pca', value: 'qdwzxzqh', text: '起点位置行政区划'})
  257. fieldList.push({type: 'pca', value: 'zdwzxzqh', text: '终点位置行政区划'})
  258. fieldList.push({type: 'double', value: 'qdjd', text: '起点经度', dictCode: ''})
  259. fieldList.push({type: 'double', value: 'qdwd', text: '起点纬度', dictCode: ''})
  260. fieldList.push({type: 'double', value: 'zdjd', text: '终点经度', dictCode: ''})
  261. fieldList.push({type: 'double', value: 'zdwd', text: '终点纬度', dictCode: ''})
  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: 'hdmc', text: '河段名称', dictCode: ''})
  265. fieldList.push({type: 'string', value: 'szhllx', text: '所在河流(湖泊、海岸)类型', dictCode: 'szhllx'})
  266. fieldList.push({type: 'string', value: 'szhlmc', text: '所在河流(湖泊、海岸)名称', dictCode: ''})
  267. fieldList.push({type: 'string', value: 'hlab', text: '河流岸别', dictCode: ''})
  268. fieldList.push({type: 'string', value: 'dflx', text: '堤防类型', dictCode: 'dflx'})
  269. fieldList.push({type: 'string', value: 'dfxs', text: '堤防型式', dictCode: 'dfxs'})
  270. fieldList.push({type: 'string', value: 'dfkjqk', text: '堤防跨界情况', dictCode: 'dfkjqk'})
  271. fieldList.push({type: 'string', value: 'gcjsqk', text: '工程建设情况', dictCode: 'gcjsqk'})
  272. fieldList.push({type: 'date', value: 'kgny', text: '开工年月'})
  273. fieldList.push({type: 'date', value: 'jcny', text: '建成年月'})
  274. fieldList.push({type: 'string', value: 'gcrw', text: '工程任务', dictCode: 'gcrw'})
  275. fieldList.push({type: 'string', value: 'dfjb', text: '堤防级别', dictCode: 'dfjb'})
  276. fieldList.push({type: 'string', value: 'dfcd', text: '堤防长度(m)', dictCode: ''})
  277. fieldList.push({type: 'string', value: 'ddghfhdcd', text: '达到规划防洪(潮)标准的长度(m)', dictCode: ''})
  278. fieldList.push({type: 'string', value: 'ghfhcbz', text: '规划防洪潮标准[重现期](年)', dictCode: ''})
  279. fieldList.push({type: 'string', value: 'gcxt', text: '高程系统', dictCode: ''})
  280. fieldList.push({type: 'string', value: 'ddgcqdgc', text: '堤顶高程起点高程(m)', dictCode: ''})
  281. fieldList.push({type: 'string', value: 'ddgczdgc', text: '堤顶高程终点高程(m)', dictCode: ''})
  282. fieldList.push({type: 'string', value: 'sjsw', text: '设计水(高潮)位(m)', dictCode: ''})
  283. fieldList.push({type: 'string', value: 'dfgdzxz', text: '堤防高度最小值(m)', dictCode: ''})
  284. fieldList.push({type: 'string', value: 'dfgdzdz', text: '堤防高度最大值(m)', dictCode: ''})
  285. fieldList.push({type: 'string', value: 'dfkdzxz', text: '堤防宽度最小值(m)', dictCode: ''})
  286. fieldList.push({type: 'string', value: 'dfkdzdz', text: '堤防宽度最大值(m)', dictCode: ''})
  287. fieldList.push({type: 'string', value: 'szsl', text: '水闸数量(个)', dictCode: ''})
  288. fieldList.push({type: 'string', value: 'ghsl', text: '管涵数量(个)', dictCode: ''})
  289. fieldList.push({type: 'string', value: 'bzsl', text: '泵站数量(处)', dictCode: ''})
  290. fieldList.push({type: 'string', value: 'dxhsl', text: '倒虹吸数量(个)', dictCode: ''})
  291. fieldList.push({type: 'string', value: 'dfgcgldwmc', text: '堤防工程管理单位名称', dictCode: ''})
  292. fieldList.push({type: 'string', value: 'dfgcgkglbmA', text: '堤防工程归口管理部门', dictCode: ''})
  293. fieldList.push({type: 'string', value: 'dfgcgkglbmB', text: '堤防工程归口管理部门', dictCode: 'bzgcglbm'})
  294. fieldList.push({type: 'string', value: 'sfwchj', text: '是否完成划界', dictCode: 'yn'})
  295. fieldList.push({type: 'string', value: 'sfwcqq', text: '是否完成确权', dictCode: 'yn'})
  296. fieldList.push({type: 'string', value: 'scwj', text: '上传审批文件', dictCode: ''})
  297. this.superFieldList = fieldList
  298. }
  299. }
  300. }
  301. </script>
  302. <style scoped>
  303. @import '~@assets/less/common.less';
  304. </style>