3a38f253b380aa57e8e70962915ccd1895cbe81f.svn-base 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <a-card :bordered="false" :class="'cust-erp-sub-tab'">
  3. <div class="table-page-search-wrapper">
  4. <a-form layout="inline" @keyup.enter.native="searchQuery">
  5. <a-row :gutter="24">
  6. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  7. <a-form-item label="申请单位名称">
  8. <a-input placeholder="请输入申请单位名称" v-model="queryParam.sqdwmc" ></a-input>
  9. </a-form-item>
  10. </a-col>
  11. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  12. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  13. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  14. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  15. <!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
  16. <!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
  17. <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
  18. <!-- </a>-->
  19. </span>
  20. </a-col>
  21. </a-row>
  22. </a-form>
  23. </div>
  24. <!-- 操作按钮区域 -->
  25. <div class="table-operator" v-if="mainId">
  26. <a-button @click="handleAdd" type="primary"v-has="'dwxx:add'" icon="plus">新增</a-button>
  27. <a-button type="primary" icon="download" v-has="'dwxx:dc'" @click="handleExportXls('单位信息')">导出</a-button>
  28. <a-upload
  29. name="file"
  30. :showUploadList="false"
  31. :multiple="false"
  32. :headers="tokenHeader"
  33. :action="importExcelUrl"
  34. @change="handleImportExcel">
  35. <a-button type="primary" v-has="'dwxx:dr'" icon="import">导入</a-button>
  36. </a-upload>
  37. <!-- 高级查询区域 -->
  38. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  39. <a-dropdown v-if="selectedRowKeys.length > 0">
  40. <a-menu slot="overlay">
  41. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  42. </a-menu>
  43. <a-button style="margin-left: 8px" v-has="'dwxx:batchDel'"> 批量操作 <a-icon type="down" /></a-button>
  44. </a-dropdown>
  45. </div>
  46. <!-- table区域-begin -->
  47. <div>
  48. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  49. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  50. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  51. </div>
  52. <a-table
  53. ref="table"
  54. size="middle"
  55. bordered
  56. rowKey="id"
  57. :scroll="{x:true}"
  58. :columns="columns"
  59. :dataSource="dataSource"
  60. :pagination="ipagination"
  61. :loading="loading"
  62. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  63. @change="handleTableChange">
  64. <template slot="sqdwmc" slot-scope="text,record">
  65. <a @click="handleDetail(record)">{{ text }}</a>
  66. </template>
  67. <template slot="htmlSlot" slot-scope="text">
  68. <div v-html="text"></div>
  69. </template>
  70. <template slot="imgSlot" slot-scope="text">
  71. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  72. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  73. </template>
  74. <template slot="fileSlot" slot-scope="text">
  75. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  76. <a-button
  77. v-else
  78. :ghost="true"
  79. type="primary"
  80. icon="download"
  81. size="small"
  82. @click="downloadFile(text)">
  83. 下载
  84. </a-button>
  85. </template>
  86. <span slot="action" slot-scope="text, record">
  87. <a-space>
  88. <a-button @click='handleEdit(record)' v-has="'dwxx:edit'" size='small' type='primary'>编辑</a-button>
  89. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  90. <a-button size='small' v-has="'dwxx:del'" type='danger'>删除</a-button>
  91. </a-popconfirm>
  92. </a-space>
  93. </span>
  94. </a-table>
  95. </div>
  96. <rmAxzyxmb-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></rmAxzyxmb-modal>
  97. </a-card>
  98. </template>
  99. <script>
  100. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  101. import RmAxzyxmbModal from './modules/RmAxzyxmbModal'
  102. export default {
  103. name: "RmAxzyxmbList",
  104. mixins:[JeecgListMixin],
  105. components: { RmAxzyxmbModal },
  106. props:{
  107. mainId:{
  108. type:String,
  109. default:'',
  110. required:false
  111. }
  112. },
  113. watch:{
  114. mainId:{
  115. immediate: true,
  116. handler(val) {
  117. if(!this.mainId){
  118. this.clearList()
  119. }else{
  120. this.queryParam['mainId'] = val
  121. this.loadData(1);
  122. }
  123. }
  124. }
  125. },
  126. data () {
  127. return {
  128. description: '项目信息管理页面',
  129. disableMixinCreated:true,
  130. // 表头
  131. columns: [
  132. {
  133. title: '序号',
  134. dataIndex: '',
  135. key:'rowIndex',
  136. width:60,
  137. align:"center",
  138. customRender:function (t,r,index) {
  139. return parseInt(index)+1;
  140. }
  141. },
  142. {
  143. title:'申请单位名称',
  144. align:"center",
  145. dataIndex: 'sqdwmc',
  146. scopedSlots: { customRender: 'sqdwmc' }
  147. },
  148. {
  149. title:'法人代表(或委托代理人)',
  150. align:"center",
  151. dataIndex: 'frdb'
  152. },
  153. {
  154. title:'统一社会信用代码',
  155. align:"center",
  156. dataIndex: 'tyshxydm'
  157. },
  158. {
  159. title:'申请单位通讯地址',
  160. align:"center",
  161. dataIndex: 'sqdwtxdz'
  162. },
  163. {
  164. title:'联系人',
  165. align:"center",
  166. dataIndex: 'lxr'
  167. },
  168. {
  169. title:'邮政编码',
  170. align:"center",
  171. dataIndex: 'yzbm'
  172. },
  173. {
  174. title: '操作',
  175. dataIndex: 'action',
  176. align:"center",
  177. fixed:"right",
  178. width:147,
  179. scopedSlots: { customRender: 'action' },
  180. }
  181. ],
  182. url: {
  183. list: "/hzz.shjsgc.xmrk/rmAxxmxx/listRmAxzyxmbByMainId",
  184. delete: "/hzz.shjsgc.xmrk/rmAxxmxx/deleteRmAxzyxmb",
  185. deleteBatch: "/hzz.shjsgc.xmrk/rmAxxmxx/deleteBatchRmAxzyxmb",
  186. exportXlsUrl: "/hzz.shjsgc.xmrk/rmAxxmxx/exportRmAxzyxmb",
  187. importUrl: "/hzz.shjsgc.xmrk/rmAxxmxx/importRmAxzyxmb",
  188. },
  189. dictOptions:{
  190. szsx:[],
  191. sfpjbf:[],
  192. sfbbsp:[],
  193. jszt:[],
  194. },
  195. superFieldList:[],
  196. }
  197. },
  198. created() {
  199. this.getSuperFieldList();
  200. },
  201. computed: {
  202. importExcelUrl(){
  203. return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
  204. }
  205. },
  206. methods: {
  207. clearList(){
  208. this.dataSource=[]
  209. this.selectedRowKeys=[]
  210. this.ipagination.current = 1
  211. },
  212. getSuperFieldList(){
  213. let fieldList=[];
  214. fieldList.push({type:'string',value:'xmmc',text:'项目名称',dictCode:''})
  215. fieldList.push({type:'string',value:'szsx',text:'所在水系',dictCode:'szsx'})
  216. fieldList.push({type:'string',value:'xzqh',text:'行政区划',dictCode:''})
  217. fieldList.push({type:'string',value:'xjqhdm',text:'县级区划代码',dictCode:''})
  218. fieldList.push({type:'double',value:'hzb',text:'横坐标',dictCode:''})
  219. fieldList.push({type:'double',value:'zzb',text:'纵坐标',dictCode:''})
  220. fieldList.push({type:'string',value:'xmfzr',text:'项目负责人',dictCode:''})
  221. fieldList.push({type:'string',value:'dh',text:'电话',dictCode:''})
  222. fieldList.push({type:'string',value:'lxqk',text:'立项情况',dictCode:''})
  223. fieldList.push({type:'string',value:'spnd',text:'审批年度',dictCode:''})
  224. fieldList.push({type:'string',value:'fhbz',text:'防洪标准',dictCode:''})
  225. fieldList.push({type:'string',value:'spdw',text:'审批单位',dictCode:''})
  226. fieldList.push({type:'string',value:'spjb',text:'审批级别',dictCode:''})
  227. fieldList.push({type:'string',value:'sfpjbf',text:'是否批建不符',dictCode:'yn'})
  228. fieldList.push({type:'string',value:'sfbbsp',text:'是否补办审批',dictCode:'yn'})
  229. fieldList.push({type:'string',value:'ztbzjs',text:'总体布置简述',dictCode:''})
  230. fieldList.push({type:'string',value:'jszt',text:'建设状态',dictCode:'gcjsqk'})
  231. fieldList.push({type:'string',value:'qt',text:'其他',dictCode:''})
  232. this.superFieldList = fieldList
  233. }
  234. }
  235. }
  236. </script>
  237. <style scoped>
  238. @import '~@assets/less/common.less';
  239. </style>