| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:platformwatergas:query']"> |
| | | <SearchFormCollapse slot="search-form" :need-more="false"> |
| | | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item title="请è¾å
¥è½¦çå·"> |
| | | <el-input v-model="searchForm.carCode" clearable placeholder="请è¾å
¥è½¦çå·" |
| | | @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ä½¿ç¨æ¶é´ï¼"> |
| | | <el-date-picker @change="search" v-model="searchForm.startTime" format="yyyy-MM" style="width: 140px" |
| | | placeholder="å¼å§æ¶é´" value-format="yyyy-MM-dd HH:mm:ss" type="month" /> ~ |
| | | <el-date-picker @change="search" v-model="searchForm.endTime" format="yyyy-MM" style="width: 140px" |
| | | placeholder="ç»ææ¶é´" value-format="yyyy-MM-dd HH:mm:ss" type="month" /> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | </SearchFormCollapse> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" |
| | | v-permissions="['business:platformwatergas:create', 'business:platformwatergas:delete', 'business:notice:exportExcel']"> |
| | | <li><el-button type="primary" @click="$refs.OperaPlatformOilWindow.open('æ°å»ºæ²¹è')" icon="el-icon-plus" |
| | | v-permissions="['business:platformwatergas:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" |
| | | v-permissions="['business:platformwatergas:delete']">å é¤</el-button></li> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:platformwatergas:exportExcel']" |
| | | @click="exportExcel">导åº</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:platformwatergas:exportExcel']" |
| | | @click="handleImport">导å
¥</el-button> |
| | | </ul> |
| | | <el-table |
| | | :height="tableHeightNew" v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="carCode" label="车çå·" fixed min-width="150px"></el-table-column> |
| | | <el-table-column prop="timeInfo" label="ä½¿ç¨æä»½" fixed min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ (row.timeInfo || row.timeInfo.length > 7) ? row.timeInfo.substr(0, 7) : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ²¹èï¼åï¼" fixed min-width="150px"></el-table-column> |
| | | <el-table-column show-overflow-tooltip prop="content" label="说æ" min-width="120px"></el-table-column> |
| | | <el-table-column prop="editDate" label="æè¿æä½æ¶é´" min-width="140px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:platformwatergas:update', 'business:platformwatergas:delete'])" label="æä½" |
| | | align="center" min-width="150" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.OperaPlatformOilWindow.open('ç¼è¾æ²¹è', row)" icon="el-icon-edit" |
| | | v-permissions="['business:platformwatergas:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" |
| | | v-permissions="['business:platformwatergas:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaPlatformOilWindow ref="OperaPlatformOilWindow" @success="handlePageChange" /> |
| | | <oilImportTem ref="oilImportTem" @success="handlePageChange" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import SearchFormCollapse from '@/components/common/SearchFormCollapse' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaPlatformOilWindow from '@/components/business/OperaPlatformOilWindow' |
| | | import { allList } from '@/api/platform/platformGroup' |
| | | import oilImportTem from './components/oilImportTem' |
| | | export default { |
| | | name: 'Platform', |
| | | extends: BaseTable, |
| | | components: { SearchFormCollapse, TableLayout, Pagination, OperaPlatformOilWindow, oilImportTem }, |
| | | data() { |
| | | return { |
| | | groupList: [], |
| | | // æç´¢ |
| | | working: false, |
| | | working1: false, |
| | | searchForm: { |
| | | carCode: '', |
| | | startTime: '', |
| | | endTime: '', |
| | | type: 2 |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.config({ |
| | | module: 'æ²¹èä¿¡æ¯è¡¨', |
| | | api: '/platform/platformWaterGas', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.loadGroupList() |
| | | }, |
| | | methods: { |
| | | reset() { |
| | | this.searchForm = { |
| | | carCode: '', |
| | | startTime: '', |
| | | endTime: '', |
| | | type: 2 |
| | | } |
| | | this.search() |
| | | }, |
| | | handleImport() { |
| | | this.$refs.oilImportTem.open('æ¹é导å
¥') |
| | | }, |
| | | loadGroupList() { |
| | | allList({}) |
| | | .then(res => { |
| | | this.groupList = res || [] |
| | | }) |
| | | }, |
| | | changeStatus(e, row) { |
| | | this.api.updateStatusById({ |
| | | id: row.id, |
| | | status: e |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |