| | |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList" |
| | | v-for="item in cateList.filter(item=>{return item.type==0})" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList1" |
| | | v-for="item in cateList.filter(item=>{return item.type==1})" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList2" |
| | | v-for="item in cateList.filter(item=>{return item.type==2})" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList3" |
| | | v-for="item in cateList.filter(item=>{return item.type==3})" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select |
| | | v-model="searchForm.status" |
| | |
| | | <el-option :key="1" :value="1" label="禁用"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">搜索</el-button> |
| | | <el-button @click="reset">重置</el-button> |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="状态"> |
| | | <el-table-column prop="fee" label="费用标准(元/周)" min-width="130px"></el-table-column> |
| | | <el-table-column prop="updateUserName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateTime" label="最近操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column label="状态" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66" |
| | | inactive-color="#ff4949" :active-value="0" :inactive-value="1"> |
| | | inactive-color="#ff4949" :active-value="0" :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="updateUserName" label="操作人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateTime" label="最近操作时间" min-width="150px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete'])" |
| | | label="操作" |
| | | min-width="120" |
| | | min-width="180" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaMemberWindow.open('编辑老师', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:member:update']">编辑</el-button> |
| | | <el-button type="text" @click="$refs.OperaCasesListWindow.open('查看老师案例【'+row.name+'】', row.id)" icon="el-icon-open">案例</el-button> |
| | | <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <!-- 新建/修改 --> |
| | | <OperaMemberWindow ref="operaMemberWindow" @success="handlePageChange"/> |
| | | <OperaMemberImportWindow ref="OperaMemberImportWindow" @success="handlePageChange" /> |
| | | <OperaCasesListWindow ref="OperaCasesListWindow" @success="handlePageChange" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaMemberWindow from '@/components/business/OperaMemberWindow' |
| | | import OperaMemberImportWindow from '@/components/business/OperaMemberImportWindow' |
| | | import OperaCasesListWindow from '@/components/business/OperaCasesListWindow' |
| | | import { findAll as cateList } from '@/api/business/category' |
| | | export default { |
| | | name: 'Category', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaMemberWindow ,OperaMemberImportWindow}, |
| | | components: { TableLayout, Pagination, OperaMemberWindow ,OperaMemberImportWindow,OperaCasesListWindow}, |
| | | data () { |
| | | return { |
| | | // 搜索 |
| | |
| | | bustypeIds:null, |
| | | type: 0 |
| | | }, |
| | | cateList:[], |
| | | cateList1:[], |
| | | cateList2:[], |
| | | cateList3:[], |
| | | cateList:[] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | }) |
| | | this.search() |
| | | cateList({ |
| | | type: 0 , //战区 |
| | | }).then(res => { |
| | | this.cateList = res |
| | | }) |
| | | cateList({ |
| | | type: 1 , //商业化 |
| | | }).then(res => { |
| | | this.cateList1 = res |
| | | }) |
| | | cateList({ |
| | | type: 2 , //擅长领用 |
| | | }).then(res => { |
| | | this.cateList2 = res |
| | | }) |
| | | cateList({ |
| | | type: 3 , //等级 |
| | | }).then(res => { |
| | | this.cateList3 = res |
| | | }) |
| | | |
| | | }, |
| | | methods: { |
| | | changeStatus (e, row) { |
| | |
| | | this.api.updateStatus({ id: row.id, status: e }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '操作成功') |
| | | this.search() |
| | | this.handlePageChange() |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |