| | |
| | | <!-- 表格和分页 --> |
| | | <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 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 |
| | |
| | | > |
| | | <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="name" label="管理面积(m)" min-width="100px"></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="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="120" |
| | | 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="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> |
| | |
| | | '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> |