|
@@ -2,200 +2,264 @@
|
|
|
<div class="manage-root recorded-manage">
|
|
|
<Header />
|
|
|
<div class="manage-root-contain">
|
|
|
- <nav-menu class="manage-root-contain-left" :activeMenuIndex="activeMenuIndex"></nav-menu>
|
|
|
- <div class="manage-root-contain-right personnel-manage-right">
|
|
|
- <breadcrumb :breadcrumbList="breadcrumbList" class="breadcrumb-box"></breadcrumb>
|
|
|
- <div class="personal-inner">
|
|
|
- <div class="common-title-box">
|
|
|
- <h3>录播课</h3>
|
|
|
- <div class="btn-box">
|
|
|
- <el-button type="primary" size="small" @click="handleEdit()">创建课程</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="search-box">
|
|
|
- <div class="search-item">
|
|
|
- <label>搜索</label>
|
|
|
- <el-input
|
|
|
- placeholder="输入搜索内容"
|
|
|
- v-model="searchInput" maxlength="200">
|
|
|
- <i slot="suffix" class="el-input__icon el-icon-search" @click="getList(1)" style="cursor: pointer;"></i>
|
|
|
- </el-input>
|
|
|
- </div>
|
|
|
- <div class="search-item">
|
|
|
- <label>状态</label>
|
|
|
- <el-select v-model="searchStatus" @change="getList(1)" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in $checkStatusList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="search-item">
|
|
|
- <label>学段</label>
|
|
|
- <el-select v-model="searchStudy" @change="getList(1)" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in $studyTypeAll"
|
|
|
- :key="item.study_phase"
|
|
|
- :label="item.study_phase_name"
|
|
|
- :value="item.study_phase">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- <div class="search-item">
|
|
|
- <label>类型</label>
|
|
|
- <el-select v-model="searchType" @change="getList(1)" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in typeList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <el-table
|
|
|
- class="search-table"
|
|
|
- :data="tableData"
|
|
|
- style="width: 100%"
|
|
|
- @sort-change="handleSort"
|
|
|
- :default-sort = dataSort
|
|
|
- :max-height="tableHeight"
|
|
|
- v-loading="tableLoading">
|
|
|
- <el-table-column
|
|
|
- type="index"
|
|
|
- label="#"
|
|
|
- sortable
|
|
|
- width="64"
|
|
|
- :index="(pageNumber-1)*pageSize+1">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="name"
|
|
|
- label="名称"
|
|
|
- sortable="custom"
|
|
|
- min-width="128">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="teacher_name_desc"
|
|
|
- label="教师"
|
|
|
- width="120"
|
|
|
- sortable="custom">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="study_phase"
|
|
|
- label="学段"
|
|
|
- width="80"
|
|
|
- sortable="custom">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{scope.row.study_phase_name}}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="type"
|
|
|
- label="类型"
|
|
|
- width="80"
|
|
|
- sortable="custom">
|
|
|
- <template slot-scope="scope">
|
|
|
- <svg-icon icon-class="video-camera" v-if="scope.row.type===0"></svg-icon>
|
|
|
- <svg-icon icon-class="music" v-if="scope.row.type===1"></svg-icon>
|
|
|
- {{scope.row.type_name}}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="price_discount"
|
|
|
- label="价格"
|
|
|
- width="154"
|
|
|
- sortable="custom">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span class="currectPrice">¥{{scope.row.price_discount | cutMoneyFiter}}</span>
|
|
|
- <span class="oldPrice" v-if="scope.row.price!==scope.row.price_discount">(¥{{scope.row.price | cutMoneyFiter}})</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="status_name"
|
|
|
- label="状态"
|
|
|
- width="104" >
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="status-box">
|
|
|
- <span :style="{background:$checkStatusColorList[scope.row.status].bg}"></span>
|
|
|
- <b :style="{color:$checkStatusColorList[scope.row.status].color}">{{$checkStatusColorList[scope.row.status].text}}</b>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="creator_name"
|
|
|
- label="创建人"
|
|
|
- min-width="90"
|
|
|
- sortable="custom">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="create_time"
|
|
|
- label="创建时间"
|
|
|
- sortable="custom"
|
|
|
- width="165">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{scope.row.create_time?scope.row.create_time.substring(0,16):'-'}}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- fixed="right"
|
|
|
- label="操作"
|
|
|
- width="150">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- @click.native.prevent="handleEdit(scope.row)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- class="primary-btn">
|
|
|
- 编辑
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- @click.native.prevent="handleCheck(scope.row, scope.$index)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- class="primary-btn"
|
|
|
- v-if="scope.row.status===0||scope.row.status===3">
|
|
|
- 审核
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- class="primary-btn"
|
|
|
- v-if="scope.row.status===1">
|
|
|
- 上架
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- class="red-btn"
|
|
|
- v-else-if="scope.row.status===2">
|
|
|
- 下架
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- @click.native.prevent="handleDelete(scope.row, scope.$index)"
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- class="red-btn">
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="pageNumber"
|
|
|
- :page-sizes="[10, 20, 30, 40]"
|
|
|
- :page-size="pageSize"
|
|
|
- layout="total, prev, pager, next, sizes, jumper"
|
|
|
- :total="total_count">
|
|
|
- </el-pagination>
|
|
|
+ <nav-menu
|
|
|
+ class="manage-root-contain-left"
|
|
|
+ :activeMenuIndex="activeMenuIndex"
|
|
|
+ ></nav-menu>
|
|
|
+ <div class="manage-root-contain-right personnel-manage-right">
|
|
|
+ <breadcrumb
|
|
|
+ :breadcrumbList="breadcrumbList"
|
|
|
+ class="breadcrumb-box"
|
|
|
+ ></breadcrumb>
|
|
|
+ <div class="personal-inner">
|
|
|
+ <div class="common-title-box">
|
|
|
+ <h3>录播课</h3>
|
|
|
+ <div class="btn-box">
|
|
|
+ <el-button type="primary" size="small" @click="handleEdit()"
|
|
|
+ >创建课程</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="search-box">
|
|
|
+ <div class="search-item">
|
|
|
+ <label>搜索</label>
|
|
|
+ <el-input
|
|
|
+ placeholder="输入搜索内容"
|
|
|
+ v-model="searchInput"
|
|
|
+ maxlength="200"
|
|
|
+ >
|
|
|
+ <i
|
|
|
+ slot="suffix"
|
|
|
+ class="el-input__icon el-icon-search"
|
|
|
+ @click="getList(1)"
|
|
|
+ style="cursor: pointer"
|
|
|
+ ></i>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
+ <div class="search-item">
|
|
|
+ <label>状态</label>
|
|
|
+ <el-select
|
|
|
+ v-model="searchStatus"
|
|
|
+ @change="getList(1)"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in $checkStatusList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
+ <div class="search-item">
|
|
|
+ <label>学段</label>
|
|
|
+ <el-select
|
|
|
+ v-model="searchStudy"
|
|
|
+ @change="getList(1)"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in studyTypeAll"
|
|
|
+ :key="item.study_phase"
|
|
|
+ :label="item.study_phase_name"
|
|
|
+ :value="item.study_phase"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="search-item">
|
|
|
+ <label>类型</label>
|
|
|
+ <el-select
|
|
|
+ v-model="searchType"
|
|
|
+ @change="getList(1)"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in typeList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ class="search-table"
|
|
|
+ :data="tableData"
|
|
|
+ style="width: 100%"
|
|
|
+ @sort-change="handleSort"
|
|
|
+ :default-sort="dataSort"
|
|
|
+ :max-height="tableHeight"
|
|
|
+ v-loading="tableLoading"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ label="#"
|
|
|
+ sortable
|
|
|
+ width="64"
|
|
|
+ :index="(pageNumber - 1) * pageSize + 1"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ label="名称"
|
|
|
+ sortable="custom"
|
|
|
+ min-width="128"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="teacher_name_desc"
|
|
|
+ label="教师"
|
|
|
+ width="120"
|
|
|
+ sortable="custom"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="study_phase"
|
|
|
+ label="学段"
|
|
|
+ width="80"
|
|
|
+ sortable="custom"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.study_phase_name }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="type"
|
|
|
+ label="类型"
|
|
|
+ width="80"
|
|
|
+ sortable="custom"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <svg-icon
|
|
|
+ icon-class="video-camera"
|
|
|
+ v-if="scope.row.type === 0"
|
|
|
+ ></svg-icon>
|
|
|
+ <svg-icon
|
|
|
+ icon-class="music"
|
|
|
+ v-if="scope.row.type === 1"
|
|
|
+ ></svg-icon>
|
|
|
+ {{ scope.row.type_name }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="price_discount"
|
|
|
+ label="价格"
|
|
|
+ width="154"
|
|
|
+ sortable="custom"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="currectPrice"
|
|
|
+ >¥{{ scope.row.price_discount | cutMoneyFiter }}</span
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="oldPrice"
|
|
|
+ v-if="scope.row.price !== scope.row.price_discount"
|
|
|
+ >(¥{{ scope.row.price | cutMoneyFiter }})</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="status_name" label="状态" width="104">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="status-box">
|
|
|
+ <span
|
|
|
+ :style="{
|
|
|
+ background: $checkStatusColorList[scope.row.status].bg,
|
|
|
+ }"
|
|
|
+ ></span>
|
|
|
+ <b
|
|
|
+ :style="{
|
|
|
+ color: $checkStatusColorList[scope.row.status].color,
|
|
|
+ }"
|
|
|
+ >{{ $checkStatusColorList[scope.row.status].text }}</b
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="creator_name"
|
|
|
+ label="创建人"
|
|
|
+ min-width="90"
|
|
|
+ sortable="custom"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="create_time"
|
|
|
+ label="创建时间"
|
|
|
+ sortable="custom"
|
|
|
+ width="165"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{
|
|
|
+ scope.row.create_time
|
|
|
+ ? scope.row.create_time.substring(0, 16)
|
|
|
+ : "-"
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleEdit(scope.row)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="primary-btn"
|
|
|
+ >
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleCheck(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="primary-btn"
|
|
|
+ v-if="scope.row.status === 0 || scope.row.status === 3"
|
|
|
+ >
|
|
|
+ 审核
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="primary-btn"
|
|
|
+ v-if="scope.row.status === 1"
|
|
|
+ >
|
|
|
+ 上架
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleUp(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="red-btn"
|
|
|
+ v-else-if="scope.row.status === 2"
|
|
|
+ >
|
|
|
+ 下架
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ @click.native.prevent="handleDelete(scope.row, scope.$index)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ class="red-btn"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="pageNumber"
|
|
|
+ :page-sizes="[10, 20, 30, 40]"
|
|
|
+ :page-size="pageSize"
|
|
|
+ layout="total, prev, pager, next, sizes, jumper"
|
|
|
+ :total="total_count"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -204,151 +268,202 @@
|
|
|
//这里可以导入其它文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
//例如:import 《组件名称》from ‘《组件路径》';
|
|
|
import Header from "../../../components/Header.vue";
|
|
|
-import NavMenu from "../../../components/NavMenu.vue"
|
|
|
-import Breadcrumb from '../../../components/Breadcrumb.vue';
|
|
|
-import { cutMoneyFiter } from '@/utils/defined';
|
|
|
+import NavMenu from "../../../components/NavMenu.vue";
|
|
|
+import Breadcrumb from "../../../components/Breadcrumb.vue";
|
|
|
+import { cutMoneyFiter } from "@/utils/defined";
|
|
|
import { getLogin } from "@/api/ajax";
|
|
|
-import { mapState } from 'vuex';
|
|
|
+import { mapState } from "vuex";
|
|
|
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
|
components: { Header, NavMenu, Breadcrumb },
|
|
|
props: {},
|
|
|
- filters:{
|
|
|
- cutMoneyFiter
|
|
|
+ filters: {
|
|
|
+ cutMoneyFiter,
|
|
|
},
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
|
- activeMenuIndex: "recorded_course",
|
|
|
- breadcrumbList:[
|
|
|
- {
|
|
|
- icon:'file-list-line',
|
|
|
- url:'',
|
|
|
- text:''
|
|
|
- },
|
|
|
- {
|
|
|
- icon:'',
|
|
|
- url:'',
|
|
|
- notLink: true,
|
|
|
- text:'内容管理'
|
|
|
- },
|
|
|
- {
|
|
|
- icon:'',
|
|
|
- url:'',
|
|
|
- notLink: true,
|
|
|
- text:'课程管理'
|
|
|
- },
|
|
|
- {
|
|
|
- icon:'',
|
|
|
- url:'',
|
|
|
- text:'录播课'
|
|
|
- }
|
|
|
- ],
|
|
|
- searchInput:'',
|
|
|
- searchType: -1,
|
|
|
- searchStatus: -1,
|
|
|
- searchStudy: -1,
|
|
|
- typeList:[
|
|
|
- {
|
|
|
- value:-1,
|
|
|
- label:'全部'
|
|
|
- },
|
|
|
- {
|
|
|
- value:0,
|
|
|
- label:'视频'
|
|
|
- },
|
|
|
- {
|
|
|
- value:1,
|
|
|
- label:'音频'
|
|
|
- }
|
|
|
- ],
|
|
|
- tableData:[],
|
|
|
- pageSize: window.localStorage.getItem('pageSize')?Number(window.localStorage.getItem('pageSize')):10,
|
|
|
- pageNumber: window.localStorage.getItem('pageNumber')?Number(window.localStorage.getItem('pageNumber')):1,
|
|
|
- tableHeight: "", // 表格高度
|
|
|
- total_count: 0,
|
|
|
- dataSort: {},
|
|
|
- tableLoading: false
|
|
|
- }
|
|
|
+ activeMenuIndex: "recorded_course",
|
|
|
+ breadcrumbList: [
|
|
|
+ {
|
|
|
+ icon: "file-list-line",
|
|
|
+ url: "",
|
|
|
+ text: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: "",
|
|
|
+ url: "",
|
|
|
+ notLink: true,
|
|
|
+ text: "内容管理",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: "",
|
|
|
+ url: "",
|
|
|
+ notLink: true,
|
|
|
+ text: "课程管理",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: "",
|
|
|
+ url: "",
|
|
|
+ text: "录播课",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ searchInput: "",
|
|
|
+ searchType: -1,
|
|
|
+ searchStatus: -1,
|
|
|
+ searchStudy: -1,
|
|
|
+ typeList: [
|
|
|
+ {
|
|
|
+ value: -1,
|
|
|
+ label: "全部",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 0,
|
|
|
+ label: "视频",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 1,
|
|
|
+ label: "音频",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ tableData: [],
|
|
|
+ pageSize: window.localStorage.getItem("pageSize")
|
|
|
+ ? Number(window.localStorage.getItem("pageSize"))
|
|
|
+ : 10,
|
|
|
+ pageNumber: window.localStorage.getItem("pageNumber")
|
|
|
+ ? Number(window.localStorage.getItem("pageNumber"))
|
|
|
+ : 1,
|
|
|
+ tableHeight: "", // 表格高度
|
|
|
+ total_count: 0,
|
|
|
+ dataSort: {},
|
|
|
+ tableLoading: false,
|
|
|
+ studyTypeAll: [
|
|
|
+ {
|
|
|
+ study_phase_name: "全部",
|
|
|
+ study_phase: -1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ study_phase_name: "全学段",
|
|
|
+ study_phase: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ study_phase_name: "小学",
|
|
|
+ study_phase: 11,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ study_phase_name: "初中",
|
|
|
+ study_phase: 20,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ study_phase_name: "初一",
|
|
|
+ study_phase: 21,
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ study_phase_name: "初二",
|
|
|
+ study_phase: 22,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ study_phase_name: "初三",
|
|
|
+ study_phase: 23,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ study_phase_name: "高中",
|
|
|
+ study_phase: 30,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ study_phase_name: "高一",
|
|
|
+ study_phase: 31,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ study_phase_name: "高二",
|
|
|
+ study_phase: 32,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ study_phase_name: "高三",
|
|
|
+ study_phase: 33,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
|
computed: {
|
|
|
- ...mapState(['$studyTypeAll', '$checkStatusList', '$checkStatusColorList']),
|
|
|
+ ...mapState(["$studyTypeAll", "$checkStatusList", "$checkStatusColorList"]),
|
|
|
},
|
|
|
//监控data中数据变化
|
|
|
watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
- handleSort(value){
|
|
|
- let dataSort = {
|
|
|
- prop: value.prop,
|
|
|
- order: value.order
|
|
|
- }
|
|
|
- this.dataSort = dataSort
|
|
|
- this.getList()
|
|
|
+ handleSort(value) {
|
|
|
+ let dataSort = {
|
|
|
+ prop: value.prop,
|
|
|
+ order: value.order,
|
|
|
+ };
|
|
|
+ this.dataSort = dataSort;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
// 查询列表
|
|
|
- getList(page){
|
|
|
- this.tableLoading = true
|
|
|
- if(page){
|
|
|
- this.pageNumber = page
|
|
|
- }
|
|
|
- let MethodName = "/CourseServer/Manager/PageQuery/PageQueryLBCourseList";
|
|
|
- let order_column_list = []
|
|
|
- if(this.dataSort != {}){
|
|
|
- if(this.dataSort.order=='descending'){
|
|
|
- order_column_list = [this.dataSort.prop + ':desc']
|
|
|
- }else if(this.dataSort.order=='ascending'){
|
|
|
- // 升序不传值
|
|
|
- order_column_list = [this.dataSort.prop]
|
|
|
- }else{
|
|
|
- order_column_list = ['create_time:desc']
|
|
|
- }
|
|
|
- }else{
|
|
|
- order_column_list = ['create_time:desc']
|
|
|
- }
|
|
|
- let data = {
|
|
|
- search_content: this.searchInput.trim(),
|
|
|
- study_phase: this.searchStudy,
|
|
|
- status: this.searchStatus,
|
|
|
- type: this.searchType,
|
|
|
- page_capacity:this.pageSize,
|
|
|
- cur_page:this.pageNumber,
|
|
|
- order_column_list: order_column_list
|
|
|
+ getList(page) {
|
|
|
+ this.tableLoading = true;
|
|
|
+ if (page) {
|
|
|
+ this.pageNumber = page;
|
|
|
+ }
|
|
|
+ let MethodName = "/CourseServer/Manager/PageQuery/PageQueryLBCourseList";
|
|
|
+ let order_column_list = [];
|
|
|
+ if (this.dataSort != {}) {
|
|
|
+ if (this.dataSort.order == "descending") {
|
|
|
+ order_column_list = [this.dataSort.prop + ":desc"];
|
|
|
+ } else if (this.dataSort.order == "ascending") {
|
|
|
+ // 升序不传值
|
|
|
+ order_column_list = [this.dataSort.prop];
|
|
|
+ } else {
|
|
|
+ order_column_list = ["create_time:desc"];
|
|
|
}
|
|
|
- getLogin(MethodName, data)
|
|
|
+ } else {
|
|
|
+ order_column_list = ["create_time:desc"];
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ search_content: this.searchInput.trim(),
|
|
|
+ study_phase: this.searchStudy,
|
|
|
+ status: this.searchStatus,
|
|
|
+ type: this.searchType,
|
|
|
+ page_capacity: this.pageSize,
|
|
|
+ cur_page: this.pageNumber,
|
|
|
+ order_column_list: order_column_list,
|
|
|
+ };
|
|
|
+ getLogin(MethodName, data)
|
|
|
.then((res) => {
|
|
|
- this.tableLoading = false
|
|
|
- if(res.status===1){
|
|
|
- this.tableData = res.lb_course_list
|
|
|
- this.total_count = res.total_count
|
|
|
- }
|
|
|
+ this.tableLoading = false;
|
|
|
+ if (res.status === 1) {
|
|
|
+ this.tableData = res.lb_course_list;
|
|
|
+ this.total_count = res.total_count;
|
|
|
+ }
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- this.tableLoading = false
|
|
|
+ this.tableLoading = false;
|
|
|
});
|
|
|
},
|
|
|
// 创建机构或者编辑信息
|
|
|
- handleEdit(row){
|
|
|
- // 根据登录用户判断当前用户是不是超管 在table里加上disabled
|
|
|
+ handleEdit(row) {
|
|
|
+ // 根据登录用户判断当前用户是不是超管 在table里加上disabled
|
|
|
|
|
|
- // 点击时记录页码和每页条数
|
|
|
- window.localStorage.setItem('pageSize',this.pageSize)
|
|
|
- window.localStorage.setItem('pageNumber',this.pageNumber)
|
|
|
- this.$router.push({
|
|
|
- path: "/createRecorded",
|
|
|
- query: {
|
|
|
- id: row?row.id:''
|
|
|
- },
|
|
|
- });
|
|
|
+ // 点击时记录页码和每页条数
|
|
|
+ window.localStorage.setItem("pageSize", this.pageSize);
|
|
|
+ window.localStorage.setItem("pageNumber", this.pageNumber);
|
|
|
+ this.$router.push({
|
|
|
+ path: "/createRecorded",
|
|
|
+ query: {
|
|
|
+ id: row ? row.id : "",
|
|
|
+ },
|
|
|
+ });
|
|
|
},
|
|
|
// 停用 启用
|
|
|
handleUp(row, index) {
|
|
|
let Mname = "/CourseServer/Manager/LBCourseManager/ShelveLBCourse";
|
|
|
let updataData = JSON.parse(JSON.stringify(row));
|
|
|
let data = {
|
|
|
- id: row.id
|
|
|
+ id: row.id,
|
|
|
};
|
|
|
if (row.status === 1) {
|
|
|
// 下架状态
|
|
@@ -358,78 +473,78 @@ export default {
|
|
|
data.is_pass = "false";
|
|
|
updataData.status = 1;
|
|
|
}
|
|
|
- getLogin(Mname, data).then(res => {
|
|
|
+ getLogin(Mname, data).then((res) => {
|
|
|
this.$message.success("操作成功");
|
|
|
this.$set(this.tableData, index, updataData);
|
|
|
});
|
|
|
},
|
|
|
// 删除
|
|
|
- handleDelete(row){
|
|
|
- this.$confirm('确定删除吗?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- let Mname = "/CourseServer/Manager/LBCourseManager/DeleteLBCourse";
|
|
|
- let data = {
|
|
|
- id: row.id,
|
|
|
- is_force_delete: "true"
|
|
|
- };
|
|
|
- getLogin(Mname, data).then(res => {
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: '删除成功!'
|
|
|
- });
|
|
|
- this.getList()
|
|
|
+ handleDelete(row) {
|
|
|
+ this.$confirm("确定删除吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ let Mname = "/CourseServer/Manager/LBCourseManager/DeleteLBCourse";
|
|
|
+ let data = {
|
|
|
+ id: row.id,
|
|
|
+ is_force_delete: "true",
|
|
|
+ };
|
|
|
+ getLogin(Mname, data).then((res) => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "删除成功!",
|
|
|
});
|
|
|
- }).catch(() => {
|
|
|
-
|
|
|
- });
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
- this.pageSize = val
|
|
|
- this.pageNumber = 1
|
|
|
- this.getList()
|
|
|
+ this.pageSize = val;
|
|
|
+ this.pageNumber = 1;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
- this.pageNumber = val
|
|
|
- this.getList()
|
|
|
+ this.pageNumber = val;
|
|
|
+ this.getList();
|
|
|
},
|
|
|
// 审核
|
|
|
- handleCheck(row, index){
|
|
|
- window.localStorage.setItem('pageSize',this.pageSize)
|
|
|
- window.localStorage.setItem('pageNumber',this.pageNumber)
|
|
|
- this.$router.push({
|
|
|
- path: '/checkCourse',
|
|
|
- query: {
|
|
|
- id: row.id,
|
|
|
- type: row.type
|
|
|
- }
|
|
|
- })
|
|
|
- // let Mname = "/CourseServer/Manager/LBCourseManager/AuditLBCourse";
|
|
|
- // let updataData = JSON.parse(JSON.stringify(row));
|
|
|
- // let data = {
|
|
|
- // id: row.id
|
|
|
- // };
|
|
|
- // this.$confirm('审核', '提示', {
|
|
|
- // confirmButtonText: '审核通过',
|
|
|
- // cancelButtonText: '驳回',
|
|
|
- // type: 'warning'
|
|
|
- // }).then(() => {
|
|
|
- // data.is_pass = "true";
|
|
|
- // updataData.status = 1;
|
|
|
- // getLogin(Mname, data).then(res => {
|
|
|
- // this.$message.success("操作成功");
|
|
|
- // this.$set(this.tableData, index, updataData);
|
|
|
- // });
|
|
|
- // }).catch(() => {
|
|
|
- // data.is_pass = "false";
|
|
|
- // updataData.status = 3;
|
|
|
- // getLogin(Mname, data).then(res => {
|
|
|
- // this.$message.success("操作成功");
|
|
|
- // this.$set(this.tableData, index, updataData);
|
|
|
- // });
|
|
|
- // });
|
|
|
+ handleCheck(row, index) {
|
|
|
+ window.localStorage.setItem("pageSize", this.pageSize);
|
|
|
+ window.localStorage.setItem("pageNumber", this.pageNumber);
|
|
|
+ this.$router.push({
|
|
|
+ path: "/checkCourse",
|
|
|
+ query: {
|
|
|
+ id: row.id,
|
|
|
+ type: row.type,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ // let Mname = "/CourseServer/Manager/LBCourseManager/AuditLBCourse";
|
|
|
+ // let updataData = JSON.parse(JSON.stringify(row));
|
|
|
+ // let data = {
|
|
|
+ // id: row.id
|
|
|
+ // };
|
|
|
+ // this.$confirm('审核', '提示', {
|
|
|
+ // confirmButtonText: '审核通过',
|
|
|
+ // cancelButtonText: '驳回',
|
|
|
+ // type: 'warning'
|
|
|
+ // }).then(() => {
|
|
|
+ // data.is_pass = "true";
|
|
|
+ // updataData.status = 1;
|
|
|
+ // getLogin(Mname, data).then(res => {
|
|
|
+ // this.$message.success("操作成功");
|
|
|
+ // this.$set(this.tableData, index, updataData);
|
|
|
+ // });
|
|
|
+ // }).catch(() => {
|
|
|
+ // data.is_pass = "false";
|
|
|
+ // updataData.status = 3;
|
|
|
+ // getLogin(Mname, data).then(res => {
|
|
|
+ // this.$message.success("操作成功");
|
|
|
+ // this.$set(this.tableData, index, updataData);
|
|
|
+ // });
|
|
|
+ // });
|
|
|
},
|
|
|
//计算table高度(动态设置table高度)
|
|
|
getTableHeight() {
|
|
@@ -445,51 +560,51 @@ export default {
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
this.getTableHeight();
|
|
|
- this.getList()
|
|
|
+ this.getList();
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
- let _this = this
|
|
|
- let input = document.querySelector('input');
|
|
|
- input.addEventListener('keyup', function(event) {
|
|
|
- // 判断是否按下回车键
|
|
|
- if (event.keyCode === 13) {
|
|
|
- // 回车键被按下,执行你想要的操作
|
|
|
- _this.getList(1)
|
|
|
- }
|
|
|
+ let _this = this;
|
|
|
+ let input = document.querySelector("input");
|
|
|
+ input.addEventListener("keyup", function (event) {
|
|
|
+ // 判断是否按下回车键
|
|
|
+ if (event.keyCode === 13) {
|
|
|
+ // 回车键被按下,执行你想要的操作
|
|
|
+ _this.getList(1);
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
//生命周期-创建之前
|
|
|
- beforeCreated() { },
|
|
|
+ beforeCreated() {},
|
|
|
//生命周期-挂载之前
|
|
|
- beforeMount() { },
|
|
|
+ beforeMount() {},
|
|
|
//生命周期-更新之前
|
|
|
- beforUpdate() { },
|
|
|
+ beforUpdate() {},
|
|
|
//生命周期-更新之后
|
|
|
- updated() { },
|
|
|
+ updated() {},
|
|
|
//生命周期-销毁之前
|
|
|
- beforeDestory() { },
|
|
|
+ beforeDestory() {},
|
|
|
//生命周期-销毁完成
|
|
|
- destoryed() { },
|
|
|
+ destoryed() {},
|
|
|
//如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
- activated() { }
|
|
|
-}
|
|
|
+ activated() {},
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
/* @import url(); 引入css类 */
|
|
|
-.teacher-list{
|
|
|
- margin: 0;
|
|
|
- overflow:hidden;
|
|
|
- text-overflow:ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
+.teacher-list {
|
|
|
+ margin: 0;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
-.currectPrice{
|
|
|
- color: #D85555;
|
|
|
- font-weight: 500;
|
|
|
- margin-right: 4px;
|
|
|
+.currectPrice {
|
|
|
+ color: #d85555;
|
|
|
+ font-weight: 500;
|
|
|
+ margin-right: 4px;
|
|
|
}
|
|
|
-.oldPrice{
|
|
|
- color: #A7A7A7;
|
|
|
- font-weight: 500;
|
|
|
+.oldPrice {
|
|
|
+ color: #a7a7a7;
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
|
</style>
|