544c4776b0d8917e4c90edfeb76ea5ddf9352a3a.svn-base 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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.cjlx" dictCode="cjlxx"/>
  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="'gcxxcj:add'" type="primary" icon="plus">新增</a-button>
  34. <a-button v-has="'gcxxcj:dc'" type="primary" icon="download" @click="handleExportXls('工程信息采集')">导出</a-button>
  35. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  36. <a-button v-has="'gcxxcj:dr'" type="primary" 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="'gcxxcj: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. :scroll="{x:true}"
  57. bordered
  58. rowKey="id"
  59. :columns="columns"
  60. :dataSource="dataSource"
  61. :pagination="ipagination"
  62. :loading="loading"
  63. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  64. class="j-table-force-nowrap"
  65. @change="handleTableChange">
  66. <template slot="htmlSlot" slot-scope="text">
  67. <div v-html="text"></div>
  68. </template>
  69. <template slot="imgSlot" slot-scope="text">
  70. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  71. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  72. </template>
  73. <template slot="fileSlot" slot-scope="text">
  74. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  75. <a-button
  76. v-else
  77. :ghost="true"
  78. type="primary"
  79. icon="download"
  80. size="small"
  81. @click="downloadFile(text)">
  82. 下载
  83. </a-button>
  84. </template>
  85. <template slot="xmmc" slot-scope="text,record">
  86. <a @click="handleDetail(record)">{{ text }}</a>
  87. </template>
  88. <span slot="action" slot-scope="text, record">
  89. <a-space>
  90. <a-button @click='handleEdit(record)' v-has="'gcxxcj:bj'" size='small' type='primary'>编辑</a-button>
  91. <a-popconfirm title='确定删除吗?' @confirm='() => handleDelete(record.id)'>
  92. <a-button size='small' v-has="'gcxxcj:delete'" type='danger'>删除</a-button>
  93. </a-popconfirm>
  94. </a-space>
  95. <!-- <a-divider type="vertical" />-->
  96. <!-- <a-dropdown>-->
  97. <!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
  98. <!-- <a-menu slot="overlay">-->
  99. <!-- <a-menu-item>-->
  100. <!-- <a @click="handleDetail(record)">详情</a>-->
  101. <!-- </a-menu-item>-->
  102. <!-- <a-menu-item>-->
  103. <!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
  104. <!-- <a>删除</a>-->
  105. <!-- </a-popconfirm>-->
  106. <!-- </a-menu-item>-->
  107. <!-- </a-menu>-->
  108. <!-- </a-dropdown>-->
  109. </span>
  110. </a-table>
  111. </div>
  112. <rm-gcxxcj-modal ref="modalForm" @ok="modalFormOk"></rm-gcxxcj-modal>
  113. </a-card>
  114. </template>
  115. <script>
  116. import '@/assets/less/TableExpand.less'
  117. import { mixinDevice } from '@/utils/mixin'
  118. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  119. import RmGcxxcjModal from './modules/RmGcxxcjModal'
  120. import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  121. export default {
  122. name: 'RmGcxxcjList',
  123. mixins:[JeecgListMixin, mixinDevice],
  124. components: {
  125. RmGcxxcjModal
  126. },
  127. data () {
  128. return {
  129. description: '工程信息采集管理页面',
  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: 'xmmc',
  146. scopedSlots: { customRender: 'xmmc' }
  147. },
  148. {
  149. title:'审批状态',
  150. align:"center",
  151. dataIndex: 'spzt_dictText'
  152. },
  153. {
  154. title:'工程建设情况',
  155. align:"center",
  156. dataIndex: 'gcjsqk_dictText'
  157. },
  158. {
  159. title:'采集时间',
  160. align:"center",
  161. dataIndex: 'cjsj',
  162. customRender:function (text) {
  163. return !text?"":(text.length>10?text.substr(0,10):text)
  164. }
  165. },
  166. {
  167. title:'采集人',
  168. align:"center",
  169. dataIndex: 'cjr'
  170. },
  171. {
  172. title: '操作',
  173. dataIndex: 'action',
  174. align:"center",
  175. fixed:"right",
  176. width:147,
  177. scopedSlots: { customRender: 'action' }
  178. }
  179. ],
  180. url: {
  181. list: "/hzz.sjcjrw.gcxxcj/rmGcxxcj/list",
  182. delete: "/hzz.sjcjrw.gcxxcj/rmGcxxcj/delete",
  183. deleteBatch: "/hzz.sjcjrw.gcxxcj/rmGcxxcj/deleteBatch",
  184. exportXlsUrl: "/hzz.sjcjrw.gcxxcj/rmGcxxcj/exportXls",
  185. importExcelUrl: "hzz.sjcjrw.gcxxcj/rmGcxxcj/importExcel",
  186. },
  187. dictOptions:{},
  188. superFieldList:[],
  189. }
  190. },
  191. created() {
  192. this.getSuperFieldList();
  193. },
  194. computed: {
  195. importExcelUrl: function(){
  196. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  197. },
  198. },
  199. methods: {
  200. initDictConfig(){
  201. },
  202. getSuperFieldList(){
  203. let fieldList=[];
  204. fieldList.push({type:'string',value:'xmmc',text:'项目名称',dictCode:''})
  205. fieldList.push({type:'string',value:'cjlx',text:'采集类型',dictCode:'cjlxx'})
  206. fieldList.push({type:'double',value:'jd',text:'经度',dictCode:''})
  207. fieldList.push({type:'double',value:'wd',text:'纬度',dictCode:''})
  208. fieldList.push({type:'string',value:'spzt',text:'审批状态',dictCode:'spzt'})
  209. fieldList.push({type:'date',value:'kgny',text:'开工年月'})
  210. fieldList.push({type:'date',value:'jcny',text:'建成年月'})
  211. fieldList.push({type:'string',value:'gcjsqk',text:'工程建设情况',dictCode:'gcjsqk'})
  212. fieldList.push({type:'string',value:'nrms',text:'内容描述',dictCode:''})
  213. fieldList.push({type:'string',value:'sctp',text:'上传图片',dictCode:''})
  214. fieldList.push({type:'string',value:'spsc',text:'视频上传',dictCode:''})
  215. fieldList.push({type:'date',value:'cjsj',text:'采集时间'})
  216. fieldList.push({type:'string',value:'cjr',text:'采集人',dictCode:''})
  217. fieldList.push({type:'string',value:'bz',text:'备注',dictCode:''})
  218. this.superFieldList = fieldList
  219. }
  220. }
  221. }
  222. </script>
  223. <style scoped>
  224. @import '~@assets/less/common.less';
  225. </style>