|
@@ -0,0 +1,167 @@
|
|
|
+<!-- -->
|
|
|
+<template>
|
|
|
+ <div class="m-container">
|
|
|
+ <h2>
|
|
|
+ <div class="squrt"></div>
|
|
|
+ 教材列表
|
|
|
+ </h2>
|
|
|
+ <div class="m-core">
|
|
|
+ <save-form
|
|
|
+ :inline="true"
|
|
|
+ :model="searchForm"
|
|
|
+ @submit="search"
|
|
|
+ @reset="onReSet"
|
|
|
+ >
|
|
|
+ <el-form-item>
|
|
|
+ <el-input
|
|
|
+ v-model.trim="searchForm.search"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="search"
|
|
|
+ placeholder="教材编号、名称"
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="visitFlag">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.visitFlag"
|
|
|
+ placeholder="教材状态"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option label="启动" value="1"></el-option>
|
|
|
+ <el-option label="停用" value="0"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button native-type="submit" type="primary">搜索</el-button>
|
|
|
+ <el-button native-type="reset" type="danger">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </save-form>
|
|
|
+ <div class="btnList">
|
|
|
+ <el-button type="primary" @click="addTeach">新增教材</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="tableWrap">
|
|
|
+ <el-table
|
|
|
+ style="width: 100%"
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ :data="tableList"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="教材编号"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="教材名称"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="可见分部"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="曲目数量"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="最后更新时间"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="studentId"
|
|
|
+ label="教材状态"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column align="center" prop="studentId" label="操作">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <el-button type="text">查看</el-button>
|
|
|
+ <el-button type="text">修改</el-button>
|
|
|
+ <el-button type="text">停用</el-button>
|
|
|
+ <el-button type="text">启用</el-button>
|
|
|
+ <el-button type="text">删除</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ sync
|
|
|
+ :total.sync="rules.total"
|
|
|
+ :page.sync="rules.page"
|
|
|
+ :limit.sync="rules.limit"
|
|
|
+ :page-sizes="rules.page_size"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-dialog
|
|
|
+ title="新增教材"
|
|
|
+ :visible.sync="teachVisible"
|
|
|
+ width="800px"
|
|
|
+ >
|
|
|
+ <addTeach />
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="teachVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="teachVisible = false"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import axios from "axios";
|
|
|
+import { getToken } from "@/utils/auth";
|
|
|
+import pagination from "@/components/Pagination/index";
|
|
|
+import load from "@/utils/loading";
|
|
|
+import addTeach from './modals/addTeach'
|
|
|
+export default {
|
|
|
+ components: { pagination,addTeach },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ searchForm: {
|
|
|
+ search: null,
|
|
|
+ },
|
|
|
+
|
|
|
+ tableList: [],
|
|
|
+ organList: [],
|
|
|
+ rules: {
|
|
|
+ // 分页规则
|
|
|
+ limit: 10, // 限制显示条数
|
|
|
+ page: 1, // 当前页
|
|
|
+ total: 0, // 总条数
|
|
|
+ page_size: [10, 20, 40, 50], // 选择限制显示条数
|
|
|
+ },
|
|
|
+ teachVisible:false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ //生命周期 - 创建完成(可以访问当前this实例)
|
|
|
+ created() {},
|
|
|
+ //生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
+ mounted() {
|
|
|
+ // 获取分部
|
|
|
+
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {},
|
|
|
+ getList() {},
|
|
|
+ search() {
|
|
|
+ this.rules.page = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ onReSet() {},
|
|
|
+ addTeach(){
|
|
|
+ this.teachVisible = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang='scss' scoped>
|
|
|
+.btnList {
|
|
|
+ margin-bottom: 20px;
|
|
|
+}
|
|
|
+</style>
|