调整列车详情显示和路由课程创建角色处理
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),
|
||||
textFill: style.trainTextColor,
|
||||
textStroke: style.trainTextColor,
|
||||
fontWeight: 400,
|
||||
textStrokeWidth: 0,
|
||||
fontSize: model.fontSize,
|
||||
fontFamily: style.Train.common.fontFamily,
|
||||
@ -301,20 +300,12 @@ export default class TrainBody extends Group {
|
||||
this.trainBodyBox && this.trainBodyBox.setColor(key, color);
|
||||
}
|
||||
getBoundingRect() {
|
||||
let rect = null;
|
||||
this.eachChild(elem => {
|
||||
if (elem) {
|
||||
const tempRect = elem.getBoundingRect();
|
||||
if ((tempRect.x || tempRect.y) && tempRect.width && tempRect.height) {
|
||||
if (rect) {
|
||||
rect.union(tempRect);
|
||||
} else {
|
||||
rect = tempRect;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return rect || new BoundingRect(0, 0, 0, 0);
|
||||
const rect = new BoundingRect(0, 0, 0, 0);
|
||||
if (this.trainBodyBox) {
|
||||
const tempRect = this.trainBodyBox.getBoundingRect().clone();
|
||||
rect.union(tempRect);
|
||||
}
|
||||
return rect;
|
||||
}
|
||||
formatChangePosition(model, style) {
|
||||
if (this.nameFormat) {
|
||||
|
@ -2,32 +2,32 @@ import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
export default class TrainBodyBox extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.trainBodyBox = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.point.x,
|
||||
y: model.point.y,
|
||||
width: model.style.Train.common.trainWidth,
|
||||
height: model.style.Train.common.trainHeight
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Train.trainBody.trainBodyLineWidth,
|
||||
stroke: model.style.Train.trainBody.trainSidelineColor || model.style.trainSidelineColor,
|
||||
fill: model.style.Train.trainBody.trainBodyFillColor
|
||||
},
|
||||
cursor: 'pointer'
|
||||
});
|
||||
this.add(this.trainBodyBox);
|
||||
}
|
||||
setColor(key, color) {
|
||||
this.trainBodyBox.setStyle(key, color);
|
||||
}
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.point.x,
|
||||
y: model.point.y,
|
||||
width: model.style.Train.common.trainWidth,
|
||||
height: model.style.Train.common.trainHeight
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.style.Train.trainBody.trainBodyLineWidth,
|
||||
stroke: model.style.Train.trainBody.trainSidelineColor || model.style.trainSidelineColor,
|
||||
fill: model.style.Train.trainBody.trainBodyFillColor
|
||||
},
|
||||
cursor: 'pointer'
|
||||
});
|
||||
this.add(this.trainBodyBox);
|
||||
}
|
||||
setColor(key, color) {
|
||||
this.trainBodyBox.setStyle(key, color);
|
||||
}
|
||||
}
|
||||
|
@ -964,7 +964,7 @@ export const asyncRouter = [
|
||||
component: Layout,
|
||||
meta: {
|
||||
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'),
|
||||
children: [
|
||||
|
@ -20,7 +20,7 @@
|
||||
<script>
|
||||
import { listPublishMap, getMapListByProjectCode } from '@/api/jmap/map';
|
||||
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 FilterCity from '@/views/components/filterCity';
|
||||
import localStore from 'storejs';
|
||||
@ -215,7 +215,7 @@ export default {
|
||||
this.$store.dispatch('config/resize', { width: width, height: height });
|
||||
},
|
||||
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;
|
||||
}
|
||||
importStudentResults(ProjectCode[that.project], studentData).then(resp => {
|
||||
that.$message.success('学生成绩导入成功!');
|
||||
that.$message.success('学生信息导入成功!');
|
||||
}).catch(error => {
|
||||
that.$message.error('学生成绩导入失败!');
|
||||
that.$message.error('学生信息导入失败!');
|
||||
});
|
||||
} catch (error) {
|
||||
that.$message.warning(`解析成绩单失败:${error}`);
|
||||
|
Loading…
Reference in New Issue
Block a user