d44543b39c05f7512636ff21265557b10baa98fa.svn-base 14 KB

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