123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <template>
- <div class="padding-20">
- <div class="search-box">
- <el-form ref="form"
- :inline="true"
- :model="searchForm"
- clearable
- class="mt-10">
- <el-form-item label="门店名称:">
- <el-input
- v-model="searchForm.bar_name"
- placeholder="请输入门店名称"
- clearable></el-input>
- </el-form-item>
- <el-form-item class="ml-10">
- <el-button
- icon="el-icon-search"
- type="primary"
- @click="searchSubmit">查询
- </el-button>
- </el-form-item>
- <el-form-item class="ml-10">
- <el-button icon="el-icon-plus"
- type="primary"
- v-permission="'business_outlet_list_add'"
- @click="add">新增
- </el-button>
- </el-form-item>
- </el-form>
- </div>
- <el-table :data="tableData"
- v-loading="tableLoading"
- fit
- class="marginT-10 order-table"
- :max-height="vheight">
- <el-table-column type="expand">
- <template slot-scope="props">
- <el-form label-position="left"
- inline
- class="demo-table-expand"
- label-width="160px">
- <el-form-item label="编号">
- <span>{{ props.row.id }}</span>
- </el-form-item>
- <el-form-item label="酒吧名称">
- <span>{{ props.row.bar_name }}</span>
- </el-form-item>
- <el-form-item label="门店地址">
- <span>{{ props.row.bar_address }}</span>
- </el-form-item>
- <el-form-item label="酒吧状态">
- <span>{{ ['无效', '有效'][props.row.bar_status] }}</span>
- </el-form-item>
- <el-form-item label="点歌开始时间">
- <span>{{ props.row.bar_song_start_time }}</span>
- </el-form-item>
- <el-form-item label="点歌结束时间">
- <span>{{ props.row.bar_song_end_time }}</span>
- </el-form-item>
- <el-form-item label="酒吧座位预定开始时间">
- <span>{{ props.row.bar_place_reserve_start_time }}</span>
- </el-form-item>
- <el-form-item label="酒吧座位预定结束时间">
- <span>{{ props.row.bar_place_reserve_end_time }}</span>
- </el-form-item>
- <el-form-item label="门店图片">
- <el-image style="width: 100px; height: 100px"
- :src="props.row.bar_img_url[0]"
- :preview-src-list="props.row.bar_img_url">
- </el-image>
- </el-form-item>
- <el-form-item label="创建时间">
- <span>{{ props.row.created_at }}</span>
- </el-form-item>
- <el-form-item label="更新时间">
- <span>{{ props.row.updated_at }}</span>
- </el-form-item>
- </el-form>
- </template>
- </el-table-column>
- <el-table-column label="编号" prop="id" width="160"></el-table-column>
- <el-table-column label="酒吧名称" prop="bar_name"></el-table-column>
- <el-table-column label="门店地址" prop="bar_address"></el-table-column>
- <el-table-column label="酒吧状态" sortable :sort-method="() => {}" width="100">
- <template slot-scope="scope">
- <p>{{ ['无效', '有效'][scope.row.bar_status] }}</p>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="100">
- <template slot-scope="scope">
- <el-button type="text" v-permission="'business_outlet_list_edit'" @click="edit(scope.row)">编辑</el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- class="marginT-20"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :hide-on-single-page="true"
- :current-page="page"
- :page-size="page_size"
- :page-sizes="[10, 20, 100, 200, 300, 400]"
- background
- layout="total, sizes, prev, pager, next, jumper"
- :total="totalCount"/>
- <detail v-if="detailsDialog.show"
- v-model="detailsDialog.show"
- :exData="detailsDialog.exData"
- @success="init"></detail>
- </div>
- </template>
- <script>
- import page from '@/mixin/page'
- import detail from './details'
- export default {
- mixins: [page],
- components: {
- detail,
- },
- data () {
- return {
- detailsDialog: {
- show: false,
- exData: {}
- },
- searchForm: {},
- tableData: [],
- tableUrl: '/v1/bar/list'
- }
- },
- methods: {
- add () {
- this.detailsDialog.exData = {}
- this.detailsDialog.show = true
- },
- edit (row) {
- this.detailsDialog.exData = row
- this.detailsDialog.show = true
- }
- },
- mounted () {
- this.init()
- },
- }
- </script>
- <style lang="scss" scoped>
- .demo-table-expand {
- .el-form-item {
- width: 50%;
- margin-right: 0;
- margin-bottom: 0;
- ::v-deep &__label {
- color: #99a9bf;
- }
- }
- }
- </style>
|