| | |
| | | <template> |
| | | <div> |
| | | <div class="toolbar-row"> |
| | | <div v-if="!readonly" class="toolbar-row"> |
| | | <el-button type="primary" size="small" v-permissions="['business:ywcustomerrecharge:bindDevice']" @click="openSelector">去选择电表</el-button> |
| | | </div> |
| | | <el-table v-loading="loading" :data="list" stripe size="small"> |
| | |
| | | <el-table-column label="继电器" min-width="80" align="center"> |
| | | <template slot-scope="{ row }">{{ relayText(row.relayStatus) }}</template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="80" align="center"> |
| | | <el-table-column v-if="!readonly" label="操作" min-width="80" align="center"> |
| | | <template slot-scope="{ row }"> |
| | | <el-button type="text" class="red" v-permissions="['business:ywcustomerrecharge:bindDevice']" @click="remove(row)">移除</el-button> |
| | | </template> |
| | |
| | | </el-table> |
| | | <pagination small @size-change="onSizeChange" @current-change="onPageChange" :pagination="pagination"/> |
| | | |
| | | <GlobalWindow title="选择电表" :visible.sync="selectorVisible" width="780px" @confirm="confirmSelect"> |
| | | <GlobalWindow v-if="!readonly" title="选择电表" :visible.sync="selectorVisible" width="780px" @confirm="confirmSelect"> |
| | | <el-form inline @submit.native.prevent> |
| | | <el-form-item label="关键字"> |
| | | <el-input v-model="selectorKeyword" placeholder="名称/地址" clearable @keypress.enter.native="searchSelectable"/> |
| | |
| | | components: { GlobalWindow, Pagination }, |
| | | props: { |
| | | customerId: Number, |
| | | active: Boolean |
| | | active: Boolean, |
| | | readonly: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data () { |
| | | return { |