mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:集成Minio
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
export default class SystemController {
|
||||
static login (sender, params, axiosOption, httpOption) {
|
||||
return sender.doUrl('admin/login/doLogin', 'get', params, axiosOption, httpOption);
|
||||
return sender.doUrl('admin/upms/login/doLogin', 'get', params, axiosOption, httpOption);
|
||||
}
|
||||
|
||||
static logout (sender, params, axiosOption, httpOption) {
|
||||
return sender.doUrl('admin/login/doLogout', 'post', params, axiosOption, httpOption);
|
||||
return sender.doUrl('admin/upms/login/doLogout', 'post', params, axiosOption, httpOption);
|
||||
}
|
||||
|
||||
static changePassword (sender, params, axiosOption, httpOption) {
|
||||
return sender.doUrl('admin/login/changePassword', 'post', params, axiosOption, httpOption);
|
||||
return sender.doUrl('admin/upms/login/changePassword', 'post', params, axiosOption, httpOption);
|
||||
}
|
||||
|
||||
static getDictList (sender, params, axiosOption, httpOption) {
|
||||
|
||||
@@ -591,3 +591,19 @@ body .layer-dialog .layui-layer-content {
|
||||
.pb20 {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.gutter-left {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.gutter-right {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.gutter-top {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.gutter-bottom {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
@@ -40,11 +40,9 @@ const routers = [
|
||||
{path: 'formCourseStats', component: _import('generated/formCourseStats/index'), name: 'formCourseStats', props: getProps, meta: {title: '课程统计'}},
|
||||
{path: 'formStudentActionStats', component: _import('generated/formStudentActionStats/index'), name: 'formStudentActionStats', props: getProps, meta: {title: '学生行为统计'}},
|
||||
{path: 'formStudentActionDetail', component: _import('generated/formStudentActionDetail/index'), name: 'formStudentActionDetail', props: getProps, meta: {title: '学生行为详情'}},
|
||||
{path: 'formClass', component: _import('generated/formClass/index'), name: 'formClass', props: getProps, meta: {title: '班级管理'}},
|
||||
{path: 'formClassStudent', component: _import('generated/formClassStudent/index'), name: 'formClassStudent', props: getProps, meta: {title: '班级学生'}},
|
||||
{path: 'formSetClassStudent', component: _import('generated/formSetClassStudent/index'), name: 'formSetClassStudent', props: getProps, meta: {title: '设置班级学生'}},
|
||||
{path: 'formSetClassCourse', component: _import('generated/formSetClassCourse/index'), name: 'formSetClassCourse', props: getProps, meta: {title: '设置班级课程'}},
|
||||
{path: 'formClassCourse', component: _import('generated/formClassCourse/index'), name: 'formClassCourse', props: getProps, meta: {title: '班级课程'}}
|
||||
{path: 'formClass', component: _import('generated/formClass/index'), name: 'formClass', props: getProps, meta: {title: '班级管理'}}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -82,11 +82,13 @@ export class TableWidget {
|
||||
* @param {function (params: Object) : Promise} loadTableData 表数据获取函数
|
||||
* @param {function () : Boolean} verifyTableParameter 表数据获取检验函数
|
||||
* @param {Boolean} paged 是否支持分页
|
||||
* @param {Boolean} rowSelection 是否支持行选择
|
||||
* @param {String} orderFieldName 默认排序字段
|
||||
* @param {Boolean} ascending 默认排序方式(true为正序,false为倒序)
|
||||
* @param {String} dateAggregateBy 默认排序字段的日期统计类型
|
||||
*/
|
||||
constructor (loadTableData, verifyTableParameter, paged, orderFieldName, ascending, dateAggregateBy) {
|
||||
constructor (loadTableData, verifyTableParameter, paged, rowSelection, orderFieldName, ascending, dateAggregateBy) {
|
||||
this.currentRow = null;
|
||||
this.oldPage = 0;
|
||||
this.currentPage = 1;
|
||||
this.oldPageSize = DEFAULT_PAGE_SIZE;
|
||||
@@ -99,12 +101,14 @@ export class TableWidget {
|
||||
dateAggregateBy: dateAggregateBy
|
||||
};
|
||||
this.paged = paged;
|
||||
this.rowSelection = rowSelection;
|
||||
this.searchVerify = verifyTableParameter || function () { return true; };
|
||||
this.loadTableData = loadTableData || function () { return Promise.resolve(); };
|
||||
this.onCurrentPageChange = this.onCurrentPageChange.bind(this);
|
||||
this.onPageSizeChange = this.onPageSizeChange.bind(this);
|
||||
this.onSortChange = this.onSortChange.bind(this);
|
||||
this.getTableIndex = this.getTableIndex.bind(this);
|
||||
this.currentRowChange = this.currentRowChange.bind(this);
|
||||
}
|
||||
/**
|
||||
* 表格分页变化
|
||||
@@ -147,6 +151,22 @@ export class TableWidget {
|
||||
getTableIndex (index) {
|
||||
return this.paged ? ((this.currentPage - 1) * this.pageSize + (index + 1)) : (index + 1);
|
||||
}
|
||||
/**
|
||||
* 当前选中行改变
|
||||
* @param {Object} currentRow 当前选中行
|
||||
* @param {Object} oldRow 老的选中行
|
||||
*/
|
||||
currentRowChange (currentRow, oldRow) {
|
||||
console.log(currentRow, oldRow);
|
||||
this.currentRow = currentRow;
|
||||
}
|
||||
clearTable () {
|
||||
this.currentRow = null;
|
||||
this.oldPage = 0;
|
||||
this.currentPage = 1;
|
||||
this.totalCount = 0;
|
||||
this.dataList = [];
|
||||
}
|
||||
/**
|
||||
* 获取表格数据
|
||||
* @param {Integer} pageNum 当前分页
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div style="position: relative;">
|
||||
<div class="form-single-fragment" style="position: relative;">
|
||||
<el-form label-width="100px" size="mini" label-position="right" @submit.native.prevent>
|
||||
<filter-box :item-width="350">
|
||||
<el-form-item label="所属校区">
|
||||
@@ -10,82 +10,181 @@
|
||||
<el-option v-for="item in formClass.schoolId.impl.dropdownList" :key="item.id" :value="item.id" :label="item.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="班级级别">
|
||||
<el-select class="filter-item" v-model="formClass.formFilter.classLevel" :clearable="true" filterable
|
||||
placeholder="班级级别" :loading="formClass.classLevel.impl.loading"
|
||||
@visible-change="formClass.classLevel.impl.onVisibleChange"
|
||||
@change="onClassLevelValueChange">
|
||||
<el-option v-for="item in formClass.classLevel.impl.dropdownList" :key="item.id" :value="item.id" :label="item.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="班级名称">
|
||||
<el-input class="filter-item" v-model="formClass.formFilter.className"
|
||||
:clearable="true" placeholder="班级名称" />
|
||||
</el-form-item>
|
||||
<el-button slot="operator" type="primary" :plain="true" size="mini" @click="refreshFormClass(true)">查询</el-button>
|
||||
<el-button slot="operator" type="primary" size="mini" :disabled="!checkPermCodeExist('formClass:formClass:formCreateClass')"
|
||||
@click="onFormCreateClassClick()">
|
||||
新建
|
||||
</el-button>
|
||||
</filter-box>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="formClass.StudentClass.impl.dataList" size="mini" @sort-change="formClass.StudentClass.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formClass.StudentClass.impl.getTableIndex" />
|
||||
<el-table-column label="班级名称" prop="className">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属校区" prop="schoolIdDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="班级级别" prop="classLevelDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="已完成课时" prop="finishClassHour">
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="createTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{formatDateByStatsType(scope.row.createTime, 'day')}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="onFormEditClassClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:formEditClass')">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button @click="onFormClassStudentClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:formClassStudent')">
|
||||
学生
|
||||
</el-button>
|
||||
<el-button @click="onFormClassCourseClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:formClassCourse')">
|
||||
课程
|
||||
</el-button>
|
||||
<el-button @click="onDeleteClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:delete')">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row type="flex" justify="end" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:total="formClass.StudentClass.impl.totalCount"
|
||||
:current-page="formClass.StudentClass.impl.currentPage"
|
||||
:page-size="formClass.StudentClass.impl.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, prev, pager, next, sizes"
|
||||
@current-change="formClass.StudentClass.impl.onCurrentPageChange"
|
||||
@size-change="formClass.StudentClass.impl.onPageSizeChange">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form ref="formClass" :model="formData" class="full-width-input" style="width: 100%;"
|
||||
label-width="100px" size="mini" label-position="right" @submit.native.prevent>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-card class="base-card" shadow="never">
|
||||
<div slot="header" class="base-card-header">
|
||||
<span>班级列表</span>
|
||||
<div class="base-card-operation">
|
||||
<el-button @click="onFormCreateClassClick()" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:formCreateClass')">
|
||||
新建
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-scrollbar class="custom-scroll" style="height: calc(620px - 50px);">
|
||||
<el-row :gutter="20">
|
||||
<el-col class="table-box" :span="24">
|
||||
<el-table ref="StudentClass" :data="formClass.StudentClass.impl.dataList" size="mini" @sort-change="formClass.StudentClass.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray"
|
||||
highlight-current-row @current-change="formClass.StudentClass.impl.currentRowChange">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formClass.StudentClass.impl.getTableIndex" />
|
||||
<el-table-column label="班级名称" prop="className">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属校区" prop="schoolIdDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="createTime" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
<span>{{formatDateByStatsType(scope.row.createTime, 'day')}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click.stop="onFormEditClassClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:formEditClass')">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button @click.stop="onDeleteClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:delete')">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row type="flex" justify="end" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:total="formClass.StudentClass.impl.totalCount"
|
||||
:current-page="formClass.StudentClass.impl.currentPage"
|
||||
:page-size="formClass.StudentClass.impl.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, prev, pager, next, sizes"
|
||||
@current-change="formClass.StudentClass.impl.onCurrentPageChange"
|
||||
@size-change="formClass.StudentClass.impl.onPageSizeChange">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-scrollbar>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-row class="no-scroll" :gutter="20">
|
||||
<el-col :span="24" class="gutter-bottom">
|
||||
<el-card class="base-card" shadow="never">
|
||||
<div slot="header" class="base-card-header">
|
||||
<span>班级课程</span>
|
||||
<div class="base-card-operation">
|
||||
<el-button @click="onFormSetClassCourseClick()" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:formSetClassCourse') || !formSetClassCourseEnabled">
|
||||
设置班级课程
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-scrollbar class="custom-scroll" style="height: calc(300px - 50px);">
|
||||
<el-row :gutter="20">
|
||||
<el-col class="table-box" :span="24">
|
||||
<el-table ref="Course" :data="formClass.Course.impl.dataList" size="mini" @sort-change="formClass.Course.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formClass.Course.impl.getTableIndex" />
|
||||
<el-table-column label="课程名称" prop="courseName">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属年级" prop="gradeIdDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="课程顺序" prop="classCourse.courseOrder" sortable="custom">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click.stop="onDeleteClassCourseClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:deleteClassCourse') || !deleteClassCourseEnabled">
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row type="flex" justify="end" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:total="formClass.Course.impl.totalCount"
|
||||
:current-page="formClass.Course.impl.currentPage"
|
||||
:page-size="formClass.Course.impl.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, prev, pager, next, sizes"
|
||||
@current-change="formClass.Course.impl.onCurrentPageChange"
|
||||
@size-change="formClass.Course.impl.onPageSizeChange">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-scrollbar>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-card class="base-card" shadow="never">
|
||||
<div slot="header" class="base-card-header">
|
||||
<span>班级学生</span>
|
||||
<div class="base-card-operation">
|
||||
<el-button @click="onFormSetClassStudentClick()" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:formSetClassStudent') || !formSetClassStudentEnabled">
|
||||
设置班级学生
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-scrollbar class="custom-scroll" style="height: calc(300px - 50px);">
|
||||
<el-row :gutter="20">
|
||||
<el-col class="table-box" :span="24">
|
||||
<el-table ref="Student" :data="formClass.Student.impl.dataList" size="mini" @sort-change="formClass.Student.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formClass.Student.impl.getTableIndex" />
|
||||
<el-table-column label="学生姓名" prop="studentName">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属年级" prop="gradeIdDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属校区" prop="schoolIdDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click.stop="onDeleteClassStudentClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClass:formClass:deleteClassStudent') || !deleteClassStudentEnabled">
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row type="flex" justify="end" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:total="formClass.Student.impl.totalCount"
|
||||
:current-page="formClass.Student.impl.currentPage"
|
||||
:page-size="formClass.Student.impl.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, prev, pager, next, sizes"
|
||||
@current-change="formClass.Student.impl.onCurrentPageChange"
|
||||
@size-change="formClass.Student.impl.onPageSizeChange">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-scrollbar>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* eslint-disable-next-line */
|
||||
import { findTreeNodePath, findItemFromList } from '@/utils';
|
||||
/* eslint-disable-next-line */
|
||||
import rules from '@/utils/validate.js';
|
||||
/* eslint-disable-next-line */
|
||||
import { DropdownWidget, TableWidget, UploadWidget, ChartWidget } from '@/utils/widget.js';
|
||||
@@ -103,25 +202,61 @@ export default {
|
||||
mixins: [uploadMixin, statsDateRangeMixin, cachePageMixin],
|
||||
data () {
|
||||
return {
|
||||
formData: {
|
||||
StudentClass: {
|
||||
classId: undefined,
|
||||
className: undefined,
|
||||
schoolId: undefined,
|
||||
leaderId: undefined,
|
||||
finishClassHour: undefined,
|
||||
classLevel: undefined,
|
||||
createUserId: undefined,
|
||||
createTime: undefined,
|
||||
status: undefined,
|
||||
course: {
|
||||
classCourse: {
|
||||
classId: undefined,
|
||||
courseId: undefined,
|
||||
courseOrder: undefined
|
||||
}
|
||||
},
|
||||
student: {
|
||||
},
|
||||
isDatasourceInit: false
|
||||
}
|
||||
},
|
||||
formClass: {
|
||||
formFilter: {
|
||||
schoolId: undefined,
|
||||
classLevel: undefined,
|
||||
className: undefined
|
||||
},
|
||||
formFilterCopy: {
|
||||
schoolId: undefined,
|
||||
classLevel: undefined,
|
||||
className: undefined
|
||||
},
|
||||
schoolId: {
|
||||
impl: new DropdownWidget(this.loadSchoolIdDropdownList)
|
||||
},
|
||||
classLevel: {
|
||||
impl: new DropdownWidget(this.loadClassLevelDropdownList)
|
||||
classCourseCard: {
|
||||
isInit: false
|
||||
},
|
||||
StudentClass: {
|
||||
impl: new TableWidget(this.loadStudentClassData, this.loadStudentClassVerify, true, 'createTime', 1)
|
||||
impl: new TableWidget(this.loadStudentClassData, this.loadStudentClassVerify, true, true, 'createTime', 1)
|
||||
},
|
||||
Course: {
|
||||
impl: new TableWidget(this.loadCourseData, this.loadCourseVerify, true, false, 'createTime', 1)
|
||||
},
|
||||
Student: {
|
||||
impl: new TableWidget(this.loadStudentData, this.loadStudentVerify, true, false)
|
||||
},
|
||||
classStudentCard: {
|
||||
isInit: false
|
||||
},
|
||||
classCard: {
|
||||
isInit: false
|
||||
},
|
||||
classInfo: {
|
||||
isInit: false
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
@@ -129,7 +264,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 班级数据数据获取函数,返回Primise
|
||||
* 班级数据数据获取函数,返回Promise
|
||||
*/
|
||||
loadStudentClassData (params) {
|
||||
if (params == null) params = {};
|
||||
@@ -137,8 +272,7 @@ export default {
|
||||
...params,
|
||||
studentClassFilter: {
|
||||
className: this.formClass.formFilterCopy.className,
|
||||
schoolId: this.formClass.formFilterCopy.schoolId,
|
||||
classLevel: this.formClass.formFilterCopy.classLevel
|
||||
schoolId: this.formClass.formFilterCopy.schoolId
|
||||
}
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -147,6 +281,13 @@ export default {
|
||||
dataList: res.data.dataList,
|
||||
totalCount: res.data.totalCount
|
||||
});
|
||||
// 恢复当前选择行
|
||||
if (this.formClass.StudentClass.impl.currentRow !== null) {
|
||||
this.$nextTick(() => {
|
||||
let currentRow = findItemFromList(res.data.dataList, this.formClass.StudentClass.impl.currentRow.classId, 'classId');
|
||||
this.$refs.studentClass.setCurrentRow(currentRow);
|
||||
});
|
||||
}
|
||||
}).catch(e => {
|
||||
reject(e);
|
||||
});
|
||||
@@ -158,7 +299,66 @@ export default {
|
||||
loadStudentClassVerify () {
|
||||
this.formClass.formFilterCopy.className = this.formClass.formFilter.className;
|
||||
this.formClass.formFilterCopy.schoolId = this.formClass.formFilter.schoolId;
|
||||
this.formClass.formFilterCopy.classLevel = this.formClass.formFilter.classLevel;
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* 班级课程数据获取函数,返回Promise
|
||||
*/
|
||||
loadCourseData (params) {
|
||||
if (this.formClass.StudentClass.impl.currentRow == null) {
|
||||
this.formAdvanceClass.Course.impl.clearTable();
|
||||
return Promise.reject();
|
||||
}
|
||||
if (params == null) params = {};
|
||||
params = {
|
||||
...params,
|
||||
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
StudentClassController.listClassCourse(this, params).then(res => {
|
||||
resolve({
|
||||
dataList: res.data.dataList,
|
||||
totalCount: res.data.totalCount
|
||||
});
|
||||
}).catch(e => {
|
||||
reject(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 班级课程数据获取检测函数,返回true正常获取数据,返回false停止获取数据
|
||||
*/
|
||||
loadCourseVerify () {
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* 班级学生数据获取函数,返回Promise
|
||||
*/
|
||||
loadStudentData (params) {
|
||||
if (this.formClass.StudentClass.impl.currentRow == null) {
|
||||
this.formAdvanceClass.Student.impl.clearTable();
|
||||
return Promise.reject();
|
||||
}
|
||||
if (params == null) params = {};
|
||||
params = {
|
||||
...params,
|
||||
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
StudentClassController.listClassStudent(this, params).then(res => {
|
||||
resolve({
|
||||
dataList: res.data.dataList,
|
||||
totalCount: res.data.totalCount
|
||||
});
|
||||
}).catch(e => {
|
||||
reject(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 班级学生数据获取检测函数,返回true正常获取数据,返回false停止获取数据
|
||||
*/
|
||||
loadStudentVerify () {
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
@@ -180,22 +380,40 @@ export default {
|
||||
onSchoolIdValueChange (value) {
|
||||
},
|
||||
/**
|
||||
* 班级级别下拉数据获取函数
|
||||
* 更新班级课程
|
||||
*/
|
||||
loadClassLevelDropdownList () {
|
||||
return new Promise((resolve, reject) => {
|
||||
let params = {};
|
||||
DictionaryController.dictClassLevel(this, params).then(res => {
|
||||
resolve(res.getList());
|
||||
}).catch(e => {
|
||||
reject(e);
|
||||
});
|
||||
});
|
||||
refreshClassCourseCard (reloadData = false) {
|
||||
// 更新容器下所有的数据组件
|
||||
if (reloadData) {
|
||||
this.formClass.Course.impl.refreshTable(true, 1);
|
||||
} else {
|
||||
this.formClass.Course.impl.refreshTable();
|
||||
}
|
||||
this.formClass.classCourseCard.isInit = true;
|
||||
},
|
||||
/**
|
||||
* 班级级别选中值改变
|
||||
* 更新班级学生
|
||||
*/
|
||||
onClassLevelValueChange (value) {
|
||||
refreshClassStudentCard (reloadData = false) {
|
||||
// 更新容器下所有的数据组件
|
||||
if (reloadData) {
|
||||
this.formClass.Student.impl.refreshTable(true, 1);
|
||||
} else {
|
||||
this.formClass.Student.impl.refreshTable();
|
||||
}
|
||||
this.formClass.classStudentCard.isInit = true;
|
||||
},
|
||||
/**
|
||||
* 更新班级列表
|
||||
*/
|
||||
refreshClassCard (reloadData = false) {
|
||||
// 更新容器下所有的数据组件
|
||||
if (reloadData) {
|
||||
this.formClass.StudentClass.impl.refreshTable(true, 1);
|
||||
} else {
|
||||
this.formClass.StudentClass.impl.refreshTable();
|
||||
}
|
||||
this.formClass.classCard.isInit = true;
|
||||
},
|
||||
/**
|
||||
* 更新班级管理
|
||||
@@ -206,23 +424,21 @@ export default {
|
||||
} else {
|
||||
this.formClass.StudentClass.impl.refreshTable();
|
||||
}
|
||||
if (reloadData) {
|
||||
this.formClass.Course.impl.refreshTable(true, 1);
|
||||
} else {
|
||||
this.formClass.Course.impl.refreshTable();
|
||||
}
|
||||
if (reloadData) {
|
||||
this.formClass.Student.impl.refreshTable(true, 1);
|
||||
} else {
|
||||
this.formClass.Student.impl.refreshTable();
|
||||
}
|
||||
if (!this.formClass.isInit) {
|
||||
// 初始化下拉数据
|
||||
}
|
||||
this.formClass.isInit = true;
|
||||
},
|
||||
/**
|
||||
* 新建
|
||||
*/
|
||||
onFormCreateClassClick () {
|
||||
let params = {};
|
||||
|
||||
this.$dialog.show('新建', formCreateClass, {
|
||||
area: ['800px']
|
||||
}, params).then(res => {
|
||||
this.refreshFormClass();
|
||||
}).catch(e => {});
|
||||
},
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@@ -237,28 +453,6 @@ export default {
|
||||
this.formClass.StudentClass.impl.refreshTable();
|
||||
}).catch(e => {});
|
||||
},
|
||||
/**
|
||||
* 学生
|
||||
*/
|
||||
onFormClassStudentClick (row) {
|
||||
let params = {
|
||||
classId: row.classId
|
||||
};
|
||||
|
||||
params.closeVisible = 1;
|
||||
this.$router.push({name: 'formClassStudent', query: params});
|
||||
},
|
||||
/**
|
||||
* 课程
|
||||
*/
|
||||
onFormClassCourseClick (row) {
|
||||
let params = {
|
||||
classId: row.classId
|
||||
};
|
||||
|
||||
params.closeVisible = 1;
|
||||
this.$router.push({name: 'formClassCourse', query: params});
|
||||
},
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@@ -274,8 +468,74 @@ export default {
|
||||
}).catch(e => {});
|
||||
}).catch(e => {});
|
||||
},
|
||||
/**
|
||||
* 移除
|
||||
*/
|
||||
onDeleteClassCourseClick (row) {
|
||||
let params = {
|
||||
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId,
|
||||
courseId: row.courseId
|
||||
};
|
||||
|
||||
this.$confirm('是否从班级中移除此课程?').then(res => {
|
||||
StudentClassController.deleteClassCourse(this, params).then(res => {
|
||||
this.$message.success('移除成功');
|
||||
this.formClass.Course.impl.refreshTable();
|
||||
}).catch(e => {});
|
||||
}).catch(e => {});
|
||||
},
|
||||
/**
|
||||
* 移除
|
||||
*/
|
||||
onDeleteClassStudentClick (row) {
|
||||
let params = {
|
||||
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId,
|
||||
studentId: row.studentId
|
||||
};
|
||||
|
||||
this.$confirm('是否从班级中移除此学生?').then(res => {
|
||||
StudentClassController.deleteClassStudent(this, params).then(res => {
|
||||
this.$message.success('移除成功');
|
||||
this.formClass.Student.impl.refreshTable();
|
||||
}).catch(e => {});
|
||||
}).catch(e => {});
|
||||
},
|
||||
/**
|
||||
* 设置班级学生
|
||||
*/
|
||||
onFormSetClassStudentClick () {
|
||||
let params = {
|
||||
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId
|
||||
};
|
||||
|
||||
params.closeVisible = 1;
|
||||
this.$router.push({name: 'formSetClassStudent', query: params});
|
||||
},
|
||||
/**
|
||||
* 设置班级课程
|
||||
*/
|
||||
onFormSetClassCourseClick () {
|
||||
let params = {
|
||||
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId
|
||||
};
|
||||
|
||||
params.closeVisible = 1;
|
||||
this.$router.push({name: 'formSetClassCourse', query: params});
|
||||
},
|
||||
/**
|
||||
* 新建
|
||||
*/
|
||||
onFormCreateClassClick () {
|
||||
let params = {};
|
||||
|
||||
this.$dialog.show('新建', formCreateClass, {
|
||||
area: ['800px']
|
||||
}, params).then(res => {
|
||||
this.refreshClassCard();
|
||||
}).catch(e => {});
|
||||
},
|
||||
onResume () {
|
||||
this.refreshFormClass();
|
||||
this.refreshFormClass(true);
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
@@ -283,8 +543,32 @@ export default {
|
||||
this.refreshFormClass();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
deleteClassCourseEnabled () {
|
||||
return this.formClass.StudentClass.impl.currentRow != null;
|
||||
},
|
||||
deleteClassStudentEnabled () {
|
||||
return this.formClass.StudentClass.impl.currentRow != null;
|
||||
},
|
||||
formSetClassStudentEnabled () {
|
||||
return this.formClass.StudentClass.impl.currentRow != null;
|
||||
},
|
||||
formSetClassCourseEnabled () {
|
||||
return this.formClass.StudentClass.impl.currentRow != null;
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
// 班级数据选择行数据变化
|
||||
'formClass.StudentClass.impl.currentRow': {
|
||||
handler (newValue) {
|
||||
this.formClass.Course.impl.refreshTable(true, 1);
|
||||
this.formClass.Student.impl.refreshTable(true, 1);
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
<template>
|
||||
<div style="position: relative;">
|
||||
<el-form label-width="100px" size="mini" label-position="right" @submit.native.prevent>
|
||||
<filter-box :item-width="350">
|
||||
<el-button slot="operator" type="primary" size="mini" :disabled="!checkPermCodeExist('formClassCourse:formClassCourse:formSetClassCourse')"
|
||||
@click="onFormSetClassCourseClick()">
|
||||
设置班级课程
|
||||
</el-button>
|
||||
</filter-box>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="formClassCourse.Course.impl.dataList" size="mini" @sort-change="formClassCourse.Course.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formClassCourse.Course.impl.getTableIndex" />
|
||||
<el-table-column label="课程名称" prop="courseName">
|
||||
</el-table-column>
|
||||
<el-table-column label="课程难度" prop="difficultyDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属年级" prop="gradeIdDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属学科" prop="subjectIdDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="课时数量" prop="classHour">
|
||||
</el-table-column>
|
||||
<el-table-column label="课程图片" min-width="180px">
|
||||
<template slot-scope="scope">
|
||||
<el-image v-for="item in parseUploadData(scope.row.pictureUrl, {courseId: scope.row.courseId, fieldName: 'pictureUrl', asImage: true})"
|
||||
:preview-src-list="getPictureList(scope.row.pictureUrl, {courseId: scope.row.courseId, fieldName: 'pictureUrl', asImage: true})"
|
||||
class="table-cell-image" :key="item.url" :src="item.url" fit="fill">
|
||||
<div slot="error" class="table-cell-image">
|
||||
<i class="el-icon-picture-outline"></i>
|
||||
</div>
|
||||
</el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="onFormEditClassCourseOrderClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClassCourse:formClassCourse:formEditClassCourseOrder')">
|
||||
课程顺序
|
||||
</el-button>
|
||||
<el-button @click="onDeleteClassCourseClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClassCourse:formClassCourse:deleteClassCourse')">
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row type="flex" justify="end" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:total="formClassCourse.Course.impl.totalCount"
|
||||
:current-page="formClassCourse.Course.impl.currentPage"
|
||||
:page-size="formClassCourse.Course.impl.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, prev, pager, next, sizes"
|
||||
@current-change="formClassCourse.Course.impl.onCurrentPageChange"
|
||||
@size-change="formClassCourse.Course.impl.onPageSizeChange">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<label v-if="closeVisible == '1'" class="page-close-box">
|
||||
<el-button type="text" @click="onCancel(true)" icon="el-icon-close" />
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* eslint-disable-next-line */
|
||||
import rules from '@/utils/validate.js';
|
||||
/* eslint-disable-next-line */
|
||||
import { DropdownWidget, TableWidget, UploadWidget, ChartWidget } from '@/utils/widget.js';
|
||||
/* eslint-disable-next-line */
|
||||
import { uploadMixin, statsDateRangeMixin, cachePageMixin, cachedPageChildMixin } from '@/core/mixins';
|
||||
/* eslint-disable-next-line */
|
||||
import { StudentClassController, DictionaryController } from '@/api';
|
||||
import formEditClassCourseOrder from '@/views/generated/formEditClassCourseOrder';
|
||||
|
||||
export default {
|
||||
name: 'formClassCourse',
|
||||
props: {
|
||||
classId: {
|
||||
default: undefined
|
||||
},
|
||||
closeVisible: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
mixins: [uploadMixin, statsDateRangeMixin, cachePageMixin, cachedPageChildMixin],
|
||||
data () {
|
||||
return {
|
||||
formClassCourse: {
|
||||
formFilter: {
|
||||
},
|
||||
formFilterCopy: {
|
||||
},
|
||||
Course: {
|
||||
impl: new TableWidget(this.loadCourseData, this.loadCourseVerify, true)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onCancel (isSuccess) {
|
||||
this.removeCachePage(this.$options.name);
|
||||
this.refreshParentCachedPage = isSuccess;
|
||||
this.$router.go(-1);
|
||||
},
|
||||
/**
|
||||
* 班级课程数据获取函数,返回Primise
|
||||
*/
|
||||
loadCourseData (params) {
|
||||
if (params == null) params = {};
|
||||
params = {
|
||||
...params,
|
||||
classId: this.classId
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
StudentClassController.listClassCourse(this, params).then(res => {
|
||||
resolve({
|
||||
dataList: res.data.dataList,
|
||||
totalCount: res.data.totalCount
|
||||
});
|
||||
}).catch(e => {
|
||||
reject(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 班级课程数据获取检测函数,返回true正常获取数据,返回false停止获取数据
|
||||
*/
|
||||
loadCourseVerify () {
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* 更新班级课程
|
||||
*/
|
||||
refreshFormClassCourse (reloadData = false) {
|
||||
if (reloadData) {
|
||||
this.formClassCourse.Course.impl.refreshTable(true, 1);
|
||||
} else {
|
||||
this.formClassCourse.Course.impl.refreshTable();
|
||||
}
|
||||
if (!this.formClassCourse.isInit) {
|
||||
// 初始化下拉数据
|
||||
}
|
||||
this.formClassCourse.isInit = true;
|
||||
},
|
||||
/**
|
||||
* 设置班级课程
|
||||
*/
|
||||
onFormSetClassCourseClick () {
|
||||
let params = {
|
||||
classId: this.classId
|
||||
};
|
||||
|
||||
params.closeVisible = 1;
|
||||
this.$router.push({name: 'formSetClassCourse', query: params});
|
||||
},
|
||||
/**
|
||||
* 课程顺序
|
||||
*/
|
||||
onFormEditClassCourseOrderClick (row) {
|
||||
let params = {
|
||||
classId: this.classId,
|
||||
courseId: row.courseId
|
||||
};
|
||||
|
||||
this.$dialog.show('课程顺序', formEditClassCourseOrder, {
|
||||
area: ['400px']
|
||||
}, params).then(res => {
|
||||
this.formClassCourse.Course.impl.refreshTable();
|
||||
}).catch(e => {});
|
||||
},
|
||||
/**
|
||||
* 移除
|
||||
*/
|
||||
onDeleteClassCourseClick (row) {
|
||||
let params = {
|
||||
classId: this.classId,
|
||||
courseId: row.courseId
|
||||
};
|
||||
|
||||
this.$confirm('是否从班级中移除此课程?').then(res => {
|
||||
StudentClassController.deleteClassCourse(this, params).then(res => {
|
||||
this.$message.success('移除成功');
|
||||
this.formClassCourse.Course.impl.refreshTable();
|
||||
}).catch(e => {});
|
||||
}).catch(e => {});
|
||||
},
|
||||
onResume () {
|
||||
this.refreshFormClassCourse();
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormClassCourse();
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,181 +0,0 @@
|
||||
<template>
|
||||
<div style="position: relative;">
|
||||
<el-form label-width="100px" size="mini" label-position="right" @submit.native.prevent>
|
||||
<filter-box :item-width="350">
|
||||
<el-button slot="operator" type="primary" size="mini" :disabled="!checkPermCodeExist('formClassStudent:formClassStudent:formSetClassStudent')"
|
||||
@click="onFormSetClassStudentClick()">
|
||||
设置班级学生
|
||||
</el-button>
|
||||
</filter-box>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="formClassStudent.Student.impl.dataList" size="mini" @sort-change="formClassStudent.Student.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formClassStudent.Student.impl.getTableIndex" />
|
||||
<el-table-column label="学生姓名" prop="studentName">
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号码" prop="loginMobile">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属校区" prop="schoolIdDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属年级" prop="gradeIdDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="经验等级" prop="experienceLevelDictMap.name">
|
||||
</el-table-column>
|
||||
<el-table-column label="注册时间" prop="registerTime">
|
||||
<template slot-scope="scope">
|
||||
<span>{{formatDateByStatsType(scope.row.registerTime, 'day')}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="onDeleteClassStudentClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formClassStudent:formClassStudent:deleteClassStudent')">
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row type="flex" justify="end" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:total="formClassStudent.Student.impl.totalCount"
|
||||
:current-page="formClassStudent.Student.impl.currentPage"
|
||||
:page-size="formClassStudent.Student.impl.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
layout="total, prev, pager, next, sizes"
|
||||
@current-change="formClassStudent.Student.impl.onCurrentPageChange"
|
||||
@size-change="formClassStudent.Student.impl.onPageSizeChange">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<label v-if="closeVisible == '1'" class="page-close-box">
|
||||
<el-button type="text" @click="onCancel(true)" icon="el-icon-close" />
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* eslint-disable-next-line */
|
||||
import rules from '@/utils/validate.js';
|
||||
/* eslint-disable-next-line */
|
||||
import { DropdownWidget, TableWidget, UploadWidget, ChartWidget } from '@/utils/widget.js';
|
||||
/* eslint-disable-next-line */
|
||||
import { uploadMixin, statsDateRangeMixin, cachePageMixin, cachedPageChildMixin } from '@/core/mixins';
|
||||
/* eslint-disable-next-line */
|
||||
import { StudentClassController, DictionaryController } from '@/api';
|
||||
|
||||
export default {
|
||||
name: 'formClassStudent',
|
||||
props: {
|
||||
classId: {
|
||||
default: undefined
|
||||
},
|
||||
closeVisible: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
mixins: [uploadMixin, statsDateRangeMixin, cachePageMixin, cachedPageChildMixin],
|
||||
data () {
|
||||
return {
|
||||
formClassStudent: {
|
||||
formFilter: {
|
||||
},
|
||||
formFilterCopy: {
|
||||
},
|
||||
Student: {
|
||||
impl: new TableWidget(this.loadStudentData, this.loadStudentVerify, true)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onCancel (isSuccess) {
|
||||
this.removeCachePage(this.$options.name);
|
||||
this.refreshParentCachedPage = isSuccess;
|
||||
this.$router.go(-1);
|
||||
},
|
||||
/**
|
||||
* 班级学生数据获取函数,返回Primise
|
||||
*/
|
||||
loadStudentData (params) {
|
||||
if (params == null) params = {};
|
||||
params = {
|
||||
...params,
|
||||
classId: this.classId
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
StudentClassController.listClassStudent(this, params).then(res => {
|
||||
resolve({
|
||||
dataList: res.data.dataList,
|
||||
totalCount: res.data.totalCount
|
||||
});
|
||||
}).catch(e => {
|
||||
reject(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 班级学生数据获取检测函数,返回true正常获取数据,返回false停止获取数据
|
||||
*/
|
||||
loadStudentVerify () {
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
* 更新班级学生
|
||||
*/
|
||||
refreshFormClassStudent (reloadData = false) {
|
||||
if (reloadData) {
|
||||
this.formClassStudent.Student.impl.refreshTable(true, 1);
|
||||
} else {
|
||||
this.formClassStudent.Student.impl.refreshTable();
|
||||
}
|
||||
if (!this.formClassStudent.isInit) {
|
||||
// 初始化下拉数据
|
||||
}
|
||||
this.formClassStudent.isInit = true;
|
||||
},
|
||||
/**
|
||||
* 设置班级学生
|
||||
*/
|
||||
onFormSetClassStudentClick () {
|
||||
let params = {
|
||||
classId: this.classId
|
||||
};
|
||||
|
||||
params.closeVisible = 1;
|
||||
this.$router.push({name: 'formSetClassStudent', query: params});
|
||||
},
|
||||
/**
|
||||
* 移除
|
||||
*/
|
||||
onDeleteClassStudentClick (row) {
|
||||
let params = {
|
||||
classId: this.classId,
|
||||
studentId: row.studentId
|
||||
};
|
||||
|
||||
this.$confirm('是否从课程中移除此学生?').then(res => {
|
||||
StudentClassController.deleteClassStudent(this, params).then(res => {
|
||||
this.$message.success('移除成功');
|
||||
this.formClassStudent.Student.impl.refreshTable();
|
||||
}).catch(e => {});
|
||||
}).catch(e => {});
|
||||
},
|
||||
onResume () {
|
||||
this.refreshFormClassStudent();
|
||||
},
|
||||
initFormData () {
|
||||
},
|
||||
formInit () {
|
||||
this.refreshFormClassStudent();
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -39,7 +39,7 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="formCourse.Course.impl.dataList" size="mini" @sort-change="formCourse.Course.impl.onSortChange"
|
||||
<el-table ref="Course" :data="formCourse.Course.impl.dataList" size="mini" @sort-change="formCourse.Course.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formCourse.Course.impl.getTableIndex" />
|
||||
<el-table-column label="课程名称" prop="courseName">
|
||||
@@ -72,11 +72,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="onFormEditCourseClick(scope.row)" type="text" size="mini"
|
||||
<el-button @click.stop="onFormEditCourseClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formCourse:formCourse:formEditCourse')">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button @click="onDeleteClick(scope.row)" type="text" size="mini"
|
||||
<el-button @click.stop="onDeleteClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formCourse:formCourse:delete')">
|
||||
删除
|
||||
</el-button>
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadDifficultyDropdownList)
|
||||
},
|
||||
Course: {
|
||||
impl: new TableWidget(this.loadCourseData, this.loadCourseVerify, true, 'createTime', 1)
|
||||
impl: new TableWidget(this.loadCourseData, this.loadCourseVerify, true, false, 'createTime', 1)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
@@ -149,7 +149,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 课程数据数据获取函数,返回Primise
|
||||
* 课程数据数据获取函数,返回Promise
|
||||
*/
|
||||
loadCourseData (params) {
|
||||
if (params == null) params = {};
|
||||
@@ -303,6 +303,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
label-width="100px" size="mini" label-position="right" @submit.native.prevent>
|
||||
<el-row :gutter="20">
|
||||
<el-col class="table-box" :span="12">
|
||||
<el-card class="base-card mb20" style="height: 350px" shadow="never" :body-style="{padding: '0px'}">
|
||||
<el-card class="base-card gutter-bottom" style="height: 350px" shadow="never" :body-style="{padding: '0px'}">
|
||||
<div slot="header" class="base-card-header">
|
||||
<span>课程统计(年级)</span>
|
||||
<div class="base-card-operation">
|
||||
@@ -32,7 +32,7 @@
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col class="table-box" :span="12">
|
||||
<el-card class="base-card mb20" style="height: 350px" shadow="never" :body-style="{padding: '0px'}">
|
||||
<el-card class="base-card gutter-bottom" style="height: 350px" shadow="never" :body-style="{padding: '0px'}">
|
||||
<div slot="header" class="base-card-header">
|
||||
<span>课程统计(学科)</span>
|
||||
<div class="base-card-operation">
|
||||
@@ -159,7 +159,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 课程统计(年级)数据获取函数,返回Primise
|
||||
* 课程统计(年级)数据获取函数,返回Promise
|
||||
*/
|
||||
loadCourseStatsByGradeIdData () {
|
||||
let params = {
|
||||
@@ -201,7 +201,7 @@ export default {
|
||||
this.formCourseStats.courseStatsByGradeId.impl.chartObject = echarts;
|
||||
},
|
||||
/**
|
||||
* 课程统计(学科)数据获取函数,返回Primise
|
||||
* 课程统计(学科)数据获取函数,返回Promise
|
||||
*/
|
||||
loadCourseStatsBySubjectData () {
|
||||
let params = {
|
||||
@@ -243,7 +243,7 @@ export default {
|
||||
this.formCourseStats.courseStatsBySubject.impl.chartObject = echarts;
|
||||
},
|
||||
/**
|
||||
* 课程流水统计数据获取函数,返回Primise
|
||||
* 课程流水统计数据获取函数,返回Promise
|
||||
*/
|
||||
loadCourseTransStatsData () {
|
||||
let params = {
|
||||
@@ -309,6 +309,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -249,6 +249,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -305,6 +305,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -192,6 +192,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -424,6 +424,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -278,6 +278,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -152,6 +152,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -340,6 +340,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -220,6 +220,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -514,6 +514,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="formSchool.SchoolInfo.impl.dataList" size="mini" @sort-change="formSchool.SchoolInfo.impl.onSortChange"
|
||||
<el-table ref="SchoolInfo" :data="formSchool.SchoolInfo.impl.dataList" size="mini" @sort-change="formSchool.SchoolInfo.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formSchool.SchoolInfo.impl.getTableIndex" />
|
||||
<el-table-column label="学校名称" prop="schoolName">
|
||||
@@ -42,11 +42,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="onFormEditSchoolClick(scope.row)" type="text" size="mini"
|
||||
<el-button @click.stop="onFormEditSchoolClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formSchool:formSchool:formEditSchool')">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button @click="onDeleteClick(scope.row)" type="text" size="mini"
|
||||
<el-button @click.stop="onDeleteClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formSchool:formSchool:delete')">
|
||||
删除
|
||||
</el-button>
|
||||
@@ -106,7 +106,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadCityIdDropdownList)
|
||||
},
|
||||
SchoolInfo: {
|
||||
impl: new TableWidget(this.loadSchoolInfoData, this.loadSchoolInfoVerify, true)
|
||||
impl: new TableWidget(this.loadSchoolInfoData, this.loadSchoolInfoVerify, true, false)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 校区数据数据获取函数,返回Primise
|
||||
* 校区数据数据获取函数,返回Promise
|
||||
*/
|
||||
loadSchoolInfoData (params) {
|
||||
if (params == null) params = {};
|
||||
@@ -258,6 +258,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadDifficultyDropdownList)
|
||||
},
|
||||
Course: {
|
||||
impl: new TableWidget(this.loadCourseData, this.loadCourseVerify, true)
|
||||
impl: new TableWidget(this.loadCourseData, this.loadCourseVerify, true, false)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
@@ -144,7 +144,7 @@ export default {
|
||||
this.tableSelectRowList = values;
|
||||
},
|
||||
/**
|
||||
* 班级课程数据获取函数,返回Primise
|
||||
* 班级课程数据获取函数,返回Promise
|
||||
*/
|
||||
loadCourseData (params) {
|
||||
if (params == null) params = {};
|
||||
@@ -276,6 +276,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -96,7 +96,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadSchoolIdDropdownList)
|
||||
},
|
||||
Student: {
|
||||
impl: new TableWidget(this.loadStudentData, this.loadStudentVerify, true)
|
||||
impl: new TableWidget(this.loadStudentData, this.loadStudentVerify, true, false)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
@@ -112,7 +112,7 @@ export default {
|
||||
this.tableSelectRowList = values;
|
||||
},
|
||||
/**
|
||||
* 班级学生数据获取函数,返回Primise
|
||||
* 班级学生数据获取函数,返回Promise
|
||||
*/
|
||||
loadStudentData (params) {
|
||||
if (params == null) params = {};
|
||||
@@ -202,6 +202,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="formStudent.Student.impl.dataList" size="mini" @sort-change="formStudent.Student.impl.onSortChange"
|
||||
<el-table ref="Student" :data="formStudent.Student.impl.dataList" size="mini" @sort-change="formStudent.Student.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formStudent.Student.impl.getTableIndex" />
|
||||
<el-table-column label="学生姓名" prop="studentName">
|
||||
@@ -64,11 +64,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="onFormEditStudentClick(scope.row)" type="text" size="mini"
|
||||
<el-button @click.stop="onFormEditStudentClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formStudent:formStudent:formEditStudent')">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button @click="onDeleteClick(scope.row)" type="text" size="mini"
|
||||
<el-button @click.stop="onDeleteClick(scope.row)" type="text" size="mini"
|
||||
:disabled="!checkPermCodeExist('formStudent:formStudent:delete')">
|
||||
删除
|
||||
</el-button>
|
||||
@@ -133,7 +133,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadGradeIdDropdownList)
|
||||
},
|
||||
Student: {
|
||||
impl: new TableWidget(this.loadStudentData, this.loadStudentVerify, true, 'registerTime', 1)
|
||||
impl: new TableWidget(this.loadStudentData, this.loadStudentVerify, true, false, 'registerTime', 1)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 学生数据数据获取函数,返回Primise
|
||||
* 学生数据数据获取函数,返回Promise
|
||||
*/
|
||||
loadStudentData (params) {
|
||||
if (params == null) params = {};
|
||||
@@ -291,6 +291,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="formStudentActionDetail.StudentActionTrans.impl.dataList" size="mini" @sort-change="formStudentActionDetail.StudentActionTrans.impl.onSortChange"
|
||||
<el-table ref="StudentActionTrans" :data="formStudentActionDetail.StudentActionTrans.impl.dataList" size="mini" @sort-change="formStudentActionDetail.StudentActionTrans.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formStudentActionDetail.StudentActionTrans.impl.getTableIndex" />
|
||||
<el-table-column label="学生名称" prop="studentName">
|
||||
@@ -126,7 +126,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadActionTypeDropdownList)
|
||||
},
|
||||
StudentActionTrans: {
|
||||
impl: new TableWidget(this.loadStudentActionTransData, this.loadStudentActionTransVerify, true, 'createTime', 1)
|
||||
impl: new TableWidget(this.loadStudentActionTransData, this.loadStudentActionTransVerify, true, false, 'createTime', 1)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
@@ -139,7 +139,7 @@ export default {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
/**
|
||||
* 学生行为流水数据获取函数,返回Primise
|
||||
* 学生行为流水数据获取函数,返回Promise
|
||||
*/
|
||||
loadStudentActionTransData (params) {
|
||||
if (params == null) params = {};
|
||||
@@ -235,6 +235,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="formStudentActionStats.StudentActionStats.impl.dataList" size="mini" @sort-change="formStudentActionStats.StudentActionStats.impl.onSortChange"
|
||||
<el-table ref="StudentActionStats" :data="formStudentActionStats.StudentActionStats.impl.dataList" size="mini" @sort-change="formStudentActionStats.StudentActionStats.impl.onSortChange"
|
||||
header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="序号" header-align="center" align="center" type="index" width="55px" :index="formStudentActionStats.StudentActionStats.impl.getTableIndex" />
|
||||
<el-table-column label="统计日期">
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadGradeIdDropdownList)
|
||||
},
|
||||
StudentActionStats: {
|
||||
impl: new TableWidget(this.loadStudentActionStatsData, this.loadStudentActionStatsVerify, true, 'statsDate', 1)
|
||||
impl: new TableWidget(this.loadStudentActionStatsData, this.loadStudentActionStatsVerify, true, false, 'statsDate', 1)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 学生行为统计数据获取函数,返回Primise
|
||||
* 学生行为统计数据获取函数,返回Promise
|
||||
*/
|
||||
loadStudentActionStatsData (params) {
|
||||
if (params == null) params = {};
|
||||
@@ -310,6 +310,8 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.formInit();
|
||||
},
|
||||
watch: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,42 +1,56 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form label-width="75px" size="mini" label-position="right" @submit.native.prevent>
|
||||
<filter-box :item-width="350">
|
||||
<el-form-item label="字典列表">
|
||||
<el-select class="filter-item" v-model="currentDictId" placeholder="请选择字典" @change="onDictChange">
|
||||
<el-option v-for="item in dictList" :key="item.variableName" :label="item.name" :value="item.variableName"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button slot="operator" type="primary" size="mini" :plain="true"
|
||||
:disabled="!checkPermCodeExist('formSysDict:fragmentSysDict:reloadCache') || currentDict == null"
|
||||
@click="onRefreshCacheData">
|
||||
同步缓存
|
||||
</el-button>
|
||||
<el-button slot="operator" type="primary" size="mini"
|
||||
:disabled="!checkPermCodeExist('formSysDict:fragmentSysDict:add') || currentDict == null"
|
||||
@click="onAddDictData">
|
||||
添加数据
|
||||
</el-button>
|
||||
</filter-box>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="getCurrentDictData" size="mini" header-cell-class-name="table-header-gray">
|
||||
<el-table-column label="ID" prop="id" />
|
||||
<el-table-column label="字典名称" prop="name" />
|
||||
<el-table-column label="操作" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" :disabled="!checkPermCodeExist('formSysDict:fragmentSysDict:update')" @click="onUpdateDictDataClick(scope.row)">编辑</el-button>
|
||||
<el-button type="text" size="mini" :disabled="!checkPermCodeExist('formSysDict:fragmentSysDict:delete')" @click="onDeleteDictDataClick(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-container>
|
||||
<el-aside width="300px">
|
||||
<el-card class="base-card" shadow="never" title="字典列表" :body-style="{ padding: '0px' }">
|
||||
<div slot="header" class="base-card-header">
|
||||
<span>字典列表</span>
|
||||
</div>
|
||||
<el-scrollbar :style="{height: (getClientHeight - 184) + 'px'}" class="custom-scroll">
|
||||
<el-tree :data="dictList" :props="{label: 'name'}" node-key="variableName" :highlight-current="true"
|
||||
:current-node-key="dictList[0].variableName" @node-click="onDictChange">
|
||||
<div class="module-node-item" slot-scope="{ data }">
|
||||
<span style="padding-left: 24px;">{{data.name}}</span>
|
||||
</div>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
</el-card>
|
||||
</el-aside>
|
||||
<el-main style="padding-left: 15px;">
|
||||
<el-form label-width="75px" size="mini" label-position="right" @submit.native.prevent>
|
||||
<filter-box :item-width="350">
|
||||
<el-button slot="operator" type="primary" size="mini" :plain="true"
|
||||
:disabled="!checkPermCodeExist('formSysDict:fragmentSysDict:reloadCache') || currentDict == null"
|
||||
@click="onRefreshCacheData">
|
||||
同步缓存
|
||||
</el-button>
|
||||
<el-button slot="operator" type="primary" size="mini"
|
||||
:disabled="!checkPermCodeExist('formSysDict:fragmentSysDict:add') || currentDict == null"
|
||||
@click="onAddDictData">
|
||||
添加数据
|
||||
</el-button>
|
||||
</filter-box>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-table :data="getCurrentDictData" size="mini" header-cell-class-name="table-header-gray"
|
||||
:height="(getClientHeight - 178) + 'px'">
|
||||
<el-table-column label="ID" prop="id" />
|
||||
<el-table-column label="字典名称" prop="name" />
|
||||
<el-table-column label="操作" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" :disabled="!checkPermCodeExist('formSysDict:fragmentSysDict:update')" @click="onUpdateDictDataClick(scope.row)">编辑</el-button>
|
||||
<el-button type="text" size="mini" :disabled="!checkPermCodeExist('formSysDict:fragmentSysDict:delete')" @click="onDeleteDictDataClick(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { findItemFromList } from '@/utils';
|
||||
/* eslint-disable-next-line */
|
||||
import { DictionaryController } from '@/api';
|
||||
@@ -61,7 +75,6 @@ export default {
|
||||
reloadCachedDataApi: DictionaryController.dictReloadGradeCachedData
|
||||
}
|
||||
],
|
||||
currentDictId: undefined,
|
||||
currentDict: undefined,
|
||||
currentDictDataList: []
|
||||
}
|
||||
@@ -73,8 +86,9 @@ export default {
|
||||
this.currentDictDataList = res.getList();
|
||||
}).catch(e => {});
|
||||
},
|
||||
onDictChange (value) {
|
||||
this.currentDict = findItemFromList(this.dictList, value, 'variableName');
|
||||
onDictChange (data) {
|
||||
if (this.currentDict === data) return;
|
||||
this.currentDict = findItemFromList(this.dictList, (data || {}).variableName, 'variableName');
|
||||
this.currentDictDataList = [];
|
||||
if (this.currentDict == null) {
|
||||
this.$message.error('没有找到相关字典');
|
||||
@@ -122,7 +136,27 @@ export default {
|
||||
computed: {
|
||||
getCurrentDictData () {
|
||||
return this.currentDictDataList;
|
||||
}
|
||||
},
|
||||
...mapGetters(['getClientHeight'])
|
||||
},
|
||||
mounted () {
|
||||
this.onDictChange(this.dictList[0]);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
>>> .el-tree-node__content {
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
>>> .el-tree-node__content .is-leaf {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.module-node-item {
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -191,7 +191,7 @@ export default {
|
||||
value: []
|
||||
},
|
||||
SysRole: {
|
||||
impl: new TableWidget(this.loadSysRoleData, this.loadSysRoleVerify, true, 'createTime', 1)
|
||||
impl: new TableWidget(this.loadSysRoleData, this.loadSysRoleVerify, true, false, 'createTime', 1)
|
||||
},
|
||||
isInit: false
|
||||
},
|
||||
|
||||
@@ -94,7 +94,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadSysUserStatusDropdownList)
|
||||
},
|
||||
SysUser: {
|
||||
impl: new TableWidget(this.loadSysUserData, this.loadSysUserVerify, true, 'createTime', 1)
|
||||
impl: new TableWidget(this.loadSysUserData, this.loadSysUserVerify, true, false, 'createTime', 1)
|
||||
},
|
||||
isInit: false
|
||||
},
|
||||
|
||||
@@ -77,7 +77,7 @@ export default {
|
||||
showName: undefined
|
||||
},
|
||||
SysPermCode: {
|
||||
impl: new TableWidget(this.loadSysPermCodeData, this.loadSysPermCodeVerify, false, 'showOrder', 1),
|
||||
impl: new TableWidget(this.loadSysPermCodeData, this.loadSysPermCodeVerify, false, false, 'showOrder', 1),
|
||||
totalCount: 0,
|
||||
sortInfo: {
|
||||
orderField: 'showOrder',
|
||||
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
sysRoleName: undefined
|
||||
},
|
||||
SysRole: {
|
||||
impl: new TableWidget(this.loadSysRoleData, this.loadSysRoleVerify, true, 'createTime', 1)
|
||||
impl: new TableWidget(this.loadSysRoleData, this.loadSysRoleVerify, true, false, 'createTime', 1)
|
||||
},
|
||||
isInit: false
|
||||
},
|
||||
@@ -180,7 +180,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadSysRoleDropdownList)
|
||||
},
|
||||
SysUser: {
|
||||
impl: new TableWidget(this.loadSysUserData, this.loadSysUserVerify, true, 'createTime', 1)
|
||||
impl: new TableWidget(this.loadSysUserData, this.loadSysUserVerify, true, false, 'createTime', 1)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadSysRoleDropdownList)
|
||||
},
|
||||
SysUser: {
|
||||
impl: new TableWidget(this.loadSysUserData, this.loadSysUserVerify, true, 'createTime', 1)
|
||||
impl: new TableWidget(this.loadSysUserData, this.loadSysUserVerify, true, false, 'createTime', 1)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ export default {
|
||||
impl: new DropdownWidget(this.loadSysUserStatusDropdownList)
|
||||
},
|
||||
SysUser: {
|
||||
impl: new TableWidget(this.loadSysUserData, this.loadSysUserVerify, true, 'createTime', 1)
|
||||
impl: new TableWidget(this.loadSysUserData, this.loadSysUserVerify, true, false, 'createTime', 1)
|
||||
},
|
||||
isInit: false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user