d418bbf50893279f75942d7a66ceb33de447acf6.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  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. <j-popup placeholder="请选择河流名称" v-model="queryParam.hlmc" code="hllist"
  19. org-fields="hlmc" dest-fields="hlmc" :field="getPopupField('hlmc')"
  20. :multi="false"/>
  21. </a-form-item>
  22. </a-col>
  23. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  24. <a-form-item label="界桩编号">
  25. <a-input placeholder="请输入界桩编号" v-model="queryParam.jzbh"></a-input>
  26. </a-form-item>
  27. </a-col>
  28. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  29. <a-form-item label="行政区划">
  30. <j-area-linkage type="cascader" v-model="queryParam.xzqh" placeholder="请选择省市区"/>
  31. </a-form-item>
  32. </a-col>
  33. <template v-if="toggleSearchStatus">
  34. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  35. <a-form-item label="岸别">
  36. <j-dict-select-tag placeholder="请选择岸别" v-model="queryParam.ab" dictCode="ab"/>
  37. </a-form-item>
  38. </a-col>
  39. </template>
  40. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  41. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  42. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  43. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  44. <a @click="handleToggleSearch" style="margin-left: 8px">
  45. {{ toggleSearchStatus ? '收起' : '展开' }}
  46. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  47. </a>
  48. </span>
  49. </a-col>
  50. </a-row>
  51. </a-form>
  52. </div>
  53. <!-- 查询区域-END -->
  54. <!-- 操作按钮区域 -->
  55. <div class="table-operator">
  56. <a-button @click="handleAdd" v-has="'jzd:add'" type="primary" icon="plus">新增</a-button>
  57. <a-button v-has="'jzd:dc'" type="primary" icon="download" @click="handleExportXls('界桩点信息表')">导出</a-button>
  58. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
  59. :action="importExcelUrl" @change="handleImportExcel">
  60. <a-button v-has="'jzd:dr'" type="primary" icon="import">导入</a-button>
  61. </a-upload>
  62. <a-button v-has="'jzd:sctx'" type="primary" icon="download" @click="showModal">生成图形</a-button>
  63. <!-- 高级查询区域 -->
  64. <j-super-query :fieldList="superFieldList" ref="superQueryModal"
  65. @handleSuperQuery="handleSuperQuery"></j-super-query>
  66. <a-dropdown v-if="selectedRowKeys.length > 0">
  67. <a-menu slot="overlay">
  68. <a-menu-item key="1" @click="batchDel">
  69. <a-icon type="delete"/>
  70. 删除
  71. </a-menu-item>
  72. </a-menu>
  73. <a-button style="margin-left: 8px" v-has="'jzd:pldelete'"> 批量操作
  74. <a-icon type="down"/>
  75. </a-button>
  76. </a-dropdown>
  77. </div>
  78. <!-- table区域-begin -->
  79. <div>
  80. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  81. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
  82. style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  83. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  84. </div>
  85. <a-table
  86. ref="table"
  87. size="middle"
  88. :scroll="{x:true}"
  89. bordered
  90. rowKey="id"
  91. :columns="columns"
  92. :dataSource="dataSource"
  93. :pagination="ipagination"
  94. :loading="loading"
  95. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  96. class="j-table-force-nowrap"
  97. @change="handleTableChange">
  98. <template slot="jzbh" slot-scope="text,record">
  99. <a @click="handleDetail(record)">{{ text }}</a>
  100. </template>
  101. <template slot="htmlSlot" slot-scope="text">
  102. <div v-html="text"></div>
  103. </template>
  104. <template slot="imgSlot" slot-scope="text">
  105. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  106. <img v-else :src="getImgView(text)" height="25px" alt=""
  107. style="max-width:80px;font-size: 12px;font-style: italic;"/>
  108. </template>
  109. <template slot="pcaSlot" slot-scope="text">
  110. <div>{{ getPcaText(text) }}</div>
  111. </template>
  112. <template slot="fileSlot" slot-scope="text">
  113. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  114. <a-button
  115. v-else
  116. :ghost="true"
  117. type="primary"
  118. icon="download"
  119. size="small"
  120. @click="downloadFile(text)">
  121. 下载
  122. </a-button>
  123. </template>
  124. <span slot="action" slot-scope="text, record">
  125. <a-space>
  126. <a-button @click='handleEdit(record)' v-has="'jzd:bj'" size='small' type='primary'>编辑</a-button>
  127. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  128. <a-button size='small' v-has="'gsp:delete'" type='danger'>删除</a-button>
  129. </a-popconfirm>
  130. </a-space>
  131. <!-- <a-divider type="vertical" />-->
  132. <!-- <a-dropdown>-->
  133. <!-- <a-button class="ant-dropdown-link" v-has="'jzd:delete'" type="primary" icon="plus">更多 <a-icon type="down" /></a-button>-->
  134. <!-- <a-menu slot="overlay">-->
  135. <!-- <a-menu-item>-->
  136. <!-- <a @click="handleDetail(record)">详情</a>-->
  137. <!-- </a-menu-item>-->
  138. <!-- <a-menu-item>-->
  139. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  140. <!-- <a>删除</a>-->
  141. <!-- </a-popconfirm>-->
  142. <!-- </a-menu-item>-->
  143. <!-- </a-menu>-->
  144. <!-- </a-dropdown>-->
  145. </span>
  146. </a-table>
  147. </div>
  148. <rm-boundary-marker-modal ref="modalForm" @ok="modalFormOk"></rm-boundary-marker-modal>
  149. </a-card>
  150. </template>
  151. <script>
  152. import '@/assets/less/TableExpand.less'
  153. import {mixinDevice} from '@/utils/mixin'
  154. import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  155. import RmBoundaryMarkerModal from './modules/RmBoundaryMarkerModal'
  156. import Area from '@/components/_util/Area'
  157. import {getAction} from "../../../../api/manage";
  158. export default {
  159. name: 'RmBoundaryMarkerList',
  160. mixins: [JeecgListMixin, mixinDevice],
  161. components: {
  162. RmBoundaryMarkerModal
  163. },
  164. data() {
  165. return {
  166. ModalText: '',
  167. visible: false,
  168. confirmLoading: false,
  169. description: '界桩点信息表管理页面',
  170. // 表头
  171. columns: [
  172. {
  173. title: '序号',
  174. dataIndex: '',
  175. key: 'rowIndex',
  176. width: 60,
  177. align: "center",
  178. customRender: function (t, r, index) {
  179. return parseInt(index) + 1;
  180. }
  181. },
  182. {
  183. title: '界桩编号',
  184. align: "center",
  185. dataIndex: 'jzbh',
  186. scopedSlots: {customRender: 'jzbh'}
  187. },
  188. {
  189. title: '横坐标',
  190. align: "center",
  191. dataIndex: 'hzb'
  192. },
  193. {
  194. title: '纵坐标',
  195. align: "center",
  196. dataIndex: 'zzb'
  197. },
  198. {
  199. title: '岸别',
  200. align: "center",
  201. dataIndex: 'ab_dictText'
  202. },
  203. {
  204. title: '高程',
  205. align: "center",
  206. dataIndex: 'gc'
  207. },
  208. {
  209. title: '行政区划',
  210. align: "center",
  211. dataIndex: 'xzqh',
  212. scopedSlots: {customRender: 'pcaSlot'}
  213. },
  214. {
  215. title: '地图状态',
  216. align: "center",
  217. dataIndex: 'flag'
  218. },
  219. {
  220. title: '操作',
  221. dataIndex: 'action',
  222. align: "center",
  223. fixed: "right",
  224. width: 147,
  225. scopedSlots: {customRender: 'action'}
  226. }
  227. ],
  228. url: {
  229. list: "/hzz.hhhj.jzd/rmBoundaryMarker/list",
  230. delete: "/hzz.hhhj.jzd/rmBoundaryMarker/delete",
  231. deleteBatch: "/hzz.hhhj.jzd/rmBoundaryMarker/deleteBatch",
  232. exportXlsUrl: "/hzz.hhhj.jzd/rmBoundaryMarker/exportXls",
  233. importExcelUrl: "hzz.hhhj.jzd/rmBoundaryMarker/importExcel",
  234. },
  235. dictOptions: {},
  236. pcaData: '',
  237. superFieldList: [],
  238. }
  239. },
  240. created() {
  241. this.pcaData = new Area()
  242. this.getSuperFieldList();
  243. },
  244. computed: {
  245. importExcelUrl: function () {
  246. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  247. },
  248. },
  249. methods: {
  250. //显示模态框
  251. showModal() {
  252. this.visible = true;
  253. },
  254. //点击ok
  255. handleOk(e) {
  256. this.ModalText = '确定生成图形吗?';
  257. this.confirmLoading = true;
  258. this.xmjgsb()
  259. setTimeout(() => {
  260. this.visible = false;
  261. this.confirmLoading = false;
  262. }, 5000);
  263. this.loadData()
  264. },
  265. //点击cancel
  266. handleCancel(e) {
  267. console.log('Clicked cancel button');
  268. this.visible = false;
  269. },
  270. xmjgsb() {
  271. getAction("/hzz.hhhj.jzd/rmBoundaryMarker/genarateGeo").then(res => {
  272. if (res.success) {
  273. this.ModalText = "生成图形成功"
  274. } else {
  275. this.ModalText = "生成图形失败,请联系管理员"
  276. }
  277. })
  278. },
  279. getPcaText(code) {
  280. return this.pcaData.getText(code);
  281. },
  282. initDictConfig() {
  283. },
  284. getSuperFieldList() {
  285. let fieldList = [];
  286. fieldList.push({type: 'string', value: 'jzbh', text: '界桩编号', dictCode: ''})
  287. fieldList.push({type: 'double', value: 'hzb', text: '横坐标', dictCode: ''})
  288. fieldList.push({type: 'double', value: 'zzb', text: '纵坐标', dictCode: ''})
  289. fieldList.push({type: 'double', value: 'sfyw', text: '是否移位', dictCode: ''})
  290. fieldList.push({type: 'double', value: 'ywhzb', text: '移位横坐标', dictCode: ''})
  291. fieldList.push({type: 'double', value: 'ywzzb', text: '移位纵坐标', dictCode: ''})
  292. fieldList.push({type: 'string', value: 'ab', text: '岸别', dictCode: 'ab'})
  293. fieldList.push({type: 'double', value: 'gc', text: '高程', dictCode: ''})
  294. fieldList.push({type: 'pca', value: 'xzqh', text: '行政区划'})
  295. fieldList.push({type: 'string', value: 'dmdz', text: '所在位置', dictCode: ''})
  296. fieldList.push({type: 'Text', value: 'bz', text: '备注', dictCode: ''})
  297. fieldList.push({type: 'int', value: 'flag', text: '地图状态', dictCode: ''})
  298. this.superFieldList = fieldList
  299. }
  300. }
  301. }
  302. </script>
  303. <style scoped>
  304. @import '~@assets/less/common.less';
  305. </style>