| | |
| | | <TableLayout :permissions="['business:ywproject:query']"> |
| | | <!-- 搜索表单 --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | |
| | | |
| | | <el-form-item label="项目名称" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请输入项目名称" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywproject:exportExcel']" @click="exportExcel">导出</el-button> |
| | | <!-- <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywproject:exportExcel']" @click="exportExcel">导出</el-button> --> |
| | | <el-button @click="reset">重置</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:ywproject:create', 'business:ywproject:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaYwProjectWindow.open('新建项目')" icon="el-icon-plus" v-permissions="['business:ywproject:create']">新建</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:ywproject:delete']">删除</el-button></li> |
| | | <li><el-button type="primary" @click="handleEdit()" icon="el-icon-plus" |
| | | v-permissions="['business:ywproject:create']">新建</el-button></li> |
| | | <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:ywproject:delete']">删除</el-button></li> --> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table 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="name" label="项目名称" min-width="100px"></el-table-column> |
| | | <el-table-column prop="" label="管理面积(m)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="area" label="管理面积(m²)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="roomNum" label="总房源数量(间)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="roomeRentNum" label="可招商房源数量(间)" min-width="100px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:ywproject:update', 'business:ywproject:delete'])" |
| | | label="操作" |
| | | min-width="80" |
| | | fixed="right" |
| | | > |
| | | <el-table-column prop="roomRentNum" label="可招商房源数量(间)" min-width="100px"></el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:ywproject:update', 'business:ywproject:delete'])" |
| | | label="操作" min-width="80" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaYwProjectWindow.open('编辑项目', row)" icon="el-icon-edit" v-permissions="['business:ywproject:update']">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:ywproject:delete']">删除</el-button> |
| | | <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit" |
| | | v-permissions="['business:ywproject:update']">编辑</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" |
| | | v-permissions="['business:ywproject:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | </template> |
| | | <!-- 新建/修改 --> |
| | | <OperaYwProjectWindow ref="operaYwProjectWindow" @success="handlePageChange"/> |
| | | <OperaYwProjectWindow ref="operaYwProjectWindow" @success="handlePageChange" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | name: 'YwProject', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaYwProjectWindow }, |
| | | data () { |
| | | data() { |
| | | return { |
| | | // 搜索 |
| | | searchForm: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | created() { |
| | | this.config({ |
| | | module: '运维项目信息表', |
| | | api: '/project/ywProject', |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | handleEdit(row) { |
| | | if (row && row.id) { |
| | | this.$refs.operaYwProjectWindow.open('编辑项目', row) |
| | | } else { |
| | | this.$refs.operaYwProjectWindow.open('新建项目') |
| | | // this.$refs.operaYwProjectWindow.open('新建项目') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |