891d3d4b71ffefe3dff5c6c90dfac1e511c05cad.svn-base 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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="10" :lg="11" :md="12" :sm="24">
  8. <a-form-item label="创建日期">
  9. <j-date placeholder="请选择开始日期" class="query-group-cust" v-model="queryParam.createTime_begin"></j-date>
  10. <span class="query-group-split-cust"></span>
  11. <j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.createTime_end"></j-date>
  12. </a-form-item>
  13. </a-col>
  14. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  15. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  16. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  17. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  18. <!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
  19. <!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
  20. <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
  21. <!-- </a>-->
  22. </span>
  23. </a-col>
  24. </a-row>
  25. </a-form>
  26. </div>
  27. <!-- 查询区域-END -->
  28. <!-- 操作按钮区域 -->
  29. <div class="table-operator">
  30. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  31. <a-button type="primary" icon="download" @click="handleExportXls('定位信息历史表')">导出</a-button>
  32. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  33. <a-button type="primary" icon="import">导入</a-button>
  34. </a-upload>
  35. <!-- 高级查询区域 -->
  36. <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  37. <a-dropdown v-if="selectedRowKeys.length > 0">
  38. <a-menu slot="overlay">
  39. <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  40. </a-menu>
  41. <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  42. </a-dropdown>
  43. </div>
  44. <!-- table区域-begin -->
  45. <div>
  46. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  47. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  48. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  49. </div>
  50. <a-table
  51. ref="table"
  52. size="middle"
  53. :scroll="{x:true}"
  54. bordered
  55. rowKey="id"
  56. :columns="columns"
  57. :dataSource="dataSource"
  58. :pagination="ipagination"
  59. :loading="loading"
  60. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  61. class="j-table-force-nowrap"
  62. @change="handleTableChange">
  63. <template slot="htmlSlot" slot-scope="text">
  64. <div v-html="text"></div>
  65. </template>
  66. <template slot="imgSlot" slot-scope="text">
  67. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  68. <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  69. </template>
  70. <template slot="fileSlot" slot-scope="text">
  71. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  72. <a-button
  73. v-else
  74. :ghost="true"
  75. type="primary"
  76. icon="download"
  77. size="small"
  78. @click="downloadFile(text)">
  79. 下载
  80. </a-button>
  81. </template>
  82. <span slot="action" slot-scope="text, record">
  83. <a @click="handleEdit(record)">编辑</a>
  84. <a-divider type="vertical" />
  85. <a-dropdown>
  86. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  87. <a-menu slot="overlay">
  88. <a-menu-item>
  89. <a @click="handleDetail(record)">详情</a>
  90. </a-menu-item>
  91. <a-menu-item>
  92. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  93. <a>删除</a>
  94. </a-popconfirm>
  95. </a-menu-item>
  96. </a-menu>
  97. </a-dropdown>
  98. </span>
  99. </a-table>
  100. </div>
  101. <loc-history-modal ref="modalForm" @ok="modalFormOk"></loc-history-modal>
  102. </a-card>
  103. </template>
  104. <script>
  105. import '@/assets/less/TableExpand.less'
  106. import { mixinDevice } from '@/utils/mixin'
  107. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  108. import LocHistoryModal from './modules/LocHistoryModal'
  109. export default {
  110. name: 'LocHistoryList',
  111. mixins:[JeecgListMixin, mixinDevice],
  112. components: {
  113. LocHistoryModal
  114. },
  115. data () {
  116. return {
  117. description: '定位信息历史表管理页面',
  118. // 表头
  119. columns: [
  120. {
  121. title: '#',
  122. dataIndex: '',
  123. key:'rowIndex',
  124. width:60,
  125. align:"center",
  126. customRender:function (t,r,index) {
  127. return parseInt(index)+1;
  128. }
  129. },
  130. {
  131. title:'创建人',
  132. align:"center",
  133. dataIndex: 'createBy'
  134. },
  135. {
  136. title:'创建日期',
  137. align:"center",
  138. sorter: true,
  139. dataIndex: 'createTime'
  140. },
  141. {
  142. title:'名称',
  143. align:"center",
  144. dataIndex: 'name'
  145. },
  146. {
  147. title:'输入值',
  148. align:"center",
  149. dataIndex: 'inputval'
  150. },
  151. {
  152. title: '操作',
  153. dataIndex: 'action',
  154. align:"center",
  155. fixed:"right",
  156. width:147,
  157. scopedSlots: { customRender: 'action' }
  158. }
  159. ],
  160. url: {
  161. list: "/hzz.lochistory/locHistory/list",
  162. delete: "/hzz.lochistory/locHistory/delete",
  163. deleteBatch: "/hzz.lochistory/locHistory/deleteBatch",
  164. exportXlsUrl: "/hzz.lochistory/locHistory/exportXls",
  165. importExcelUrl: "hzz.lochistory/locHistory/importExcel",
  166. },
  167. dictOptions:{},
  168. superFieldList:[],
  169. }
  170. },
  171. created() {
  172. this.getSuperFieldList();
  173. },
  174. computed: {
  175. importExcelUrl: function(){
  176. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  177. },
  178. },
  179. methods: {
  180. initDictConfig(){
  181. },
  182. getSuperFieldList(){
  183. let fieldList=[];
  184. fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
  185. fieldList.push({type:'date',value:'createTime',text:'创建日期'})
  186. fieldList.push({type:'string',value:'name',text:'名称',dictCode:''})
  187. fieldList.push({type:'Text',value:'inputval',text:'输入值',dictCode:''})
  188. this.superFieldList = fieldList
  189. }
  190. }
  191. }
  192. </script>
  193. <style scoped>
  194. @import '~@assets/less/common.less';
  195. </style>