| | |
| | | clearable |
| | | size="small" |
| | | style="width: 240px" |
| | | maxlength="50" |
| | | @keyup.enter.native="reGetList" |
| | | /> |
| | | </el-form-item> |
| | |
| | | </el-row> |
| | | <!-- 操作区 ↑↑↑↑↑↑↑↑↑↑ --> |
| | | |
| | | <el-table :data="list"> |
| | | <el-table :data="list" stripe> |
| | | <el-table-column type="index" label="序号" align="center" width="60" /> |
| | | <el-table-column label="角色名称" prop="name" align="center" min-width="120" /> |
| | | <el-table-column label="是否上架" prop="isUp" align="center" min-width="100"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="创建时间" prop="createTime" align="center" min-width="160" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="100"> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | </el-table> |
| | | |
| | | <!-- 新增&编辑 --> |
| | | <el-dialog :title="dialogData.type=='add'?'新增医院科室':'编辑医院科室'" width="500px" :visible.sync="dialogVisible" append-to-body :before-close="hideDialog"> |
| | | <el-dialog v-el-drag-dialog :title="dialogData.type=='add'?'新增医院科室':'编辑医院科室'" width="500px" :visible.sync="dialogVisible" append-to-body :before-close="hideDialog" :close-on-click-modal="false"> |
| | | <el-form ref="refDialog" :model="dialogData" label-width="110px" :rules="rules" size="small"> |
| | | <el-form-item label="名称" prop="name"> |
| | | <el-input v-model="dialogData.name" placeholder="请输入名称" /> |
| | | <el-input v-model="dialogData.name" placeholder="请输入名称" maxlength="50" /> |
| | | </el-form-item> |
| | | <el-form-item label="是否上架" prop="isUp"> |
| | | <el-switch |
| | |
| | | :limit.sync="pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <back-to-top :visibility-height="300" :back-position="50" transition-name="fade" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import BackToTop from '@/components/BackToTop' |
| | | export default { |
| | | name: 'Demo', |
| | | components: { BackToTop }, |
| | | data() { |
| | | return { |
| | | showSearch: true, // 是否显示搜索区 |
| | |
| | | } |
| | | }, () => { |
| | | this.$messageSuc(text + '成功') |
| | | }, (res) => { |
| | | item.isUp = item.isUp === 1 ? 0 : 1 |
| | | this.$messageError(res.msg) |
| | | }) |
| | | }).catch(() => { |
| | | item.isUp = item.isUp === 1 ? 0 : 1 |