|
@@ -1,423 +1,298 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <section class="content" style="margin-top: 20px">
|
|
|
- <div class="box box-info">
|
|
|
- <div
|
|
|
- v-loading.body="fileLoading"
|
|
|
- element-loading-text="课程上传中,请稍后..."
|
|
|
+ <section class="content">
|
|
|
+ <div class="box box-info">
|
|
|
+ <div
|
|
|
+ v-loading.body="fileLoading"
|
|
|
+ element-loading-text="课程上传中,请稍后..."
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ :model="formSearch"
|
|
|
+ label-position="right"
|
|
|
+ label-width="100px"
|
|
|
>
|
|
|
+ <el-row>
|
|
|
+ <el-form-item label="课程名称" class="pull-left">
|
|
|
+ <el-input
|
|
|
+ class="input_width_lg"
|
|
|
+ placeholder="请输入课程名称"
|
|
|
+ v-model="formSearch.name"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程代码" class="pull-left">
|
|
|
+ <el-input
|
|
|
+ class="input_width_lg"
|
|
|
+ placeholder="请输入课程代码"
|
|
|
+ v-model="formSearch.code"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="课程状态" class="pull-left">
|
|
|
+ <el-select
|
|
|
+ class="input_width_lg"
|
|
|
+ v-model="formSearch.enable"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in statusList"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ :key="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="层次" class="pull-left">
|
|
|
+ <el-select
|
|
|
+ class="input_width_lg"
|
|
|
+ v-model="formSearch.level"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in levelList"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ :key="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="专业" class="pull-left" prop="specialtyId">
|
|
|
+ <el-select
|
|
|
+ class="input_width_lg"
|
|
|
+ remote
|
|
|
+ :remote-method="getSpecialtyList4Search"
|
|
|
+ :loading="specialtyLoading4Search"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ v-model="formSearch.specialtyId"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in specialtyList4SearchWrapper"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :key="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="pull-right">
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="search"
|
|
|
+ @click="searchForm"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
+ <el-button size="small" type="primary" @click="impCourse">
|
|
|
+ <i class="fa fa-upload" aria-hidden="true"></i>导入
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="primary" @click="exportCourse">
|
|
|
+ <i class="fa fa-download" aria-hidden="true"></i>导出
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="plus"
|
|
|
+ @click="insertCourse"
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
+ <el-button size="small" type="success" @click="enableByIds">
|
|
|
+ <i class="fa fa-check" aria-hidden="true"></i>启用
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="warning" @click="disableByIds">
|
|
|
+ <i class="fa fa-close" aria-hidden="true"></i>禁用
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <!-- 添加或新增课程弹出框 -->
|
|
|
+ <el-dialog title="课程学习" :visible.sync="courseDialog">
|
|
|
<el-form
|
|
|
:inline="true"
|
|
|
- :model="formSearch"
|
|
|
+ :model="courseForm"
|
|
|
+ ref="courseForm"
|
|
|
+ :rules="rules"
|
|
|
label-position="right"
|
|
|
- label-width="100px"
|
|
|
+ label-width="90px"
|
|
|
>
|
|
|
<el-row>
|
|
|
- <el-form-item label="课程名称" class="pull-left">
|
|
|
+ <el-form-item label="课程代码" label-width="120px" prop="code">
|
|
|
<el-input
|
|
|
- class="input_width_lg"
|
|
|
- placeholder="请输入课程名称"
|
|
|
- v-model="formSearch.name"
|
|
|
+ :disabled="null != courseForm.id"
|
|
|
+ class="pull_length"
|
|
|
+ v-model="courseForm.code"
|
|
|
+ auto-complete="off"
|
|
|
+ placeholder="请输入课程代码"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="课程代码" class="pull-left">
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-form-item label="课程名称" label-width="120px" prop="name">
|
|
|
<el-input
|
|
|
- class="input_width_lg"
|
|
|
- placeholder="请输入课程代码"
|
|
|
- v-model="formSearch.code"
|
|
|
+ class="pull_length"
|
|
|
+ v-model="courseForm.name"
|
|
|
+ auto-complete="off"
|
|
|
+ placeholder="请输入课程名称"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="课程状态" class="pull-left">
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-form-item label="层次" label-width="120px" prop="level">
|
|
|
<el-select
|
|
|
+ style="width: 198px"
|
|
|
class="input_width_lg"
|
|
|
- v-model="formSearch.enable"
|
|
|
+ v-model="courseForm.level"
|
|
|
placeholder="请选择"
|
|
|
- clearable
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in statusList"
|
|
|
+ v-for="item in levelList"
|
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
|
:key="item.value"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="层次" class="pull-left">
|
|
|
- <el-select
|
|
|
- class="input_width_lg"
|
|
|
- v-model="formSearch.level"
|
|
|
- placeholder="请选择"
|
|
|
- clearable
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-form-item label="课程状态" label-width="120px" prop="enable">
|
|
|
+ <el-radio-group
|
|
|
+ class="pull_right_sm"
|
|
|
+ v-model="courseForm.enable"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in levelList"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- :key="item.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
+ <el-radio label="true">开启</el-radio>
|
|
|
+ <el-radio label="false">关闭</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="专业" class="pull-left" prop="specialtyId">
|
|
|
- <el-select
|
|
|
- class="input_width_lg"
|
|
|
- remote
|
|
|
- :remote-method="getSpecialtyList4Search"
|
|
|
- :loading="specialtyLoading4Search"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- v-model="formSearch.specialtyId"
|
|
|
- placeholder="请选择"
|
|
|
+ </el-row>
|
|
|
+ <el-row class="pull-center">
|
|
|
+ <el-button type="primary" @click="submitForm">保 存</el-button>
|
|
|
+ <el-button @click="courseDialog = false;">取 消</el-button>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 导入弹窗 -->
|
|
|
+ <el-dialog title="导入窗口" :visible.sync="impDialog">
|
|
|
+ <el-form>
|
|
|
+ <el-row>
|
|
|
+ <el-form-item style="margin-left:20px">
|
|
|
+ <el-upload
|
|
|
+ class="form_left"
|
|
|
+ ref="upload"
|
|
|
+ accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
|
+ :action="uploadAction"
|
|
|
+ :headers="uploadHeaders"
|
|
|
+ :data="uploadData"
|
|
|
+ :before-upload="beforeUpload"
|
|
|
+ :on-progress="uploadProgress"
|
|
|
+ :on-success="uploadSuccess"
|
|
|
+ :on-error="uploadError"
|
|
|
+ :file-list="fileList"
|
|
|
+ :auto-upload="false"
|
|
|
+ :multiple="false"
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in specialtyList4SearchWrapper"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- :key="item.id"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
+ <el-button size="small" slot="trigger" type="primary">
|
|
|
+ 选择文件
|
|
|
+ </el-button>
|
|
|
+
|
|
|
+ <el-button size="small" type="success" @click="submitUpload">
|
|
|
+ 确认上传
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="danger" @click="removeFile">
|
|
|
+ 清空文件
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="info" @click="exportFile">
|
|
|
+ 下载模板
|
|
|
+ </el-button>
|
|
|
+ <div slot="tip" class="el-upload__tip">只能上传xlsx文件</div>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 导入错误信息列表 -->
|
|
|
+ <el-dialog title="错误提示" :visible.sync="errDialog">
|
|
|
+ <div
|
|
|
+ class="text-danger"
|
|
|
+ v-for="errMessage in errMessages"
|
|
|
+ :key="errMessage.lineNum"
|
|
|
+ >
|
|
|
+ 第{{ errMessage.lineNum }}行:{{ errMessage.msg }}
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="errDialog = false;">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 关联专业弹出框 -->
|
|
|
+ <el-dialog
|
|
|
+ :title="specialtyDialogTitle"
|
|
|
+ :visible.sync="specialtyDialog"
|
|
|
+ >
|
|
|
+ <!-- 表单 -->
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ :model="specialtySearchForm"
|
|
|
+ label-position="right"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
+ <el-row>
|
|
|
+ <el-form-item label="专业名称" class="pull-left">
|
|
|
+ <el-input
|
|
|
+ class="input_width_lg"
|
|
|
+ placeholder="请输入专业名称"
|
|
|
+ v-model="specialtySearchForm.name"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="专业代码" class="pull-left">
|
|
|
+ <el-input
|
|
|
+ class="input_width_lg"
|
|
|
+ placeholder="请输入专业代码"
|
|
|
+ v-model="specialtySearchForm.code"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item class="pull-right">
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
icon="search"
|
|
|
- @click="searchForm"
|
|
|
- >查询</el-button
|
|
|
+ @click="searchSpecialtyPage"
|
|
|
>
|
|
|
- <el-button size="small" type="primary" @click="impCourse">
|
|
|
- <i class="fa fa-upload" aria-hidden="true"></i>导入
|
|
|
- </el-button>
|
|
|
- <el-button size="small" type="primary" @click="exportCourse">
|
|
|
- <i class="fa fa-download" aria-hidden="true"></i>导出
|
|
|
+ 查询
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
- icon="plus"
|
|
|
- @click="insertCourse"
|
|
|
- >新增</el-button
|
|
|
+ icon="search"
|
|
|
+ @click="addRelation"
|
|
|
>
|
|
|
- <el-button size="small" type="success" @click="enableByIds">
|
|
|
- <i class="fa fa-check" aria-hidden="true"></i>启用
|
|
|
- </el-button>
|
|
|
- <el-button size="small" type="warning" @click="disableByIds">
|
|
|
- <i class="fa fa-close" aria-hidden="true"></i>禁用
|
|
|
+ 新增
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
|
|
|
- <!-- 添加或新增课程弹出框 -->
|
|
|
- <el-dialog title="课程学习" :visible.sync="courseDialog">
|
|
|
- <el-form
|
|
|
- :inline="true"
|
|
|
- :model="courseForm"
|
|
|
- ref="courseForm"
|
|
|
- :rules="rules"
|
|
|
- label-position="right"
|
|
|
- label-width="90px"
|
|
|
- >
|
|
|
- <el-row>
|
|
|
- <el-form-item label="课程代码" label-width="120px" prop="code">
|
|
|
- <el-input
|
|
|
- :disabled="null != courseForm.id"
|
|
|
- class="pull_length"
|
|
|
- v-model="courseForm.code"
|
|
|
- auto-complete="off"
|
|
|
- placeholder="请输入课程代码"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-form-item label="课程名称" label-width="120px" prop="name">
|
|
|
- <el-input
|
|
|
- class="pull_length"
|
|
|
- v-model="courseForm.name"
|
|
|
- auto-complete="off"
|
|
|
- placeholder="请输入课程名称"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-form-item label="层次" label-width="120px" prop="level">
|
|
|
- <el-select
|
|
|
- style="width: 198px"
|
|
|
- class="input_width_lg"
|
|
|
- v-model="courseForm.level"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in levelList"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- :key="item.value"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-form-item
|
|
|
- label="课程状态"
|
|
|
- label-width="120px"
|
|
|
- prop="enable"
|
|
|
- >
|
|
|
- <el-radio-group
|
|
|
- class="pull_right_sm"
|
|
|
- v-model="courseForm.enable"
|
|
|
- >
|
|
|
- <el-radio label="true">开启</el-radio>
|
|
|
- <el-radio label="false">关闭</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- <el-row class="pull-center">
|
|
|
- <el-button type="primary" @click="submitForm">保 存</el-button>
|
|
|
- <el-button @click="courseDialog = false;">取 消</el-button>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <!-- 导入弹窗 -->
|
|
|
- <el-dialog title="导入窗口" :visible.sync="impDialog">
|
|
|
- <el-form>
|
|
|
- <el-row>
|
|
|
- <el-form-item style="margin-left:20px">
|
|
|
- <el-upload
|
|
|
- class="form_left"
|
|
|
- ref="upload"
|
|
|
- accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
|
- :action="uploadAction"
|
|
|
- :headers="uploadHeaders"
|
|
|
- :data="uploadData"
|
|
|
- :before-upload="beforeUpload"
|
|
|
- :on-progress="uploadProgress"
|
|
|
- :on-success="uploadSuccess"
|
|
|
- :on-error="uploadError"
|
|
|
- :file-list="fileList"
|
|
|
- :auto-upload="false"
|
|
|
- :multiple="false"
|
|
|
- >
|
|
|
- <el-button size="small" slot="trigger" type="primary">
|
|
|
- 选择文件
|
|
|
- </el-button>
|
|
|
-
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="success"
|
|
|
- @click="submitUpload"
|
|
|
- >
|
|
|
- 确认上传
|
|
|
- </el-button>
|
|
|
- <el-button size="small" type="danger" @click="removeFile">
|
|
|
- 清空文件
|
|
|
- </el-button>
|
|
|
- <el-button size="small" type="info" @click="exportFile">
|
|
|
- 下载模板
|
|
|
- </el-button>
|
|
|
- <div slot="tip" class="el-upload__tip">
|
|
|
- 只能上传xlsx文件
|
|
|
- </div>
|
|
|
- </el-upload>
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <!-- 导入错误信息列表 -->
|
|
|
- <el-dialog title="错误提示" :visible.sync="errDialog">
|
|
|
- <div
|
|
|
- class="text-danger"
|
|
|
- v-for="errMessage in errMessages"
|
|
|
- :key="errMessage.lineNum"
|
|
|
- >
|
|
|
- 第{{ errMessage.lineNum }}行:{{ errMessage.msg }}
|
|
|
- </div>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="errDialog = false;">确定</el-button>
|
|
|
- </span>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <!-- 关联专业弹出框 -->
|
|
|
- <el-dialog
|
|
|
- :title="specialtyDialogTitle"
|
|
|
- :visible.sync="specialtyDialog"
|
|
|
- >
|
|
|
- <!-- 表单 -->
|
|
|
- <el-form
|
|
|
- :inline="true"
|
|
|
- :model="specialtySearchForm"
|
|
|
- label-position="right"
|
|
|
- label-width="100px"
|
|
|
- >
|
|
|
- <el-row>
|
|
|
- <el-form-item label="专业名称" class="pull-left">
|
|
|
- <el-input
|
|
|
- class="input_width_lg"
|
|
|
- placeholder="请输入专业名称"
|
|
|
- v-model="specialtySearchForm.name"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="专业代码" class="pull-left">
|
|
|
- <el-input
|
|
|
- class="input_width_lg"
|
|
|
- placeholder="请输入专业代码"
|
|
|
- v-model="specialtySearchForm.code"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item class="pull-right">
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- icon="search"
|
|
|
- @click="searchSpecialtyPage"
|
|
|
- >
|
|
|
- 查询
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="small"
|
|
|
- type="primary"
|
|
|
- icon="search"
|
|
|
- @click="addRelation"
|
|
|
- >
|
|
|
- 新增
|
|
|
- </el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
-
|
|
|
- <!-- 专业列表 -->
|
|
|
- <el-table
|
|
|
- :data="specialtyTableData"
|
|
|
- border
|
|
|
- style="width: 100%;text-align:center;"
|
|
|
- >
|
|
|
- <el-table-column prop="id" label="ID" width="150" />
|
|
|
- <el-table-column prop="name" label="专业名称" width="250" />
|
|
|
- <el-table-column prop="code" label="专业代码" />
|
|
|
- <el-table-column prop="updateTime" label="更新时间" width="170" />
|
|
|
- <el-table-column label="操作">
|
|
|
- <div slot-scope="scope">
|
|
|
- <span>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="info"
|
|
|
- @click="deleteRelation(scope.row);"
|
|
|
- >
|
|
|
- <i class="el-icon-edit"></i> 取消关联
|
|
|
- </el-button>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <div class="page pull-right">
|
|
|
- <el-pagination
|
|
|
- @current-change="handleSpecialtyCurrentChange"
|
|
|
- :current-page="currentSpecialtyPage"
|
|
|
- :page-size="10"
|
|
|
- layout="total, prev, pager, next, jumper"
|
|
|
- :total="specialtyTotal"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <!-- 添加关联 -->
|
|
|
- <el-dialog title="添加关联专业" v-model="addRelationDialog">
|
|
|
- <el-form
|
|
|
- :inline="true"
|
|
|
- :model="addRelationForm"
|
|
|
- ref="addRelationForm"
|
|
|
- label-position="right"
|
|
|
- label-width="100px"
|
|
|
- :rules="addRelationRules"
|
|
|
- >
|
|
|
- <el-row>
|
|
|
- <el-form-item label="专业" class="pull-left" prop="specialtyId">
|
|
|
- <el-select
|
|
|
- class="input"
|
|
|
- remote
|
|
|
- :remote-method="getSpecialtyList4AddRelation"
|
|
|
- :loading="specialtyLoading4AddRelation"
|
|
|
- filterable
|
|
|
- clearable
|
|
|
- v-model="addRelationForm.specialtyId"
|
|
|
- placeholder="请选择"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in specialtyList4AddRelationWrapper"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- :key="item.id"
|
|
|
- />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
- <el-row class="pull_center">
|
|
|
- <el-button type="primary" @click="submitAddRelationForm">
|
|
|
- 保 存
|
|
|
- </el-button>
|
|
|
- <el-button @click="addRelationDialog = false;">取 消</el-button>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- </el-dialog>
|
|
|
-
|
|
|
- <!-- 页面列表 -->
|
|
|
+ <!-- 专业列表 -->
|
|
|
<el-table
|
|
|
- :data="tableData"
|
|
|
+ :data="specialtyTableData"
|
|
|
border
|
|
|
- resizable
|
|
|
- stripe
|
|
|
style="width: 100%;text-align:center;"
|
|
|
- @selection-change="selectChange"
|
|
|
>
|
|
|
- <el-table-column type="selection" width="50" />
|
|
|
- <el-table-column prop="id" label="课程ID" width="80" />
|
|
|
- <el-table-column prop="name" label="课程名称" width="180" />
|
|
|
- <el-table-column prop="code" label="课程代码" />
|
|
|
- <el-table-column label="层次">
|
|
|
- <span slot-scope="scope">{{ getLevel(scope.row.level) }}</span>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="状态" width="70">
|
|
|
- <span slot-scope="scope">
|
|
|
- <el-tag :type="getTag(scope.row.enable)">
|
|
|
- {{ getEnable(scope.row.enable) }}
|
|
|
- </el-tag>
|
|
|
- </span>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column prop="id" label="ID" width="150" />
|
|
|
+ <el-table-column prop="name" label="专业名称" width="250" />
|
|
|
+ <el-table-column prop="code" label="专业代码" />
|
|
|
<el-table-column prop="updateTime" label="更新时间" width="170" />
|
|
|
<el-table-column label="操作">
|
|
|
<div slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- @click="relation(scope.row);"
|
|
|
- >
|
|
|
- 关联专业
|
|
|
- </el-button>
|
|
|
<span>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="info"
|
|
|
- @click="editCourse(scope.row);"
|
|
|
+ @click="deleteRelation(scope.row);"
|
|
|
>
|
|
|
- <i class="el-icon-edit"></i> 修改
|
|
|
- </el-button>
|
|
|
- </span>
|
|
|
- <span v-if="!scope.row.enable">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="success"
|
|
|
- @click="enableById(scope.row);"
|
|
|
- >
|
|
|
- <i class="fa fa-check" aria-hidden="true"></i>启用
|
|
|
- </el-button>
|
|
|
- </span>
|
|
|
- <span v-if="scope.row.enable">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="warning"
|
|
|
- @click="disableById(scope.row);"
|
|
|
- >
|
|
|
- <i class="fa fa-close" aria-hidden="true"></i>禁用
|
|
|
+ <i class="el-icon-edit"></i> 取消关联
|
|
|
</el-button>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -425,18 +300,131 @@
|
|
|
</el-table>
|
|
|
<div class="page pull-right">
|
|
|
<el-pagination
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
+ @current-change="handleSpecialtyCurrentChange"
|
|
|
+ :current-page="currentSpecialtyPage"
|
|
|
:page-size="10"
|
|
|
layout="total, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
+ :total="specialtyTotal"
|
|
|
+ />
|
|
|
</div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 添加关联 -->
|
|
|
+ <el-dialog title="添加关联专业" v-model="addRelationDialog">
|
|
|
+ <el-form
|
|
|
+ :inline="true"
|
|
|
+ :model="addRelationForm"
|
|
|
+ ref="addRelationForm"
|
|
|
+ label-position="right"
|
|
|
+ label-width="100px"
|
|
|
+ :rules="addRelationRules"
|
|
|
+ >
|
|
|
+ <el-row>
|
|
|
+ <el-form-item label="专业" class="pull-left" prop="specialtyId">
|
|
|
+ <el-select
|
|
|
+ class="input"
|
|
|
+ remote
|
|
|
+ :remote-method="getSpecialtyList4AddRelation"
|
|
|
+ :loading="specialtyLoading4AddRelation"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ v-model="addRelationForm.specialtyId"
|
|
|
+ placeholder="请选择"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in specialtyList4AddRelationWrapper"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :key="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="pull_center">
|
|
|
+ <el-button type="primary" @click="submitAddRelationForm">
|
|
|
+ 保 存
|
|
|
+ </el-button>
|
|
|
+ <el-button @click="addRelationDialog = false;">取 消</el-button>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 页面列表 -->
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ resizable
|
|
|
+ stripe
|
|
|
+ style="width: 100%;text-align:center;"
|
|
|
+ @selection-change="selectChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="50" />
|
|
|
+ <el-table-column prop="id" label="课程ID" width="80" />
|
|
|
+ <el-table-column prop="name" label="课程名称" width="180" />
|
|
|
+ <el-table-column prop="code" label="课程代码" />
|
|
|
+ <el-table-column label="层次">
|
|
|
+ <span slot-scope="scope">{{ getLevel(scope.row.level) }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="状态" width="70">
|
|
|
+ <span slot-scope="scope">
|
|
|
+ <el-tag :type="getTag(scope.row.enable)">
|
|
|
+ {{ getEnable(scope.row.enable) }}
|
|
|
+ </el-tag>
|
|
|
+ </span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="updateTime" label="更新时间" width="170" />
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <div slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ @click="relation(scope.row);"
|
|
|
+ >
|
|
|
+ 关联专业
|
|
|
+ </el-button>
|
|
|
+ <span>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="info"
|
|
|
+ @click="editCourse(scope.row);"
|
|
|
+ >
|
|
|
+ <i class="el-icon-edit"></i> 修改
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ <span v-if="!scope.row.enable">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="success"
|
|
|
+ @click="enableById(scope.row);"
|
|
|
+ >
|
|
|
+ <i class="fa fa-check" aria-hidden="true"></i>启用
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ <span v-if="scope.row.enable">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="warning"
|
|
|
+ @click="disableById(scope.row);"
|
|
|
+ >
|
|
|
+ <i class="fa fa-close" aria-hidden="true"></i>禁用
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="page pull-right">
|
|
|
+ <el-pagination
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-size="10"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </section>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
</template>
|
|
|
|
|
|
<script>
|