commit:同步2.1版本

This commit is contained in:
Jerry
2021-12-16 21:59:51 +08:00
parent 387dc5c939
commit 1597afbfe1
383 changed files with 3014 additions and 1704 deletions

View File

@@ -1,6 +1,17 @@
import * as staticDict from '@/staticDict'
export default class DictionaryController {
static dictSysRole (sender, params, axiosOption, httpOption) {
return new Promise((resolve, reject) => {
sender.doUrl('/admin/upms/sysRole/listDict', 'get', params, axiosOption, httpOption).then(res => {
let dictData = new staticDict.DictionaryBase('角色字典');
dictData.setList(res.data);
resolve(dictData);
}).catch(err => {
reject(err);
});
});
}
static dictSysUserStatus () {
return new Promise((resolve) => {
resolve(staticDict.SysUserStatus);

View File

@@ -2,7 +2,6 @@ import Vue from 'vue';
import { Loading, Message } from 'element-ui';
import request from './request';
import requestUrl from './requestUrl';
import merge from 'lodash/merge';
import { globalConfig } from '@/core/config';
/**
@@ -132,34 +131,41 @@ const ajaxThrottleSet = new Set();
* @param {Object} options 显示设置
*/
const doUrl = function (url, type, params, axiosOption, options) {
options = merge(globalConfig.httpOption, options);
axiosOption = merge(globalConfig.axiosOption, axiosOption);
let finalOption = {
...globalConfig.httpOption,
...options
};
let { showMask, showError, throttleFlag, throttleTimeout } = finalOption;
let finalAxiosOption = {
...globalConfig.axiosOption,
...axiosOption
}
if (type == null || type === '') type = 'post';
if (ajaxThrottleSet.has(url) && options.throttleFlag) {
if (ajaxThrottleSet.has(url) && throttleFlag) {
return Promise.resolve();
} else {
if (options.throttleFlag) {
if (throttleFlag) {
ajaxThrottleSet.add(url);
setTimeout(() => {
ajaxThrottleSet.delete(url);
}, options.throttleTimeout || 50);
}, throttleTimeout || 50);
}
return new Promise((resolve, reject) => {
if (options.showMask) loadingManager.showMask();
if (showMask) loadingManager.showMask();
let ajaxCall = null;
if (type.toLowerCase() === 'get') {
ajaxCall = fetchGet(url, params, axiosOption);
ajaxCall = fetchGet(url, params, finalAxiosOption);
} else if (type.toLowerCase() === 'post') {
ajaxCall = fetchPost(url, params, axiosOption);
ajaxCall = fetchPost(url, params, finalAxiosOption);
}
if (ajaxCall != null) {
ajaxCall.then(res => {
if (options.showMask) loadingManager.hideMask();
if (showMask) loadingManager.hideMask();
if (res.data && res.data.success) {
resolve(res.data);
} else {
if (options.showError) {
if (showError) {
Message.error({
showClose: true,
message: res.data.errorMessage ? res.data.errorMessage : '数据请求失败'
@@ -168,8 +174,8 @@ const doUrl = function (url, type, params, axiosOption, options) {
reject(res.data);
}
}).catch(e => {
if (options.showMask) loadingManager.hideMask();
if (options.showError) {
if (showMask) loadingManager.hideMask();
if (showError) {
Message.error({
showClose: true,
message: e.errorMessage ? e.errorMessage : '网络请求错误'
@@ -178,7 +184,7 @@ const doUrl = function (url, type, params, axiosOption, options) {
reject(e);
});
} else {
if (options.showMask) loadingManager.hideMask();
if (showMask) loadingManager.hideMask();
reject(new Error('错误的请求类型 - ' + type));
}
});

View File

@@ -1 +1,16 @@
export default {}
// 获得消息列表数据
function loadMessage (context, owner) {
// TODO: 获取消息列表
}
export default {
startMessage: (context, owner) => {
// TODO: 开始消息获取轮询
},
stopMessage: (context) => {
// TODO: 结束消息获取轮询
},
reloadMessage: (context, owner) => {
loadMessage(context, owner);
}
}

View File

@@ -82,5 +82,8 @@ export default {
},
getCurrentColumnId: (state) => {
return state.currentColumnId;
},
getMessageList: (state) => {
return state.messageList;
}
}

View File

@@ -157,5 +157,11 @@ export default {
setCurrentColumnId: (state, columnId) => {
if (setObjectToSessionStorage('currentColumnId', columnId)) state.currentColumnId = columnId;
if (setObjectToSessionStorage('currentMenuId', null)) state.currentMenuId = null;
},
setMessageTimer: (state, timerHandler) => {
state.messageTimer = timerHandler;
},
setMessageList: (state, messageList) => {
state.messageList = messageList;
}
}

View File

@@ -25,5 +25,8 @@ export default {
// 当前菜单
currentMenuId: getObjectFromSessionStorage('currentMenuId', undefined),
// 当前栏目
currentColumnId: getObjectFromSessionStorage('currentColumnId', undefined)
currentColumnId: getObjectFromSessionStorage('currentColumnId', undefined),
// 消息列表
messageTimeer: null,
messageList: []
}

View File

@@ -34,7 +34,7 @@
</div>
<el-scrollbar class="custom-scroll" style="height: calc(620px - 50px);">
<el-row :gutter="20">
<el-col class="table-box" :span="24">
<el-col class="table-box gutter-bottom" :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">
@@ -92,7 +92,7 @@
</div>
<el-scrollbar class="custom-scroll" style="height: calc(300px - 50px);">
<el-row :gutter="20">
<el-col class="table-box" :span="24">
<el-col class="table-box gutter-bottom" :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" />
@@ -140,7 +140,7 @@
</div>
<el-scrollbar class="custom-scroll" style="height: calc(300px - 50px);">
<el-row :gutter="20">
<el-col class="table-box" :span="24">
<el-col class="table-box gutter-bottom" :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" />
@@ -462,12 +462,6 @@ export default {
* 删除
*/
onDeleteClick (row) {
if (
row.classId == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
classId: row.classId
};
@@ -483,13 +477,6 @@ export default {
* 移除
*/
onDeleteClassCourseClick (row) {
if (
(this.formClass.StudentClass.impl.currentRow || {}).classId == null ||
row.courseId == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId,
courseId: row.courseId
@@ -506,13 +493,6 @@ export default {
* 移除
*/
onDeleteClassStudentClick (row) {
if (
(this.formClass.StudentClass.impl.currentRow || {}).classId == null ||
row.studentId == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
classId: (this.formClass.StudentClass.impl.currentRow || {}).classId,
studentId: row.studentId

View File

@@ -102,6 +102,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, 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';
@@ -282,12 +284,6 @@ export default {
* 删除
*/
onDeleteClick (row) {
if (
row.courseId == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
courseId: row.courseId
};

View File

@@ -49,7 +49,7 @@
</div>
</el-card>
</el-col>
<el-col class="table-box" :span="24">
<el-col class="table-box gutter-bottom" :span="24">
<el-card class="base-card" style="height: 350px" shadow="never" :body-style="{padding: '0px'}">
<div slot="header" class="base-card-header">
<span>课程流水统计</span>
@@ -74,6 +74,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, 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';

View File

@@ -67,6 +67,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, 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';
@@ -146,9 +148,9 @@ export default {
}
},
methods: {
onCancel (isSuccess) {
onCancel (isSuccess, data) {
if (this.observer != null) {
this.observer.cancel(isSuccess);
this.observer.cancel(isSuccess, data);
}
},
/**
@@ -226,15 +228,6 @@ export default {
onAddClick () {
this.$refs.formCreateClass.validate((valid) => {
if (!valid) return;
if (
this.formData.StudentClass.className == null ||
this.formData.StudentClass.schoolId == null ||
this.formData.StudentClass.leaderId == null ||
this.formData.StudentClass.classLevel == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
studentClassDto: {
className: this.formData.StudentClass.className,

View File

@@ -98,6 +98,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, 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';
@@ -182,9 +184,9 @@ export default {
}
},
methods: {
onCancel (isSuccess) {
onCancel (isSuccess, data) {
if (this.observer != null) {
this.observer.cancel(isSuccess);
this.observer.cancel(isSuccess, data);
}
},
/**
@@ -256,18 +258,6 @@ export default {
onAddClick () {
this.$refs.formCreateCourse.validate((valid) => {
if (!valid) return;
if (
this.formData.Course.courseName == null ||
this.formData.Course.price == null ||
this.formData.Course.difficulty == null ||
this.formData.Course.gradeId == null ||
this.formData.Course.subjectId == null ||
this.formData.Course.classHour == null ||
this.formData.Course.pictureUrl == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
courseDto: {
courseName: this.formData.Course.courseName,

View File

@@ -221,9 +221,9 @@ export default {
}
},
methods: {
onCancel (isSuccess) {
onCancel (isSuccess, data) {
if (this.observer != null) {
this.observer.cancel(isSuccess);
this.observer.cancel(isSuccess, data);
}
},
/**
@@ -388,21 +388,6 @@ export default {
onAddClick () {
this.$refs.formCreateStudent.validate((valid) => {
if (!valid) return;
if (
this.formData.Student.loginMobile == null ||
this.formData.Student.studentName == null ||
this.formData.Student.provinceId == null ||
this.formData.Student.cityId == null ||
this.formData.Student.districtId == null ||
this.formData.Student.gender == null ||
this.formData.Student.birthday == null ||
this.formData.Student.experienceLevel == null ||
this.formData.Student.gradeId == null ||
this.formData.Student.schoolId == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
studentDto: {
loginMobile: this.formData.Student.loginMobile,

View File

@@ -67,6 +67,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, 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';
@@ -149,9 +151,9 @@ export default {
}
},
methods: {
onCancel (isSuccess) {
onCancel (isSuccess, data) {
if (this.observer != null) {
this.observer.cancel(isSuccess);
this.observer.cancel(isSuccess, data);
}
},
/**
@@ -231,16 +233,6 @@ export default {
onUpdateClick () {
this.$refs.formEditClass.validate((valid) => {
if (!valid) return;
if (
this.classId == null ||
this.formData.StudentClass.className == null ||
this.formData.StudentClass.schoolId == null ||
this.formData.StudentClass.leaderId == null ||
this.formData.StudentClass.classLevel == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
studentClassDto: {
classId: this.classId,

View File

@@ -30,6 +30,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, findTreeNodePath, findItemFromList } from '@/utils';
/* eslint-disable-next-line */
import rules from '@/utils/validate.js';
/* eslint-disable-next-line */
import { uploadMixin, statsDateRangeMixin } from '@/core/mixins';
@@ -90,9 +92,9 @@ export default {
}
},
methods: {
onCancel (isSuccess) {
onCancel (isSuccess, data) {
if (this.observer != null) {
this.observer.cancel(isSuccess);
this.observer.cancel(isSuccess, data);
}
},
/**
@@ -110,13 +112,6 @@ export default {
* 保存
*/
onUpdateClassCourseClick () {
if (
this.classId == null ||
this.courseId == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
classCourseDto: {
classId: this.classId,

View File

@@ -98,6 +98,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, 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';
@@ -185,9 +187,9 @@ export default {
}
},
methods: {
onCancel (isSuccess) {
onCancel (isSuccess, data) {
if (this.observer != null) {
this.observer.cancel(isSuccess);
this.observer.cancel(isSuccess, data);
}
},
/**
@@ -261,19 +263,6 @@ export default {
onUpdateClick () {
this.$refs.formEditCourse.validate((valid) => {
if (!valid) return;
if (
this.courseId == null ||
this.formData.Course.courseName == null ||
this.formData.Course.price == null ||
this.formData.Course.difficulty == null ||
this.formData.Course.gradeId == null ||
this.formData.Course.subjectId == null ||
this.formData.Course.classHour == null ||
this.formData.Course.pictureUrl == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
courseDto: {
courseId: this.courseId,

View File

@@ -265,9 +265,9 @@ export default {
}
},
methods: {
onCancel (isSuccess) {
onCancel (isSuccess, data) {
if (this.observer != null) {
this.observer.cancel(isSuccess);
this.observer.cancel(isSuccess, data);
}
},
/**
@@ -455,22 +455,6 @@ export default {
onUpdateClick () {
this.$refs.formEditStudent.validate((valid) => {
if (!valid) return;
if (
this.studentId == null ||
this.formData.Student.loginMobile == null ||
this.formData.Student.studentName == null ||
this.formData.Student.provinceId == null ||
this.formData.Student.cityId == null ||
this.formData.Student.districtId == null ||
this.formData.Student.gender == null ||
this.formData.Student.birthday == null ||
this.formData.Student.experienceLevel == null ||
this.formData.Student.gradeId == null ||
this.formData.Student.schoolId == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
studentDto: {
studentId: this.studentId,

View File

@@ -87,6 +87,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, 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';
@@ -262,12 +264,6 @@ export default {
* 添加
*/
onAddClassCourseClick () {
if (
this.classId == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
classId: this.classId,
classCourseDtoList: this.tableSelectRowList.map((item) => {

View File

@@ -66,6 +66,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, 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';
@@ -187,12 +189,6 @@ export default {
* 添加
*/
onAddClassStudentClick () {
if (
this.classId == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
classId: this.classId,
classStudentDtoList: this.tableSelectRowList.map((item) => {

View File

@@ -97,6 +97,8 @@
<script>
import { mapGetters } from 'vuex';
/* eslint-disable-next-line */
import { findTreeNode, 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';
@@ -267,12 +269,6 @@ export default {
* 删除
*/
onDeleteClick (row) {
if (
row.studentId == null
) {
this.$message.error('请求失败,发现必填参数为空!');
return;
}
let params = {
studentId: row.studentId
};

View File

@@ -80,6 +80,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, 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';

View File

@@ -88,6 +88,8 @@
<script>
/* eslint-disable-next-line */
import { findTreeNode, 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';

View File

@@ -184,5 +184,5 @@ export default {
}
</script>
<style lang="scss" scoped>
<style lang="scss">
</style>

View File

@@ -78,6 +78,13 @@ export default {
params.sysDeptDtoFilter = {
deptName: this.formSysDept.formFilterCopy.deptName
};
// 按照显示顺序排序
params.orderParam = [
{
fieldName: 'showOrder',
asc: true
}
];
return new Promise((resolve, reject) => {
SysDeptController.list(this, params).then(res => {
resolve({