d8d15b4e05e04043b177e690257b272097fde08c.svn-base 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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.gcmc" ></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" v-has="'gczyzb:add'" type="primary" icon="plus">新增</a-button>
  27. <a-button type="primary" icon="download" v-has="'gczyzb: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="'gczyzb: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="'gczyzb: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="gcmc" 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="'gczyzb:edit'" size='small' type='primary'>编辑</a-button>
  89. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  90. <a-button size='small' v-has="'gczyzb:del'" type='danger'>删除</a-button>
  91. </a-popconfirm>
  92. </a-space>
  93. </span>
  94. </a-table>
  95. </div>
  96. <rmAxshgczyzbb-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></rmAxshgczyzbb-modal>
  97. <!-- <jeecg-order-modal-for-j-vextable ref="modalForm" @ok="modalFormOk"></jeecg-order-modal-for-j-vextable>-->
  98. </a-card>
  99. </template>
  100. <script>
  101. import '@/assets/less/TableExpand.less'
  102. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  103. import RmAxshgczyzbbModal from './modules/RmAxshgczyzbbModal'
  104. import {filterMultiDictText} from "../../../../components/dict/JDictSelectUtil";
  105. import { loadCategoryData } from '@/api/api'
  106. import { mixinDevice } from '@/utils/mixin'
  107. export default {
  108. name: "RmAxshgczyzbbList",
  109. mixins:[JeecgListMixin, mixinDevice],
  110. components: { RmAxshgczyzbbModal
  111. },
  112. props:{
  113. mainId:{
  114. type:String,
  115. default:'',
  116. required:false
  117. }
  118. },
  119. watch:{
  120. mainId:{
  121. immediate: true,
  122. handler(val) {
  123. if(!this.mainId){
  124. this.clearList()
  125. }else{
  126. this.queryParam['mainId'] = val
  127. this.loadData(1);
  128. }
  129. }
  130. }
  131. },
  132. data () {
  133. return {
  134. description: '项目信息管理页面',
  135. disableMixinCreated:true,
  136. // 表头
  137. columns: [
  138. {
  139. title: '序号',
  140. dataIndex: '',
  141. key:'rowIndex',
  142. width:60,
  143. align:"center",
  144. customRender:function (t,r,index) {
  145. return parseInt(index)+1;
  146. }
  147. },
  148. {
  149. title:'工程名称',
  150. align:"center",
  151. dataIndex: 'gcmc',
  152. scopedSlots: { customRender: 'gcmc'}
  153. },
  154. {
  155. title:'涉河类型',
  156. align:"center",
  157. dataIndex: 'shlx',
  158. customRender: (text) => (text ? filterMultiDictText(this.dictOptions['shlx'], text) : '')
  159. },
  160. {
  161. title: '操作',
  162. dataIndex: 'action',
  163. align:"center",
  164. fixed:"right",
  165. width:147,
  166. scopedSlots: { customRender: 'action' },
  167. }
  168. ],
  169. url: {
  170. list: "/hzz.shjsgc.xmrk/rmAxxmxx/listRmAxshgczyzbbByMainId",
  171. delete: "/hzz.shjsgc.xmrk/rmAxxmxx/deleteRmAxshgczyzbb",
  172. deleteBatch: "/hzz.shjsgc.xmrk/rmAxxmxx/deleteBatchRmAxshgczyzbb",
  173. exportXlsUrl: "/hzz.shjsgc.xmrk/rmAxxmxx/exportRmAxshgczyzbb",
  174. importUrl: "/hzz.shjsgc.xmrk/rmAxxmxx/importRmAxshgczyzbb",
  175. },
  176. dictOptions:{
  177. szsx:[],
  178. sfpjbf:[],
  179. sfbbsp:[],
  180. jszt:[],
  181. },
  182. superFieldList:[],
  183. }
  184. },
  185. mounted() {
  186. this.initDictConfig();
  187. },
  188. created() {
  189. this.getSuperFieldList();
  190. },
  191. computed: {
  192. importExcelUrl(){
  193. return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`;
  194. }
  195. },
  196. methods: {
  197. initDictConfig(){
  198. loadCategoryData({code:'A02'}).then((res) => {
  199. if (res.success) {
  200. console.log(res.result)
  201. this.$set(this.dictOptions, 'shlx', res.result)
  202. }
  203. })
  204. },
  205. clearList(){
  206. this.dataSource=[]
  207. this.selectedRowKeys=[]
  208. this.ipagination.current = 1
  209. },
  210. getSuperFieldList(){
  211. let fieldList=[];
  212. fieldList.push({type:'string',value:'xmmc',text:'项目名称',dictCode:''})
  213. fieldList.push({type:'string',value:'shlx',text:'涉河类型',dictCode:''})
  214. fieldList.push({type:'string',value:'szsx',text:'所在水系',dictCode:'szsx'})
  215. fieldList.push({type:'string',value:'xzqh',text:'行政区划',dictCode:''})
  216. fieldList.push({type:'string',value:'xjqhdm',text:'县级区划代码',dictCode:''})
  217. fieldList.push({type:'double',value:'hzb',text:'横坐标',dictCode:''})
  218. fieldList.push({type:'double',value:'zzb',text:'纵坐标',dictCode:''})
  219. fieldList.push({type:'string',value:'xmfzr',text:'项目负责人',dictCode:''})
  220. fieldList.push({type:'string',value:'dh',text:'电话',dictCode:''})
  221. fieldList.push({type:'string',value:'lxqk',text:'立项情况',dictCode:''})
  222. fieldList.push({type:'string',value:'spnd',text:'审批年度',dictCode:''})
  223. fieldList.push({type:'string',value:'fhbz',text:'防洪标准',dictCode:''})
  224. fieldList.push({type:'string',value:'spdw',text:'审批单位',dictCode:''})
  225. fieldList.push({type:'string',value:'spjb',text:'审批级别',dictCode:''})
  226. fieldList.push({type:'string',value:'sfpjbf',text:'是否批建不符',dictCode:'yn'})
  227. fieldList.push({type:'string',value:'sfbbsp',text:'是否补办审批',dictCode:'yn'})
  228. fieldList.push({type:'string',value:'ztbzjs',text:'总体布置简述',dictCode:''})
  229. fieldList.push({type:'string',value:'jszt',text:'建设状态',dictCode:'gcjsqk'})
  230. fieldList.push({type:'string',value:'qt',text:'其他',dictCode:''})
  231. this.superFieldList = fieldList
  232. }
  233. }
  234. }
  235. </script>
  236. <style scoped>
  237. @import '~@assets/less/common.less';
  238. </style>