496cb85f6fe2397c4beb6453184d522d31d47f1c.svn-base 12 KB

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