3e5a9524084c0997628f9ef647857f7ce08b03dd.svn-base 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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.xmmc"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13. <a-form-item label="项目类型">
  14. <j-dict-select-tag placeholder="请选择项目类型" v-model="queryParam.xmlx" dictCode="xmlx"/>
  15. </a-form-item>
  16. </a-col>
  17. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  19. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  20. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  21. <!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
  22. <!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
  23. <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
  24. <!-- </a>-->
  25. </span>
  26. </a-col>
  27. </a-row>
  28. </a-form>
  29. </div>
  30. <!-- 查询区域-END -->
  31. <!-- 操作按钮区域 -->
  32. <div class="table-operator">
  33. <a-button @click="handleAdd" v-has="'shxmxxb:add'" type="primary" icon="plus">新增</a-button>
  34. <a-button type="primary" v-has="'shxmxxb:dc'" icon="download" @click="handleExportXls('涉河项目信息表')">导出</a-button>
  35. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  36. <a-button type="primary" v-has="'shxmxxb:dr'" icon="import">导入</a-button>
  37. </a-upload>
  38. <!-- 高级查询区域 -->
  39. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  40. <a-dropdown v-if="selectedRowKeys.length > 0">
  41. <a-menu slot="overlay">
  42. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  43. </a-menu>
  44. <a-button style="margin-left: 8px" v-has="'shxmxxb:pldelete'"> 批量操作 <a-icon type="down" /></a-button>
  45. </a-dropdown>
  46. </div>
  47. <!-- table区域-begin -->
  48. <div>
  49. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  50. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  51. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  52. </div>
  53. <a-table
  54. ref="table"
  55. size="middle"
  56. bordered
  57. rowKey="id"
  58. class="j-table-force-nowrap"
  59. :scroll="{x:true}"
  60. :columns="columns"
  61. :dataSource="dataSource"
  62. :pagination="ipagination"
  63. :loading="loading"
  64. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  65. @change="handleTableChange">
  66. <template slot="xmmc" slot-scope="text,record">
  67. <a @click="handleDetail(record)">{{ text }}</a>
  68. </template>
  69. <template slot="htmlSlot" slot-scope="text">
  70. <div v-html="text"></div>
  71. </template>
  72. <template slot="imgSlot" slot-scope="text">
  73. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  74. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  75. </template>
  76. <template slot="fileSlot" slot-scope="text">
  77. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  78. <a-button
  79. v-else
  80. :ghost="true"
  81. type="primary"
  82. icon="download"
  83. size="small"
  84. @click="downloadFile(text)">
  85. 下载
  86. </a-button>
  87. </template>
  88. <template slot="pcaSlot" slot-scope="text">
  89. <div>{{ getPcaText(text) }}</div>
  90. </template>
  91. <span slot="action" slot-scope="text, record">
  92. <a-space>
  93. <a-button @click='handleEdit(record)' v-has="'shxmxxb:bj'" size='small' type='primary'>编辑</a-button>
  94. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  95. <a-button size='small' v-has="'shxmxxb:delete'" type='danger'>删除</a-button>
  96. </a-popconfirm>
  97. </a-space>
  98. <!-- <a @click="handleEdit(record)">编辑</a>-->
  99. <!-- <a-divider type="vertical" />-->
  100. <!-- <a-dropdown>-->
  101. <!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
  102. <!-- <a-menu slot="overlay">-->
  103. <!-- <a-menu-item>-->
  104. <!-- <a @click="handleDetail(record)">详情</a>-->
  105. <!-- </a-menu-item>-->
  106. <!-- <a-menu-item>-->
  107. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  108. <!-- <a>删除</a>-->
  109. <!-- </a-popconfirm>-->
  110. <!-- </a-menu-item>-->
  111. <!-- </a-menu>-->
  112. <!-- </a-dropdown>-->
  113. </span>
  114. </a-table>
  115. </div>
  116. <rm-shxmxxb-modal ref="modalForm" @ok="modalFormOk"/>
  117. </a-card>
  118. </template>
  119. <script>
  120. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  121. import RmShxmxxbModal from './modules/RmShxmxxbModal'
  122. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  123. import Area from '@/components/_util/Area'
  124. import '@/assets/less/TableExpand.less'
  125. export default {
  126. name: "RmShxmxxbList",
  127. mixins:[JeecgListMixin],
  128. components: {
  129. RmShxmxxbModal
  130. },
  131. data () {
  132. return {
  133. description: '涉河项目信息表管理页面',
  134. // 表头
  135. columns: [
  136. {
  137. title: '序号',
  138. dataIndex: '',
  139. key:'rowIndex',
  140. width:60,
  141. align:"center",
  142. customRender:function (t,r,index) {
  143. return parseInt(index)+1;
  144. }
  145. },
  146. {
  147. title:'项目名称',
  148. align:"center",
  149. dataIndex: 'xmmc',
  150. scopedSlots: { customRender: 'xmmc' }
  151. },
  152. {
  153. title:'项目类型',
  154. align:"center",
  155. dataIndex: 'xmlx_dictText'
  156. },
  157. {
  158. title:'行政区划',
  159. align:"center",
  160. dataIndex: 'xzqh',
  161. scopedSlots: {customRender: 'pcaSlot'}
  162. },
  163. {
  164. title:'建设状态',
  165. align:"center",
  166. dataIndex: 'jszt_dictText'
  167. },
  168. {
  169. title:'管理单位',
  170. align:"center",
  171. dataIndex: 'gldw'
  172. },
  173. {
  174. title:'主管部门',
  175. align:"center",
  176. dataIndex: 'zgbm'
  177. },
  178. // {
  179. // title: '操作',
  180. // dataIndex: 'action',
  181. // align:"center",
  182. // fixed:"right",
  183. // width:147,
  184. // scopedSlots: { customRender: 'action' },
  185. // }
  186. ],
  187. url: {
  188. list: "/hzz.shjsgc.shxmxx/rmShxmxxb/list",
  189. delete: "/hzz.shjsgc.shxmxx/rmShxmxxb/delete",
  190. deleteBatch: "/hzz.shjsgc.shxmxx/rmShxmxxb/deleteBatch",
  191. exportXlsUrl: "/hzz.shjsgc.shxmxx/rmShxmxxb/exportXls",
  192. importExcelUrl: "hzz.shjsgc.shxmxx/rmShxmxxb/importExcel",
  193. },
  194. dictOptions:{},
  195. superFieldList:[],
  196. }
  197. },
  198. created() {
  199. this.pcaData = new Area()
  200. this.getSuperFieldList();
  201. },
  202. computed: {
  203. importExcelUrl: function(){
  204. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  205. }
  206. },
  207. methods: {
  208. getPcaText(code){
  209. return this.pcaData.getText(code);
  210. },
  211. initDictConfig(){
  212. },
  213. getSuperFieldList(){
  214. let fieldList=[];
  215. fieldList.push({type:'string',value:'xmmc',text:'项目名称',dictCode:''})
  216. fieldList.push({type:'string',value:'xmlx',text:'项目类型',dictCode:'xmlx'})
  217. fieldList.push({type:'string',value:'szhl',text:'所在河流',dictCode:''})
  218. fieldList.push({type:'pca',value:'xzqh',text:'行政区划'})
  219. fieldList.push({type:'string',value:'xjqhdm',text:'县级区划代码',dictCode:''})
  220. fieldList.push({type:'string',value:'xmfzr',text:'项目负责人',dictCode:''})
  221. fieldList.push({type:'string',value:'dha',text:'电话',dictCode:''})
  222. fieldList.push({type:'string',value:'lxqk',text:'立项情况',dictCode:''})
  223. fieldList.push({type:'string',value:'fhbz',text:'防洪标准',dictCode:''})
  224. fieldList.push({type:'string',value:'jszt',text:'建设状态',dictCode:'gcjsqk'})
  225. fieldList.push({type:'string',value:'spzt',text:'审批状态',dictCode:'spzt'})
  226. fieldList.push({type:'string',value:'pfnd',text:'批复年度',dictCode:''})
  227. fieldList.push({type:'string',value:'kgny',text:'开工年月',dictCode:''})
  228. fieldList.push({type:'string',value:'jcny',text:'建成年月',dictCode:''})
  229. fieldList.push({type:'string',value:'gqjh',text:'工期计划',dictCode:''})
  230. fieldList.push({type:'string',value:'sfwpgblxm',text:'是否为评估保留项目',dictCode:'yn'})
  231. fieldList.push({type:'string',value:'gldw',text:'管理单位',dictCode:''})
  232. fieldList.push({type:'string',value:'zgbm',text:'主管部门',dictCode:''})
  233. fieldList.push({type:'string',value:'bz',text:'备注',dictCode:''})
  234. this.superFieldList = fieldList
  235. }
  236. }
  237. }
  238. </script>
  239. <style scoped>
  240. @import '~@assets/less/common.less';
  241. </style>