调整列车详情显示和路由课程创建角色处理
This commit is contained in:
parent
f7d772e192
commit
8335ee1259
@ -137,7 +137,6 @@ export default class TrainBody extends Group {
|
|||||||
text: targetCode.substring(targetCode.length - style.Train.trainNumber.targetCodePrefix.length),
|
text: targetCode.substring(targetCode.length - style.Train.trainNumber.targetCodePrefix.length),
|
||||||
textFill: style.trainTextColor,
|
textFill: style.trainTextColor,
|
||||||
textStroke: style.trainTextColor,
|
textStroke: style.trainTextColor,
|
||||||
fontWeight: 400,
|
|
||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: style.Train.common.fontFamily,
|
fontFamily: style.Train.common.fontFamily,
|
||||||
@ -301,20 +300,12 @@ export default class TrainBody extends Group {
|
|||||||
this.trainBodyBox && this.trainBodyBox.setColor(key, color);
|
this.trainBodyBox && this.trainBodyBox.setColor(key, color);
|
||||||
}
|
}
|
||||||
getBoundingRect() {
|
getBoundingRect() {
|
||||||
let rect = null;
|
const rect = new BoundingRect(0, 0, 0, 0);
|
||||||
this.eachChild(elem => {
|
if (this.trainBodyBox) {
|
||||||
if (elem) {
|
const tempRect = this.trainBodyBox.getBoundingRect().clone();
|
||||||
const tempRect = elem.getBoundingRect();
|
|
||||||
if ((tempRect.x || tempRect.y) && tempRect.width && tempRect.height) {
|
|
||||||
if (rect) {
|
|
||||||
rect.union(tempRect);
|
rect.union(tempRect);
|
||||||
} else {
|
|
||||||
rect = tempRect;
|
|
||||||
}
|
}
|
||||||
}
|
return rect;
|
||||||
}
|
|
||||||
});
|
|
||||||
return rect || new BoundingRect(0, 0, 0, 0);
|
|
||||||
}
|
}
|
||||||
formatChangePosition(model, style) {
|
formatChangePosition(model, style) {
|
||||||
if (this.nameFormat) {
|
if (this.nameFormat) {
|
||||||
|
@ -964,7 +964,7 @@ export const asyncRouter = [
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
meta: {
|
meta: {
|
||||||
i18n: 'router.studentManage',
|
i18n: 'router.studentManage',
|
||||||
roles: [admin, user]
|
roles: [admin, user, lessonCreater]
|
||||||
},
|
},
|
||||||
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('gzb') && !window.document.location.pathname.includes('gzb') : !window.document.location.pathname.includes('gzb'),
|
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('gzb') && !window.document.location.pathname.includes('gzb') : !window.document.location.pathname.includes('gzb'),
|
||||||
children: [
|
children: [
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
|
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
import { superAdmin, admin } from '@/router/index_APP_TARGET';
|
import { superAdmin, admin, lessonCreater } from '@/router/index_APP_TARGET';
|
||||||
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
||||||
import FilterCity from '@/views/components/filterCity';
|
import FilterCity from '@/views/components/filterCity';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
@ -215,7 +215,7 @@ export default {
|
|||||||
this.$store.dispatch('config/resize', { width: width, height: height });
|
this.$store.dispatch('config/resize', { width: width, height: height });
|
||||||
},
|
},
|
||||||
isAdministrator() {
|
isAdministrator() {
|
||||||
return this.$store.state.user.roles.includes(superAdmin) || this.$store.state.user.roles.includes(admin);
|
return this.$store.state.user.roles.includes(superAdmin) || this.$store.state.user.roles.includes(admin) || this.$store.state.user.roles.includes(lessonCreater);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -404,9 +404,9 @@ export default {
|
|||||||
studentData.students = students;
|
studentData.students = students;
|
||||||
}
|
}
|
||||||
importStudentResults(ProjectCode[that.project], studentData).then(resp => {
|
importStudentResults(ProjectCode[that.project], studentData).then(resp => {
|
||||||
that.$message.success('学生成绩导入成功!');
|
that.$message.success('学生信息导入成功!');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
that.$message.error('学生成绩导入失败!');
|
that.$message.error('学生信息导入失败!');
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
that.$message.warning(`解析成绩单失败:${error}`);
|
that.$message.warning(`解析成绩单失败:${error}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user