100d729eb43efe5488b3c8d955b0611aeb386af2.svn-base 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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-area-linkage type="cascader" v-model="queryParam.xzqh" placeholder="请选择省市区"/>
  15. </a-form-item>
  16. </a-col>
  17. <template v-if="toggleSearchStatus">
  18. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  19. <a-form-item label="审批年度">
  20. <j-year-picker placeholder="请选择审批年度" v-model="queryParam.spnd" style="width: 100%"></j-year-picker>
  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.spjb"></a-input>-->
  26. <j-dict-select-tag placeholder="请选择审批级别" v-model="queryParam.spjb" dictCode="spjb"/>
  27. </a-form-item>
  28. </a-col>
  29. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  30. <a-form-item label="审批情况">
  31. <j-dict-select-tag placeholder="请选择审批情况" v-model="queryParam.spqk" dictCode="spzt"/>
  32. </a-form-item>
  33. </a-col>
  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.jszt" dictCode="gcjsqk"/>
  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="'xmxx:add'" type="primary" icon="plus">新增</a-button>
  57. <a-button type="primary" v-has="'xmxx:dc'" icon="download" @click="handleExportXls('项目信息')">导出</a-button>
  58. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  59. <a-button type="primary" v-has="'xmxx:dr'" icon="import">导入</a-button>
  60. </a-upload>
  61. <!-- 高级查询区域 -->
  62. <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
  63. <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
  64. <!-- <a-menu slot="overlay">-->
  65. <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
  66. <!-- </a-menu>-->
  67. <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
  68. <!-- </a-dropdown>-->
  69. </div>
  70. <!-- table区域-begin -->
  71. <div>
  72. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  73. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  74. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  75. </div>
  76. <a-table
  77. ref="table"
  78. size="middle"
  79. bordered
  80. rowKey="id"
  81. class="j-table-force-nowrap"
  82. :scroll="{x:true}"
  83. :columns="columns"
  84. :dataSource="dataSource"
  85. :pagination="ipagination"
  86. :loading="loading"
  87. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  88. @change="handleTableChange">
  89. <template slot="xmmc" slot-scope="text,record">
  90. <a @click="handleDetail(record)">{{ text }}</a>
  91. </template>
  92. <template slot="htmlSlot" slot-scope="text">
  93. <div v-html="text"></div>
  94. </template>
  95. <template slot="imgSlot" slot-scope="text">
  96. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  97. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  98. </template>
  99. <template slot="fileSlot" slot-scope="text">
  100. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  101. <a-button
  102. v-else
  103. :ghost="true"
  104. type="primary"
  105. icon="download"
  106. size="small"
  107. @click="downloadFile(text)">
  108. 下载
  109. </a-button>
  110. </template>
  111. <span slot="action" slot-scope="text, record">
  112. <a-space>
  113. <a-button @click='handleEdit(record)' v-has="'xmxx:bj'" size='small' type='primary'>编辑</a-button>
  114. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  115. <a-button size='small' v-has="'xmxx:delete'" type='danger'>删除</a-button>
  116. </a-popconfirm>
  117. </a-space>
  118. <!-- <a-divider type="vertical" />-->
  119. <!-- <a-dropdown>-->
  120. <!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
  121. <!-- <a-menu slot="overlay">-->
  122. <!-- <a-menu-item>-->
  123. <!-- <a @click="handleDetail(record)">详情</a>-->
  124. <!-- </a-menu-item>-->
  125. <!-- <a-menu-item>-->
  126. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  127. <!-- <a>删除</a>-->
  128. <!-- </a-popconfirm>-->
  129. <!-- </a-menu-item>-->
  130. <!-- </a-menu>-->
  131. <!-- </a-dropdown>-->
  132. </span>
  133. </a-table>
  134. </div>
  135. <rm-xmxx-modal ref="modalForm" @ok="modalFormOk"/>
  136. </a-card>
  137. </template>
  138. <script>
  139. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  140. import RmXmxxModal from './modules/RmXmxxModal'
  141. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  142. import Area from '@/components/_util/Area'
  143. import '@/assets/less/TableExpand.less'
  144. import JYearPicker from "../../../../components/jeecg/JYearPicker";
  145. export default {
  146. name: "RmXmxxList",
  147. mixins:[JeecgListMixin],
  148. components: {
  149. RmXmxxModal,
  150. JYearPicker
  151. },
  152. data () {
  153. return {
  154. description: '项目信息管理页面',
  155. // 表头
  156. columns: [
  157. {
  158. title: '序号',
  159. dataIndex: '',
  160. key:'rowIndex',
  161. width:60,
  162. align:"center",
  163. customRender:function (t,r,index) {
  164. return parseInt(index)+1;
  165. }
  166. },
  167. {
  168. title:'检查名称',
  169. align:"center",
  170. dataIndex: 'xmmc',
  171. scopedSlots: { customRender: 'xmmc'}
  172. },
  173. {
  174. title:'所在水系',
  175. align:"center",
  176. dataIndex: 'szsx_dictText'
  177. },
  178. {
  179. title:'审批年度',
  180. align:"center",
  181. dataIndex: 'spnd',
  182. customRender:function (text) {
  183. return !text?"":(text.length>10?text.substr(0,10):text)
  184. }
  185. },
  186. {
  187. title:'审批单位',
  188. align:"center",
  189. dataIndex: 'spdw'
  190. },
  191. {
  192. title:'审批级别',
  193. align:"center",
  194. dataIndex: 'spjb'
  195. },
  196. {
  197. title:'审批情况',
  198. align:"center",
  199. dataIndex: 'spqk_dictText'
  200. },
  201. // {
  202. // title:'总体布置简述',
  203. // align:"center",
  204. // dataIndex: 'ztbzjs'
  205. // },
  206. {
  207. title:'建设状态',
  208. align:"center",
  209. dataIndex: 'jszt_dictText'
  210. },
  211. {
  212. title:'项目负责人',
  213. align:"center",
  214. dataIndex: 'xmfzr'
  215. },
  216. // {
  217. // title: '操作',
  218. // dataIndex: 'action',
  219. // align:"center",
  220. // fixed:"right",
  221. // width:147,
  222. // scopedSlots: { customRender: 'action' },
  223. // }
  224. ],
  225. url: {
  226. list: "/hzz.shjsgc.xmxx/rmXmxx/list",
  227. delete: "/hzz.shjsgc.xmxx/rmXmxx/delete",
  228. deleteBatch: "/hzz.shjsgc.xmxx/rmXmxx/deleteBatch",
  229. exportXlsUrl: "/hzz.shjsgc.xmxx/rmXmxx/exportXls",
  230. importExcelUrl: "hzz.shjsgc.xmxx/rmXmxx/importExcel",
  231. },
  232. dictOptions:{},
  233. superFieldList:[],
  234. }
  235. },
  236. created() {
  237. this.pcaData = new Area()
  238. this.getSuperFieldList();
  239. },
  240. computed: {
  241. importExcelUrl: function(){
  242. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  243. }
  244. },
  245. methods: {
  246. getPcaText(code){
  247. return this.pcaData.getText(code);
  248. },
  249. initDictConfig(){
  250. },
  251. getSuperFieldList(){
  252. let fieldList=[];
  253. fieldList.push({type:'string',value:'xmmc',text:'项目名称',dictCode:''})
  254. fieldList.push({type:'string',value:'szsx',text:'所在水系',dictCode:'shuixi'})
  255. fieldList.push({type:'pca',value:'xzqh',text:'行政区划'})
  256. fieldList.push({type:'string',value:'xmfzr',text:'项目负责人',dictCode:''})
  257. fieldList.push({type:'string',value:'xjqhdm',text:'县级区划代码',dictCode:''})
  258. fieldList.push({type:'string',value:'hzb',text:'横坐标',dictCode:''})
  259. fieldList.push({type:'string',value:'zzb',text:'纵坐标',dictCode:''})
  260. fieldList.push({type:'string',value:'dha',text:'电话',dictCode:''})
  261. fieldList.push({type:'string',value:'lxqk',text:'立项情况',dictCode:''})
  262. fieldList.push({type:'date',value:'spnd',text:'审批年度'})
  263. fieldList.push({type:'string',value:'fhbz',text:'防洪标准',dictCode:''})
  264. fieldList.push({type:'string',value:'spdw',text:'审批单位',dictCode:''})
  265. fieldList.push({type:'string',value:'spjb',text:'审批级别',dictCode:''})
  266. fieldList.push({type:'string',value:'spqk',text:'审批情况',dictCode:'spzt'})
  267. fieldList.push({type:'string',value:'ztbzjs',text:'总体布置简述',dictCode:''})
  268. fieldList.push({type:'string',value:'jszt',text:'建设状态',dictCode:'gcjsqk'})
  269. fieldList.push({type:'string',value:'qt',text:'其他',dictCode:''})
  270. this.superFieldList = fieldList
  271. }
  272. }
  273. }
  274. </script>
  275. <style scoped>
  276. @import '~@assets/less/common.less';
  277. </style>