DESKTOP-D85FA51\111
2020-11-25 d45c3a0dff364dc63b4885695df9f995e3e5bb8e
模板暂存
1 files added
3 files modified
190 ■■■■■ changed files
debug.log 1 ●●●● patch | view | raw | blame | history
src/apis/coursewareSource/tempManage/index.js 18 ●●●●● patch | view | raw | blame | history
src/views/coursewareSource/modelManage/ModelList.vue 28 ●●●● patch | view | raw | blame | history
src/views/coursewareSource/tempManage/TempList.vue 143 ●●●●● patch | view | raw | blame | history
debug.log
@@ -5,3 +5,4 @@
[1119/091252.221:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
[1120/091707.655:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
[1124/091054.669:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
[1125/092500.493:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
src/apis/coursewareSource/tempManage/index.js
New file
@@ -0,0 +1,18 @@
import { network } from "@/assets/js/network";
const getTempListUrl = "api/v1/CoursewareTemp/getTempList";
/**
 *
 * @param {*} page
 * @param {*} pageSize
 * @param {*} status 状态
 * @param {*} templateTypeName 单词名称
 */
export const getTempList = (page, pageSize, status, templateTypeName) =>
  network.post(getTempListUrl, {
    page,
    pageSize,
    // status,
    templateTypeName,
  });
src/views/coursewareSource/modelManage/ModelList.vue
@@ -1,10 +1,28 @@
<template>
    <div class="model-list">
        闯关课件
    </div>
  <div class="model-list">
    <bread-crumb :breadList="breadList"></bread-crumb>
    <nav-list :navList="navList"></nav-list>
    <div class="bd"></div>
  </div>
</template>
<script>
export default {
    name: 'ModelList'
}
  name: "ModelList",
  data() {
    return {
      breadList: [
        {
          bread_name: "模板管理",
          bread_url: "",
        },
      ],
      navList: [
        {
          name: "模板管理",
          active: true,
        },
      ],
    };
  },
};
</script>
src/views/coursewareSource/tempManage/TempList.vue
@@ -1,10 +1,145 @@
<template>
    <div class="temp-list">
        模板列表
  <div class="temp-list">
    <div class="v-box">
      <bread-crumb :breadList="breadList"></bread-crumb>
      <nav-list :navList="navList"></nav-list>
      <div class="bd">
        <div class="options mb-20">
          <div class="fl mb-20">
            <el-button type="primary"> 新建 </el-button>
          </div>
          <div class="fr">
            <el-input
              v-model="form.templateTypeName"
              placeholder="请输入模板名称查询"
            ></el-input>
          </div>
        </div>
        <div class="main">
          <div class="main_head wd-300 mb-20">
            <div class="fl mr-20">
              <div style="line-height: 40px; font-size: 16px">状态</div>
            </div>
            <div class="fl">
              <el-select v-model="form.status" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </div>
          </div>
          <div class="main-body mt-20">
            <el-table :data="tableData" stripe style="width: 100%">
              <el-table-column label="序号" width="50">
                <template slot-scope="scope">
                  <div>{{ scope.$index + 1 }}</div>
                </template>
              </el-table-column>
              <el-table-column prop="tempName" label="模板名称">
              </el-table-column>
              <el-table-column prop="templateTypeName" label="类型">
              </el-table-column>
              <el-table-column prop="address" label="创建时间">
              </el-table-column>
              <el-table-column label="操作" width="200">
                <template slot-scope="scope">
                  <el-button>编辑</el-button>
                  <el-button>删除</el-button>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { getTempList } from "@/apis/coursewareSource/tempManage";
export default {
    name: 'TempList'
}
  name: "TempList",
  data() {
    return {
      tableData: [],
      breadList: [
        {
          bread_name: "模板管理",
          bread_url: "",
        },
      ],
      navList: [
        {
          name: "模板管理",
          active: true,
        },
      ],
      form: {
        templateTypeName: "",
        status: "",
      },
      pageInfo: {
        page: 1,
        pageSize: 10,
        total: 10,
        totalPage: 1,
      },
      options: [
        {
          value: "",
          label: "全部",
        },
        {
          value: "1",
          label: "排序",
        },
        {
          value: "2",
          label: "匹配",
        },
        {
          value: "3",
          label: "选择",
        },
        {
          value: "4",
          label: "判断",
        },
        {
          value: "5",
          label: "选词填空",
        },
      ],
    };
  },
  methods: {
    async getTempList() {
      let { code, data, msg } = await getTempList(
        this.pageInfo.page,
        this.pageInfo.pageSize,
        this.form.templateTypeName
      );
      if (code == 1) {
        this.tableData = data.list;
      } else {
        this.$message.error(msg);
      }
    },
  },
  created() {
    this.getTempList();
  },
};
</script>
<style lang="less" scoped>
.wd-300 {
  width: 300px;
  height: 50px;
}
.mt-20 {
  margin-top: 20px;
}
</style>